Disprove: $\{\{ a,b\},b \}=\{\{ c,d\},d \}$ iff $a=c \ \ \text{and} \ b=d$ 
Prove/disprove:

*

*For every four elements $a,b,c,d$ we have: $\{\{ a\},b \}=\{\{ c\},d \}$ iff $a=c \ \ \text{and} \ b=d$


*For every four elements $a,b,c,d$ we have: $\{\{ a,b\},b \}=\{\{ c,d\},d \}$ iff $a=c \ \ \text{and} \ b=d$

I know the first is true and the second isn't. For 1. I can just say:
$\{\{ a\},b \}=\{\{ a\},b \}$ , $\{\{ c\},d \}=\{\{ c\},d \}$ and that's it (?) but for the second one I can't find a counter example.
 A: Recall that when we write a set $S$ in enumerating form like $S=\{x,y\}$, there is no order on the elements imposed even though we write $x$ before $y$. Actually - and one sometimes has to be careful about this possibility! - it is not even necessarily the case that $x\ne y$. All we know from that notation is that for any $z$ we have
$$z\in S\iff z=x\lor z=y. $$

Now consider the first problem with these special elements: Let $a=\emptyset$,  $c=d=\{\emptyset\}$, $b=\{\{\emptyset\}\}$. Then $$\{\{a\},b\}=\{\{\emptyset\},\{\{\emptyset\}\}\}=\{d,\{c\}\}=\{\{c\},d\}$$
and yet $a\ne c$ because $c$ is not empty (and also $b\ne d$). So this shows that there are counterexamples to the first problem.

Now assume that 
$$\tag1S:=\{\{a,b\},b\}=\{\{c,d\},d\} $$
and let us try to show that $a=b$ and $c=d$. (Of course the other direction - if $a=c$ and $b=d$ then $(1)$ - is trivial).
By the Axiom of Foundation there exists $x\in S$ such that $x\cap S=\emptyset$, i.e. the set
$$F:=\{\,x\in S\mid x\cap S=\emptyset\,\}$$
is nonempty. Since $b\in \{a,b\}\cap S$, we have $\{a,b\}\notin F$. We conclude that $F=\{b\}$. By the same argument, $F=\{d\}$.
But $\{b\}=\{d\}$ implies that $b=d$.
As a corollary, we see that $b\ne\{a,b\}$ because $b\in F$ and $\{a,b\}\notin F$. Therefore $S\setminus F=\{\{a,b\}\}=\{\{c,d\}\}$, hence
$T:=\{a,b\}=\{c,d\}$.
Now either $T\setminus F=\emptyset$, which implies $a\in F$ and hence $a=b$ (and likewise $c=d$); then $a=b=d=c$.
Or $T\setminus F$ is nonempty. Then necessarily $T\setminus F=\{a\}=\{c\}$ and hence again $a=c$. So in summary we indeed have $a=c$ and $b=d$.
