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.Algebra.RingTheory.SmoothKrullDimension |
| 18 | import Mathlib.AlgebraicGeometry.Morphisms.Smooth |
| 19 | import OAI.AlgebraicGeometry.Cycle.ComponentDimension |
| 20 | import OAI.AlgebraicGeometry.ComplexPoint.SmoothCoordinates |
| 21 | import OAI.CategoryTheory.ConcreteCategory.Notation |
| 22 | import Mathlib.RingTheory.KrullDimension.Field |
| 23 | import Mathlib.RingTheory.KrullDimension.Polynomial |
| 24 | import Mathlib.RingTheory.Unramified.LocalStructure |
| 25 | |
| 26 | /-! # Dimension Formula -/ |
| 27 | |
| 28 | namespace OAI.AlgebraicGeometry.Smooth.DimensionFormula |
| 29 | |
| 30 | noncomputable section |
| 31 | |
| 32 | open _root_.AlgebraicGeometry |
| 33 | |
| 34 | /-! |
| 35 | # Dimension bounds for smooth complex schemes |
| 36 | |
| 37 | This file proves the dimension-theoretic consequences of smooth complex coordinates that do not |
| 38 | require a catenary dimension formula. Its commutative-algebra input is |
| 39 | `HodgeConjecture.Mathlib.RingTheory.SmoothKrullDimension`, which bounds the Krull dimension of a |
| 40 | standard-smooth complex algebra of relative dimension `d` by `d`. |
| 41 | |
| 42 | For a smooth complex scheme, the affine coordinate neighborhoods therefore give the global bound |
| 43 | `height x + coheight x ≤ d`. The reverse inequality, and hence equality, is the catenary |
| 44 | dimension formula. It is not a consequence of the currently available Mathlib API and is not |
| 45 | assumed here. |
| 46 | -/ |
| 47 | |
| 48 | open _root_.CategoryTheory _root_.Topology |
| 49 | |
| 50 | variable {X : Scheme} |
| 51 | |
| 52 | /-- The order-theoretic Krull dimension of an affine open is the ring-theoretic Krull dimension |
| 53 | of its ring of sections. -/ |
| 54 | lemma orderKrullDim_affineOpen_eq_ringKrullDim (U : X.Opens) (hU : IsAffineOpen U) : |
| 55 | Order.krullDim U = ringKrullDim Γ(X, U) := by |
| 56 | calc |
| 57 | Order.krullDim U = topologicalKrullDim U := |
| 58 | (Cycle.ComponentDimension.Scheme.topologicalKrullDim_eq_orderKrullDim U.toScheme).symm |
| 59 | _ = topologicalKrullDim (PrimeSpectrum Γ(X, U)) := |
| 60 | hU.isoSpec.hom.homeomorph.isHomeomorph.topologicalKrullDim_eq |
| 61 | _ = ringKrullDim Γ(X, U) := |
| 62 | PrimeSpectrum.topologicalKrullDim_eq_ringKrullDim _ |
| 63 | |
| 64 | /-- If every point has an open neighborhood of Krull dimension at most `d`, then the whole scheme |
| 65 | has Krull dimension at most `d`. |
| 66 | |
| 67 | The proof puts each finite specialization chain in a neighborhood of its least element. Every |
| 68 | other element of the chain is a generization of that point, so it remains in the open set. -/ |
| 69 | lemma Scheme.orderKrullDim_le_of_exists_open_orderKrullDim_le (X : Scheme) (d : ℕ) |
| 70 | (h : ∀ x : X, ∃ U : X.Opens, x ∈ U ∧ Order.krullDim U ≤ d) : |
| 71 | Order.krullDim X ≤ d := by |
| 72 | cases isEmpty_or_nonempty X with |
| 73 | | inl hX => |
| 74 | rw [Order.krullDim_eq_bot] |
| 75 | exact bot_le |
| 76 | | inr hX => |
| 77 | let : Nonempty X := hX |
| 78 | rw [Order.krullDim_eq_iSup_length] |
| 79 | refine WithBot.coe_le_coe.mpr (iSup_le fun l ↦ ?_) |
| 80 | obtain ⟨U, hhead, hU⟩ := h l.head |
| 81 | have hmem (i : Fin (l.length + 1)) : l i ∈ U := by |
| 82 | have hle : l.head ≤ l i := l.monotone (Fin.zero_le i) |
| 83 | rw [Scheme.le_iff_specializes] at hle |
| 84 | exact hle.mem_open U.isOpen hhead |
| 85 | have hlt (a b : U.toScheme) (hab : U.ι.base a < U.ι.base b) : a < b := by |
| 86 | rw [lt_iff_le_not_ge] |
| 87 | constructor |
| 88 | · rw [Scheme.le_iff_specializes] |
| 89 | apply U.isOpenEmbedding.isInducing.specializes_iff.mp |
| 90 | rw [← Scheme.le_iff_specializes] |
| 91 | exact hab.le |
| 92 | · intro hback |
| 93 | apply (not_le_of_gt hab) |
| 94 | rw [Scheme.le_iff_specializes] at hback ⊢ |
| 95 | exact U.isOpenEmbedding.isInducing.specializes_iff.mpr hback |
| 96 | let lU : LTSeries U := |
| 97 | { length := l.length |
| 98 | toFun := fun i ↦ ⟨l i, hmem i⟩ |
| 99 | step := fun i ↦ by |
| 100 | simpa only [Set.mem_ofPred_eq] using |
| 101 | hlt (⟨l i.castSucc, hmem i.castSucc⟩ : U.toScheme) |
| 102 | (⟨l i.succ, hmem i.succ⟩ : U.toScheme) (l.step i) } |
| 103 | have hlength : (l.length : WithBot ℕ∞) ≤ Order.krullDim U := |
| 104 | Order.le_krullDim_iff.mpr ⟨lU, rfl⟩ |
| 105 | exact WithBot.coe_le_coe.mp (hlength.trans hU) |
| 106 | |
| 107 | variable {f : X ⟶ Spec ↧ℂ} {d : ℕ} |
| 108 | |
| 109 | /-- A smooth complex scheme of relative dimension `d` has order-theoretic Krull dimension at |
| 110 | most `d`. -/ |
| 111 | lemma SmoothOfRelativeDimension.orderKrullDim_le_complex |
| 112 | [SmoothOfRelativeDimension d f] : Order.krullDim X ≤ d := by |
| 113 | apply DimensionFormula.Scheme.orderKrullDim_le_of_exists_open_orderKrullDim_le X d |
| 114 | intro x |
| 115 | obtain ⟨U, hU, hxU, hsmooth⟩ := |
| 116 | ComplexPoint.SmoothCoordinates.SmoothOfRelativeDimension.exists_affine_isStandardSmoothOfRelativeDimension |
| 117 | (d := d) f x |
| 118 | refine ⟨U, hxU, ?_⟩ |
| 119 | rw [orderKrullDim_affineOpen_eq_ringKrullDim U hU] |
| 120 | exact (Algebra.RingTheory.SmoothKrullDimension.RingHom.IsStandardSmoothOfRelativeDimension.ringKrullDim_le_complex (ComplexPoint.SmoothCoordinates.algebraMap_isStandardSmoothOfRelativeDimension |
| 121 | (d := d) (Over.mk f) hsmooth)) |
| 122 | |
| 123 | /-- At every point of a smooth complex scheme of relative dimension `d`, the sum of the |
| 124 | order-theoretic dimension and codimension is at most `d`. -/ |
| 125 | lemma SmoothOfRelativeDimension.height_add_coheight_le_complex |
| 126 | [SmoothOfRelativeDimension d f] (x : X) : |
| 127 | Order.height x + Order.coheight x ≤ d := by |
| 128 | let : Nonempty X := ⟨x⟩ |
| 129 | have hpoint : |
| 130 | (↑(Order.height x + Order.coheight x) : WithBot ℕ∞) ≤ Order.krullDim X := by |
| 131 | rw [Order.krullDim_eq_iSup_height_add_coheight_of_nonempty] |
| 132 | exact WithBot.coe_le_coe.mpr (le_iSup (fun y : X ↦ |
| 133 | Order.height y + Order.coheight y) x) |
| 134 | exact WithBot.coe_le_coe.mp |
| 135 | (hpoint.trans (DimensionFormula.SmoothOfRelativeDimension.orderKrullDim_le_complex |
| 136 | (f := f) (d := d))) |
| 137 | |
| 138 | /-- If a point of a smooth complex `d`-fold has coheight `p`, its height is at most `d - p`. |
| 139 | This is the direction of the dimension formula available without catenarity. -/ |
| 140 | lemma SmoothOfRelativeDimension.height_le_sub_of_coheight_eq |
| 141 | [SmoothOfRelativeDimension d f] (x : X) {p : ℕ} (hx : Order.coheight x = p) : |
| 142 | Order.height x ≤ d - p := by |
| 143 | apply ENat.le_sub_of_add_le_right (by simp) |
| 144 | rw [← hx] |
| 145 | exact DimensionFormula.SmoothOfRelativeDimension.height_add_coheight_le_complex |
| 146 | (f := f) (d := d) x |
| 147 | |
| 148 | /-- Every point of a smooth complex scheme of relative dimension `d` has coheight at most `d`. -/ |
| 149 | lemma SmoothOfRelativeDimension.coheight_le_complex |
| 150 | [SmoothOfRelativeDimension d f] (x : X) : Order.coheight x ≤ d := by |
| 151 | calc |
| 152 | Order.coheight x ≤ Order.height x + Order.coheight x := le_add_left le_rfl |
| 153 | _ ≤ d := DimensionFormula.SmoothOfRelativeDimension.height_add_coheight_le_complex |
| 154 | (f := f) (d := d) x |
| 155 | |
| 156 | end |
| 157 | |
| 158 | end OAI.AlgebraicGeometry.Smooth.DimensionFormula |