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.Pullbacks |
| 2 | import Mathlib.AlgebraicGeometry.Morphisms.Proper |
| 3 | import Mathlib.AlgebraicGeometry.Morphisms.SmoothFiber |
| 4 | import Mathlib.AlgebraicGeometry.Morphisms.SchemeTheoreticallyDominant |
| 5 | import Mathlib.AlgebraicGeometry.Geometrically.Connected |
| 6 | import Mathlib.AlgebraicGeometry.Geometrically.Reduced |
| 7 | import Mathlib.CategoryTheory.Monoidal.Cartesian.Grp |
| 8 | import Mathlib.RingTheory.DiscreteValuationRing.Basic |
| 9 | import Mathlib.AlgebraicGeometry.ValuativeCriterion |
| 10 | import Mathlib.AlgebraicGeometry.SpreadingOut |
| 11 | import Mathlib.AlgebraicGeometry.FunctionField |
| 12 | import Mathlib.AlgebraicGeometry.Sites.Fpqc |
| 13 | import Mathlib.AlgebraicGeometry.AlgClosed.Basic |
| 14 | import Mathlib.AlgebraicGeometry.Geometrically.Irreducible |
| 15 | import OAI.AlgebraicGeometry.AbelianScheme.HomExtensionLocalRings |
| 16 | |
| 17 | /-! # Hom Extension -/ |
| 18 | |
| 19 | namespace OAI.AlgebraicGeometry.AbelianScheme.HomExtension |
| 20 | |
| 21 | /-! |
| 22 | HomExtension: extension of homomorphisms of abelian schemes over a DVR. |
| 23 | The statement's geometric hypotheses are retained without importing its placeholder. |
| 24 | Properness and a codimension-one valuation stalk give an extension on an open |
| 25 | meeting the special fiber. Its difference map is a smooth surjection. Flat |
| 26 | descent constructs the global extension; schematic dominance proves uniqueness |
| 27 | and reflects preservation of the group laws. |
| 28 | -/ |
| 29 | |
| 30 | open _root_.CategoryTheory _root_.AlgebraicGeometry _root_.CategoryTheory.Limits MonoidalCategory |
| 31 | open scoped _root_.CategoryTheory.Obj |
| 32 | |
| 33 | universe u |
| 34 | |
| 35 | lemma hom_ext_of_schematic_dominance |
| 36 | {S : Scheme.{u}} {A B : Over S} [IsSeparated B.hom] |
| 37 | (f g : A ⟶ B) {W : Scheme.{u}} (ι : W ⟶ A.left) |
| 38 | [IsSchemeTheoreticallyDominant ι] |
| 39 | (h : ι ≫ f.left = ι ≫ g.left) : f = g := by |
| 40 | let W' : Over S := Over.mk (ι ≫ A.hom) |
| 41 | let i : W' ⟶ A := Over.homMk ι |
| 42 | have hi : i ≫ f = i ≫ g := Over.OverMorphism.ext h |
| 43 | let l := equalizer.lift i hi |
| 44 | have hl : l.left ≫ (equalizer.ι f g).left = ι := |
| 45 | congrArg Over.Hom.left (equalizer.lift_ι i hi) |
| 46 | have hk : (equalizer.ι f g).left.ker = ⊥ := by |
| 47 | apply le_antisymm _ bot_le |
| 48 | calc |
| 49 | (equalizer.ι f g).left.ker ≤ |
| 50 | (l.left ≫ (equalizer.ι f g).left).ker := |
| 51 | l.left.le_ker_comp _ |
| 52 | _ = ⊥ := by rw [hl, ι.ker_eq_bot] |
| 53 | have : IsIso (equalizer.ι f g).left := |
| 54 | IsClosedImmersion.isIso_iff_ker_eq_bot.mpr hk |
| 55 | apply Over.OverMorphism.ext |
| 56 | rw [← cancel_epi (equalizer.ι f g).left] |
| 57 | exact congrArg Over.Hom.left (equalizer.condition f g) |
| 58 | |
| 59 | lemma fraction_field_inclusion_dominant |
| 60 | {R K : Type u} [CommRing R] [IsDomain R] |
| 61 | [Field K] [Algebra R K] [IsFractionRing R K] : |
| 62 | IsDominant (Spec.map (CommRingCat.ofHom (algebraMap R K))) := by |
| 63 | constructor |
| 64 | change DenseRange (PrimeSpectrum.comap (algebraMap R K)) |
| 65 | rw [PrimeSpectrum.denseRange_comap_iff_ker_le_nilRadical] |
| 66 | rw [(RingHom.injective_iff_ker_eq_bot _).mp (IsFractionRing.injective R K)] |
| 67 | exact bot_le |
| 68 | |
| 69 | lemma generic_fiber_map_injective |
| 70 | {R K : Type u} |
| 71 | [CommRing R] [IsDomain R] |
| 72 | [Field K] [Algebra R K] [IsFractionRing R K] |
| 73 | (A B : Over (Spec (CommRingCat.of R))) |
| 74 | [Flat A.hom] [IsSeparated B.hom] : |
| 75 | Function.Injective |
| 76 | ((Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map |
| 77 | (X := A) (Y := B)) := by |
| 78 | let η := Spec.map (CommRingCat.ofHom (algebraMap R K)) |
| 79 | have : IsDominant η := fraction_field_inclusion_dominant |
| 80 | have : IsSchemeTheoreticallyDominant η := |
| 81 | IsSchemeTheoreticallyDominant.of_isDominant η |
| 82 | intro f g h |
| 83 | apply hom_ext_of_schematic_dominance f g (pullback.fst A.hom η) |
| 84 | have h' := congrArg (fun k => k.left ≫ pullback.fst B.hom η) h |
| 85 | dsimp [Over.pullback, η] at h' |
| 86 | simpa only [Over.homMk_left, pullback.lift_fst] using h' |
| 87 | |
| 88 | open scoped _root_.CategoryTheory.MonObj in |
| 89 | lemma isMonHom_of_generic_fiber |
| 90 | {R K : Type u} |
| 91 | [CommRing R] [IsDomain R] |
| 92 | [Field K] [Algebra R K] [IsFractionRing R K] |
| 93 | {A B : Over (Spec (CommRingCat.of R))} |
| 94 | [GrpObj A] [GrpObj B] |
| 95 | [Flat A.hom] [IsSeparated B.hom] |
| 96 | (f : A ⟶ B) |
| 97 | (hf : IsMonHom |
| 98 | ((Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map f)) : |
| 99 | IsMonHom f := by |
| 100 | let F := Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K))) |
| 101 | have : IsMonHom (F.map f) := hf |
| 102 | have : Flat (𝟙_ (Over (Spec (CommRingCat.of R)))).hom := by |
| 103 | dsimp |
| 104 | infer_instance |
| 105 | have : Flat (A ⊗ A).hom := by |
| 106 | dsimp |
| 107 | infer_instance |
| 108 | constructor |
| 109 | · apply generic_fiber_map_injective (K := K) (𝟙_ _) B |
| 110 | apply (cancel_epi (Functor.LaxMonoidal.ε F)).mp |
| 111 | simpa only [Functor.map_comp, Category.assoc, Functor.obj.η_def] |
| 112 | using (IsMonHom.one_hom (F.map f)) |
| 113 | · apply generic_fiber_map_injective (K := K) (A ⊗ A) B |
| 114 | apply (cancel_epi (Functor.LaxMonoidal.μ F A A)).mp |
| 115 | simpa only [Functor.map_comp, Category.assoc, Functor.obj.μ_def, |
| 116 | Functor.LaxMonoidal.μ_natural_assoc] |
| 117 | using (IsMonHom.mul_hom (F.map f)) |
| 118 | |
| 119 | lemma proper_map_extends_near_valuation_stalk |
| 120 | {X Y S : Scheme.{u}} [IsIntegral X] [IsLocallyNoetherian X] |
| 121 | (sX : X ⟶ S) (sY : Y ⟶ S) [IsProper sY] |
| 122 | (x : X) [ValuationRing (X.presheaf.stalk x)] |
| 123 | (φ : Spec X.functionField ⟶ Y) |
| 124 | (hφ : φ ≫ sY = X.fromSpecStalk (genericPoint X) ≫ sX) : |
| 125 | ∃ (U : X.Opens) (hxU : x ∈ U) (g : U.toScheme ⟶ Y), |
| 126 | g ≫ sY = U.ι ≫ sX ∧ |
| 127 | Spec.map (CommRingCat.ofHom |
| 128 | (algebraMap (X.presheaf.stalk x) X.functionField)) ≫ |
| 129 | U.fromSpecStalkOfMem x hxU ≫ g = φ := by |
| 130 | have hw : φ ≫ sY = |
| 131 | Spec.map (CommRingCat.ofHom |
| 132 | (algebraMap (X.presheaf.stalk x) X.functionField)) ≫ |
| 133 | (X.fromSpecStalk x ≫ sX) := by |
| 134 | rw [hφ, ← Category.assoc] |
| 135 | congr 1 |
| 136 | exact (Scheme.SpecMap_stalkSpecializes_fromSpecStalk |
| 137 | ((genericPoint_spec X).specializes (Set.mem_univ x))).symm |
| 138 | have : IsDomain (X.presheaf.stalk x) := inferInstance |
| 139 | let sq : ValuativeCommSq sY := |
| 140 | { R := X.presheaf.stalk x |
| 141 | commRing := inferInstanceAs (CommRing (X.presheaf.stalk x)) |
| 142 | domain := inferInstanceAs (IsDomain (X.presheaf.stalk x)) |
| 143 | valuationRing := inferInstanceAs (ValuationRing (X.presheaf.stalk x)) |
| 144 | K := X.functionField |
| 145 | field := inferInstanceAs (Field X.functionField) |
| 146 | algebra := inferInstanceAs (Algebra (X.presheaf.stalk x) X.functionField) |
| 147 | isFractionRing := inferInstanceAs (IsFractionRing (X.presheaf.stalk x) X.functionField) |
| 148 | i₁ := φ |
| 149 | i₂ := X.fromSpecStalk x ≫ sX |
| 150 | commSq := ⟨hw⟩ } |
| 151 | have H : ValuativeCriterion.Existence sY := |
| 152 | ((congrFun (congrFun (congrFun UniversallyClosed.eq_valuativeCriterion Y) S) sY).mp |
| 153 | (inferInstance : UniversallyClosed sY)).1 |
| 154 | obtain ⟨l, hl₁, hl₂⟩ := (H sq).exists_lift |
| 155 | obtain ⟨U, hxU, g, hg, hgbase⟩ := |
| 156 | spread_out_of_isGermInjective' sX sY (x := x) l hl₂ |
| 157 | refine ⟨U, hxU, g, hgbase, ?_⟩ |
| 158 | rw [← hg] |
| 159 | exact hl₁ |
| 160 | |
| 161 | lemma pullback_map_property |
| 162 | {S T : Scheme.{u}} (e : T ⟶ S) {A B : Over S} (f : A ⟶ B) |
| 163 | (P : MorphismProperty Scheme.{u}) [P.IsStableUnderBaseChange] |
| 164 | (hf : P f.left) : P ((Over.pullback e).map f).left := by |
| 165 | change P (pullback.lift (pullback.fst A.hom e ≫ f.left) |
| 166 | (pullback.snd A.hom e) _) |
| 167 | exact P.pullbackLift_fst_snd e f.w.symm hf |
| 168 | |
| 169 | /-- A generic morphism which extends on a flat cover descends to the base scheme. -/ |
| 170 | lemma descend_generic_map_from_flat_cover |
| 171 | {R K : Type u} [CommRing R] [IsDomain R] |
| 172 | [Field K] [Algebra R K] [IsFractionRing R K] |
| 173 | {A B D : Over (Spec (.of R))} |
| 174 | [Flat D.hom] [IsSeparated B.hom] |
| 175 | (p : D ⟶ A) [Flat p.left] [Surjective p.left] [QuasiCompact p.left] |
| 176 | (fK : (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).obj A ⟶ |
| 177 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).obj B) |
| 178 | (g : D ⟶ B) |
| 179 | (hg : (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map p ≫ fK = |
| 180 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map g) : |
| 181 | ∃ f : A ⟶ B, |
| 182 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map f = fK := by |
| 183 | let F := Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K))) |
| 184 | let W : Over (Spec (.of R)) := Over.mk (pullback.fst p.left p.left ≫ D.hom) |
| 185 | change F.map p ≫ fK = F.map g at hg |
| 186 | let a : W ⟶ D := Over.homMk (pullback.fst p.left p.left) |
| 187 | let b : W ⟶ D := Over.homMk (pullback.snd p.left p.left) (by |
| 188 | dsimp [W] |
| 189 | rw [← p.w, pullback.condition_assoc]) |
| 190 | have hab : a ≫ p = b ≫ p := Over.OverMorphism.ext pullback.condition |
| 191 | have : Flat W.hom := by dsimp [W]; infer_instance |
| 192 | have hgg : a ≫ g = b ≫ g := by |
| 193 | apply generic_fiber_map_injective (K := K) W B |
| 194 | change F.map (a ≫ g) = F.map (b ≫ g) |
| 195 | rw [F.map_comp, F.map_comp, ← hg, ← Category.assoc, |
| 196 | ← Category.assoc, ← F.map_comp, ← F.map_comp, hab] |
| 197 | have hgg' : pullback.fst p.left p.left ≫ g.left = |
| 198 | pullback.snd p.left p.left ≫ g.left := congrArg Over.Hom.left hgg |
| 199 | obtain ⟨f, hf⟩ := IsRegularEpi.exists_of_isKernelPair p.left |
| 200 | (IsKernelPair.of_hasPullback p.left) g.left hgg' |
| 201 | have hbase : f ≫ B.hom = A.hom := by |
| 202 | rw [← cancel_epi p.left, ← Category.assoc, hf, g.w, p.w] |
| 203 | let f' : A ⟶ B := Over.homMk f hbase |
| 204 | have hpf : p ≫ f' = g := Over.OverMorphism.ext hf |
| 205 | have : Flat (F.map p).left := pullback_map_property _ p _ inferInstance |
| 206 | have : Surjective (F.map p).left := pullback_map_property _ p _ inferInstance |
| 207 | have : Epi (F.map p).left := Flat.epi_of_flat_of_surjective _ |
| 208 | have : Epi (F.map p) := Over.epi_of_epi_left _ |
| 209 | refine ⟨f', ?_⟩ |
| 210 | change F.map f' = fK |
| 211 | rw [← cancel_epi (F.map p), ← F.map_comp, hpf] |
| 212 | exact hg.symm |
| 213 | |
| 214 | open scoped _root_.CategoryTheory.MonObj in |
| 215 | open CartesianMonoidalCategory in |
| 216 | lemma extend_hom_from_difference_cover |
| 217 | {R K : Type u} [CommRing R] [IsDomain R] |
| 218 | [Field K] [Algebra R K] [IsFractionRing R K] |
| 219 | {A B U : Over (Spec (.of R))} [GrpObj A] [GrpObj B] |
| 220 | [Flat A.hom] [Flat U.hom] [IsSeparated B.hom] |
| 221 | (u : U ⟶ A) |
| 222 | [Flat ((fst U U ≫ u) / (snd U U ≫ u)).left] |
| 223 | [Surjective ((fst U U ≫ u) / (snd U U ≫ u)).left] |
| 224 | [QuasiCompact ((fst U U ≫ u) / (snd U U ≫ u)).left] |
| 225 | (fK : (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).obj A ⟶ |
| 226 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).obj B) |
| 227 | [IsMonHom fK] (g : U ⟶ B) |
| 228 | (hg : (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map u ≫ fK = |
| 229 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map g) : |
| 230 | ∃! f : A ⟶ B, |
| 231 | IsMonHom f ∧ |
| 232 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map f = fK := by |
| 233 | let F := Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K))) |
| 234 | change F.map u ≫ fK = F.map g at hg |
| 235 | let d : U ⊗ U ⟶ A := (fst U U ≫ u) / (snd U U ≫ u) |
| 236 | let h : U ⊗ U ⟶ B := (fst U U ≫ g) / (snd U U ≫ g) |
| 237 | have : Flat (U ⊗ U).hom := by dsimp; infer_instance |
| 238 | have hcompat : F.map d ≫ fK = F.map h := by |
| 239 | dsimp [d, h] |
| 240 | simp only [div_eq_mul_inv, Functor.map_mul, Functor.map_inv', Functor.map_comp, |
| 241 | MonObj.mul_comp, GrpObj.inv_comp, Category.assoc, hg] |
| 242 | obtain ⟨f, hf⟩ := descend_generic_map_from_flat_cover d fK h hcompat |
| 243 | refine ⟨f, ⟨?_, hf⟩, ?_⟩ |
| 244 | · apply isMonHom_of_generic_fiber (K := K) f |
| 245 | rw [hf] |
| 246 | infer_instance |
| 247 | · intro f' hf' |
| 248 | exact generic_fiber_map_injective (K := K) A B (hf'.2.trans hf.symm) |
| 249 | |
| 250 | open scoped _root_.CategoryTheory.MonObj in |
| 251 | open CartesianMonoidalCategory in |
| 252 | noncomputable def differenceShear {S : Scheme.{u}} (A : Over S) [GrpObj A] : |
| 253 | A ⊗ A ≅ A ⊗ A where |
| 254 | hom := lift (fst A A / snd A A) (snd A A) |
| 255 | inv := lift (fst A A * snd A A) (snd A A) |
| 256 | hom_inv_id := by |
| 257 | apply hom_ext <;> simp [MonObj.comp_mul] |
| 258 | inv_hom_id := by |
| 259 | apply hom_ext <;> simp [GrpObj.comp_div] |
| 260 | |
| 261 | open scoped _root_.CategoryTheory.MonObj in |
| 262 | open CartesianMonoidalCategory in |
| 263 | lemma smooth_difference_of_open_immersion |
| 264 | {S : Scheme.{u}} {A U : Over S} [GrpObj A] [Smooth A.hom] |
| 265 | (u : U ⟶ A) [IsOpenImmersion u.left] : |
| 266 | Smooth ((fst U U ≫ u) / (snd U U ≫ u)).left := by |
| 267 | have : Smooth (fst A A).left := by dsimp; infer_instance |
| 268 | have : IsOpenImmersion (u ⊗ₘ u).left := by |
| 269 | change IsOpenImmersion (pullback.map U.hom U.hom A.hom A.hom |
| 270 | u.left u.left (𝟙 S) (by simp) (by simp)) |
| 271 | infer_instance |
| 272 | have : IsIso (differenceShear A).hom.left := |
| 273 | inferInstanceAs (IsIso ((Over.forget S).map (differenceShear A).hom)) |
| 274 | have h : (u ⊗ₘ u) ≫ (differenceShear A).hom ≫ fst A A = |
| 275 | (fst U U ≫ u) / (snd U U ≫ u) := by |
| 276 | simp [differenceShear, GrpObj.comp_div] |
| 277 | rw [← h] |
| 278 | change Smooth ((u ⊗ₘ u).left ≫ (differenceShear A).hom.left ≫ (fst A A).left) |
| 279 | infer_instance |
| 280 | |
| 281 | lemma lift_field_point_to_open |
| 282 | {k : Type u} [Field k] {A U : Over (Spec (.of k))} |
| 283 | (u : U ⟶ A) [IsOpenImmersion u.left] |
| 284 | (a : 𝟙_ (Over (Spec (.of k))) ⟶ A) |
| 285 | (ha : a.left (IsLocalRing.closedPoint k) ∈ Set.range u.left) : |
| 286 | ∃ l : 𝟙_ (Over (Spec (.of k))) ⟶ U, l ≫ u = a := by |
| 287 | have : Subsingleton (𝟙_ (Over (Spec (.of k)))).left := |
| 288 | inferInstanceAs (Subsingleton (Spec (.of k))) |
| 289 | have hrange : Set.range a.left ⊆ Set.range u.left := by |
| 290 | rintro _ ⟨t, rfl⟩ |
| 291 | have ht : t = IsLocalRing.closedPoint k := Subsingleton.elim _ _ |
| 292 | simpa only [ht] using ha |
| 293 | let l := IsOpenImmersion.lift u.left a.left hrange |
| 294 | have hl : l ≫ u.left = a.left := IsOpenImmersion.lift_fac _ _ _ |
| 295 | have hb : l ≫ U.hom = (𝟙_ (Over (Spec (.of k)))).hom := by |
| 296 | rw [← u.w, ← Category.assoc, hl, a.w] |
| 297 | exact ⟨Over.homMk l hb, Over.OverMorphism.ext hl⟩ |
| 298 | |
| 299 | open scoped _root_.CategoryTheory.MonObj in |
| 300 | open CartesianMonoidalCategory in |
| 301 | lemma difference_surjective_over_algebraically_closed_field |
| 302 | {k : Type u} [Field k] [IsAlgClosed k] |
| 303 | {A U : Over (Spec (.of k))} [GrpObj A] [IsCommMonObj A] |
| 304 | [Smooth A.hom] [IrreducibleSpace A.left] [Nonempty U.left] |
| 305 | (u : U ⟶ A) [IsOpenImmersion u.left] : |
| 306 | Surjective ((fst U U ≫ u) / (snd U U ≫ u)).left := by |
| 307 | let d : U ⊗ U ⟶ A := (fst U U ≫ u) / (snd U U ≫ u) |
| 308 | have : Smooth d.left := smooth_difference_of_open_immersion u |
| 309 | have : JacobsonSpace A.left := LocallyOfFiniteType.jacobsonSpace A.hom |
| 310 | constructor |
| 311 | intro x |
| 312 | by_contra hx |
| 313 | have hn : ((Set.range d.left)ᶜ).Nonempty := ⟨x, hx⟩ |
| 314 | obtain ⟨z, hz, hzc⟩ := nonempty_inter_closedPoints hn |
| 315 | d.left.isOpenMap.isOpen_range.isClosed_compl.isLocallyClosed |
| 316 | let z' : 𝟙_ (Over (Spec (.of k))) ⟶ A := |
| 317 | Over.homMk (pointOfClosedPoint A.hom z hzc) (pointOfClosedPoint_comp A.hom z hzc) |
| 318 | let α := GrpObj.mulRight z' |
| 319 | have : IsIso α.hom.left := inferInstanceAs |
| 320 | (IsIso ((Over.forget (Spec (.of k))).map α.hom)) |
| 321 | let V := u.left.opensRange |
| 322 | have hV : (V : Set A.left).Nonempty := Set.range_nonempty u.left |
| 323 | have hαV : (α.hom.left ⁻¹ᵁ V : Set A.left).Nonempty := |
| 324 | hV.preimage α.hom.left.surjective |
| 325 | have hT : ((V ⊓ α.hom.left ⁻¹ᵁ V : A.left.Opens) : Set A.left).Nonempty := by |
| 326 | simpa only [TopologicalSpace.Opens.coe_inf, Set.inter_comm] using |
| 327 | (V.isOpen.dense hV).inter_open_nonempty _ (α.hom.left ⁻¹ᵁ V).isOpen hαV |
| 328 | obtain ⟨b, hb, hbc⟩ := nonempty_inter_closedPoints hT |
| 329 | (V ⊓ α.hom.left ⁻¹ᵁ V).isOpen.isLocallyClosed |
| 330 | let b' : 𝟙_ (Over (Spec (.of k))) ⟶ A := |
| 331 | Over.homMk (pointOfClosedPoint A.hom b hbc) (pointOfClosedPoint_comp A.hom b hbc) |
| 332 | have hbpoint : b'.left (IsLocalRing.closedPoint k) = b := |
| 333 | pointOfClosedPoint_apply A.hom b hbc _ |
| 334 | obtain ⟨lb, hlb⟩ := lift_field_point_to_open u b' (by |
| 335 | rw [hbpoint] |
| 336 | exact hb.1) |
| 337 | obtain ⟨la, hla⟩ := lift_field_point_to_open u (b' ≫ α.hom) (by |
| 338 | change α.hom.left (b'.left (IsLocalRing.closedPoint k)) ∈ Set.range u.left |
| 339 | rw [hbpoint] |
| 340 | exact hb.2) |
| 341 | have htrans : b' ≫ α.hom = b' * z' := by |
| 342 | dsimp [α, GrpObj.mulRight] |
| 343 | rw [Hom.mul_def, ← Category.assoc, comp_lift] |
| 344 | simp |
| 345 | let q := lift la lb |
| 346 | have hq : q ≫ d = z' := by |
| 347 | simp [q, d, GrpObj.comp_div, hla, hlb, htrans] |
| 348 | apply hz |
| 349 | refine ⟨q.left (IsLocalRing.closedPoint k), ?_⟩ |
| 350 | calc |
| 351 | d.left (q.left (IsLocalRing.closedPoint k)) = |
| 352 | (q ≫ d).left (IsLocalRing.closedPoint k) := rfl |
| 353 | _ = z'.left (IsLocalRing.closedPoint k) := congrArg |
| 354 | (fun f => f.left (IsLocalRing.closedPoint k)) hq |
| 355 | _ = z := pointOfClosedPoint_apply A.hom z hzc _ |
| 356 | |
| 357 | open scoped _root_.CategoryTheory.MonObj in |
| 358 | open CartesianMonoidalCategory in |
| 359 | lemma pullback_difference |
| 360 | {S T : Scheme.{u}} (e : T ⟶ S) {A U : Over S} [GrpObj A] (u : U ⟶ A) : |
| 361 | Functor.LaxMonoidal.μ (Over.pullback e) U U ≫ |
| 362 | (Over.pullback e).map ((fst U U ≫ u) / (snd U U ≫ u)) = |
| 363 | (fst ((Over.pullback e).obj U) ((Over.pullback e).obj U) ≫ |
| 364 | (Over.pullback e).map u) / |
| 365 | (snd ((Over.pullback e).obj U) ((Over.pullback e).obj U) ≫ |
| 366 | (Over.pullback e).map u) := by |
| 367 | simp only [div_eq_mul_inv, Functor.map_mul, Functor.map_inv', Functor.map_comp, |
| 368 | MonObj.comp_mul, GrpObj.comp_inv, ← Category.assoc, |
| 369 | Functor.Monoidal.μ_fst, Functor.Monoidal.μ_snd] |
| 370 | |
| 371 | lemma pullback_map_fst |
| 372 | {S T : Scheme.{u}} (e : T ⟶ S) {A B : Over S} (f : A ⟶ B) : |
| 373 | ((Over.pullback e).map f).left ≫ pullback.fst B.hom e = |
| 374 | pullback.fst A.hom e ≫ f.left := by |
| 375 | change pullback.lift _ _ _ ≫ pullback.fst B.hom e = _ |
| 376 | exact pullback.lift_fst _ _ _ |
| 377 | |
| 378 | open scoped _root_.CategoryTheory.MonObj in |
| 379 | open CartesianMonoidalCategory in |
| 380 | lemma difference_surjective_of_geometrically_irreducible |
| 381 | {S : Scheme.{u}} {A U : Over S} [GrpObj A] [IsCommMonObj A] |
| 382 | [Smooth A.hom] [GeometricallyIrreducible A.hom] [Surjective U.hom] |
| 383 | (u : U ⟶ A) [IsOpenImmersion u.left] : |
| 384 | Surjective ((fst U U ≫ u) / (snd U U ≫ u)).left := by |
| 385 | let d : U ⊗ U ⟶ A := (fst U U ≫ u) / (snd U U ≫ u) |
| 386 | constructor |
| 387 | intro x |
| 388 | let Ω := AlgebraicClosure (A.left.residueField x) |
| 389 | let qx : Spec (.of Ω) ⟶ A.left := |
| 390 | Spec.map (CommRingCat.ofHom (algebraMap (A.left.residueField x) Ω)) ≫ |
| 391 | A.left.fromSpecResidueField x |
| 392 | let e := qx ≫ A.hom |
| 393 | let F := Over.pullback e |
| 394 | have : Smooth (F.obj A).hom := by dsimp [F]; infer_instance |
| 395 | have : IrreducibleSpace (F.obj A).left := |
| 396 | GeometricallyIrreducible.geometrically_irreducibleSpace e _ _ |
| 397 | (IsPullback.of_hasPullback A.hom e) |
| 398 | have : Nonempty (F.obj U).left := |
| 399 | ⟨((pullback.snd U.hom e).surjective (IsLocalRing.closedPoint Ω)).choose⟩ |
| 400 | have : IsOpenImmersion (F.map u).left := pullback_map_property e u _ inferInstance |
| 401 | have hd := difference_surjective_over_algebraically_closed_field (F.map u) |
| 402 | have hcomp : Surjective ((Functor.LaxMonoidal.μ F U U).left ≫ (F.map d).left) := by |
| 403 | change Surjective (Functor.LaxMonoidal.μ F U U ≫ F.map d).left |
| 404 | rw [show Functor.LaxMonoidal.μ F U U ≫ F.map d = _ from pullback_difference e u] |
| 405 | exact hd |
| 406 | have : Surjective (F.map d).left := |
| 407 | Surjective.of_comp (Functor.LaxMonoidal.μ F U U).left (F.map d).left |
| 408 | let a : Spec (.of Ω) ⟶ (F.obj A).left := pullback.lift qx (𝟙 _) (by simp [e]) |
| 409 | obtain ⟨y, hy⟩ := (F.map d).left.surjective (a (IsLocalRing.closedPoint Ω)) |
| 410 | refine ⟨(pullback.fst (U ⊗ U).hom e) y, ?_⟩ |
| 411 | change d.left ((pullback.fst (U ⊗ U).hom e) y) = x |
| 412 | calc |
| 413 | d.left ((pullback.fst (U ⊗ U).hom e) y) = |
| 414 | (pullback.fst A.hom e) ((F.map d).left y) := |
| 415 | congrArg (fun f => f y) (pullback_map_fst e d).symm |
| 416 | _ = (pullback.fst A.hom e) (a (IsLocalRing.closedPoint Ω)) := by rw [hy] |
| 417 | _ = x := by |
| 418 | change (a ≫ pullback.fst A.hom e) (IsLocalRing.closedPoint Ω) = x |
| 419 | have ha : a ≫ pullback.fst A.hom e = qx := pullback.lift_fst _ _ _ |
| 420 | rw [ha] |
| 421 | change A.left.fromSpecResidueField x _ = x |
| 422 | exact A.left.fromSpecResidueField_apply x _ |
| 423 | |
| 424 | lemma generic_point_map_dominant (X : Scheme.{u}) [IsIntegral X] : |
| 425 | IsDominant (X.fromSpecStalk (genericPoint X)) := by |
| 426 | constructor |
| 427 | rw [denseRange_iff_closure_range, Set.eq_univ_iff_forall] |
| 428 | intro x |
| 429 | apply (genericPoint_specializes x).mem_closed isClosed_closure |
| 430 | apply subset_closure |
| 431 | exact ⟨IsLocalRing.closedPoint X.functionField, X.fromSpecStalk_closedPoint⟩ |
| 432 | |
| 433 | lemma generic_point_lifts_to_generic_fiber |
| 434 | {R K : Type u} [CommRing R] [IsDomain R] [IsDiscreteValuationRing R] |
| 435 | [Field K] [Algebra R K] [IsFractionRing R K] |
| 436 | (A : Over (Spec (.of R))) [Flat A.hom] [IsIntegral A.left] : |
| 437 | ∃ l : Spec A.left.functionField ⟶ |
| 438 | ((Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).obj A).left, |
| 439 | l ≫ pullback.fst A.hom (Spec.map (CommRingCat.ofHom (algebraMap R K))) = |
| 440 | A.left.fromSpecStalk (genericPoint A.left) := by |
| 441 | let e := Spec.map (CommRingCat.ofHom (algebraMap R K)) |
| 442 | have : IsOpenImmersion e := HomExtensionLocalRings.LocalRings.fraction_inclusion_isOpenImmersion |
| 443 | have : IsDominant e := fraction_field_inclusion_dominant |
| 444 | have : IsSchemeTheoreticallyDominant e := IsSchemeTheoreticallyDominant.of_isDominant e |
| 445 | let j := pullback.fst A.hom e |
| 446 | let t := Classical.choice j.denseRange.nonempty |
| 447 | have hj : genericPoint A.left ∈ j.opensRange := |
| 448 | (genericPoint_specializes (j t)).mem_open j.opensRange.isOpen ⟨t, rfl⟩ |
| 449 | have : Subsingleton (Spec (A.left.presheaf.stalk (genericPoint A.left))) := |
| 450 | inferInstanceAs (Subsingleton (Spec (.of A.left.functionField))) |
| 451 | have hr : Set.range (A.left.fromSpecStalk (genericPoint A.left)) ⊆ Set.range j := by |
| 452 | rintro _ ⟨t, rfl⟩ |
| 453 | have ht : t = IsLocalRing.closedPoint A.left.functionField := Subsingleton.elim _ _ |
| 454 | rw [ht, A.left.fromSpecStalk_closedPoint] |
| 455 | exact hj |
| 456 | exact ⟨IsOpenImmersion.lift j _ hr, IsOpenImmersion.lift_fac _ _ _⟩ |
| 457 | |
| 458 | lemma exists_open_extension_over_dvr |
| 459 | {R K : Type u} [CommRing R] [IsDomain R] [IsDiscreteValuationRing R] |
| 460 | [Field K] [Algebra R K] [IsFractionRing R K] |
| 461 | (A B : Over (Spec (.of R))) [Smooth A.hom] [Surjective A.hom] |
| 462 | [IsIntegral A.left] [AlgebraicGeometry.IsNoetherian A.left] [IsProper B.hom] |
| 463 | (fK : (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).obj A ⟶ |
| 464 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).obj B) : |
| 465 | ∃ V : A.left.Opens, |
| 466 | let U : Over (Spec (.of R)) := Over.mk (V.ι ≫ A.hom) |
| 467 | let u : U ⟶ A := Over.homMk V.ι |
| 468 | ∃ g : U ⟶ B, Surjective U.hom ∧ |
| 469 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map u ≫ fK = |
| 470 | (Over.pullback (Spec.map (CommRingCat.ofHom (algebraMap R K)))).map g := by |
| 471 | let e := Spec.map (CommRingCat.ofHom (algebraMap R K)) |
| 472 | let F := Over.pullback e |
| 473 | have : IsOpenImmersion e := HomExtensionLocalRings.LocalRings.fraction_inclusion_isOpenImmersion |
| 474 | obtain ⟨x, hxbase, hxcodim⟩ := HomExtensionLocalRings.LocalRings.exists_codimension_one_in_special_fiber A.hom |
| 475 | have : IsDiscreteValuationRing (A.left.presheaf.stalk x) := |
| 476 | HomExtensionLocalRings.LocalRings.smooth_stalk_isDiscreteValuationRing A.hom x hxcodim |
| 477 | obtain ⟨l, hl⟩ := generic_point_lifts_to_generic_fiber (K := K) A |
| 478 | have hfK : fK.left ≫ pullback.snd B.hom e = pullback.snd A.hom e := fK.w |
| 479 | let φ := l ≫ fK.left ≫ pullback.fst B.hom e |
| 480 | have hφ : φ ≫ B.hom = A.left.fromSpecStalk (genericPoint A.left) ≫ A.hom := by |
| 481 | calc |
| 482 | φ ≫ B.hom = l ≫ fK.left ≫ pullback.snd B.hom e ≫ e := by |
| 483 | dsimp [φ] |
| 484 | rw [Category.assoc, Category.assoc, pullback.condition] |
| 485 | _ = l ≫ pullback.snd A.hom e ≫ e := by |
| 486 | rw [← Category.assoc fK.left, hfK] |
| 487 | _ = l ≫ pullback.fst A.hom e ≫ A.hom := by rw [pullback.condition] |
| 488 | _ = A.left.fromSpecStalk (genericPoint A.left) ≫ A.hom := by |
| 489 | rw [← Category.assoc, hl] |
| 490 | obtain ⟨V, hxV, g, hgbase, hφg⟩ := |
| 491 | proper_map_extends_near_valuation_stalk A.hom B.hom x φ hφ |
| 492 | let U : Over (Spec (.of R)) := Over.mk (V.ι ≫ A.hom) |
| 493 | let u : U ⟶ A := Over.homMk V.ι |
| 494 | let g' : U ⟶ B := Over.homMk g hgbase |
| 495 | have : Smooth U.hom := by dsimp [U]; infer_instance |
| 496 | have hsurj : Surjective U.hom := by |
| 497 | constructor |
| 498 | intro s |
| 499 | exact (IsLocalRing.specializes_closedPoint s).mem_open U.hom.isOpenMap.isOpen_range |
| 500 | (show IsLocalRing.closedPoint R ∈ Set.range U.hom from ⟨⟨x, hxV⟩, hxbase⟩) |
| 501 | refine ⟨V, g', hsurj, ?_⟩ |
| 502 | change F.map u ≫ fK = F.map g' |
| 503 | let aV := Spec.map (CommRingCat.ofHom |
| 504 | (algebraMap (A.left.presheaf.stalk x) A.left.functionField)) ≫ |
| 505 | V.fromSpecStalkOfMem x hxV |
| 506 | have haV : aV ≫ V.ι = A.left.fromSpecStalk (genericPoint A.left) := by |
| 507 | dsimp [aV] |
| 508 | rw [Category.assoc, V.fromSpecStalkOfMem_ι] |
| 509 | exact Scheme.SpecMap_stalkSpecializes_fromSpecStalk |
| 510 | ((genericPoint_spec A.left).specializes (Set.mem_univ x)) |
| 511 | let aK : Spec A.left.functionField ⟶ (F.obj U).left := |
| 512 | pullback.lift aV (l ≫ pullback.snd A.hom e) (by |
| 513 | change aV ≫ V.ι ≫ A.hom = (l ≫ pullback.snd A.hom e) ≫ e |
| 514 | rw [← Category.assoc aV, haV, ← hl, Category.assoc, pullback.condition, |
| 515 | Category.assoc]) |
| 516 | have haK : aK ≫ pullback.fst U.hom e = aV := pullback.lift_fst _ _ _ |
| 517 | have hau : aK ≫ (F.map u).left = l := by |
| 518 | rw [← cancel_mono (pullback.fst A.hom e), Category.assoc, |
| 519 | pullback_map_fst e u, ← Category.assoc, haK] |
| 520 | exact haV.trans hl.symm |
| 521 | let j := pullback.fst U.hom e ≫ V.ι |
| 522 | have haj : aK ≫ j = A.left.fromSpecStalk (genericPoint A.left) := by |
| 523 | rw [← Category.assoc, haK] |
| 524 | exact haV |
| 525 | have : IsDominant (aK ≫ j) := haj.symm ▸ generic_point_map_dominant A.left |
| 526 | have : IsDominant aK := IsDominant.of_comp_of_isOpenImmersion aK j |
| 527 | have : IsReduced (F.obj U).left := isReduced_of_isOpenImmersion j |
| 528 | have hbase (q : F.obj U ⟶ F.obj B) : |
| 529 | (q.left ≫ pullback.fst B.hom e) ≫ B.hom = (F.obj U).hom ≫ e := by |
| 530 | have hq : q.left ≫ pullback.snd B.hom e = (F.obj U).hom := q.w |
| 531 | rw [Category.assoc, pullback.condition, ← Category.assoc, hq] |
| 532 | apply Over.OverMorphism.ext |
| 533 | apply (cancel_mono (pullback.fst B.hom e)).mp |
| 534 | apply ext_of_isDominant_of_isSeparated B.hom |
| 535 | ((hbase (F.map u ≫ fK)).trans (hbase (F.map g')).symm) aK |
| 536 | calc |
| 537 | aK ≫ ((F.map u ≫ fK).left ≫ pullback.fst B.hom e) = φ := by |
| 538 | change aK ≫ ((F.map u).left ≫ fK.left) ≫ pullback.fst B.hom e = φ |
| 539 | rw [← Category.assoc aK, ← Category.assoc aK, hau] |
| 540 | rfl |
| 541 | _ = aV ≫ g := hφg.symm |
| 542 | _ = aK ≫ ((F.map g').left ≫ pullback.fst B.hom e) := by |
| 543 | rw [pullback_map_fst e g', ← Category.assoc, haK] |
| 544 | rfl |
| 545 | |
| 546 | theorem neron_extension_of_abelian_hom |
| 547 | {R K : Type u} |
| 548 | [CommRing R] [IsDomain R] [IsDiscreteValuationRing R] |
| 549 | [Field K] [Algebra R K] [IsFractionRing R K] |
| 550 | (A B : Over (Spec (CommRingCat.of R))) |
| 551 | [GrpObj A] [IsCommMonObj A] |
| 552 | [GrpObj B] [IsCommMonObj B] |
| 553 | [IsProper A.hom] [Smooth A.hom] |
| 554 | [GeometricallyConnected A.hom] |
| 555 | [IsProper B.hom] [Smooth B.hom] |
| 556 | [GeometricallyConnected B.hom] : |
| 557 | let η := Spec.map (CommRingCat.ofHom (algebraMap R K)) |
| 558 | let genericFiber := Over.pullback η |
| 559 | ∀ fK : genericFiber.obj A ⟶ genericFiber.obj B, |
| 560 | IsMonHom fK → |
| 561 | ∃! f : A ⟶ B, |
| 562 | IsMonHom f ∧ genericFiber.map f = fK := by |
| 563 | dsimp only |
| 564 | intro fK hfK |
| 565 | have : IsMonHom fK := hfK |
| 566 | have : CompactSpace A.left := QuasiCompact.compactSpace_of_compactSpace A.hom |
| 567 | have : IsLocallyNoetherian A.left := LocallyOfFiniteType.isLocallyNoetherian A.hom |
| 568 | have : AlgebraicGeometry.IsNoetherian A.left := {} |
| 569 | have : IsIntegral A.left := HomExtensionLocalRings.LocalRings.integral_of_smooth_proper_connected A.hom |
| 570 | have : GeometricallyIrreducible A.hom := |
| 571 | HomExtensionLocalRings.LocalRings.geometricallyIrreducible_of_smooth_proper_connected A.hom |
| 572 | obtain ⟨V, g, hsurj, hg⟩ := exists_open_extension_over_dvr A B fK |
| 573 | let U : Over (Spec (.of R)) := Over.mk (V.ι ≫ A.hom) |
| 574 | let u : U ⟶ A := Over.homMk V.ι |
| 575 | have : IsOpenImmersion u.left := inferInstanceAs (IsOpenImmersion V.ι) |
| 576 | have : Smooth U.hom := by dsimp [U]; infer_instance |
| 577 | have : Surjective U.hom := hsurj |
| 578 | have : TopologicalSpace.NoetherianSpace U.left := |
| 579 | u.left.isOpenEmbedding.isInducing.noetherianSpace |
| 580 | have : CompactSpace U.left := TopologicalSpace.NoetherianSpace.compactSpace U.left |
| 581 | have : IsLocallyNoetherian U.left := LocallyOfFiniteType.isLocallyNoetherian U.hom |
| 582 | have : AlgebraicGeometry.IsNoetherian U.left := {} |
| 583 | have : Smooth (U ⊗ U).hom := by dsimp; infer_instance |
| 584 | have : CompactSpace (U ⊗ U).left := by dsimp; infer_instance |
| 585 | have : IsLocallyNoetherian (U ⊗ U).left := |
| 586 | LocallyOfFiniteType.isLocallyNoetherian (U ⊗ U).hom |
| 587 | have : AlgebraicGeometry.IsNoetherian (U ⊗ U).left := {} |
| 588 | have := smooth_difference_of_open_immersion u |
| 589 | have := difference_surjective_of_geometrically_irreducible u |
| 590 | exact extend_hom_from_difference_cover u fK g hg |
| 591 | |
| 592 | end OAI.AlgebraicGeometry.AbelianScheme.HomExtension |