In [1], Huybrechts and Mauri argue that a holomorphic Lagrangian fibration $f: X \to B$ with smooth base $B$ is flat. This is an application of so called miracle flatness [2, Thm 23.1], because Lagrangian fibrations have equidimensional fibers. Then they write



> 
> *Remark 1.18.* Note that the conclusion that $f$ is flat really needs the base to be smooth. In fact, by miracle flatness, $f$ is flat if and only if $B$ is smooth.
> 
> 
> 


I see that smoothness of $B$ is needed to apply miracle flatness, but I don't see the converse. Why does flatness necessarily fail if $B$ is not smooth?


[1] Huybrechts, Mauri, [*Lagrangian fibrations*](https://link.springer.com/article/10.1007/s00032-022-00349-y), [arXiv](https://arxiv.org/abs/2108.10193), 2022


[2] Matsumura, *Commutative Ring Theory*, 1986



Does miracle flatness always fail for a non-regular base?
The answer lies in *Theorem 23.7* from Matsumura's *Commutative Ring Theory*:



> 
> *Theorem 23.7.* Let $(A, \mathfrak m, k)$ and $(B, \mathfrak n, k')$ be local Noetherian local rings, and $A \to B$ a local homomorphism [...]. We assume that $B$ is flat over $A$. (i) If $B$ is regular then so is $A$.
> 
> 
> 


As $X$ is always assumed to be smooth, the flatness of $f$ will imply the smoothness of the base $B$.


