[proofplan]
We first verify inside $M$ that the finite-support Cohen forcing $\operatorname{Add}(\omega,\kappa)^M$ has the countable chain condition. The only combinatorial input is the $\Delta$-system argument for finite domains: an uncountable family of finite partial functions contains two conditions with the same values on the common root, hence two compatible conditions. Once ccc is known, we prove directly that a ccc forcing cannot collapse a ground-model cardinal, because each coordinate of a name for a function has only countably many possible values below any fixed condition. The same countable-possibilities argument rules out new cofinal maps of smaller length into an uncountable regular cardinal.
[/proofplan]
[step:Verify that finite-support Cohen forcing is ccc inside $M$]
In $M$, the forcing notion $\mathbb{P}$ is the set of finite partial functions
\begin{align*}
p: \operatorname{dom}(p) \to 2
\end{align*}
where $\operatorname{dom}(p)$ is a finite subset of $\kappa \times \omega$, ordered by reverse inclusion: $q \leq p$ iff $q \supseteq p$.
We prove that $M \models ``\mathbb{P}$ is ccc". Let $A \in M$ and suppose
\begin{align*}
M \models ``A \subseteq \mathbb{P} \text{ is uncountable}".
\end{align*}
Working in $M$, apply the $\Delta$-system lemma to the family
\begin{align*}
\{\operatorname{dom}(p) : p \in A\}.
\end{align*}
There is an uncountable set $A_0 \subseteq A$ and a finite set $r \subseteq \kappa \times \omega$ such that
\begin{align*}
\operatorname{dom}(p) \cap \operatorname{dom}(q) = r
\end{align*}
for all distinct $p,q \in A_0$.
Since $r$ is finite, there are only finitely many functions from $r$ to $2$. Hence, thinning $A_0$ inside $M$, there is an uncountable set $A_1 \subseteq A_0$ such that
\begin{align*}
p|_r = q|_r
\end{align*}
for all $p,q \in A_1$.
Choose distinct $p,q \in A_1$. The functions $p$ and $q$ agree on the intersection of their domains, because that intersection is $r$ and their restrictions to $r$ are equal. Therefore the union
\begin{align*}
s: \operatorname{dom}(p) \cup \operatorname{dom}(q) \to 2
\end{align*}
defined by $s(z)=p(z)$ for $z \in \operatorname{dom}(p)$ and $s(z)=q(z)$ for $z \in \operatorname{dom}(q)$ is a well-defined finite partial function. Thus $s \in \mathbb{P}$ and $s \leq p,q$, so $p$ and $q$ are compatible. Hence $A$ is not an antichain.
Since every uncountable subset of $\mathbb{P}$ in $M$ contains two compatible conditions, $M \models ``\mathbb{P}$ has the countable chain condition".
[/step]
[step:Bound the possible values of each coordinate of a name]
Let $p_0 \in \mathbb{P}$, let $\mu,\lambda \in M$ be ordinals, and let $\dot f \in M$ be a $\mathbb{P}$-name such that
\begin{align*}
p_0 \Vdash_{\mathbb{P}} ``\dot f:\mu \to \lambda".
\end{align*}
For each $\alpha \in \mu$, define in $M$ the set of possible values below $p_0$ by
\begin{align*}
B_\alpha = \{\beta \in \lambda : \text{there exists } q \leq p_0 \text{ such that } q \Vdash_{\mathbb{P}} \dot f(\alpha)=\beta\}.
\end{align*}
We claim that $M$ satisfies that $B_\alpha$ is countable for every $\alpha \in \mu$.
Fix $\alpha \in \mu$. For each $\beta \in B_\alpha$, choose a condition $q_\beta \leq p_0$ such that
\begin{align*}
q_\beta \Vdash_{\mathbb{P}} \dot f(\alpha)=\beta.
\end{align*}
If $\beta,\gamma \in B_\alpha$ and $\beta \neq \gamma$, then $q_\beta$ and $q_\gamma$ are incompatible; otherwise a common extension would force both $\dot f(\alpha)=\beta$ and $\dot f(\alpha)=\gamma$, contradicting $\beta \neq \gamma$. Thus
\begin{align*}
\{q_\beta : \beta \in B_\alpha\}
\end{align*}
is an antichain in $\mathbb{P}$. Since $M \models ``\mathbb{P}$ is ccc", this antichain is countable in $M$. Therefore $B_\alpha$ is countable in $M$.
[guided]
The purpose of this step is to isolate the one place where ccc controls names. A name for a function may be complicated, but ccc says that below a fixed condition, a single input cannot be forced to take uncountably many different values.
Fix an ordinal $\alpha \in \mu$. We define the set
\begin{align*}
B_\alpha = \{\beta \in \lambda : \text{there exists } q \leq p_0 \text{ such that } q \Vdash_{\mathbb{P}} \dot f(\alpha)=\beta\}.
\end{align*}
Thus $B_\alpha$ is the set of all values that some extension of $p_0$ can still force for the $\alpha$-coordinate of $\dot f$.
We prove that $B_\alpha$ is countable in $M$. For each $\beta \in B_\alpha$, choose a condition $q_\beta \leq p_0$ with
\begin{align*}
q_\beta \Vdash_{\mathbb{P}} \dot f(\alpha)=\beta.
\end{align*}
Now suppose $\beta,\gamma \in B_\alpha$ and $\beta \neq \gamma$. If $q_\beta$ and $q_\gamma$ were compatible, there would be a condition $r \leq q_\beta,q_\gamma$. Since forcing is monotone downward, $r$ would force both statements
\begin{align*}
\dot f(\alpha)=\beta
\end{align*}
and
\begin{align*}
\dot f(\alpha)=\gamma.
\end{align*}
A condition cannot force two distinct ordinal values for the same term, so this is impossible. Hence $q_\beta$ and $q_\gamma$ are incompatible whenever $\beta \neq \gamma$.
Therefore
\begin{align*}
\{q_\beta : \beta \in B_\alpha\}
\end{align*}
is an antichain in $\mathbb{P}$. Since the previous step proved that $M$ satisfies the countable chain condition for $\mathbb{P}$, every antichain in $\mathbb{P}$ belonging to $M$ is countable in $M$. It follows that $B_\alpha$ is countable in $M$.
[/guided]
[/step]
[step:Preserve finite cardinals and $\omega$ separately]
Let $\lambda \in M$ be a cardinal of $M$ with $M \models \lambda \leq \omega$. We prove first that $\lambda$ remains a cardinal in $M[G]$.
If $M \models \lambda < \omega$, then $\lambda$ is a finite ordinal. For every ordinal $\mu \in M$ with $M \models \mu < \lambda$, the assertion that there is a surjection from $\mu$ onto $\lambda$ is a finite first-order statement about the ordinals below $\lambda$, hence is absolute between the transitive models $M$ and $M[G]$. Since $M$ satisfies that no such surjection exists, $M[G]$ also satisfies that no such surjection exists. Thus every finite cardinal of $M$ remains a cardinal in $M[G]$.
Now suppose $M \models \lambda = \omega$. If $\omega$ were not a cardinal in $M[G]$, then some condition $p_0 \in G$ would force that there are an ordinal $\mu \in M$ with $M \models \mu < \omega$ and a $\mathbb{P}$-name $\dot f \in M$ such that
\begin{align*}
p_0 \Vdash_{\mathbb{P}} ``\dot f:\mu \to \omega \text{ is surjective}".
\end{align*}
But $M \models \mu < \omega$ means that $\mu$ is finite, and forcing preserves the finite ordinal $\mu$ and its set of coordinates. In every forcing extension, the range of a function with finite domain $\mu$ has cardinality at most the finite ordinal $\mu$, so it cannot be all of $\omega$. Thus no condition can force such a surjection, and $\omega^M$ remains a cardinal in $M[G]$.
[/step]
[step:Preserve uncountable ground-model cardinals]
Let $\lambda \in M$ be a cardinal of $M$ with $M \models \lambda > \omega$. We prove that $\lambda$ is still a cardinal in $M[G]$.
Suppose toward a contradiction that some condition $p_0 \in G$ forces that $\lambda$ is not a cardinal. Then there are an ordinal $\mu \in M$ with $M \models \mu < \lambda$ and a $\mathbb{P}$-name $\dot f \in M$ such that
\begin{align*}
p_0 \Vdash_{\mathbb{P}} ``\dot f:\mu \to \lambda \text{ is surjective}".
\end{align*}
For each $\alpha \in \mu$, let $B_\alpha \in M$ be the [countable set](/page/Countable%20Set) of possible values of $\dot f(\alpha)$ below $p_0$ defined in the previous step. Define
\begin{align*}
B = \bigcup_{\alpha \in \mu} B_\alpha.
\end{align*}
In $M$, the set $B$ has cardinality at most $|\mu| \cdot \omega$. Since $M \models ``\lambda$ is an uncountable cardinal" and $M \models \mu < \lambda$, the cardinal $|\mu|^M$ is strictly below $\lambda$, and cardinal arithmetic in $M$ gives
\begin{align*}
M \models |\mu| \cdot \omega = \max\{|\mu|,\omega\} < \lambda.
\end{align*}
Hence
\begin{align*}
M \models |B| < \lambda.
\end{align*}
Therefore there exists $\beta \in \lambda \setminus B$ in $M$.
Because $p_0$ forces that $\dot f$ is surjective onto $\lambda$, there is an extension $q \leq p_0$ and an ordinal $\alpha \in \mu$ such that
\begin{align*}
q \Vdash_{\mathbb{P}} \dot f(\alpha)=\beta.
\end{align*}
By the definition of $B_\alpha$, this implies $\beta \in B_\alpha \subseteq B$, contradicting $\beta \notin B$. Therefore no such name for a surjection exists, and every uncountable cardinal of $M$ remains a cardinal in $M[G]$.
[/step]
[step:Preserve regularity of uncountable regular cardinals]
Let $\lambda \in M$ and suppose
\begin{align*}
M \models ``\lambda \text{ is an uncountable regular cardinal}".
\end{align*}
We prove that $M[G] \models ``\lambda$ is regular".
Suppose toward a contradiction that some $p_0 \in G$ forces that $\lambda$ is singular. Then there are an ordinal $\mu \in M$ with $M \models \mu < \lambda$ and a $\mathbb{P}$-name $\dot f \in M$ such that
\begin{align*}
p_0 \Vdash_{\mathbb{P}} ``\dot f:\mu \to \lambda \text{ is cofinal}".
\end{align*}
For each $\alpha \in \mu$, define $B_\alpha$ as in the coordinate-bounding step, and set
\begin{align*}
B = \bigcup_{\alpha \in \mu} B_\alpha.
\end{align*}
As before, $M$ satisfies $|B| \leq |\mu| \cdot \omega < \lambda$. Since $\lambda$ is regular in $M$, every subset of $\lambda$ of cardinality less than $\lambda$ is bounded in $\lambda$. Therefore there is an ordinal $\delta \in \lambda$ such that
\begin{align*}
B \subseteq \delta.
\end{align*}
Because $p_0$ forces that $\dot f$ is cofinal in $\lambda$, there are $q \leq p_0$ and $\alpha \in \mu$ such that
\begin{align*}
q \Vdash_{\mathbb{P}} \dot f(\alpha)>\delta.
\end{align*}
Strengthening $q$ if necessary, choose $r \leq q$ and $\beta \in \lambda$ such that
\begin{align*}
r \Vdash_{\mathbb{P}} \dot f(\alpha)=\beta.
\end{align*}
Then $r \leq p_0$, so $\beta \in B_\alpha \subseteq B \subseteq \delta$. This contradicts the fact that $r$ also forces $\dot f(\alpha)>\delta$. Hence $\lambda$ remains regular in $M[G]$.
[/step]
[step:Identify the first two uncountable cardinals in the extension]
By the cardinal-preservation step, $\omega_1^M$ and $\omega_2^M$ remain cardinals in $M[G]$. Since forcing does not add ordinals, every ordinal of $M[G]$ is already an ordinal of $M$.
If $\alpha < \omega_1^M$, then $M$ has a bijection from $\omega$ onto $\alpha$, and the same bijection belongs to $M[G]$. Thus no ordinal below $\omega_1^M$ is uncountable in $M[G]$, so
\begin{align*}
\omega_1^{M[G]} = \omega_1^M.
\end{align*}
If $\omega_1^M \leq \alpha < \omega_2^M$, then $M$ has a bijection from $\omega_1^M$ onto $\alpha$. Since $\omega_1^M$ remains a cardinal in $M[G]$, the ordinal $\alpha$ has cardinality at most $\omega_1^{M[G]}$ in $M[G]$. Therefore no cardinal strictly between $\omega_1^M$ and $\omega_2^M$ appears in the extension, and
\begin{align*}
\omega_2^{M[G]} = \omega_2^M.
\end{align*}
This proves the stated preservation conclusions for the Cohen continuum calculation.
[/step]