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.GeometricComparison.Finite.AffineCover |
| 2 | import OAI.NumberTheory.PadicHodge.GeometricComparison.Smooth.IntegralFirstThreeSections |
| 3 | import OAI.NumberTheory.PadicHodge.IntegralComparison.Smooth.EtaleCoordinates |
| 4 | import OAI.NumberTheory.PadicHodge.IntegralComparison.AffineOpen.EtaleCoordinates |
| 5 | |
| 6 | /-! # Etale Affine Cover -/ |
| 7 | |
| 8 | namespace OAI |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | namespace NumberTheory.PadicHodge.GeometricComparison.Integral.EtaleAffineCover.IntegralEtaleAffineCover |
| 13 | |
| 14 | /-! A finite affine cover with actual étale polynomial coordinates over |
| 15 | an arbitrary commutative base, including the integral p-adic base. -/ |
| 16 | |
| 17 | open _root_.CategoryTheory _root_.AlgebraicGeometry Opposite |
| 18 | |
| 19 | variable (R : Type) [CommRing R] (X : Over (Spec (CommRingCat.of R))) |
| 20 | [IsProper X.hom] [Smooth X.hom] |
| 21 | |
| 22 | abbrev BaseIndex := (Finite.AffineCover.FiniteAffineCover.finiteAlgebraicAffineCover R X).I₀ |
| 23 | |
| 24 | def baseOpen (i : BaseIndex R X) : X.left.Opens := Finite.AffineCover.FiniteAffineCover.finiteAlgebraicAffineOpens R X i |
| 25 | |
| 26 | def baseRing (i : BaseIndex R X) : CommRingCat := |
| 27 | CommRingCat.of ((AlgebraicGeometry.Crystalline.Cohomology.AlgebraicForms.AlgebraicDeRham.sectionAlgebras R X).obj (op (baseOpen R X i))) |
| 28 | |
| 29 | instance baseRingAlgebra (i : BaseIndex R X) : Algebra R (baseRing R X i) := |
| 30 | inferInstanceAs (Algebra R ((AlgebraicGeometry.Crystalline.Cohomology.AlgebraicForms.AlgebraicDeRham.sectionAlgebras R X).obj (op (baseOpen R X i)))) |
| 31 | |
| 32 | def baseChart (i : BaseIndex R X) : Spec (CommRingCat.of (baseRing R X i)) ⟶ X.left := |
| 33 | (Finite.AffineCover.FiniteAffineCover.finiteAlgebraicAffineOpens_affine R X i).fromSpec |
| 34 | |
| 35 | instance baseChart_open (i : BaseIndex R X) : IsOpenImmersion (baseChart R X i) := |
| 36 | IsAffineOpen.isOpenImmersion_fromSpec (Finite.AffineCover.FiniteAffineCover.finiteAlgebraicAffineOpens_affine R X i) |
| 37 | |
| 38 | omit [Smooth X.hom] in |
| 39 | theorem baseChart_over (i : BaseIndex R X) : baseChart R X i ≫ X.hom = |
| 40 | Spec.map (CommRingCat.ofHom (algebraMap R (baseRing R X i))) := |
| 41 | IntegralComparison.AffineOpen.SectionBase.overBase R X (baseOpen R X i) |
| 42 | (Finite.AffineCover.FiniteAffineCover.finiteAlgebraicAffineOpens_affine R X i) |
| 43 | |
| 44 | omit [Smooth X.hom] in |
| 45 | theorem baseCharts_cover : (⨆ i, (baseChart R X i).opensRange) = ⊤ := by |
| 46 | change (⨆ i, (Finite.AffineCover.FiniteAffineCover.finiteAlgebraicAffineOpens_affine R X i).fromSpec.opensRange) = ⊤ |
| 47 | simp only [IsAffineOpen.opensRange_fromSpec] |
| 48 | exact Finite.AffineCover.FiniteAffineCover.finiteAlgebraicAffineOpens_cover R X |
| 49 | |
| 50 | instance baseRing_smooth (i : BaseIndex R X) : Algebra.Smooth R (baseRing R X i) := |
| 51 | GeometricComparison.Smooth.IntegralFirstThreeSections.SmoothIntegralFirstThreeSections.algebra_smooth R X (baseOpen R X i) |
| 52 | (Finite.AffineCover.FiniteAffineCover.finiteAlgebraicAffineOpens_affine R X i) |
| 53 | |
| 54 | def localizers (i : BaseIndex R X) : |
| 55 | Finset (baseRing R X i) := |
| 56 | (IntegralComparison.Smooth.EtaleCoordinates.exists_finite_cover R (baseRing R X i)).choose |
| 57 | |
| 58 | theorem localizers_coordinates (i : BaseIndex R X) |
| 59 | (r : baseRing R X i) (hr : r ∈ localizers R X i) : |
| 60 | IntegralComparison.Smooth.EtaleCoordinates.HasCoordinates R (baseRing R X i) r := |
| 61 | (IntegralComparison.Smooth.EtaleCoordinates.exists_finite_cover R (baseRing R X i)).choose_spec.1 r hr |
| 62 | |
| 63 | theorem localizers_span (i : BaseIndex R X) : |
| 64 | Ideal.span (Set.range (fun r : localizers R X i => r.val)) = ⊤ := by |
| 65 | have he : Set.range (fun r : localizers R X i => r.val) = (localizers R X i : Set _) := by |
| 66 | ext a |
| 67 | exact ⟨fun ⟨b, hb⟩ => hb ▸ b.property, fun ha => ⟨⟨a, ha⟩, rfl⟩⟩ |
| 68 | rw [he] |
| 69 | exact (IntegralComparison.Smooth.EtaleCoordinates.exists_finite_cover R (baseRing R X i)).choose_spec.2 |
| 70 | |
| 71 | abbrev Index := Σ i : BaseIndex R X, localizers R X i |
| 72 | |
| 73 | instance index_fintype : Fintype (Index R X) := inferInstanceAs (Fintype (Σ i, localizers R X i)) |
| 74 | |
| 75 | def coordinateRing (a : Index R X) : CommRingCat := CommRingCat.of (Localization.Away a.2.val) |
| 76 | |
| 77 | instance coordinateAlgebra (a : Index R X) : Algebra R (coordinateRing R X a) := |
| 78 | inferInstanceAs (Algebra R (Localization.Away a.2.val)) |
| 79 | |
| 80 | def localizationMap (a : Index R X) : |
| 81 | baseRing R X a.1 ⟶ coordinateRing R X a := |
| 82 | ConcreteCategory.ofHom (C := CommRingCat) |
| 83 | (X := baseRing R X a.1) (Y := coordinateRing R X a) |
| 84 | (algebraMap (baseRing R X a.1) (Localization.Away a.2.val)) |
| 85 | |
| 86 | def chartMap (a : Index R X) : Spec (coordinateRing R X a) ⟶ X.left := |
| 87 | Spec.map (localizationMap R X a) ≫ baseChart R X a.1 |
| 88 | |
| 89 | instance chartMap_open (a : Index R X) : IsOpenImmersion (chartMap R X a) := by |
| 90 | let : IsOpenImmersion (Spec.map (localizationMap R X a)) := |
| 91 | inferInstanceAs (IsOpenImmersion (Spec.map (CommRingCat.ofHom |
| 92 | (algebraMap (baseRing R X a.1) (Localization.Away a.2.val))))) |
| 93 | unfold chartMap |
| 94 | infer_instance |
| 95 | |
| 96 | theorem chartMap_over (a : Index R X) : chartMap R X a ≫ X.hom = |
| 97 | Spec.map (CommRingCat.ofHom (algebraMap R (coordinateRing R X a))) := by |
| 98 | let b : CommRingCat.of R ⟶ baseRing R X a.1 := |
| 99 | ConcreteCategory.ofHom (C := CommRingCat) (X := CommRingCat.of R) |
| 100 | (Y := baseRing R X a.1) |
| 101 | (algebraMap R (baseRing R X a.1)) |
| 102 | have hbase : baseChart R X a.1 ≫ X.hom = Spec.map b := |
| 103 | baseChart_over R X a.1 |
| 104 | have hb : b ≫ localizationMap R X a = CommRingCat.ofHom (algebraMap R (coordinateRing R X a)) := by |
| 105 | apply CommRingCat.hom_ext |
| 106 | exact (IsScalarTower.algebraMap_eq R (baseRing R X a.1) |
| 107 | (Localization.Away a.2.val)).symm |
| 108 | exact (Category.assoc _ _ _).trans |
| 109 | ((congrArg (fun t => Spec.map (localizationMap R X a) ≫ t) |
| 110 | hbase).trans |
| 111 | ((Spec.map_comp b (localizationMap R X a)).symm.trans (congrArg Spec.map hb))) |
| 112 | |
| 113 | theorem covers (z : X.left) : ∃ a : Index R X, z ∈ Set.range (chartMap R X a) := by |
| 114 | have hz : z ∈ (⨆ i, (baseChart R X i).opensRange : X.left.Opens) := by |
| 115 | rw [baseCharts_cover R X] |
| 116 | trivial |
| 117 | obtain ⟨i, y, rfl⟩ := TopologicalSpace.Opens.mem_iSup.mp hz |
| 118 | let V := Scheme.affineOpenCoverOfSpanRangeEqTop (fun r : localizers R X i => r.val) (localizers_span R X i) |
| 119 | obtain ⟨r, t, ht⟩ := V.openCover.exists_eq y |
| 120 | refine ⟨⟨i, r⟩, t, ?_⟩ |
| 121 | change (baseChart R X i) ((V.f r) t) = (baseChart R X i) y |
| 122 | exact congrArg (baseChart R X i) ht |
| 123 | |
| 124 | def affineCover : X.left.AffineOpenCover where |
| 125 | I₀ := Index R X |
| 126 | X := coordinateRing R X |
| 127 | f := chartMap R X |
| 128 | idx z := (IntegralEtaleAffineCover.covers R X z).choose |
| 129 | covers z := (IntegralEtaleAffineCover.covers R X z).choose_spec |
| 130 | |
| 131 | instance affineCover_fintype : Fintype (affineCover R X).I₀ := index_fintype R X |
| 132 | |
| 133 | def coordinateIndex (a : Index R X) : Type := |
| 134 | (localizers_coordinates R X a.1 a.2.val a.2.property).choose |
| 135 | |
| 136 | instance coordinateIndex_fintype (a : Index R X) : Fintype (coordinateIndex R X a) := |
| 137 | (localizers_coordinates R X a.1 a.2.val a.2.property).choose_spec.choose |
| 138 | |
| 139 | instance polynomialAlgebra (a : Index R X) : |
| 140 | Algebra (MvPolynomial (coordinateIndex R X a) R) (coordinateRing R X a) := |
| 141 | (localizers_coordinates R X a.1 a.2.val a.2.property).choose_spec.choose_spec.choose |
| 142 | |
| 143 | instance coordinateTower (a : Index R X) : |
| 144 | IsScalarTower R (MvPolynomial (coordinateIndex R X a) R) (coordinateRing R X a) := |
| 145 | (localizers_coordinates R X a.1 a.2.val a.2.property).choose_spec.choose_spec.choose_spec.1 |
| 146 | |
| 147 | instance coordinateEtale (a : Index R X) : |
| 148 | Algebra.Etale (MvPolynomial (coordinateIndex R X a) R) (coordinateRing R X a) := |
| 149 | (localizers_coordinates R X a.1 a.2.val a.2.property).choose_spec.choose_spec.choose_spec.2 |
| 150 | |
| 151 | end NumberTheory.PadicHodge.GeometricComparison.Integral.EtaleAffineCover.IntegralEtaleAffineCover |
| 152 | |
| 153 | namespace NumberTheory.PadicHodge.GeometricComparison.Integral.EtaleAffineCover.IntegralEtaleAffineCoverSections |
| 154 | |
| 155 | /-! Actual section rings on the finite integral coordinate cover inherit |
| 156 | its étale polynomial coordinates and the original base algebra. -/ |
| 157 | |
| 158 | open _root_.CategoryTheory _root_.AlgebraicGeometry Opposite |
| 159 | |
| 160 | variable (R : Type) [CommRing R] (X : Over (Spec (CommRingCat.of R))) |
| 161 | [IsProper X.hom] [Smooth X.hom] |
| 162 | |
| 163 | local notation "I" => OAI.NumberTheory.PadicHodge.GeometricComparison.Integral.EtaleAffineCover.IntegralEtaleAffineCover.Index R X |
| 164 | |
| 165 | def opens (i : I) : X.left.Opens := (IntegralEtaleAffineCover.chartMap R X i).opensRange |
| 166 | |
| 167 | theorem cover : ⨆ i, opens R X i = ⊤ := by |
| 168 | apply top_unique |
| 169 | intro x _ |
| 170 | obtain ⟨i, y, rfl⟩ := IntegralEtaleAffineCover.covers R X x |
| 171 | exact TopologicalSpace.Opens.mem_iSup.mpr ⟨i, y, rfl⟩ |
| 172 | |
| 173 | theorem affine (i : I) : IsAffineOpen (opens R X i) := |
| 174 | isAffineOpen_opensRange (IntegralEtaleAffineCover.chartMap R X i) |
| 175 | |
| 176 | def ring (i : I) : CommAlgCat R := (AlgebraicGeometry.Crystalline.Cohomology.AlgebraicForms.AlgebraicDeRham.sectionAlgebras R X).obj (op (opens R X i)) |
| 177 | |
| 178 | def chart (i : I) : Spec (CommRingCat.of (ring R X i)) ⟶ X.left := (affine R X i).fromSpec |
| 179 | |
| 180 | instance chart_open (i : I) : IsOpenImmersion (chart R X i) := |
| 181 | IsAffineOpen.isOpenImmersion_fromSpec (affine R X i) |
| 182 | |
| 183 | theorem chart_over (i : I) : chart R X i ≫ X.hom = |
| 184 | Spec.map (CommRingCat.ofHom (algebraMap R (ring R X i))) := |
| 185 | IntegralComparison.AffineOpen.SectionBase.overBase R X (opens R X i) (affine R X i) |
| 186 | |
| 187 | @[instance_reducible] |
| 188 | def polynomialAlgebra (i : I) : |
| 189 | Algebra (MvPolynomial (IntegralEtaleAffineCover.coordinateIndex R X i) R) (ring R X i) := |
| 190 | @IntegralComparison.AffineOpen.EtaleCoordinates.polynomialAlgebra R inferInstance X (opens R X i) (affine R X i) |
| 191 | (IntegralEtaleAffineCover.coordinateRing R X i) inferInstance |
| 192 | (IntegralEtaleAffineCover.chartMap R X i) (IntegralEtaleAffineCover.chartMap_open R X i) le_rfl |
| 193 | (IntegralEtaleAffineCover.coordinateIndex R X i) (IntegralEtaleAffineCover.polynomialAlgebra R X i) |
| 194 | |
| 195 | theorem etale (i : I) : letI := polynomialAlgebra R X i |
| 196 | Algebra.Etale (MvPolynomial (IntegralEtaleAffineCover.coordinateIndex R X i) R) (ring R X i) := |
| 197 | @IntegralComparison.AffineOpen.EtaleCoordinates.etale R inferInstance X (opens R X i) (affine R X i) |
| 198 | (IntegralEtaleAffineCover.coordinateRing R X i) inferInstance |
| 199 | (IntegralEtaleAffineCover.chartMap R X i) (IntegralEtaleAffineCover.chartMap_open R X i) le_rfl |
| 200 | (IntegralEtaleAffineCover.coordinateIndex R X i) (IntegralEtaleAffineCover.polynomialAlgebra R X i) |
| 201 | (IntegralEtaleAffineCover.coordinateEtale R X i) |
| 202 | |
| 203 | theorem tower (i : I) : letI := polynomialAlgebra R X i |
| 204 | IsScalarTower R (MvPolynomial (IntegralEtaleAffineCover.coordinateIndex R X i) R) (ring R X i) := |
| 205 | @IntegralComparison.AffineOpen.EtaleCoordinates.tower R inferInstance X (opens R X i) (affine R X i) |
| 206 | (IntegralEtaleAffineCover.coordinateRing R X i) inferInstance |
| 207 | (IntegralEtaleAffineCover.chartMap R X i) (IntegralEtaleAffineCover.chartMap_open R X i) le_rfl |
| 208 | (IntegralEtaleAffineCover.coordinateIndex R X i) (IntegralEtaleAffineCover.polynomialAlgebra R X i) |
| 209 | (IntegralEtaleAffineCover.coordinateAlgebra R X i) (IntegralEtaleAffineCover.coordinateTower R X i) |
| 210 | (IntegralEtaleAffineCover.chartMap_over R X i) |
| 211 | |
| 212 | end NumberTheory.PadicHodge.GeometricComparison.Integral.EtaleAffineCover.IntegralEtaleAffineCoverSections |
| 213 | |
| 214 | end |
| 215 | |
| 216 | end OAI |