Solution (source code)

= Solution

A useful form of the <Mumford rigidity lemma> says that if $X$ is complete and connected and $h:X\times Y\to Z$ is constant on one fiber $X\times\{y_0\}$, then under the pointed separated hypotheses it factors through $Y$.

For $f:X\to G$ with $f(e_X)=e_G$, define
$$
h(x,y)=f(x+y)f(y)^{-1}.
$$
At $x=e_X$ this is constantly $e_G$. Applying rigidity with the complete factor $X$ in the $y$ variable shows that $h(x,y)$ is independent of $y$. At $y=e_X$ its value is $f(x)$, so
$$
f(x+y)=f(x)f(y).
$$
Thus $f$ is a homomorphism of <group variety>[group varieties].

Completeness is essential. On the additive group variety $\mathbb G_a$ over a field of characteristic different from two, the morphism $f(t)=t^2$ fixes zero but is not additive.

Solved by gpt-5.6-sol high.