Theorem: AlgebraicGeometry.PresheafedSpace.restrictStalkIso_inv_eq_ofRestrict
File: Mathlib/Geometry/RingedSpace/Stalks.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
⊢ (X.restrictStalkIso h x).inv = Hom.stalkMap (X.ofRestrict h) x
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : (OpenNhds (f x))ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf) V ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        V ≫
      Hom.stalkMap (X.ofRestrict h) x
tactic: refine colimit.hom_ext fun V => ?_
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : (OpenNhds (f x))ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf) V ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        V ≫
      Hom.stalkMap (X.ofRestrict h) x
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        (op V) ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        (op V) ≫
      Hom.stalkMap (X.ofRestrict h) x
tactic: induction V with | h V => ?_
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        (op V) ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        (op V) ≫
      Hom.stalkMap (X.ofRestrict h) x
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        (op V) ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        (op V) ≫
      Hom.stalkMap (X.ofRestrict h) x
tactic: let i : (h.isOpenMap.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V :=
    homOfLE (Set.image_preimage_subset f _)
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        (op V) ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        (op V) ≫
      Hom.stalkMap (X.ofRestrict h) x
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
      (op V) =
    ((((whiskeringLeft (OpenNhds ((X.ofRestrict h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                  (OpenNhds.inclusion ((X.ofRestrict h).base x)).op).map
              (X.ofRestrict h).c).app
          (op V) ≫
        (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
            (op V) ≫
          colimit.ι
            (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑↑(X.restrict h))ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj
              (X.restrict h).presheaf)
            ((OpenNhds.map (X.ofRestrict h).base x).op.obj (op V))) ≫
      (X.restrictStalkIso h x).hom
tactic: erw [Iso.comp_inv_eq, colimit.ι_map_assoc, colimit.ι_map_assoc, colimit.ι_pre]
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
      (op V) =
    ((((whiskeringLeft (OpenNhds ((X.ofRestrict h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                  (OpenNhds.inclusion ((X.ofRestrict h).base x)).op).map
              (X.ofRestrict h).c).app
          (op V) ≫
        (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
            (op V) ≫
          colimit.ι
            (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑↑(X.restrict h))ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj
              (X.restrict h).presheaf)
            ((OpenNhds.map (X.ofRestrict h).base x).op.obj (op V))) ≫
      (X.restrictStalkIso h x).hom
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
      (op V) =
    (((whiskeringLeft (OpenNhds ((X.ofRestrict h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                (OpenNhds.inclusion ((X.ofRestrict h).base x)).op).map
            (X.ofRestrict h).c).app
        (op V) ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
          (op V) ≫
        colimit.ι
            (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑↑(X.restrict h))ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj
              (X.restrict h).presheaf)
            ((OpenNhds.map (X.ofRestrict h).base x).op.obj (op V)) ≫
          (X.restrictStalkIso h x).hom
tactic: simp_rw [Category.assoc]
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
      (op V) =
    (((whiskeringLeft (OpenNhds ((X.ofRestrict h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                (OpenNhds.inclusion ((X.ofRestrict h).base x)).op).map
            (X.ofRestrict h).c).app
        (op V) ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
          (op V) ≫
        colimit.ι
            (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑↑(X.restrict h))ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj
              (X.restrict h).presheaf)
            ((OpenNhds.map (X.ofRestrict h).base x).op.obj (op V)) ≫
          (X.restrictStalkIso h x).hom
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
      (op V) =
    (((whiskeringLeft (OpenNhds ((X.ofRestrict h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                (OpenNhds.inclusion ((X.ofRestrict h).base x)).op).map
            (X.ofRestrict h).c).app
        (op V) ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
          (op V) ≫
        colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
          ((⋯.functorNhds x).op.obj ((OpenNhds.map (X.ofRestrict h).base x).op.obj (op V)))
tactic: erw [colimit.ι_pre ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
      (h.isOpenMap.functorNhds x).op]
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
      (op V) =
    (((whiskeringLeft (OpenNhds ((X.ofRestrict h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                (OpenNhds.inclusion ((X.ofRestrict h).base x)).op).map
            (X.ofRestrict h).c).app
        (op V) ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
          (op V) ≫
        colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
          ((⋯.functorNhds x).op.obj ((OpenNhds.map (X.ofRestrict h).base x).op.obj (op V)))
state_after: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
      (op V) =
    X.presheaf.map
        ((⋯.adjunction.counit.app (unop ((OpenNhds.inclusion ((X.ofRestrict h).base x)).op.obj (op V)))).op ≫
          ⋯.functor.op.map ((NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv).app (op V))) ≫
      colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
        ((⋯.functorNhds x).op.obj ((OpenNhds.map (X.ofRestrict h).base x).op.obj (op V)))
tactic: erw [← X.presheaf.map_comp_assoc]
state_before: case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
x : ↑U
V : OpenNhds (f x)
i : (⋯.functorNhds x).obj ((OpenNhds.map f x).obj V) ⟶ V := homOfLE ⋯
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
      (op V) =
    X.presheaf.map
        ((⋯.adjunction.counit.app (unop ((OpenNhds.inclusion ((X.ofRestrict h).base x)).op.obj (op V)))).op ≫
          ⋯.functor.op.map ((NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv).app (op V))) ≫
      colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
        ((⋯.functorNhds x).op.obj ((OpenNhds.map (X.ofRestrict h).base x).op.obj (op V)))
state_after: no goals
tactic: exact (colimit.w ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf) i.op).symm