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 OAI.NumberTheory.PadicHodge.IntegralComparison.Cosimplicial.ModuleCupAlgebra |
| 2 | import Mathlib.Algebra.DirectSum.Algebra |
| 3 | |
| 4 | /-! # Cohomology Ring -/ |
| 5 | |
| 6 | namespace OAI.NumberTheory.PadicHodge.IntegralComparison.Cosimplicial.CohomologyRing |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! The direct sum of the actual cohomology modules carries the |
| 11 | Alexander–Whitney algebra structure. Its multiplication is the native |
| 12 | bilinear cup product on each pair of degrees. -/ |
| 13 | |
| 14 | open _root_.CategoryTheory |
| 15 | open scoped DirectSum Simplicial |
| 16 | |
| 17 | open OAI.NumberTheory.PadicHodge.IntegralComparison.Cosimplicial.ModuleComplex OAI.NumberTheory.PadicHodge.IntegralComparison.Cosimplicial.ModuleCupAlgebra |
| 18 | |
| 19 | universe u v |
| 20 | |
| 21 | variable {R : Type u} [CommRing R] (A : CosimplicialObject (CommAlgCat.{v} R)) |
| 22 | |
| 23 | abbrev cohomology (n : ℕ) : Type v := (ModuleComplex.complex A).homology n |
| 24 | |
| 25 | theorem graded_eq_of_degreeCast {m n : ℕ} (h : m = n) |
| 26 | (x : cohomology A m) (y : cohomology A n) (he : ModuleCupAlgebra.cohomologyDegreeCast A h x = y) : |
| 27 | (GradedMonoid.mk m x : GradedMonoid (cohomology A)) = GradedMonoid.mk n y := by |
| 28 | subst n |
| 29 | exact congrArg (GradedMonoid.mk m) he |
| 30 | |
| 31 | instance gradedMul : GradedMonoid.GMul (cohomology A) where |
| 32 | mul := fun {i j} x y => ModuleCup.cohomologyCup A i j x y |
| 33 | |
| 34 | instance gradedOne : GradedMonoid.GOne (cohomology A) where |
| 35 | one := ModuleCupAlgebra.cohomologyOne A |
| 36 | |
| 37 | instance gradedRing : DirectSum.GRing (cohomology A) where |
| 38 | mul := fun {i j} x y => ModuleCup.cohomologyCup A i j x y |
| 39 | one := ModuleCupAlgebra.cohomologyOne A |
| 40 | mul_zero := fun {_ _} x => (ModuleCup.cohomologyCup A _ _ x).map_zero |
| 41 | zero_mul := by |
| 42 | intro i j y |
| 43 | exact DFunLike.congr_fun (ModuleCup.cohomologyCup A i j).map_zero y |
| 44 | mul_add := fun {_ _} x y z => (ModuleCup.cohomologyCup A _ _ x).map_add y z |
| 45 | add_mul := by |
| 46 | intro i j x y z |
| 47 | exact DFunLike.congr_fun ((ModuleCup.cohomologyCup A i j).map_add x y) z |
| 48 | one_mul := by |
| 49 | rintro ⟨i, x⟩ |
| 50 | exact graded_eq_of_degreeCast A (Nat.zero_add i) _ _ (ModuleCupAlgebra.cohomologyOne_cup A x) |
| 51 | mul_one := by |
| 52 | rintro ⟨i, x⟩ |
| 53 | exact congrArg (GradedMonoid.mk i) (ModuleCupAlgebra.cohomologyCup_one A x) |
| 54 | mul_assoc := by |
| 55 | rintro ⟨i, x⟩ ⟨j, y⟩ ⟨k, z⟩ |
| 56 | exact graded_eq_of_degreeCast A (Nat.add_assoc i j k) _ _ (ModuleCupAlgebra.cohomologyCup_assoc A x y z) |
| 57 | natCast := fun n => n • ModuleCupAlgebra.cohomologyOne A |
| 58 | natCast_zero := zero_nsmul _ |
| 59 | natCast_succ := fun n => by simp only [add_nsmul, one_nsmul] |
| 60 | intCast := fun n => n • ModuleCupAlgebra.cohomologyOne A |
| 61 | intCast_ofNat := fun n => by simp |
| 62 | intCast_negSucc_ofNat := fun n => by simp |
| 63 | |
| 64 | instance gradedAlgebra : DirectSum.GAlgebra R (cohomology A) where |
| 65 | toFun := |
| 66 | { toFun := fun r => r • ModuleCupAlgebra.cohomologyOne A |
| 67 | map_zero' := zero_smul _ _ |
| 68 | map_add' := fun r s => add_smul r s _ } |
| 69 | map_one := one_smul _ _ |
| 70 | map_mul := by |
| 71 | intro r s |
| 72 | apply congrArg (GradedMonoid.mk 0) |
| 73 | change (r * s) • ModuleCupAlgebra.cohomologyOne A = |
| 74 | ModuleCup.cohomologyCup A 0 0 (r • ModuleCupAlgebra.cohomologyOne A) (s • ModuleCupAlgebra.cohomologyOne A) |
| 75 | simp only [map_smul, LinearMap.smul_apply, ModuleCupAlgebra.cohomologyCup_one, smul_smul] |
| 76 | rw [mul_comm] |
| 77 | commutes := by |
| 78 | rintro r ⟨i, x⟩ |
| 79 | apply graded_eq_of_degreeCast A (Nat.zero_add i) |
| 80 | change ModuleCupAlgebra.cohomologyDegreeCast A (Nat.zero_add i) |
| 81 | (ModuleCup.cohomologyCup A 0 i (r • ModuleCupAlgebra.cohomologyOne A) x) = ModuleCup.cohomologyCup A i 0 x (r • ModuleCupAlgebra.cohomologyOne A) |
| 82 | simp only [map_smul, LinearMap.smul_apply] |
| 83 | rw [ModuleCupAlgebra.cohomologyOne_cup, ModuleCupAlgebra.cohomologyCup_one] |
| 84 | smul_def := by |
| 85 | rintro r ⟨i, x⟩ |
| 86 | symm |
| 87 | apply graded_eq_of_degreeCast A (Nat.zero_add i) |
| 88 | change ModuleCupAlgebra.cohomologyDegreeCast A (Nat.zero_add i) |
| 89 | (ModuleCup.cohomologyCup A 0 i (r • ModuleCupAlgebra.cohomologyOne A) x) = r • x |
| 90 | simp only [map_smul, LinearMap.smul_apply] |
| 91 | rw [ModuleCupAlgebra.cohomologyOne_cup] |
| 92 | |
| 93 | abbrev total : Type v := ⨁ n : ℕ, cohomology A n |
| 94 | |
| 95 | def inclusion (n : ℕ) : cohomology A n →ₗ[R] total A := |
| 96 | DirectSum.lof R ℕ (cohomology A) n |
| 97 | |
| 98 | def component (n : ℕ) : total A →ₗ[R] cohomology A n := |
| 99 | DirectSum.component R ℕ (cohomology A) n |
| 100 | |
| 101 | theorem inclusion_cup {p q : ℕ} (x : cohomology A p) (y : cohomology A q) : |
| 102 | inclusion A (p + q) (ModuleCup.cohomologyCup A p q x y) = inclusion A p x * inclusion A q y := |
| 103 | (DirectSum.of_mul_of x y).symm |
| 104 | |
| 105 | theorem inclusion_one : inclusion A 0 (ModuleCupAlgebra.cohomologyOne A) = 1 := rfl |
| 106 | |
| 107 | theorem inclusion_square_zero [Invertible (2 : A.obj ⦋1⦌)] [Invertible (2 : A.obj ⦋2⦌)] |
| 108 | (x : cohomology A 1) : inclusion A 1 x * inclusion A 1 x = 0 := by |
| 109 | rw [← inclusion_cup, ModuleCup.cup_self_eq_zero, map_zero] |
| 110 | |
| 111 | end |
| 112 | |
| 113 | end OAI.NumberTheory.PadicHodge.IntegralComparison.Cosimplicial.CohomologyRing |