Lemma 105.8.5. Let $f : \mathcal{X} \to \mathcal{Y}$ be a morphism of algebraic stacks which is representable by algebraic spaces. Then the following are equivalent

1. $f$ is formally smooth,

2. for every scheme $T$ and morphism $T \to \mathcal{Y}$ the morphism $\mathcal{X} \times _\mathcal {Y} T \to T$ is formally smooth as a morphism of algebraic spaces.

Proof. Follows from Categories, Lemma 4.44.2 and the definition. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).