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 | |
| 16 | This file has been modified. |
| 17 | -/ |
| 18 | |
| 19 | import Mathlib.AlgebraicGeometry.Morphisms.Smooth |
| 20 | import Mathlib.Basic.Complex.Basic |
| 21 | |
| 22 | import HodgeConjecture.Lemmas.AlgebraicGeometry.Cycle.Component.Dimension |
| 23 | import HodgeConjecture.Lemmas.AlgebraicGeometry.ComplexPoint.SmoothCoordinates |
| 24 | import HodgeConjecture.Lemmas.AlgebraicGeometry.Smooth.DimensionFormula |
| 25 | import HodgeConjecture.Mathlib.AlgebraicGeometry.GenericPoint |
| 26 | import HodgeConjecture.Mathlib.CategoryTheory.ConcreteCategory.Notation |
| 27 | import Mathlib.RingTheory.Unramified.LocalStructure |
| 28 | |
| 29 | namespace OAI.AlgebraicGeometry.Smooth.PointwiseDimension |
| 30 | |
| 31 | open _root_.AlgebraicGeometry |
| 32 | open _root_.RingHom |
| 33 | |
| 34 | /-! |
| 35 | # Pointwise dimension of smooth complex schemes |
| 36 | |
| 37 | This file proves the pointwise dimension formula at the generic and closed points of an integral |
| 38 | smooth complex scheme. It also proves the formula at every point in relative dimensions zero, |
| 39 | one, or two. The proofs pass through affine standard-smooth neighborhoods and maximal ideals |
| 40 | under étale coordinates. |
| 41 | |
| 42 | Above relative dimension two, the remaining commutative-algebra statement is the arbitrary-prime |
| 43 | dimension formula for a polynomial ring over a field. Mathlib currently proves the height of |
| 44 | maximal polynomial ideals and the global Krull dimension, but not this arbitrary-prime catenary |
| 45 | formula. |
| 46 | -/ |
| 47 | |
| 48 | noncomputable section |
| 49 | |
| 50 | open _root_.CategoryTheory _root_.Topology _root_.TopologicalSpace |
| 51 | |
| 52 | namespace RingHom |
| 53 | open _root_.RingHom |
| 54 | |
| 55 | /-- Every maximal ideal of a standard-smooth complex algebra of relative dimension `d` has |
| 56 | height `d`. -/ |
| 57 | lemma IsStandardSmoothOfRelativeDimension.height_eq_of_isMaximal |
| 58 | {S : Type*} [CommRing S] {f : ℂ →+* S} {d : ℕ} |
| 59 | (hf : f.IsStandardSmoothOfRelativeDimension d) (P : Ideal S) [P.IsMaximal] : |
| 60 | P.height = d := by |
| 61 | obtain ⟨g, _, hg⟩ := hf.exists_etale_mvPolynomial |
| 62 | let : Algebra (MvPolynomial (Fin d) ℂ) S := g.toAlgebra |
| 63 | let : Algebra.Etale (MvPolynomial (Fin d) ℂ) S := |
| 64 | RingHom.etale_algebraMap.mp hg |
| 65 | have hfiniteType : (algebraMap (MvPolynomial (Fin d) ℂ) S).FiniteType := |
| 66 | RingHom.finiteType_algebraMap.mpr inferInstance |
| 67 | have hunder : (P.under (MvPolynomial (Fin d) ℂ)).IsMaximal := |
| 68 | (_root_.OAI.Algebra.RingTheory.SmoothKrullDimension.RingHom.FiniteType.isMaximal_comap_of_isJacobsonRing hfiniteType) P |
| 69 | rw [_root_.OAI.Algebra.RingTheory.SmoothKrullDimension.QuasiFinite.height_eq_height_under (R := MvPolynomial (Fin d) ℂ)] |
| 70 | exact _root_.OAI.Algebra.RingTheory.SmoothKrullDimension.MvPolynomial.height_eq_fin_of_isMaximal ℂ d |
| 71 | (P.under (MvPolynomial (Fin d) ℂ)) |
| 72 | |
| 73 | end RingHom |
| 74 | |
| 75 | section |
| 76 | |
| 77 | /-- Under an affine presentation, the height of the corresponding prime ideal is the coheight of |
| 78 | the scheme point. -/ |
| 79 | lemma IsAffineOpen.primeIdealOf_height_eq_coheight {X : Scheme} {U : X.Opens} |
| 80 | (hU : IsAffineOpen U) (x : U.toScheme) : |
| 81 | (hU.primeIdealOf x).asIdeal.height = Order.coheight x := by |
| 82 | calc |
| 83 | (hU.isoSpec.hom x : Spec ↧Γ(X, U)).asIdeal.height = |
| 84 | Order.coheight (hU.isoSpec.hom x) := |
| 85 | idealHeight_eq_coheight ↧Γ(X, U) (hU.isoSpec.hom x) |
| 86 | _ = Order.coheight x := coheight_eq_of_isOpenImmersion hU.isoSpec.hom |
| 87 | |
| 88 | variable {X : Scheme} {f : X ⟶ Spec ↧ℂ} {d : ℕ} |
| 89 | |
| 90 | /-- A nonempty integral smooth complex scheme of relative dimension `d` has global order Krull |
| 91 | dimension exactly `d`. -/ |
| 92 | lemma SmoothOfRelativeDimension.orderKrullDim_eq_complex [IsIntegral X] |
| 93 | [SmoothOfRelativeDimension d f] : Order.krullDim X = d := by |
| 94 | apply le_antisymm |
| 95 | (_root_.OAI.AlgebraicGeometry.Smooth.DimensionFormula.SmoothOfRelativeDimension.orderKrullDim_le_complex (f := f) (d := d)) |
| 96 | obtain ⟨x⟩ := (inferInstance : Nonempty X) |
| 97 | obtain ⟨U, hU, hxU, hsmooth⟩ := |
| 98 | _root_.OAI.AlgebraicGeometry.ComplexPoint.SmoothCoordinates.SmoothOfRelativeDimension.exists_affine_isStandardSmoothOfRelativeDimension |
| 99 | (d := d) f x |
| 100 | let : Nonempty U := ⟨⟨x, hxU⟩⟩ |
| 101 | have hUdim : Order.krullDim U = d := by |
| 102 | rw [_root_.OAI.AlgebraicGeometry.Smooth.DimensionFormula.orderKrullDim_affineOpen_eq_ringKrullDim U hU] |
| 103 | exact (_root_.OAI.Algebra.RingTheory.SmoothKrullDimension.RingHom.IsStandardSmoothOfRelativeDimension.ringKrullDim_eq_complex (_root_.OAI.AlgebraicGeometry.ComplexPoint.SmoothCoordinates.algebraMap_isStandardSmoothOfRelativeDimension |
| 104 | (d := d) (Over.mk f) hsmooth)) |
| 105 | rw [← hUdim, ← _root_.OAI.AlgebraicGeometry.Cycle.ComponentDimension.Scheme.topologicalKrullDim_eq_orderKrullDim U.toScheme, |
| 106 | ← _root_.OAI.AlgebraicGeometry.Cycle.ComponentDimension.Scheme.topologicalKrullDim_eq_orderKrullDim X] |
| 107 | exact U.ι.isOpenEmbedding.isInducing.topologicalKrullDim_le |
| 108 | |
| 109 | /-- The pointwise dimension formula holds at every closed point of an integral smooth complex |
| 110 | scheme. -/ |
| 111 | lemma SmoothOfRelativeDimension.height_add_coheight_eq_of_isClosed [IsIntegral X] |
| 112 | [SmoothOfRelativeDimension d f] (x : X) (hx : IsClosed {x}) : |
| 113 | Order.height x + Order.coheight x = d := by |
| 114 | have hmin : IsMin x := by |
| 115 | intro y hy |
| 116 | have hy' : y ∈ closure {x} := by |
| 117 | rwa [← specializes_iff_mem_closure, ← Scheme.le_iff_specializes] |
| 118 | rw [hx.closure_eq] at hy' |
| 119 | exact (Set.mem_singleton_iff.mp hy').ge |
| 120 | have hheight : Order.height x = 0 := Order.IsMin.height_eq_zero hmin |
| 121 | obtain ⟨U, hU, hxU, hsmooth⟩ := |
| 122 | _root_.OAI.AlgebraicGeometry.ComplexPoint.SmoothCoordinates.SmoothOfRelativeDimension.exists_affine_isStandardSmoothOfRelativeDimension |
| 123 | (d := d) f x |
| 124 | let y : U.toScheme := ⟨x, hxU⟩ |
| 125 | let P : Ideal Γ(X, U) := (hU.primeIdealOf y).asIdeal |
| 126 | let : P.IsMaximal := hU.primeIdealOf_isMaximal_of_isClosed y hx |
| 127 | have hP : P.height = d := |
| 128 | (_root_.OAI.AlgebraicGeometry.Smooth.PointwiseDimension.RingHom.IsStandardSmoothOfRelativeDimension.height_eq_of_isMaximal (_root_.OAI.AlgebraicGeometry.ComplexPoint.SmoothCoordinates.algebraMap_isStandardSmoothOfRelativeDimension |
| 129 | (d := d) (Over.mk f) hsmooth)) P |
| 130 | have hcoheight : Order.coheight x = d := by |
| 131 | calc |
| 132 | Order.coheight x = Order.coheight y := coheight_eq_of_isOpenImmersion (x := y) U.ι |
| 133 | _ = P.height := ((_root_.OAI.AlgebraicGeometry.Smooth.PointwiseDimension.IsAffineOpen.primeIdealOf_height_eq_coheight hU) y).symm |
| 134 | _ = d := hP |
| 135 | rw [hheight, hcoheight, zero_add] |
| 136 | |
| 137 | end |
| 138 | |
| 139 | end |
| 140 | |
| 141 | end OAI.AlgebraicGeometry.Smooth.PointwiseDimension |