When can we reach a real by forcing?

Monroe's observation about $0^\sharp$ is certainly a natural example, but let me point out that in fact one doesn't need $0^\sharp$ to make such a situation happen. The consistency strength of having a real that is not set-generic over $L$ does not actually go beyond ZFC itself.

To see this, start in $L$ and then undertake class forcing to $L[G]$, for example with Easton forcing to change the continuum function unboundedly often in the ordinals (or keep GCH, really anything will do, as long as you do proper class sized forcing). Now, over $L[G]$, we can perform Jensen coding (Coding the universe) to add a real $r$ by class forcing to $L[G][r]$ such that $L[G][r]=L[r]$. The real $r$ exists in $L[G][r]$, but it is not $L$-generic for any set forcing in $L$, as in your question, since to add $r$ over $L$ also adds all the sets added by $G$, and these objects cannot be all added by set-sized forcing of a fixed size.

Thus, we produce a model of ZFC having reals that are not set-generic over $L$.

This kind of example shows that your question is sensitive to the issue of whether you are considering set-sized forcing or proper class forcing. In the former case, one can express in a first-order manner whether a given object is set-generic over $L$; in the latter case, there are various meta-mathematical obstacles preventing this.

Lastly, you might be interested in Gunter Fuchs's concept of solidity, namely, a set $z$ is said to be solid in $V$ if it cannot be added by set-forcing over any inner model. That is, $z$ is solid if whenever $W\subset V$ is an inner model of ZFC and $G\subset\mathbb{P}\in W$ is $W$-generic, with $z\in W[G]\subset V$, then $z\in W$. This is equivalent to saying that for every set $A$, if $G\subset\mathbb{P}\in L[A]$ is $L[A]$-generic and $z\in L[A][G]\subset V$, then $z\in L[A]$. Fuchs goes on to define the solid core and he and Ralf Schindler have investigated the solid core in connection with various canonical inner models of large cardinals.


See "When is a given real generic over L?" by Fabiana Castiblanco and myself for an answer to this question: https://ivv5hpp.uni-muenster.de/u/rds/fabiana_ralf.pdf


The following results of Mack Stanley might be of some interest:

Theorem 1. Let $L$ be a minimal countable standard transitive model of $ZFC$. There exists a real $x$ having the following three properties:

(1) $x\notin L_\alpha$.

(2) $L_\alpha[x]\models ZFC$.

(3) $x$ is not definably generic over any outer model of $L_\alpha$ that does not already contain $x$.

The proof of the above theorem is given in ``A non-generic real incompatible with $0^♯$. Ann. Pure Appl. Logic 85 (1997), no. 2, 157–192.''

The next theorem gives a result complementary to Theorem 1, namely, that every outer model of a sufficiently non-minimal universe is a generic extension of that universe with respect to the language of set theory.

Theorem 2. Suppose that $W$ is a countable standard transitive outer model of $V$, and that there exists a branch $B$ through $U$ such that $sup(B) = \infty = W \cap OR$ and $(W; V,B)$ satisfies $ZFC.$ Then there exists a $(V ;B)$-definable partial ordering $P$ and a filter $G$ on $P$ such that $G$ is generic over $(V ; P)$ and $W = V [G].$

Here $U=\{ u(\kappa): \kappa$ is a cardinal $ \},$ $u(\kappa)=\{ \lambda\leq \kappa: \lambda$ is a cardinal and$ H_\lambda=Skolem Hull_{Hyp(H_\kappa)}(H_\lambda) \cap H_\kappa \}$, and for any set $X,$ $Hyp(X)$ is the smallest admissible set with $X$ as an element.

The proof is given in ``Outer models and genericity. J. Symbolic Logic 68 (2003), no. 2, 389–418. ''

Note that for example, it follows that any countable model $W$ of $ZFC +$ $0^\sharp$ exists” is a generic extension of $L^W$. More precisely:

Corollary. Suppose that $W$ is a countable standard model of $ZFC +$ $0^\sharp$ exists”. Then there exists a $W$-definable, $L$-amenable partial ordering $P$ and a filter $H$ such that $H$ is generic over $(L; P)$ and $W = L[H].$

I may mention that the notion of genericity in the above results is different from the ordinary definition of genericity. See remark 1.3 of the second mentioned paper.