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 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | This file has been modified. |
| 5 | -/ |
| 6 | import OAI.AlgebraicGeometry.Stratification.Basic |
| 7 | import OAI.AlgebraicGeometry.Smooth.Locus |
| 8 | import Mathlib.AlgebraicGeometry.Morphisms.Immersion |
| 9 | import Mathlib.AlgebraicGeometry.Morphisms.ClosedImmersion |
| 10 | import Mathlib.AlgebraicGeometry.IdealSheaf.Subscheme |
| 11 | |
| 12 | /-! # Basic Le -/ |
| 13 | |
| 14 | namespace OAI.AlgebraicGeometry.Stratification.BasicLe |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open _root_.AlgebraicGeometry |
| 19 | |
| 20 | /-! |
| 21 | # A finite smooth decomposition of reduced closed subschemes |
| 22 | |
| 23 | -/ |
| 24 | |
| 25 | /-! ### Constructions used only in proofs -/ |
| 26 | |
| 27 | section |
| 28 | open _root_.CategoryTheory _root_.Topology _root_.TopologicalSpace |
| 29 | universe u |
| 30 | variable {X : Scheme.{u}} |
| 31 | |
| 32 | @[simp] lemma range_reducedClosedSubschemeι (S : Closeds X) : |
| 33 | Set.range (Basic.reducedClosedSubschemeι S) = (S : Set X) := |
| 34 | Scheme.IdealSheafData.range_subschemeι _ |
| 35 | |
| 36 | end |
| 37 | |
| 38 | section |
| 39 | |
| 40 | open _root_.CategoryTheory _root_.Topology _root_.TopologicalSpace |
| 41 | |
| 42 | universe u |
| 43 | |
| 44 | variable {X : Scheme.{u}} |
| 45 | |
| 46 | variable {K : Type u} [Field K] |
| 47 | (f : X ⟶ Spec (.of K)) [LocallyOfFiniteType f] |
| 48 | |
| 49 | lemma reducedClosedSingularRemainder_le (S : Closeds X) : |
| 50 | Basic.reducedClosedSingularRemainder f S ≤ S := by |
| 51 | rintro _ ⟨x, _, rfl⟩ |
| 52 | exact (range_reducedClosedSubschemeι S).le ⟨x, rfl⟩ |
| 53 | |
| 54 | lemma reducedClosedSingularRemainder_lt [PerfectField K] (S : Closeds X) (hS : S ≠ ⊥) : |
| 55 | Basic.reducedClosedSingularRemainder f S < S := by |
| 56 | refine lt_of_le_of_ne (reducedClosedSingularRemainder_le f S) ?_ |
| 57 | have hne : Nonempty (Basic.reducedClosedSubscheme S) := by |
| 58 | obtain ⟨x, hx⟩ := Closeds.coe_nonempty.mpr hS |
| 59 | obtain ⟨y, _⟩ := (range_reducedClosedSubschemeι S).ge hx |
| 60 | exact ⟨y⟩ |
| 61 | obtain ⟨x, hx⟩ := |
| 62 | (Basic.reducedClosedStructureMap f S).dense_smoothLocus_of_perfectField.nonempty |
| 63 | intro h |
| 64 | have hmem : Basic.reducedClosedSubschemeι S x ∈ Basic.reducedClosedSingularRemainder f S := by |
| 65 | rw [h] |
| 66 | exact (range_reducedClosedSubschemeι S).le ⟨x, rfl⟩ |
| 67 | obtain ⟨y, hy, hxy⟩ := hmem |
| 68 | exact hy ((Basic.reducedClosedSubschemeι S).isClosedEmbedding.injective hxy ▸ hx) |
| 69 | |
| 70 | /-- The smooth piece removed from a closed subset at one step. -/ |
| 71 | def reducedClosedSmoothPiece (S : Closeds X) : Scheme := |
| 72 | (Basic.reducedClosedStructureMap f S).smoothLocus |
| 73 | |
| 74 | /-- This piece is locally closed in the original ambient scheme. -/ |
| 75 | def reducedClosedSmoothPieceι (S : Closeds X) : reducedClosedSmoothPiece f S ⟶ X := |
| 76 | (Basic.reducedClosedStructureMap f S).smoothLocus.ι ≫ Basic.reducedClosedSubschemeι S |
| 77 | |
| 78 | set_option backward.isDefEq.respectTransparency false in |
| 79 | instance reducedClosedSmoothPieceι_isImmersion (S : Closeds X) : |
| 80 | IsImmersion (reducedClosedSmoothPieceι f S) := by |
| 81 | change IsImmersion |
| 82 | ((Basic.reducedClosedStructureMap f S).smoothLocus.ι ≫ Basic.reducedClosedSubschemeι S) |
| 83 | infer_instance |
| 84 | |
| 85 | instance reducedClosedSmoothPiece_smooth (S : Closeds X) : |
| 86 | Smooth (reducedClosedSmoothPieceι f S ≫ f) := by |
| 87 | change Smooth ((Basic.reducedClosedStructureMap f S).smoothLocus.ι ≫ |
| 88 | Basic.reducedClosedSubschemeι S ≫ f) |
| 89 | exact (OAI.AlgebraicGeometry.Smooth.Locus.Scheme.Hom.smooth_restrict_smoothLocus (Basic.reducedClosedStructureMap f S)) |
| 90 | |
| 91 | attribute [local instance] Basic.reducedSmoothStratificationWellFoundedRelation |
| 92 | |
| 93 | open scoped Classical in |
| 94 | /-- The finite, explicitly recursive sequence of nonempty closed remainders. The actual |
| 95 | smooth strata are `reducedClosedSmoothPiece f S` for the members of this list. -/ |
| 96 | def reducedSmoothStratification [PerfectField K] [NoetherianSpace X] |
| 97 | (S : Closeds X) : List (Closeds X) := |
| 98 | if S = ⊥ then [] |
| 99 | else S :: reducedSmoothStratification (Basic.reducedClosedSingularRemainder f S) |
| 100 | termination_by S |
| 101 | decreasing_by |
| 102 | apply reducedClosedSingularRemainder_lt f S |
| 103 | assumption |
| 104 | |
| 105 | end |
| 106 | |
| 107 | open _root_.CategoryTheory _root_.Topology _root_.TopologicalSpace |
| 108 | |
| 109 | universe u |
| 110 | |
| 111 | variable {X : Scheme.{u}} |
| 112 | |
| 113 | variable {K : Type u} [Field K] |
| 114 | (f : X ⟶ Spec (.of K)) [LocallyOfFiniteType f] |
| 115 | |
| 116 | lemma reducedClosedSmoothPiece_range (S : Closeds X) : |
| 117 | Set.range (reducedClosedSmoothPieceι f S) = |
| 118 | (S : Set X) \ (Basic.reducedClosedSingularRemainder f S : Set X) := by |
| 119 | ext x |
| 120 | constructor |
| 121 | · rintro ⟨y, rfl⟩ |
| 122 | refine ⟨(range_reducedClosedSubschemeι S).le ⟨y.1, rfl⟩, ?_⟩ |
| 123 | rintro ⟨z, hz, he⟩ |
| 124 | exact hz ((Basic.reducedClosedSubschemeι S).isClosedEmbedding.injective he ▸ y.2) |
| 125 | · rintro ⟨hx, hnot⟩ |
| 126 | obtain ⟨y, rfl⟩ := (range_reducedClosedSubschemeι S).ge hx |
| 127 | have hy : y ∈ (Basic.reducedClosedStructureMap f S).smoothLocus := by |
| 128 | by_contra hn |
| 129 | exact hnot ⟨y, hn, rfl⟩ |
| 130 | exact ⟨⟨y, hy⟩, rfl⟩ |
| 131 | |
| 132 | end |
| 133 | |
| 134 | end OAI.AlgebraicGeometry.Stratification.BasicLe |