The lecture slides for my course define the Zermelo-Fraenkel axiom of extensionality as follows:
Slide 1:
Extensionality: x and y have the same elements
Slide 2:
∀x[x ∈ y ⇔ x ∈ z] iff x and y are members of the same sets
Slide 3:
∀x[x ∈ y IFF x ∈ z] iff ∀x[y ∈ x IFF z ∈ x]
I understand that "$∀x.[x ∈ y ⇔ x ∈ z]$" means $z$ and $y$ are the same set, but why does the formula in slide 3 implies that $x$ and $y$ are members of the same set?
I thought maybe it was a typo and they meant to say "z and y" instead of "x and y", but even then, I don't really understand why the right-hand side of the formula ($∀x[y ∈ x ⇔ z ∈ x]$) is needed. It does not appear in the definition given in the coursebook:
Extensionality. Two sets are equal if they have the same members. $$(∀z, z ∈ x \ \ IFF \ \ z ∈ y) ⇒ x = y.$$