Let $(\Omega, \mathcal{A}, P)$ be a probability space and consider a square-integrable random variable $X$ and a sub-sigma-Algebra $\mathcal{F}$.
Denote $Z:=E[X \mid \mathcal{F}]$.
Conditional expectation is the unique minimizer (orthogonal projection), meaning that
$E[(X-Z')^2] \geq E[(X-Z)^2]$ for all $Z' \in L^2(\Omega, \mathcal{F},P)$.
Now we have seen the proof of this, deriving:
$E[(X-Z')^2] \geq E[(X-Z)^2] + E[(Z-Z')^2]$
Now it is written that we have equality iff $Z=Z'$. But why? Couldn't it be that $E[(Z-Z')^2]=0$ but $Z\neq Z'$?