Axiom of Extensionality and 'if and only if' statements I was looking at the Axiom of Extensionality:
$\forall A\,\forall B\,(\forall X\,(X\in A\iff X\in B)\Rightarrow A=B)$
I somewhat understand the 'if and only if' statement, but I am having (a lot) of trouble formalizing it.  In my head, I imagine a situation like this:
If $X$ is the entire set of $A$ and $X$ is the entire set of $B$, $A=B$.
And the statement holds.
But what about this:
Say $A = [1,2,3]$ and $B = [1,2,3,4,5]$ and $X = 1$.  $X$ is an element of $A$ and $B$, but $A$ is not $B$.
Clearly, my counterexample is wrong, and it has something to do with the 'If and only if' statement.  But I do not understand where the logic is wrong.
 A: I think you are confused about how this is parenthesized. It should be parenthesized as $$\forall A\,\forall B\,([\forall X\,(X\in A\iff X\in B)]\Rightarrow A=B)$$ and NOT as $$\forall A\,\forall B\,(\forall X\,[(X\in A\iff X\in B)\Rightarrow A=B]).$$  This means that to conclude that $A=B$, you need to know that $X\in A\iff X\in B$ for all $X$, not just for one single $X$.
A: I found an older post that helps with this.  Here it is, if anyone is ever interested.
A: I believe the confusion here is around the definition of $X$.
$A$ and $B$ are presumed to be any arbitrary sets within the Domain.
$X$, on the other hand, is presumed to be something else.
The only way I have been able to make sense of this definition is to assume something like:
"$X$ is a set containing the entire Domain of Discourse."
I think the presumption of the definition of $X$ to be such a "universal" set, or all possible sets in the domain (power set), is what enables this axiom to be generalized to the definition of equality.
(But without this interpretation of $X$, the Axiom seems to lose its meaning...so it appears to be a crucial presumption.)
I would welcome anyone to provide a more concrete presupposition of $X$.
