Quasi-compact surjective morphism of smooth k-schemes is flat I have precedently posted the same question on Math.Stackexchange (https://math.stackexchange.com/questions/4277856/quasi-compact-surjective-morphism-of-smooth-k-schemes-is-flat), but to no avail; I hope this is not too low-level for this site.
In the article "The Greenberg functor revisited'' (https://doi.org/10.1007/s40879-017-0210-0) by Bertapelle and González-Avilés, one can read, before the statement of Theorem A.12, that a given morphism, call it $f\colon X\to Y$, "is a quasi-compact [even affine] and surjective morphism of smooth $k$-schemes [$k$ is a field] and therefore faithfully flat and locally of finite presentation.''  This might be trivial, but I have no idea how to prove flatness: the most general result of this kind which I have been able to find in the literature is EGA IV.15.4.2, which however requires one of the following conditions (I am keeping the same notation as in EGA), none of which I am able to deduce from the information above:

*

*$f$ is universally open;

*for any $x\in X$, $f$ is open at the generic points of the irreducible components of $X_{f(x)}$ containing $x$;

*for any $x\in X$, $\dim\mathcal{O}_{X,x}=\dim\mathcal{O}_{f(x)}+\dim(\mathcal{O}_{X,x}\otimes_{\mathcal{O}_{f(x)}}\kappa(f(x)))$
I would be grateful for an explanation of why $f$ is flat.
 A: The simplest blowup morphism $\mathrm{Bl}_0(\mathbb{A}^2) \to \mathbb{A}^2$ (with center at a point) is not flat.
EDIT. Here is an example with affine morphism. Let
$$
X = \{ x_1y_1 + x_2y_2 + x_3y_3 = 0 \} \subset \mathbb{A}^4_{x_1,x_2,x_3,x_4} \times \mathbb{A}^4_{y_1,y_2,y_3}
$$
and let $f \colon X \to \mathbb{A}^3$ be the projection to the second factor. This example, however, is singular at the point $(0,0)$.
EDIT 2. Consider the variety
$$
\bar{X} = \{x_1y_1 + x_2y_2 + x_3y_3 = 0\} \subset
\mathbb{P}^2_{x_1:x_2:x_3} \times 
\mathbb{A}^3_{y_1,y_2,y_3}.
$$
It is smooth, because the projection to $\mathbb{P}^2$ is a fibration with fiber $\mathbb{A}^2$. On the other hand, the projection $\bar{f} \colon \bar{X} \to \mathbb{A}^3$ is not flat, because the dimension of the fiber jumps at $0$.
Now let
$$
X = \bar{X} \cap 
((\mathbb{P}^2 \setminus C) \times \mathbb{A}^3),
$$
where $C$ is a smooth conic. Then

*

*$X$ is smooth, because it is open in $\bar{X}$;


*$X$ is affine over $\mathbb{A}^3$ because $\mathbb{P}^2 \setminus C$ is affine,


*the map $f \colon X \to \mathbb{A}^3$ is surjective, because the smooth conic $C$ cannot contain a fiber of $\bar{f}$ (a line or the plane),


*the map $f$ is not flat, because the dimension of the fiber still jumps at $0$.
A: First of all, the version that we would like people to read (and hopefully check for more mistakes, if any remain) is the Arxiv version of our paper. We worked on that for 4 years and with great care. Unfortunately, we were asked to reduce the length of our paper significantly as a precondition for publication, or that's my recollection, anyway. The result of this abridgement is not the happiest it could have been; the published version may well be harder to follow than the preprint version. Anyway, as stated above, we worked on our paper with great care, but we still made a (thankfully inconsequential) mistake (see below). When writing our original argument, we overlooked the fact that the scheme $X$ below is not necessarily a group scheme, so that an additional argument is needed to fill the gap. Here it is (all references are to the Arxiv version):
In Corollary 11.8  we state that the change of rings morphism is
faithfully flat if $Z$ is smooth over $\mathfrak R$. The proof there
is incomplete since Lemma 2.52 holds for morphism of smooth group schemes.
The required additional arguments for proving flatness are the following:
We may work locally on $Z$ and assume that $Z$ is etale over an
affine space $\mathbb A^n_{\mathfrak R}$. By Proposition 9.19, it suffices to consider the case
$Z=\mathbb A^n_{\mathfrak R}$. The latter scheme can be endowed with the usual additive group scheme structure, whence the change of rings morphism is a morphism of $k$-group schemes (see the lines below diagram (9.15)). We can now apply  Lemma 2.52 to complete the proof.
Many thanks to I.Vanni for calling our attention to this problem!
