Theorem: AlgebraicGeometry.LocallyRingedSpace.toStalk_stalkMap_toΓSpec
File: Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean

Proof steps:
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ toStalk (↑(unop (op (Γ.obj (op X))))) (X.toΓSpecSheafedSpace.base x) ≫
      PresheafedSpace.Hom.stalkMap X.toΓSpecSheafedSpace x =
    X.presheaf.Γgerm x
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ toStalk (↑(unop (op (Γ.obj (op X))))) (X.toΓSpecSheafedSpace.base x) ≫
      (stalkFunctor CommRingCat (X.toΓSpecSheafedSpace.base x)).map X.toΓSpecSheafedSpace.c ≫
        stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.Γgerm x
tactic: rw [PresheafedSpace.Hom.stalkMap]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ toStalk (↑(unop (op (Γ.obj (op X))))) (X.toΓSpecSheafedSpace.base x) ≫
      (stalkFunctor CommRingCat (X.toΓSpecSheafedSpace.base x)).map X.toΓSpecSheafedSpace.c ≫
        stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.Γgerm x
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (toOpen (↑(Γ.obj (op X))) (basicOpen 1) ≫ (structureSheaf ↑(Γ.obj (op X))).presheaf.germ ⟨X.toΓSpecFun x, ⋯⟩) ≫
      (stalkFunctor CommRingCat (X.toΓSpecSheafedSpace.base x)).map X.toΓSpecSheafedSpace.c ≫
        stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.Γgerm x
tactic: erw [← toOpen_germ _ (basicOpen (1 : Γ.obj (op X)))
      ⟨X.toΓSpecFun x, by rw [basicOpen_one]; trivial⟩]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (toOpen (↑(Γ.obj (op X))) (basicOpen 1) ≫ (structureSheaf ↑(Γ.obj (op X))).presheaf.germ ⟨X.toΓSpecFun x, ⋯⟩) ≫
      (stalkFunctor CommRingCat (X.toΓSpecSheafedSpace.base x)).map X.toΓSpecSheafedSpace.c ≫
        stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.Γgerm x
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (toOpen (↑(Γ.obj (op X))) (basicOpen 1) ≫
        (structureSheaf ↑(Γ.obj (op X))).presheaf.germ ⟨X.toΓSpecFun x, ⋯⟩ ≫
          (stalkFunctor CommRingCat (X.toΓSpecSheafedSpace.base x)).map X.toΓSpecSheafedSpace.c) ≫
      stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.Γgerm x
tactic: rw [← Category.assoc, Category.assoc (toOpen _ _)]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (toOpen (↑(Γ.obj (op X))) (basicOpen 1) ≫
        (structureSheaf ↑(Γ.obj (op X))).presheaf.germ ⟨X.toΓSpecFun x, ⋯⟩ ≫
          (stalkFunctor CommRingCat (X.toΓSpecSheafedSpace.base x)).map X.toΓSpecSheafedSpace.c) ≫
      stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.Γgerm x
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (toOpen (↑(Γ.obj (op X))) (basicOpen 1) ≫
        X.toΓSpecSheafedSpace.c.app (op (basicOpen 1)) ≫
          ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩) ≫
      stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.Γgerm x
tactic: erw [stalkFunctor_map_germ]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (toOpen (↑(Γ.obj (op X))) (basicOpen 1) ≫
        X.toΓSpecSheafedSpace.c.app (op (basicOpen 1)) ≫
          ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩) ≫
      stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.Γgerm x
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (X.toToΓSpecMapBasicOpen 1 ≫
        ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩) ≫
      stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.germ ⟨x, ⋯⟩
tactic: rw [← Category.assoc, toΓSpecSheafedSpace_app_spec, Γgerm]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (X.toToΓSpecMapBasicOpen 1 ≫
        ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩) ≫
      stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    X.presheaf.germ ⟨x, ⋯⟩
state_after: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (X.toToΓSpecMapBasicOpen 1 ≫
        ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩) ≫
      stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    ((pushforward CommRingCat X.toΓSpecBase).obj X.presheaf).germ ⟨X.toΓSpecBase ↑⟨x, ⋯⟩, ⋯⟩ ≫
      stalkPushforward CommRingCat X.toΓSpecBase X.presheaf ↑⟨x, ⋯⟩
tactic: rw [← stalkPushforward_germ _ X.toΓSpecBase X.presheaf ⊤]
state_before: X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ (X.toToΓSpecMapBasicOpen 1 ≫
        ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩) ≫
      stalkPushforward CommRingCat X.toΓSpecSheafedSpace.base X.presheaf x =
    ((pushforward CommRingCat X.toΓSpecBase).obj X.presheaf).germ ⟨X.toΓSpecBase ↑⟨x, ⋯⟩, ⋯⟩ ≫
      stalkPushforward CommRingCat X.toΓSpecBase X.presheaf ↑⟨x, ⋯⟩
state_after: case e_a
X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ X.toToΓSpecMapBasicOpen 1 ≫
      ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩ =
    ((pushforward CommRingCat X.toΓSpecBase).obj X.presheaf).germ ⟨X.toΓSpecBase ↑⟨x, ⋯⟩, ⋯⟩
tactic: congr 1
state_before: case e_a
X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ X.toToΓSpecMapBasicOpen 1 ≫
      ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩ =
    ((pushforward CommRingCat X.toΓSpecBase).obj X.presheaf).germ ⟨X.toΓSpecBase ↑⟨x, ⋯⟩, ⋯⟩
state_after: case e_a
X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ ((pushforward CommRingCat X.toΓSpecBase).obj X.presheaf).map ⋯.hom.op ≫
      ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩ =
    ((pushforward CommRingCat X.toΓSpecBase).obj X.presheaf).germ ⟨X.toΓSpecBase ↑⟨x, ⋯⟩, ⋯⟩
tactic: change (X.toΓSpecBase _* X.presheaf).map le_top.hom.op ≫ _ = _
state_before: case e_a
X : LocallyRingedSpace
r : ↑(Γ.obj (op X))
x : ↑X.toTopCat
⊢ ((pushforward CommRingCat X.toΓSpecBase).obj X.presheaf).map ⋯.hom.op ≫
      ((pushforward CommRingCat X.toΓSpecSheafedSpace.base).obj X.presheaf).germ ⟨X.toΓSpecFun x, ⋯⟩ =
    ((pushforward CommRingCat X.toΓSpecBase).obj X.presheaf).germ ⟨X.toΓSpecBase ↑⟨x, ⋯⟩, ⋯⟩
state_after: no goals
tactic: apply germ_res