Solution (source code)

= Solution

Apply the <dual isogeny> degree identity to $1-\phi$. Its dual is $1-\widehat\phi$, so
$$
[\deg(1-\phi)]=(1-\phi)(1-\widehat\phi)
=1-\phi-\widehat\phi+[\deg\phi].
$$
Rearrangement gives
$$
\boxed{\phi+\widehat\phi=[1+\deg\phi-\deg(1-\phi)].}
$$
The right side is multiplication by an integer, proving the assertion. In particular the <trace of an elliptic-curve endomorphism> is
$$
\boxed{t=\operatorname{tr}(\phi)=1+\deg\phi-\deg(1-\phi)\in\mathbb Z.}
$$
The argument includes $\phi=0$ and $\phi=1$ with the zero-map convention. Multiplying $\widehat\phi=[t]-\phi$ by $\phi$ also yields the useful characteristic relation
$$
\phi^2-[t]\phi+[\deg\phi]=0.
$$