Assume $f : X \to S$ is locally of finite presentation and formally smooth. Consider a pair of affine opens $\Spec(A) = U \subset X$ and $\Spec(R) = V \subset S$ such that $f(U) \subset V$. By Lemma \ref{lemma-formally-smooth-on-opens} we see that $U \to V$ is formally smooth. By Lemma \ref{lemma-affine-formally-smooth} we see that $R \to A$ is formally smooth. By Morphisms, Lemma \ref{morphisms-lemma-locally-finite-presentation-characterize} we see that $R \to A$ is of finite presentation. By Algebra, Proposition \ref{algebra-proposition-smooth-formally-smooth} we see that $R \to A$ is smooth. Hence by the definition of a smooth morphism we see that $X \to S$ is smooth. \medskip\noindent Conversely, assume that $f : X \to S$ is smooth. Consider a solid commutative diagram $$ \xymatrix{ X \ar[d]_f & T \ar[d]^i \ar[l]^a \\ S & T' \ar[l] \ar@{-->}[lu] } $$ as in Definition \ref{definition-formally-smooth}. We will show the dotted arrow exists thereby proving that $f$ is formally smooth. \medskip\noindent Let $\mathcal{F}$ be the sheaf of sets on $T'$ of Lemma \ref{lemma-sheaf} in the special case discussed in Remark \ref{remark-special-case}. Let $$ \mathcal{H} = \SheafHom_{\mathcal{O}_T}(a^*\Omega_{X/S}, \mathcal{C}_{T/T'}) $$ be the sheaf of $\mathcal{O}_T$-modules with action $\mathcal{H} \times \mathcal{F} \to \mathcal{F}$ as in Lemma \ref{lemma-action-sheaf}. Our goal is simply to show that $\mathcal{F}(T) \not = \emptyset$. In other words we are trying to show that $\mathcal{F}$ is a trivial $\mathcal{H}$-torsor on $T$ (see Cohomology, Section \ref{cohomology-section-h1-torsors}). There are two steps: (I) To show that $\mathcal{F}$ is a torsor we have to show that $\mathcal{F}_t \not = \emptyset$ for all $t \in T$ (see Cohomology, Definition \ref{cohomology-definition-torsor}). (II) To show that $\mathcal{F}$ is the trivial torsor it suffices to show that $H^1(T, \mathcal{H}) = 0$ (see Cohomology, Lemma \ref{cohomology-lemma-torsors-h1} -- we may use either cohomology of $\mathcal{H}$ as an abelian sheaf or as an $\mathcal{O}_T$-module, see Cohomology, Lemma \ref{cohomology-lemma-modules-abelian}). \medskip\noindent First we prove (I). To see this, for every $t \in T$ we can choose an affine open $U \subset T$ neighbourhood of $t$ such that $a(U)$ is contained in an affine open $\Spec(A) = W \subset X$ which maps to an affine open $\Spec(R) = V \subset S$. By Morphisms, Lemma \ref{morphisms-lemma-smooth-characterize} the ring map $R \to A$ is smooth. Hence by Algebra, Proposition \ref{algebra-proposition-smooth-formally-smooth} the ring map $R \to A$ is formally smooth. Lemma \ref{lemma-affine-formally-smooth} in turn implies that $W \to V$ is formally smooth. Hence we can lift $a|_U : U \to W$ to a $V$-morphism $a' : U' \to W \subset X$ showing that $\mathcal{F}(U) \not = \emptyset$. \medskip\noindent Finally we prove (II). By Morphisms, Lemma \ref{morphisms-lemma-finite-presentation-differentials} we see that $\Omega_{X/S}$ is of finite presentation (it is even finite locally free by Morphisms, Lemma \ref{morphisms-lemma-smooth-omega-finite-locally-free}). Hence $a^*\Omega_{X/S}$ is of finite presentation (see Modules, Lemma \ref{modules-lemma-pullback-finite-presentation}). Hence the sheaf $\mathcal{H} = \SheafHom_{\mathcal{O}_T}(a^*\Omega_{X/S}, \mathcal{C}_{T/T'})$ is quasi-coherent by the discussion in Schemes, Section \ref{schemes-section-quasi-coherent}. Thus by Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherent-affine-cohomology-zero} we have $H^1(T, \mathcal{H}) = 0$ as desired.