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 | import Mathlib.AlgebraicGeometry.Group.Abelian |
| 2 | import Mathlib.AlgebraicGeometry.Morphisms.Smooth |
| 3 | import Mathlib.AlgebraicGeometry.Geometrically.Connected |
| 4 | import Mathlib.Topology.KrullDimension |
| 5 | import Mathlib.SetTheory.Cardinal.NatCard |
| 6 | import Mathlib.Data.ZMod.Basic |
| 7 | |
| 8 | /-! # Definitions Torsion -/ |
| 9 | |
| 10 | namespace OAI |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | namespace ArithmeticGeometry.OrdinaryLocus.Openness.DefinitionsTorsion |
| 15 | |
| 16 | /-! Definitions used in the Openness statement. -/ |
| 17 | |
| 18 | open _root_.CategoryTheory _root_.AlgebraicGeometry |
| 19 | open scoped _root_.CategoryTheory.MonObj |
| 20 | |
| 21 | /-- Spec of an algebraic closure of κ(s), as an S-scheme. -/ |
| 22 | def geometricPoint (S : Scheme) (s : S) : Over S := |
| 23 | Over.mk |
| 24 | (Spec.map (CommRingCat.ofHom |
| 25 | (algebraMap (S.residueField s) |
| 26 | (AlgebraicClosure (S.residueField s)))) ≫ |
| 27 | S.fromSpecResidueField s) |
| 28 | |
| 29 | /-- A fiber of dimension g is ordinary when it has p^g geometric |
| 30 | p-torsion points. Here x^p = 1 means [p]x = 0 additively. -/ |
| 31 | def IsOrdinaryAt (p : ℕ) {S : Scheme} |
| 32 | (A : Over S) [GrpObj A] (s : S) : Prop := |
| 33 | ∃ g : ℕ, |
| 34 | topologicalKrullDim (A.hom.fiber s) = (g : WithBot ℕ∞) ∧ |
| 35 | Nat.card {x : geometricPoint S s ⟶ A // x ^ p = 1} = p ^ g |
| 36 | |
| 37 | end ArithmeticGeometry.OrdinaryLocus.Openness.DefinitionsTorsion |
| 38 | |
| 39 | namespace ArithmeticGeometry.OrdinaryLocus.Openness.DefinitionsTorsion.Construction |
| 40 | open _root_.CategoryTheory |
| 41 | open _root_.CategoryTheory.Limits |
| 42 | open _root_.AlgebraicGeometry |
| 43 | open scoped _root_.CategoryTheory.MonObj |
| 44 | section |
| 45 | |
| 46 | /-! |
| 47 | Scheme-theoretic torsion and its geometric points for Openness. |
| 48 | Only the definitions in `Statements.Openness` are used; its theorem stub is not used. |
| 49 | -/ |
| 50 | |
| 51 | open OAI.ArithmeticGeometry.OrdinaryLocus.Openness.DefinitionsTorsion (geometricPoint IsOrdinaryAt) |
| 52 | |
| 53 | variable {S : Scheme} (A : Over S) [GrpObj A] |
| 54 | |
| 55 | /-- The kernel of multiplication by `n`, represented as an equalizer over S. -/ |
| 56 | def torsionScheme (n : ℕ) : Over S := |
| 57 | equalizer ((𝟙 A) ^ n) (1 : A ⟶ A) |
| 58 | |
| 59 | /-- The inclusion of the scheme-theoretic n-torsion. -/ |
| 60 | def torsionInclusion (n : ℕ) : torsionScheme A n ⟶ A := |
| 61 | equalizer.ι ((𝟙 A) ^ n) (1 : A ⟶ A) |
| 62 | |
| 63 | /-- The representing property identifies points with elements killed by n. -/ |
| 64 | def torsionPointsEquiv (n : ℕ) (T : Over S) : |
| 65 | (T ⟶ torsionScheme A n) ≃ {x : T ⟶ A // x ^ n = 1} where |
| 66 | toFun f := ⟨f ≫ torsionInclusion A n, by |
| 67 | have h : (torsionInclusion A n) ^ n = 1 := by |
| 68 | convert! (show (equalizer.ι ((𝟙 A) ^ n) (1 : A ⟶ A)) ^ n = 1 from |
| 69 | (by simpa only [MonObj.comp_pow, Category.comp_id, MonObj.comp_one] using |
| 70 | (equalizer.condition ((𝟙 A) ^ n) (1 : A ⟶ A)))) |
| 71 | rw [← MonObj.comp_pow, h, MonObj.comp_one]⟩ |
| 72 | invFun x := equalizer.lift x.val (by |
| 73 | simpa only [MonObj.comp_pow, Category.comp_id, MonObj.comp_one] using x.prop) |
| 74 | left_inv f := by |
| 75 | apply equalizer.hom_ext |
| 76 | exact equalizer.lift_ι _ _ |
| 77 | right_inv x := by |
| 78 | apply Subtype.ext |
| 79 | exact equalizer.lift_ι _ _ |
| 80 | |
| 81 | instance torsionInclusion_isClosedImmersion (n : ℕ) [IsSeparated A.hom] : |
| 82 | IsClosedImmersion (torsionInclusion A n).left := by |
| 83 | exact isClosedImmersion_equalizer_ι_left ((𝟙 A) ^ n) (1 : A ⟶ A) |
| 84 | |
| 85 | instance torsionScheme_isProper (n : ℕ) [IsProper A.hom] : |
| 86 | IsProper (torsionScheme A n).hom := by |
| 87 | rw [← (torsionInclusion A n).w] |
| 88 | infer_instance |
| 89 | |
| 90 | /-- The torsion count in the specification is the geometric-point count |
| 91 | of the actual torsion scheme. -/ |
| 92 | theorem geometric_torsion_card (n : ℕ) (s : S) : |
| 93 | Nat.card (geometricPoint S s ⟶ torsionScheme A n) = |
| 94 | Nat.card {x : geometricPoint S s ⟶ A // x ^ n = 1} := |
| 95 | Nat.card_congr (torsionPointsEquiv A n (geometricPoint S s)) |
| 96 | |
| 97 | theorem isOrdinaryAt_iff_torsionScheme (p : ℕ) (s : S) : |
| 98 | IsOrdinaryAt p A s ↔ |
| 99 | ∃ g : ℕ, |
| 100 | topologicalKrullDim (A.hom.fiber s) = (g : WithBot ℕ∞) ∧ |
| 101 | Nat.card (geometricPoint S s ⟶ torsionScheme A p) = p ^ g := by |
| 102 | simp only [IsOrdinaryAt, geometric_torsion_card] |
| 103 | |
| 104 | /-- Ordinarity in the specification forces the geometric torsion set |
| 105 | to be finite; `Nat.card` cannot certify an infinite set as ordinary. -/ |
| 106 | theorem finite_geometric_torsion_of_isOrdinaryAt |
| 107 | (p : ℕ) [Fact p.Prime] (s : S) (hs : IsOrdinaryAt p A s) : |
| 108 | Finite (geometricPoint S s ⟶ torsionScheme A p) := by |
| 109 | obtain ⟨g, _, hg⟩ := (isOrdinaryAt_iff_torsionScheme A p s).mp hs |
| 110 | apply Nat.finite_of_card_ne_zero |
| 111 | rw [hg] |
| 112 | exact pow_ne_zero _ (Fact.out : p.Prime).ne_zero |
| 113 | |
| 114 | end |
| 115 | |
| 116 | /-! Relating geometric points in Openness to the actual geometric fiber scheme. -/ |
| 117 | |
| 118 | open OAI.ArithmeticGeometry.OrdinaryLocus.Openness.DefinitionsTorsion (geometricPoint IsOrdinaryAt) |
| 119 | |
| 120 | variable {S : Scheme} (T : Over S) (s : S) |
| 121 | |
| 122 | /-- The geometric fiber over the algebraic closure used in the specification. -/ |
| 123 | abbrev geometricFiberScheme : Scheme := |
| 124 | pullback T.hom (geometricPoint S s).hom |
| 125 | |
| 126 | /-- Its structure map to the algebraically closed residue field. -/ |
| 127 | abbrev geometricFiberMap : geometricFiberScheme T s ⟶ (geometricPoint S s).left := |
| 128 | pullback.snd T.hom (geometricPoint S s).hom |
| 129 | |
| 130 | instance geometricFiberMap_locallyOfFiniteType [LocallyOfFiniteType T.hom] : |
| 131 | LocallyOfFiniteType (geometricFiberMap T s) := by |
| 132 | unfold geometricFiberMap |
| 133 | infer_instance |
| 134 | |
| 135 | /-- A geometric point over S is equivalently a point of the geometric fiber |
| 136 | over its algebraically closed base field. -/ |
| 137 | def geometricFiberPointEquiv : |
| 138 | (geometricPoint S s ⟶ T) ≃ |
| 139 | {p : (geometricPoint S s).left ⟶ geometricFiberScheme T s // |
| 140 | p ≫ geometricFiberMap T s = 𝟙 _} where |
| 141 | toFun f := ⟨pullback.lift f.left (𝟙 _) (by simp), by |
| 142 | exact pullback.lift_snd _ _ _⟩ |
| 143 | invFun p := Over.homMk (p.val ≫ pullback.fst T.hom (geometricPoint S s).hom) (by |
| 144 | rw [Category.assoc, pullback.condition, ← Category.assoc, p.prop, |
| 145 | Category.id_comp]) |
| 146 | left_inv f := by |
| 147 | apply Over.OverMorphism.ext |
| 148 | exact pullback.lift_fst _ _ _ |
| 149 | right_inv p := by |
| 150 | apply Subtype.ext |
| 151 | apply pullback.hom_ext |
| 152 | · exact pullback.lift_fst _ _ _ |
| 153 | · exact (pullback.lift_snd _ _ _).trans p.prop.symm |
| 154 | |
| 155 | /-- The geometric points in Openness correspond to closed points of the geometric fiber. -/ |
| 156 | def geometricClosedPointEquiv [LocallyOfFiniteType T.hom] : |
| 157 | (geometricPoint S s ⟶ T) ≃ closedPoints (geometricFiberScheme T s) := by |
| 158 | let f : geometricFiberScheme T s ⟶ |
| 159 | Spec (.of (AlgebraicClosure (S.residueField s))) := geometricFiberMap T s |
| 160 | have : LocallyOfFiniteType f := by |
| 161 | exact geometricFiberMap_locallyOfFiniteType T s |
| 162 | exact (geometricFiberPointEquiv T s).trans (pointEquivClosedPoint f) |
| 163 | |
| 164 | /-- Over an algebraically closed field, a finite-type scheme with finitely |
| 165 | many rational points has finitely many underlying scheme points. -/ |
| 166 | theorem finite_geometricFiber_of_finite_points [LocallyOfFiniteType T.hom] |
| 167 | [Finite (geometricPoint S s ⟶ T)] : Finite (geometricFiberScheme T s) := by |
| 168 | have : Finite (closedPoints (geometricFiberScheme T s)) := |
| 169 | Finite.of_equiv _ (geometricClosedPointEquiv T s) |
| 170 | have : JacobsonSpace (geometricPoint S s).left := by |
| 171 | change JacobsonSpace (Spec (.of (AlgebraicClosure (S.residueField s)))) |
| 172 | infer_instance |
| 173 | have : JacobsonSpace (geometricFiberScheme T s) := |
| 174 | LocallyOfFiniteType.jacobsonSpace (geometricFiberMap T s) |
| 175 | have hfin : (closedPoints (geometricFiberScheme T s)).Finite := Set.toFinite _ |
| 176 | have : DiscreteTopology (geometricFiberScheme T s) := |
| 177 | JacobsonSpace.discreteTopology hfin |
| 178 | have : (Set.univ : Set (geometricFiberScheme T s)).Finite := by |
| 179 | simpa only [closedPoints_eq_univ] using hfin |
| 180 | exact Set.finite_univ_iff.mp this |
| 181 | |
| 182 | theorem geometricPoint_range : Set.range (geometricPoint S s).hom = {s} := by |
| 183 | ext t |
| 184 | constructor |
| 185 | · rintro ⟨x, rfl⟩ |
| 186 | exact S.fromSpecResidueField_apply s _ |
| 187 | · intro ht |
| 188 | have ht' : t = s := ht |
| 189 | subst t |
| 190 | refine ⟨IsLocalRing.closedPoint (AlgebraicClosure (S.residueField s)), ?_⟩ |
| 191 | exact S.fromSpecResidueField_apply s _ |
| 192 | |
| 193 | /-- Finitely many geometric points imply a finite set-theoretic fiber. -/ |
| 194 | theorem finite_preimage_of_finite_geometric_points [LocallyOfFiniteType T.hom] |
| 195 | [Finite (geometricPoint S s ⟶ T)] : (T.hom ⁻¹' {s}).Finite := by |
| 196 | have : Finite (geometricFiberScheme T s) := |
| 197 | finite_geometricFiber_of_finite_points T s |
| 198 | have h := Set.finite_range (pullback.fst T.hom (geometricPoint S s).hom) |
| 199 | rwa [Scheme.Pullback.range_fst, geometricPoint_range] at h |
| 200 | |
| 201 | /-- Properness turns a finite geometric fiber into finiteness over an open neighborhood. -/ |
| 202 | theorem exists_finite_neighborhood_of_finite_geometric_points [IsProper T.hom] |
| 203 | [Finite (geometricPoint S s ⟶ T)] : |
| 204 | ∃ U : S.Opens, s ∈ U ∧ IsFinite (T.hom ∣_ U) := by |
| 205 | exact exists_isFinite_morphismRestrict_of_finite_preimage_singleton T.hom s |
| 206 | (finite_preimage_of_finite_geometric_points T s) |
| 207 | |
| 208 | /-- At an ordinary point, the actual p-torsion scheme is finite over |
| 209 | some open neighborhood. No openness of ordinarity is used here. -/ |
| 210 | theorem exists_finite_torsion_neighborhood |
| 211 | (A : Over S) [GrpObj A] [IsProper A.hom] |
| 212 | (p : ℕ) [Fact p.Prime] (hs : IsOrdinaryAt p A s) : |
| 213 | ∃ U : S.Opens, s ∈ U ∧ IsFinite ((torsionScheme A p).hom ∣_ U) := by |
| 214 | have : Finite (geometricPoint S s ⟶ torsionScheme A p) := |
| 215 | finite_geometric_torsion_of_isOrdinaryAt A p s hs |
| 216 | exact exists_finite_neighborhood_of_finite_geometric_points (torsionScheme A p) s |
| 217 | |
| 218 | end ArithmeticGeometry.OrdinaryLocus.Openness.DefinitionsTorsion.Construction |
| 219 | |
| 220 | end |
| 221 | |
| 222 | end OAI |