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

tactic: refine colimit.hom_ext fun V => ?_
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ((CategoryTheory.forget TopCat).map f)
x : ↑U
⊢ (restrictStalkIso X h x).inv = stalkMap (ofRestrict X h) x

tactic: induction V with | h V => ?_
state_before: C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ((CategoryTheory.forget TopCat).map f)
x : ↑U
V : (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ
⊢ colimit.ι
        (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
              (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
          X.presheaf)
        V ≫
      (restrictStalkIso X h x).inv =
    colimit.ι
        (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
              (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
          X.presheaf)
        V ≫
      stalkMap (ofRestrict X 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 C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ((CategoryTheory.forget TopCat).map f)
x : ↑U
V : OpenNhds ((CategoryTheory.forget TopCat).map f x)
⊢ colimit.ι
        (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
              (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
          X.presheaf)
        V.op ≫
      (restrictStalkIso X h x).inv =
    colimit.ι
        (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
              (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
          X.presheaf)
        V.op ≫
      stalkMap (ofRestrict X 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 C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ((CategoryTheory.forget TopCat).map f)
x : ↑U
V : OpenNhds ((CategoryTheory.forget TopCat).map f x)
i : (IsOpenMap.functorNhds (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f)) x).obj ((OpenNhds.map f x).obj V) ⟶
  V :=
  homOfLE (_ : (CategoryTheory.forget TopCat).map f '' ((CategoryTheory.forget TopCat).map f ⁻¹' V.obj.1) ⊆ V.obj.1)
⊢ colimit.ι
        (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
              (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
          X.presheaf)
        V.op ≫
      (restrictStalkIso X h x).inv =
    colimit.ι
        (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
              (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
          X.presheaf)
        V.op ≫
      stalkMap (ofRestrict X h) x

tactic: simp_rw [Category.assoc]
state_before: case h
C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ((CategoryTheory.forget TopCat).map f)
x : ↑U
V : OpenNhds ((CategoryTheory.forget TopCat).map f x)
i : (IsOpenMap.functorNhds (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f)) x).obj ((OpenNhds.map f x).obj V) ⟶
  V :=
  homOfLE (_ : (CategoryTheory.forget TopCat).map f '' ((CategoryTheory.forget TopCat).map f ⁻¹' V.obj.1) ⊆ V.obj.1)
⊢ colimit.ι
      (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
            (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
        X.presheaf)
      V.op =
    ((((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map (ofRestrict X h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                  (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map (ofRestrict X h).base x)))).map
              (ofRestrict X h).c).app
          V.op ≫
        (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (ofRestrict X h).base x).inv) (restrict X h).presheaf).app
            V.op ≫
          colimit.ι
            (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑↑(restrict X h))ᵒᵖ C).obj (Functor.op (OpenNhds.inclusion x))).obj
              (restrict X h).presheaf)
            ((Functor.op (OpenNhds.map (ofRestrict X h).base x)).obj V.op)) ≫
      (restrictStalkIso X 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 C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ((CategoryTheory.forget TopCat).map f)
x : ↑U
V : OpenNhds ((CategoryTheory.forget TopCat).map f x)
i : (IsOpenMap.functorNhds (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f)) x).obj ((OpenNhds.map f x).obj V) ⟶
  V :=
  homOfLE (_ : (CategoryTheory.forget TopCat).map f '' ((CategoryTheory.forget TopCat).map f ⁻¹' V.obj.1) ⊆ V.obj.1)
⊢ colimit.ι
      (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
            (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
        X.presheaf)
      V.op =
    (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map (ofRestrict X h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map (ofRestrict X h).base x)))).map
            (ofRestrict X h).c).app
        V.op ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (ofRestrict X h).base x).inv) (restrict X h).presheaf).app
          V.op ≫
        colimit.ι
            (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑↑(restrict X h))ᵒᵖ C).obj (Functor.op (OpenNhds.inclusion x))).obj
              (restrict X h).presheaf)
            ((Functor.op (OpenNhds.map (ofRestrict X h).base x)).obj V.op) ≫
          (restrictStalkIso X h x).hom

tactic: erw [← X.presheaf.map_comp_assoc]
state_before: case h
C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ((CategoryTheory.forget TopCat).map f)
x : ↑U
V : OpenNhds ((CategoryTheory.forget TopCat).map f x)
i : (IsOpenMap.functorNhds (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f)) x).obj ((OpenNhds.map f x).obj V) ⟶
  V :=
  homOfLE (_ : (CategoryTheory.forget TopCat).map f '' ((CategoryTheory.forget TopCat).map f ⁻¹' V.obj.1) ⊆ V.obj.1)
⊢ colimit.ι
      (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
            (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
        X.presheaf)
      V.op =
    (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map (ofRestrict X h).base x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
                (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map (ofRestrict X h).base x)))).map
            (ofRestrict X h).c).app
        V.op ≫
      (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso (ofRestrict X h).base x).inv) (restrict X h).presheaf).app
          V.op ≫
        colimit.ι (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)) ⋙ X.presheaf)
          ((Functor.op (IsOpenMap.functorNhds (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f)) x)).obj
            ((Functor.op (OpenNhds.map (ofRestrict X h).base x)).obj V.op))

tactic: exact (colimit.w ((OpenNhds.inclusion (f x)).op ⋙ X.presheaf) i.op).symm
state_before: case h
C : Type u
inst✝¹ : Category C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ((CategoryTheory.forget TopCat).map f)
x : ↑U
V : OpenNhds ((CategoryTheory.forget TopCat).map f x)
i : (IsOpenMap.functorNhds (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f)) x).obj ((OpenNhds.map f x).obj V) ⟶
  V :=
  homOfLE (_ : (CategoryTheory.forget TopCat).map f '' ((CategoryTheory.forget TopCat).map f ⁻¹' V.obj.1) ⊆ V.obj.1)
⊢ colimit.ι
      (((whiskeringLeft (OpenNhds ((CategoryTheory.forget TopCat).map f x))ᵒᵖ (Opens ↑↑X)ᵒᵖ C).obj
            (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)))).obj
        X.presheaf)
      V.op =
    X.presheaf.map
        (((IsOpenMap.adjunction (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f))).counit.app
              ((Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map (ofRestrict X h).base x))).obj
                  V.op).unop).op ≫
          (Functor.op (IsOpenMap.functor (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f)))).map
            ((NatTrans.op (OpenNhds.inclusionMapIso (ofRestrict X h).base x).inv).app V.op)) ≫
      colimit.ι (Functor.op (OpenNhds.inclusion ((CategoryTheory.forget TopCat).map f x)) ⋙ X.presheaf)
        ((Functor.op (IsOpenMap.functorNhds (_ : IsOpenMap ((CategoryTheory.forget TopCat).map f)) x)).obj
          ((Functor.op (OpenNhds.map (ofRestrict X h).base x)).obj V.op))