Skip to content

Commit 6568acd

Browse files
committed
chore(AlgebraicGeometry): add LocallyRingedSpace.residue (#41087)
This aligns the API with the `Scheme` case.
1 parent 0ee7df2 commit 6568acd

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ instance : Quiver LocallyRingedSpace :=
9999
/-- A morphism of locally ringed spaces `f : X ⟶ Y` induces
100100
a local ring homomorphism from `Y.stalk (f x)` to `X.stalk x` for any `x : X`.
101101
-/
102-
noncomputable def Hom.stalkMap {X Y : LocallyRingedSpace.{u}} (f : Hom X Y) (x : X) :
102+
noncomputable def Hom.stalkMap {X Y : LocallyRingedSpace.{u}} (f : X ⟶ Y) (x : X) :
103103
Y.presheaf.stalk (f.1.1 x) ⟶ X.presheaf.stalk x :=
104104
f.toShHom.hom.stalkMap x
105105

Mathlib/Geometry/RingedSpace/LocallyRingedSpace/ResidueField.lean

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ def residueField (x : X) : CommRingCat :=
4848
instance (x : X) : Field (X.residueField x) :=
4949
inferInstanceAs <| Field (IsLocalRing.ResidueField (X.presheaf.stalk x))
5050

51+
/-- The residue map from the stalk to the residue field. -/
52+
def residue (X : LocallyRingedSpace.{u}) (x : X) : X.presheaf.stalk x ⟶ X.residueField x :=
53+
CommRingCat.ofHom (IsLocalRing.residue (X.presheaf.stalk x))
54+
55+
lemma residue_surjective (x : X) : Function.Surjective (X.residue x) :=
56+
Ideal.Quotient.mk_surjective
57+
58+
instance (x : X) : Epi (X.residue x) :=
59+
ConcreteCategory.epi_of_surjective _ (X.residue_surjective x)
60+
5161
/--
5262
If `U` is an open of `X` containing `x`, we have a canonical ring map from the sections
5363
over `U` to the residue field of `x`.
@@ -56,9 +66,7 @@ If we interpret sections over `U` as functions of `X` defined on `U`, then this
5666
corresponds to evaluation at `x`.
5767
-/
5868
def evaluation (x : U) : X.presheaf.obj (op U) ⟶ X.residueField x :=
59-
-- TODO: make a new definition wrapping
60-
-- `CommRingCat.ofHom (IsLocalRing.residue (X.presheaf.stalk _))`?
61-
X.presheaf.germ U x.1 x.2 ≫ CommRingCat.ofHom (IsLocalRing.residue (X.presheaf.stalk _))
69+
X.presheaf.germ U x.1 x.2 ≫ X.residue _
6270

6371
/-- The global evaluation map from `Γ(X, ⊤)` to the residue field at `x`. -/
6472
def Γevaluation (x : X) : X.presheaf.obj (op ⊤) ⟶ X.residueField x :=
@@ -97,10 +105,9 @@ a morphism of residue fields in the other direction. -/
97105
def residueFieldMap (x : X) : Y.residueField (f.base x) ⟶ X.residueField x :=
98106
CommRingCat.ofHom (IsLocalRing.ResidueField.map (f.stalkMap x).hom)
99107

108+
@[reassoc]
100109
lemma residue_comp_residueFieldMap_eq_stalkMap_comp_residue (x : X) :
101-
CommRingCat.ofHom (IsLocalRing.residue (Y.presheaf.stalk (f.base x))) ≫
102-
residueFieldMap f x = f.stalkMap x ≫
103-
CommRingCat.ofHom (IsLocalRing.residue (X.presheaf.stalk x)) := by
110+
Y.residue _ ≫ residueFieldMap f x = f.stalkMap x ≫ X.residue _ := by
104111
simp [residueFieldMap]
105112
rfl
106113

0 commit comments

Comments
 (0)