Flat scheme over a Dedekind ring

I have a problem with Proposition 4.3.9 of Qing Liu's algebraic geometry book. It says if R is a Dedekind ring and X is a reduced scheme and we have a dominant morphism $$f:X\to \operatorname{spec}R$$, then f is flat.

I don't understand the proof and I think $$f:\mathbb Z_2\to \frac{\mathbb Z_2[x]}{\left<2x\right>}$$ is a counter example. Clearly $$\frac{\mathbb Z_2[x]}{\left<2x\right>}$$ is reduced, and the morphism isn't flat.

• What do you mean by $Z_2$? Feb 10 '19 at 15:14
• ring of 2 adic numbers
– ali
Feb 10 '19 at 19:53
• I'm not an algebraic geometer, but I've noticed that Liu says that every irreducible component of X dominates Y. Does this happen for the irreducible component given by $2$? Feb 10 '19 at 21:19
• I don't have Liu's book, but if this stackexchange post is to be believed (math.stackexchange.com/questions/1208183/…), the term is only defined when both source and target are irreducible. Feb 11 '19 at 4:52
• @user26857 no it's not.in fact by this condition the proposition is obvious.you only have to consider the local case.a local Dedekind ring is P.I.D so you just have to prove that if p is generator of maximal ideal of R then $f^\# (p)$ is not a zero divisor in $O_X$.but if $f^\# (p)$ is zero divisor it most be in the generic point $\xi$ of an irreducible component of X so $f(\xi)=<p>\not =<0>$ which contradicts with the condition.
– ali
Feb 12 '19 at 8:51