l3lab/ntp-mathlib huggingface dataset:
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  

Proof state:
case h.e'_5.h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
e_3✝ : stalk (f _* F) (f x) = colimit ((OpenNhds.inclusion (f x)).op ⋙ f _* F)
e_4✝ : stalk F x = colim.obj (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
⊢ stalkPushforward C f F x =
    ((Functor.Final.colimitIso (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op
            ((OpenNhds.inclusion (f x)).op ⋙ f _* F)).symm ≪≫
        colim.mapIso ?convert_2).hom
case convert_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
⊢ (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op ⋙ (OpenNhds.inclusion (f x)).op ⋙ f _* F ≅
    ((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F

Next tactic:
swap
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · 

Proof state:
case convert_2
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
⊢ (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op ⋙ (OpenNhds.inclusion (f x)).op ⋙ f _* F ≅
    ((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F

Next tactic:
fapply NatIso.ofComponents
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · 

Proof state:
case convert_2.app
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
⊢ (X_1 : (OpenNhds x)ᵒᵖ) →
    ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op ⋙ (OpenNhds.inclusion (f x)).op ⋙ f _* F).obj X_1 ≅
      (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F).obj X_1

Next tactic:
intro U
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      

Proof state:
case convert_2.app
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
U : (OpenNhds x)ᵒᵖ
⊢ ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op ⋙ (OpenNhds.inclusion (f x)).op ⋙ f _* F).obj U ≅
    (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F).obj U

Next tactic:
refine' F.mapIso (eqToIso _)
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      

Proof state:
case convert_2.app
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
U : (OpenNhds x)ᵒᵖ
⊢ (Opens.map f).op.obj ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
    (OpenNhds.inclusion x).op.obj U

Next tactic:
dsimp only [Functor.op]
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      

Proof state:
case convert_2.app
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
U : (OpenNhds x)ᵒᵖ
⊢ op
      ((Opens.map f).obj
        (op
            ((OpenNhds.inclusion (f x)).obj
              (op ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).obj U.unop)).unop)).unop) =
    op ((OpenNhds.inclusion x).obj U.unop)

Next tactic:
exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · 

Proof state:
case convert_2.naturality
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
⊢ autoParam
    (∀ {X_1 Y_1 : (OpenNhds x)ᵒᵖ} (f_1 : X_1 ⟶ Y_1),
      ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op ⋙ (OpenNhds.inclusion (f x)).op ⋙ f _* F).map f_1 ≫
          (F.mapIso
              (eqToIso
                (_ :
                  (Opens.map f).op.obj
                      ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj Y_1)) =
                    (OpenNhds.inclusion x).op.obj Y_1))).hom =
        (F.mapIso
              (eqToIso
                (_ :
                  (Opens.map f).op.obj
                      ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj X_1)) =
                    (OpenNhds.inclusion x).op.obj X_1))).hom ≫
          (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F).map f_1)
    _auto✝

Next tactic:
intro U V i
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · intro U V i; 

Proof state:
case convert_2.naturality
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
U V : (OpenNhds x)ᵒᵖ
i : U ⟶ V
⊢ ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op ⋙ (OpenNhds.inclusion (f x)).op ⋙ f _* F).map i ≫
      (F.mapIso
          (eqToIso
            (_ :
              (Opens.map f).op.obj
                  ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj V)) =
                (OpenNhds.inclusion x).op.obj V))).hom =
    (F.mapIso
          (eqToIso
            (_ :
              (Opens.map f).op.obj
                  ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
                (OpenNhds.inclusion x).op.obj U))).hom ≫
      (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F).map i

Next tactic:
erw [← F.map_comp, ← F.map_comp]
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · intro U V i; erw [← F.map_comp, ← F.map_comp]; 

Proof state:
case convert_2.naturality
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
U V : (OpenNhds x)ᵒᵖ
i : U ⟶ V
⊢ F.map
      ((Opens.map f).op.map
          ((OpenNhds.inclusion (f x)).op.map ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.map i)) ≫
        (eqToIso
            (_ :
              (Opens.map f).op.obj
                  ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj V)) =
                (OpenNhds.inclusion x).op.obj V)).hom) =
    F.map
      ((eqToIso
            (_ :
              (Opens.map f).op.obj
                  ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
                (OpenNhds.inclusion x).op.obj U)).hom ≫
        (OpenNhds.inclusion x).op.map i)

Next tactic:
congr 1
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · intro U V i; erw [← F.map_comp, ← F.map_comp]; congr 1
  · 

Proof state:
case h.e'_5.h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
e_3✝ : stalk (f _* F) (f x) = colimit ((OpenNhds.inclusion (f x)).op ⋙ f _* F)
e_4✝ : stalk F x = colim.obj (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
⊢ stalkPushforward C f F x =
    ((Functor.Final.colimitIso (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op
            ((OpenNhds.inclusion (f x)).op ⋙ f _* F)).symm ≪≫
        colim.mapIso
          (NatIso.ofComponents fun U =>
            F.mapIso
              (eqToIso
                (_ :
                  (Opens.map f).op.obj
                      ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
                    (OpenNhds.inclusion x).op.obj U)))).hom

Next tactic:
change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · intro U V i; erw [← F.map_comp, ← F.map_comp]; congr 1
  · change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
    

Proof state:
case h.e'_5.h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
e_3✝ : stalk (f _* F) (f x) = colimit ((OpenNhds.inclusion (f x)).op ⋙ f _* F)
e_4✝ : stalk F x = colim.obj (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
⊢ stalkPushforward C f F x =
    ((Functor.Final.colimitIso (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op
            ((OpenNhds.inclusion (f x)).op ⋙ f _* F)).symm ≪≫
        colim.mapIso
          (NatIso.ofComponents fun U =>
            F.mapIso
              (eqToIso
                (_ :
                  (Opens.map f).op.obj
                      ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
                    (OpenNhds.inclusion x).op.obj U)))).hom

Next tactic:
ext U
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · intro U V i; erw [← F.map_comp, ← F.map_comp]; congr 1
  · change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
    ext U
    

Proof state:
case h.e'_5.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
e_3✝ : stalk (f _* F) (f x) = colimit ((OpenNhds.inclusion (f x)).op ⋙ f _* F)
e_4✝ : stalk F x = colim.obj (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
U : (OpenNhds (f x))ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj (f _* F)) U ≫
      stalkPushforward C f F x =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj (f _* F)) U ≫
      ((Functor.Final.colimitIso (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F)).symm ≪≫
          colim.mapIso
            (NatIso.ofComponents fun U =>
              F.mapIso
                (eqToIso
                  (_ :
                    (Opens.map f).op.obj
                        ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
                      (OpenNhds.inclusion x).op.obj U)))).hom

Next tactic:
rw [← Iso.comp_inv_eq]
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · intro U V i; erw [← F.map_comp, ← F.map_comp]; congr 1
  · change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
    ext U
    rw [← Iso.comp_inv_eq]
    

Proof state:
case h.e'_5.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
e_3✝ : stalk (f _* F) (f x) = colimit ((OpenNhds.inclusion (f x)).op ⋙ f _* F)
e_4✝ : stalk F x = colim.obj (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
U : (OpenNhds (f x))ᵒᵖ
⊢ (colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj (f _* F)) U ≫
        stalkPushforward C f F x) ≫
      ((Functor.Final.colimitIso (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F)).symm ≪≫
          colim.mapIso
            (NatIso.ofComponents fun U =>
              F.mapIso
                (eqToIso
                  (_ :
                    (Opens.map f).op.obj
                        ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
                      (OpenNhds.inclusion x).op.obj U)))).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj (f _* F)) U

Next tactic:
erw [colimit.ι_map_assoc]
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · intro U V i; erw [← F.map_comp, ← F.map_comp]; congr 1
  · change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
    ext U
    rw [← Iso.comp_inv_eq]
    erw [colimit.ι_map_assoc]
    

Proof state:
case h.e'_5.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
e_3✝ : stalk (f _* F) (f x) = colimit ((OpenNhds.inclusion (f x)).op ⋙ f _* F)
e_4✝ : stalk F x = colim.obj (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
U : (OpenNhds (f x))ᵒᵖ
⊢ ((whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso f x).inv) F).app U ≫
        colimit.ι
            ((OpenNhds.map f x).op ⋙
              ((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
            U ≫
          colimit.pre (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
            (OpenNhds.map f x).op) ≫
      ((Functor.Final.colimitIso (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F)).symm ≪≫
          colim.mapIso
            (NatIso.ofComponents fun U =>
              F.mapIso
                (eqToIso
                  (_ :
                    (Opens.map f).op.obj
                        ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
                      (OpenNhds.inclusion x).op.obj U)))).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj (f _* F)) U

Next tactic:
rw [colimit.ι_pre, Category.assoc]
theorem stalkPushforward_iso_of_openEmbedding {f : X ⟶ Y} (hf : OpenEmbedding f) (F : X.Presheaf C)
    (x : X) : IsIso (F.stalkPushforward _ f x) := by
  haveI := Functor.initial_of_adjunction (hf.isOpenMap.adjunctionNhds x)
  convert IsIso.of_iso
      ((Functor.Final.colimitIso (hf.isOpenMap.functorNhds x).op
              ((OpenNhds.inclusion (f x)).op ⋙ f _* F) :
            _).symm ≪≫
        colim.mapIso _)
  swap
  · fapply NatIso.ofComponents
    · intro U
      refine' F.mapIso (eqToIso _)
      dsimp only [Functor.op]
      exact congr_arg op (Opens.ext <| Set.preimage_image_eq (unop U).1.1 hf.inj)
    · intro U V i; erw [← F.map_comp, ← F.map_comp]; congr 1
  · change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
    ext U
    rw [← Iso.comp_inv_eq]
    erw [colimit.ι_map_assoc]
    rw [colimit.ι_pre, Category.assoc]
    

Proof state:
case h.e'_5.h.w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
hf : OpenEmbedding ⇑f
F : Presheaf C X
x : ↑X
this : Functor.Initial (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x)
e_3✝ : stalk (f _* F) (f x) = colimit ((OpenNhds.inclusion (f x)).op ⋙ f _* F)
e_4✝ : stalk F x = colim.obj (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
U : (OpenNhds (f x))ᵒᵖ
⊢ (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso f x).inv) F).app U ≫
      colimit.ι (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj F)
          ((OpenNhds.map f x).op.obj U) ≫
        ((Functor.Final.colimitIso (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op
                ((OpenNhds.inclusion (f x)).op ⋙ f _* F)).symm ≪≫
            colim.mapIso
              (NatIso.ofComponents fun U =>
                F.mapIso
                  (eqToIso
                    (_ :
                      (Opens.map f).op.obj
                          ((OpenNhds.inclusion (f x)).op.obj ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj U)) =
                        (OpenNhds.inclusion x).op.obj U)))).inv =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj (f _* F)) U

Next tactic:
erw [colimit.ι_map_assoc, colimit.ι_pre, ← F.map_comp_assoc]