Showing a set of indexes where restriction is bijection is a club I'm trying to show some general statement:
I have a regular cardinal $ \kappa $ and an increasing continuous family of sets $ \langle X_\alpha \mid  \alpha < \kappa \rangle  $ with $ \left|X_\alpha\right| \le \alpha $. Let $ X = \bigcup_{\alpha < \kappa} X_\alpha $, and let $ f : \kappa \rightarrow X $ be a bijection. I want to show that $ \left\{ \alpha < \kappa \mid f \restriction_\alpha :\alpha \rightarrow X_\alpha \text{ is onto } X_\alpha \right\} $ is a club.
Any hints how to do this?
 A: (Under the [currently] implicit assumption that the sequence is continuous.)
HINT: It's not hard to show why this set is closed. The only beef is to show it is unbounded. But take any $\gamma=\gamma_0$, define $\beta_n=\min\{\beta\mid f(\gamma_n)\subseteq X_\beta\text{ and }\gamma_n<\beta_n\}$ and $\gamma_{n+1}=\max\{\sup f^{-1}(X_{\beta_n}),\beta_n+1\}$. 
Now take $\gamma_\omega=\sup\gamma_n=\sup\beta_n$, and show that $\gamma_\omega$ satisfies this property.
A: Prove first that given any $\alpha$ large enough, and any $T\subset V_\alpha$ of size less than $\kappa$, there is a $Y\prec V_\alpha$ with $T\subset Y$, $|Y|<\kappa$, and $Y\cap\kappa$ an ordinal. This is easy to arrange by an application of the Lowenheim-Skolem theorem: Start with $Y_0$ containing $X$, and at each stage, given $Y_n$, let $Y_n\prec Y_{n+1}\prec V_\alpha$, ensuring $Y_{n+1}$ has small size, and contains all ordinals less than $\sup(Y_n\cap\kappa)$. This is possible since $|Y_n|<\kappa$ and $\kappa$ is regular. Then $Y_\omega=\bigcup_n Y_n$ is as desired. 
Assuming now the family of $X_i$ is continuous, take an elementary substructure $Y$ of some large $V_\alpha$, of size below $\kappa$ and containing $\kappa$ and all relevant sets, with $Y\cap\kappa$ an ordinal. Check that if $\beta=Y\cap\kappa$, then $f\upharpoonright \beta$ is a bijection.
To see this, just note (using elementarity) that $f(\gamma)\in Y$ for all $\gamma<\beta$, and that each $t\in X_\beta$ is in $Y$. Here we use continuity: If $t\in X_\beta$ then $t\in X_\alpha$ for some $\alpha<\beta$ so it is $f(\gamma)$ for some $\gamma$ in $Y$, and therefore below $\beta$.  
This gives the result, as we can start with a substructure $Y$ of $V_\alpha$ of size $\kappa$ and containing $\kappa$ and everything relevant, and form a continuous increasing sequence $(Y_\alpha\mid\alpha<\kappa)$ of elementary substructures approximating $Y$ and of sizes below $\kappa$ and such that $Y_\alpha\cap\kappa$ is an ordinal for all $\alpha$. The ordinals $Y_\alpha\cap\kappa$ we get this way form a club. It is not hard to show that, in fact, for a club of $\alpha$ we get that $Y_\alpha\cap\kappa=\alpha$.
(As shown in Brian's example, the assumption of continuity is indeed needed.)
A: Unless I’m missing something, the set in question need not be closed.
Let $\kappa=\omega_1$. For $n\in\omega$ let $X_n=n$ and $X_{\omega+n}=\omega\cup\{\omega+2k:k\in n\}$. For $\omega\cdot2\le\alpha<\omega_1$ let $X_\alpha=\alpha$. Clearly $X=\omega_1$. Define $f:\omega_1\to\omega_1$ as follows:


*

*for $n\in\omega$, $f(n)=n$ and $f(\omega+n)=\omega+2n$;  

*$f(\omega\cdot2+2n)=\omega\cdot2+n$ for $n\in\omega$;  

*$f(\omega\cdot2+2n+1)=\omega+2n+1$ for $n\in\omega$; and  

*$f(\alpha)=\alpha$ for $\omega\cdot3\le\alpha<\omega_1$.


Then $f$ is a bijection, and $f\upharpoonright\alpha$ maps $\alpha$ onto $X_\alpha$ for all $\alpha<\omega\cdot2$, but 
$$f[\omega\cdot2]=\omega\cup\{\omega+2n:n\in\omega\}\subsetneqq\omega\cdot2=X_{\omega\cdot2}\;.$$
Added: This can’t happen if the sequence $\langle X_\alpha:\alpha<\kappa\rangle$ is continuous, so you probably want to add that condition.
