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

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
⊢ (X.restrictStalkIso h x).inv = 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 ≫
      stalkMap (X.ofRestrict h) x

tactic: induction V with | h 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 ≫
      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)
        { unop := V } ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        { unop := V } ≫
      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)
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        { unop := V } ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        { unop := V } ≫
      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)
        { unop := V } ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        { unop := V } ≫
      stalkMap (X.ofRestrict h) x

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)
        { unop := V } ≫
      (X.restrictStalkIso h x).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj X.presheaf)
        { unop := V } ≫
      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)
      { unop := 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
          { unop := V } ≫
        (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
            { unop := 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 { unop := 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)
      { unop := 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
          { unop := V } ≫
        (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
            { unop := 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 { unop := 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)
      { unop := 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
        { unop := V } ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
          { unop := 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 { unop := V }) ≫
          (X.restrictStalkIso h x).hom

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)
      { unop := 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
        { unop := V } ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
          { unop := 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 { unop := 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)
      { unop := 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
        { unop := V } ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
          { unop := V } ≫
        colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
          ((⋯.functorNhds x).op.obj ((OpenNhds.map (X.ofRestrict h).base x).op.obj { unop := 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)
      { unop := 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
        { unop := V } ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv) (X.restrict h).presheaf).app
          { unop := V } ≫
        colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
          ((⋯.functorNhds x).op.obj ((OpenNhds.map (X.ofRestrict h).base x).op.obj { unop := 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)
      { unop := V } =
    X.presheaf.map
        ((⋯.adjunction.counit.app ((OpenNhds.inclusion ((X.ofRestrict h).base x)).op.obj { unop := V }).unop).op ≫
          ⋯.functor.op.map ((NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv).app { unop := V })) ≫
      colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
        ((⋯.functorNhds x).op.obj ((OpenNhds.map (X.ofRestrict h).base x).op.obj { unop := V }))

tactic: exact (colimit.w ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf) i.op).symm
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)
      { unop := V } =
    X.presheaf.map
        ((⋯.adjunction.counit.app ((OpenNhds.inclusion ((X.ofRestrict h).base x)).op.obj { unop := V }).unop).op ≫
          ⋯.functor.op.map ((NatTrans.op (OpenNhds.inclusionMapIso (X.ofRestrict h).base x).inv).app { unop := V })) ≫
      colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf)
        ((⋯.functorNhds x).op.obj ((OpenNhds.map (X.ofRestrict h).base x).op.obj { unop := V }))
state_after: no goals