# Formally smooth with smooth fibers but not smooth

Is there a simple example of a morphism of schemes $$X\rightarrow S$$ that is

• How about the map $\mathrm{Spec}(\mathbf{Q}) \to \mathrm{Spec}(\mathbf{Z})$? – Boa Jun 9 '19 at 9:41
• @Boa That is not formally smooth. Let $P\subset \mathbb{Z}_{>0}$ be the set of prime integers. Let $C$ be the commutative ring $\mathbb{Z}[x_p : p\in P]$. Then $\mathbb{Q}$ is the quotient algebra $C/J$ for the ideal $J=\langle px_p - 1 : p\in P \rangle$. Now consider the algebra $B=\mathbb{Z}_2[x_2]/\langle 4x_2^2-4x_2 + 1 \rangle$ The quotient by the square-zero ideal $\langle 2x_2 -1\rangle$ equals $\mathbb{Z}_2[x_2]/\langle 2x_2-1\rangle = \mathbb{Q}_2$. This contains $\mathbb{Q}$. There is no $2$-divisible element in $B$ that maps to $1/2$ in $\mathbb{Q}_2$. – Jason Starr Jun 9 '19 at 11:48
• I was wrong. The element $2x_2(1-x_2)$ is $2$-divisible and maps to $x_2$. – Jason Starr Jun 9 '19 at 12:58
• Yes, I think the argument is okay (that is why I upvoted). – Jason Starr Jun 9 '19 at 21:21

Consider the map suggested by Boa. For any integral domain $$R$$, the fraction field with its usual $$R$$-module structure is flat. So the second bullet point is satisfied (alternatively, the second bullet point follows from the first because formally smooth morphisms between locally Noetherian schemes are flat).
For any point $$p\in\mathrm{Spec}\:\mathbb{Z}$$, the base change of the morphism $$\mathrm{Spec}\: \mathbb{Q}\rightarrow \mathrm{Spec}\:\mathbb{Z}$$ is either the unique morphism from the empty scheme so vacuously smooth (this is the case iff $$p$$ is a closed point) or it is an isomorphism (this is the case iff $$p$$ is the generic point). So the third bullet point is satisfied.
The set-theoretic image of the morphism $$\mathrm{Spec}\:\mathbb{Q}\rightarrow \mathrm{Spec}\:\mathbb{Z}$$ is not open so it can not be locally of finite presentation. So the fourth bullet point is satisfied.
Let $$P$$ be the set of positive prime numbers, think of $$\mathbb{Q}$$ as a $$\mathbb{Z}$$-algebra on generators indexed by $$P$$ and with the relations $$px_p=1$$ for all $$p \in P$$. Let $$B$$ be a commutative unital ring with a square-zero ideal $$I$$. Assume we have a morphism $$\psi:\mathbb{Q}\rightarrow B/I$$. Since the map $$\pi:B\rightarrow B/I$$ is surjective, for any prime $$p$$ we can find an element $$a$$ in the inverse image of $$\psi(x_p)$$ such that $$pa=1+i$$ for some $$i\in I$$. Set $$a'=a(1-i)$$. $$a'$$ belongs to the inverse image of $$\psi(x_p)$$ and satisfies $$pa'=pa(1-i)=(1+i)(1-i)=1$$.
Once the map is defined on the generators, it extends to monomials by multiplicativity and to the whole algebra by additivity, so we have a homomorphism $$\phi:\mathbb{Q}\rightarrow B$$ that satisfies $$\pi\circ\phi=\psi$$.
Therefore, $$\phi$$ solves the lifting problem, i.e. the map $$\mathbb{Z}\rightarrow \mathbb{Q}$$ is formally smooth. So the first bullet point is satisfied.