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.ShortComplexDeterminant |
| 2 | import Mathlib.RingTheory.TensorProduct.Free |
| 3 | import Mathlib.LinearAlgebra.Charpoly.BaseChange |
| 4 | |
| 5 | /-! # Complex Determinant Base Change -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ComplexDeterminantBaseChange |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! Determinant formulas commute with extension of scalars, using the |
| 12 | actual tensor-product complex and its native homology. -/ |
| 13 | |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open _root_.Module _root_.CategoryTheory |
| 17 | open scoped TensorProduct Classical |
| 18 | |
| 19 | universe u v w |
| 20 | |
| 21 | variable (R S : Type u) [CommRing R] [CommRing S] [Algebra R S] |
| 22 | {A B C : Type u} [AddCommGroup A] [AddCommGroup B] [AddCommGroup C] |
| 23 | [Module R A] [Module R B] [Module R C] |
| 24 | {ι : Type v} {κ : Type w} [Fintype ι] [Fintype κ] |
| 25 | |
| 26 | local instance : DecidableEq (ι ⊕ κ) := Classical.decEq _ |
| 27 | |
| 28 | theorem det_map (M : Matrix (ι ⊕ κ) (ι ⊕ κ) R) : |
| 29 | (M.map (algebraMap R S)).det = algebraMap R S M.det := by |
| 30 | simpa only [RingHom.mapMatrix_apply] using ((algebraMap R S).map_det M).symm |
| 31 | |
| 32 | theorem coprod_matrix (f : A →ₗ[R] B) (t : C →ₗ[R] B) |
| 33 | (a : Basis ι R A) (b : Basis (ι ⊕ κ) R B) (c : Basis κ R C) : |
| 34 | LinearMap.toMatrix ((Algebra.TensorProduct.basis S a).prod |
| 35 | (Algebra.TensorProduct.basis S c)) (Algebra.TensorProduct.basis S b) |
| 36 | ((f.baseChange S).coprod (t.baseChange S)) = |
| 37 | (LinearMap.toMatrix (a.prod c) b (f.coprod t)).map (algebraMap R S) := by |
| 38 | ext i j |
| 39 | cases j <;> |
| 40 | simp [LinearMap.toMatrix_apply, LinearMap.coprod_apply] |
| 41 | |
| 42 | def complex (f : A →ₗ[R] B) (g : B →ₗ[R] C) (h : g.comp f = 0) : |
| 43 | ShortComplex (ModuleCat.{u} S) := |
| 44 | ShortComplex.moduleCatMk (f.baseChange S) (g.baseChange S) (by |
| 45 | rw [← LinearMap.baseChange_comp, h, LinearMap.baseChange_zero]) |
| 46 | |
| 47 | theorem order_comparison [IsDomain S] [IsPrincipalIdealRing S] |
| 48 | (f : A →ₗ[R] B) (g : B →ₗ[R] C) (h : g.comp f = 0) |
| 49 | (t : C →ₗ[R] B) (hf : Function.Injective (f.baseChange S)) |
| 50 | (ht : Function.Injective ((g.comp t).baseChange S)) |
| 51 | (a : Basis ι R A) (b : Basis (ι ⊕ κ) R B) (c : Basis κ R C) : |
| 52 | Ring.ord S (algebraMap R S (LinearMap.toMatrix (a.prod c) b (f.coprod t)).det) + |
| 53 | Module.length S ((S ⊗[R] C) ⧸ (g.baseChange S).range) = |
| 54 | Module.length S (complex R S f g h).homology + |
| 55 | Ring.ord S (algebraMap R S (g.comp t).det) := by |
| 56 | let : Module.Free R C := Module.Free.of_basis c |
| 57 | let : Module.Finite R C := Module.Finite.of_basis c |
| 58 | have ht' : Function.Injective ((g.baseChange S).comp (t.baseChange S)) := by |
| 59 | rwa [← LinearMap.baseChange_comp] |
| 60 | have he := ShortComplexDeterminant.native_order_comparison S (complex R S f g h) |
| 61 | hf (t.baseChange S) ht' |
| 62 | ((Algebra.TensorProduct.basis S a).prod (Algebra.TensorProduct.basis S c)) |
| 63 | (Algebra.TensorProduct.basis S b) (Algebra.TensorProduct.basis S c) |
| 64 | change Ring.ord S (LinearMap.toMatrix |
| 65 | ((Algebra.TensorProduct.basis S a).prod (Algebra.TensorProduct.basis S c)) |
| 66 | (Algebra.TensorProduct.basis S b) |
| 67 | ((f.baseChange S).coprod (t.baseChange S))).det + |
| 68 | Module.length S ((S ⊗[R] C) ⧸ (g.baseChange S).range) = |
| 69 | Module.length S (complex R S f g h).homology + |
| 70 | Ring.ord S ((g.baseChange S).comp (t.baseChange S)).det at he |
| 71 | rw [← LinearMap.baseChange_comp, LinearMap.det_baseChange, coprod_matrix R S, |
| 72 | det_map R S] at he |
| 73 | exact he |
| 74 | |
| 75 | theorem euler_eq [IsDomain S] [IsPrincipalIdealRing S] |
| 76 | (f : A →ₗ[R] B) (g : B →ₗ[R] C) (h : g.comp f = 0) |
| 77 | (t : C →ₗ[R] B) (hf : Function.Injective (f.baseChange S)) |
| 78 | (ht : Function.Injective ((g.comp t).baseChange S)) |
| 79 | (a : Basis ι R A) (b : Basis (ι ⊕ κ) R B) (c : Basis κ R C) : |
| 80 | ((Module.length S ((S ⊗[R] C) ⧸ (g.baseChange S).range)).toNat : ℚ) - |
| 81 | ((Module.length S (complex R S f g h).homology).toNat : ℚ) = |
| 82 | ((Ring.ord S (algebraMap R S (g.comp t).det)).toNat : ℚ) - |
| 83 | ((Ring.ord S (algebraMap R S |
| 84 | (LinearMap.toMatrix (a.prod c) b (f.coprod t)).det)).toNat : ℚ) := by |
| 85 | let : Module.Free R C := Module.Free.of_basis c |
| 86 | let : Module.Finite R C := Module.Finite.of_basis c |
| 87 | have ht' : Function.Injective ((g.baseChange S).comp (t.baseChange S)) := by |
| 88 | rwa [← LinearMap.baseChange_comp] |
| 89 | have he := ShortComplexDeterminant.native_euler_eq S (complex R S f g h) |
| 90 | hf (t.baseChange S) ht' |
| 91 | ((Algebra.TensorProduct.basis S a).prod (Algebra.TensorProduct.basis S c)) |
| 92 | (Algebra.TensorProduct.basis S b) (Algebra.TensorProduct.basis S c) |
| 93 | change ((Module.length S ((S ⊗[R] C) ⧸ (g.baseChange S).range)).toNat : ℚ) - |
| 94 | ((Module.length S (complex R S f g h).homology).toNat : ℚ) = |
| 95 | ((Ring.ord S ((g.baseChange S).comp (t.baseChange S)).det).toNat : ℚ) - |
| 96 | ((Ring.ord S (LinearMap.toMatrix |
| 97 | ((Algebra.TensorProduct.basis S a).prod (Algebra.TensorProduct.basis S c)) |
| 98 | (Algebra.TensorProduct.basis S b) |
| 99 | ((f.baseChange S).coprod (t.baseChange S))).det).toNat : ℚ) at he |
| 100 | rw [← LinearMap.baseChange_comp, LinearMap.det_baseChange, coprod_matrix R S, |
| 101 | det_map R S] at he |
| 102 | exact he |
| 103 | |
| 104 | end |
| 105 | |
| 106 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.ComplexDeterminantBaseChange |