I've just started learning about ZFC set theory, and I'm looking into how relations over sets are defined in this context. The definition I found is that a relation $R$ over two sets $E$ and $F$ can either be implemented as:
1) A subset of $E \times F$, or
2) As the triplet $(E,F,G)$ where $G$ is a subset of $E \times F$.
I was thinking about relations over sets of relations, and was wondering wether such a relation $R$ could compare itself. (i.e. could $R \space R \space S$ or $S \space R \space R$ (infix notation), where $S$ is another relation, be a valid statement?)
My reasoning was that, if it were possible, there would necessarily be a cyclic membership chain like $R \in \dotsb \in R$ if we're going with definition 1), or $R \in \dotsb \in G \in \dotsb \in R$ with definition 2). And since the axiom of foundation prohibits it, it is not possible for a relation to compare itself with another.
But while it is pretty simple to proove that this is correct if ordered pairs are implemented as $(a,b)=\{\{a\},\{a,b\}\}$ and n-tuples as nested ordered pairs or as functions, my real question is if this would also be correct regardless of the implementation of those objects.
Since any definition for n-tuples must validate their caracteristic property for equality, $$ \forall(a_1,\dotsb,a_n)\forall(b_1,\dotsb,b_n),\space(a_1,\dotsb,a_n)=(b_1,\dotsb,b_n)\Longleftrightarrow\bigwedge_{i=1}^n (a_i=b_i)$$ can this be used to show that, regardless of the details of how they are defined, there will allways be a membership chain from $x_i$ to $(x_1,\dotsb,x_i,\dotsb,x_n)$?
I didn't find any answer on the internet of in the math stack exchange, unsurprisingly since to me this seems like a pretty tough question to answer...
Does anybody know if there is an answer to this question?
P.S.: I haven't yet looked into class theory, category theory, or really any extentions of set theory, but if there is such a proof that requires knowlege in those fields I'd still be happy to hear them. I just want to know if there is an answer, even if it is beyond my comprehension.
There are ways of implementing $(a,b)$ such that $a\not\in(a,b)$ (and there is no longer $\in$-chain connecting $a$ to $(a,b)$ either), perhaps surprisingly there are even useful ways to to do such a thing!
Among the many implementations of ordered pairs available there is the so called Quine-Rosser pair, defined as follows. Let $\sigma$ be the class function defined by $\sigma(x)=x+1$ if $x\in\Bbb N$ and $\sigma(x)=x$ otherwise. Given two sets $A$ and $B$ consider $\sigma[A]=\{\sigma(a)\mid a\in\ A\}$, note that no element of $\sigma[A]$ contains $0$, so if we now consider $C=\{\sigma(b)\cup\{0\}\mid b\in B\}$ we can define $(A,B)=\sigma[A]\cup C$.
This is an honest definition of pair, given $(A,B)$ you can recover $A$ by looking at $\{a\in (A,B)\mid 0\not\in a\}$ and undoing $\sigma$ (shifting back integers by one), while $B$ can be recovered in a similar way by looking at the elements of $(A,B)$ that do contain $0$.
Why is this useful? Given any set $x$ let $\mathrm{rank}(x)$ denote the least ordinal $\xi$ such that $x\subseteq V_\xi$. Note that with the standard implementation of ordered pairs $\mathrm{rank}((a,b))>\max\{\mathrm{rank}(a),\mathrm{rank}(b)\}$ while the Quine-Rosser definition does not increase rank (as long as one of $A$ and $B$ has infinite rank) and the existence of such a flat pairing function is useful occasionally.