Skip to content

Commit 80a7115

Browse files
committed
Merge branch 'angle_incenter_unoriented' into imo2024q4
2 parents 62384a3 + 762a6d2 commit 80a7115

File tree

16 files changed

+517
-165
lines changed

16 files changed

+517
-165
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ public import Mathlib.Algebra.Category.ModuleCat.Sheaf.PullbackFree
202202
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.PushforwardContinuous
203203
public import Mathlib.Algebra.Category.ModuleCat.Sheaf.Quasicoherent
204204
public import Mathlib.Algebra.Category.ModuleCat.Simple
205+
public import Mathlib.Algebra.Category.ModuleCat.Stalk
205206
public import Mathlib.Algebra.Category.ModuleCat.Subobject
206207
public import Mathlib.Algebra.Category.ModuleCat.Tannaka
207208
public import Mathlib.Algebra.Category.ModuleCat.Topology.Basic

Mathlib/Algebra/Category/Grp/Basic.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ instance hasForgetToMonCat : HasForget₂ GrpCat MonCat where
195195
(f : X →* Y) :
196196
(forget₂ GrpCat MonCat).map (ofHom f) = MonCat.ofHom f := rfl
197197

198+
@[to_additive (attr := simp)] lemma forget₂_map {R S : GrpCat} (f : R ⟶ S) (x) :
199+
(forget₂ GrpCat MonCat).map f x = f x := rfl
200+
198201
@[to_additive]
199202
instance : Coe GrpCat.{u} MonCat.{u} where coe := (forget₂ GrpCat MonCat).obj
200203

@@ -412,6 +415,9 @@ instance hasForgetToGroup : HasForget₂ CommGrpCat GrpCat where
412415
(f : X →* Y) :
413416
(forget₂ CommGrpCat GrpCat).map (ofHom f) = GrpCat.ofHom f := rfl
414417

418+
@[to_additive (attr := simp)] lemma forget₂_map {R S : CommGrpCat} (f : R ⟶ S) (x) :
419+
(forget₂ CommGrpCat GrpCat).map f x = f x := rfl
420+
415421
@[to_additive]
416422
instance : Coe CommGrpCat.{u} GrpCat.{u} where coe := (forget₂ CommGrpCat GrpCat).obj
417423

Mathlib/Algebra/Category/ModuleCat/Presheaf.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ protected lemma map_smul {X Y : Cᵒᵖ} (f : X ⟶ Y) (r : R.obj X) (m : M.obj
6767
lemma congr_map_apply {X Y : Cᵒᵖ} {f g : X ⟶ Y} (h : f = g) (m : M.obj X) :
6868
M.map f m = M.map g m := by rw [h]
6969

70+
lemma map_comp_apply {U V W : Cᵒᵖ} (i : U ⟶ V) (j : V ⟶ W) (x) :
71+
M.map (i ≫ j) x = M.map j (M.map i x) := by
72+
rw [M.map_comp]; rfl
73+
7074
/-- A morphism of presheaves of modules consists of a family of linear maps which
7175
satisfy the naturality condition. -/
7276
@[ext]
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
/-
2+
Copyright (c) 2026 Andrew Yang. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Andrew Yang
5+
-/
6+
module
7+
8+
public import Mathlib.Algebra.Category.ModuleCat.Presheaf
9+
public import Mathlib.Algebra.Category.Ring.Colimits
10+
public import Mathlib.Algebra.Category.Ring.FilteredColimits
11+
public import Mathlib.CategoryTheory.Limits.Filtered
12+
public import Mathlib.Topology.Sheaves.Stalks
13+
14+
/-!
15+
16+
# Module structure on stalks
17+
Let `M` be a presheaf of `R`-modules on a topological space. We endow `M.presheaf.stalk x` with
18+
an `R.stalk x`-module structure.
19+
20+
The key characterizing lemma is `PresheafOfModules.germ_smul`, which describes the compatibility
21+
of the scalar action and `TopCat.Presheaf.germ`.
22+
23+
-/
24+
25+
@[expose] public section
26+
27+
open CategoryTheory LinearMap Opposite TopologicalSpace
28+
29+
universe w₀ w u v
30+
31+
namespace CategoryTheory.Limits
32+
33+
open IsFiltered
34+
35+
variable {C : Type*} [SmallCategory C] [IsFiltered C] (R : C ⥤ RingCat) (M : C ⥤ Ab)
36+
[∀ i, Module (R.obj i) (M.obj i)]
37+
(H : ∀ {i j} (f : i ⟶ j) r m, M.map f (r • m) = R.map f r • M.map f m)
38+
39+
/-- (Implementation). The scalar multiplication function on `ColimitType`. -/
40+
protected noncomputable
41+
def colimit.smul (r : (R ⋙ forget _).ColimitType) (m : (M ⋙ forget _).ColimitType) :
42+
(M ⋙ forget _).ColimitType := by
43+
refine Quot.liftOn₂ r m (fun Ua Vb ↦ Functor.ιColimitType _ (max Ua.1 Vb.1) <|
44+
letI a : R.obj (max Ua.1 Vb.1) := R.map (leftToMax Ua.1 Vb.1) Ua.2
45+
letI b : M.obj (max Ua.1 Vb.1) := M.map (rightToMax Ua.1 Vb.1) Vb.2
46+
a • b) ?_ ?_
47+
· rintro ⟨U, a⟩ ⟨V₁, b₁⟩ ⟨V₂, b₂⟩ ⟨f : V₁ ⟶ V₂, rfl : b₂ = M.map _ b₁⟩
48+
obtain ⟨s, α, β, h₁, h₂⟩ :=
49+
bowtie (leftToMax U V₁) (leftToMax U V₂)
50+
(rightToMax U V₁) (f ≫ rightToMax U V₂)
51+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ α β ?_
52+
simp [*, ← elementwise_of% R.map_comp, ← elementwise_of% M.map_comp, -Functor.map_comp]
53+
· rintro ⟨U₁, a₁⟩ ⟨U₂, a₂⟩ ⟨V, b⟩ ⟨f : U₁ ⟶ U₂, rfl : a₂ = R.map _ a₁⟩
54+
obtain ⟨s, α, β, h₁, h₂⟩ :=
55+
bowtie (leftToMax U₁ V) (f ≫ leftToMax U₂ V)
56+
(rightToMax U₁ V) (rightToMax U₂ V)
57+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ α β ?_
58+
simp [*, ← elementwise_of% R.map_comp, ← elementwise_of% M.map_comp, -Functor.map_comp]
59+
60+
/-- (Implementation). The module structure on `AddCommGrpCat.FilteredColimits.colimit`. -/
61+
noncomputable abbrev filteredColimitsModule : Module (RingCat.FilteredColimits.colimit R)
62+
(AddCommGrpCat.FilteredColimits.colimit M) where
63+
smul := colimit.smul R M H
64+
mul_smul r s m := Quot.induction_on₃ r s m <| by
65+
rintro ⟨U₁, a₁⟩ ⟨U₂, a₂⟩ ⟨V, b⟩
66+
obtain ⟨s, α, β, h₁, h₂, h₃⟩ := crown₃
67+
(leftToMax U₁ U₂ ≫ leftToMax (max U₁ U₂) V) (leftToMax U₁ (max U₂ V))
68+
(rightToMax U₁ U₂ ≫ leftToMax (max U₁ U₂) V) (leftToMax U₂ V ≫ rightToMax U₁ (max U₂ V))
69+
(rightToMax (max U₁ U₂) V) (rightToMax U₂ V ≫ rightToMax U₁ (max U₂ V))
70+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ α β ?_
71+
dsimp
72+
simp only [map_mul, ← ConcreteCategory.comp_apply, ← Functor.map_comp, mul_smul, *]
73+
one_smul m := Quot.induction_on m <| by
74+
rintro ⟨V, b⟩
75+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ (𝟙 _) (rightToMax _ _) ?_
76+
dsimp
77+
simp only [map_one, ← ConcreteCategory.comp_apply, ← Functor.map_comp, one_smul,
78+
Category.comp_id]
79+
smul_zero r := Quot.induction_on r <| by
80+
rintro ⟨U, a⟩
81+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ (𝟙 _) (rightToMax _ _) ?_
82+
dsimp
83+
simp only [map_zero, smul_zero]
84+
smul_add r m n := Quot.induction_on₃ r m n <| by
85+
rintro ⟨U, a⟩ ⟨V₁, b₁⟩ ⟨V₂, b₂⟩
86+
obtain ⟨s, α, β, h₁, h₂, h₃, h₄⟩ := crown₄
87+
(leftToMax U V₁ ≫ leftToMax (max U V₁) (max U V₂)) (leftToMax U (max V₁ V₂))
88+
(leftToMax U V₂ ≫ rightToMax (max U V₁) (max U V₂)) (leftToMax U (max V₁ V₂))
89+
(rightToMax U V₁ ≫ leftToMax (max U V₁) (max U V₂))
90+
(leftToMax V₁ V₂ ≫ rightToMax U (max V₁ V₂))
91+
(rightToMax U V₂ ≫ rightToMax (max U V₁) (max U V₂))
92+
(rightToMax V₁ V₂ ≫ rightToMax U (max V₁ V₂))
93+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ β α ?_
94+
dsimp
95+
simp only [*, ← ConcreteCategory.comp_apply, ← Functor.map_comp, map_add, smul_add]
96+
add_smul r s m := Quot.induction_on₃ r s m <| by
97+
rintro ⟨U₁, a₁⟩ ⟨U₂, a₂⟩ ⟨V, b⟩
98+
obtain ⟨s, α, β, h₁, h₂, h₃, h₄⟩ := crown₄
99+
(rightToMax U₁ V ≫ leftToMax (max U₁ V) (max U₂ V)) (rightToMax (max U₁ U₂) V)
100+
(rightToMax U₂ V ≫ rightToMax (max U₁ V) (max U₂ V)) (rightToMax (max U₁ U₂) V)
101+
(leftToMax U₁ V ≫ leftToMax (max U₁ V) (max U₂ V))
102+
(leftToMax U₁ U₂ ≫ leftToMax (max U₁ U₂) V)
103+
(leftToMax U₂ V ≫ rightToMax (max U₁ V) (max U₂ V))
104+
(rightToMax U₁ U₂ ≫ leftToMax (max U₁ U₂) V)
105+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ β α ?_
106+
dsimp
107+
simp only [add_smul, map_add, ← ConcreteCategory.comp_apply, ← Functor.map_comp, *]
108+
zero_smul m := Quot.induction_on m <| by
109+
rintro ⟨V, b⟩
110+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ (𝟙 _) (leftToMax _ _) ?_
111+
dsimp
112+
simp only [map_zero, zero_smul, *]
113+
114+
/-- Given a cofiltered diagram of rings `R`, and a module `M` over `R`,
115+
this is the `colim R`-module structure of `colim M`. -/
116+
noncomputable abbrev IsColimit.module {cR : Cocone R} (hcR : IsColimit cR) {cM : Cocone M}
117+
(hcM : IsColimit cM) : Module cR.pt cM.pt :=
118+
letI := filteredColimitsModule R M H
119+
letI : Module (RingCat.FilteredColimits.colimit R) cM.pt :=
120+
AddEquiv.module (β := AddCommGrpCat.FilteredColimits.colimit M) _
121+
(IsColimit.coconePointUniqueUpToIso hcM
122+
(AddCommGrpCat.FilteredColimits.colimitCoconeIsColimit M)).addCommGroupIsoToAddEquiv
123+
.compHom (R := RingCat.FilteredColimits.colimit R) _
124+
(IsColimit.coconePointUniqueUpToIso hcR
125+
(RingCat.FilteredColimits.colimitCoconeIsColimit R)).ringCatIsoToRingEquiv.toRingHom
126+
127+
lemma IsColimit.ι_smul {cR : Cocone R} (hcR : IsColimit cR) {cM : Cocone M}
128+
(hcM : IsColimit cM) (i : C) (r : R.obj i) (m : M.obj i) :
129+
letI := IsColimit.module R M H hcR hcM
130+
cM.ι.app i (r • m) =
131+
HSMul.hSMul (α := cR.pt) (β := cM.pt) (cR.ι.app i r) (cM.ι.app i m) := by
132+
letI := filteredColimitsModule R M H
133+
let α := IsColimit.coconePointUniqueUpToIso hcM
134+
(AddCommGrpCat.FilteredColimits.colimitCoconeIsColimit M)
135+
let β := IsColimit.coconePointUniqueUpToIso hcR
136+
(RingCat.FilteredColimits.colimitCoconeIsColimit R)
137+
apply α.addCommGroupIsoToAddEquiv.eq_symm_apply.mpr ?_
138+
change (cM.ι.app i ≫ α.hom) _ = (HSMul.hSMul (α := RingCat.FilteredColimits.colimit R)
139+
(β := AddCommGrpCat.FilteredColimits.colimit M)
140+
((cR.ι.app i ≫ β.hom) r) ((cM.ι.app i ≫ α.hom) m))
141+
simp only [Functor.const_obj_obj, comp_coconePointUniqueUpToIso_hom, α, β]
142+
obtain ⟨s, α, H⟩ := IsFilteredOrEmpty.cocone_maps (leftToMax i i) (rightToMax i i)
143+
refine Functor.ιColimitType_eq_of_map_eq_map _ _ _ (leftToMax _ _ ≫ α) α ?_
144+
dsimp
145+
simp only [← ConcreteCategory.comp_apply, ← Functor.map_comp, *]
146+
147+
end CategoryTheory.Limits
148+
149+
namespace PresheafOfModules
150+
151+
variable {X : TopCat.{u}} {R : X.Presheaf RingCat.{u}} (M : PresheafOfModules.{u} R)
152+
153+
variable (x : X)
154+
155+
noncomputable
156+
instance : Module (R.stalk x) ↑(TopCat.Presheaf.stalk M.presheaf x) :=
157+
letI (i : (OpenNhds x)ᵒᵖ) : Module (((OpenNhds.inclusion x).op ⋙ R).obj i)
158+
(((OpenNhds.inclusion x).op ⋙ M.presheaf).obj i) := by
159+
dsimp; infer_instance
160+
Limits.IsColimit.module ((OpenNhds.inclusion x).op ⋙ R) ((OpenNhds.inclusion x).op ⋙ M.presheaf)
161+
(fun f r m ↦ M.map_smul _ _ _) (Limits.colimit.isColimit _) (Limits.colimit.isColimit _)
162+
163+
lemma germ_ringCat_smul (U : Opens X) (hx : x ∈ U) (r : R.obj (op U)) (m : M.obj (op U)) :
164+
TopCat.Presheaf.germ M.presheaf U x hx (r • m) =
165+
R.germ U x hx r • TopCat.Presheaf.germ M.presheaf U x hx m :=
166+
letI (i : (OpenNhds x)ᵒᵖ) : Module (((OpenNhds.inclusion x).op ⋙ R).obj i)
167+
(((OpenNhds.inclusion x).op ⋙ M.presheaf).obj i) := by
168+
dsimp; infer_instance
169+
Limits.IsColimit.ι_smul ((OpenNhds.inclusion x).op ⋙ R) ((OpenNhds.inclusion x).op ⋙ M.presheaf)
170+
(fun f r m ↦ M.map_smul _ _ _)
171+
(Limits.colimit.isColimit _) (Limits.colimit.isColimit _) ⟨_, _⟩ _ _
172+
173+
section CommRingCat
174+
175+
variable {X : TopCat.{u}} {R : X.Presheaf CommRingCat.{u}}
176+
(M : PresheafOfModules.{u} (R ⋙ forget₂ _ _))
177+
178+
noncomputable
179+
instance (x : X) : Module (R.stalk x) ↑(TopCat.Presheaf.stalk M.presheaf x) :=
180+
letI (i : (OpenNhds x)ᵒᵖ) : Module (((OpenNhds.inclusion x).op ⋙ R ⋙ forget₂ _ RingCat).obj i)
181+
(((OpenNhds.inclusion x).op ⋙ M.presheaf).obj i) := by
182+
dsimp; infer_instance
183+
Limits.IsColimit.module ((OpenNhds.inclusion x).op ⋙ R ⋙ forget₂ _ _)
184+
((OpenNhds.inclusion x).op ⋙ M.presheaf)
185+
(fun f r m ↦ M.map_smul _ _ _) (Limits.isColimitOfPreserves (forget₂ _ _)
186+
(Limits.colimit.isColimit ((OpenNhds.inclusion x).op ⋙ R))) (Limits.colimit.isColimit _)
187+
188+
lemma germ_smul (x : X) (U : Opens X) (hx : x ∈ U) (r : R.obj (op U)) (m : M.obj (op U)) :
189+
TopCat.Presheaf.germ M.presheaf U x hx (r • m) =
190+
R.germ U x hx r • TopCat.Presheaf.germ M.presheaf U x hx m :=
191+
letI (i : (OpenNhds x)ᵒᵖ) : Module (((OpenNhds.inclusion x).op ⋙ R ⋙ forget₂ _ RingCat).obj i)
192+
(((OpenNhds.inclusion x).op ⋙ M.presheaf).obj i) := by
193+
dsimp; infer_instance
194+
Limits.IsColimit.ι_smul ((OpenNhds.inclusion x).op ⋙ R ⋙ forget₂ _ _)
195+
((OpenNhds.inclusion x).op ⋙ M.presheaf)
196+
(fun f r m ↦ M.map_smul _ _ _) (Limits.isColimitOfPreserves (forget₂ _ _)
197+
(Limits.colimit.isColimit ((OpenNhds.inclusion x).op ⋙ R))) (Limits.colimit.isColimit _)
198+
⟨_, _⟩ _ _
199+
200+
end CommRingCat
201+
202+
end PresheafOfModules

Mathlib/Algebra/Category/Ring/Basic.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ instance hasForgetToAddCommMonCat : HasForget₂ SemiRingCat AddCommMonCat where
163163
{ obj := fun R ↦ AddCommMonCat.of R
164164
map := fun f ↦ AddCommMonCat.ofHom f.hom.toAddMonoidHom }
165165

166+
@[simp] lemma forget₂_monCat_map {R S : SemiRingCat} (f : R ⟶ S) (x) :
167+
(forget₂ SemiRingCat MonCat).map f x = f x := rfl
168+
169+
@[simp] lemma forget₂_addCommMonCat_map {R S : SemiRingCat} (f : R ⟶ S) (x) :
170+
(forget₂ SemiRingCat AddCommMonCat).map f x = f x := rfl
171+
166172
/-- Ring equivalences are isomorphisms in category of semirings -/
167173
@[simps]
168174
def _root_.RingEquiv.toSemiRingCatIso {R S : Type u} [Semiring R] [Semiring S] (e : R ≃+* S) :
@@ -314,6 +320,9 @@ instance hasForgetToSemiRingCat : HasForget₂ RingCat SemiRingCat where
314320
{ obj := fun R ↦ SemiRingCat.of R
315321
map := fun f ↦ SemiRingCat.ofHom f.hom }
316322

323+
@[simp] lemma forget₂_map {R S : RingCat} (f : R ⟶ S) (x) :
324+
(forget₂ RingCat SemiRingCat).map f x = f x := rfl
325+
317326
/-- The forgetful functor from `RingCat` to `SemiRingCat` is fully faithful. -/
318327
def fullyFaithfulForget₂ToSemiRingCat :
319328
(forget₂ RingCat SemiRingCat).FullyFaithful where

Mathlib/AlgebraicGeometry/Morphisms/Etale.lean

Lines changed: 75 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ public import Mathlib.CategoryTheory.Limits.MorphismProperty
1515
1616
# Étale morphisms
1717
18-
A morphism of schemes `f : X ⟶ Y` is étale if it is smooth of relative dimension zero. We
19-
also define the category of schemes étale over `X`.
18+
A morphism of schemes `f : X ⟶ Y` is étale if for each affine `U ⊆ Y`
19+
and `V ⊆ f ⁻¹' U`, the induced map `Γ(Y, U) ⟶ Γ(X, V)` is étale.
20+
21+
## Main results
22+
23+
- `AlgebraicGeometry.Etale.iff_smoothOfRelativeDimension_zero`: Etale is equivalent to
24+
smooth of relative dimension `0`.
2025
2126
-/
2227

@@ -30,35 +35,85 @@ open CategoryTheory MorphismProperty Limits
3035

3136
namespace AlgebraicGeometry
3237

33-
/-- A morphism of schemes is étale if it is smooth of relative dimension zero. -/
34-
abbrev Etale {X Y : Scheme.{u}} (f : X ⟶ Y) := SmoothOfRelativeDimension 0 f
38+
/-- A morphism of schemes `f : X ⟶ Y` is étale if for each affine `U ⊆ Y` and
39+
`V ⊆ f ⁻¹' U`, The induced map `Γ(Y, U) ⟶ Γ(X, V)` is étale. -/
40+
@[mk_iff]
41+
class Etale {X Y : Scheme.{u}} (f : X ⟶ Y) : Prop where
42+
etale_appLE (f) :
43+
∀ {U : Y.Opens} (_ : IsAffineOpen U) {V : X.Opens} (_ : IsAffineOpen V) (e : V ≤ f ⁻¹ᵁ U),
44+
(f.appLE U V e).hom.Etale
45+
46+
alias Scheme.Hom.etale_appLE := Etale.etale_appLE
3547

3648
@[deprecated (since := "2026-02-09")] alias IsEtale := Etale
3749

3850
namespace Etale
3951

4052
variable {X Y : Scheme.{u}} (f : X ⟶ Y)
4153

42-
instance [Etale f] : Smooth f :=
54+
/-- The property of scheme morphisms `Etale` is associated with the ring
55+
homomorphism property `Etale`. -/
56+
instance : HasRingHomProperty @Etale RingHom.Etale where
57+
isLocal_ringHomProperty := RingHom.Etale.propertyIsLocal
58+
eq_affineLocally' := by
59+
ext X Y f
60+
rw [etale_iff, affineLocally_iff_forall_isAffineOpen]
61+
62+
/-- Being étale is multiplicative. -/
63+
instance : MorphismProperty.IsMultiplicative @Etale :=
64+
HasRingHomProperty.isMultiplicative RingHom.Etale.stableUnderComposition
65+
RingHom.Etale.containsIdentities
66+
67+
/-- The composition of étale morphisms is étale. -/
68+
instance etale_comp {Z : Scheme.{u}} (g : Y ⟶ Z) [Etale f] [Etale g] :
69+
Etale (f ≫ g) :=
70+
MorphismProperty.comp_mem _ f g ‹Etale f› ‹Etale g›
71+
72+
/-- Etale is stable under base change. -/
73+
instance etale_isStableUnderBaseChange : MorphismProperty.IsStableUnderBaseChange @Etale :=
74+
HasRingHomProperty.isStableUnderBaseChange RingHom.Etale.isStableUnderBaseChange
75+
76+
/-- Open immersions are étale. -/
77+
instance (priority := 900) [IsOpenImmersion f] : Etale f :=
78+
HasRingHomProperty.of_isOpenImmersion RingHom.Etale.containsIdentities
79+
80+
instance {X Y S : Scheme} (f : X ⟶ S) (g : Y ⟶ S) [Etale g] :
81+
Etale (pullback.fst f g) :=
82+
MorphismProperty.pullback_fst f g inferInstance
83+
84+
instance {X Y S : Scheme} (f : X ⟶ S) (g : Y ⟶ S) [Etale f] :
85+
Etale (pullback.snd f g) :=
86+
MorphismProperty.pullback_snd f g inferInstance
87+
88+
instance (f : X ⟶ Y) (V : Y.Opens) [Etale f] : Etale (f ∣_ V) :=
89+
IsZariskiLocalAtTarget.restrict ‹_› V
90+
91+
instance (f : X ⟶ Y) (U : X.Opens) (V : Y.Opens) (e) [Etale f] :
92+
Etale (f.resLE V U e) := by
93+
delta Scheme.Hom.resLE; infer_instance
94+
95+
lemma eq_smoothOfRelativeDimension_zero : @Etale = @SmoothOfRelativeDimension 0 := by
96+
apply HasRingHomProperty.ext
97+
introv
98+
have : @RingHom.Etale = @RingHom.IsStandardSmoothOfRelativeDimension 0 := by
99+
ext; apply RingHom.etale_iff_isStandardSmoothOfRelativeDimension_zero
100+
rw [← this, RingHom.locally_iff_of_localizationSpanTarget]
101+
· exact RingHom.Etale.respectsIso
102+
· exact RingHom.Etale.ofLocalizationSpanTarget
103+
104+
lemma iff_smoothOfRelativeDimension_zero : Etale f ↔ SmoothOfRelativeDimension 0 f := by
105+
rw [eq_smoothOfRelativeDimension_zero]
106+
107+
instance [Etale f] : SmoothOfRelativeDimension 0 f := by
108+
rwa [← iff_smoothOfRelativeDimension_zero]
109+
110+
instance (priority := low) [Etale f] : Smooth f :=
43111
SmoothOfRelativeDimension.smooth 0 f
44112

45-
instance : IsStableUnderBaseChange @Etale :=
46-
smoothOfRelativeDimension_isStableUnderBaseChange 0
47-
48113
open RingHom in
49114
instance (priority := 900) [Etale f] : FormallyUnramified f where
50-
formallyUnramified_appLE {U} hU {V} hV e := by
51-
have : Locally (IsStandardSmoothOfRelativeDimension 0) (f.appLE U V e).hom :=
52-
HasRingHomProperty.appLE (P := @SmoothOfRelativeDimension 0) _
53-
inferInstance ⟨U, hU⟩ ⟨V, hV⟩ _
54-
have : Locally RingHom.FormallyUnramified (f.appLE U V e).hom := by
55-
apply locally_of_locally _ this
56-
intro R S _ _ f hf
57-
algebraize [f]
58-
rw [RingHom.FormallyUnramified]
59-
infer_instance
60-
rwa [← RingHom.locally_iff_of_localizationSpanTarget
61-
FormallyUnramified.respectsIso FormallyUnramified.ofLocalizationSpanTarget]
115+
formallyUnramified_appLE {_} hU {_} hV e :=
116+
(f.etale_appLE hU hV e).formallyUnramified
62117

63118
instance : MorphismProperty.HasOfPostcompProperty
64119
@Etale (@LocallyOfFiniteType ⊓ @FormallyUnramified) := by

0 commit comments

Comments
 (0)