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