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 _)
  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]
    erw [colimit.ι_map_assoc, colimit.ι_pre, ← F.map_comp_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))ᵒᵖ
⊢ F.map
        ((NatTrans.op (OpenNhds.inclusionMapIso f x).inv).app U ≫
          (eqToIso
              (_ :
                (Opens.map f).op.obj
                    ((OpenNhds.inclusion (f x)).op.obj
                      ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj ((OpenNhds.map f x).op.obj U))) =
                  (OpenNhds.inclusion x).op.obj ((OpenNhds.map f x).op.obj U))).inv) ≫
      colimit.ι ((OpenNhds.inclusion (f x)).op ⋙ f _* F)
        ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj ((OpenNhds.map f x).op.obj U)) =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj (f _* F)) U

Next tactic:
apply colimit.w ((OpenNhds.inclusion (f x)).op ⋙ f _* F) _
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]
    erw [colimit.ι_map_assoc, colimit.ι_pre, ← F.map_comp_assoc]
    apply colimit.w ((OpenNhds.inclusion (f x)).op ⋙ f _* F) _
    

Proof state:
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))ᵒᵖ
⊢ U ⟶ (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).op.obj ((OpenNhds.map f 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]
      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]
    erw [colimit.ι_map_assoc, colimit.ι_pre, ← F.map_comp_assoc]
    apply colimit.w ((OpenNhds.inclusion (f x)).op ⋙ f _* F) _
    dsimp only [Functor.op]
    

Proof state:
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))ᵒᵖ
⊢ U ⟶ op ((IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).obj (op ((OpenNhds.map f x).obj U.unop)).unop)

Next tactic:
refine' ((homOfLE _).op : op (unop 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
    rw [← Iso.comp_inv_eq]
    erw [colimit.ι_map_assoc]
    rw [colimit.ι_pre, Category.assoc]
    erw [colimit.ι_map_assoc, colimit.ι_pre, ← F.map_comp_assoc]
    apply colimit.w ((OpenNhds.inclusion (f x)).op ⋙ f _* F) _
    dsimp only [Functor.op]
    refine' ((homOfLE _).op : op (unop U) ⟶ _)
    

Proof state:
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))ᵒᵖ
⊢ (IsOpenMap.functorNhds (_ : IsOpenMap ⇑f) x).obj (op ((OpenNhds.map f x).obj U.unop)).unop ≤ U.unop

Next tactic:
exact Set.image_preimage_subset _ _
/-- The morphism `(f⁻¹ℱ)(U) ⟶ ℱ_{f(x)}` for some `U ∋ x`. -/
def germToPullbackStalk (f : X ⟶ Y) (F : Y.Presheaf C) (U : Opens X) (x : U) :
    (pullbackObj f F).obj (op U) ⟶ F.stalk ((f : X → Y) (x : X)) :=
  colimit.desc (Lan.diagram (Opens.map f).op F (op U))
    { pt := F.stalk ((f : X → Y) (x : X))
      ι :=
        { app := fun V => F.germ ⟨((f : X → Y) (x : X)), V.hom.unop.le x.2⟩
          naturality := fun _ _ i => by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
U : Opens ↑X
x : ↥U
x✝¹ x✝ : CostructuredArrow (Opens.map f).op (op U)
i : x✝¹ ⟶ x✝
⊢ (Lan.diagram (Opens.map f).op F (op U)).map i ≫
      (fun V => germ F { val := f ↑x, property := (_ : ↑x ∈ ↑((Opens.map f).op.obj V.left).unop) }) x✝ =
    (fun V => germ F { val := f ↑x, property := (_ : ↑x ∈ ↑((Opens.map f).op.obj V.left).unop) }) x✝¹ ≫
      ((Functor.const (CostructuredArrow (Opens.map f).op (op U))).obj (stalk F (f ↑x))).map i

Next tactic:
erw [Category.comp_id]
/-- The morphism `(f⁻¹ℱ)(U) ⟶ ℱ_{f(x)}` for some `U ∋ x`. -/
def germToPullbackStalk (f : X ⟶ Y) (F : Y.Presheaf C) (U : Opens X) (x : U) :
    (pullbackObj f F).obj (op U) ⟶ F.stalk ((f : X → Y) (x : X)) :=
  colimit.desc (Lan.diagram (Opens.map f).op F (op U))
    { pt := F.stalk ((f : X → Y) (x : X))
      ι :=
        { app := fun V => F.germ ⟨((f : X → Y) (x : X)), V.hom.unop.le x.2⟩
          naturality := fun _ _ i => by erw [Category.comp_id]; 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
U : Opens ↑X
x : ↥U
x✝¹ x✝ : CostructuredArrow (Opens.map f).op (op U)
i : x✝¹ ⟶ x✝
⊢ (Lan.diagram (Opens.map f).op F (op U)).map i ≫
      (fun V => germ F { val := f ↑x, property := (_ : ↑x ∈ ↑((Opens.map f).op.obj V.left).unop) }) x✝ =
    (fun V => germ F { val := f ↑x, property := (_ : ↑x ∈ ↑((Opens.map f).op.obj V.left).unop) }) x✝¹

Next tactic:
exact F.germ_res i.left.unop _
/-- The morphism `(f⁻¹ℱ)ₓ ⟶ ℱ_{f(x)}`. -/
def stalkPullbackInv (f : X ⟶ Y) (F : Y.Presheaf C) (x : X) :
    (pullbackObj f F).stalk x ⟶ F.stalk (f x) :=
  colimit.desc ((OpenNhds.inclusion x).op ⋙ Presheaf.pullbackObj f F)
    { pt := F.stalk (f x)
      ι :=
        { app := fun U => F.germToPullbackStalk _ f (unop U).1 ⟨x, (unop U).2⟩
          naturality := fun _ _ _ => by 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
x : ↑X
x✝² x✝¹ : (OpenNhds x)ᵒᵖ
x✝ : x✝² ⟶ x✝¹
⊢ ((OpenNhds.inclusion x).op ⋙ pullbackObj f F).map x✝ ≫
      (fun U => germToPullbackStalk C f F U.unop.obj { val := x, property := (_ : x ∈ U.unop.obj) }) x✝¹ =
    (fun U => germToPullbackStalk C f F U.unop.obj { val := x, property := (_ : x ∈ U.unop.obj) }) x✝² ≫
      ((Functor.const (OpenNhds x)ᵒᵖ).obj (stalk F (f x))).map x✝

Next tactic:
erw [colimit.pre_desc, Category.comp_id]
/-- The morphism `(f⁻¹ℱ)ₓ ⟶ ℱ_{f(x)}`. -/
def stalkPullbackInv (f : X ⟶ Y) (F : Y.Presheaf C) (x : X) :
    (pullbackObj f F).stalk x ⟶ F.stalk (f x) :=
  colimit.desc ((OpenNhds.inclusion x).op ⋙ Presheaf.pullbackObj f F)
    { pt := F.stalk (f x)
      ι :=
        { app := fun U => F.germToPullbackStalk _ f (unop U).1 ⟨x, (unop U).2⟩
          naturality := fun _ _ _ => by erw [colimit.pre_desc, Category.comp_id]; 

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
x : ↑X
x✝² x✝¹ : (OpenNhds x)ᵒᵖ
x✝ : x✝² ⟶ x✝¹
⊢ colimit.desc
      (CostructuredArrow.map ((OpenNhds.inclusion x).op.map x✝) ⋙
        Lan.diagram (Opens.map f).op F ((OpenNhds.inclusion x).op.obj x✝¹))
      (Cocone.whisker (CostructuredArrow.map ((OpenNhds.inclusion x).op.map x✝))
        { pt := stalk F (f ↑{ val := x, property := (_ : x ∈ x✝¹.unop.obj) }),
          ι :=
            NatTrans.mk fun V =>
              germ F
                { val := f ↑{ val := x, property := (_ : x ∈ x✝¹.unop.obj) },
                  property :=
                    (_ : ↑{ val := x, property := (_ : x ∈ x✝¹.unop.obj) } ∈ ↑((Opens.map f).op.obj V.left).unop) } }) =
    (fun U => germToPullbackStalk C f F U.unop.obj { val := x, property := (_ : x ∈ U.unop.obj) }) x✝²

Next tactic:
congr
/-- The isomorphism `ℱ_{f(x)} ≅ (f⁻¹ℱ)ₓ`. -/
def stalkPullbackIso (f : X ⟶ Y) (F : Y.Presheaf C) (x : X) :
    F.stalk (f x) ≅ (pullbackObj f F).stalk x where
  hom := stalkPullbackHom _ _ _ _
  inv := stalkPullbackInv _ _ _ _
  hom_inv_id := by
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
x : ↑X
⊢ stalkPullbackHom C f F x ≫ stalkPullbackInv C f F x = 𝟙 (stalk F (f x))

Next tactic:
delta
      stalkPullbackHom stalkPullbackInv stalkFunctor Presheaf.pullback stalkPushforward
      germToPullbackStalk germ
/-- The isomorphism `ℱ_{f(x)} ≅ (f⁻¹ℱ)ₓ`. -/
def stalkPullbackIso (f : X ⟶ Y) (F : Y.Presheaf C) (x : X) :
    F.stalk (f x) ≅ (pullbackObj f F).stalk x where
  hom := stalkPullbackHom _ _ _ _
  inv := stalkPullbackInv _ _ _ _
  hom_inv_id := by
    delta
      stalkPullbackHom stalkPullbackInv stalkFunctor Presheaf.pullback stalkPushforward
      germToPullbackStalk germ
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
x : ↑X
⊢ (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op ⋙ colim).map
          ((pushforwardPullbackAdjunction C f).unit.app F) ≫
        colim.map (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso f x).inv) ((lan (Opens.map f).op).obj F)) ≫
          colimit.pre
            (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj
              ((lan (Opens.map f).op).obj F))
            (OpenNhds.map f x).op) ≫
      colimit.desc ((OpenNhds.inclusion x).op ⋙ pullbackObj f F)
        { pt := stalk F (f x),
          ι :=
            NatTrans.mk fun U =>
              colimit.desc (Lan.diagram (Opens.map f).op F (op U.unop.obj))
                { pt := stalk F (f ↑{ val := x, property := (_ : x ∈ U.unop.obj) }),
                  ι :=
                    NatTrans.mk fun V =>
                      colimit.ι
                        ((OpenNhds.inclusion
                              ↑{ val := f ↑{ val := x, property := (_ : x ∈ U.unop.obj) },
                                  property :=
                                    (_ :
                                      ↑{ val := x, property := (_ : x ∈ U.unop.obj) } ∈
                                        ↑((Opens.map f).op.obj V.left).unop) }).op ⋙
                          F)
                        (op
                          { obj := V.left.unop,
                            property :=
                              (_ :
                                ↑{ val := f ↑{ val := x, property := (_ : x ∈ U.unop.obj) },
                                      property :=
                                        (_ :
                                          ↑{ val := x, property := (_ : x ∈ U.unop.obj) } ∈
                                            ↑((Opens.map f).op.obj V.left).unop) } ∈
                                  V.left.unop) }) } } =
    𝟙 (stalk F (f x))

Next tactic:
change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
/-- The isomorphism `ℱ_{f(x)} ≅ (f⁻¹ℱ)ₓ`. -/
def stalkPullbackIso (f : X ⟶ Y) (F : Y.Presheaf C) (x : X) :
    F.stalk (f x) ≅ (pullbackObj f F).stalk x where
  hom := stalkPullbackHom _ _ _ _
  inv := stalkPullbackInv _ _ _ _
  hom_inv_id := by
    delta
      stalkPullbackHom stalkPullbackInv stalkFunctor Presheaf.pullback stalkPushforward
      germToPullbackStalk germ
    change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
    

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
x : ↑X
⊢ (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op ⋙ colim).map
          ((pushforwardPullbackAdjunction C f).unit.app F) ≫
        colim.map (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso f x).inv) ((lan (Opens.map f).op).obj F)) ≫
          colimit.pre
            (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj
              ((lan (Opens.map f).op).obj F))
            (OpenNhds.map f x).op) ≫
      colimit.desc ((OpenNhds.inclusion x).op ⋙ pullbackObj f F)
        { pt := stalk F (f x),
          ι :=
            NatTrans.mk fun U =>
              colimit.desc (Lan.diagram (Opens.map f).op F (op U.unop.obj))
                { pt := stalk F (f ↑{ val := x, property := (_ : x ∈ U.unop.obj) }),
                  ι :=
                    NatTrans.mk fun V =>
                      colimit.ι
                        ((OpenNhds.inclusion
                              ↑{ val := f ↑{ val := x, property := (_ : x ∈ U.unop.obj) },
                                  property :=
                                    (_ :
                                      ↑{ val := x, property := (_ : x ∈ U.unop.obj) } ∈
                                        ↑((Opens.map f).op.obj V.left).unop) }).op ⋙
                          F)
                        (op
                          { obj := V.left.unop,
                            property :=
                              (_ :
                                ↑{ val := f ↑{ val := x, property := (_ : x ∈ U.unop.obj) },
                                      property :=
                                        (_ :
                                          ↑{ val := x, property := (_ : x ∈ U.unop.obj) } ∈
                                            ↑((Opens.map f).op.obj V.left).unop) } ∈
                                  V.left.unop) }) } } =
    𝟙 (stalk F (f x))

Next tactic:
ext j
/-- The isomorphism `ℱ_{f(x)} ≅ (f⁻¹ℱ)ₓ`. -/
def stalkPullbackIso (f : X ⟶ Y) (F : Y.Presheaf C) (x : X) :
    F.stalk (f x) ≅ (pullbackObj f F).stalk x where
  hom := stalkPullbackHom _ _ _ _
  inv := stalkPullbackInv _ _ _ _
  hom_inv_id := by
    delta
      stalkPullbackHom stalkPullbackInv stalkFunctor Presheaf.pullback stalkPushforward
      germToPullbackStalk germ
    change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
    ext j
    

Proof state:
case w
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
x : ↑X
j : (OpenNhds (f x))ᵒᵖ
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj F) j ≫
      (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op ⋙ colim).map
            ((pushforwardPullbackAdjunction C f).unit.app F) ≫
          colim.map (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso f x).inv) ((lan (Opens.map f).op).obj F)) ≫
            colimit.pre
              (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj
                ((lan (Opens.map f).op).obj F))
              (OpenNhds.map f x).op) ≫
        colimit.desc ((OpenNhds.inclusion x).op ⋙ pullbackObj f F)
          { pt := stalk F (f x),
            ι :=
              NatTrans.mk fun U =>
                colimit.desc (Lan.diagram (Opens.map f).op F (op U.unop.obj))
                  { pt := stalk F (f ↑{ val := x, property := (_ : x ∈ U.unop.obj) }),
                    ι :=
                      NatTrans.mk fun V =>
                        colimit.ι
                          ((OpenNhds.inclusion
                                ↑{ val := f ↑{ val := x, property := (_ : x ∈ U.unop.obj) },
                                    property :=
                                      (_ :
                                        ↑{ val := x, property := (_ : x ∈ U.unop.obj) } ∈
                                          ↑((Opens.map f).op.obj V.left).unop) }).op ⋙
                            F)
                          (op
                            { obj := V.left.unop,
                              property :=
                                (_ :
                                  ↑{ val := f ↑{ val := x, property := (_ : x ∈ U.unop.obj) },
                                        property :=
                                          (_ :
                                            ↑{ val := x, property := (_ : x ∈ U.unop.obj) } ∈
                                              ↑((Opens.map f).op.obj V.left).unop) } ∈
                                    V.left.unop) }) } } =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj F) j ≫
      𝟙 (stalk F (f x))

Next tactic:
induction' j with j
/-- The isomorphism `ℱ_{f(x)} ≅ (f⁻¹ℱ)ₓ`. -/
def stalkPullbackIso (f : X ⟶ Y) (F : Y.Presheaf C) (x : X) :
    F.stalk (f x) ≅ (pullbackObj f F).stalk x where
  hom := stalkPullbackHom _ _ _ _
  inv := stalkPullbackInv _ _ _ _
  hom_inv_id := by
    delta
      stalkPullbackHom stalkPullbackInv stalkFunctor Presheaf.pullback stalkPushforward
      germToPullbackStalk germ
    change (_ : colimit _ ⟶ _) = (_ : colimit _ ⟶ _)
    ext j
    induction' j with j
    

Proof state:
case w.h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y Z : TopCat
f : X ⟶ Y
F : Presheaf C Y
x : ↑X
j : OpenNhds (f x)
⊢ colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj F) (op j) ≫
      (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op ⋙ colim).map
            ((pushforwardPullbackAdjunction C f).unit.app F) ≫
          colim.map (whiskerRight (NatTrans.op (OpenNhds.inclusionMapIso f x).inv) ((lan (Opens.map f).op).obj F)) ≫
            colimit.pre
              (((whiskeringLeft (OpenNhds x)ᵒᵖ (Opens ↑X)ᵒᵖ C).obj (OpenNhds.inclusion x).op).obj
                ((lan (Opens.map f).op).obj F))
              (OpenNhds.map f x).op) ≫
        colimit.desc ((OpenNhds.inclusion x).op ⋙ pullbackObj f F)
          { pt := stalk F (f x),
            ι :=
              NatTrans.mk fun U =>
                colimit.desc (Lan.diagram (Opens.map f).op F (op U.unop.obj))
                  { pt := stalk F (f ↑{ val := x, property := (_ : x ∈ U.unop.obj) }),
                    ι :=
                      NatTrans.mk fun V =>
                        colimit.ι
                          ((OpenNhds.inclusion
                                ↑{ val := f ↑{ val := x, property := (_ : x ∈ U.unop.obj) },
                                    property :=
                                      (_ :
                                        ↑{ val := x, property := (_ : x ∈ U.unop.obj) } ∈
                                          ↑((Opens.map f).op.obj V.left).unop) }).op ⋙
                            F)
                          (op
                            { obj := V.left.unop,
                              property :=
                                (_ :
                                  ↑{ val := f ↑{ val := x, property := (_ : x ∈ U.unop.obj) },
                                        property :=
                                          (_ :
                                            ↑{ val := x, property := (_ : x ∈ U.unop.obj) } ∈
                                              ↑((Opens.map f).op.obj V.left).unop) } ∈
                                    V.left.unop) }) } } =
    colimit.ι (((whiskeringLeft (OpenNhds (f x))ᵒᵖ (Opens ↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f x)).op).obj F) (op j) ≫
      𝟙 (stalk F (f x))

Next tactic:
cases j