Let $\alpha$ be an ordinal, and let $a\subseteq\alpha$ such that $\alpha$ is countable in $L[a]$. Moreover, let $\beta>\alpha$ be an ordinal such that, in $L[a]$, $\alpha$ and $\beta$ have the same cardinality and such that $\beta$ is "reasonably closed", say $L\_{\beta}[a]\models\text{ZF}^{-}$. Denote by $P\_{\alpha}$ the forcing of finite partial functions from $\alpha$ to $\{0,1\}$, ordered by reverse inclusion. 


Does it follow that there is a subset $x\subseteq\alpha$ that is $P\_{\alpha}$-generic over $L\_{\beta}[a]$ (i.e. generic with respect to all dense subsets in $L\_{\beta}[a]$) and such that $L[x]=L[a]$?


In other words, can such "locally generic" sets encode everything?



Encoding sets in locally generic sets
No. Suppose $a$ is a random real over $L$. Then $a$ is random over any $L\_\alpha$ satisfying $ZF^-$ plus "$\mathbb R$ exists." If there were $x$ as in your question, then it would be $Add(\omega,\alpha)$-generic over $L\_\beta$. But by the well-known orthogonality of random and Cohen forcing, $L[x]$ thinks there are no random reals over $L$, and $L[a]$ thinks there are no Cohen reals over $L$.


We could also do this assuming $\alpha$ is an $L$-cardinal which is countable in $L[a]$, but the above argument also covers many $\alpha$ which are countable in $L$.


