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 HodgeConjecture.Lemmas.Topology.Dimension.Basic |
| 20 | import Mathlib.AlgebraicGeometry.Morphisms.Smooth |
| 21 | import Mathlib.Basic.Complex.Basic |
| 22 | |
| 23 | import HodgeConjecture.Lemmas.AlgebraicGeometry.Cycle.Component.Dimension |
| 24 | import HodgeConjecture.Lemmas.AlgebraicGeometry.ComplexPoint.SmoothCoordinates |
| 25 | import HodgeConjecture.Lemmas.AlgebraicGeometry.Smooth.DimensionFormula |
| 26 | import HodgeConjecture.Lemmas.AlgebraicGeometry.Smooth.PointwiseDimension |
| 27 | import HodgeConjecture.Mathlib.CategoryTheory.ConcreteCategory.Notation |
| 28 | |
| 29 | namespace OAI.AlgebraicGeometry.Smooth.Equidimensional |
| 30 | |
| 31 | open _root_.AlgebraicGeometry |
| 32 | |
| 33 | /-! |
| 34 | # Smooth integral complex schemes are equidimensional |
| 35 | |
| 36 | A smooth morphism to `Spec ℂ` is standard smooth of *some* relative dimension near each point, but |
| 37 | the class `SmoothOfRelativeDimension` demands one dimension that works everywhere. This file shows |
| 38 | that on an integral scheme there is such a dimension, and that it is `dim X`. |
| 39 | |
| 40 | The argument is that the relative dimension of an affine chart is the Krull dimension of its |
| 41 | sections, and that any two nonempty opens of an irreducible space meet: shrinking a chart to a |
| 42 | basic open inside another chart compares the two dimensions, and doing this in both directions |
| 43 | makes them equal. Once a single relative dimension is known to work, the global formula |
| 44 | `SmoothOfRelativeDimension.orderKrullDim_eq_complex` identifies it with `dim X`. |
| 45 | |
| 46 | The resulting instance is what lets constructions on a smooth integral complex scheme drop their |
| 47 | relative-dimension parameter and recover it from the scheme. |
| 48 | -/ |
| 49 | |
| 50 | noncomputable section |
| 51 | |
| 52 | open _root_.CategoryTheory _root_.Topology _root_.TopologicalSpace |
| 53 | |
| 54 | section |
| 55 | |
| 56 | variable {X : Scheme} (f : X ⟶ Spec ↧ℂ) |
| 57 | |
| 58 | /-- A standard-smooth ring map is standard smooth of some relative dimension, read off from any |
| 59 | submersive presentation. -/ |
| 60 | lemma RingHom.IsStandardSmooth.exists_isStandardSmoothOfRelativeDimension {R S : Type*} |
| 61 | [CommRing R] [CommRing S] {φ : R →+* S} (h : φ.IsStandardSmooth) : |
| 62 | ∃ n : ℕ, φ.IsStandardSmoothOfRelativeDimension n := by |
| 63 | let := φ.toAlgebra |
| 64 | obtain ⟨ι, σ, _, _, ⟨P⟩⟩ := h |
| 65 | exact ⟨P.dimension, P.isStandardSmoothOfRelativeDimension rfl⟩ |
| 66 | |
| 67 | /-- Shrinking an affine chart to a basic open preserves the relative dimension, because sections |
| 68 | over the basic open are a localization away of the sections over the chart. -/ |
| 69 | lemma isStandardSmoothOfRelativeDimension_appLE_basicOpen {U : X.Opens} {n : ℕ} |
| 70 | (hU : IsAffineOpen U) (g : Γ(X, U)) |
| 71 | (h : (f.appLE ⊤ U (by simp)).hom.IsStandardSmoothOfRelativeDimension n) : |
| 72 | (f.appLE ⊤ (X.basicOpen g) (by simp)).hom.IsStandardSmoothOfRelativeDimension n := by |
| 73 | have hloc := hU.isLocalization_basicOpen g |
| 74 | have key := |
| 75 | (RingHom.isStandardSmoothOfRelativeDimension_stableUnderCompositionWithLocalizationAway n).2 |
| 76 | Γ(X, X.basicOpen g) g (f.appLE ⊤ U (by simp)).hom h |
| 77 | have hcomp : (f.appLE ⊤ (X.basicOpen g) (by simp)).hom = |
| 78 | (algebraMap Γ(X, U) Γ(X, X.basicOpen g)).comp (f.appLE ⊤ U (by simp)).hom := by |
| 79 | have := f.appLE_map (U := ⊤) (V := U) (V' := X.basicOpen g) (by simp) |
| 80 | (homOfLE (X.basicOpen_le g)).op |
| 81 | rw [← this] |
| 82 | rfl |
| 83 | rwa [hcomp] |
| 84 | |
| 85 | /-- On a nonempty affine chart where the structure map is standard smooth of relative dimension |
| 86 | `n`, the Krull dimension of the chart is `n`. -/ |
| 87 | lemma orderKrullDim_eq_of_isStandardSmoothOfRelativeDimension {U : X.Opens} {n : ℕ} |
| 88 | (hU : IsAffineOpen U) [Nonempty U] |
| 89 | (h : (f.appLE ⊤ U (by simp)).hom.IsStandardSmoothOfRelativeDimension n) : |
| 90 | Order.krullDim U = n := by |
| 91 | rw [_root_.OAI.AlgebraicGeometry.Smooth.DimensionFormula.orderKrullDim_affineOpen_eq_ringKrullDim U hU] |
| 92 | exact (_root_.OAI.Algebra.RingTheory.SmoothKrullDimension.RingHom.IsStandardSmoothOfRelativeDimension.ringKrullDim_eq_complex (_root_.OAI.AlgebraicGeometry.ComplexPoint.SmoothCoordinates.algebraMap_isStandardSmoothOfRelativeDimension (Over.mk f) h)) |
| 93 | |
| 94 | /-- The Krull dimension of an open subscheme does not exceed that of the ambient scheme. -/ |
| 95 | lemma orderKrullDim_mono {U V : X.Opens} (h : U ≤ V) : Order.krullDim U ≤ Order.krullDim V := by |
| 96 | rw [← _root_.OAI.AlgebraicGeometry.Cycle.ComponentDimension.Scheme.topologicalKrullDim_eq_orderKrullDim U.toScheme, |
| 97 | ← _root_.OAI.AlgebraicGeometry.Cycle.ComponentDimension.Scheme.topologicalKrullDim_eq_orderKrullDim V.toScheme] |
| 98 | exact (Topology.IsEmbedding.inclusion h).isInducing.topologicalKrullDim_le |
| 99 | |
| 100 | /-- Half of the chart-independence, given a point in both charts: shrink the first chart to a basic |
| 101 | open contained in the second. -/ |
| 102 | lemma isStandardSmoothOfRelativeDimension_le {U V : X.Opens} {n m : ℕ} |
| 103 | (hU : IsAffineOpen U) (hV : IsAffineOpen V) [Nonempty V] |
| 104 | (hn : (f.appLE ⊤ U (by simp)).hom.IsStandardSmoothOfRelativeDimension n) |
| 105 | (hm : (f.appLE ⊤ V (by simp)).hom.IsStandardSmoothOfRelativeDimension m) |
| 106 | {x : X} (hxU : x ∈ U) (hxV : x ∈ V) : n ≤ m := by |
| 107 | obtain ⟨g, hgV, hxg⟩ := hU.exists_basicOpen_le (V := V) ⟨x, hxV⟩ hxU |
| 108 | have hne : Nonempty (X.basicOpen g) := ⟨⟨x, hxg⟩⟩ |
| 109 | have hZ : Order.krullDim (X.basicOpen g) = n := |
| 110 | orderKrullDim_eq_of_isStandardSmoothOfRelativeDimension f (hU.basicOpen g) |
| 111 | (isStandardSmoothOfRelativeDimension_appLE_basicOpen f hU g hn) |
| 112 | have hVdim : Order.krullDim V = m := |
| 113 | orderKrullDim_eq_of_isStandardSmoothOfRelativeDimension f hV hm |
| 114 | have := orderKrullDim_mono (X := X) hgV |
| 115 | rw [hZ, hVdim] at this |
| 116 | exact_mod_cast this |
| 117 | |
| 118 | /-- On an integral scheme, the relative dimension of a standard-smooth affine chart does not depend |
| 119 | on the chart. -/ |
| 120 | lemma isStandardSmoothOfRelativeDimension_eq [IsIntegral X] {U V : X.Opens} {n m : ℕ} |
| 121 | (hU : IsAffineOpen U) (hV : IsAffineOpen V) [Nonempty U] [Nonempty V] |
| 122 | (hn : (f.appLE ⊤ U (by simp)).hom.IsStandardSmoothOfRelativeDimension n) |
| 123 | (hm : (f.appLE ⊤ V (by simp)).hom.IsStandardSmoothOfRelativeDimension m) : n = m := by |
| 124 | obtain ⟨x⟩ := ‹Nonempty U› |
| 125 | obtain ⟨y⟩ := ‹Nonempty V› |
| 126 | obtain ⟨z, hzU, hzV⟩ : ((U : Set X) ∩ (V : Set X)).Nonempty := by |
| 127 | obtain ⟨z, -, hz⟩ := (IrreducibleSpace.isIrreducible_univ X).2 (U : Set X) (V : Set X) U.2 V.2 |
| 128 | ⟨x.1, trivial, x.2⟩ ⟨y.1, trivial, y.2⟩ |
| 129 | exact ⟨z, hz⟩ |
| 130 | exact le_antisymm (isStandardSmoothOfRelativeDimension_le f hU hV hn hm hzU hzV) |
| 131 | (isStandardSmoothOfRelativeDimension_le f hV hU hm hn hzV hzU) |
| 132 | |
| 133 | /-- A smooth integral complex scheme is smooth of a single relative dimension. -/ |
| 134 | lemma exists_smoothOfRelativeDimension [IsIntegral X] [Smooth f] : |
| 135 | ∃ n : ℕ, SmoothOfRelativeDimension n f := by |
| 136 | obtain ⟨x₀⟩ : Nonempty X := inferInstance |
| 137 | obtain ⟨V₀, hV₀, hx₀, hs₀⟩ := _root_.OAI.AlgebraicGeometry.ComplexPoint.SmoothCoordinates.Smooth.exists_affine_isStandardSmooth f x₀ |
| 138 | have hne₀ : Nonempty V₀ := ⟨⟨x₀, hx₀⟩⟩ |
| 139 | obtain ⟨n, hn⟩ := _root_.OAI.AlgebraicGeometry.Smooth.Equidimensional.RingHom.IsStandardSmooth.exists_isStandardSmoothOfRelativeDimension hs₀ |
| 140 | refine ⟨n, ⟨fun x ↦ ?_⟩⟩ |
| 141 | obtain ⟨V, hV, hxV, hs⟩ := _root_.OAI.AlgebraicGeometry.ComplexPoint.SmoothCoordinates.Smooth.exists_affine_isStandardSmooth f x |
| 142 | have hne : Nonempty V := ⟨⟨x, hxV⟩⟩ |
| 143 | obtain ⟨m, hm⟩ := _root_.OAI.AlgebraicGeometry.Smooth.Equidimensional.RingHom.IsStandardSmooth.exists_isStandardSmoothOfRelativeDimension hs |
| 144 | refine ⟨⊤, isAffineOpen_top _, V, hV, hxV, by simp, ?_⟩ |
| 145 | rwa [isStandardSmoothOfRelativeDimension_eq f hV₀ hV hn hm] |
| 146 | |
| 147 | /-- The relative dimension of a smooth integral complex scheme is unique: any `d` certifying |
| 148 | smoothness of relative dimension is `dim X`. This is the converse direction of |
| 149 | `SmoothOfRelativeDimension.of_isIntegral`, and it is what lets a bound relative dimension be |
| 150 | eliminated in favour of the canonical one. -/ |
| 151 | theorem SmoothOfRelativeDimension.dim_eq [IsIntegral X] [Smooth f] (d : ℕ) |
| 152 | [SmoothOfRelativeDimension d f] : _root_.OAI.Topology.Dimension.Basic.TopologicalSpace.dim X = d := by |
| 153 | rw [_root_.OAI.Topology.Dimension.BasicEq.TopologicalSpace.dim_eq_krullDim, |
| 154 | _root_.OAI.AlgebraicGeometry.Smooth.PointwiseDimension.SmoothOfRelativeDimension.orderKrullDim_eq_complex (f := f) (d := d)] |
| 155 | simp |
| 156 | |
| 157 | /-- A smooth integral complex scheme is smooth of relative dimension `dim X`. |
| 158 | |
| 159 | This is what makes the relative dimension of a smooth integral complex scheme redundant data: it |
| 160 | is recovered from the scheme as `dim X`. -/ |
| 161 | instance SmoothOfRelativeDimension.of_isIntegral [IsIntegral X] [Smooth f] : |
| 162 | SmoothOfRelativeDimension (_root_.OAI.Topology.Dimension.Basic.TopologicalSpace.dim X) f := by |
| 163 | obtain ⟨n, hn⟩ := _root_.OAI.AlgebraicGeometry.Smooth.Equidimensional.exists_smoothOfRelativeDimension f |
| 164 | have hdim : _root_.OAI.Topology.Dimension.Basic.TopologicalSpace.dim X = n := by |
| 165 | rw [_root_.OAI.Topology.Dimension.BasicEq.TopologicalSpace.dim_eq_krullDim, |
| 166 | _root_.OAI.AlgebraicGeometry.Smooth.PointwiseDimension.SmoothOfRelativeDimension.orderKrullDim_eq_complex (f := f) (d := n)] |
| 167 | simp |
| 168 | rwa [hdim] |
| 169 | |
| 170 | end |
| 171 | |
| 172 | end |
| 173 | |
| 174 | end OAI.AlgebraicGeometry.Smooth.Equidimensional |