Solution (source code)

= Solution

Take $x_1,x_2,x_3,x_4\in\phi^{-1}(W)$ with $x_1+x_2=x_3+x_4$. Write $x_3=x_1+a$ and $x_4=x_1+b$; then $x_2=x_1+a+b$. Hence
$$
D=\phi(x_1)-\phi(x_3)-\phi(x_4)+\phi(x_2)
$$
belongs to $X$. All four values of $\phi$ lie in the same affine subspace $W=V+w$, and their coefficients in $D$ sum to zero, so $D\in V$. The hypothesis $V\cap X=\{0\}$ gives $D=0$, precisely the additive-quadruple identity required of a <Freiman homomorphism>. This is the <second-difference obstruction to a Freiman homomorphism>.