Birch and Swinnerton-Dyer: certified ranks in Lean
ECCompute: Lean that certifies rank lower bounds for 480 elliptic curves, up to rank ≥ 31. Certify more, rerun it, read what 2026 claimed about BSD

| 1 | /- |
| 2 | Copyright (c) 2026 the ECCompute authors. All rights reserved. |
| 3 | Released under the GNU General Public License version 3.0 as described in the file LICENSE. |
| 4 | -/ |
| 5 | module |
| 6 | |
| 7 | public import ECCompute.MainTheorem |
| 8 | |
| 9 | /-! |
| 10 | # `HasRankGE` and `Module.finrank` |
| 11 | |
| 12 | `HasRankGE W n` says that `W(ℚ)` has a finitely generated `ℤ`-submodule of free rank at least `n`. |
| 13 | Other formal statements write "rank at least `n`" as `n ≤ Module.finrank ℤ W.toAffine.Point`. |
| 14 | This file proves the two bridges between the two forms, keeping the Mordell–Weil finiteness of |
| 15 | `W(ℚ)` as a hypothesis. |
| 16 | -/ |
| 17 | |
| 18 | namespace ECCompute |
| 19 | |
| 20 | open WeierstrassCurve Module |
| 21 | |
| 22 | /-- If `W(ℚ)` contains a finitely generated submodule of free rank at least `n`, then the |
| 23 | `ℤ`-rank of `W(ℚ)` is at least `n`. The finiteness of `W(ℚ)` is the Mordell–Weil theorem and is |
| 24 | kept as a hypothesis. -/ |
| 25 | public theorem le_finrank_of_hasRankGE (W : WeierstrassCurve ℚ) {n : ℕ} |
| 26 | (h : HasRankGE W n) (hfin : Module.Finite ℤ W.toAffine.Point) : |
| 27 | n ≤ Module.finrank ℤ W.toAffine.Point := by |
| 28 | obtain ⟨H, _, hn⟩ := h |
| 29 | exact hn.trans (@Submodule.finrank_le ℤ W.toAffine.Point _ _ _ _ hfin H) |
| 30 | |
| 31 | /-- If the `ℤ`-rank of `W(ℚ)` is at least `n`, then `W` has rank at least `n` in the sense of |
| 32 | `HasRankGE`. The finiteness of `W(ℚ)` is the Mordell–Weil theorem and is kept as a hypothesis. -/ |
| 33 | public theorem hasRankGE_of_le_finrank (W : WeierstrassCurve ℚ) {n : ℕ} |
| 34 | (hfin : Module.Finite ℤ W.toAffine.Point) |
| 35 | (h : n ≤ Module.finrank ℤ W.toAffine.Point) : |
| 36 | HasRankGE W n := by |
| 37 | refine ⟨⊤, ?_, ?_⟩ |
| 38 | · exact Module.Finite.iff_fg.mpr (Module.finite_def.mp hfin) |
| 39 | · simpa using h |
| 40 | |
| 41 | end ECCompute |