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.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.SmithDeterminant |
| 2 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ShortComplexColength |
| 3 | import Mathlib.Algebra.Homology.ShortComplex.ModuleCat |
| 4 | |
| 5 | /-! # Short Complex Determinant -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ShortComplexDeterminant |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! The Euler characteristic of a generically exact three-term free complex |
| 12 | over a principal ideal domain is the difference of two determinant orders. -/ |
| 13 | |
| 14 | open _root_.Module |
| 15 | open scoped Classical |
| 16 | |
| 17 | universe u v w w' |
| 18 | |
| 19 | variable (R : Type u) [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] |
| 20 | {A B C : Type v} [AddCommGroup A] [AddCommGroup B] [AddCommGroup C] |
| 21 | [Module R A] [Module R B] [Module R C] |
| 22 | {ι : Type w} {κ : Type w'} [Fintype ι] [Fintype κ] |
| 23 | |
| 24 | open OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ShortComplexColength |
| 25 | |
| 26 | omit [IsDomain R] [IsPrincipalIdealRing R] in |
| 27 | theorem coprod_injective (f : A →ₗ[R] B) (g : B →ₗ[R] C) (h : g.comp f = 0) |
| 28 | (hf : Function.Injective f) (t : C →ₗ[R] B) (ht : Function.Injective (g.comp t)) : |
| 29 | Function.Injective (f.coprod t) := by |
| 30 | rintro ⟨a, c⟩ ⟨a', c'⟩ he |
| 31 | have hc : c = c' := by |
| 32 | apply ht |
| 33 | change g (t c) = g (t c') |
| 34 | have hg := congrArg g he |
| 35 | change g (f a + t c) = g (f a' + t c') at hg |
| 36 | simpa only [map_add, show g (f a) = 0 from DFunLike.congr_fun h a, |
| 37 | show g (f a') = 0 from DFunLike.congr_fun h a', zero_add] using hg |
| 38 | have ha : a = a' := hf (by simpa [LinearMap.coprod_apply, hc] using he) |
| 39 | exact Prod.ext ha hc |
| 40 | |
| 41 | theorem order_comparison (f : A →ₗ[R] B) (g : B →ₗ[R] C) (h : g.comp f = 0) |
| 42 | (hf : Function.Injective f) (t : C →ₗ[R] B) (ht : Function.Injective (g.comp t)) |
| 43 | (b : Basis ι R (A × C)) (c : Basis ι R B) (e : Basis κ R C) : |
| 44 | Ring.ord R (LinearMap.toMatrix b c (f.coprod t)).det + |
| 45 | Module.length R (C ⧸ g.range) = |
| 46 | Module.length R (g.ker ⧸ (ShortComplexColength.toCycles R f g h).range) + |
| 47 | Ring.ord R (g.comp t).det := by |
| 48 | have he := ShortComplexColength.length_comparison R f g h t ht |
| 49 | rw [SmithDeterminant.cokernel_length_matrix R b c _ |
| 50 | (coprod_injective R f g h hf t ht), |
| 51 | SmithDeterminant.cokernel_length_det R e _ ht] at he |
| 52 | exact he |
| 53 | |
| 54 | theorem euler_eq (f : A →ₗ[R] B) (g : B →ₗ[R] C) (h : g.comp f = 0) |
| 55 | (hf : Function.Injective f) (t : C →ₗ[R] B) (ht : Function.Injective (g.comp t)) |
| 56 | (b : Basis ι R (A × C)) (c : Basis ι R B) (e : Basis κ R C) : |
| 57 | ((Module.length R (C ⧸ g.range)).toNat : ℚ) - |
| 58 | ((Module.length R (g.ker ⧸ (ShortComplexColength.toCycles R f g h).range)).toNat : ℚ) = |
| 59 | ((Ring.ord R (g.comp t).det).toNat : ℚ) - |
| 60 | ((Ring.ord R (LinearMap.toMatrix b c (f.coprod t)).det).toNat : ℚ) := by |
| 61 | have hj := SmithDeterminant.cokernel_length_ne_top R b c _ |
| 62 | (coprod_injective R f g h hf t ht) |
| 63 | have hgt := SmithDeterminant.cokernel_length_ne_top R e e _ ht |
| 64 | have hH : Module.length R (g.ker ⧸ (ShortComplexColength.toCycles R f g h).range) ≠ ⊤ := |
| 65 | ne_top_of_le_ne_top hj (Module.length_le_of_injective |
| 66 | (ShortComplexColength.homologyToCokernel R f g h t) (ShortComplexColength.homologyToCokernel_injective R f g h t ht)) |
| 67 | have hle : (g.comp t).range ≤ g.range := by |
| 68 | rintro x ⟨y, rfl⟩ |
| 69 | exact ⟨t y, rfl⟩ |
| 70 | have h₀ : Module.length R (C ⧸ g.range) ≠ ⊤ := |
| 71 | ne_top_of_le_ne_top hgt (Module.length_le_of_surjective |
| 72 | ((g.comp t).range.mapQ g.range LinearMap.id hle) (by |
| 73 | intro x |
| 74 | obtain ⟨y, rfl⟩ := g.range.mkQ_surjective x |
| 75 | exact ⟨(g.comp t).range.mkQ y, rfl⟩)) |
| 76 | have he := congrArg (fun n : ℕ∞ => (n.toNat : ℚ)) (ShortComplexColength.length_comparison R f g h t ht) |
| 77 | rw [ENat.toNat_add hj h₀, ENat.toNat_add hH hgt, Nat.cast_add, Nat.cast_add, |
| 78 | SmithDeterminant.cokernel_length_matrix R b c _ |
| 79 | (coprod_injective R f g h hf t ht), |
| 80 | SmithDeterminant.cokernel_length_det R e _ ht] at he |
| 81 | linarith |
| 82 | |
| 83 | theorem native_order_comparison (S : CategoryTheory.ShortComplex (ModuleCat.{v} R)) |
| 84 | (hf : Function.Injective S.f) (t : S.X₃ →ₗ[R] S.X₂) |
| 85 | (ht : Function.Injective (S.g.hom.comp t)) |
| 86 | (b : Basis ι R (S.X₁ × S.X₃)) (c : Basis ι R S.X₂) (e : Basis κ R S.X₃) : |
| 87 | Ring.ord R (LinearMap.toMatrix b c (S.f.hom.coprod t)).det + |
| 88 | Module.length R (S.X₃ ⧸ S.g.hom.range) = |
| 89 | Module.length R S.homology + Ring.ord R (S.g.hom.comp t).det := by |
| 90 | rw [S.moduleCatHomologyIso.toLinearEquiv.length_eq] |
| 91 | exact order_comparison R S.f.hom S.g.hom (ModuleCat.hom_ext_iff.mp S.zero) hf t ht b c e |
| 92 | |
| 93 | theorem native_euler_eq (S : CategoryTheory.ShortComplex (ModuleCat.{v} R)) |
| 94 | (hf : Function.Injective S.f) (t : S.X₃ →ₗ[R] S.X₂) |
| 95 | (ht : Function.Injective (S.g.hom.comp t)) |
| 96 | (b : Basis ι R (S.X₁ × S.X₃)) (c : Basis ι R S.X₂) (e : Basis κ R S.X₃) : |
| 97 | ((Module.length R (S.X₃ ⧸ S.g.hom.range)).toNat : ℚ) - |
| 98 | ((Module.length R S.homology).toNat : ℚ) = |
| 99 | ((Ring.ord R (S.g.hom.comp t).det).toNat : ℚ) - |
| 100 | ((Ring.ord R (LinearMap.toMatrix b c (S.f.hom.coprod t)).det).toNat : ℚ) := by |
| 101 | rw [S.moduleCatHomologyIso.toLinearEquiv.length_eq] |
| 102 | exact euler_eq R S.f.hom S.g.hom (ModuleCat.hom_ext_iff.mp S.zero) hf t ht b c e |
| 103 | |
| 104 | end |
| 105 | |
| 106 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ShortComplexDeterminant |