Skip to content

Commit d34981b

Browse files
committed
get rid of erw
1 parent 46baeb2 commit d34981b

File tree

4 files changed

+57
-21
lines changed

4 files changed

+57
-21
lines changed

Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean

-18
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,6 @@ namespace LocallyRingedSpace
6161

6262
variable (X : LocallyRingedSpace.{u})
6363

64-
/-
65-
/-- The map from the global sections to a stalk. -/
66-
def ΓToStalk (x : X) : Γ.obj (op X) ⟶ X.presheaf.stalk x :=
67-
X.presheaf.germ (⟨x, trivial⟩ : (⊤ : Opens X))
68-
69-
lemma ΓToStalk_stalkMap {X Y : LocallyRingedSpace} (f : X ⟶ Y) (x : X) :
70-
Y.ΓToStalk (f.val.base x) ≫ PresheafedSpace.stalkMap f.val x =
71-
f.val.c.app (op ⊤) ≫ X.ΓToStalk x := by
72-
dsimp only [LocallyRingedSpace.ΓToStalk]
73-
rw [PresheafedSpace.stalkMap_germ']
74-
75-
lemma ΓToStalk_stalkMap_apply {X Y : LocallyRingedSpace} (f : X ⟶ Y) (x : X)
76-
(a : Y.presheaf.obj (op ⊤)) :
77-
PresheafedSpace.stalkMap f.val x (Y.ΓToStalk (f.val.base x) a) =
78-
X.ΓToStalk x (f.val.c.app (op ⊤) a) := by
79-
simpa using congrFun (congrArg DFunLike.coe <| ΓToStalk_stalkMap f x) a
80-
-/
81-
8264
/-- The canonical map from the underlying set to the prime spectrum of `Γ(X)`. -/
8365
def toΓSpecFun : X → PrimeSpectrum (Γ.obj (op X)) := fun x =>
8466
comap (X.presheaf.Γgerm x) (LocalRing.closedPoint (X.presheaf.stalk x))

Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Scheme.lean

+2-3
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,8 @@ lemma awayToΓ_ΓToStalk (f) (x) :
615615
(Proj.stalkIso' 𝒜 x.1).toCommRingCatIso.inv ≫
616616
((Proj.toLocallyRingedSpace 𝒜).restrictStalkIso (Opens.openEmbedding _) x).inv := by
617617
rw [awayToΓ, Category.assoc, ← Category.assoc _ (Iso.inv _),
618-
Iso.eq_comp_inv, Category.assoc, Category.assoc]
619-
simp only [LocallyRingedSpace.restrict, Presheaf.Γgerm]
620-
erw [PresheafedSpace.restrictStalkIso_hom_eq_germ]
618+
Iso.eq_comp_inv, Category.assoc, Category.assoc, Presheaf.Γgerm]
619+
rw [LocallyRingedSpace.restrictStalkIso_hom_eq_germ]
621620
simp only [Proj.toLocallyRingedSpace, Proj.toSheafedSpace]
622621
rw [Presheaf.germ_res, awayToSection_germ]
623622
rfl

Mathlib/AlgebraicGeometry/Scheme.lean

+19
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,25 @@ lemma stalkMap_germ' {X Y : Scheme.{u}} (f : X ⟶ Y) (U : Opens Y) (x : X) (hx
631631
f.app U ≫ X.presheaf.germ (U := f⁻¹ᵁ U) ⟨x, hx⟩ :=
632632
PresheafedSpace.stalkMap_germ' f.val U x hx
633633

634+
variable {U : TopCat} (X : Scheme.{u}) {f : U ⟶ X.toTopCat} (h : OpenEmbedding f)
635+
(V : Opens U) (x : U) (hx : x ∈ V)
636+
637+
@[elementwise, reassoc]
638+
lemma restrictStalkIso_hom_eq_germ :
639+
(X.restrict h).presheaf.germ ⟨x, hx⟩ ≫ (X.restrictStalkIso h x).hom =
640+
X.presheaf.germ ⟨f x, show f x ∈ h.isOpenMap.functor.obj V from ⟨x, hx, rfl⟩⟩ :=
641+
PresheafedSpace.restrictStalkIso_hom_eq_germ X.toPresheafedSpace h V x hx
642+
643+
@[simp, elementwise, reassoc]
644+
lemma restrictStalkIso_inv_eq_germ :
645+
X.presheaf.germ ⟨f x, show f x ∈ h.isOpenMap.functor.obj V from ⟨x, hx, rfl⟩⟩ ≫
646+
(X.restrictStalkIso h x).inv = (X.restrict h).presheaf.germ ⟨x, hx⟩ :=
647+
PresheafedSpace.restrictStalkIso_inv_eq_germ X.toPresheafedSpace h V x hx
648+
649+
lemma restrictStalkIso_inv_eq_ofRestrict :
650+
(X.restrictStalkIso h x).inv = (X.ofRestrict h).stalkMap x :=
651+
PresheafedSpace.restrictStalkIso_inv_eq_ofRestrict X.toPresheafedSpace h x
652+
634653
end Scheme
635654

636655
end Stalks

Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean

+36
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,42 @@ lemma stalkMap_inv_hom {X Y : LocallyRingedSpace.{u}} (e : X ≅ Y) (x : X) :
371371
rw [← stalkMap_comp, LocallyRingedSpace.stalkMap_congr_hom (e.hom ≫ e.inv) (𝟙 _) (by simp)]
372372
simp
373373

374+
@[reassoc, elementwise]
375+
lemma stalkMap_germ {X Y : LocallyRingedSpace.{u}} (f : X ⟶ Y) (U : Opens Y)
376+
(x : (Opens.map f.val.base).obj U) :
377+
Y.presheaf.germ ⟨f.val.base x.val, x.property⟩ ≫ f.stalkMap x.val =
378+
f.val.c.app (op U) ≫ X.presheaf.germ x :=
379+
PresheafedSpace.stalkMap_germ f.val U x
380+
381+
@[reassoc (attr := simp), elementwise (attr := simp)]
382+
lemma stalkMap_germ' {X Y : LocallyRingedSpace.{u}} (f : X ⟶ Y) (U : Opens Y) (x : X)
383+
(hx : f.val.base x ∈ U) :
384+
Y.presheaf.germ ⟨f.val.base x, hx⟩ ≫ f.stalkMap x =
385+
f.val.c.app (op U) ≫ X.presheaf.germ (U := (Opens.map f.val.base).obj U) ⟨x, hx⟩ :=
386+
PresheafedSpace.stalkMap_germ' f.val U x hx
387+
388+
variable {U : TopCat} (X : LocallyRingedSpace.{u}) {f : U ⟶ X.toTopCat} (h : OpenEmbedding f)
389+
(V : Opens U) (x : U) (hx : x ∈ V)
390+
391+
@[elementwise, reassoc]
392+
lemma restrictStalkIso_hom_eq_germ :
393+
(X.restrict h).presheaf.germ ⟨x, hx⟩ ≫ (X.restrictStalkIso h x).hom =
394+
X.presheaf.germ ⟨f x, show f x ∈ h.isOpenMap.functor.obj V from ⟨x, hx, rfl⟩⟩ :=
395+
PresheafedSpace.restrictStalkIso_hom_eq_germ X.toPresheafedSpace h V x hx
396+
397+
@[simp, elementwise, reassoc]
398+
lemma restrictStalkIso_inv_eq_germ :
399+
X.presheaf.germ ⟨f x, show f x ∈ h.isOpenMap.functor.obj V from ⟨x, hx, rfl⟩⟩ ≫
400+
(X.restrictStalkIso h x).inv = (X.restrict h).presheaf.germ ⟨x, hx⟩ :=
401+
PresheafedSpace.restrictStalkIso_inv_eq_germ X.toPresheafedSpace h V x hx
402+
403+
lemma restrictStalkIso_inv_eq_ofRestrict :
404+
(X.restrictStalkIso h x).inv = (X.ofRestrict h).stalkMap x :=
405+
PresheafedSpace.restrictStalkIso_inv_eq_ofRestrict X.toPresheafedSpace h x
406+
407+
instance ofRestrict_stalkMap_isIso : IsIso ((X.ofRestrict h).stalkMap x) :=
408+
PresheafedSpace.ofRestrict_stalkMap_isIso X.toPresheafedSpace h x
409+
374410
end Stalks
375411

376412
end LocallyRingedSpace

0 commit comments

Comments
 (0)