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.Smooth.Locus |
| 7 | import Mathlib.AlgebraicGeometry.Morphisms.Immersion |
| 8 | import Mathlib.AlgebraicGeometry.Morphisms.ClosedImmersion |
| 9 | import Mathlib.AlgebraicGeometry.IdealSheaf.Subscheme |
| 10 | |
| 11 | /-! # Basic -/ |
| 12 | |
| 13 | namespace OAI.AlgebraicGeometry.Stratification.Basic |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | open _root_.AlgebraicGeometry |
| 18 | |
| 19 | /-! |
| 20 | # A finite smooth decomposition of reduced closed subschemes |
| 21 | |
| 22 | For a scheme over a field and a closed subset, take the reduced closed subscheme, |
| 23 | remove its smooth locus, and repeat on the closed remainder. Under the hypotheses used |
| 24 | below, Noetherian induction makes the resulting list finite. The differences between |
| 25 | successive closed subsets, with their induced reduced scheme structures, are smooth |
| 26 | locally closed subschemes. |
| 27 | -/ |
| 28 | |
| 29 | open _root_.CategoryTheory _root_.Topology _root_.TopologicalSpace |
| 30 | |
| 31 | universe u |
| 32 | |
| 33 | variable {X : Scheme.{u}} |
| 34 | |
| 35 | /-- Let `X` be a scheme and `S` a closed subset of its underlying space. This is the reduced closed |
| 36 | subscheme defined by the vanishing ideal sheaf of `S`; on each affine open, its ring is the |
| 37 | quotient by the radical ideal of functions vanishing on `S`. -/ |
| 38 | def reducedClosedSubscheme (S : Closeds X) : Scheme := |
| 39 | (Scheme.IdealSheafData.vanishingIdeal S).subscheme |
| 40 | |
| 41 | /-- Let `X` be a scheme and `S ⊆ X` closed. This is the closed immersion into `X` of the reduced |
| 42 | subscheme defined by the vanishing ideal of `S`. On underlying spaces it is the inclusion of |
| 43 | `S`. -/ |
| 44 | def reducedClosedSubschemeι (S : Closeds X) : reducedClosedSubscheme S ⟶ X := |
| 45 | (Scheme.IdealSheafData.vanishingIdeal S).subschemeι |
| 46 | |
| 47 | instance reducedClosedSubschemeι_isClosedImmersion (S : Closeds X) : |
| 48 | IsClosedImmersion (reducedClosedSubschemeι S) := by |
| 49 | change IsClosedImmersion (Scheme.IdealSheafData.vanishingIdeal S).subschemeι |
| 50 | infer_instance |
| 51 | |
| 52 | instance reducedClosedSubscheme_isReduced (S : Closeds X) : |
| 53 | IsReduced (reducedClosedSubscheme S) := by |
| 54 | let I := Scheme.IdealSheafData.vanishingIdeal S |
| 55 | change IsReduced I.subscheme |
| 56 | rw [IsReduced.iff_of_openCover I.subscheme I.subschemeCover.openCover] |
| 57 | intro U |
| 58 | let U' : X.affineOpens := U |
| 59 | change IsReduced (Spec (.of (Γ(X, U') ⧸ I.ideal U'))) |
| 60 | rw [affine_isReduced_iff, ← Ideal.isRadical_iff_quotient_reduced] |
| 61 | exact PrimeSpectrum.isRadical_vanishingIdeal _ |
| 62 | |
| 63 | variable {K : Type u} [Field K] |
| 64 | (f : X ⟶ Spec (.of K)) [LocallyOfFiniteType f] |
| 65 | |
| 66 | /-- Let `f: X → Spec K` be a scheme locally of finite type over a field `K` and let `S ⊆ X` be |
| 67 | closed. This is the structure morphism of the reduced subscheme on `S`, obtained by composing |
| 68 | its inclusion into `X` with `f`. -/ |
| 69 | def reducedClosedStructureMap (S : Closeds X) : |
| 70 | reducedClosedSubscheme S ⟶ Spec (.of K) := |
| 71 | reducedClosedSubschemeι S ≫ f |
| 72 | |
| 73 | instance reducedClosedStructureMap_locallyOfFiniteType (S : Closeds X) : |
| 74 | LocallyOfFiniteType (reducedClosedStructureMap f S) := by |
| 75 | dsimp [reducedClosedStructureMap] |
| 76 | infer_instance |
| 77 | |
| 78 | /-- Let `f: X → Spec K` be a scheme locally of finite type over a field `K`. This is the closed |
| 79 | subset of points where `f` is not smooth, the complement of its open smooth locus. -/ |
| 80 | def singularLocusClosed : Closeds X := f.smoothLocus.compl |
| 81 | |
| 82 | /-- Let `f: X → Spec K` be locally of finite type over a field and `S ⊆ X` closed. Form the reduced |
| 83 | subscheme on `S` and remove its smooth locus over `K`. This is the image of the remaining closed |
| 84 | subset in the original space `X`. -/ |
| 85 | def reducedClosedSingularRemainder (S : Closeds X) : Closeds X := |
| 86 | ⟨reducedClosedSubschemeι S '' |
| 87 | ((reducedClosedStructureMap f S).smoothLocus : Set (reducedClosedSubscheme S))ᶜ, |
| 88 | (reducedClosedSubschemeι S).isClosedEmbedding.isClosedMap _ |
| 89 | (reducedClosedStructureMap f S).smoothLocus.isOpen.isClosed_compl⟩ |
| 90 | |
| 91 | /-- Let `f: X → Spec K` be locally of finite type over a field and `S ⊆ X` closed. Define `S₀ = S`; |
| 92 | to obtain `S_{k+1}`, give `S_k` its reduced scheme structure and remove its smooth locus over |
| 93 | `K`. This is the resulting decreasing sequence of closed subsets of `X`, indexed by natural |
| 94 | numbers. -/ |
| 95 | def reducedSmoothClosedFiltration (S : Closeds X) : ℕ → Closeds X |
| 96 | | 0 => S |
| 97 | | k + 1 => reducedClosedSingularRemainder f (reducedSmoothClosedFiltration S k) |
| 98 | |
| 99 | local instance reducedSmoothStratificationWellFoundedRelation [NoetherianSpace X] : |
| 100 | WellFoundedRelation (Closeds X) := |
| 101 | ⟨(· < ·), wellFounded_lt⟩ |
| 102 | |
| 103 | end |
| 104 | |
| 105 | end OAI.AlgebraicGeometry.Stratification.Basic |