Equality of Ordered Pairs

Theorem
Two ordered pairs are equal if corresponding elements are equal:

$$\left({a, b}\right) = \left({c, d}\right) \iff a = c \land b = d$$

It follows directly that $$\left({a, b}\right) = \left({b, a}\right) \iff a = b$$.

Proof
Let $$\left({a, b}\right) = \left({c, d}\right)$$.

$$\left\{{\left\{{a}\right\}, \left\{{a, b}\right\}}\right\} = \left\{{\left\{{c}\right\}, \left\{{c, d}\right\}}\right\}$$ from the definition.

Suppose $$a = b$$. Then $$\left\{{\left\{{a}\right\}, \left\{{a, b}\right\}}\right\} = \left\{{\left\{{a}\right\}, \left\{{a}\right\}}\right\} = \left\{{\left\{{a}\right\}}\right\}$$.

Thus $$\left\{{\left\{{c}\right\}, \left\{{c, d}\right\}}\right\}$$ has only one element.

Thus $$\left\{{c}\right\} = \left\{{c, d}\right\}$$ and so $$c = d$$.

So $$\left\{{\left\{{c}\right\}, \left\{{c, d}\right\}}\right\} = \left\{{\left\{{a}\right\}}\right\}$$ and $$a = c$$.

Thus the result holds.

Now suppose $$a \ne b$$. By the same argument it follows that $$c \ne d$$.

So that means that either $$\left\{{a}\right\} = \left\{{c}\right\}$$ or $$\left\{{a}\right\} = \left\{{c, d}\right\}$$.

Since $$\left\{{c, d}\right\}$$ has distinct elements, $$\left\{{a}\right\} \ne \left\{{c, d}\right\}$$.

Thus $$\left\{{a}\right\} = \left\{{c}\right\}$$ and so $$a = c$$.

Then $$\left\{{a, b}\right\} = \left\{{c, d}\right\}$$ and so $$b = d$$.

Now suppose $$a = c$$ and $$b = d$$.

Then $$\left\{{a}\right\} = \left\{{c}\right\}$$ and $$\left\{{a, b}\right\} = \left\{{c, d}\right\}$$.

Thus $$\left\{{\left\{{a}\right\}, \left\{{a, b}\right\}}\right\} = \left\{{\left\{{c}\right\}, \left\{{c, d}\right\}}\right\}$$.