Theorem: AlgebraicGeometry.LocallyRingedSpace.evaluation_naturality
File: Mathlib/Geometry/RingedSpace/LocallyRingedSpace/ResidueField.lean

Proof steps:
state_before: X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
⊢ Y.evaluation ⟨f.val.base ↑x, ⋯⟩ ≫ residueFieldMap f ↑x = f.val.c.app (op V) ≫ X.evaluation x
state_after: X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
⊢ (Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩ ≫ LocalRing.residue ↑(Y.presheaf.stalk (f.val.base ↑x))) ≫
      LocalRing.ResidueField.map (Hom.stalkMap f ↑x) =
    f.val.c.app (op V) ≫ X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)
tactic: dsimp only [LocallyRingedSpace.evaluation,
    LocallyRingedSpace.residueFieldMap]
state_before: X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
⊢ (Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩ ≫ LocalRing.residue ↑(Y.presheaf.stalk (f.val.base ↑x))) ≫
      LocalRing.ResidueField.map (Hom.stalkMap f ↑x) =
    f.val.c.app (op V) ≫ X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)
state_after: X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
⊢ Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩ ≫
      LocalRing.residue ↑(Y.presheaf.stalk (f.val.base ↑x)) ≫ LocalRing.ResidueField.map (Hom.stalkMap f ↑x) =
    f.val.c.app (op V) ≫ X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)
tactic: rw [Category.assoc]
state_before: X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
⊢ Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩ ≫
      LocalRing.residue ↑(Y.presheaf.stalk (f.val.base ↑x)) ≫ LocalRing.ResidueField.map (Hom.stalkMap f ↑x) =
    f.val.c.app (op V) ≫ X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)
state_after: case w
X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
a : (forget CommRingCat).obj (Y.presheaf.obj (op V))
⊢ (Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩ ≫
        LocalRing.residue ↑(Y.presheaf.stalk (f.val.base ↑x)) ≫ LocalRing.ResidueField.map (Hom.stalkMap f ↑x))
      a =
    (f.val.c.app (op V) ≫ X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)) a
tactic: ext a
state_before: case w
X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
a : (forget CommRingCat).obj (Y.presheaf.obj (op V))
⊢ (Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩ ≫
        LocalRing.residue ↑(Y.presheaf.stalk (f.val.base ↑x)) ≫ LocalRing.ResidueField.map (Hom.stalkMap f ↑x))
      a =
    (f.val.c.app (op V) ≫ X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)) a
state_after: case w
X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
a : (forget CommRingCat).obj (Y.presheaf.obj (op V))
⊢ (LocalRing.ResidueField.map (Hom.stalkMap f ↑x))
      ((LocalRing.residue ↑(Y.presheaf.stalk (f.val.base ↑x))) ((Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩) a)) =
    (X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)) ((f.val.c.app (op V)) a)
tactic: simp only [comp_apply]
state_before: case w
X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
a : (forget CommRingCat).obj (Y.presheaf.obj (op V))
⊢ (LocalRing.ResidueField.map (Hom.stalkMap f ↑x))
      ((LocalRing.residue ↑(Y.presheaf.stalk (f.val.base ↑x))) ((Y.presheaf.germ ⟨f.val.base ↑x, ⋯⟩) a)) =
    (X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)) ((f.val.c.app (op V)) a)
state_after: case w
X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
a : (forget CommRingCat).obj (Y.presheaf.obj (op V))
⊢ (LocalRing.residue ↑(X.presheaf.stalk ↑x)) ((X.presheaf.germ ⟨↑x, ⋯⟩) ((f.val.c.app (op V)) a)) =
    (X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)) ((f.val.c.app (op V)) a)
tactic: erw [LocalRing.ResidueField.map_residue, PresheafedSpace.stalkMap_germ'_apply]
state_before: case w
X✝ : LocallyRingedSpace
U : Opens ↑X✝.toTopCat
X Y : LocallyRingedSpace
f : X ⟶ Y
V : Opens ↑Y.toTopCat
x : ↥((Opens.map f.val.base).obj V)
a : (forget CommRingCat).obj (Y.presheaf.obj (op V))
⊢ (LocalRing.residue ↑(X.presheaf.stalk ↑x)) ((X.presheaf.germ ⟨↑x, ⋯⟩) ((f.val.c.app (op V)) a)) =
    (X.presheaf.germ x ≫ LocalRing.residue ↑(X.presheaf.stalk ↑x)) ((f.val.c.app (op V)) a)
state_after: no goals
tactic: rfl