From book Axioms and Set Theory - A first course in Set Theory by Robert Andr´ Axiom A9 (Axiom of regularity): Every non-empty set A contains an element x whose intersection with A is empty.
From Wikipedia 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. In first-order logic, the axiom reads:
{\displaystyle \forall x\,(x\neq \varnothing \rightarrow \exists y\in x\,(y\cap x=\varnothing )).}
Now I totally understand that a class A = {A} is not a set by axiom of regularity as A intersection {A} is not null.
But What about class A = {A,B}, now as there exists B belong to A such that B intersection A is null so as per axiom of regularity such a set A = {A, B} and A is an element of A can exist.
But then in Wikipedia it is mentioned that - The axiom of regularity together with the axiom of pairing implies that no set is an element of itself
So how to prove that class A = {A,B} is not a set
(simple understandable answer if possible is very much appreciated.)