Degree-form proof of the Hasse bound (source code)

= Degree-form proof of the Hasse bound

For Frobenius $\pi$, put $a=\operatorname{tr}(\pi)$ and note that $\deg\pi=q$. Nonnegativity of the quadratic form
$$
\deg(m+n\pi)=m^2+amn+qn^2
$$
for all integers $m,n$ forces its discriminant to be nonpositive, so $a^2\leq4q$. Since $\#E(\mathbb F_q)=\deg(1-\pi)=q+1-a$, this is the Hasse bound.