|
| 1 | +/- |
| 2 | +Copyright (c) 2025 Christian Merten. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Timo Kraenzle, Judith Ludwig, Bryan Wang, Christian Merten, |
| 5 | + Yannis Monbru, Alireza Shavali, Chenyi Yang |
| 6 | +-/ |
| 7 | +module |
| 8 | + |
| 9 | +public import Mathlib.AlgebraicGeometry.Properties |
| 10 | +public import Mathlib.AlgebraicGeometry.Fiber |
| 11 | + |
| 12 | +/-! |
| 13 | +# Geometrically-`P` schemes over a field |
| 14 | +
|
| 15 | +In this file we define the basic interface for properties like geometrically reduced, |
| 16 | +geometrically irreducible, geometrically connected etc. In this file |
| 17 | +we treat an abstract property of schemes `P` and derive the general properties that are |
| 18 | +shared by all of these variants. |
| 19 | +
|
| 20 | +A morphism of schemes `f : X ⟶ Y` is geometrically `P` if for any field `K` and |
| 21 | +morphism `Spec K ⟶ Y`, the base change `X ×[Y] Spec K` satisfies `P`. |
| 22 | +
|
| 23 | +## Main definitions and results |
| 24 | +
|
| 25 | +- `AlgebraicGeometry.geometrically`: The morphism property of geometrically-`P` morphisms |
| 26 | +- `AlgebraicGeometry.geometrically_iff_forall_fiberToSpecResidueField`: `f : X ⟶ Y` is |
| 27 | + geometrically-`P` if and only if for every `y : Y`, the fiber `f ⁻¹ {y}` is geometrically-`P` |
| 28 | + over `Spec κ(y)`. |
| 29 | +
|
| 30 | +## Notes |
| 31 | +
|
| 32 | +This contribution was created as part of the Formalising Algebraic Geometry workshop 2025 in |
| 33 | +Heidelberg. |
| 34 | +-/ |
| 35 | + |
| 36 | +@[expose] public section |
| 37 | + |
| 38 | +universe u |
| 39 | + |
| 40 | +open CategoryTheory Limits CommRingCat |
| 41 | + |
| 42 | +namespace AlgebraicGeometry |
| 43 | + |
| 44 | +/-- A morphism of schemes `f : X ⟶ Y` is geometrically `P` if for any field `K` and |
| 45 | +morphism `Spec K ⟶ Y`, the base change `X ×[Y] Spec K` satisfies `P`. -/ |
| 46 | +def geometrically (P : ObjectProperty Scheme.{u}) : MorphismProperty Scheme.{u} := |
| 47 | + fun X Y f ↦ ∀ ⦃K : Type u⦄ [Field K] (y : Spec (.of K) ⟶ Y) |
| 48 | + ⦃Z : Scheme.{u}⦄ (fst : Z ⟶ X) (snd : Z ⟶ Spec (.of K)), |
| 49 | + IsPullback fst snd f y → P Z |
| 50 | + |
| 51 | +lemma geometrically_eq_universally (P : ObjectProperty Scheme.{u}) : |
| 52 | + geometrically P = .universally fun X Y _ ↦ IsIntegral Y → Subsingleton Y → P X := by |
| 53 | + ext X Y f |
| 54 | + refine ⟨fun hf Z W snd q fst h _ _ ↦ ?_, fun hf aK y Z W fst snd h ↦ ?_⟩ |
| 55 | + · let := (isField_of_isIntegral_of_subsingleton W).toField |
| 56 | + apply hf (W.isoSpec.inv ≫ q) snd (fst ≫ W.isoSpec.hom) |
| 57 | + apply h.flip.of_iso (.refl _) (.refl _) W.isoSpec (.refl _) <;> simp |
| 58 | + · exact hf _ _ _ h.flip inferInstance inferInstance |
| 59 | + |
| 60 | +variable (P : ObjectProperty Scheme.{u}) |
| 61 | + |
| 62 | +instance : (geometrically P).IsStableUnderBaseChange := by |
| 63 | + rw [geometrically_eq_universally] |
| 64 | + infer_instance |
| 65 | + |
| 66 | +instance [P.IsClosedUnderIsomorphisms] : IsZariskiLocalAtTarget (geometrically P) := by |
| 67 | + rw [geometrically_eq_universally] |
| 68 | + refine universally_isZariskiLocalAtTarget _ fun {X} Y f ι U hU H _ _ ↦ ?_ |
| 69 | + obtain ⟨y⟩ := (inferInstance : Nonempty Y) |
| 70 | + obtain ⟨i, hy⟩ := hU.exists_mem y |
| 71 | + have heq : U i = ⊤ := eq_top_iff.mpr fun z _ ↦ by rwa [Subsingleton.elim z y] |
| 72 | + let e : ↑(U i) ≅ Y := Y.isoOfEq heq ≪≫ Y.topIso |
| 73 | + let e' : ↑(f ⁻¹ᵁ U i) ≅ X := X.isoOfEq (by simp [heq]) ≪≫ X.topIso |
| 74 | + exact P.prop_of_iso e' <| H i (.of_isIso e.inv) (e.hom.homeomorph.subsingleton_congr.mpr ‹_›) |
| 75 | + |
| 76 | +section geometrically |
| 77 | + |
| 78 | +variable {P : ObjectProperty Scheme.{u}} {X Y : Scheme.{u}} {f : X ⟶ Y} |
| 79 | + |
| 80 | +lemma pullback_of_geometrically (hf : geometrically P f) (K : Type u) [Field K] |
| 81 | + (y : Spec (.of K) ⟶ Y) : P (Limits.pullback f y) := |
| 82 | + hf _ _ _ (.of_hasPullback _ _) |
| 83 | + |
| 84 | +lemma pullback_of_geometrically' (hf : geometrically P f) (K : Type u) [Field K] |
| 85 | + (y : Spec (.of K) ⟶ Y) : P (Limits.pullback y f) := |
| 86 | + hf _ _ _ (.flip <| .of_hasPullback _ _) |
| 87 | + |
| 88 | +lemma geometrically_iff_of_isClosedUnderIsomorphisms [P.IsClosedUnderIsomorphisms] : |
| 89 | + geometrically P f ↔ |
| 90 | + ∀ (K : Type u) [Field K] (y : Spec (.of K) ⟶ Y), P (Limits.pullback f y) := by |
| 91 | + refine ⟨fun h K _ _ ↦ pullback_of_geometrically h _ _, fun H K _ _ Y fst snd h ↦ ?_⟩ |
| 92 | + exact P.prop_of_iso h.isoPullback.symm (H _ _) |
| 93 | + |
| 94 | +lemma fiber_of_geometrically (hf : geometrically P f) (y : Y) : P (f.fiber y) := |
| 95 | + pullback_of_geometrically hf _ _ |
| 96 | + |
| 97 | +/-- `P` holds geometrically for `f` if and only if all fibers are geometrically `P`. -/ |
| 98 | +lemma geometrically_iff_forall_fiberToSpecResidueField : |
| 99 | + geometrically P f ↔ ∀ (y : Y), geometrically P (f.fiberToSpecResidueField y) := by |
| 100 | + refine ⟨fun hf y ↦ (geometrically P).pullback_snd _ _ hf, fun H ↦ ?_⟩ |
| 101 | + intro K _ y Z fst snd h |
| 102 | + obtain ⟨⟨y, φ⟩, rfl⟩ := (Scheme.SpecToEquivOfField _ _).symm.surjective y |
| 103 | + let p : Z ⟶ f.fiber y := |
| 104 | + pullback.lift fst (snd ≫ Spec.map φ) (by simp [h.w, Scheme.SpecToEquivOfField]) |
| 105 | + apply H y (Spec.map φ) p snd |
| 106 | + simp only [Scheme.SpecToEquivOfField, Equiv.coe_fn_symm_mk] at h |
| 107 | + refine .flip (.of_bot (.flip ?_) ?_ (IsPullback.of_hasPullback f (Y.fromSpecResidueField y)).flip) |
| 108 | + · convert h |
| 109 | + simp [p] |
| 110 | + · simp [p, Scheme.Hom.fiberToSpecResidueField] |
| 111 | + |
| 112 | +/-- This holds in particular if `Y = Spec K`. -/ |
| 113 | +lemma self_of_isIntegral_of_geometrically [IsIntegral Y] [Subsingleton Y] (hf : geometrically P f) : |
| 114 | + P X := by |
| 115 | + rw [geometrically_eq_universally] at hf |
| 116 | + exact MorphismProperty.universally_le _ _ hf ‹_› ‹_› |
| 117 | + |
| 118 | +variable {P : ObjectProperty Scheme.{u}} {R : Type u} [CommRing R] {f : X ⟶ Spec (.of R)} |
| 119 | + |
| 120 | +lemma geometrically_iff_of_commRing : |
| 121 | + geometrically P f ↔ ∀ ⦃K : Type u⦄ [Field K] [Algebra R K] ⦃Y : Scheme.{u}⦄ (fst : Y ⟶ X) |
| 122 | + (snd : Y ⟶ Spec (.of K)), IsPullback fst snd f (Spec.map <| ofHom (algebraMap R K)) → |
| 123 | + P Y := by |
| 124 | + refine ⟨fun hs K _ _ Z fst snd h ↦ hs _ _ _ h, fun H K _ y Z fst snd h ↦ ?_⟩ |
| 125 | + obtain ⟨φ, rfl⟩ := Spec.map_surjective y |
| 126 | + algebraize [φ.hom] |
| 127 | + exact H fst snd h |
| 128 | + |
| 129 | +lemma geometrically_iff_of_commRing_of_isClosedUnderIsomorphisms [P.IsClosedUnderIsomorphisms] : |
| 130 | + geometrically P f ↔ ∀ (K : Type u) [Field K] [Algebra R K], |
| 131 | + P (Limits.pullback f (Spec.map <| ofHom <| algebraMap R K)) := by |
| 132 | + refine ⟨fun hf K _ _ ↦ pullback_of_geometrically hf _ _, fun H ↦ ?_⟩ |
| 133 | + rw [geometrically_iff_of_isClosedUnderIsomorphisms] |
| 134 | + intro K _ y |
| 135 | + obtain ⟨φ, rfl⟩ := Spec.map_surjective y |
| 136 | + algebraize [φ.hom] |
| 137 | + exact H K |
| 138 | + |
| 139 | +end geometrically |
| 140 | + |
| 141 | +end AlgebraicGeometry |
0 commit comments