Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | /- |
| 2 | Copyright (c) 2026 The AINTLIB contributors. All rights reserved. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | Authors: AINTLIB ModularCurves project |
| 5 | |
| 6 | ForMathlib (OURS, not vendored): upstream candidate. |
| 7 | This file has been modified. |
| 8 | -/ |
| 9 | import Mathlib.Algebra.Homology.HomologySequence |
| 10 | import Mathlib.Algebra.Homology.ShortComplex.ModuleCat |
| 11 | import Mathlib.RingTheory.Noetherian.Basic |
| 12 | |
| 13 | /-! # Finite Homology Sequence -/ |
| 14 | |
| 15 | namespace OAI.AlgebraicGeometry.SheafCohomology.Projective.FiniteHomologySequence |
| 16 | |
| 17 | open _root_.CategoryTheory.ShortComplex.ShortExact |
| 18 | |
| 19 | /- |
| 20 | |
| 21 | ForMathlib (OURS, not vendored): upstream candidate. |
| 22 | -/ |
| 23 | |
| 24 | /-! |
| 25 | # Finiteness in long homology sequences |
| 26 | |
| 27 | Over a Noetherian ring, each exact pair in the long homology sequence of a short exact |
| 28 | sequence of complexes transfers finite generation from the two surrounding terms to the |
| 29 | middle term. |
| 30 | -/ |
| 31 | |
| 32 | open _root_.CategoryTheory |
| 33 | |
| 34 | universe u v w |
| 35 | |
| 36 | section |
| 37 | |
| 38 | /-- Finite generation of the surrounding modules bounds the middle module of |
| 39 | an exact pair over a Noetherian coefficient ring. -/ |
| 40 | theorem finite_of_exact {R : Type u} [CommRing R] [IsNoetherianRing R] |
| 41 | {M N P : Type*} [AddCommGroup M] [AddCommGroup N] [AddCommGroup P] |
| 42 | [Module R M] [Module R N] [Module R P] |
| 43 | (f : M →ₗ[R] N) (g : N →ₗ[R] P) |
| 44 | [Module.Finite R M] [Module.Finite R P] |
| 45 | (h : Function.Exact f g) : Module.Finite R N := by |
| 46 | have : IsNoetherian R N := |
| 47 | isNoetherian_of_range_eq_ker f g (LinearMap.exact_iff.mp h).symm |
| 48 | infer_instance |
| 49 | |
| 50 | end |
| 51 | |
| 52 | namespace CategoryTheory.ShortComplex.ShortExact |
| 53 | open _root_.CategoryTheory.ShortComplex |
| 54 | |
| 55 | variable {R : Type u} [CommRing R] [IsNoetherianRing R] |
| 56 | variable {ι : Type w} {c : ComplexShape ι} |
| 57 | variable {S : ShortComplex (HomologicalComplex (ModuleCat.{v} R) c)} |
| 58 | |
| 59 | /-- In a short exact sequence of complexes, finite homology of the third complex in one |
| 60 | degree and of the second complex in the following degree imply finite homology of the first |
| 61 | complex in the following degree. -/ |
| 62 | theorem finite_homology_X1 (hS : S.ShortExact) (i j : ι) (hij : c.Rel i j) |
| 63 | [Module.Finite R (S.X₃.homology i)] [Module.Finite R (S.X₂.homology j)] : |
| 64 | Module.Finite R (S.X₁.homology j) := |
| 65 | finite_of_exact _ _ |
| 66 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 67 | (hS.homology_exact₁ i j hij)) |
| 68 | |
| 69 | /-- At a degree with no predecessor, finite homology of the middle complex implies finite |
| 70 | homology of the first complex. -/ |
| 71 | theorem finite_homology_X1_of_not_rel (hS : S.ShortExact) (j : ι) |
| 72 | (hj : ∀ i, ¬ c.Rel i j) [Module.Finite R (S.X₂.homology j)] : |
| 73 | Module.Finite R (S.X₁.homology j) := by |
| 74 | let := hS.mono_f |
| 75 | let : Mono (HomologicalComplex.homologyMap S.f j) := |
| 76 | HomologicalComplex.mono_homologyMap_of_mono_of_not_rel S.f j hj |
| 77 | exact Module.Finite.of_injective (HomologicalComplex.homologyMap S.f j).hom |
| 78 | ((ModuleCat.mono_iff_injective (HomologicalComplex.homologyMap S.f j)).mp inferInstance) |
| 79 | |
| 80 | /-- In a short exact sequence of complexes, finite homology of the first and third |
| 81 | complexes in one degree implies finite homology of the second complex in that degree. -/ |
| 82 | theorem finite_homology_X2 (hS : S.ShortExact) (i : ι) |
| 83 | [Module.Finite R (S.X₁.homology i)] [Module.Finite R (S.X₃.homology i)] : |
| 84 | Module.Finite R (S.X₂.homology i) := |
| 85 | finite_of_exact _ _ |
| 86 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 87 | (hS.homology_exact₂ i)) |
| 88 | |
| 89 | /-- In a short exact sequence of complexes, finite homology of the second complex in one |
| 90 | degree and of the first complex in the following degree imply finite homology of the third |
| 91 | complex in the first degree. -/ |
| 92 | theorem finite_homology_X3 (hS : S.ShortExact) (i j : ι) (hij : c.Rel i j) |
| 93 | [Module.Finite R (S.X₂.homology i)] [Module.Finite R (S.X₁.homology j)] : |
| 94 | Module.Finite R (S.X₃.homology i) := |
| 95 | finite_of_exact _ _ |
| 96 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 97 | (hS.homology_exact₃ i j hij)) |
| 98 | |
| 99 | /-- In a short exact sequence of cochain complexes indexed by the natural numbers, finite |
| 100 | homology of the middle and third complexes in every degree implies finite homology of the |
| 101 | first complex in every degree. -/ |
| 102 | theorem finite_homology_X1_up_nat |
| 103 | {S : ShortComplex (CochainComplex (ModuleCat.{v} R) ℕ)} (hS : S.ShortExact) |
| 104 | [∀ n, Module.Finite R (S.X₂.homology n)] [∀ n, Module.Finite R (S.X₃.homology n)] |
| 105 | (n : ℕ) : Module.Finite R (S.X₁.homology n) := by |
| 106 | cases n with |
| 107 | | zero => |
| 108 | apply finite_homology_X1_of_not_rel hS 0 |
| 109 | simp [ComplexShape.up_Rel] |
| 110 | | succ n => |
| 111 | exact finite_homology_X1 hS n (n + 1) (by simp [ComplexShape.up_Rel]) |
| 112 | |
| 113 | end CategoryTheory.ShortComplex.ShortExact |
| 114 | |
| 115 | end OAI.AlgebraicGeometry.SheafCohomology.Projective.FiniteHomologySequence |