I am trying to prove with natural deduction the following with the Kuratowski definition of ordered pair:
$$\forall x, y, z, w(\langle x, y\rangle=\langle z, w\rangle\leftrightarrow(x=z\land y=w))$$
I can prove one direction, but I'm having trouble with the other one. So far, this is what I have:

Seems like you have the $\gets$ direction OK. I'm not going to be much help with a formal proof, since I haven't done that since HS. But here's the idea: If $\left\langle x,y \right\rangle = \left\langle z,w \right\rangle$, then $\left\{ \left\{ x \right\},\left\{ x,y \right\} \right\}=\left\{ \left\{ z \right\},\left\{ z,w \right\} \right\}$. So, the two sets are equal. Sets are equal only if they contain the same elements. That means, e.g., that $\{x\}\in \{\{z\},\{z,w\}\}$. How can that be? Which of $\{z\}$ or $\{z,w\}$ can $\{x\}$ be equal to? Why?