Short Exact Sequence of Tangent Space of smooth morphism I'm reading the proof of Proposition 4.3.39 in Qing Liu's book.

Proposition 4.3.39 Let $f:X\rightarrow Y$ be a morphism of finite type to a locally Noetherian scheme. Let us suppose $f$ is smooth at $x\in X$. Let $y = f(x)$. Then we have an exact sequence of $k(x)$-vector spaces:
$$0\rightarrow T_{X_y,x}\rightarrow T_{X,x}\rightarrow T_{Y,y}\otimes_{k(y)}k(x)\rightarrow 0$$

I have some questions about the proof.

*

*He claims there is  a natural exact sequence $(m_y/m_y^2)\otimes_{k(y)}k(x)\rightarrow m_x/m_x^2\rightarrow n_x/n_x^2\rightarrow 0$ where $m_x$,$m_y$ and $n_x$ are maximal ideals of $\mathcal O_{X,x},\mathcal O_{Y,y}$ and $\mathcal O_{X_y,x}$ respectively. Is there any elegent way to get it? I always feel confused about this kind of thing because the same notation might have different meaning when compute(as ring or as module).


*(red sentence in picture) $\dim(\mathcal O_{Y,y}) = 0$ is ok! But why $\mathcal O_{Y,y}$ is contained in $\mathcal O_{X,x}$? How to conclude from this that $\mathcal O_{Y,y}$ is a field?


*(green sentence in picture) Why $\dim(T_{X',x}) = \dim(T_{X,x})-1$ and $\dim(T_{Y',y}) = \dim(T_{Y,y})-1$?

 A: Question: "Is there any elegent way to get it? I always feel confused about this kind of thing because the same notation might have different meaning when compute(as ring or as module)."
Answer: Let $f:X:=Spec(B)\rightarrow Y:Spec(A)$ with $\phi:A \rightarrow B$ the corresponding morphism of rings and let $\mathfrak{m}_x \subseteq B$ with $\mathfrak{m}_x \cap A=\mathfrak{m}_y \subseteq A$. There is a canonical surjective map
$$p: B \rightarrow B/\mathfrak{m}_yB:=(A/\mathfrak{m}_yA) \otimes_A B$$
and define $\mathfrak{n}_x:=p(\mathfrak{m}_x)$
and you get a canonical sequence
$$\mathfrak{m}_y/\mathfrak{m}_y^2 \rightarrow \mathfrak{m}_x/\mathfrak{m}_x^2 \rightarrow \mathfrak{n}_x/\mathfrak{n}_x^2 \rightarrow 0.$$
This becomes exact when you tensor with $\kappa(x)$:
$$T1.\text{  }\mathfrak{m}_y/\mathfrak{m}_y^2 \otimes \kappa(x) \rightarrow \mathfrak{m}_x/\mathfrak{m}_x^2 \rightarrow \mathfrak{n}_x/\mathfrak{n}_x^2 \rightarrow 0.$$
When you dualize T1 you get your sequence
$$0 \rightarrow T_{X_y,x} \rightarrow T_{X,x} \rightarrow T_{Y,y}\otimes_{\kappa(y)} \kappa(x) \rightarrow 0.$$
Note: There is a field extension $\kappa(y) \subseteq \kappa(x)$ and you get an isomorphism
$$ Hom_{\kappa(x)}(\mathfrak{m}_y/\mathfrak{m}_y^2\otimes_{\kappa(y)} \kappa(x), \kappa(x)) \cong Hom_{\kappa(y)}(\mathfrak{m}_y/\mathfrak{m}_y^2, \kappa(y))\otimes_{\kappa(y)} \kappa(x).$$
Im not used to the Liu book and he is making references to results earlier in the book. In Hartshorne Proposition III.10.4 is proved: If $f: X \rightarrow Y$
is a morphism of nonsingular varieties over an algebraically closed field $k$
let $n:=dim(X)-dim(Y)$. There is an exact sequence
$$C1.\text{   } f^*\Omega^1_{Y/k} \rightarrow \Omega^1_{X/k} \rightarrow \Omega^1_{X/Y} \rightarrow 0$$
where $\Omega^1_{X/Y}$ is locally trivial of rank $n$ iff $f$ is smooth of relative dimension $n$ iff for every closed point $x\in X$ it follows the tangent mapping $T_{f,x}: T_{y} \rightarrow T_x$ is surjective. Since $\Omega^1_{X/k}$ is locally trivial of rank $dim(X)$ and $\Omega^1_{Y/k}$ is locally trivial of rank $dim(Y)$ we get at each closed point $x\in X$
an exact sequence of $\kappa(x)$-vector spaces
$$0 \rightarrow f^*\Omega^1_{Y/k}\otimes \kappa(x) \rightarrow \Omega^1_{X/k}\otimes \kappa(x)  \rightarrow \Omega^1_{X/Y}\otimes \kappa(x) \rightarrow 0$$
and dualizing this sequence you get your sequence. This proves your case in a special case.
