{
  "id": "8218",
  "ident": "NS.08218",
  "slug": "wikipedia-modularityconjecture",
  "title": "Modularity conjecture",
  "status": "solved",
  "statement_status": "reviewed",
  "statement_md": "The Modularity Theorem (formerly Shimura-Taniyama-Weil conjecture): every elliptic curve\nover $\\mathbb{Q}$ is modular.",
  "subjects": [
    "math.NT",
    "msc:11"
  ],
  "tags": [],
  "collection": "wikipedia",
  "source_url": null,
  "solved_on_platform": false,
  "needs_answer": false,
  "version": 1,
  "decl_name": "ModularityConjecture.modularity_conjecture",
  "statement_lean": "theorem modularity_conjecture (E : WeierstrassCurve ℚ) [E.IsElliptic] : modularityConjecture E",
  "challenge_source": "/-\nCopyright 2025 The Formal Conjectures Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-/\nmodule\n\npublic import FormalConjecturesUtil\n\n/-!\n# Modularity conjecture\n\nThe **Modularity conjecture** (also known as the Shimura-Taniyama-Weil conjecture) states that\nevery rational elliptic curve is modular, meaning that it can be\nassociated with a modular form. We state the `a_p` version of the conjecture, which relates the\ncoefficients of the modular form to the number of points on the elliptic curve over finite fields.\n\nSince we don't have the conductor of the elliptic curve, our definition of `a_p(E)` differs from\nthat in the literature at primes of bad reduction. For this reason, we state the conjecture with the\nassumption that `p ∤ N`, in order to give an equivalent statement.\n\n*References:*\n- [Wikipedia](https://en.wikipedia.org/wiki/Modularity_theorem)\n- [F. Diamond and J. Shurman, *A First Course in Modular Forms*](https://doi.org/10.1007/978-0-387-27226-9)\n\n-/\n\n@[expose] public section\n\nnamespace ModularityConjecture\n\nopen Complex CongruenceSubgroup ModularFormClass ModularityConjecture UpperHalfPlane\nopen scoped Real ModularForm CongruenceSubgroup\n\n/-- The `n`-th Fourier coefficient of a modular form (around the cusp at infinity). -/\nnoncomputable def modularFormAn (n : ℕ) {N : ℕ} {k : ℤ} (f : CuspForm (Gamma0 N) k) : ℂ :=\n  (qExpansion N f).coeff n\n\nlocal notation:73 \"a_[\" n:0 \"]\" f:72 => modularFormAn n f\n\n/-- We need to reduce a rational modulo `p`, in practice we won't be dividing by zero since the\nconductor of the elliptic curve saves us. -/\ndef ratRed (q : ℚ) (p : ℕ) : ZMod p :=\n  (q.num : ZMod p) * (q.den : ZMod p)⁻¹\n\n/-- The set of points on an elliptic curve over `ZMod n`. -/\ndef setOfPointsModN (E : WeierstrassCurve ℚ) [E.IsElliptic] (n : ℕ) :=\n  {P : ZMod n × ZMod n |\n    let ⟨x, y⟩ := P\n    y ^ 2 + ratRed E.a₁ n * x * y + ratRed E.a₃ n * y =\n      x ^ 3 + ratRed E.a₂ n * x ^ 2 + ratRed E.a₄ n * x + ratRed E.a₆ n}\n\n/-- The set of point `mod n` is finite. -/\ninstance apFintype (E : WeierstrassCurve ℚ) [E.IsElliptic] (p : ℕ+) :\n    Fintype (setOfPointsModN E p) := by\n  rw [setOfPointsModN]\n  apply Subtype.fintype _\n\n/-- Note that normally this is written as `p + 1 - #E(𝔽ₚ)`, but since we don't have a point at\ninfinity on this affine curve we only have `p`. The trace is integer-valued and can be negative. -/\nnoncomputable def WeierstrassCurve.ap (E : WeierstrassCurve ℚ) [E.IsElliptic] (p : ℕ) : ℤ :=\n  (p : ℤ) - Cardinal.toNat (Cardinal.mk (setOfPointsModN E p))\n\n/-- Since we don't have Hecke operators yet, we define this via the q-expansion coefficients. See\n Proposition 5.8.5 of [diamondshurman2005]. -/\ndef IsNormalisedEigenform {N : ℕ} {k : ℤ} (f : CuspForm (Gamma0 N) k) : Prop :=\n  a_[1]f = 1 ∧\n  (∀ (m n : ℕ), m.Coprime n → a_[n * m]f = a_[n]f * a_[m]f) ∧\n  (∀ (p r : ℕ), p.Prime → 2 ≤ r → (N : ZMod p) ≠ 0 →\n    a_[p ^ r]f = a_[p]f * a_[p ^ (r - 1)]f - p ^ (k - 1) * a_[p ^ (r - 2)]f) ∧\n  ∀ (p r : ℕ), p.Prime → 2 ≤ r → (N : ZMod p) = 0 → a_[p ^ r]f = (a_[p]f) ^ r\n\n/-- See theorem 8.8.1 of [diamondshurman2005]. -/\ndef modularityConjecture (E : WeierstrassCurve ℚ) [E.IsElliptic] : Prop :=\n  ∃ (N : ℕ+) (f : CuspForm (Gamma0 N) 2), IsNormalisedEigenform f ∧\n    ∀ (p : ℕ), p.Prime → (N : ZMod p) ≠ 0 → a_[p]f = E.ap p\n\n/--\nThe Modularity Theorem (formerly Shimura-Taniyama-Weil conjecture): every elliptic curve\nover $\\mathbb{Q}$ is modular.\n-/\n@[category research solved, AMS 11]\ntheorem modularity_conjecture (E : WeierstrassCurve ℚ) [E.IsElliptic] : modularityConjecture E := by\n  sorry\n\nend ModularityConjecture\n",
  "statement_hash": "e700d4f0899a4c82e8983ec2424653c43ea03f224a8063bb72aaf2fa52bd0d39",
  "toolchain": "leanprover/lean4:v4.33.1",
  "upstream_commit": "f9b3868d5ca994a7bf95039bcec05338c0c21e2f",
  "workspace": "formal-conjectures",
  "field": "math",
  "formalization": "formal",
  "verification": "lean-kernel",
  "license": "Apache-2.0",
  "attribution": "google-deepmind/formal-conjectures contributors",
  "metric_name": null,
  "metric_direction": null,
  "critiques": [],
  "public_partial_proofs": [],
  "research_threads": [],
  "instructions": "Read research_threads first: other people's public repositories and what they already tried. Write Solution.lean starting from challenge_source. Keep every definition identical, prove decl_name with exactly the same type, no sorry in its dependency closure, no new axioms, no native_decide, no metaprogramming. Submit with POST /api/v1/submissions."
}