I was reading about the axiom of regularity on Wikipedia.
It is stated that:
In mathematics, the axiom of regularity (also known as the axiom of foundation) is an axiom of Zermelo–Fraenkel set theory that states that every non-empty set $A$ contains an element that is disjoint from $A$.
$$\forall x\left(x\neq \emptyset\implies\exists y\in x\left(y\cap x=\emptyset\right)\right)$$
How can this be correct?
If $A$ contains an element $x$, then $x$ can not be disjoint from $A$, because $x$ belongs both to $A$ and to the set containing only $x$.
What am I misunderstanding?
One consequence of this is that $x \cap \{x\} = \emptyset$. This often confuses people, because it seems counter-intuitive.
But if the sets $x$ and $\{x\}$ have a common element, it must be $x$ itself, since $x$ is the only element of $\{x\}$. And this would lead us to conclude (reluctantly) that $x \in x$. Such a set would have "no foundation", since we'd have to "keep opening up" the set $x$ only to find still another one inside it: $x\in x \in x \in x\dots$
To avoid this, we devised a formula that says (in effect) "the buck stops somewhere". At first, it was believed we might need the set-equivalent of "atomic elements", or ur-elements, primitive objects that belonged to sets, but were not sets themselves. But mathematicians being what they are, found that set theory "made sense" without using ur-elements, and so they by and large abandoned them (why pack more luggage than you need?).