Assume $f : X \to S$ is locally of finite presentation and formally smooth. Consider a commutative diagram $$ \xymatrix{ U \ar[d] \ar[r]_\psi & V \ar[d] \\ X \ar[r]^f & Y } $$ where $U$ and $V$ are schemes and the vertical arrows are \'etale and surjective. By Lemma \ref{lemma-helper-formally-smooth} we see $\psi : U \to V$ is formally smooth. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-presentation-local} the morphism $\psi$ is locally of finite presentation. Hence by the case of schemes the morphism $\psi$ is smooth, see More on Morphisms, Lemma \ref{more-morphisms-lemma-smooth-formally-smooth}. Hence $f$ is smooth, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-smooth-local}. \medskip\noindent Conversely, assume that $f : X \to Y$ is smooth. Consider a solid commutative diagram $$ \xymatrix{ X \ar[d]_f & T \ar[d]^i \ar[l]^a \\ Y & 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. Let $\mathcal{F}$ be the sheaf of sets on $(T')_{spaces, \etale}$ of Lemma \ref{lemma-sheaf} as in the special case discussed in Remark \ref{remark-special-case}. Let $$ \mathcal{H} = \SheafHom_{\mathcal{O}_T}(a^*\Omega_{X/Y}, \mathcal{C}_{T/T'}) $$ be the sheaf of $\mathcal{O}_T$-modules on $T_{spaces, \etale}$ with action $\mathcal{H} \times \mathcal{F} \to \mathcal{F}$ as in Lemma \ref{lemma-action-sheaf}. The action $\mathcal{H} \times \mathcal{F} \to \mathcal{F}$ turns $\mathcal{F}$ into a pseudo $\mathcal{H}$-torsor, see Cohomology on Sites, Definition \ref{sites-cohomology-definition-torsor}. Our goal is to show that $\mathcal{F}$ is a trivial $\mathcal{H}$-torsor. There are two steps: (I) To show that $\mathcal{F}$ is a torsor we have to show that $\mathcal{F}$ has \'etale locally a section. (II) To show that $\mathcal{F}$ is the trivial torsor it suffices to show that $H^1(T_\etale, \mathcal{H}) = 0$, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-torsors-h1}. \medskip\noindent First we prove (I). To see this choose a commutative diagram $$ \xymatrix{ U \ar[d] \ar[r]_\psi & V \ar[d] \\ X \ar[r]^f & Y } $$ where $U$ and $V$ are schemes and the vertical arrows are \'etale and surjective. As $f$ is assumed smooth we see that $\psi$ is smooth and hence formally smooth by Lemma \ref{lemma-representable-property-formally-property}. By the same lemma the morphism $V \to Y$ is formally \'etale. Thus by Lemma \ref{lemma-composition-formally-smooth-etale-unramified} the composition $U \to Y$ is formally smooth. Then (I) follows from Lemma \ref{lemma-etale-on-top} part (4). \medskip\noindent Finally we prove (II). By Lemma \ref{lemma-finite-presentation-differentials} we see that $\Omega_{X/S}$ is of finite presentation. Hence $a^*\Omega_{X/S}$ is of finite presentation (see Properties of Spaces, Section \ref{spaces-properties-section-properties-modules}). Hence the sheaf $\mathcal{H} = \SheafHom_{\mathcal{O}_T}(a^*\Omega_{X/Y}, \mathcal{C}_{T/T'})$ is quasi-coherent by Properties of Spaces, Lemma \ref{spaces-properties-lemma-properties-quasi-coherent}. Thus by Descent, Proposition \ref{descent-proposition-same-cohomology-quasi-coherent} and Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherent-affine-cohomology-zero} we have $$ H^1(T_{spaces, \etale}, \mathcal{H}) = H^1(T_\etale, \mathcal{H}) = H^1(T, \mathcal{H}) = 0 $$ as desired.