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.Relative.NormalizationCharts |
| 2 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Normalization.Localization |
| 3 | import OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.LocalizationDivisor |
| 4 | |
| 5 | /-! # Normalization Stalks -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Relative.NormalizationStalks |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! Localizing relative normalization at a base point gives the integral |
| 12 | closure of its actual stalk in the extension field, with the entire fiber |
| 13 | and all local rings preserved. -/ |
| 14 | |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 18 | |
| 19 | open OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Relative.Normalization OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Relative.NormalizationCharts |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | variable (Y : Scheme.{u}) [IsIntegral Y] (L : Type u) [Field L] [Algebra Y.functionField L] |
| 24 | |
| 25 | abbrev sectionAlgebra (U : Y.Opens) [Nonempty U] : Algebra Γ(Y, U) L := |
| 26 | ((algebraMap Y.functionField L).comp (algebraMap Γ(Y, U) Y.functionField)).toAlgebra |
| 27 | |
| 28 | abbrev stalkAlgebra (y : Y) : Algebra (Y.presheaf.stalk y) L := |
| 29 | ((algebraMap Y.functionField L).comp (algebraMap (Y.presheaf.stalk y) Y.functionField)).toAlgebra |
| 30 | |
| 31 | attribute [local instance] sectionAlgebra stalkAlgebra |
| 32 | |
| 33 | instance sectionFieldTower (U : Y.Opens) [Nonempty U] : |
| 34 | IsScalarTower Γ(Y, U) Y.functionField L := IsScalarTower.of_algebraMap_eq' rfl |
| 35 | |
| 36 | instance stalkFieldTower (y : Y) : IsScalarTower (Y.presheaf.stalk y) Y.functionField L := |
| 37 | IsScalarTower.of_algebraMap_eq' rfl |
| 38 | |
| 39 | theorem sectionStalkTower (U : Y.Opens) [Nonempty U] (y : U) : |
| 40 | letI := TopCat.Presheaf.algebra_section_stalk Y.presheaf y |
| 41 | IsScalarTower Γ(Y, U) (Y.presheaf.stalk y) L := by |
| 42 | let := TopCat.Presheaf.algebra_section_stalk Y.presheaf y |
| 43 | apply IsScalarTower.of_algebraMap_eq |
| 44 | intro a |
| 45 | exact congrArg (algebraMap Y.functionField L) |
| 46 | (Scheme.algebraMap_germ_eq_germToFunctionField Y y.property a).symm |
| 47 | |
| 48 | variable (U : Y.Opens) (hU : IsAffineOpen U) [Nonempty U] (y : U) |
| 49 | |
| 50 | local instance : Algebra Γ(Y, U) (Y.presheaf.stalk y) := |
| 51 | TopCat.Presheaf.algebra_section_stalk Y.presheaf y |
| 52 | |
| 53 | local instance : IsScalarTower Γ(Y, U) (Y.presheaf.stalk y) L := sectionStalkTower Y L U y |
| 54 | |
| 55 | def stalkInclusion : integralClosure Γ(Y, U) L →ₐ[Γ(Y, U)] |
| 56 | integralClosure (Y.presheaf.stalk y) L := by |
| 57 | let := TopCat.Presheaf.algebra_section_stalk Y.presheaf y |
| 58 | let := sectionStalkTower Y L U y |
| 59 | exact Normalization.Localization.closureInclusion Γ(Y, U) (Y.presheaf.stalk y) L |
| 60 | |
| 61 | theorem stalk_isLocalization : |
| 62 | letI := (stalkInclusion Y L U y).toRingHom.toAlgebra |
| 63 | IsLocalization |
| 64 | (Algebra.algebraMapSubmonoid (integralClosure Γ(Y, U) L) |
| 65 | (hU.primeIdealOf y).asIdeal.primeCompl) |
| 66 | (integralClosure (Y.presheaf.stalk y) L) := by |
| 67 | let := TopCat.Presheaf.algebra_section_stalk Y.presheaf y |
| 68 | let := sectionStalkTower Y L U y |
| 69 | let := hU.isLocalization_stalk y |
| 70 | exact Normalization.Localization.closure_isLocalization Γ(Y, U) (Y.presheaf.stalk y) L |
| 71 | (hU.primeIdealOf y).asIdeal.primeCompl |
| 72 | |
| 73 | def stalkMap : Spec (.of (integralClosure (Y.presheaf.stalk y) L)) ⟶ Normalization.relativeNormalization Y L := |
| 74 | Spec.map (CommRingCat.ofHom (stalkInclusion Y L U y).toRingHom) ≫ NormalizationCharts.chartMap Y L U hU |
| 75 | |
| 76 | theorem stalkMap_comp : NormalizationStalks.stalkMap Y L U hU y ≫ Normalization.relativeNormalizationMap Y L = |
| 77 | Spec.map (CommRingCat.ofHom |
| 78 | (algebraMap (Y.presheaf.stalk y) (integralClosure (Y.presheaf.stalk y) L))) ≫ |
| 79 | Y.fromSpecStalk y := by |
| 80 | rw [NormalizationStalks.stalkMap, Category.assoc, NormalizationCharts.chartMap_comp, |
| 81 | ← hU.fromSpecStalk_eq_fromSpecStalk y.property, IsAffineOpen.fromSpecStalk, |
| 82 | ← Category.assoc, ← Category.assoc, ← Spec.map_comp, ← Spec.map_comp] |
| 83 | congr 2 |
| 84 | ext a |
| 85 | exact congrArg (algebraMap Y.functionField L) |
| 86 | (Scheme.algebraMap_germ_eq_germToFunctionField Y y.property a).symm |
| 87 | |
| 88 | theorem stalkMap_stalkMap_isIso (z : Spec (.of (integralClosure (Y.presheaf.stalk y) L))) : |
| 89 | IsIso ((NormalizationStalks.stalkMap Y L U hU y).stalkMap z) := by |
| 90 | let B := integralClosure Γ(Y, U) L |
| 91 | let D := integralClosure (Y.presheaf.stalk y) L |
| 92 | let := (stalkInclusion Y L U y).toRingHom.toAlgebra |
| 93 | let M := Algebra.algebraMapSubmonoid B (hU.primeIdealOf y).asIdeal.primeCompl |
| 94 | let : IsLocalization M D := stalk_isLocalization Y L U hU y |
| 95 | let : IsIso ((Spec.map (CommRingCat.ofHom (algebraMap B D))).stalkMap z) := |
| 96 | LocalizationStalks.localization_stalkMap_isIso B D M z |
| 97 | change IsIso ((Spec.map (CommRingCat.ofHom (algebraMap B D)) ≫ NormalizationCharts.chartMap Y L U hU).stalkMap z) |
| 98 | rw [Scheme.Hom.stalkMap_comp] |
| 99 | infer_instance |
| 100 | |
| 101 | theorem stalkMap_residueDegree (z : Spec (.of (integralClosure (Y.presheaf.stalk y) L))) : |
| 102 | (NormalizationStalks.stalkMap Y L U hU y).residueDegree z = 1 := by |
| 103 | let := stalkMap_stalkMap_isIso Y L U hU y z |
| 104 | exact Stalk.ResidueDegree.residueDegree_of_isIso_stalkMap _ _ |
| 105 | |
| 106 | theorem stalkMap_coheight (z : Spec (.of (integralClosure (Y.presheaf.stalk y) L))) : |
| 107 | Order.coheight (NormalizationStalks.stalkMap Y L U hU y z) = Order.coheight z := by |
| 108 | let B := integralClosure Γ(Y, U) L |
| 109 | let D := integralClosure (Y.presheaf.stalk y) L |
| 110 | let := (stalkInclusion Y L U y).toRingHom.toAlgebra |
| 111 | let M := Algebra.algebraMapSubmonoid B (hU.primeIdealOf y).asIdeal.primeCompl |
| 112 | let : IsLocalization M D := stalk_isLocalization Y L U hU y |
| 113 | change Order.coheight (NormalizationCharts.chartMap Y L U hU |
| 114 | ((Spec.map (CommRingCat.ofHom (algebraMap B D))) z)) = _ |
| 115 | rw [coheight_eq_of_isOpenImmersion] |
| 116 | exact LocalizationStalks.localization_coheight B D M z |
| 117 | |
| 118 | theorem stalkMap_genericPoint : |
| 119 | NormalizationStalks.stalkMap Y L U hU y |
| 120 | (genericPoint (Spec (.of (integralClosure (Y.presheaf.stalk y) L)))) = |
| 121 | genericPoint (Normalization.relativeNormalization Y L) := by |
| 122 | let B := integralClosure Γ(Y, U) L |
| 123 | let D := integralClosure (Y.presheaf.stalk y) L |
| 124 | let := (stalkInclusion Y L U y).toRingHom.toAlgebra |
| 125 | let M := Algebra.algebraMapSubmonoid B (hU.primeIdealOf y).asIdeal.primeCompl |
| 126 | let : IsLocalization M D := stalk_isLocalization Y L U hU y |
| 127 | change NormalizationCharts.chartMap Y L U hU ((Spec.map (CommRingCat.ofHom (algebraMap B D))) |
| 128 | (genericPoint (Spec (.of D)))) = _ |
| 129 | rw [LocalizationDivisor.localization_genericPoint B D M, genericPoint_eq_of_isOpenImmersion] |
| 130 | |
| 131 | theorem stalkMap_injective : Function.Injective (NormalizationStalks.stalkMap Y L U hU y) := by |
| 132 | let B := integralClosure Γ(Y, U) L |
| 133 | let D := integralClosure (Y.presheaf.stalk y) L |
| 134 | let := (stalkInclusion Y L U y).toRingHom.toAlgebra |
| 135 | let M := Algebra.algebraMapSubmonoid B (hU.primeIdealOf y).asIdeal.primeCompl |
| 136 | let : IsLocalization M D := stalk_isLocalization Y L U hU y |
| 137 | exact (NormalizationCharts.chartMap Y L U hU).isOpenEmbedding.injective.comp |
| 138 | (PrimeSpectrum.localization_comap_injective D M) |
| 139 | |
| 140 | theorem stalkMap_covers_fiber (z : Normalization.relativeNormalization Y L) |
| 141 | (hz : Normalization.relativeNormalizationMap Y L z = y) : z ∈ Set.range (NormalizationStalks.stalkMap Y L U hU y) := by |
| 142 | let B := integralClosure Γ(Y, U) L |
| 143 | let D := integralClosure (Y.presheaf.stalk y) L |
| 144 | let := (stalkInclusion Y L U y).toRingHom.toAlgebra |
| 145 | let M := Algebra.algebraMapSubmonoid B (hU.primeIdealOf y).asIdeal.primeCompl |
| 146 | let : IsLocalization M D := stalk_isLocalization Y L U hU y |
| 147 | have hzU : z ∈ Normalization.relativeNormalizationMap Y L ⁻¹ᵁ U := by |
| 148 | change Normalization.relativeNormalizationMap Y L z ∈ U |
| 149 | rw [hz] |
| 150 | exact y.property |
| 151 | change z ∈ (Normalization.relativeNormalizationMap Y L ⁻¹ᵁ U : Set (Normalization.relativeNormalization Y L)) at hzU |
| 152 | rw [← NormalizationCharts.chartMap_range Y L U hU] at hzU |
| 153 | obtain ⟨q, hq⟩ := hzU |
| 154 | have hp : (Spec.map (CommRingCat.ofHom (algebraMap Γ(Y, U) B))) q = hU.primeIdealOf y := by |
| 155 | apply hU.fromSpec.isOpenEmbedding.injective |
| 156 | have hc := congrArg (fun i : Spec (.of B) ⟶ Y => i q) (NormalizationCharts.chartMap_comp Y L U hU) |
| 157 | change Normalization.relativeNormalizationMap Y L (NormalizationCharts.chartMap Y L U hU q) = |
| 158 | hU.fromSpec ((Spec.map (CommRingCat.ofHom (algebraMap Γ(Y, U) B))) q) at hc |
| 159 | rw [← hc, hq, hz, hU.fromSpec_primeIdealOf] |
| 160 | have hdisj : Disjoint (M : Set B) (q.asIdeal : Set B) := by |
| 161 | rw [Set.disjoint_left] |
| 162 | intro z hzM hzq |
| 163 | obtain ⟨a, ha, rfl⟩ := hzM |
| 164 | apply ha |
| 165 | have he := congrArg PrimeSpectrum.asIdeal hp |
| 166 | change Ideal.comap (algebraMap Γ(Y, U) B) q.asIdeal = (hU.primeIdealOf y).asIdeal at he |
| 167 | rw [← he] |
| 168 | exact hzq |
| 169 | have hqrange : q ∈ Set.range (PrimeSpectrum.comap (algebraMap B D)) := by |
| 170 | rw [PrimeSpectrum.localization_comap_range D M] |
| 171 | exact hdisj |
| 172 | obtain ⟨w, hw⟩ := hqrange |
| 173 | refine ⟨w, ?_⟩ |
| 174 | change NormalizationCharts.chartMap Y L U hU ((Spec.map (CommRingCat.ofHom (algebraMap B D))) w) = z |
| 175 | exact (congrArg (NormalizationCharts.chartMap Y L U hU) hw).trans hq |
| 176 | |
| 177 | end |
| 178 | |
| 179 | end OAI.AlgebraicGeometry.IntersectionTheory.ProjectionFormula.Relative.NormalizationStalks |