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 | import Mathlib.RingTheory.Length |
| 2 | import Mathlib.Algebra.Homology.ShortComplex.ModuleCat |
| 3 | |
| 4 | /-! # Exact Length -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ExactLength |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Length identities for exact module sequences, with finiteness proved |
| 11 | before converting ENat lengths to rational numbers. -/ |
| 12 | |
| 13 | open _root_.CategoryTheory |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | variable (R : Type u) [CommRing R] |
| 18 | |
| 19 | def rationalLength (M : ModuleCat.{u} R) : ℚ := (Module.length R M).toNat |
| 20 | |
| 21 | theorem kernel_range_length {M N : ModuleCat.{u} R} (f : M ⟶ N) : |
| 22 | Module.length R M = Module.length R (LinearMap.ker f.hom) + |
| 23 | Module.length R (LinearMap.range f.hom) := by |
| 24 | apply Module.length_eq_add_of_exact (LinearMap.ker f.hom).subtype f.hom.rangeRestrict |
| 25 | (Submodule.subtype_injective _) f.hom.surjective_rangeRestrict |
| 26 | intro x |
| 27 | constructor |
| 28 | · intro hx |
| 29 | exact ⟨⟨x, congrArg Subtype.val hx⟩, rfl⟩ |
| 30 | · rintro ⟨y, rfl⟩ |
| 31 | exact Subtype.ext y.property |
| 32 | |
| 33 | theorem range_length_ne_top {M N : ModuleCat.{u} R} (f : M ⟶ N) |
| 34 | (hM : Module.length R M ≠ ⊤) : Module.length R (LinearMap.range f.hom) ≠ ⊤ := by |
| 35 | exact ne_top_of_le_ne_top hM |
| 36 | (Module.length_le_of_surjective f.hom.rangeRestrict f.hom.surjective_rangeRestrict) |
| 37 | |
| 38 | theorem kernel_length_ne_top {M N : ModuleCat.{u} R} (f : M ⟶ N) |
| 39 | (hM : Module.length R M ≠ ⊤) : Module.length R (LinearMap.ker f.hom) ≠ ⊤ := by |
| 40 | exact ne_top_of_le_ne_top hM |
| 41 | (Module.length_le_of_injective (LinearMap.ker f.hom).subtype (Submodule.subtype_injective _)) |
| 42 | |
| 43 | theorem rationalLength_eq_kernel_add_range {M N : ModuleCat.{u} R} (f : M ⟶ N) |
| 44 | (hM : Module.length R M ≠ ⊤) : |
| 45 | rationalLength R M = rationalLength R (.of R (LinearMap.ker f.hom)) + |
| 46 | rationalLength R (.of R (LinearMap.range f.hom)) := by |
| 47 | unfold rationalLength |
| 48 | rw [kernel_range_length R f, ENat.toNat_add |
| 49 | (kernel_length_ne_top R f hM) (range_length_ne_top R f hM), Nat.cast_add] |
| 50 | |
| 51 | theorem rationalLength_exact (S : ShortComplex (ModuleCat.{u} R)) (hS : S.Exact) |
| 52 | (hM : Module.length R S.X₂ ≠ ⊤) : |
| 53 | rationalLength R S.X₂ = rationalLength R (.of R (LinearMap.range S.f.hom)) + |
| 54 | rationalLength R (.of R (LinearMap.range S.g.hom)) := by |
| 55 | rw [rationalLength_eq_kernel_add_range R S.g hM] |
| 56 | have he := LinearMap.exact_iff.mp |
| 57 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact S).mp hS) |
| 58 | rw [← he] |
| 59 | |
| 60 | theorem rationalLength_range_of_epi {M N : ModuleCat.{u} R} (f : M ⟶ N) [Epi f] : |
| 61 | rationalLength R (.of R (LinearMap.range f.hom)) = rationalLength R N := by |
| 62 | unfold rationalLength |
| 63 | exact congrArg (fun a : ℕ∞ => (a.toNat : ℚ)) |
| 64 | (LinearEquiv.ofTop (LinearMap.range f.hom) |
| 65 | (LinearMap.range_eq_top.mpr ((ModuleCat.epi_iff_surjective f).mp inferInstance))).length_eq |
| 66 | |
| 67 | theorem rationalLength_range_of_zero {M N : ModuleCat.{u} R} (f : M ⟶ N) |
| 68 | (hf : f = 0) : rationalLength R (.of R (LinearMap.range f.hom)) = 0 := by |
| 69 | subst f |
| 70 | have hz : Module.length R (LinearMap.range (0 : M →ₗ[R] N)) = 0 := by |
| 71 | rw [LinearMap.range_zero] |
| 72 | exact Module.length_eq_zero |
| 73 | simp only [rationalLength, ModuleCat.hom_zero, hz, ENat.toNat_zero, Nat.cast_zero] |
| 74 | |
| 75 | end |
| 76 | |
| 77 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ExactLength |