|
| 1 | +/- |
| 2 | +Copyright (c) 2024 Christian Merten. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Christian Merten |
| 5 | +-/ |
| 6 | +import Mathlib.AlgebraicGeometry.Morphisms.Affine |
| 7 | +import Mathlib.AlgebraicGeometry.Morphisms.RingHomProperties |
| 8 | + |
| 9 | +/-! |
| 10 | +# Affine morphisms with additional ring hom property |
| 11 | +
|
| 12 | +In this file we define a constructor `affineAnd Q` for affine target morphism properties of schemes |
| 13 | +from a property of ring homomorphisms `Q`: A morphism `f : X ⟶ Y` with affine target satisfies |
| 14 | +`affineAnd Q` if it is an affine morphim (i.e. `X` is affine) and the induced ring map on global |
| 15 | +sections satisfies `Q`. |
| 16 | +
|
| 17 | +`affineAnd Q` inherits most stability properties of `Q` and is local at the target if `Q` is local |
| 18 | +at the (algebraic) source. |
| 19 | +
|
| 20 | +Typical examples of this are affine morphisms (where `Q` is trivial), finite morphisms |
| 21 | +(where `Q` is module finite) or closed immersions (where `Q` is being surjective). |
| 22 | +
|
| 23 | +-/ |
| 24 | + |
| 25 | +universe v u |
| 26 | + |
| 27 | +open CategoryTheory TopologicalSpace Opposite MorphismProperty |
| 28 | + |
| 29 | +namespace AlgebraicGeometry |
| 30 | + |
| 31 | +section |
| 32 | + |
| 33 | +variable (Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop) |
| 34 | + |
| 35 | +/-- This is the affine target morphism property where the source is affine and |
| 36 | +the induced map of rings on global sections satisfies `P`. -/ |
| 37 | +def affineAnd : AffineTargetMorphismProperty := |
| 38 | + fun X _ f ↦ IsAffine X ∧ Q (f.app ⊤) |
| 39 | + |
| 40 | +@[simp] |
| 41 | +lemma affineAnd_apply {X Y : Scheme.{u}} (f : X ⟶ Y) [IsAffine Y] : |
| 42 | + affineAnd Q f ↔ IsAffine X ∧ Q (f.app ⊤) := |
| 43 | + Iff.rfl |
| 44 | + |
| 45 | +attribute [local simp] AffineTargetMorphismProperty.toProperty_apply |
| 46 | + |
| 47 | +variable {Q} |
| 48 | + |
| 49 | +/-- If `P` respects isos, also `affineAnd P` respects isomorphisms. -/ |
| 50 | +lemma affineAnd_respectsIso (hP : RingHom.RespectsIso Q) : |
| 51 | + (affineAnd Q).toProperty.RespectsIso := by |
| 52 | + refine RespectsIso.mk _ ?_ ?_ |
| 53 | + · intro X Y Z e f ⟨hZ, ⟨hY, hf⟩⟩ |
| 54 | + simpa [hP.cancel_right_isIso, isAffine_of_isIso e.hom] |
| 55 | + · intro X Y Z e f ⟨hZ, hf⟩ |
| 56 | + simpa [AffineTargetMorphismProperty.toProperty, isAffine_of_isIso e.inv, hP.cancel_left_isIso] |
| 57 | + |
| 58 | +/-- `affineAnd P` is local if `P` is local on the (algebraic) source. -/ |
| 59 | +lemma affineAnd_isLocal (hPi : RingHom.RespectsIso Q) (hQl : RingHom.LocalizationPreserves Q) |
| 60 | + (hQs : RingHom.OfLocalizationSpan Q) : (affineAnd Q).IsLocal where |
| 61 | + respectsIso := affineAnd_respectsIso hPi |
| 62 | + to_basicOpen {X Y _} f r := fun ⟨hX, hf⟩ ↦ by |
| 63 | + simp only [Opens.map_top] at hf |
| 64 | + constructor |
| 65 | + · simp only [Scheme.preimage_basicOpen, Opens.map_top] |
| 66 | + exact (isAffineOpen_top X).basicOpen _ |
| 67 | + · dsimp only [Opens.map_top] |
| 68 | + rw [morphismRestrict_app, hPi.cancel_right_isIso, Scheme.Opens.ι_image_top] |
| 69 | + rw [(isAffineOpen_top Y).app_basicOpen_eq_away_map f (isAffineOpen_top X), |
| 70 | + hPi.cancel_right_isIso] |
| 71 | + haveI := (isAffineOpen_top X).isLocalization_basicOpen (f.app ⊤ r) |
| 72 | + apply hQl |
| 73 | + exact hf |
| 74 | + of_basicOpenCover {X Y _} f s hs hf := by |
| 75 | + dsimp [affineAnd] at hf |
| 76 | + haveI : IsAffine X := by |
| 77 | + apply isAffine_of_isAffineOpen_basicOpen (f.app ⊤ '' s) |
| 78 | + · apply_fun Ideal.map (f.app ⊤) at hs |
| 79 | + rwa [Ideal.map_span, Ideal.map_top] at hs |
| 80 | + · rintro - ⟨r, hr, rfl⟩ |
| 81 | + simp_rw [Scheme.preimage_basicOpen] at hf |
| 82 | + exact (hf ⟨r, hr⟩).left |
| 83 | + refine ⟨inferInstance, hQs.ofIsLocalization' hPi (f.app ⊤) s hs fun a ↦ ?_⟩ |
| 84 | + refine ⟨Γ(Y, Y.basicOpen a.val), Γ(X, X.basicOpen (f.app ⊤ a.val)), inferInstance, |
| 85 | + inferInstance, inferInstance, inferInstance, inferInstance, ?_, ?_⟩ |
| 86 | + · exact (isAffineOpen_top X).isLocalization_basicOpen (f.app ⊤ a.val) |
| 87 | + · obtain ⟨_, hf⟩ := hf a |
| 88 | + rw [morphismRestrict_app, hPi.cancel_right_isIso, Scheme.Opens.ι_image_top] at hf |
| 89 | + rw [(isAffineOpen_top Y).app_basicOpen_eq_away_map _ (isAffineOpen_top X)] at hf |
| 90 | + rwa [hPi.cancel_right_isIso] at hf |
| 91 | + |
| 92 | +/-- If `P` is stable under base change, so is `affineAnd P`. -/ |
| 93 | +lemma affineAnd_stableUnderBaseChange (hQi : RingHom.RespectsIso Q) |
| 94 | + (hQb : RingHom.StableUnderBaseChange Q) : |
| 95 | + (affineAnd Q).StableUnderBaseChange := by |
| 96 | + haveI : (affineAnd Q).toProperty.RespectsIso := affineAnd_respectsIso hQi |
| 97 | + apply AffineTargetMorphismProperty.StableUnderBaseChange.mk |
| 98 | + intro X Y S _ _ f g ⟨hY, hg⟩ |
| 99 | + exact ⟨inferInstance, hQb.pullback_fst_app_top _ hQi f _ hg⟩ |
| 100 | + |
| 101 | +lemma targetAffineLocally_affineAnd_iff (hQi : RingHom.RespectsIso Q) |
| 102 | + {X Y : Scheme.{u}} (f : X ⟶ Y) : |
| 103 | + targetAffineLocally (affineAnd Q) f ↔ ∀ U : Y.Opens, IsAffineOpen U → |
| 104 | + IsAffineOpen (f ⁻¹ᵁ U) ∧ Q (f.app U) := by |
| 105 | + simp only [targetAffineLocally, affineAnd_apply, morphismRestrict_app, hQi.cancel_right_isIso] |
| 106 | + refine ⟨fun hf U hU ↦ ?_, fun h U ↦ ?_⟩ |
| 107 | + · obtain ⟨hfU, hf⟩ := hf ⟨U, hU⟩ |
| 108 | + exact ⟨hfU, by rwa [Scheme.Opens.ι_image_top] at hf⟩ |
| 109 | + · refine ⟨(h U U.2).1, ?_⟩ |
| 110 | + rw [Scheme.Opens.ι_image_top] |
| 111 | + exact (h U U.2).2 |
| 112 | + |
| 113 | +end |
| 114 | + |
| 115 | +section |
| 116 | + |
| 117 | +variable {Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop} |
| 118 | + |
| 119 | +/-- If `P` is a morphism property affine locally defined by `affineAnd Q`, `P` is stable under |
| 120 | +composition if `Q` is. -/ |
| 121 | +lemma HasAffineProperty.affineAnd_isStableUnderComposition {P : MorphismProperty Scheme.{u}} |
| 122 | + (hA : HasAffineProperty P (affineAnd Q)) (hQ : RingHom.StableUnderComposition Q) : |
| 123 | + P.IsStableUnderComposition where |
| 124 | + comp_mem {X Y Z} f g hf hg := by |
| 125 | + haveI := hA |
| 126 | + wlog hZ : IsAffine Z |
| 127 | + · rw [IsLocalAtTarget.iff_of_iSup_eq_top (P := P) _ (iSup_affineOpens_eq_top _)] |
| 128 | + intro U |
| 129 | + rw [morphismRestrict_comp] |
| 130 | + exact this hA hQ _ _ (IsLocalAtTarget.restrict hf _) (IsLocalAtTarget.restrict hg _) hA U.2 |
| 131 | + rw [HasAffineProperty.iff_of_isAffine (P := P) (Q := (affineAnd Q))] at hg |
| 132 | + obtain ⟨hY, hg⟩ := hg |
| 133 | + rw [HasAffineProperty.iff_of_isAffine (P := P) (Q := (affineAnd Q))] at hf |
| 134 | + obtain ⟨hX, hf⟩ := hf |
| 135 | + rw [HasAffineProperty.iff_of_isAffine (P := P) (Q := (affineAnd Q))] |
| 136 | + exact ⟨hX, hQ _ _ hg hf⟩ |
| 137 | + |
| 138 | +/-- If `P` is a morphism property affine locally defined by `affineAnd Q`, `P` is stable under |
| 139 | +base change if `Q` is. -/ |
| 140 | +lemma HasAffineProperty.affineAnd_stableUnderBaseChange {P : MorphismProperty Scheme.{u}} |
| 141 | + (_ : HasAffineProperty P (affineAnd Q)) (hQi : RingHom.RespectsIso Q) |
| 142 | + (hQb : RingHom.StableUnderBaseChange Q) : |
| 143 | + P.StableUnderBaseChange := |
| 144 | + HasAffineProperty.stableUnderBaseChange |
| 145 | + (AlgebraicGeometry.affineAnd_stableUnderBaseChange hQi hQb) |
| 146 | + |
| 147 | +/-- If `Q` contains identities and respects isomorphisms (i.e. is satisfied by isomorphisms), |
| 148 | +and `P` is affine locally defined by `affineAnd Q`, then `P` contains identities. -/ |
| 149 | +lemma HasAffineProperty.affineAnd_containsIdentities {P : MorphismProperty Scheme.{u}} |
| 150 | + (hA : HasAffineProperty P (affineAnd Q)) (hQi : RingHom.RespectsIso Q) |
| 151 | + (hQ : RingHom.ContainsIdentities Q) : |
| 152 | + P.ContainsIdentities where |
| 153 | + id_mem X := by |
| 154 | + rw [eq_targetAffineLocally P, targetAffineLocally_affineAnd_iff hQi] |
| 155 | + intro U hU |
| 156 | + exact ⟨hU, hQ _⟩ |
| 157 | + |
| 158 | +/-- A convenience constructor for `HasAffineProperty P (affineAnd Q)`. The `IsAffineHom` is bundled, |
| 159 | +since this goes well with defining morphism properties via `extends IsAffineHom`. -/ |
| 160 | +lemma HasAffineProperty.affineAnd_iff (P : MorphismProperty Scheme.{u}) |
| 161 | + (hQi : RingHom.RespectsIso Q) (hQl : RingHom.LocalizationPreserves Q) |
| 162 | + (hQs : RingHom.OfLocalizationSpan Q) : |
| 163 | + HasAffineProperty P (affineAnd Q) ↔ |
| 164 | + ∀ {X Y : Scheme.{u}} (f : X ⟶ Y), P f ↔ |
| 165 | + (IsAffineHom f ∧ ∀ U : Y.Opens, IsAffineOpen U → Q (f.app U)) := by |
| 166 | + simp_rw [isAffineHom_iff] |
| 167 | + refine ⟨fun h X Y f ↦ ?_, fun h ↦ ⟨affineAnd_isLocal hQi hQl hQs, ?_⟩⟩ |
| 168 | + · rw [eq_targetAffineLocally P, targetAffineLocally_affineAnd_iff hQi] |
| 169 | + aesop |
| 170 | + · ext X Y f |
| 171 | + rw [targetAffineLocally_affineAnd_iff hQi, h f] |
| 172 | + aesop |
| 173 | + |
| 174 | +lemma HasAffineProperty.affineAnd_le_isAffineHom (P : MorphismProperty Scheme.{u}) |
| 175 | + (hA : HasAffineProperty P (affineAnd Q)) : P ≤ @IsAffineHom := by |
| 176 | + intro X Y f hf |
| 177 | + wlog hY : IsAffine Y |
| 178 | + · rw [IsLocalAtTarget.iff_of_iSup_eq_top (P := @IsAffineHom) _ (iSup_affineOpens_eq_top _)] |
| 179 | + intro U |
| 180 | + exact this P hA _ (IsLocalAtTarget.restrict hf _) U.2 |
| 181 | + rw [HasAffineProperty.iff_of_isAffine (P := P) (Q := (affineAnd Q))] at hf |
| 182 | + rw [HasAffineProperty.iff_of_isAffine (P := @IsAffineHom)] |
| 183 | + exact hf.1 |
| 184 | + |
| 185 | +end |
| 186 | + |
| 187 | +end AlgebraicGeometry |
0 commit comments