# Two relations defined on same sets be equal?

We say two relations $$R_1$$ and $$R_2$$ are equal if:

$$R_1\subseteq \prod_{i=1}^n A_i$$ $$R_2\subseteq \prod_{i=1}^m B_i$$ then, $$n = m ,$$ $$A_i=B_i\quad \forall i,\,1\le i \le n,$$ $$let,s_j\,\,and\,\,t_j\,\,be\,\,tuples\,\,of\,\,R_1\,\,and\,\,R_2\,\,respectively$$ $$s.t.,\,\,s_j=\epsilon\,R_1\land$$ $$t_j=\epsilon\,R_2$$ $$\Rightarrow\,(a_1=b_1\,\land a_2=b_2\,\land\ldots\land a_n=b_n)$$ $$\forall \,j\,\epsilon \mathbb N)$$

where $$A_i$$ and $$B_i$$ are sets.

So, will the below relations be equal? $$Name = \{x,y\}\,\,and\,\,City = \{a,b\}$$ let, $$R_1=\{|\quad p\,\epsilon\,Name\land q\,\epsilon\,City,\quad p\,\,was\,\,born\,\,in\,\,city\,\,q\}$$ $$R_2=\{|\quad p\,\epsilon\,Name\land q\,\epsilon\,City,\quad p\,\,lives\,\,in\,\,city\,\,q\}$$ suppose we get, $$R_1=\{,\}$$ $$R_2=\{,\}$$ That is, x was born in the same city which he/she lives in.
Can we say,$$R_1=R_2$$

• Your definition of equality of relations is wrong. It only accomplishes that both relations are subsets of the same product, not actually equal. Commented Dec 26, 2020 at 10:57
• Thanks, @Christoph I totally skipped that one condition. I have edited the question. Commented Dec 26, 2020 at 11:58
• Your condition on tuples when defining equality of relations is not what you want to say. It implies that $R_1=R_2$, but also that this relation contains only a single tuple. Commented Dec 26, 2020 at 15:49
• @MaliceVidrine I have edited the condition. I hope I have removed any sort of ambiguity. Commented Dec 26, 2020 at 18:43
• Also let me clear my doubt further. I was confusing equality of two relations with them being same. I think my concepts are pretty much clear now. Commented Dec 26, 2020 at 18:57

The relations $$R_1$$ and $$R_2$$ are equal if and only if both $$x$$ and $$y$$ live in the same city as they were born in. That is, for all $$p\in\{x,y\}$$ and all $$q\in\{a,b\}$$ we have $$\text{p was born in city q} \quad\Longleftrightarrow\quad \text{p lives in city q.}$$
You wrote down the same set of pairs to define $$R_1$$ and $$R_2$$, so indeed they are equal.