Prove that For every two sets, only one can be an element of the other

I'm trying to show that if X $\in$ Y then Y$\notin$X or if $Y\in$X then X$\notin$Y.

Here's what I think by wikipedia Let X and Y be sets. Then apply the axiom of regularity to the set {X,Y}. We see there must be an element of {X,Y} which is also disjoint from it. It must be either X or Y. By the definition of disjoint then, we must have either Y is not an element of {X,Y} or X is not an element of {X,Y}.

Next I think I need to show that if Y $\notin${X,Y}, then Y$\notin$X?

Indeed you have to apply the axiom of regularity to $\{X,Y\}$.
Assume that $X\in Y$ and $Y\in X$. Then $$Y\in\{X,Y\}\cap X$$ and $$X\in\{X,Y\}\cap Y$$ That is, the set $\{X,Y\}$ is not disjoint with $X$ or $Y$, and that contradicts the axiom.
• How do you know $X$ $\in$ $Y$ $\Rightarrow$ $Y$ $\in$ $\{X$,$Y\}$ $\cap$ $X$? and what does $\{X$,$Y\}$ $\cap$ $X$? equal? I'm guessing $\{X$,$Y\}$ $\cap$ $X$? equals $X$. – user420360 May 23 '17 at 21:20
• How do you know $Y$ $\in$ $\{X,Y\}$ $\cap$ $X$? @ajotatxe – user420360 May 23 '17 at 22:25
• For example, $X\in\{X,Y\}\cap Y$ because a) $X\in\{X,Y\}$ (obvious) and b) $X\in Y$ (assumption). – ajotatxe May 24 '17 at 16:21