Axiom of Pairing Axiom of Pairing states that if $a,b$ are sets, $\exists$ a set $A$ such that $A=\{{a,b\}}$. My question is that why we can't use Axiom of specification to define $A=\{x|x=a \vee x=b\}$?
 A: Its called the axiom of separation and it only allows you to define a subset of another set. An axiom such as $\{x|\varphi(x)\}$ exists leads to contradictions.
A: The axiom of pairing is not a consequence of the axiom of specification, as Rene Schipperus pointed out.
However, it is a consequence of the axioms of replacement, power set and empty set. Because now you can prove there exists a set of two elements $\{\varnothing,\{\varnothing\}\}$, and using replacement you can now generate any other pair:
$$\varphi(x,y,p_1,p_2)= (x=\varnothing\land y=p_1)\lor(x=\{\varnothing\}\land y=p_2)$$
(And I have used here some shortcuts in the form of $\varnothing$ and $\{\varnothing\}$, otherwise this would be very very long.)
A: User wrote:

My question is that why we can't use Axiom of specification to define $A=\{x|x=a \vee x=b\}$?

To apply Specification to construct $A=\{a,b\}$, $a$ and $b$ would have to have been assumed or proven to be elements of some other set $B$, i.e. $a\in B$ and $b\in B$. Then $A=\{x|x\in B \land [x=a \vee x=b]\}$. Pairing has no such requirement.
