Cantor-Bernstein Proof Currently, I am studying Set Theory, and have come to the point of proving the Cantor-Bernstein Theorem (if $|A| \leq |B|$ and $|B| \leq |A|$, then $|A| = |B|$).  Now, I am studying from Jech and Hrbacek's "Introduction to Set Theory," but my professor provided me with a proof of the theorem that is significantly different from the book.  I worked through it, and I think I get the gist of it, but things start unravelling at the end and I need help understanding it.  So,
Statement:  If $\phi:A\rightarrow B$ and $\psi:B\rightarrow A$ are one-to-one functions, then $A$ is equipotent to $B$.
Proof: For $a,a'\in A$, set $a\equiv a' \iff \exists\ k\in\mathbb{N}\ s.t. (\phi^{-1}\circ\psi^{-1})^k(a)=a'$.
Then clearly $\equiv$ is an equivalence relation (I have a hard time proving this, but this is beyond the point I suppose).
Consider the set of equivalence classes $H$ of $\equiv$.  Then, any $E\in H$ is one of two types:
i) $\forall\ a\in E, \exists\ a'\ s.t.\ a' = \phi^{-1}\circ\psi^{-1}(a)$
ii) $\exists\ \dot a\in E \ s.t.\ \dot a \notin\ any\ (\psi\circ\phi)$
In this case, $\dot a$ is at the top of the class (in the obvious order).  Such an $\dot a$ is of two types:
1) $\psi^{-1}(\dot a)$ exists but $\phi^{-1}\circ\psi^{-1}(\dot a)$ doesn't.
2) $\psi^{-1}(\dot a)$ doesn't exist.
We then define $\eta: A\rightarrow B$ by:
$\eta(a) = \phi(a)$ if $[a]$ is of type (i) or of type (ii)-2 and
$\eta(a) = \psi^{-1}(a)$ if otherwise.
Claim: $\eta$ is one-to-one:  Consider $\eta(a)=\eta(a')$.  Then clearly $[a]=[a']$.  Hence, if $[a]$ is of type (ii)-1, then $\eta(a) = \psi^{-1}(a) = \psi^{-1}(a') = \eta(a')$, and since $\psi^{-1}$ is one-to-one, $a=a'$.  If $[a]$ is of type (i) or (ii)-2, then $\eta(a) = \phi(a) = \phi(a') = \eta(a')$, and since $\phi$ is one-to-one, $a=a'$.
Claim: $\eta$ is onto:  Let $b\in B$ and consider $\psi(b)=a$.  If $[a]$ is of type (i) or (ii)-2, then $\phi^{-1}(b)$ exists and $\eta(\phi^{-1}(b))=b$.  If $[a]$ is of type (ii)-1, then $\eta(a)=b$.
Therefore, there exists a bijection between $A$ and $B$ so that they are equipotent.
QED
Really, defining our $\equiv$ relation is straightforward and makes since in pictures.  But when we start getting into the different types I get a little shaky.  Type (i) is just saying that $(\phi^{-1}\circ\psi^{-1})$ gets mapped to something for any $a$ within the equivalence class.  Is type (ii) just saying the opposite?  That is, there is some $a$ within the equivalence class that $(\phi^{-1}\circ\psi^{-1})$ can't be mapped from?  The changing of the wording throws me off, and I'm not sure the significance of it.
Now, if (ii) is true, then it has to be one of the other two types trivially, correct?  For either (1) or (2), $(\phi^{-1}\circ\psi^{-1})(\dot a)$ can't exist simply because it fell into type (ii).  At this point, are we just saying $\phi^{-1}(\dot a$ either works or doesn't?
I suppose the big problem here is that I'm not understanding things intuitively.  He drew a picture which looks like a function mapping some $a$ between $A$ and $B$ in a cascading way, but I don't know what to make of the picture other than that fact that we can keep reapplying out composite or one of our original functions to move around between the sets.
If anyone can shed any light on this proof that may make it easier for me to understand, I'd appreciate it.  And I tried my best to eliminate any errors in it, but if something seems wrong, there's a good chance it is, so let me know.
 A: This is a variant of the argument that I gave in this answer; your $A$ and $B$ are my $X$ and $Y$, and your $\varphi$ and $\psi$ are my $f$ and $g$. I’ll try to clarify what’s going on in your argument partly by reference to mine, so take a look at it first, especially the sketch that I added at the end of the answer. In particular, I’ll assume that $A_n$ and $B_n$ for $n\in\Bbb N$, and $A_\omega$ and $B_\omega$, have been defined from $A,B,\varphi$, and $\psi$ exactly as I’ve defined $X_n,Y_n,X_\omega$, and $Y_\omega$, respectively, from $X,Y,f$, and $g$.
First, the relation $\equiv$ is not an equivalence relation as you’ve defined it: it’s clearly not symmetric. It becomes one if you say that $a\equiv a'$ iff there is a $k\in\Bbb N$ such that either $(\varphi^{-1}\circ\psi^{-1})^k(a)=a'$ or $(\varphi^{-1}\circ\psi^{-1})^k(a')=a$, and I’ll assume henceforth that it’s defined this way. It’s useful to note that $a'=(\varphi^{-1}\circ\psi^{-1})^k(a)$ iff $a=(\psi\circ\varphi)^k(a')$.
Now let $E$ be an $\equiv$-equivalence class. In terms of my answer there are three possibilities.


*

*There is an $a_0\in E\cap A_\omega$. Then $(\varphi^{-1}\circ\psi^{-1})^k(a_0)\in A_\omega$ and $(\psi\circ\varphi)^k(a)\in A_\omega$ for each $k\in\Bbb N$, so $E\subseteq A_\omega$; this type (i) of your argument.

*There is an $a_0\in E\cap A_0$. Then $E=\{(\psi\circ\varphi)^k(a_0):k\in\Bbb N\}$, and $(\psi\circ\varphi)^k(a_0)\in A_{2k}$ for each $k\in\Bbb N$; this is type (ii)(2) of your argument, with $a_0=\dot a$.

*There is an $a_0\in E\cap A_1$. Then $E=\{(\psi\circ\varphi)^k(a_0):k\in\Bbb N\}$, and $(\psi\circ\varphi)^k(a_0)\in A_{2k+1}$ for each $k\in\Bbb N$; this is type (ii)(1) of your argument, with $a_0=\dot a$.
Thus, each $E$ of type (ii) consists of one point from each $E_{2k}$ if $\dot a\in A_0$, and of one point from each $E_{2k+1}$ if $\dot a\in A_1$. Each $E$ of type (i), on the other hand, is a subset of $A_\omega$. In the language of my answer, points in equivalence classes of type (i) can be pulled back infinitely many times; points in equivalence classes of type (ii)(1) can be pulled back an odd number of times; and points in equivalence classes of type (ii)(2) can be pulled back an even number of times.
Now observe that $\varphi$ maps $A_\omega$ onto $B_\omega$, and $A_{2k}$ onto $B_{2k+1}$ for each $k\in\Bbb N$. Thus, we can define a bijection
$$\eta_0:A_\omega\cup\bigcup_{k\in\Bbb N}A_{2k}\to B_\omega\cup\bigcup_{k\in\Bbb N}B_{2k+1}:a\mapsto\varphi(a)\;.$$
This defines $\eta_0$ to agree with $\varphi$ on all points in classes of types (i) and (ii)(2), since these are precisely the points in $A_\omega\cup\bigcup_{k\in\Bbb N}A_{2k}$. The sketch in my answer may help make clear why $\varphi$ maps $A_\omega$ onto $B_\omega$ and each $A_{2k}$ onto $B_{2k+1}$.
Similarly, $\psi$ maps each $B_{2k}$ onto $A_{2k+1}$, so $\psi^{-1}$ maps each $A_{2k+1}$ onto $B_{2k}$, so 
$$\eta_1:\bigcup_{k\in\Bbb N}A_{2k+1}\to\bigcup_{k\in\Bbb N}B_{2k}:a\mapsto\psi^{-1}(a)$$
is also a bijection. The domains of $\eta_0$ and $\eta_1$ are complementary subsets of $A$, and the ranges of these maps are complementary subsets of $B$, so $\eta=\eta_0\cup\eta_1$ is a bijection from $A$ to $B$.
