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.Algebra.Homology.HomologySequence |
| 2 | import Mathlib.Algebra.Homology.ShortComplex.ModuleCat |
| 3 | import OAI.AlgebraicGeometry.Divisors.LineBundles.CyclicExactLength |
| 4 | |
| 5 | /-! # Periodic Complex -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.Divisors.LineBundles.Periodic.PeriodicComplex.BundleCycles |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | section |
| 12 | |
| 13 | /-! |
| 14 | # LineBundleCycles: actual two-periodic complexes of modules |
| 15 | |
| 16 | The two indices form a circle. Two endomorphisms with zero composites |
| 17 | give an actual homological complex, so its homology and connecting maps |
| 18 | are those of the usual kernel/quotient construction. |
| 19 | -/ |
| 20 | |
| 21 | open _root_.CategoryTheory |
| 22 | |
| 23 | def periodicComplexShape : ComplexShape Bool where |
| 24 | Rel i j := i ≠ j |
| 25 | next_eq := by decide |
| 26 | prev_eq := by decide |
| 27 | |
| 28 | theorem periodicComplexShape_false_true : periodicComplexShape.Rel false true := by |
| 29 | change false ≠ true |
| 30 | decide |
| 31 | |
| 32 | theorem periodicComplexShape_true_false : periodicComplexShape.Rel true false := by |
| 33 | change true ≠ false |
| 34 | decide |
| 35 | |
| 36 | variable {R : Type*} [CommRing R] |
| 37 | |
| 38 | def endomorphismPeriodicComplex {M : Type*} [AddCommGroup M] [Module R M] |
| 39 | (φ ψ : M →ₗ[R] M) (hφψ : ψ.comp φ = 0) (hψφ : φ.comp ψ = 0) : |
| 40 | HomologicalComplex (ModuleCat R) periodicComplexShape where |
| 41 | X _ := ModuleCat.of R M |
| 42 | d i j := match i, j with |
| 43 | | false, true => ModuleCat.ofHom φ |
| 44 | | true, false => ModuleCat.ofHom ψ |
| 45 | | _, _ => 0 |
| 46 | shape := by |
| 47 | intro i j hij |
| 48 | cases i <;> cases j <;> simp_all [periodicComplexShape] |
| 49 | d_comp_d' := by |
| 50 | intro i j k hij hjk |
| 51 | cases i <;> cases j <;> cases k <;> |
| 52 | simp_all [periodicComplexShape, ← ModuleCat.ofHom_comp] |
| 53 | |
| 54 | /-- The Herbrand Euler length, with both homology lengths finite. -/ |
| 55 | def periodicEulerLength (K : HomologicalComplex (ModuleCat R) periodicComplexShape) |
| 56 | (_h₀ : Module.length R (K.homology false) ≠ ⊤) |
| 57 | (_h₁ : Module.length R (K.homology true) ≠ ⊤) : ℤ := |
| 58 | ((Module.length R (K.homology false)).toNat : ℤ) - |
| 59 | (Module.length R (K.homology true)).toNat |
| 60 | |
| 61 | end |
| 62 | |
| 63 | /-! |
| 64 | # LineBundleCycles: additivity from the actual periodic homology sequence |
| 65 | |
| 66 | The connecting maps are the snake connecting maps of the short exact |
| 67 | sequence of complexes. The cyclic six-term length identity then gives |
| 68 | additivity of the Herbrand Euler length. |
| 69 | -/ |
| 70 | |
| 71 | open _root_.CategoryTheory _root_.HomologicalComplex |
| 72 | |
| 73 | variable {R : Type*} [CommRing R] |
| 74 | |
| 75 | theorem periodicEulerLength_additive |
| 76 | (S : ShortComplex (HomologicalComplex (ModuleCat R) periodicComplexShape)) |
| 77 | (hS : S.ShortExact) |
| 78 | (hA₀ : Module.length R (S.X₁.homology false) ≠ ⊤) |
| 79 | (hA₁ : Module.length R (S.X₁.homology true) ≠ ⊤) |
| 80 | (hB₀ : Module.length R (S.X₂.homology false) ≠ ⊤) |
| 81 | (hB₁ : Module.length R (S.X₂.homology true) ≠ ⊤) |
| 82 | (hC₀ : Module.length R (S.X₃.homology false) ≠ ⊤) |
| 83 | (hC₁ : Module.length R (S.X₃.homology true) ≠ ⊤) : |
| 84 | periodicEulerLength S.X₂ hB₀ hB₁ = |
| 85 | periodicEulerLength S.X₁ hA₀ hA₁ + periodicEulerLength S.X₃ hC₀ hC₁ := by |
| 86 | have he := CyclicExactLength.BundleCycles.moduleLengthNat_cyclicSixTerm |
| 87 | (homologyMap S.f false).hom (homologyMap S.g false).hom |
| 88 | (hS.δ false true periodicComplexShape_false_true).hom |
| 89 | (homologyMap S.f true).hom (homologyMap S.g true).hom |
| 90 | (hS.δ true false periodicComplexShape_true_false).hom |
| 91 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 92 | (hS.homology_exact₂ false)) |
| 93 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 94 | (hS.homology_exact₃ false true periodicComplexShape_false_true)) |
| 95 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 96 | (hS.homology_exact₁ false true periodicComplexShape_false_true)) |
| 97 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 98 | (hS.homology_exact₂ true)) |
| 99 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 100 | (hS.homology_exact₃ true false periodicComplexShape_true_false)) |
| 101 | ((ShortComplex.ShortExact.moduleCat_exact_iff_function_exact _).mp |
| 102 | (hS.homology_exact₁ true false periodicComplexShape_true_false)) |
| 103 | hA₀ hB₀ hC₀ hA₁ hB₁ hC₁ |
| 104 | unfold periodicEulerLength |
| 105 | omega |
| 106 | |
| 107 | end |
| 108 | |
| 109 | end OAI.AlgebraicGeometry.Divisors.LineBundles.Periodic.PeriodicComplex.BundleCycles |