Let us consider $M\subseteq V$ a transitive class such that $M^\kappa\subseteq M$ for some cardinal $\kappa$. Now take $\mathbb{P}$ a $\kappa^+$-cc (or $\leq\kappa-$distrivutive) forcing notion in $V$. Then it is the case that, provided that $G\subset \mathbb{P}$ is $V$-generic, then $V[G]$ also thinks that $M[G]^\kappa\subseteq M[G]$. I would be interested in to know a detailed proof of both facts because I have founded them mentioned everywhere but, unfortunattely, without any kind of explanations.
Thank you all in advance.