Skip to content

Commit 23c87df

Browse files
committed
feat(AlgebraicGeometry): Being an isomorphism is local at the target. (#14882)
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
1 parent 1674b34 commit 23c87df

File tree

8 files changed

+226
-45
lines changed

8 files changed

+226
-45
lines changed

Mathlib.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,13 @@ import Mathlib.AlgebraicGeometry.Morphisms.Basic
792792
import Mathlib.AlgebraicGeometry.Morphisms.ClosedImmersion
793793
import Mathlib.AlgebraicGeometry.Morphisms.Constructors
794794
import Mathlib.AlgebraicGeometry.Morphisms.FiniteType
795+
import Mathlib.AlgebraicGeometry.Morphisms.IsIso
795796
import Mathlib.AlgebraicGeometry.Morphisms.OpenImmersion
796797
import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact
797798
import Mathlib.AlgebraicGeometry.Morphisms.QuasiSeparated
798799
import Mathlib.AlgebraicGeometry.Morphisms.RingHomProperties
799800
import Mathlib.AlgebraicGeometry.Morphisms.Separated
801+
import Mathlib.AlgebraicGeometry.Morphisms.UnderlyingMap
800802
import Mathlib.AlgebraicGeometry.Morphisms.UniversallyClosed
801803
import Mathlib.AlgebraicGeometry.Noetherian
802804
import Mathlib.AlgebraicGeometry.OpenImmersion

Mathlib/AlgebraicGeometry/Morphisms/ClosedImmersion.lean

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@ Copyright (c) 2023 Jonas van der Schaaf. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Amelia Livingston, Christian Merten, Jonas van der Schaaf
55
-/
6-
import Mathlib.AlgebraicGeometry.OpenImmersion
7-
import Mathlib.AlgebraicGeometry.Morphisms.Constructors
86
import Mathlib.AlgebraicGeometry.Morphisms.QuasiCompact
9-
import Mathlib.CategoryTheory.MorphismProperty.Composition
107
import Mathlib.RingTheory.LocalProperties
11-
import Mathlib.Topology.LocalAtTarget
8+
import Mathlib.AlgebraicGeometry.Morphisms.UnderlyingMap
129

1310
/-!
1411
@@ -133,16 +130,6 @@ instance {X Y : Scheme} (f : X ⟶ Y) [IsClosedImmersion f] : QuasiCompact f whe
133130

134131
end IsClosedImmersion
135132

136-
instance : (topologically ClosedEmbedding).RespectsIso :=
137-
topologically_respectsIso _ (fun e ↦ Homeomorph.closedEmbedding e)
138-
(fun _ _ hf hg ↦ ClosedEmbedding.comp hg hf)
139-
140-
/-- Being topologically a closed embedding is local at the target. -/
141-
instance closedEmbedding_isLocalAtTarget : IsLocalAtTarget (topologically ClosedEmbedding) :=
142-
topologically_isLocalAtTarget _
143-
(fun _ s hf ↦ ClosedEmbedding.restrictPreimage s hf)
144-
(fun _ _ _ hU hfcont hf ↦ (closedEmbedding_iff_closedEmbedding_of_iSup_eq_top hU hfcont).mpr hf)
145-
146133
/-- Being surjective on stalks is local at the target. -/
147134
instance isSurjectiveOnStalks_isLocalAtTarget : IsLocalAtTarget
148135
(stalkwise (fun f ↦ Function.Surjective f)) :=
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/-
2+
Copyright (c) 2022 Andrew Yang. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Andrew Yang
5+
-/
6+
import Mathlib.AlgebraicGeometry.Morphisms.OpenImmersion
7+
import Mathlib.Topology.IsLocalHomeomorph
8+
9+
/-!
10+
11+
# Being an isomorphism is local at the target
12+
13+
-/
14+
15+
open CategoryTheory MorphismProperty
16+
17+
namespace AlgebraicGeometry
18+
19+
lemma isomorphisms_eq_isOpenImmersion_inf_surjective :
20+
isomorphisms Scheme = (@IsOpenImmersion ⊓ @Surjective : MorphismProperty Scheme) := by
21+
ext
22+
exact (isIso_iff_isOpenImmersion _).trans
23+
(and_congr Iff.rfl ((TopCat.epi_iff_surjective _).trans (surjective_iff _).symm))
24+
25+
lemma isomorphisms_eq_stalkwise :
26+
isomorphisms Scheme = (isomorphisms TopCat).inverseImage Scheme.forgetToTop ⊓
27+
stalkwise (fun f ↦ Function.Bijective f) := by
28+
rw [isomorphisms_eq_isOpenImmersion_inf_surjective, isOpenImmersion_eq_inf,
29+
surjective_eq_topologically, inf_right_comm]
30+
congr 1
31+
ext X Y f
32+
exact ⟨fun H ↦ inferInstanceAs (IsIso (TopCat.isoOfHomeo
33+
(H.1.1.toHomeomeomorph_of_surjective H.2)).hom), fun (_ : IsIso f.1.base) ↦
34+
let e := (TopCat.homeoOfIso <| asIso f.1.base); ⟨e.openEmbedding, e.surjective⟩⟩
35+
36+
instance : IsLocalAtTarget (isomorphisms Scheme) :=
37+
isomorphisms_eq_isOpenImmersion_inf_surjective ▸ inferInstance
38+
39+
instance : HasAffineProperty (isomorphisms Scheme) fun X Y f _ ↦ IsAffine X ∧ IsIso (f.app ⊤) := by
40+
convert HasAffineProperty.of_isLocalAtTarget (isomorphisms Scheme) with X Y f hY
41+
exact ⟨fun ⟨_, _⟩ ↦ (arrow_mk_iso_iff (isomorphisms _) (arrowIsoSpecΓOfIsAffine f)).mpr
42+
(inferInstanceAs (IsIso (Spec.map (f.app ⊤)))),
43+
fun (_ : IsIso f) ↦ ⟨isAffine_of_isIso f, inferInstance⟩⟩
44+
45+
end AlgebraicGeometry

Mathlib/AlgebraicGeometry/Morphisms/OpenImmersion.lean

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Copyright (c) 2022 Andrew Yang. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Andrew Yang
55
-/
6-
import Mathlib.Topology.LocalAtTarget
7-
import Mathlib.AlgebraicGeometry.Morphisms.Basic
6+
import Mathlib.AlgebraicGeometry.Morphisms.UnderlyingMap
87

98
#align_import algebraic_geometry.morphisms.open_immersion from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
109

@@ -38,6 +37,13 @@ theorem isOpenImmersion_iff_stalk {f : X ⟶ Y} : IsOpenImmersion f ↔
3837
· rintro ⟨h₁, h₂⟩; exact IsOpenImmersion.of_stalk_iso f h₁
3938
#align algebraic_geometry.is_open_immersion_iff_stalk AlgebraicGeometry.isOpenImmersion_iff_stalk
4039

40+
theorem isOpenImmersion_eq_inf :
41+
@IsOpenImmersion = (topologically OpenEmbedding) ⊓
42+
stalkwise (fun f ↦ Function.Bijective f) := by
43+
ext
44+
exact isOpenImmersion_iff_stalk.trans
45+
(and_congr Iff.rfl (forall_congr' fun x ↦ ConcreteCategory.isIso_iff_bijective _))
46+
4147
instance isOpenImmersion_isStableUnderComposition :
4248
MorphismProperty.IsStableUnderComposition @IsOpenImmersion where
4349
comp_mem f g _ _ := LocallyRingedSpace.IsOpenImmersion.comp f g
@@ -50,29 +56,15 @@ instance isOpenImmersion_respectsIso : MorphismProperty.RespectsIso @IsOpenImmer
5056
infer_instance
5157
#align algebraic_geometry.is_open_immersion_respects_iso AlgebraicGeometry.isOpenImmersion_respectsIso
5258

53-
instance isOpenImmersion_isLocalAtTarget : IsLocalAtTarget @IsOpenImmersion := by
54-
apply IsLocalAtTarget.mk'
55-
· intros; infer_instance
56-
· intro X Y f ι U hU H
57-
rw [isOpenImmersion_iff_stalk]
58-
constructor
59-
· apply (openEmbedding_iff_openEmbedding_of_iSup_eq_top hU f.1.base.2).mpr
60-
intro i
61-
have := (f ∣_ U i).openEmbedding
62-
rw [morphismRestrict_val_base] at this
63-
norm_cast
64-
· intro x
65-
obtain ⟨i, hi⟩ : ∃ i, f.1.base x ∈ U i := by
66-
simpa only [← SetLike.mem_coe, Opens.coe_iSup, Set.mem_iUnion, Opens.coe_top, Set.mem_univ,
67-
eq_iff_iff, iff_true] using congr(f.1.base x ∈ $hU)
68-
have := Arrow.iso_w (morphismRestrictStalkMap
69-
f (Scheme.ιOpens (U i)).opensRange ⟨x, ⟨_, hi⟩, rfl⟩)
70-
dsimp only [Arrow.mk_hom] at this
71-
rw [this]
72-
haveI : IsOpenImmersion (f ∣_ (Scheme.ιOpens (U i)).opensRange) := by
73-
rw [opensRange_ιOpens]
74-
infer_instance
75-
infer_instance
59+
instance : IsLocalAtTarget (stalkwise (fun f ↦ Function.Bijective f)) := by
60+
apply stalkwiseIsLocalAtTarget_of_respectsIso
61+
rw [RingHom.toMorphismProperty_respectsIso_iff]
62+
convert (inferInstanceAs (MorphismProperty.isomorphisms CommRingCat).RespectsIso)
63+
ext
64+
exact (ConcreteCategory.isIso_iff_bijective _).symm
65+
66+
instance isOpenImmersion_isLocalAtTarget : IsLocalAtTarget @IsOpenImmersion :=
67+
isOpenImmersion_eq_inf ▸ inferInstance
7668
#align algebraic_geometry.is_open_immersion_is_local_at_target AlgebraicGeometry.isOpenImmersion_isLocalAtTarget
7769

7870
theorem isOpenImmersion_stableUnderBaseChange :
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
/-
2+
Copyright (c) 2022 Andrew Yang. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Andrew Yang
5+
-/
6+
import Mathlib.Topology.LocalAtTarget
7+
import Mathlib.AlgebraicGeometry.Morphisms.Constructors
8+
9+
/-!
10+
11+
## Properties on the underlying functions of morphisms of schemes.
12+
13+
This file includes various results on properties of morphisms of schemes that come from properties
14+
of the underlying map of topological spaces, including
15+
16+
- `Injective`
17+
- `Surjective`
18+
- `IsOpenMap`
19+
- `IsClosedMap`
20+
- `Embedding`
21+
- `OpenEmbedding`
22+
- `ClosedEmbedding`
23+
24+
-/
25+
26+
open CategoryTheory
27+
28+
namespace AlgebraicGeometry
29+
30+
universe u
31+
32+
section Injective
33+
34+
variable {X Y Z : Scheme.{u}} (f : X ⟶ Y) (g : Y ⟶ Z)
35+
36+
instance : MorphismProperty.RespectsIso (topologically Function.Injective) :=
37+
topologically_respectsIso _ (fun e ↦ e.injective) (fun _ _ hf hg ↦ hg.comp hf)
38+
39+
instance injective_isLocalAtTarget : IsLocalAtTarget (topologically Function.Injective) := by
40+
refine topologically_isLocalAtTarget _ (fun _ s h ↦ h.restrictPreimage s)
41+
fun f ι U H _ hf x₁ x₂ e ↦ ?_
42+
obtain ⟨i, hxi⟩ : ∃ i, f x₁ ∈ U i := by simpa using congr(f x₁ ∈ $H)
43+
exact congr(($(@hf i ⟨x₁, hxi⟩ ⟨x₂, show f x₂ ∈ U i from e ▸ hxi⟩ (Subtype.ext e))).1)
44+
45+
end Injective
46+
47+
section Surjective
48+
49+
variable {X Y Z : Scheme.{u}} (f : X ⟶ Y) (g : Y ⟶ Z)
50+
51+
/-- A morphism of schemes is surjective if the underlying map is. -/
52+
@[mk_iff]
53+
class Surjective : Prop where
54+
surj : Function.Surjective f.1.base
55+
56+
lemma surjective_eq_topologically :
57+
@Surjective = topologically Function.Surjective := by ext; exact surjective_iff _
58+
59+
lemma Scheme.Hom.surjective (f : X.Hom Y) [Surjective f] : Function.Surjective f.1.base :=
60+
Surjective.surj
61+
62+
instance (priority := 100) [IsIso f] : Surjective f := ⟨f.homeomorph.surjective⟩
63+
64+
instance [Surjective f] [Surjective g] : Surjective (f ≫ g) := ⟨g.surjective.comp f.surjective⟩
65+
66+
lemma Surjective.of_comp [Surjective (f ≫ g)] : Surjective g where
67+
surj := Function.Surjective.of_comp (g := f.1.base) (f ≫ g).surjective
68+
69+
lemma Surjective.comp_iff [Surjective f] : Surjective (f ≫ g) ↔ Surjective g :=
70+
fun _ ↦ of_comp f g, fun _ ↦ inferInstance⟩
71+
72+
instance : MorphismProperty.RespectsIso @Surjective :=
73+
surjective_eq_topologically ▸ topologically_respectsIso _ (fun e ↦ e.surjective)
74+
(fun _ _ hf hg ↦ hg.comp hf)
75+
76+
instance surjective_isLocalAtTarget : IsLocalAtTarget @Surjective := by
77+
have : MorphismProperty.RespectsIso @Surjective := inferInstance
78+
rw [surjective_eq_topologically] at this ⊢
79+
refine topologically_isLocalAtTarget _ (fun _ s h ↦ h.restrictPreimage s) fun f ι U H _ hf x ↦ ?_
80+
obtain ⟨i, hxi⟩ : ∃ i, x ∈ U i := by simpa using congr(x ∈ $H)
81+
obtain ⟨⟨y, _⟩, hy⟩ := hf i ⟨x, hxi⟩
82+
exact ⟨y, congr(($hy).1)⟩
83+
84+
end Surjective
85+
86+
section IsOpenMap
87+
88+
instance : (topologically IsOpenMap).RespectsIso :=
89+
topologically_respectsIso _ (fun e ↦ e.isOpenMap) (fun _ _ hf hg ↦ hg.comp hf)
90+
91+
instance isOpenMap_isLocalAtTarget : IsLocalAtTarget (topologically IsOpenMap) :=
92+
topologically_isLocalAtTarget _
93+
(fun _ s hf ↦ hf.restrictPreimage s)
94+
(fun _ _ _ hU _ hf ↦ (isOpenMap_iff_isOpenMap_of_iSup_eq_top hU).mpr hf)
95+
96+
end IsOpenMap
97+
98+
section IsClosedMap
99+
100+
instance : (topologically IsClosedMap).RespectsIso :=
101+
topologically_respectsIso _ (fun e ↦ e.isClosedMap) (fun _ _ hf hg ↦ hg.comp hf)
102+
103+
instance isClosedMap_isLocalAtTarget : IsLocalAtTarget (topologically IsClosedMap) :=
104+
topologically_isLocalAtTarget _
105+
(fun _ s hf ↦ hf.restrictPreimage s)
106+
(fun _ _ _ hU _ hf ↦ (isClosedMap_iff_isClosedMap_of_iSup_eq_top hU).mpr hf)
107+
108+
end IsClosedMap
109+
110+
section Embedding
111+
112+
instance : (topologically Embedding).RespectsIso :=
113+
topologically_respectsIso _ (fun e ↦ e.embedding) (fun _ _ hf hg ↦ hg.comp hf)
114+
115+
instance embedding_isLocalAtTarget : IsLocalAtTarget (topologically Embedding) :=
116+
topologically_isLocalAtTarget _
117+
(fun _ s hf ↦ hf.restrictPreimage s)
118+
(fun _ _ _ hU hfcont hf ↦ (embedding_iff_embedding_of_iSup_eq_top hU hfcont).mpr hf)
119+
120+
end Embedding
121+
122+
section OpenEmbedding
123+
124+
instance : (topologically OpenEmbedding).RespectsIso :=
125+
topologically_respectsIso _ (fun e ↦ e.openEmbedding) (fun _ _ hf hg ↦ hg.comp hf)
126+
127+
instance openEmbedding_isLocalAtTarget : IsLocalAtTarget (topologically OpenEmbedding) :=
128+
topologically_isLocalAtTarget _
129+
(fun _ s hf ↦ hf.restrictPreimage s)
130+
(fun _ _ _ hU hfcont hf ↦ (openEmbedding_iff_openEmbedding_of_iSup_eq_top hU hfcont).mpr hf)
131+
132+
end OpenEmbedding
133+
134+
section ClosedEmbedding
135+
136+
instance : (topologically ClosedEmbedding).RespectsIso :=
137+
topologically_respectsIso _ (fun e ↦ e.closedEmbedding) (fun _ _ hf hg ↦ hg.comp hf)
138+
139+
instance closedEmbedding_isLocalAtTarget : IsLocalAtTarget (topologically ClosedEmbedding) :=
140+
topologically_isLocalAtTarget _
141+
(fun _ s hf ↦ hf.restrictPreimage s)
142+
(fun _ _ _ hU hfcont hf ↦ (closedEmbedding_iff_closedEmbedding_of_iSup_eq_top hU hfcont).mpr hf)
143+
144+
end ClosedEmbedding
145+
146+
end AlgebraicGeometry

Mathlib/AlgebraicGeometry/Morphisms/UniversallyClosed.lean

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ instance universallyClosedTypeComp {X Y Z : Scheme} (f : X ⟶ Y) (g : Y ⟶ Z)
6767
comp_mem _ _ _ hf hg
6868
#align algebraic_geometry.universally_closed_type_comp AlgebraicGeometry.universallyClosedTypeComp
6969

70-
instance topologically_isClosedMap_respectsIso : RespectsIso (topologically @IsClosedMap) := by
71-
apply MorphismProperty.respectsIso_of_isStableUnderComposition
72-
intro _ _ f hf
73-
have : IsIso f := hf
74-
exact (TopCat.homeoOfIso (Scheme.forgetToTop.mapIso (asIso f))).isClosedMap
75-
7670
instance universallyClosed_fst {X Y Z : Scheme} (f : X ⟶ Z) (g : Y ⟶ Z) [hg : UniversallyClosed g] :
7771
UniversallyClosed (pullback.fst f g) :=
7872
universallyClosed_stableUnderBaseChange.fst f g hg

Mathlib/Topology/LocalAtTarget.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@ theorem isClosed_iff_coe_preimage_of_iSup_eq_top (s : Set β) :
113113
simpa using isOpen_iff_coe_preimage_of_iSup_eq_top hU sᶜ
114114
#align is_closed_iff_coe_preimage_of_supr_eq_top isClosed_iff_coe_preimage_of_iSup_eq_top
115115

116+
theorem isOpenMap_iff_isOpenMap_of_iSup_eq_top :
117+
IsOpenMap f ↔ ∀ i, IsOpenMap ((U i).1.restrictPreimage f) := by
118+
refine ⟨fun h i => h.restrictPreimage _, ?_⟩
119+
rintro H s hs
120+
rw [isOpen_iff_coe_preimage_of_iSup_eq_top hU]
121+
intro i
122+
convert H i _ (hs.preimage continuous_subtype_val)
123+
ext ⟨x, hx⟩
124+
suffices (∃ y, y ∈ s ∧ f y = x) ↔ ∃ y, y ∈ s ∧ f y ∈ U i ∧ f y = x by
125+
simpa [Set.restrictPreimage, ← Subtype.coe_inj]
126+
exact ⟨fun ⟨a, b, c⟩ => ⟨a, b, c.symm ▸ hx, c⟩, fun ⟨a, b, _, c⟩ => ⟨a, b, c⟩⟩
127+
116128
theorem isClosedMap_iff_isClosedMap_of_iSup_eq_top :
117129
IsClosedMap f ↔ ∀ i, IsClosedMap ((U i).1.restrictPreimage f) := by
118130
refine ⟨fun h i => h.restrictPreimage _, ?_⟩

Mathlib/Topology/Sets/Opens.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ theorem coe_bot : ((⊥ : Opens α) : Set α) = ∅ :=
190190
theorem coe_eq_empty {U : Opens α} : (U : Set α) = ∅ ↔ U = ⊥ :=
191191
SetLike.coe_injective.eq_iff' rfl
192192

193+
@[simp]
194+
lemma mem_top (x : α) : x ∈ (⊤ : Opens α) := trivial
195+
193196
@[simp, norm_cast]
194197
theorem coe_top : ((⊤ : Opens α) : Set α) = Set.univ :=
195198
rfl

0 commit comments

Comments
 (0)