# Proof of 4.3.12 in Liu: dimension of fiber and flatness

I don't understand a detail in the proof of theorem 4.3.12 in Liu: we have a flat morphism $f:X\to Y$ of locally Noetherian schemes, $x\in X$ and $y=f(x)$. We want to proove that $\dim\mathcal{O}_{X_y,x}=\dim\mathcal{O}_{X,x}-\dim\mathcal{O}_{Y,y}$.

First one can take $Y=\operatorname{Spec}(A)$ with $A$ a Noetherian local ring: ok

Then one consider the case $\dim Y=0$: the author says that $X_\text{red}=(X_y)_\text{red}$: I don't understand that.

Intuitively if $\dim Y=0$ then $Y$ is small and so should be $X_y$...

Algebricaly, if $X=\operatorname{Spec}(B)$ the $X_\text{red}=B/\sqrt{B}$ and $(X_y)_\text{red}=\operatorname{Spec}\left(B\otimes_A A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}/\sqrt{B\otimes_A A_\mathfrak{p}/\mathfrak{p}A_\mathfrak{p}}\right)$ but I don't see why it should be the same.

-

If $(A,m)$ is a local ring of dimension zero, then $\text{Spec}(A)$ has only a single point, namely $m$. Thus for any map $X \to Y := \text{Spec}(A)$, the fiber over $m$, as a set, will be all of $X$.
The scheme-theoretic fiber though, need not be the same as $X$. Algebraically, if $A \to B$ is a ring homomorphism ($A$ is as above), then $B$ need not be isomorphic to $B \otimes_A A/m \cong B/mB$. However, their reductions will be the same: since $A$ is Noetherian, $m$ is nilpotent in $A$, so $mB$ is nilpotent in $B$, hence $mB$ is contained in the nilradical of $B$, so $B_\text{red} \cong (B/mB)_\text{red}$.