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.DiscreteValuationRing.Basic |
| 2 | import Mathlib.RingTheory.Localization.FractionRing |
| 3 | import Mathlib.RingTheory.HopfAlgebra.Quotient |
| 4 | import Mathlib.RingTheory.HopfAlgebra.TensorProduct |
| 5 | import Mathlib.RingTheory.Flat.TorsionFree |
| 6 | import Mathlib.RingTheory.Flat.Domain |
| 7 | import Mathlib.RingTheory.Localization.BaseChange |
| 8 | import Mathlib.LinearAlgebra.Dimension.Localization |
| 9 | import Mathlib.RingTheory.Ideal.Quotient.Operations |
| 10 | import Mathlib.Tactic |
| 11 | |
| 12 | /-! # Schematic Closure -/ |
| 13 | |
| 14 | namespace OAI.AlgebraicGeometry.GroupSchemes.SchematicClosure |
| 15 | |
| 16 | /-! |
| 17 | SchematicClosure: schematic closure, expressed by contraction of a generic Hopf ideal. |
| 18 | |
| 19 | The quotient by the contracted ideal embeds in the generic quotient, so it |
| 20 | is torsion-free and hence flat over the DVR. The embedding is a localization |
| 21 | map, which identifies the generic fiber and preserves rank. Its tensor square |
| 22 | is injective by flatness, allowing the generic coideal identity to descend. |
| 23 | All imports are proved mathlib results; the statement stub is not imported. |
| 24 | -/ |
| 25 | |
| 26 | open scoped TensorProduct nonZeroDivisors |
| 27 | |
| 28 | variable {R K A : Type*} |
| 29 | [CommRing R] [IsDomain R] [IsDiscreteValuationRing R] |
| 30 | [Field K] [Algebra R K] [IsFractionRing R K] |
| 31 | [CommRing A] [HopfAlgebra R A] |
| 32 | |
| 33 | abbrev genericInclusion : A →ₐ[R] (K ⊗[R] A) := |
| 34 | Algebra.TensorProduct.includeRight |
| 35 | |
| 36 | abbrev closureIdeal (I : Ideal (K ⊗[R] A)) : Ideal A := |
| 37 | Ideal.comap (genericInclusion (R := R) (K := K) (A := A)).toRingHom I |
| 38 | |
| 39 | abbrev closureEmbedding (I : Ideal (K ⊗[R] A)) : |
| 40 | (A ⧸ closureIdeal I) →ₐ[R] ((K ⊗[R] A) ⧸ I) := |
| 41 | Ideal.quotientMapₐ I genericInclusion le_rfl |
| 42 | |
| 43 | omit [IsDomain R] [IsDiscreteValuationRing R] [IsFractionRing R K] in |
| 44 | lemma closureEmbedding_injective (I : Ideal (K ⊗[R] A)) : |
| 45 | Function.Injective (closureEmbedding I) := |
| 46 | Ideal.quotientMap_injective |
| 47 | |
| 48 | lemma closure_flat (I : Ideal (K ⊗[R] A)) : |
| 49 | Module.Flat R (A ⧸ closureIdeal I) := by |
| 50 | have : Module.IsTorsionFree R K := |
| 51 | Module.isTorsionFree_iff_algebraMap_injective.mpr (IsFractionRing.injective R K) |
| 52 | have : Module.IsTorsionFree R ((K ⊗[R] A) ⧸ I) := |
| 53 | Module.IsTorsionFree.trans (R := K) (S := R) |
| 54 | have : Module.IsTorsionFree R (A ⧸ closureIdeal I) := |
| 55 | (closureEmbedding_injective I).moduleIsTorsionFree _ |
| 56 | (fun r x => (closureEmbedding I).toLinearMap.map_smul r x) |
| 57 | exact Module.Flat.flat_iff_torsion_eq_bot_of_isBezout.mpr |
| 58 | (Submodule.isTorsionFree_iff_torsion_eq_bot.mp inferInstance) |
| 59 | |
| 60 | omit [IsDomain R] [IsDiscreteValuationRing R] in |
| 61 | lemma closure_localized (I : Ideal (K ⊗[R] A)) : |
| 62 | IsLocalizedModule R⁰ (closureEmbedding I).toLinearMap where |
| 63 | map_units := (isLocalizedModule_id R⁰ ((K ⊗[R] A) ⧸ I) K).map_units |
| 64 | surj y := by |
| 65 | obtain ⟨x, rfl⟩ := Ideal.Quotient.mk_surjective y |
| 66 | obtain ⟨⟨a, s⟩, h⟩ := |
| 67 | IsLocalizedModule.surj R⁰ (TensorProduct.mk R K A 1) x |
| 68 | change s.val • x = 1 ⊗ₜ[R] a at h |
| 69 | refine ⟨(Ideal.Quotient.mk (closureIdeal I) a, s), ?_⟩ |
| 70 | change s • Ideal.Quotient.mk I x = Ideal.Quotient.mk I (1 ⊗ₜ[R] a) |
| 71 | exact (map_smul (Ideal.Quotient.mkₐ R I) s.val x).symm.trans |
| 72 | (congrArg (Ideal.Quotient.mk I) h) |
| 73 | exists_of_eq h := ⟨1, by simpa using closureEmbedding_injective I h⟩ |
| 74 | |
| 75 | omit [IsDomain R] [IsDiscreteValuationRing R] in |
| 76 | lemma closure_generic_fiber (I : Ideal (K ⊗[R] A)) : |
| 77 | Ideal.map genericInclusion.toRingHom (closureIdeal I) = I := by |
| 78 | apply le_antisymm (Ideal.map_le_iff_le_comap.mpr le_rfl) |
| 79 | intro x hx |
| 80 | obtain ⟨⟨a, s⟩, h⟩ := |
| 81 | IsLocalizedModule.surj R⁰ (TensorProduct.mk R K A 1) x |
| 82 | change s.val • x = 1 ⊗ₜ[R] a at h |
| 83 | have ha : a ∈ closureIdeal I := by |
| 84 | change 1 ⊗ₜ[R] a ∈ I |
| 85 | rw [← h] |
| 86 | exact (I.restrictScalars R).smul_mem s.val hx |
| 87 | have hmem : (algebraMap R K s.val) • x ∈ |
| 88 | Ideal.map genericInclusion.toRingHom (closureIdeal I) := by |
| 89 | rw [algebraMap_smul] |
| 90 | rw [h] |
| 91 | exact Ideal.mem_map_of_mem _ ha |
| 92 | exact (Submodule.smul_mem_iff_of_isUnit |
| 93 | ((Ideal.map genericInclusion.toRingHom (closureIdeal I)).restrictScalars K) |
| 94 | (IsLocalization.map_units K s)).mp hmem |
| 95 | |
| 96 | omit [IsDomain R] [IsDiscreteValuationRing R] in |
| 97 | lemma closure_rank (I : Ideal (K ⊗[R] A)) : |
| 98 | Module.finrank R (A ⧸ closureIdeal I) = |
| 99 | Module.finrank K ((K ⊗[R] A) ⧸ I) := by |
| 100 | have := closure_localized I |
| 101 | rw [IsFractionRing.finrank_right_eq R K ((K ⊗[R] A) ⧸ I)] |
| 102 | exact (IsLocalizedModule.finrank_eq R⁰ (closureEmbedding I).toLinearMap le_rfl).symm |
| 103 | |
| 104 | abbrev tensorToGeneric : |
| 105 | (A ⊗[R] A) →ₗ[R] ((K ⊗[R] A) ⊗[K] (K ⊗[R] A)) := |
| 106 | (TensorProduct.mapOfCompatibleSMul K R R _ _).comp |
| 107 | (TensorProduct.map genericInclusion.toLinearMap genericInclusion.toLinearMap) |
| 108 | |
| 109 | omit [IsDomain R] [IsDiscreteValuationRing R] [IsFractionRing R K] in |
| 110 | lemma comul_genericInclusion (a : A) : |
| 111 | Coalgebra.comul (R := K) (genericInclusion a) = |
| 112 | tensorToGeneric (R := R) (K := K) (Coalgebra.comul (R := R) a) := by |
| 113 | change Coalgebra.comul (R := K) (1 ⊗ₜ[R] a) = _ |
| 114 | rw [TensorProduct.comul_tmul, Bialgebra.comul_one] |
| 115 | generalize Coalgebra.comul (R := R) a = z |
| 116 | induction z using TensorProduct.inductionOn with |
| 117 | | tmul x y => simp [tensorToGeneric, genericInclusion, Algebra.TensorProduct.one_def] |
| 118 | | add x y hx hy => simp [TensorProduct.tmul_add, hx, hy] |
| 119 | |
| 120 | omit [IsDomain R] [IsDiscreteValuationRing R] [IsFractionRing R K] in |
| 121 | lemma antipode_genericInclusion (a : A) : |
| 122 | HopfAlgebra.antipode K (genericInclusion a) = |
| 123 | genericInclusion (R := R) (K := K) (HopfAlgebra.antipode R a) := by |
| 124 | simp [genericInclusion, Algebra.TensorProduct.includeRight_apply, |
| 125 | TensorProduct.antipode_def] |
| 126 | |
| 127 | omit [IsDomain R] [IsDiscreteValuationRing R] [IsFractionRing R K] in |
| 128 | lemma counit_genericInclusion (a : A) : |
| 129 | Coalgebra.counit (R := K) (genericInclusion (R := R) (K := K) a) = |
| 130 | algebraMap R K (Coalgebra.counit (R := R) a) := by |
| 131 | simp [genericInclusion, Algebra.TensorProduct.includeRight_apply, |
| 132 | Algebra.smul_def] |
| 133 | |
| 134 | noncomputable def closureTensorEmbedding (I : Ideal (K ⊗[R] A)) : |
| 135 | ((A ⧸ closureIdeal I) ⊗[R] (A ⧸ closureIdeal I)) →ₗ[R] |
| 136 | (((K ⊗[R] A) ⧸ I) ⊗[K] ((K ⊗[R] A) ⧸ I)) := |
| 137 | ((IsLocalization.moduleTensorEquiv R⁰ K |
| 138 | ((K ⊗[R] A) ⧸ I) ((K ⊗[R] A) ⧸ I)).symm.toLinearMap.restrictScalars R).comp |
| 139 | (TensorProduct.map (closureEmbedding I).toLinearMap (closureEmbedding I).toLinearMap) |
| 140 | |
| 141 | lemma closureTensorEmbedding_injective (I : Ideal (K ⊗[R] A)) : |
| 142 | Function.Injective (closureTensorEmbedding I) := by |
| 143 | have := closure_flat I |
| 144 | exact (IsLocalization.moduleTensorEquiv R⁰ K |
| 145 | ((K ⊗[R] A) ⧸ I) ((K ⊗[R] A) ⧸ I)).symm.injective.comp |
| 146 | (TensorProduct.map_injective_of_flat_flat_of_isDomain |
| 147 | (closureEmbedding I).toLinearMap (closureEmbedding I).toLinearMap |
| 148 | (closureEmbedding_injective I) (closureEmbedding_injective I)) |
| 149 | |
| 150 | omit [IsDomain R] [IsDiscreteValuationRing R] in |
| 151 | lemma closureTensorEmbedding_comul (I : Ideal (K ⊗[R] A)) (a : A) : |
| 152 | closureTensorEmbedding I |
| 153 | (TensorProduct.map (closureIdeal I |>.restrictScalars R).mkQ |
| 154 | (closureIdeal I |>.restrictScalars R).mkQ (Coalgebra.comul a)) = |
| 155 | TensorProduct.map (I.restrictScalars K).mkQ (I.restrictScalars K).mkQ |
| 156 | (Coalgebra.comul (R := K) (genericInclusion a)) := by |
| 157 | rw [comul_genericInclusion] |
| 158 | have h : (closureTensorEmbedding I).comp |
| 159 | (TensorProduct.map (closureIdeal I |>.restrictScalars R).mkQ |
| 160 | (closureIdeal I |>.restrictScalars R).mkQ) = |
| 161 | ((TensorProduct.map (I.restrictScalars K).mkQ |
| 162 | (I.restrictScalars K).mkQ).restrictScalars R).comp tensorToGeneric := by |
| 163 | ext x y |
| 164 | rfl |
| 165 | exact LinearMap.congr_fun h (Coalgebra.comul a) |
| 166 | |
| 167 | lemma closure_hopfIdeal (I : Ideal (K ⊗[R] A)) [Ideal.IsHopfIdeal K I] : |
| 168 | Ideal.IsHopfIdeal R (closureIdeal I) where |
| 169 | counit_eq_zero {a} ha := by |
| 170 | apply IsFractionRing.injective R K |
| 171 | rw [map_zero, ← counit_genericInclusion] |
| 172 | exact Submodule.IsCoideal.counit_eq_zero (I := I.restrictScalars K) ha |
| 173 | map_mkQ_comul_eq_zero {a} ha := by |
| 174 | apply closureTensorEmbedding_injective I |
| 175 | exact (closureTensorEmbedding_comul I a).trans |
| 176 | ((Submodule.IsCoideal.map_mkQ_comul_eq_zero |
| 177 | (I := I.restrictScalars K) ha).trans (map_zero (closureTensorEmbedding I)).symm) |
| 178 | antipode_mem {a} ha := by |
| 179 | change genericInclusion (HopfAlgebra.antipode R a) ∈ I |
| 180 | rw [← antipode_genericInclusion] |
| 181 | exact Ideal.IsHopfIdeal.antipode_mem (R := K) ha |
| 182 | |
| 183 | /-- The closure of a closed generic subgroup is a finite flat subgroup, |
| 184 | with the same generic fiber and scheme-theoretic order. -/ |
| 185 | theorem finite_flat_closure_of_generic_subgroup |
| 186 | [Module.Finite R A] [Module.Flat R A] |
| 187 | (I : Ideal (K ⊗[R] A)) |
| 188 | [Ideal.IsHopfIdeal K I] : |
| 189 | let ι : A →+* (K ⊗[R] A) := |
| 190 | (Algebra.TensorProduct.includeRight : |
| 191 | A →ₐ[R] (K ⊗[R] A)).toRingHom |
| 192 | let J : Ideal A := Ideal.comap ι I |
| 193 | Ideal.IsHopfIdeal R J ∧ |
| 194 | Module.Finite R (A ⧸ J) ∧ |
| 195 | Module.Flat R (A ⧸ J) ∧ |
| 196 | Ideal.map ι J = I ∧ |
| 197 | Module.finrank R (A ⧸ J) = |
| 198 | Module.finrank K ((K ⊗[R] A) ⧸ I) := by |
| 199 | exact ⟨closure_hopfIdeal I, inferInstance, closure_flat I, |
| 200 | closure_generic_fiber I, closure_rank I⟩ |
| 201 | |
| 202 | end OAI.AlgebraicGeometry.GroupSchemes.SchematicClosure |