Modularity of elliptic curves over ℚ via eigenform coefficients #
Definition: FLTPrelim_Modularity (ddd45b70-a042-5d79-93f9-c52e6062e9d4), by Claude, 2026-09-05.
The module fixes the project's notion of modularity in terms of $q$-expansion coefficients and point
counts on a chosen integral equation. For $f:\mathbb H\to\mathbb C$, ModularFormClass.qCoeff f n is the $n$-th coefficient of Mathlib's $q$-expansion of
$f$ at width $1$. CuspForm.IsNormalizedEigenform is a
structure on a weight-$2$ cusp form $f$ for $\Gamma_0(N)$ whose fields are exactly the arithmetic of
the coefficients: $a_1=1$; $a_{mn}=a_ma_n$ for coprime $m,n$;
$a_{p^{r+2}}=a_pa_{p^{r+1}}-p\,a_{p^r}$ for all primes $p\nmid N$; and $a_{p^{r+2}}=a_pa_{p^{r+1}}$
for primes $p\mid N$. No Hecke operator appears: being an eigenform is encoded purely by these
recursions. On the curve side, for a Weierstrass curve over a finite ring the point type is finite
(proved by injecting points into Option (R × R), the point at infinity going to none), the
number of points of a Weierstrass curve over a commutative ring — Mathlib's affine point type, which
includes the point at infinity — is given a name card, and traceOfFrobenius is $\#F+1$ minus
that number. For $W$ over $\mathbb Z$, reductionMod W p is the coefficientwise reduction to
$\mathbb Z/p$ and apOfModel W p its $p+1-\#W(\mathbb F_p)$. Three predicates on integral equations
follow: IsGoodPrimeFor W p is simply $p\nmid\Delta(W)$; IsSemistableModel W says no prime
divides both $\Delta(W)$ and $c_4(W)$; IsIntegralModelOf W E says some variable change over
$\mathbb Q$ carries $E$ to the base change of $W$ to $\mathbb Q$. Finally IsModularModelOfLevel W N asserts the existence of a weight-$2$ cusp form on $\Gamma_0(N)$ satisfying the above recursions
with $a_p(f)=a_p(W)$ for every prime $p$ with $p\nmid\Delta(W)$ and $p\nmid N$; IsModularModel W
adds $N\ge 1$; and IsModular E says some integral model of $E$ is a modular model. Thus modularity
is an equality of $L$-coefficients at good primes away from the level, not an assertion about a
newform of the conductor, nor a Galois-representation isomorphism; semistability is a condition on
the chosen equation rather than on $E$.
Relation to Mathlib. CuspForm, CongruenceSubgroup.Gamma0, $q$-expansions, WeierstrassCurve
with its invariants $c_4,\Delta$, VariableChange and affine points are Mathlib's; the eigenform
recursions, the counting function and trace of Frobenius, reduction modulo $p$, and the
semistability, integral-model and modularity predicates are the project's own, together with a
Finite instance for affine points over a finite ring.
Where it is used. These definitions give the statement of the modularity input to the proof:
[WeierstrassCurve.modularity_of_semistableModel]
(../thm.html#WeierstrassCurve.modularity_of_semistableModel)
derives IsModular from IsSemistableModel (with $\Delta\ne0$), and
[FreyPackage.frey_isModular]
(../thm.html#FreyPackage.frey_isModular) applies it to the Frey curve
attached to a counterexample to Fermat's Last Theorem. Nearly the whole tree below the modularity
theorem is phrased in terms of these notions.
<!-- Generated by add_prove2me_provenance.py -->
The coefficient of the width-one q-expansion of a modular form.
Equations
- ModularFormClass.qCoeff f n = (PowerSeries.coeff n) (UpperHalfPlane.qExpansion 1 f)
Instances For
The normalized weight-two eigenform condition expressed through multiplicativity and prime-power recurrences of q-coefficients.
- qCoeff_mul_of_coprime (m n : ℕ) : m.Coprime n → ModularFormClass.qCoeff (⇑f) (m * n) = ModularFormClass.qCoeff (⇑f) m * ModularFormClass.qCoeff (⇑f) n
- qCoeff_prime_pow_of_not_dvd (p r : ℕ) : Nat.Prime p → ¬p ∣ N → ModularFormClass.qCoeff (⇑f) (p ^ (r + 2)) = ModularFormClass.qCoeff (⇑f) p * ModularFormClass.qCoeff (⇑f) (p ^ (r + 1)) - ↑p * ModularFormClass.qCoeff (⇑f) (p ^ r)
- qCoeff_prime_pow_of_dvd (p r : ℕ) : Nat.Prime p → p ∣ N → ModularFormClass.qCoeff (⇑f) (p ^ (r + 2)) = ModularFormClass.qCoeff (⇑f) p * ModularFormClass.qCoeff (⇑f) (p ^ (r + 1))
Instances For
The Frobenius trace expressed as the field cardinality plus one minus the point count.
Instances For
Reduction of an integral Weierstrass equation modulo the natural number p.
Equations
- W.reductionMod p = W.map (Int.castRingHom (ZMod p))
Instances For
The Frobenius trace of the reduction of an integral Weierstrass model modulo p.
Equations
- W.apOfModel p = (W.reductionMod p).traceOfFrobenius
Instances For
The modulus does not divide the discriminant of the integral model.
Equations
- W.IsGoodPrimeFor p = ¬↑p ∣ W.Δ
Instances For
Every prime dividing the discriminant does not divide c₄.
Instances For
An integral equation becomes the given rational curve after a rational change of variables.
Equations
- W.IsIntegralModelOf E = ∃ (C : WeierstrassCurve.VariableChange ℚ), C • E = W.map (Int.castRingHom ℚ)
Instances For
A normalized weight-two eigenform at the given level matches the model's traces at good primes away from the level.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The integral model is modular at some positive level.
Equations
- W.IsModularModel = ∃ (N : ℕ), 0 < N ∧ W.IsModularModelOfLevel N
Instances For
The rational curve admits a modular integral model.
Equations
- E.IsModular = ∃ (W : WeierstrassCurve ℤ), W.IsIntegralModelOf E ∧ W.IsModularModel