regularity of finite type $k$-schemes by base changing to $\bar{k}$ and an equality of dimensions of tangent spaces For reference I'm trying to understand section 12.2.16 of Vakil's FOAG. Let $X$ be a finite type $k$-scheme and $p$ a closed point with residue field $k'/k$, a finite separable extension of degree $d$. Let $\pi: X_{\bar{k}} \to X$ be the projection morphism. It's easy to see that $k' \otimes_k \bar{k} \cong \bar{k}^d$ as rings, so the fibre over $p$ is $\pi^{-1}(p) = \sqcup_d \mathrm{Spec}(\bar{k})$. Call these $d$ pre-images $p_1, \dots, p_d$. For the sake of this question, since regularity can be checked pointwise, we may assume $X = \mathrm{Spec} A$ and $p$ corresponds to a maximal ideal $\mathfrak{m}$ of $A$. One can show that the fibre is the closed subscheme defined by $\mathrm{Spec}((A \otimes_k \bar{k})/(\mathfrak{m} \otimes_k \bar{k}))$. Vakil claims we have the equality
$$
\sum_{i=1}^{d} \dim_{\bar{k}}(T_{X_{\bar{k}}, p_i}) = d \cdot \dim_{k'}(T_{X, p}).
$$
I can't figure out how to prove it. Write $r := \dim_{k'}(T_{X, p})$. He suggests using the fact that $$(\mathfrak{m} \otimes_k \bar{k})/(\mathfrak{m}^2 \otimes_k \bar{k}) \cong \mathfrak{m}/\mathfrak{m}^2 \otimes_k \bar{k} = \bar{k}^{dr},$$ which means I only have to show that the dimension of $(\mathfrak{m} \otimes_k \bar{k})/(\mathfrak{m}^2 \otimes_k \bar{k})$ as a $\bar{k}$-module is the same as the sum of the dimensions of the tangent spaces of the preimages of $p$. Does anyone have any hints? I would like to understand intuitively why this equality of dimensions should be true. Once I figure this out, I can conclude that $X$ is regular at $p \iff X_{\bar{k}}$ is regular at $p_1, \dots, p_d$!
 A: The key step in proving it the way Vakil is after is understanding why $(\mathfrak{m}\otimes_{k'}\overline{k})/(\mathfrak{m}\otimes_{k'}\overline{k})^2$ decomposes as the direct sum of the tangent spaces at each of the $p_i$. First, we note the fact that the $p_i$ are exactly the preimages of $p$ (combined with the fact that $k'$ is separable) implies that $(\mathfrak{m}\otimes_{k'}\overline{k})=\mathfrak{m}_1\mathfrak{m}_2\cdots\mathfrak{m}_d$ where the ideals on the right hand side are the ideals of the points $p_1,p_2,\cdots,p_d$.
Next, since for commutative rings and comaximal ideals $I_1,\cdots,I_n$ we have $I_1I_2\cdots I_n=I_1\cap I_2\cap\cdots\cap I_n$, we may apply the Chinese remainder theorem to get that $A'/(\mathfrak{m}_1\mathfrak{m}_2\cdots\mathfrak{m}_d) \cong \prod A'/\mathfrak{m}_i$. So $$(\mathfrak{m}\otimes_{k'}\overline{k})/(\mathfrak{m}\otimes_{k'}\overline{k})^2= (\mathfrak{m}\otimes_{k'}\overline{k}) \otimes_{A'} A'/(\mathfrak{m}\otimes_{k'}\overline{k})$$ and we get that the RHS is isomorphic to $(\mathfrak{m}_1\cdots\mathfrak{m}_d)\otimes_{A'} \prod A/\mathfrak{m}_i $. 
Since tensor product and product commute for finitely presented modules, it remains to see what happens to each $(\mathfrak{m}_1\cdots\mathfrak{m}_d)\otimes_{A'} A/\mathfrak{m}_i $. But this is isomorphic to $\mathfrak{m}_i/\mathfrak{m}_i^2$ via the map sending $x_1x_2\cdots x_d\mapsto x_1x_2\cdots x_d\mod \mathfrak{m}_i^2$, and since finite products agree with direct sums in module categories, we get the desired isomorphism between $(\mathfrak{m}\otimes_{k'}\overline{k})/(\mathfrak{m}\otimes_{k'}\overline{k})^2$ and $\bigoplus \mathfrak{m}_i/\mathfrak{m}_i^2$.
A: Here is a partial answer. I would still like to understand @KReiser's comment better. Also I think it's quite clear that I'm not doing whatever Vakil was thinking of.
We can write $A = k[x_1, \dots, x_n]/(f_1, \dots, f_r)$, so $A' = \bar{k}[x_1, \dots, x_n]/(f_1, \dots, f_r)$. Let $q \in X_{\bar{k}}$ be a preimage of $p$. Suppose $p$ corresponds to a maximal ideal $\mathfrak{m}$ of $A$, and $q$ corresponds to a maximal ideal $\mathfrak{n}$ of $A'$. Let $$J := \left( \frac{\partial f_j}{\partial x_i} \right)_{1 \leq i \leq n, 1 \leq j \leq r}$$ be the Jacobian matrix (on $X$) w.r.t. this presentation. The Jacobian gives a linear map $A^r \to A^n$, and its cokernel is the module of relative differentials $\Omega_{A/k}$. Then (correct me if I'm wrong) we can consider the Jacobian for $X_{\bar{k}}$, call this $J'$, by considering the same matrix, but now the elements are thought of as elements of $A'$ under the natural inclusion $A \subset A'$. Since $\bar{k}$ is algebraically closed, we get an isomorphism of the cotangent space $T_{X_{\bar{k}}, q}^\vee = \mathfrak{n}/\mathfrak{n}^2$ with the cokernel of the Jacobian $J'_p : \bar{k}^r \to \bar{k}^n$, which is also isomorphic to $\Omega_{A'/\bar{k}} \otimes_{A'} A'/\mathfrak{n}$ (by 12.2.G or 21.2.19 in Vakil). We get $J'_p$ by reducing all the elements of $J'$ modulo $\mathfrak{n}$.
It is claimed in remark 21.3.10 in Vakil that the Jacobian description of the cotangent space holds for separable closed points. For the separable closed point $p \in X$, this means $T_{X, p}^\vee = \mathfrak{m}/\mathfrak{m}^2 \cong \Omega_{A/k} \otimes_A k'$. The last module is the cokernel of $J_p$, obtained by reducing the elements of $J$ modulo $\mathfrak{m}$.
Suppose $A$ has dimension $d$ (so also $A'$, sorry for using $d$ again here). Let $I$ be the ideal of $A$ generated by all the $n-d$ minors of $J$ and $I'$ the ideal of $A'$ generated by all the $n-d$ minors of $J'$. Then $p$ (resp. $q$) is regular iff $J_p$ (resp. $J_q'$) has corank $d$ iff $I \nsubseteq \mathfrak{m}$ (resp. $I' \nsubseteq \mathfrak{n}$). I think $I' = I \otimes_k \bar{k}$ (probably trivially). Then if $p$ is a singular point, $I \subseteq \mathfrak{m} \implies I' \subseteq \mathfrak{m} \otimes_k \bar{k}$. But the fact that $q$ is a preimage of $p$ implies that $\mathfrak{m} \otimes_k \bar{k} \subseteq \mathfrak{n}$, and hence $q$ is singular as well. In other words, we've proven that if $X_{\bar{k}}$ is regular at some/any $p_i$, then $X$ is regular at $p$. I'm not sure how to prove the opposite implication yet.
If $X_{\bar{k}}$ is singular at each $p_i$, then $I' \subseteq \mathfrak{n}_{i}$ for each $i$. Working in the quotient ring $B=A'/(\mathfrak{m} \otimes_k \bar{k}) = k' \otimes_k \bar{k}$, we know $B$ is reduced of dimension $0$ with finitely many minimal prime ideals $\mathfrak{n}_1, \dots, \mathfrak{n}_d$. The reduction of $I'$ in $B$ is thus contained in the nilradical, which is the zero ideal by reducedness. This in turn implies that $I' \subseteq \mathfrak{m} \otimes_k \bar{k}$. From here maybe we can use faithful flatness or something to conclude $I \subseteq \mathfrak{m}$.
EDIT: In response to KReiser's comment below, we prove that if $f \in k[x_1, \dots, x_n]$ is a polynomial then $f$ vanishes at $p$ iff $f$ vanishes at each $p_i$. We know that vanishing at $p$ is the same as being contained in the maximal ideal $\mathfrak{m}$ of $A$ and vanishing at each $p_i$ is the same as being contained in $\mathfrak{m}_i$ for each $i = 1, \dots, d$, where the $\mathfrak{m}_i$ are the maximal ideals of $A'$ corresponding to the points $p_i$ as in the answer above. We use the fact that $(\mathfrak{m}\otimes_{k'}\overline{k})=\mathfrak{m}_1\mathfrak{m}_2\cdots\mathfrak{m}_d = \mathfrak{m}_1 \cap \cdots \cap \mathfrak{m}_d$. It's easy to see that if $f \in \mathfrak{m}$, then $f \in \mathfrak{m}_i$ for all $i$. Conversely, if $f \in \mathfrak{m}_i$ for all $i$, then $f \in (\mathfrak{m} \otimes_k \bar{k})$, but since $f$ has $k$-coefficients we can conclude $f \in \mathfrak{m}$. From this, the above argument makes sense as the entries of $J'$ are polynomials with coefficients in $k$ so we don't need faithful flatness or whatever I was thinking.
