Confusion regarding Halmos's proof of Schroder-Bernstein In Halmos's proof of Schroder-Bernstein, he defines the parent of $x \in X$ as $f(x)$ and vice versa for an element of $Y$. So each $x \in X$ has an infinite sequence of descendants,
$$
x, f(x), g(f(x)), f(g(f(x))), \ldots
$$
and so on. He then partitions $X$ and $Y$ as follows. We let $X_X$ be the set of elements "born in $X$," i.e., the elements of $X - g(Y)$ and their descendants in $X$; $X_Y$ is the set of descendants in $X$ of the elements of $Y - f(X)$; and $X_{\infty}$ is the set of elements in $X$ for which the chain regresses forever.
I think I understand this construction. It makes sense why $X_X$ and $X_{\infty}$ are disjoint. I assume that $X_X$ and $X_Y$ and $X_Y$ and $X_{\infty}$ are disjoint because of injectivity of $f$ and $g$, but I'm not able to fully grasp this. So I'd appreciate some help on why exactly this is a partition.
Halmos then says "we partition $Y$ similarly." When he constructs the bijection, he argues that if $x \in X_X$, then $f(x) \in Y_X$. I'm not sure I fully understand this. Is $Y_X$, by definition, the set of descendants in $Y$ of the elements of $X - g(Y)$? If I'm understanding this correctly, $Y_X$ is the set of those descendants; $Y_Y$ is the set of elements of $Y - f(X)$ and their descendants in $Y$; and $Y_{\infty}$ is the set of elements in $Y$ whose ancestry regresses ad infinitum.
I'm also having some trouble understanding exactly why the restriction of $f$ to $X_X$ is a bijection. It's certainly injective since $x$ is injective. Why must it be surjective?
 A: I will first explain why $X_X$, $X_Y$, and $X_\infty$ are disjoint. If $x \in X$, then only 3 things can possibly happen. (1.) $x$ has an ancestor in $X$ with no parent. (2.) $x$ has an ancestor in $Y$ with no parent. (3.) $x$ has no parentless ancestor. You can see for yourself that $x$ can only satisfy exactly one of the three conditions. So, by defining $X_X$, $X_Y$, and $X_\infty$ in the way we did, these 3 sets are not only disjoint, they partition $X$. Specifically, each element of $X$ belongs to exactly one of either $X_X$, $X_Y$, or $X_\infty$.
In your second paragraph, your understanding that $Y_X$ is the set of descendants of elements of $X - g(Y)$ is correct.
To see that $f$ restricted to $X_X$ is a surjective, we see that $f(x)$ is an element of $Y$ which has $x$ as an ancestor, and $x$ has an ancestor terminating in $X$ since $x \in X_X$. This means $f(x) \in Y_X$. This tells us that the restriction of $f$ to $X_X$ maps $x$ into $Y_X$ and nowhere else. The map is surjective by the way we defined $Y_X$. $f$ restricted to $X_X$ is bijective.
If there's anything you'd like me to clarify, don't be afraid to comment.
