Build the idea in three steps
- Every quantity the duet compares must be defined somewhere: a cusp form gives its coefficients, and the curve must give its own numbers. This page is where the curve’s numbers enter.
- To read a curve’s arithmetic at a prime ℓ, reduce the curve modulo ℓ into ZMod ℓ and observe the reduced curve’s points. Counting them is an ordinary finite task.
- Lean names the composed quantity apOfModel: reductionMod p sends the integer coefficients to ZMod p, and that reduction’s traceOfFrobenius combines the residue field’s size with the counted points. The classifier IsGoodPrimeFor forbids primes dividing Δ — at those primes the reduced curve behaves differently.
A small example
For y² = x³ − x over the five residues, the numbers of y-values at x = 0, 1, 2, 3, 4 are 1, 1, 2, 2, 1. That is 7 affine points, plus the point at infinity: #E(𝔽₅) = 8. Thus the trace is 5 + 1 − 8 = −2, not the raw point count.