Smoothness of morphisms gives an exact cotangent sequence This is Vakil 21.2 S, self-study.
We are to show that if $\pi: X \to Y$ and $\rho: Y \to Z$ are smooth morphisms of schemes, then the relative cotangent sequence
$$\pi^*\Omega_{Y/Z} \to \Omega_{X/Z} \to \Omega_{X/Y} \to 0$$
is also left-exact. By "smooth" we mean smooth of relative dimension $n$ for some $n$; see definition 12.6.2 in the linked notes; it's a local condition on the Jacobian.
We know the composition of smooth maps of relative dimension $m$ and $n$ is smooth of relative dimension $m+n$, so $\rho \circ \pi$ is smooth.  We also know that if $\pi : X \to Y$ is smooth of relative dimension $n$, then $\Omega_{X/Y}$ is locally free of rank $n$. This would give us that all our sheaves are locally free.
I do not follow the hint given in this exercise; I did not use a block upper triangular matrix in 12.6 D as the hint suggests I should have, so if there is a solution taking this hint in a different direction or opting for another route, that would be appreciated.
 A: Let me give another argument, which is hopefully more in tune with Vakil's definition of smoothness. The argument will use the fact that all sheaves in the conormal sequence are locally free, which Vakil only proves in Theorem 25.2.2 (i.e. after the exercise in question), but it seems that Exercise 21.2.S isn't referenced in between, so we don't get a circular argument.
The key is the following lemma.
Lemma ([EGA IV/1, Ch. 0 (19.1.12)]). Let $R$ be a ring, let $M$ be a finitely generated $R$-module, and let $P$ be a finitely generated projective $R$-module. Then for a $R$-module map $u\colon M\rightarrow P$, the following are equivalent.

*

*$u$ is a locally split injection (i.e. there are elements $f_1,\dotsc,f_n\in R$ generating the unit ideal such that all $u_{f_i}\colon M_{f_i}\rightarrow
 P_{f_i}$ are split injections; in particular, $M$ is projective too).

*For all prime ideals $\mathfrak p\in\operatorname{Spec} R$, the map $u\otimes\kappa(\mathfrak p)\colon M\otimes_R\kappa(\mathfrak p)\rightarrow P\otimes_R\kappa(\mathfrak p)$ is injective.

Proof sketch. 1. $\Rightarrow$ 2. is clear. For the converse, take a prime ideal $\mathfrak p$ and elements $m_1,\dotsc,m_r\in  M$ which form a basis for $M\otimes_R\kappa(\mathfrak p)$. Since $u\otimes\kappa(\mathfrak p)$ is injective, we find $p_1,\dotsc,p_s\in P$ such that the $u(m_i)$ and the $p_j$ form a basis of $P\otimes_R\kappa(\mathfrak p)$. By a version of Nakayama's lemma, we find an $f\in R\setminus \mathfrak p$ such that $M_f$ is generated by the $m_i$ and $P_f$ is free with basis given by the $u(m_i)$ and the $p_j$. Then a split $P_f\rightarrow M_f$ is given by sending $u(m_i)$ to $m_i$ and all $p_j$ to $0$. $\square$
To apply the lemma, we must show that $(\pi^*\Omega_{Y/Z})_{x}\otimes_{\mathcal O_{X,x}} \kappa(x)\rightarrow (\Omega_{X/Z})_x\otimes_{\mathcal O_{X,x}}\kappa(x)$ is injective for all $x\in X$. Since tensoring is right-exact, we certainly get an exact sequence $$(\pi^*\Omega_{Y/Z})_{x}\otimes_{\mathcal O_{X,x}} \kappa(x)\rightarrow (\Omega_{X/Z})_x\otimes_{\mathcal O_{X,x}}\kappa(x)\rightarrow (\Omega_{X/Y})_x\otimes_{\mathcal O_{X,x}}\kappa(x)\rightarrow 0\,.$$
But these are vector spaces over $\kappa(x)$ of dimensions $\dim_y(Y/Z)$ (the relative dimension of $Y$ over $Z$ at $y=\pi(x)$), $\dim_x(X/Z)$, and $\dim_x(X/Y)$ respectively. Since smooth morphisms are flat, [Stacks Project, Tag 02JS] ensures $$ \dim_y(Y/Z)+ \dim_x(X/Y) = \dim_x(X/Z)\,,$$
so the above sequence of $\kappa(x)$-vector spaces must in fact be a short exact sequence. In particular, the left arrow must be injective. This shows that the lemma is applicable.
A: I don't understand the proof given in stacks project either, since I am not familiar with naive cotangent complex which it uses, but I can give another easier proof.
Standard definition. If a morphism of rings is formally smooth and of finite presentation, then it is called a smooth morphism.
Proposition. Suppose $A\rightarrow B\rightarrow C$ is a sequence of rings and $C$ is formally smooth over $B$, then $0 \to C \otimes _ B \Omega _{B/A} \xrightarrow{\alpha} \Omega _{C/A} \to \Omega _{C/B} \to 0$ is split exact.
Proof. For a $B$-module $M$, we define a ring $C*M$, which is the abelian group $C\oplus M$ with multiplication given by $(c,m)\cdot(c',m'):=(cc',cm',c'm)$.
Assume $D\in Der_A(B,M)$, then we have a sequence $0\rightarrow M\rightarrow C*M\rightarrow C\rightarrow 0$ and the following commutative diagram, where $\phi: b\rightarrow (g(b),D(b))$.
\begin{array}
CC & \stackrel{}{\rightarrow} & (C*M)/M \\
\uparrow{g} & & \uparrow{} \\
B & \stackrel{\phi}{\rightarrow} & C*M
\end{array}
By the definition of formally smoothness, there exists $h: C\rightarrow C*M$ such that $h(c)=(c,D'c)$ with $D': C\rightarrow M$ making the above diagram commutate.( check that $D'$ is a derivation and $D=D'\circ g$).
Now let $M:=\Omega_{B/A}\otimes C$ and $D: B\rightarrow C\otimes\Omega_{B/A}$ given by $b\rightarrow d_{B/A}(b)\otimes1$, by what we have said above, there exists a derivation $D': C\rightarrow C\otimes\Omega_{B/A}$. By the universial property of Kähler differential, $D'$ corresponds to $\alpha':\Omega_{C/A}\rightarrow C\otimes\Omega_{B/A}$, then you can check that $\alpha'\circ\alpha=\operatorname{id}$.
Therefore the first fundamental sequence is split exact.
Remark. For the second fundamental sequence, the similar result also holds. Namely, for $B$ an $A$-algebra and $I$ is a ideal of $B$, then $I/I^2\rightarrow\Omega_{B/A}\otimes_B(B/I)$ is split injective iff $B/I$ is formally smooth over $A$.
