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 |
| 2 | |
| 3 | /-! # Finite Etale -/ |
| 4 | |
| 5 | namespace OAI.AlgebraicGeometry.GroupSchemes.FiniteEtale |
| 6 | |
| 7 | noncomputable section |
| 8 | |
| 9 | /-! |
| 10 | # FiniteEtale: geometric objects and their functors of points |
| 11 | |
| 12 | A finite commutative group scheme is an actual group object on the spectrum |
| 13 | of a finite-dimensional commutative algebra. A p-divisible group is a tower |
| 14 | of these schemes with closed transition embeddings, the prescribed ranks, |
| 15 | and the defining torsion-kernel condition. That condition is tested on every |
| 16 | affine algebra, including nonreduced algebras. |
| 17 | |
| 18 | The standard targets are explicit towers of group-valued functors on affine |
| 19 | algebras. Their isomorphism type is tested naturally on all these algebras; |
| 20 | it is not a classification of geometric points or of Dieudonné modules. |
| 21 | No comparison theorem or classification is assumed in these definitions. |
| 22 | -/ |
| 23 | |
| 24 | open _root_.CategoryTheory Opposite _root_.AlgebraicGeometry |
| 25 | open _root_.CategoryTheory.MonoidalCategory _root_.CategoryTheory.CartesianMonoidalCategory |
| 26 | open _root_.CategoryTheory.MonObj |
| 27 | |
| 28 | universe u |
| 29 | |
| 30 | variable (k : Type u) [Field k] |
| 31 | |
| 32 | /-- The affine k-scheme represented by a commutative k-algebra. -/ |
| 33 | abbrev affine (R : CommAlgCat.{u} k) : Over (Spec (CommRingCat.of k)) := |
| 34 | (algSpec (CommRingCat.of k)).obj (op R) |
| 35 | |
| 36 | /-- A finite commutative group scheme, with an affine presentation. -/ |
| 37 | structure FiniteCommGroupScheme where |
| 38 | algebra : CommAlgCat.{u} k |
| 39 | finite : Module.Finite k algebra |
| 40 | group : CommGrpObj (affine k algebra) |
| 41 | |
| 42 | attribute [instance] FiniteCommGroupScheme.finite FiniteCommGroupScheme.group |
| 43 | |
| 44 | namespace FiniteCommGroupScheme |
| 45 | |
| 46 | variable {k} |
| 47 | |
| 48 | abbrev scheme (G : FiniteCommGroupScheme k) := affine k G.algebra |
| 49 | |
| 50 | /-- This presentation really gives a finite morphism to Spec k. -/ |
| 51 | instance finite_morphism (G : FiniteCommGroupScheme k) : IsFinite G.scheme.hom := by |
| 52 | change IsFinite (Spec.map (CommRingCat.ofHom (algebraMap k G.algebra))) |
| 53 | rw [IsFinite.SpecMap_iff] |
| 54 | exact RingHom.finite_algebraMap.mpr G.finite |
| 55 | |
| 56 | /-- Over a field the structure morphism is flat. -/ |
| 57 | instance flat_morphism (G : FiniteCommGroupScheme k) : Flat G.scheme.hom := by |
| 58 | change Flat (Spec.map (CommRingCat.ofHom (algebraMap k G.algebra))) |
| 59 | rw [Flat.SpecMap_iff] |
| 60 | exact RingHom.flat_algebraMap_iff.mpr inferInstance |
| 61 | |
| 62 | /-- All affine-valued points, retaining infinitesimal structure. -/ |
| 63 | def points (G : FiniteCommGroupScheme k) : CommAlgCat.{u} k ⥤ CommGrpCat.{u} where |
| 64 | obj R := CommGrpCat.of (affine k R ⟶ G.scheme) |
| 65 | map {R S} f := CommGrpCat.ofHom { |
| 66 | toFun := fun x => (algSpec (CommRingCat.of k)).map f.op ≫ x |
| 67 | map_one' := MonObj.comp_one _ |
| 68 | map_mul' := MonObj.comp_mul _ } |
| 69 | map_id R := by ext x; simp |
| 70 | map_comp f g := by ext x; simp [Category.assoc] |
| 71 | |
| 72 | /-- A group-scheme morphism induces a natural map on all affine points. -/ |
| 73 | def mapPoints {G H : FiniteCommGroupScheme k} (f : G.scheme ⟶ H.scheme) |
| 74 | [IsMonHom f] : G.points ⟶ H.points where |
| 75 | app R := CommGrpCat.ofHom { |
| 76 | toFun := fun x => x ≫ f |
| 77 | map_one' := MonObj.one_comp f |
| 78 | map_mul' := fun x y => MonObj.mul_comp x y f } |
| 79 | naturality R S g := by |
| 80 | apply CommGrpCat.hom_ext |
| 81 | apply MonoidHom.ext |
| 82 | intro x |
| 83 | change ((algSpec (CommRingCat.of k)).map g.op ≫ x) ≫ f = |
| 84 | (algSpec (CommRingCat.of k)).map g.op ≫ (x ≫ f) |
| 85 | exact Category.assoc _ _ _ |
| 86 | |
| 87 | /-- Recover the actual scheme morphism from a natural map on every affine algebra. -/ |
| 88 | def morphismOfPoints {G H : FiniteCommGroupScheme k} (α : G.points ⟶ H.points) : |
| 89 | G.scheme ⟶ H.scheme := |
| 90 | (α.app G.algebra) (𝟙 G.scheme) |
| 91 | |
| 92 | /-- A natural map on affine points is evaluation of the recovered scheme morphism. -/ |
| 93 | theorem morphismOfPoints_apply {G H : FiniteCommGroupScheme k} |
| 94 | (α : G.points ⟶ H.points) (R : CommAlgCat.{u} k) |
| 95 | (x : affine k R ⟶ G.scheme) : |
| 96 | (α.app R) x = x ≫ morphismOfPoints α := by |
| 97 | let a : op R ⟶ op G.algebra := |
| 98 | (algSpec.fullyFaithful (R := CommRingCat.of k)).preimage x |
| 99 | have ha : (algSpec (CommRingCat.of k)).map a = x := |
| 100 | (algSpec.fullyFaithful (R := CommRingCat.of k)).map_preimage x |
| 101 | have h := ConcreteCategory.congr_hom (α.naturality a.unop) (𝟙 G.scheme) |
| 102 | change (α.app R) ((algSpec (CommRingCat.of k)).map a ≫ 𝟙 G.scheme) = |
| 103 | (algSpec (CommRingCat.of k)).map a ≫ morphismOfPoints α at h |
| 104 | simpa only [ha, Category.comp_id] using h |
| 105 | |
| 106 | /-- An isomorphism on all affine-valued points gives an actual scheme isomorphism. |
| 107 | This rules out the loss of infinitesimal information caused by using only k-points. -/ |
| 108 | def schemeIsoOfPoints {G H : FiniteCommGroupScheme k} (e : G.points ≅ H.points) : |
| 109 | G.scheme ≅ H.scheme where |
| 110 | hom := morphismOfPoints e.hom |
| 111 | inv := morphismOfPoints e.inv |
| 112 | hom_inv_id := by |
| 113 | rw [← morphismOfPoints_apply e.inv G.algebra (morphismOfPoints e.hom)] |
| 114 | exact ConcreteCategory.congr_hom (NatTrans.congr_app e.hom_inv_id G.algebra) |
| 115 | (𝟙 G.scheme) |
| 116 | inv_hom_id := by |
| 117 | rw [← morphismOfPoints_apply e.hom H.algebra (morphismOfPoints e.inv)] |
| 118 | exact ConcreteCategory.congr_hom (NatTrans.congr_app e.inv_hom_id H.algebra) |
| 119 | (𝟙 H.scheme) |
| 120 | |
| 121 | end FiniteCommGroupScheme |
| 122 | |
| 123 | /-- A tower of affine group functors, with its actual transition maps. -/ |
| 124 | structure GroupTower where |
| 125 | level : ℕ → CommAlgCat.{u} k ⥤ CommGrpCat.{u} |
| 126 | inclusion : ∀ n, level n ⟶ level (n + 1) |
| 127 | |
| 128 | /-- An isomorphism of towers is natural in every algebra and commutes with |
| 129 | the inclusions at every level. -/ |
| 130 | structure GroupTower.Iso (G H : GroupTower k) where |
| 131 | levelIso : ∀ n, G.level n ≅ H.level n |
| 132 | compatibility : ∀ n, |
| 133 | G.inclusion n ≫ (levelIso (n + 1)).hom = |
| 134 | (levelIso n).hom ≫ H.inclusion n |
| 135 | |
| 136 | /-- The standard inductive-system definition of a p-divisible group of height h. |
| 137 | Finite flatness is proved above, rather than supplied as an unexplained model. |
| 138 | The image/kernel equality is evaluated on all affine test schemes. -/ |
| 139 | structure PDivisibleGroup (p h : ℕ) where |
| 140 | level : ℕ → FiniteCommGroupScheme k |
| 141 | inclusion : ∀ n, (level n).scheme ⟶ (level (n + 1)).scheme |
| 142 | inclusion_hom : ∀ n, IsMonHom (inclusion n) |
| 143 | inclusion_closed : ∀ n, IsClosedImmersion (inclusion n).left |
| 144 | rank : ∀ n, Module.finrank k (level n).algebra = p ^ (n * h) |
| 145 | kernel : ∀ n (R : CommAlgCat.{u} k) (x : affine k R ⟶ (level (n + 1)).scheme), |
| 146 | (∃ y : affine k R ⟶ (level n).scheme, y ≫ inclusion n = x) ↔ x ^ (p ^ n) = 1 |
| 147 | |
| 148 | attribute [instance] PDivisibleGroup.inclusion_hom PDivisibleGroup.inclusion_closed |
| 149 | |
| 150 | /-- The functor-of-points tower of an actual p-divisible group. -/ |
| 151 | def PDivisibleGroup.points {p h : ℕ} (G : PDivisibleGroup k p h) : GroupTower k where |
| 152 | level n := (G.level n).points |
| 153 | inclusion n := FiniteCommGroupScheme.mapPoints (G.inclusion n) |
| 154 | |
| 155 | /-- The defining kernel condition implies that every level is killed by p^n. -/ |
| 156 | theorem PDivisibleGroup.annihilated {p h : ℕ} (G : PDivisibleGroup k p h) |
| 157 | (n : ℕ) (R : CommAlgCat.{u} k) (x : affine k R ⟶ (G.level n).scheme) : |
| 158 | x ^ (p ^ n) = 1 := by |
| 159 | have : Mono (G.inclusion n).left := inferInstance |
| 160 | have : Mono (G.inclusion n) := Over.mono_of_mono_left (G.inclusion n) |
| 161 | apply (cancel_mono (G.inclusion n)).mp |
| 162 | rw [MonObj.pow_comp, MonObj.one_comp] |
| 163 | exact (G.kernel n R _).mp ⟨x, rfl⟩ |
| 164 | |
| 165 | /-- The cyclic transition j mod p^n ↦ p*j mod p^(n+1). -/ |
| 166 | def cyclicInclusion (p n : ℕ) : ZMod (p ^ n) →+ ZMod (p ^ (n + 1)) := |
| 167 | ZMod.lift (p ^ n) ⟨p • Int.castAddHom (ZMod (p ^ (n + 1))), by |
| 168 | simp only [AddMonoidHom.nsmul_apply, Int.coe_castAddHom, Int.cast_natCast] |
| 169 | rw [nsmul_eq_mul, ← Nat.cast_mul, ← pow_succ'] |
| 170 | exact ZMod.natCast_self _⟩ |
| 171 | |
| 172 | @[simp] |
| 173 | theorem cyclicInclusion_intCast (p n : ℕ) (z : ℤ) : |
| 174 | cyclicInclusion p n (z : ZMod (p ^ n)) = p • (z : ZMod (p ^ (n + 1))) := by |
| 175 | simp [cyclicInclusion] |
| 176 | |
| 177 | /-- The cyclic transition is an actual injection. -/ |
| 178 | theorem cyclicInclusion_injective (p n : ℕ) (hp : p ≠ 0) : |
| 179 | Function.Injective (cyclicInclusion p n) := by |
| 180 | apply (ZMod.lift_injective (p ^ n)).mpr |
| 181 | intro z hz |
| 182 | have hz' : (((p : ℤ) * z : ℤ) : ZMod (p ^ (n + 1))) = 0 := by |
| 183 | simpa [nsmul_eq_mul] using hz |
| 184 | rw [ZMod.intCast_zmod_eq_zero_iff_dvd] at hz' ⊢ |
| 185 | simpa only [Nat.cast_pow, Nat.cast_mul, pow_succ', mul_dvd_mul_iff_left (by exact_mod_cast hp : |
| 186 | (p : ℤ) ≠ 0)] using hz' |
| 187 | |
| 188 | /-- The constant cyclic group scheme on affine points. Locally constant |
| 189 | functions are necessary for disconnected test schemes. -/ |
| 190 | def etaleLevel (p n : ℕ) : CommAlgCat.{u} k ⥤ CommGrpCat.{u} where |
| 191 | obj R := CommGrpCat.of (LocallyConstant (PrimeSpectrum R) (Multiplicative (ZMod (p ^ n)))) |
| 192 | map {R S} f := CommGrpCat.ofHom (LocallyConstant.comapMonoidHom |
| 193 | ⟨PrimeSpectrum.comap f.hom.toRingHom, PrimeSpectrum.continuous_comap _⟩) |
| 194 | map_id R := by ext x y; simp [PrimeSpectrum.comap_id] |
| 195 | map_comp f g := by ext x y; rfl |
| 196 | |
| 197 | /-- The standard étale tower (Z/p^n)_k, denoted Q_p/Z_p. -/ |
| 198 | def etaleTower (p : ℕ) : GroupTower k where |
| 199 | level := etaleLevel k p |
| 200 | inclusion n := { |
| 201 | app R := CommGrpCat.ofHom (LocallyConstant.mapMonoidHom |
| 202 | (AddMonoidHom.toMultiplicative (cyclicInclusion p n))) |
| 203 | naturality R S f := by ext x; rfl } |
| 204 | |
| 205 | /-- The multiplicative finite group functor on all affine algebras. -/ |
| 206 | def multiplicativeLevel (p n : ℕ) : CommAlgCat.{u} k ⥤ CommGrpCat.{u} where |
| 207 | obj R := CommGrpCat.of (rootsOfUnity (p ^ n) R) |
| 208 | map {R S} f := CommGrpCat.ofHom (restrictRootsOfUnity f.hom (p ^ n)) |
| 209 | map_id R := by ext x; rfl |
| 210 | map_comp f g := by ext x; rfl |
| 211 | |
| 212 | /-- The standard tower μ_(p^n), denoted μ_(p^∞). -/ |
| 213 | def multiplicativeTower (p : ℕ) : GroupTower k where |
| 214 | level := multiplicativeLevel k p |
| 215 | inclusion n := { |
| 216 | app R := CommGrpCat.ofHom (Subgroup.inclusion |
| 217 | (rootsOfUnity_le_of_dvd (M := R) (pow_dvd_pow p (Nat.le_succ n)))) |
| 218 | naturality R S f := by ext x; rfl } |
| 219 | |
| 220 | /-- The multiplicative transition is an actual injection on every affine algebra. -/ |
| 221 | theorem multiplicativeTower_injective (p n : ℕ) (R : CommAlgCat.{u} k) : |
| 222 | Function.Injective ((multiplicativeTower k p).inclusion n |>.app R) := by |
| 223 | intro x y h |
| 224 | apply Subtype.ext |
| 225 | exact congrArg (fun z : rootsOfUnity (p ^ (n + 1)) R => (z : Rˣ)) h |
| 226 | |
| 227 | /-- The multiplicative tower has the required torsion kernels on all algebras. -/ |
| 228 | theorem multiplicativeTower_kernel (p n : ℕ) (R : CommAlgCat.{u} k) |
| 229 | (x : ((multiplicativeTower k p).level (n + 1)).obj R) : |
| 230 | (∃ y : ((multiplicativeTower k p).level n).obj R, |
| 231 | ((multiplicativeTower k p).inclusion n).app R y = x) ↔ x ^ (p ^ n) = 1 := by |
| 232 | constructor |
| 233 | · rintro ⟨y, rfl⟩ |
| 234 | apply Subtype.ext |
| 235 | exact (mem_rootsOfUnity _ _).mp y.property |
| 236 | · intro hx |
| 237 | refine ⟨⟨x.val, ?_⟩, rfl⟩ |
| 238 | exact (mem_rootsOfUnity _ _).mpr (congrArg Subtype.val hx) |
| 239 | |
| 240 | /-- The étale transition is an actual injection on every affine algebra. -/ |
| 241 | theorem etaleTower_injective (p n : ℕ) (hp : p ≠ 0) (R : CommAlgCat.{u} k) : |
| 242 | Function.Injective ((etaleTower k p).inclusion n |>.app R) := by |
| 243 | intro x y h |
| 244 | apply LocallyConstant.ext |
| 245 | intro z |
| 246 | apply cyclicInclusion_injective p n hp |
| 247 | exact congrArg (fun f : LocallyConstant (PrimeSpectrum R) |
| 248 | (Multiplicative (ZMod (p ^ (n + 1)))) => f z) h |
| 249 | |
| 250 | end |
| 251 | |
| 252 | end OAI.AlgebraicGeometry.GroupSchemes.FiniteEtale |