[example: Coding an Ordered Pair]
For sets $a$ and $b$, the Kuratowski ordered pair is
\begin{align*}
(a,b) := \{\{a\}, \{a,b\}\}.
\end{align*}
[claim]For all sets $a,b,c,d$, one has $(a,b)=(c,d)$ if and only if $a=c$ and $b=d$.[/claim]
[proof]If $a=c$ and $b=d$, then
\begin{align*}
(a,b)
&=\{\{a\},\{a,b\}\}\\
&=\{\{c\},\{c,d\}\}\\
&=(c,d).
\end{align*}
Conversely, suppose
\begin{align*}
\{\{a\},\{a,b\}\}=\{\{c\},\{c,d\}\}.
\end{align*}
Since $\{a\}\in\{\{a\},\{a,b\}\}$, the equality gives
\begin{align*}
\{a\}\in\{\{c\},\{c,d\}\}.
\end{align*}
Hence either $\{a\}=\{c\}$ or $\{a\}=\{c,d\}$. In the first case, $a=c$. In the second case, $c\in\{c,d\}=\{a\}$, so $c=a$. Thus in all cases,
\begin{align*}
a=c.
\end{align*}
Using $a=c$, the assumed equality becomes
\begin{align*}
\{\{a\},\{a,b\}\}=\{\{a\},\{a,d\}\}.
\end{align*}
Since $\{a,b\}\in\{\{a\},\{a,b\}\}$, we have
\begin{align*}
\{a,b\}\in\{\{a\},\{a,d\}\}.
\end{align*}
Thus either $\{a,b\}=\{a\}$ or $\{a,b\}=\{a,d\}$.
If $\{a,b\}=\{a,d\}$, then $b\in\{a,d\}$, so $b=a$ or $b=d$. If $b=d$, we are done. If $b=a$, then
\begin{align*}
\{a,d\}=\{a,b\}=\{a\},
\end{align*}
so $d\in\{a\}$ and therefore $d=a=b$.
If $\{a,b\}=\{a\}$, then $b\in\{a\}$, so $b=a$. Also $\{a,d\}\in\{\{a\},\{a,d\}\}=\{\{a\},\{a,b\}\}$, so either $\{a,d\}=\{a\}$ or $\{a,d\}=\{a,b\}$. In the first case, $d=a=b$. In the second case,
\begin{align*}
\{a,d\}=\{a,b\}=\{a\},
\end{align*}
so again $d=a=b$. Therefore $b=d$ in every case.
We have shown that $(a,b)=(c,d)$ implies $a=c$ and $b=d$, and the reverse implication was proved above.[/proof]
Thus the set $\{\{a\},\{a,b\}\}$ really remembers the first and second coordinates, which is why it can serve as a set-theoretic code for the ordered pair.
[/example]