How can we prove that formal smoothness is a property local on the source? I have learned from this question that, in spite of the gap in the proof of 17.1.6 (i) in EGA IV, we can still verify that a morphism of schemes is formally smooth locally on the source. But, even assuming the results of Raynaud-Gruson, I did not get the argument in "Catégories Cofibrées Additives et Complexe Cotangent Relatif" given by Grothendieck, possibly because I do not know the theory of the cotagent complex. For me it seems that he is using some global version of the critère jacobien de lissité formelle [EGA $0_{\text{IV}}$, 22.6.3], but I could not work out the details. Could someone explain me how can we justify this assuming only the results from EGA $0_{\text{IV}}$ and that the projectivity of modules descends along faithfully flat ring maps?
 A: To prove this we can just adapt the proof in [EGA IV$_4$, 17.1.6]. The argument I will give below is taken from [Stacks, Tag 061K]. First of all we need the following observation: given a commutative diagram of morphisms of schemes 
$$\require{AMScd}
\begin{CD}
T_0 @>{g_0}>> X\\
@V{i}VV @VV{f}V \\
T @>>> Y,
\end{CD}$$
where $i$ is a thickening of order $1$ (i.e. a closed immersion defined by an ideal $\mathscr{I}$ of $\mathscr{O}_T$ of square zero), we can consider the sheaf of sets $\mathscr{P}$ in $T_0$ such that $\mathscr{P}(U_0)$ consists of the $Y$-morphisms $g : U \to X$ that satisfy $g \circ i_{U_0} = g_0|_{U_0}$, where $U$ is the open subscheme of $T$ corresponding to $U_0$ and $i_{U_0} : U_0 \to U$ is the thickening of order $1$ induced by $i$. It is not hard to show that $\mathscr{P}$ is a pseudotorsor under $\mathscr{G} = \mathscr{H\!om}_{\mathscr{O}_{T_0}}(g_0^*(\Omega^1_{X/Y}), \mathscr{I})$ (here we are considering $\mathscr{I}$ as a quasi-coherent $\mathscr{O}_{T_0}$-module, which is possible since $\mathscr{I}^2=0$), see for example [EGA IV$_4$, 16.5.17] or [SGA 1, Exposé III, 5.1].
Let $(U_{\alpha})_{\alpha \in I}$ be an open cover of $X$ and suppose that each $f|_{U_{\alpha}}$ is formally smooth. In this case $\mathscr{P}$ is actually a torsor under $\mathscr{G}$ and it is trivial (i.e. $\Gamma(T_0,\mathscr{P}) \neq \varnothing$) if and only if its class $o(g_0,i)$ in $H^1(T_0, \mathscr{G})$ is zero. To prove that $f$ is formally smooth we need to show that this is the case if $T_0,T$ are affine schemes. We will even prove that $H^1(T_0, \mathscr{G}) = 0$. Note that $\mathscr{G}$ is not necessarily a quasi-coherent $\mathscr{O}_{T_0}$-module, but $g_0^*(\Omega^1_{X/Y})$ is a locally projective one [Stacks, Tag 06B5]. Raynaud-Gruson's theorem guarantees that it is of the form $\widetilde{P}$, where $P$ is a projective $\Gamma(T_0, \mathscr{O}_{T_0})$-module. In order to show that $H^1(T_0, \mathscr{G})$ is zero, we can suppose that $P$ is actually a free module. In this case $\mathscr{G}$ is a product of quasi-coherent modules and the result follows from [Stacks, Tag 060L].
