Suppose $M$ is a countable transitive model for ZFC. Suppose $X\subset M\cap \textbf{ON}$ is bounded in $M\cap \textbf{ON}$. Why does $M[X]$ (the least ctm $N$ such that $M \subset N$ and $X \in N$) exists? Furthermore, is it true that there exists a forcing notion $P \in M$ and a $P$-generic filter over $M$, $G$, such that $M[G]=M[X]$?


I have looked for this information in some books such as Kunen, Jech and Kanamori's but I have found nothing.


Edit: @Elliot Glazer's answer shows that $M[X]$ is not always a generic extension. So I am changing the question a bit.


Suppose that there exists a forcing notion $Q$ and a generic filter $H$ over $M$ such that $X \in M[H]$ is a subset of $M\cap \mathbf{ON}=M[H]\cap \mathbf{ON}$. Is it true that there exists a is a forcing notion $P \in M$ and a $P$-generic filter over $M$, $G$, such that $M[G]=M[X]$?



If $X$ a subset of ordinals, is $M[X]$ a generic extension?
Concerning your modified question, as it is commented by Andres Caicedo, the answer is yes; in fact we have the following theorem:


**Theorem 1.** Assume $V[G]$ is a set forcing extension of $V$ by a complete Boolean algebra $\mathbb{B}$ and suppose $N$ is a model of $ZFC$ with $V \subseteq N \subseteq V[G]$. Then for some regular complete subalgebra $\mathbb{C}$ of $\mathbb{B}$, such that $N=V[G \cap \mathbb{C}]$.


On the other hand, if we extend a bit the notion of genericity, then we have the following theorem of Mack Stanley (I don't recall the paper in which the result is stated):


**Theorem 2.** Suppose $V \subseteq W$ are countable transitive models of $ZFC$ with the same ordinals. Then $W$ is a class generic extension of $V$ (with respect to this extended notion of genericity).


