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 | /- |
| 2 | Copyright 2026 The Formal Conjectures Authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | This file has been modified. |
| 16 | -/ |
| 17 | import OAI.AlgebraicGeometry.Cycle.ComponentLocalGenerator |
| 18 | import OAI.AlgebraicGeometry.Cycle.ComponentDimension |
| 19 | import OAI.AlgebraicGeometry.Smooth.DimensionFormula |
| 20 | import OAI.AlgebraicGeometry.Smooth.PointwiseDimension |
| 21 | import OAI.Algebra.Foundations.PolynomialCatenaryT |
| 22 | import OAI.AlgebraicGeometry.Cycle.ComponentNormal |
| 23 | import OAI.AlgebraicGeometry.Smooth.CatenaryDimension |
| 24 | import Mathlib.RingTheory.IntegralClosure.GoingDown |
| 25 | import Mathlib.RingTheory.KrullDimension.Field |
| 26 | import Mathlib.RingTheory.KrullDimension.Polynomial |
| 27 | import Mathlib.RingTheory.NoetherNormalization |
| 28 | import Mathlib.RingTheory.Polynomial.RationalRoot |
| 29 | import Mathlib.RingTheory.Polynomial.UniqueFactorization |
| 30 | |
| 31 | /-! # Component Closed Point Dimension -/ |
| 32 | |
| 33 | namespace OAI.AlgebraicGeometry.Cycle.ComponentClosedPointDimension |
| 34 | |
| 35 | noncomputable section |
| 36 | |
| 37 | open _root_.Algebra |
| 38 | open _root_.AlgebraicGeometry |
| 39 | open _root_.RingHom |
| 40 | |
| 41 | /-! |
| 42 | # Dimensions at closed points of cycle components |
| 43 | |
| 44 | This file proves that every closed point of the reduced closure of a codimension-`p` point in a |
| 45 | smooth complex `d`-fold has coheight `d - p`. The commutative-algebra input is the |
| 46 | equidimensionality of a finite-type domain over a field: every maximal ideal has height equal to |
| 47 | the ring's Krull dimension. It is proved directly from Noether normalization, incomparability, |
| 48 | and going down. |
| 49 | |
| 50 | The closed-point formula removes the small-dimensional restriction from the separate component |
| 51 | and ambient coordinate package and from the resulting component-local fundamental-class |
| 52 | generator. The two coordinate systems remain independent of one another; a simultaneous normal |
| 53 | form for the closed immersion is a separate statement. |
| 54 | -/ |
| 55 | |
| 56 | open _root_.CategoryTheory _root_.Ideal _root_.MvPolynomial _root_.Topology _root_.TopologicalSpace |
| 57 | |
| 58 | namespace Algebra |
| 59 | |
| 60 | variable {k A : Type*} [Field k] [CommRing A] [IsDomain A] [Algebra k A] |
| 61 | [Algebra.FiniteType k A] |
| 62 | |
| 63 | include k |
| 64 | |
| 65 | /-- Every maximal ideal of a finite-type domain over a field has height equal to the Krull |
| 66 | dimension of the domain. -/ |
| 67 | lemma FiniteType.height_eq_ringKrullDim_of_isMaximal |
| 68 | (P : Ideal A) [P.IsMaximal] : |
| 69 | (↑P.height : WithBot ℕ∞) = ringKrullDim A := by |
| 70 | obtain ⟨n, g, hg, hfinite⟩ := exists_finite_inj_algHom_of_fg k A |
| 71 | let : Algebra (MvPolynomial (Fin n) k) A := g.toAlgebra |
| 72 | let : FaithfulSMul (MvPolynomial (Fin n) k) A := |
| 73 | (faithfulSMul_iff_algebraMap_injective _ _).mpr hg |
| 74 | let : Algebra.IsIntegral (MvPolynomial (Fin n) k) A := |
| 75 | ⟨hfinite.to_isIntegral⟩ |
| 76 | have hheight : P.height = (P.under (MvPolynomial (Fin n) k)).height := by |
| 77 | calc |
| 78 | P.height = Order.height (⟨P, inferInstance⟩ : PrimeSpectrum A) := |
| 79 | by |
| 80 | change (⟨P, inferInstance⟩ : PrimeSpectrum A).asIdeal.height = |
| 81 | Order.height (⟨P, inferInstance⟩ : PrimeSpectrum A) |
| 82 | exact PrimeSpectrum.height_eq_orderHeight _ |
| 83 | _ = Order.height (PrimeSpectrum.comap |
| 84 | (algebraMap (MvPolynomial (Fin n) k) A) |
| 85 | (⟨P, inferInstance⟩ : PrimeSpectrum A)) := by |
| 86 | apply Order.height_eq_of_strictMono |
| 87 | (PrimeSpectrum.comap (algebraMap (MvPolynomial (Fin n) k) A)) |
| 88 | (fun _ _ hQQ' ↦ Ideal.IsIntegral.under_lt_under hQQ') |
| 89 | intro Q q hq |
| 90 | have hq' : q.asIdeal < Q.asIdeal.under (MvPolynomial (Fin n) k) := by |
| 91 | change q.asIdeal < |
| 92 | (PrimeSpectrum.comap (algebraMap (MvPolynomial (Fin n) k) A) Q).asIdeal at hq |
| 93 | simpa only [PrimeSpectrum.comap_asIdeal] using hq |
| 94 | obtain ⟨Q', hQ'Q, hQ'prime, hQ'over⟩ := |
| 95 | Q.asIdeal.exists_ideal_lt_liesOver_of_lt |
| 96 | (R := MvPolynomial (Fin n) k) (p := q.asIdeal) |
| 97 | (q := Q.asIdeal.under (MvPolynomial (Fin n) k)) hq' |
| 98 | refine ⟨⟨Q', hQ'prime⟩, hQ'Q, ?_⟩ |
| 99 | apply PrimeSpectrum.ext |
| 100 | simpa [Ideal.under] using hQ'over.over.symm |
| 101 | _ = (P.under (MvPolynomial (Fin n) k)).height := by |
| 102 | rw [show P.under (MvPolynomial (Fin n) k) = |
| 103 | (PrimeSpectrum.comap (algebraMap (MvPolynomial (Fin n) k) A) |
| 104 | (⟨P, inferInstance⟩ : PrimeSpectrum A)).asIdeal from rfl] |
| 105 | exact (PrimeSpectrum.height_eq_orderHeight _).symm |
| 106 | rw [OAI.Algebra.Foundations.PolynomialCatenaryT.PolynomialCatenary.ringKrullDim_eq_of_isIntegral_of_injective hg, |
| 107 | MvPolynomial.ringKrullDim_of_isNoetherianRing, |
| 108 | ringKrullDim_eq_zero_of_field, ENat.card_eq_coe_fintype_card, Fintype.card_fin, hheight, |
| 109 | OAI.Algebra.RingTheory.SmoothKrullDimension.MvPolynomial.height_eq_fin_of_isMaximal k n (P.under (MvPolynomial (Fin n) k))] |
| 110 | norm_num |
| 111 | |
| 112 | end Algebra |
| 113 | |
| 114 | namespace RingHom |
| 115 | |
| 116 | /-- The quotient by a prime of height `p` in a standard-smooth complex algebra of relative |
| 117 | dimension `d` has Krull dimension `d - p`. -/ |
| 118 | lemma IsStandardSmoothOfRelativeDimension.ringKrullDim_quotient_eq_sub_complex |
| 119 | {A : Type} [CommRing A] {f : ℂ →+* A} {d p : ℕ} |
| 120 | (hf : f.IsStandardSmoothOfRelativeDimension d) |
| 121 | (P : Ideal A) [P.IsPrime] (hP : P.height = p) : |
| 122 | ringKrullDim (A ⧸ P) = d - p := by |
| 123 | have hsum := (AlgebraicGeometry.Smooth.CatenaryDimension.RingHom.IsStandardSmoothOfRelativeDimension.height_add_ringKrullDim_quotient_eq_complex hf) P |
| 124 | rw [hP] at hsum |
| 125 | obtain ⟨a, b, ha, hb, hab⟩ := WithBot.add_eq_coe.mp hsum |
| 126 | have ha' : a = (p : ℕ∞) := WithBot.coe_injective ha |
| 127 | subst a |
| 128 | have hbtop : b ≠ ⊤ := by |
| 129 | intro htop |
| 130 | rw [htop, add_top] at hab |
| 131 | exact ENat.top_ne_natCast d hab |
| 132 | lift b to ℕ using hbtop with n |
| 133 | have hpn : p + n = d := by exact_mod_cast hab |
| 134 | rw [← hb, WithBot.coe_natCast] |
| 135 | congr |
| 136 | lia |
| 137 | |
| 138 | end RingHom |
| 139 | |
| 140 | attribute [local instance] AlgebraicGeometry.Over.Basic.overSpecAlgebra |
| 141 | |
| 142 | variable (X : Over (Spec ↧ℂ)) {d p : ℕ} |
| 143 | |
| 144 | /-- Every closed point of the reduced closure of a codimension-`p` point in a smooth complex |
| 145 | `d`-fold has coheight `d - p` inside that reduced closure. -/ |
| 146 | lemma cycleComponent_closedPoint_coheight_eq_sub |
| 147 | [IsIntegral X.left] [Smooth X.hom] [Foundations.ProjectiveSpaceIs.IsProjective X.hom] (x : X.left) |
| 148 | (z : Support.cycleComponent X.left x) |
| 149 | [SmoothOfRelativeDimension d X.hom] |
| 150 | (hx : Order.coheight x = p) (hz : IsClosed {z}) : |
| 151 | Order.coheight z = d - p := by |
| 152 | let c : Support.cycleComponent X.left x ⟶ X.left := Support.cycleComponentι X.left x |
| 153 | let y : X.left := c z |
| 154 | have hyx : y ≤ x := (ComponentDimension.cycleComponentOrderIsoIic X.left x z).2 |
| 155 | obtain ⟨U, hU, hyU, hstandard⟩ := |
| 156 | ComplexPoint.SmoothCoordinates.SmoothOfRelativeDimension.exists_affine_isStandardSmoothOfRelativeDimension |
| 157 | (d := d) X.hom y |
| 158 | have hxU : x ∈ U := by |
| 159 | rw [Scheme.le_iff_specializes] at hyx |
| 160 | exact hyx.mem_open U.isOpen hyU |
| 161 | let W : (Support.cycleComponent X.left x).Opens := c ⁻¹ᵁ U |
| 162 | have hW : IsAffineOpen W := hU.preimage c |
| 163 | have hzW : z ∈ W := hyU |
| 164 | let : Nonempty W := ⟨⟨z, hzW⟩⟩ |
| 165 | let xu : U.toScheme := ⟨x, hxU⟩ |
| 166 | let zw : W.toScheme := ⟨z, hzW⟩ |
| 167 | let q : Γ(X.left, U) →+* Γ(Support.cycleComponent X.left x, W) := |
| 168 | (c.app U).hom |
| 169 | have hqsurj : Function.Surjective q := c.app_surjective U hU |
| 170 | let P : Ideal Γ(X.left, U) := |
| 171 | (hU.primeIdealOf xu).asIdeal |
| 172 | let I := Scheme.IdealSheafData.vanishingIdeal |
| 173 | (X := X.left) ⟨closure {x}, isClosed_closure⟩ |
| 174 | have hsingleton : hU.fromSpec ⁻¹' ({x} : Set X.left) = |
| 175 | ({hU.primeIdealOf xu} : Set (Spec Γ(X.left, U))) := by |
| 176 | ext Q |
| 177 | simp only [Set.mem_preimage, Set.mem_singleton_iff] |
| 178 | refine ⟨fun hQ ↦ hU.fromSpec.isOpenEmbedding.injective |
| 179 | (hQ.trans (hU.fromSpec_primeIdealOf xu).symm), ?_⟩ |
| 180 | rintro rfl |
| 181 | exact hU.fromSpec_primeIdealOf xu |
| 182 | have hpreimage : hU.fromSpec ⁻¹' closure {x} = |
| 183 | closure {hU.primeIdealOf xu} := by |
| 184 | have hclosure := congrArg |
| 185 | (fun T : Set (Spec Γ(X.left, U)) ↦ closure T) hsingleton |
| 186 | exact (hU.fromSpec.isOpenEmbedding.isOpenMap.preimage_closure_eq_closure_preimage |
| 187 | hU.fromSpec.continuous ({x} : Set X.left)).trans hclosure |
| 188 | have hideal : I.ideal ⟨U, hU⟩ = P := by |
| 189 | change PrimeSpectrum.vanishingIdeal (hU.fromSpec ⁻¹' closure {x}) = P |
| 190 | erw [hpreimage, PrimeSpectrum.vanishingIdeal_closure, |
| 191 | PrimeSpectrum.vanishingIdeal_singleton] |
| 192 | have hqker : RingHom.ker q = P := by |
| 193 | change RingHom.ker (c.app U).hom = P |
| 194 | rw [← Scheme.Hom.ker_apply c ⟨U, hU⟩] |
| 195 | calc |
| 196 | c.ker.ideal ⟨U, hU⟩ = I.ideal ⟨U, hU⟩ := by |
| 197 | rw [show c = I.subschemeι from rfl] |
| 198 | exact congrArg (fun J : X.left.IdealSheafData ↦ J.ideal ⟨U, hU⟩) |
| 199 | I.ker_subschemeι |
| 200 | _ = P := hideal |
| 201 | have hPheight : P.height = p := by |
| 202 | calc |
| 203 | P.height = Order.coheight xu := by |
| 204 | change (hU.primeIdealOf xu).asIdeal.height = Order.coheight xu |
| 205 | exact (AlgebraicGeometry.Smooth.PointwiseDimension.IsAffineOpen.primeIdealOf_height_eq_coheight hU) _ |
| 206 | _ = Order.coheight x := by |
| 207 | have h := coheight_eq_of_isOpenImmersion |
| 208 | (x := xu) U.ι |
| 209 | simpa [xu] using h.symm |
| 210 | _ = p := hx |
| 211 | have hquotient : ringKrullDim (Γ(X.left, U) ⧸ P) = d - p := |
| 212 | (ComponentClosedPointDimension.RingHom.IsStandardSmoothOfRelativeDimension.ringKrullDim_quotient_eq_sub_complex |
| 213 | (ComplexPoint.SmoothCoordinates.algebraMap_isStandardSmoothOfRelativeDimension |
| 214 | (d := d) X hstandard)) |
| 215 | P hPheight |
| 216 | have hringW : ringKrullDim Γ(Support.cycleComponent X.left x, W) = d - p := by |
| 217 | calc |
| 218 | ringKrullDim Γ(Support.cycleComponent X.left x, W) = |
| 219 | ringKrullDim (Γ(X.left, U) ⧸ RingHom.ker q) := |
| 220 | (ringKrullDim_eq_of_ringEquiv |
| 221 | (RingHom.quotientKerEquivOfSurjective hqsurj)).symm |
| 222 | _ = ringKrullDim (Γ(X.left, U) ⧸ P) := by rw [hqker] |
| 223 | _ = d - p := hquotient |
| 224 | let s : Support.cycleComponent X.left x ⟶ Spec ↧ℂ := c ≫ X.hom |
| 225 | let : Algebra ℂ Γ(Support.cycleComponent X.left x, W) := |
| 226 | AlgebraicGeometry.Over.Basic.overSpecAlgebra (Over.mk s) W |
| 227 | let : Algebra.FiniteType ℂ Γ(Support.cycleComponent X.left x, W) := by |
| 228 | rw [← RingHom.finiteType_algebraMap] |
| 229 | change (algebraMap ℂ Γ(Support.cycleComponent X.left x, W)).FiniteType |
| 230 | apply (s.finiteType_appLE (isAffineOpen_top (Spec ↧ℂ)) hW (by simp)).comp |
| 231 | exact RingHom.FiniteType.of_surjective _ |
| 232 | (Scheme.ΓSpecIso ↧ℂ).symm.commRingCatIsoToRingEquiv.surjective |
| 233 | let Q : Ideal Γ(Support.cycleComponent X.left x, W) := |
| 234 | (hW.primeIdealOf zw).asIdeal |
| 235 | have hQmax : Q.IsMaximal := hW.primeIdealOf_isMaximal_of_isClosed |
| 236 | zw hz |
| 237 | have hQheight : (↑Q.height : WithBot ℕ∞) = d - p := by |
| 238 | rw [ComponentClosedPointDimension.Algebra.FiniteType.height_eq_ringKrullDim_of_isMaximal |
| 239 | (k := ℂ) Q, hringW] |
| 240 | have hQcoheight : Q.height = Order.coheight z := by |
| 241 | calc |
| 242 | Q.height = Order.coheight zw := by |
| 243 | change (hW.primeIdealOf zw).asIdeal.height = Order.coheight zw |
| 244 | exact (AlgebraicGeometry.Smooth.PointwiseDimension.IsAffineOpen.primeIdealOf_height_eq_coheight hW) _ |
| 245 | _ = Order.coheight z := by |
| 246 | have h := coheight_eq_of_isOpenImmersion |
| 247 | (x := zw) W.ι |
| 248 | simpa [zw] using h.symm |
| 249 | apply WithBot.coe_injective |
| 250 | rw [← hQcoheight] |
| 251 | exact hQheight |
| 252 | |
| 253 | end |
| 254 | |
| 255 | end OAI.AlgebraicGeometry.Cycle.ComponentClosedPointDimension |