Note: This question is not a duplicate of this, due to the corrected version of the book.
I'm self-studying Tao's Analysis I. In the corrected third edition, Tao promotes the what was earlier a definition of equality of sets, to the status of an axiom, after someone pointed out an issue with that.
Axiom 3.2 (Equality of sets) Two sets $A$ and $B$ are equal, iff every element of $A$ is an element of $B$ and vice versa. To put it another way $A=B$ if and only if every element $x$ of $A$ belongs also to $B$ and every element $y$ of $B$ belongs also to $A$.
Just after this (well, there's Example 3.1.4 in between), he mentions the following, without justification.
The "is an element of" relation $\in$ obeys the axiom of substitution (see section A.7).
I quote the relevant part of section A.7 here:
(Substitution axiom). Given any two objects $x$ and $y$ of the same type, if $x=y$, then $f(x) = f(y)$ for all functions or operations $f$.
Similarly, for any property $P(x)$ depending on $x$ if $x=y$, then $P(x)$ and $P(y)$ are equivalent statements.
Questions: Why does Axiom 3.2 ensure that $\in$ satisfies the axiom of substitution? This is what I have in mind: To prove that $\in$ satisfies axiom of substitution, one needs to first define an equality relation and $\in$-relation for sets. Then only we can proceed in any way, as far as I can see. But Axiom 3.2 does not define any of these relations. It just gives a condition that equality and $\in$ must satisfy.
Don't we need another axiom stating that there is an equality relation on sets, and a relation $\in$ on sets such that $\in$ obeys axiom of substitution with respect to this equality?