# A doubt on axiomatic set theory

In the wikipedia page of Zermelo-Fraenkel set theory, the first axiom (Axiom of extensionality) says that two sets are equal (are the same set) if they have the same elements.

Now it is said that the converse of this axiom follows from the substitution property of equality which is "For any quantities $a$ and $b$ and any expression $F(x)$, if $a = b$, then $F(a) = F(b)$".

I don't understand the argument here on substitution.

Let their be two sets X, Y, such that X=Y. Let $F(x)$ be defined as the expression $F(x)=True \iff (x$ has the same elements as $X)$ and $F(x)=False$ otherwise. Then the implication is clear.
$F(X)=True$, and since $X=Y$, so $F(Y)=True$ and $X$ and $Y$ have the same elements.
Let the expression $F_x$ be $F_x(X) = x\in X$.
Thus we conclude that if $a=b$, $(x\in a) = (x\in b)$.