Originally Posted by

**emakarov** (A note on notation: To reduce the number of parentheses, I write $\displaystyle \forall x.\,P(x)$ with a period after $\displaystyle x$ when the scope of $\displaystyle \forall x$ extends as far to the right as possible.)

Point (a) can be checked directly. There are only ten different pairs $\displaystyle (x, y)$ (if we ignore symmetric pairs because it is clear that the relation $\displaystyle x=y\leftrightarrow\forall z.\,z\in x\leftrightarrow x\in y$ is symmetric). One can check all ten pairs and make sure that the equivalence holds.

Alternatively, it is obvious that $\displaystyle \forall x,y.\,x=y\to \forall z.\,z\in x\leftrightarrow z\in y$. We can prove the converse using the contrapositive: $\displaystyle \forall x, y.\,x\ne y\to\exists z.\,z\in x\land z\notin y\lor z\notin x\land z\in y$. Here for every pair of distinct elements (there are only six of those taking symmetry into account) one has to find an element belonging to one set but not to the other.

For (b), first write the set {0,{1},2} expanding the definitions of 0, 1, and 2. All three elements are different, so if we evaluated $\displaystyle x=y\leftrightarrow \forall z.\,z\in x\leftrightarrow z\in y$ on $\displaystyle x,y\in \{0,\{1\},2\}$ in the universe of all sets, the formula would be true. That is, for different $\displaystyle x$ and $\displaystyle y$ there would be a witness of the difference, i.e., a set $\displaystyle z$ belonging to one but not to the other. However, our universe is very poor, and the witnesses we found above may not be in our universe. That's why the formula may not be true in this small universe.

In any case, it is easy again to check every pair of distinct elements x and y (now there are only three of them) and see if $\displaystyle x=y\leftrightarrow \forall z.\,z\in x\leftrightarrow z\in y$ is true. Remember that $\displaystyle z$ ranges over the same 3-element universe.