Let $f:X\to Y$ be a morphism of finite type between finite type schemes $X,Y$ over a field $k$. By the infinitesimal criterion for (formal) smoothness, f is smooth if given a commutative diagram 


$$\begin{array}[c]{ccc}
T& {\rightarrow}&X\\
\downarrow &&\downarrow\scriptstyle{f}\\
T'& {\rightarrow}&Y
\end{array}$$


where $T⊂T′$ is a first order thickening of affine schemes, there exists a morphism $T'\to X$ that fits in the above diagram. 


**Question**: Suppose that for any pair ($T', T$), where $T'$ is a trivial extension of $T$, i.e. $T'=T\times\_{Spec k} Spec\ k[\epsilon]$ such that $\epsilon^2=0$, and any commutative diagram as above, there exists an arrow $T'\to X$ that fits in the diagram.
 Is it true that $f$ is smooth? 



smoothness of a morphism of schemes
(Comment posted as answer)


The answer is no, in fact for $Y = \operatorname{Spec} k$, the condition is always satisfied, even if $X$ is not smooth. The point is that a trivial extension $$ i \colon T = \operatorname{Spec} R \to \operatorname{Spec} R[\varepsilon]/(\varepsilon^2) = T' $$ admits a retraction $r \colon T'\to T$ defined by the natural $R$-algebra structure on $R[\varepsilon]/(\varepsilon^2)$. Thus if $g\colon T\to X$ is a map, we can always extend it along $i$ to a map $g'\colon T'\to X$ by composing with $r$, i.e. $g' = g\circ r$.


