l3lab/ntp-mathlib huggingface dataset:
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
⊢ ∃ inv, stalkMap α x ≫ inv = 𝟙 (stalk Y (α.base x)) ∧ inv ≫ stalkMap α x = 𝟙 (stalk X x)

Next tactic:
let β : Y ⟶ X := CategoryTheory.inv α
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    let β : Y ⟶ X := CategoryTheory.inv α
    

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
β : Y ⟶ X := CategoryTheory.inv α
⊢ ∃ inv, stalkMap α x ≫ inv = 𝟙 (stalk Y (α.base x)) ∧ inv ≫ stalkMap α x = 𝟙 (stalk X x)

Next tactic:
have h_eq : (α ≫ β).base x = x := by rw [IsIso.hom_inv_id α, id_base, TopCat.id_app]
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    let β : Y ⟶ X := CategoryTheory.inv α
    have h_eq : (α ≫ β).base x = x := by 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
β : Y ⟶ X := CategoryTheory.inv α
⊢ (α ≫ β).base x = x

Next tactic:
rw [IsIso.hom_inv_id α, id_base, TopCat.id_app]
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    let β : Y ⟶ X := CategoryTheory.inv α
    have h_eq : (α ≫ β).base x = x := by rw [IsIso.hom_inv_id α, id_base, TopCat.id_app]
    -- Intuitively, the inverse of the stalk map of `α` at `x` should just be the stalk map of `β`
    -- at `α x`. Unfortunately, we have a problem with dependent type theory here: Because `x`
    -- is not *definitionally* equal to `β (α x)`, the map `stalk_map β (α x)` has not the correct
    -- type for an inverse.
    -- To get a proper inverse, we need to compose with the `eq_to_hom` arrow
    -- `X.stalk x ⟶ X.stalk ((α ≫ β).base x)`.
    

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
β : Y ⟶ X := CategoryTheory.inv α
h_eq : (α ≫ β).base x = x
⊢ ∃ inv, stalkMap α x ≫ inv = 𝟙 (stalk Y (α.base x)) ∧ inv ≫ stalkMap α x = 𝟙 (stalk X x)

Next tactic:
refine'
      ⟨eqToHom (show X.stalk x = X.stalk ((α ≫ β).base x) by rw [h_eq]) ≫
          (stalkMap β (α.base x) : _),
        _, _⟩
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    let β : Y ⟶ X := CategoryTheory.inv α
    have h_eq : (α ≫ β).base x = x := by rw [IsIso.hom_inv_id α, id_base, TopCat.id_app]
    -- Intuitively, the inverse of the stalk map of `α` at `x` should just be the stalk map of `β`
    -- at `α x`. Unfortunately, we have a problem with dependent type theory here: Because `x`
    -- is not *definitionally* equal to `β (α x)`, the map `stalk_map β (α x)` has not the correct
    -- type for an inverse.
    -- To get a proper inverse, we need to compose with the `eq_to_hom` arrow
    -- `X.stalk x ⟶ X.stalk ((α ≫ β).base x)`.
    refine'
      ⟨eqToHom (show X.stalk x = X.stalk ((α ≫ β).base x) by 

Proof state:
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
β : Y ⟶ X := CategoryTheory.inv α
h_eq : (α ≫ β).base x = x
⊢ stalk X x = stalk X ((α ≫ β).base x)

Next tactic:
rw [h_eq]
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    let β : Y ⟶ X := CategoryTheory.inv α
    have h_eq : (α ≫ β).base x = x := by rw [IsIso.hom_inv_id α, id_base, TopCat.id_app]
    -- Intuitively, the inverse of the stalk map of `α` at `x` should just be the stalk map of `β`
    -- at `α x`. Unfortunately, we have a problem with dependent type theory here: Because `x`
    -- is not *definitionally* equal to `β (α x)`, the map `stalk_map β (α x)` has not the correct
    -- type for an inverse.
    -- To get a proper inverse, we need to compose with the `eq_to_hom` arrow
    -- `X.stalk x ⟶ X.stalk ((α ≫ β).base x)`.
    refine'
      ⟨eqToHom (show X.stalk x = X.stalk ((α ≫ β).base x) by rw [h_eq]) ≫
          (stalkMap β (α.base x) : _),
        _, _⟩
    · 

Proof state:
case refine'_1
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
β : Y ⟶ X := CategoryTheory.inv α
h_eq : (α ≫ β).base x = x
⊢ stalkMap α x ≫ eqToHom (_ : stalk X x = stalk X ((α ≫ β).base x)) ≫ stalkMap β (α.base x) = 𝟙 (stalk Y (α.base x))

Next tactic:
rw [← Category.assoc, congr_point α x ((α ≫ β).base x) h_eq.symm, Category.assoc]
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    let β : Y ⟶ X := CategoryTheory.inv α
    have h_eq : (α ≫ β).base x = x := by rw [IsIso.hom_inv_id α, id_base, TopCat.id_app]
    -- Intuitively, the inverse of the stalk map of `α` at `x` should just be the stalk map of `β`
    -- at `α x`. Unfortunately, we have a problem with dependent type theory here: Because `x`
    -- is not *definitionally* equal to `β (α x)`, the map `stalk_map β (α x)` has not the correct
    -- type for an inverse.
    -- To get a proper inverse, we need to compose with the `eq_to_hom` arrow
    -- `X.stalk x ⟶ X.stalk ((α ≫ β).base x)`.
    refine'
      ⟨eqToHom (show X.stalk x = X.stalk ((α ≫ β).base x) by rw [h_eq]) ≫
          (stalkMap β (α.base x) : _),
        _, _⟩
    · rw [← Category.assoc, congr_point α x ((α ≫ β).base x) h_eq.symm, Category.assoc]
      

Proof state:
case refine'_1
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
β : Y ⟶ X := CategoryTheory.inv α
h_eq : (α ≫ β).base x = x
⊢ eqToHom (_ : stalk Y (α.base x) = stalk Y (α.base ((α ≫ β).base x))) ≫
      stalkMap α ((α ≫ β).base x) ≫ stalkMap β (α.base x) =
    𝟙 (stalk Y (α.base x))

Next tactic:
erw [← stalkMap.comp β α (α.base x)]
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    let β : Y ⟶ X := CategoryTheory.inv α
    have h_eq : (α ≫ β).base x = x := by rw [IsIso.hom_inv_id α, id_base, TopCat.id_app]
    -- Intuitively, the inverse of the stalk map of `α` at `x` should just be the stalk map of `β`
    -- at `α x`. Unfortunately, we have a problem with dependent type theory here: Because `x`
    -- is not *definitionally* equal to `β (α x)`, the map `stalk_map β (α x)` has not the correct
    -- type for an inverse.
    -- To get a proper inverse, we need to compose with the `eq_to_hom` arrow
    -- `X.stalk x ⟶ X.stalk ((α ≫ β).base x)`.
    refine'
      ⟨eqToHom (show X.stalk x = X.stalk ((α ≫ β).base x) by rw [h_eq]) ≫
          (stalkMap β (α.base x) : _),
        _, _⟩
    · rw [← Category.assoc, congr_point α x ((α ≫ β).base x) h_eq.symm, Category.assoc]
      erw [← stalkMap.comp β α (α.base x)]
      

Proof state:
case refine'_1
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
β : Y ⟶ X := CategoryTheory.inv α
h_eq : (α ≫ β).base x = x
⊢ eqToHom (_ : stalk Y (α.base x) = stalk Y (α.base ((α ≫ β).base x))) ≫ stalkMap (β ≫ α) (α.base x) =
    𝟙 (stalk Y (α.base x))

Next tactic:
rw [congr_hom _ _ (IsIso.inv_hom_id α), stalkMap.id, eqToHom_trans_assoc, eqToHom_refl,
        Category.id_comp]
instance isIso {X Y : PresheafedSpace.{_, _, v} C} (α : X ⟶ Y) [IsIso α] (x : X) :
    IsIso (stalkMap α x) where
  out := by
    let β : Y ⟶ X := CategoryTheory.inv α
    have h_eq : (α ≫ β).base x = x := by rw [IsIso.hom_inv_id α, id_base, TopCat.id_app]
    -- Intuitively, the inverse of the stalk map of `α` at `x` should just be the stalk map of `β`
    -- at `α x`. Unfortunately, we have a problem with dependent type theory here: Because `x`
    -- is not *definitionally* equal to `β (α x)`, the map `stalk_map β (α x)` has not the correct
    -- type for an inverse.
    -- To get a proper inverse, we need to compose with the `eq_to_hom` arrow
    -- `X.stalk x ⟶ X.stalk ((α ≫ β).base x)`.
    refine'
      ⟨eqToHom (show X.stalk x = X.stalk ((α ≫ β).base x) by rw [h_eq]) ≫
          (stalkMap β (α.base x) : _),
        _, _⟩
    · rw [← Category.assoc, congr_point α x ((α ≫ β).base x) h_eq.symm, Category.assoc]
      erw [← stalkMap.comp β α (α.base x)]
      rw [congr_hom _ _ (IsIso.inv_hom_id α), stalkMap.id, eqToHom_trans_assoc, eqToHom_refl,
        Category.id_comp]
    · 

Proof state:
case refine'_2
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimits C
X Y : PresheafedSpace C
α : X ⟶ Y
inst✝ : IsIso α
x : ↑↑X
β : Y ⟶ X := CategoryTheory.inv α
h_eq : (α ≫ β).base x = x
⊢ (eqToHom (_ : stalk X x = stalk X ((α ≫ β).base x)) ≫ stalkMap β (α.base x)) ≫ stalkMap α x = 𝟙 (stalk X x)

Next tactic:
rw [Category.assoc, ← stalkMap.comp, congr_hom _ _ (IsIso.hom_inv_id α), stalkMap.id,
        eqToHom_trans_assoc, eqToHom_refl, Category.id_comp]
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
⊢ stalkSpecializes Y.presheaf (_ : f.base x ⤳ f.base y) ≫ stalkMap f x = stalkMap f y ≫ stalkSpecializes X.presheaf h

Next tactic:
dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
  -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
⊢ colimit.desc ((OpenNhds.inclusion (f.base y)).op ⋙ Y.presheaf)
        { pt := colimit ((OpenNhds.inclusion (f.base x)).op ⋙ Y.presheaf),
          ι :=
            NatTrans.mk fun U =>
              colimit.ι ((OpenNhds.inclusion (f.base x)).op ⋙ Y.presheaf)
                (op { obj := U.unop.obj, property := (_ : f.base x ∈ U.unop.obj.carrier) }) } ≫
      colimMap (whiskerLeft (OpenNhds.inclusion (f.base x)).op f.c) ≫
        colimMap (whiskerRight (𝟙 (OpenNhds.map f.base x ⋙ OpenNhds.inclusion x).op) X.presheaf) ≫
          colimit.pre ((OpenNhds.inclusion x).op ⋙ X.presheaf) (OpenNhds.map f.base x).op =
    (colimMap (whiskerLeft (OpenNhds.inclusion (f.base y)).op f.c) ≫
        colimMap (whiskerRight (𝟙 (OpenNhds.map f.base y ⋙ OpenNhds.inclusion y).op) X.presheaf) ≫
          colimit.pre ((OpenNhds.inclusion y).op ⋙ X.presheaf) (OpenNhds.map f.base y).op) ≫
      colimit.desc ((OpenNhds.inclusion y).op ⋙ X.presheaf)
        { pt := colimit ((OpenNhds.inclusion x).op ⋙ X.presheaf),
          ι :=
            NatTrans.mk fun U =>
              colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
                (op { obj := U.unop.obj, property := (_ : x ∈ U.unop.obj.carrier) }) }

Next tactic:
refine colimit.hom_ext fun j => ?_
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
  -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159
  refine colimit.hom_ext fun j => ?_
  

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
j : (OpenNhds (f.base y))ᵒᵖ
⊢ colimit.ι
        (((whiskeringLeft (OpenNhds (f.base y))ᵒᵖ (Opens ↑↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f.base y)).op).obj
          Y.presheaf)
        j ≫
      colimit.desc ((OpenNhds.inclusion (f.base y)).op ⋙ Y.presheaf)
          { pt := colimit ((OpenNhds.inclusion (f.base x)).op ⋙ Y.presheaf),
            ι :=
              NatTrans.mk fun U =>
                colimit.ι ((OpenNhds.inclusion (f.base x)).op ⋙ Y.presheaf)
                  (op { obj := U.unop.obj, property := (_ : f.base x ∈ U.unop.obj.carrier) }) } ≫
        colimMap (whiskerLeft (OpenNhds.inclusion (f.base x)).op f.c) ≫
          colimMap (whiskerRight (𝟙 (OpenNhds.map f.base x ⋙ OpenNhds.inclusion x).op) X.presheaf) ≫
            colimit.pre ((OpenNhds.inclusion x).op ⋙ X.presheaf) (OpenNhds.map f.base x).op =
    colimit.ι
        (((whiskeringLeft (OpenNhds (f.base y))ᵒᵖ (Opens ↑↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f.base y)).op).obj
          Y.presheaf)
        j ≫
      (colimMap (whiskerLeft (OpenNhds.inclusion (f.base y)).op f.c) ≫
          colimMap (whiskerRight (𝟙 (OpenNhds.map f.base y ⋙ OpenNhds.inclusion y).op) X.presheaf) ≫
            colimit.pre ((OpenNhds.inclusion y).op ⋙ X.presheaf) (OpenNhds.map f.base y).op) ≫
        colimit.desc ((OpenNhds.inclusion y).op ⋙ X.presheaf)
          { pt := colimit ((OpenNhds.inclusion x).op ⋙ X.presheaf),
            ι :=
              NatTrans.mk fun U =>
                colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
                  (op { obj := U.unop.obj, property := (_ : x ∈ U.unop.obj.carrier) }) }

Next tactic:
induction j with | h j => ?_
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
  -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159
  refine colimit.hom_ext fun j => ?_
  induction j with | h j => ?_
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
j : OpenNhds (f.base y)
⊢ colimit.ι
        (((whiskeringLeft (OpenNhds (f.base y))ᵒᵖ (Opens ↑↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f.base y)).op).obj
          Y.presheaf)
        (op j) ≫
      colimit.desc ((OpenNhds.inclusion (f.base y)).op ⋙ Y.presheaf)
          { pt := colimit ((OpenNhds.inclusion (f.base x)).op ⋙ Y.presheaf),
            ι :=
              NatTrans.mk fun U =>
                colimit.ι ((OpenNhds.inclusion (f.base x)).op ⋙ Y.presheaf)
                  (op { obj := U.unop.obj, property := (_ : f.base x ∈ U.unop.obj.carrier) }) } ≫
        colimMap (whiskerLeft (OpenNhds.inclusion (f.base x)).op f.c) ≫
          colimMap (whiskerRight (𝟙 (OpenNhds.map f.base x ⋙ OpenNhds.inclusion x).op) X.presheaf) ≫
            colimit.pre ((OpenNhds.inclusion x).op ⋙ X.presheaf) (OpenNhds.map f.base x).op =
    colimit.ι
        (((whiskeringLeft (OpenNhds (f.base y))ᵒᵖ (Opens ↑↑Y)ᵒᵖ C).obj (OpenNhds.inclusion (f.base y)).op).obj
          Y.presheaf)
        (op j) ≫
      (colimMap (whiskerLeft (OpenNhds.inclusion (f.base y)).op f.c) ≫
          colimMap (whiskerRight (𝟙 (OpenNhds.map f.base y ⋙ OpenNhds.inclusion y).op) X.presheaf) ≫
            colimit.pre ((OpenNhds.inclusion y).op ⋙ X.presheaf) (OpenNhds.map f.base y).op) ≫
        colimit.desc ((OpenNhds.inclusion y).op ⋙ X.presheaf)
          { pt := colimit ((OpenNhds.inclusion x).op ⋙ X.presheaf),
            ι :=
              NatTrans.mk fun U =>
                colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
                  (op { obj := U.unop.obj, property := (_ : x ∈ U.unop.obj.carrier) }) }

Next tactic:
dsimp
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
  -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159
  refine colimit.hom_ext fun j => ?_
  induction j with | h j => ?_
  dsimp
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
j : OpenNhds (f.base y)
⊢ colimit.ι ((OpenNhds.inclusion (f.base y)).op ⋙ Y.presheaf) (op j) ≫
      colimit.desc ((OpenNhds.inclusion (f.base y)).op ⋙ Y.presheaf)
          { pt := colimit ((OpenNhds.inclusion (f.base x)).op ⋙ Y.presheaf),
            ι :=
              NatTrans.mk fun U =>
                colimit.ι ((OpenNhds.inclusion (f.base x)).op ⋙ Y.presheaf)
                  (op { obj := U.unop.obj, property := (_ : f.base x ∈ U.unop.obj.carrier) }) } ≫
        colimMap (whiskerLeft (OpenNhds.inclusion (f.base x)).op f.c) ≫
          colimMap (whiskerRight (𝟙 (OpenNhds.map f.base x ⋙ OpenNhds.inclusion x).op) X.presheaf) ≫
            colimit.pre ((OpenNhds.inclusion x).op ⋙ X.presheaf) (OpenNhds.map f.base x).op =
    colimit.ι ((OpenNhds.inclusion (f.base y)).op ⋙ Y.presheaf) (op j) ≫
      (colimMap (whiskerLeft (OpenNhds.inclusion (f.base y)).op f.c) ≫
          colimMap (whiskerRight (𝟙 (OpenNhds.map f.base y ⋙ OpenNhds.inclusion y).op) X.presheaf) ≫
            colimit.pre ((OpenNhds.inclusion y).op ⋙ X.presheaf) (OpenNhds.map f.base y).op) ≫
        colimit.desc ((OpenNhds.inclusion y).op ⋙ X.presheaf)
          { pt := colimit ((OpenNhds.inclusion x).op ⋙ X.presheaf),
            ι :=
              NatTrans.mk fun U =>
                colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
                  (op { obj := U.unop.obj, property := (_ : x ∈ U.unop.obj.carrier) }) }

Next tactic:
simp only [colimit.ι_desc_assoc, comp_obj, op_obj, unop_op, ι_colimMap_assoc, colimit.map_desc,
    OpenNhds.inclusion_obj, pushforwardObj_obj, whiskerLeft_app, OpenNhds.map_obj, whiskerRight_app,
    NatTrans.id_app, map_id, colimit.ι_pre, id_comp, assoc, colimit.pre_desc]
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
  -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159
  refine colimit.hom_ext fun j => ?_
  induction j with | h j => ?_
  dsimp
  simp only [colimit.ι_desc_assoc, comp_obj, op_obj, unop_op, ι_colimMap_assoc, colimit.map_desc,
    OpenNhds.inclusion_obj, pushforwardObj_obj, whiskerLeft_app, OpenNhds.map_obj, whiskerRight_app,
    NatTrans.id_app, map_id, colimit.ι_pre, id_comp, assoc, colimit.pre_desc]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
j : OpenNhds (f.base y)
⊢ f.c.app (op j.obj) ≫
      colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
        (op { obj := (Opens.map f.base).obj j.obj, property := (_ : f.base x ∈ (op j).unop.obj.carrier) }) =
    colimit.ι ((OpenNhds.inclusion (f.base y)).op ⋙ Y.presheaf) (op j) ≫
      colimit.desc ((OpenNhds.inclusion (f.base y)).op ⋙ Y.presheaf)
        ((Cocones.precompose (whiskerLeft (OpenNhds.inclusion (f.base y)).op f.c)).obj
          ((Cocones.precompose (whiskerRight (𝟙 (OpenNhds.map f.base y ⋙ OpenNhds.inclusion y).op) X.presheaf)).obj
            (Cocone.whisker (OpenNhds.map f.base y).op
              { pt := colimit ((OpenNhds.inclusion x).op ⋙ X.presheaf),
                ι :=
                  NatTrans.mk fun U =>
                    colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
                      (op { obj := U.unop.obj, property := (_ : x ∈ U.unop.obj.carrier) }) })))

Next tactic:
erw [colimit.ι_desc]
@[reassoc, elementwise, simp, nolint simpNF] -- see std4#365 for the simpNF issue
theorem stalkSpecializes_stalkMap {X Y : PresheafedSpace.{_, _, v} C}
    (f : X ⟶ Y) {x y : X} (h : x ⤳ y) :
    Y.presheaf.stalkSpecializes (f.base.map_specializes h) ≫ stalkMap f x =
      stalkMap f y ≫ X.presheaf.stalkSpecializes h := by
  -- Porting note : the original one liner `dsimp [stalkMap]; simp [stalkMap]` doesn't work,
  -- I had to uglify this
  dsimp [stalkSpecializes, stalkMap, stalkFunctor, stalkPushforward]
  -- We can't use `ext` here due to https://github.com/leanprover/std4/pull/159
  refine colimit.hom_ext fun j => ?_
  induction j with | h j => ?_
  dsimp
  simp only [colimit.ι_desc_assoc, comp_obj, op_obj, unop_op, ι_colimMap_assoc, colimit.map_desc,
    OpenNhds.inclusion_obj, pushforwardObj_obj, whiskerLeft_app, OpenNhds.map_obj, whiskerRight_app,
    NatTrans.id_app, map_id, colimit.ι_pre, id_comp, assoc, colimit.pre_desc]
  erw [colimit.ι_desc]
  

Proof state:
case h
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
X Y : PresheafedSpace C
f : X ⟶ Y
x y : ↑↑X
h : x ⤳ y
j : OpenNhds (f.base y)
⊢ f.c.app (op j.obj) ≫
      colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
        (op { obj := (Opens.map f.base).obj j.obj, property := (_ : f.base x ∈ (op j).unop.obj.carrier) }) =
    ((Cocones.precompose (whiskerLeft (OpenNhds.inclusion (f.base y)).op f.c)).obj
            ((Cocones.precompose (whiskerRight (𝟙 (OpenNhds.map f.base y ⋙ OpenNhds.inclusion y).op) X.presheaf)).obj
              (Cocone.whisker (OpenNhds.map f.base y).op
                { pt := colimit ((OpenNhds.inclusion x).op ⋙ X.presheaf),
                  ι :=
                    NatTrans.mk fun U =>
                      colimit.ι ((OpenNhds.inclusion x).op ⋙ X.presheaf)
                        (op { obj := U.unop.obj, property := (_ : x ∈ U.unop.obj.carrier) }) }))).ι.app
      (op j)

Next tactic:
dsimp