I have the following question:
Let $a\in \mathbf{R}$ sucht that $X = L[a] \cap 2^{\omega}$ is uncountable. Why is $X$ is a $\Sigma_2^1$ set?
$L[a]$ is the inner model that can be built by constructibility relative to $a$.
Thank you very much for any help in advance.
The proof should be available in Kanamori's book, and the proof is not trivial for the person who met this type of argument first. You may learn how to encode set-theoretic statements via arithmetical statements from Simpson's book on Reverse Mathematics (especially, the Chapter for $\beta$-models.)
The trick is that $L[a]$ is absolute for transitive models of a sufficiently strong fragment of $\mathsf{ZFC}$ containing $a$.
Note for the sufficiently strong fragment: $\mathsf{ZFC}^-$, $\mathsf{ZFC}$ without Powerset but with Collection should suffice, but $\mathsf{KP}$ also works.
You can see that if $x\in L[a]\cap\mathbb{R}$, then $x\in L_\alpha[a]$ for some countable $\alpha$. Furthermore, you can see that $L_\alpha[a]$ can be a model of $\mathsf{ZFC^-} + (V=L)$.
Thus $x\in L[a]\cap \mathbb{R}$ is equivalent to
Since $M$ is countable, we may understand "a countable model" as a real. The other parts, like $a\in M$, $M\vDash \mathsf{ZFC^-}+(V=L[a])$, $x\in M$ are all expressible by arithmetical statements. Thus the only problematic part is the transitivity of $M$. However, there is no direct way to express the transitivity of a model in the language of second-order arithmetic. To get around this issue, we uncollapse the model and work with well-founded models instead.
Observe that if $\pi:M\to \tilde{M}$ is a collapsing map for a well-founded model $M$ with its transitive collapse $\tilde{M}$, then $\pi(x)=x$ for every $x\in M$, $x\subseteq \omega$. Thus $x\in L[a]\cap \mathbb{R}$ is equivalent to
Then it remains to express the well-foundness of a model over the language of set theory, but you can see that it is $\Pi^1_1$ since its equivalent formulation (There is no $\in$-decreasing chain) is $\Pi^1_1$. It shows the above expression is $\Sigma^1_2[a]$.