l3lab/ntp-mathlib huggingface dataset:
theorem congr_app {X Y : PresheafedSpace C} {α β : X ⟶ Y} (h : α = β) (U) :
    α.c.app U = β.c.app U ≫ X.presheaf.map (eqToHom (by subst h; rfl)) := by
  

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
α β : X ⟶ Y
h : α = β
U : (Opens ↑↑Y)ᵒᵖ
⊢ α.c.app U = β.c.app U ≫ X.presheaf.map (eqToHom (_ : (Opens.map β.base).op.obj U = (Opens.map α.base).op.obj U))

Next tactic:
subst h
theorem congr_app {X Y : PresheafedSpace C} {α β : X ⟶ Y} (h : α = β) (U) :
    α.c.app U = β.c.app U ≫ X.presheaf.map (eqToHom (by subst h; rfl)) := by
  subst h
  

Proof state:
C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
α : X ⟶ Y
U : (Opens ↑↑Y)ᵒᵖ
⊢ α.c.app U = α.c.app U ≫ X.presheaf.map (eqToHom (_ : (Opens.map α.base).op.obj U = (Opens.map α.base).op.obj U))

Next tactic:
simp
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    

Proof state:
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
⊢ { base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } = 𝟙 X

Next tactic:
ext
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    

Proof state:
case w.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
x✝ : (CategoryTheory.forget TopCat).obj ↑X
⊢ ({ base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).base x✝ = (𝟙 X).base x✝
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑X
⊢ (({ base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map
                      ({ base := H.hom, c := α.inv } ≫
                          { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).base).op =
                  (Opens.map (𝟙 X).base).op))
            X.presheaf).app
      (op U✝) =
    (𝟙 X).c.app (op U✝)

Next tactic:
simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    

Proof state:
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑X
⊢ (({ base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map
                      ({ base := H.hom, c := α.inv } ≫
                          { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).base).op =
                  (Opens.map (𝟙 X).base).op))
            X.presheaf).app
      (op U✝) =
    (𝟙 X).c.app (op U✝)

Next tactic:
rw [NatTrans.comp_app]
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    

Proof state:
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑X
⊢ ({ base := H.hom, c := α.inv } ≫ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).c.app (op U✝) ≫
      (whiskerRight
            (eqToHom
              (_ :
                (Opens.map
                      ({ base := H.hom, c := α.inv } ≫
                          { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom }).base).op =
                  (Opens.map (𝟙 X).base).op))
            X.presheaf).app
        (op U✝) =
    (𝟙 X).c.app (op U✝)

Next tactic:
simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
  inv_hom_id := by
    

Proof state:
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
⊢ { base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv } = 𝟙 Y

Next tactic:
ext
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
  inv_hom_id := by
    ext
    

Proof state:
case w.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
x✝ : (CategoryTheory.forget TopCat).obj ↑Y
⊢ ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).base x✝ = (𝟙 Y).base x✝
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑Y
⊢ (({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map
                      ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫
                          { base := H.hom, c := α.inv }).base).op =
                  (Opens.map (𝟙 Y).base).op))
            Y.presheaf).app
      (op U✝) =
    (𝟙 Y).c.app (op U✝)

Next tactic:
dsimp
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
  inv_hom_id := by
    ext
    dsimp
    

Proof state:
case w.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
x✝ : (CategoryTheory.forget TopCat).obj ↑Y
⊢ (H.inv ≫ H.hom) x✝ = (𝟙 ↑Y) x✝
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑Y
⊢ (({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map
                      ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫
                          { base := H.hom, c := α.inv }).base).op =
                  (Opens.map (𝟙 Y).base).op))
            Y.presheaf).app
      (op U✝) =
    (𝟙 Y).c.app (op U✝)

Next tactic:
rw [H.inv_hom_id]
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
  inv_hom_id := by
    ext
    dsimp
    rw [H.inv_hom_id]
    

Proof state:
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑Y
⊢ (({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map
                      ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫
                          { base := H.hom, c := α.inv }).base).op =
                  (Opens.map (𝟙 Y).base).op))
            Y.presheaf).app
      (op U✝) =
    (𝟙 Y).c.app (op U✝)

Next tactic:
dsimp
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
  inv_hom_id := by
    ext
    dsimp
    rw [H.inv_hom_id]
    dsimp
    

Proof state:
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑Y
⊢ (({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c ≫
          whiskerRight (eqToHom (_ : (Opens.map (H.inv ≫ H.hom)).op = (Opens.map (𝟙 ↑Y)).op)) Y.presheaf).app
      (op U✝) =
    (𝟙 Y).c.app (op U✝)

Next tactic:
rw [NatTrans.comp_app]
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
  inv_hom_id := by
    ext
    dsimp
    rw [H.inv_hom_id]
    dsimp
    rw [NatTrans.comp_app]
    

Proof state:
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑Y
⊢ ({ base := H.inv, c := Presheaf.toPushforwardOfIso H α.hom } ≫ { base := H.hom, c := α.inv }).c.app (op U✝) ≫
      (whiskerRight (eqToHom (_ : (Opens.map (H.inv ≫ H.hom)).op = (Opens.map (𝟙 ↑Y)).op)) Y.presheaf).app (op U✝) =
    (𝟙 Y).c.app (op U✝)

Next tactic:
simp only [Presheaf.pushforwardObj_obj, op_obj, Opens.map_comp_obj, comp_obj,
      comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, whiskerRight_app, eqToHom_app,
      assoc, id_c_app, map_id]
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
  inv_hom_id := by
    ext
    dsimp
    rw [H.inv_hom_id]
    dsimp
    rw [NatTrans.comp_app]
    simp only [Presheaf.pushforwardObj_obj, op_obj, Opens.map_comp_obj, comp_obj,
      comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, whiskerRight_app, eqToHom_app,
      assoc, id_c_app, map_id]
    

Proof state:
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑Y
⊢ α.inv.app (op U✝) ≫
      X.presheaf.map
          (eqToHom
            (_ :
              op ((Opens.map H.hom).obj U✝) =
                op
                  {
                    carrier :=
                      ⇑H.hom ⁻¹'
                        ↑(op
                              { carrier := ⇑H.inv ⁻¹' ↑(op ((Opens.map H.hom).obj U✝)).unop,
                                is_open' := (_ : IsOpen (⇑H.inv ⁻¹' ↑(op ((Opens.map H.hom).obj U✝)).unop)) }).unop,
                    is_open' :=
                      (_ :
                        IsOpen
                          (⇑H.hom ⁻¹'
                            ↑(op
                                  { carrier := ⇑H.inv ⁻¹' ↑(op ((Opens.map H.hom).obj U✝)).unop,
                                    is_open' :=
                                      (_ : IsOpen (⇑H.inv ⁻¹' ↑(op ((Opens.map H.hom).obj U✝)).unop)) }).unop)) })) ≫
        α.hom.app (op ((Opens.map H.inv).obj ((Opens.map H.hom).obj U✝))) ≫
          Y.presheaf.map
            (eqToHom (_ : (Opens.map (H.inv ≫ H.hom)).op.obj (op U✝) = (Opens.map (𝟙 ↑Y)).op.obj (op U✝))) =
    𝟙 (Y.presheaf.obj (op U✝))

Next tactic:
rw [← α.hom.naturality, Presheaf.pushforwardObj_map, eqToHom_map, eqToHom_map,
      eqToHom_map, eqToHom_trans_assoc, eqToHom_refl, id_comp]
/-- An isomorphism of `PresheafedSpace`s is a homeomorphism of the underlying space, and a
natural transformation between the sheaves.
-/
@[simps hom inv]
def isoOfComponents (H : X.1 ≅ Y.1) (α : H.hom _* X.2 ≅ Y.2) : X ≅ Y where
  hom :=
    { base := H.hom
      c := α.inv }
  inv :=
    { base := H.inv
      c := Presheaf.toPushforwardOfIso H α.hom }
  hom_inv_id := by
    ext
    simp only [comp_base, Iso.hom_inv_id, FunctorToTypes.map_id_apply, id_base]
    rw [NatTrans.comp_app]
    simp only [id_base, comp_obj, op_obj, comp_base, Presheaf.pushforwardObj_obj,
      Opens.map_comp_obj, comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, assoc,
      Iso.hom_inv_id_app, comp_id, whiskerRight_app, eqToHom_app, id_c_app, map_id,
      ← Functor.map_comp, eqToHom_trans, eqToHom_refl]
  inv_hom_id := by
    ext
    dsimp
    rw [H.inv_hom_id]
    dsimp
    rw [NatTrans.comp_app]
    simp only [Presheaf.pushforwardObj_obj, op_obj, Opens.map_comp_obj, comp_obj,
      comp_c_app, unop_op, Presheaf.toPushforwardOfIso_app, whiskerRight_app, eqToHom_app,
      assoc, id_c_app, map_id]
    rw [← α.hom.naturality, Presheaf.pushforwardObj_map, eqToHom_map, eqToHom_map,
      eqToHom_map, eqToHom_trans_assoc, eqToHom_refl, id_comp]
    

Proof state:
case h.w
C : Type u_1
inst✝ : Category.{?u.209969, u_1} C
X Y : PresheafedSpace C
H : ↑X ≅ ↑Y
α : H.hom _* X.presheaf ≅ Y.presheaf
U✝ : Opens ↑↑Y
⊢ α.inv.app (op U✝) ≫ α.hom.app (op ((Opens.map (𝟙 ↑Y)).obj U✝)) = 𝟙 (Y.presheaf.obj (op U✝))

Next tactic:
apply Iso.inv_hom_id_app
/-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 where
  hom := H.hom.c
  inv := Presheaf.pushforwardToOfIso ((forget _).mapIso H).symm H.inv.c
  hom_inv_id := by
    

Proof state:
C : Type u_1
inst✝ : Category.{?u.223152, u_1} C
X Y : PresheafedSpace C
H : X ≅ Y
⊢ H.hom.c ≫ Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c = 𝟙 Y.presheaf

Next tactic:
ext U
/-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 where
  hom := H.hom.c
  inv := Presheaf.pushforwardToOfIso ((forget _).mapIso H).symm H.inv.c
  hom_inv_id := by
    ext U
    

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.223152, u_1} C
X Y : PresheafedSpace C
H : X ≅ Y
U : Opens ↑↑Y
⊢ (H.hom.c ≫ Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c).app (op U) = (𝟙 Y.presheaf).app (op U)

Next tactic:
rw [NatTrans.comp_app]
/-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 where
  hom := H.hom.c
  inv := Presheaf.pushforwardToOfIso ((forget _).mapIso H).symm H.inv.c
  hom_inv_id := by
    ext U
    rw [NatTrans.comp_app]
    

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.223152, u_1} C
X Y : PresheafedSpace C
H : X ≅ Y
U : Opens ↑↑Y
⊢ H.hom.c.app (op U) ≫ (Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c).app (op U) =
    (𝟙 Y.presheaf).app (op U)

Next tactic:
simpa using congr_arg (fun f => f ≫ eqToHom _) (congr_app H.inv_hom_id (op U))
/-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 where
  hom := H.hom.c
  inv := Presheaf.pushforwardToOfIso ((forget _).mapIso H).symm H.inv.c
  hom_inv_id := by
    ext U
    rw [NatTrans.comp_app]
    simpa using congr_arg (fun f => f ≫ eqToHom _) (congr_app H.inv_hom_id (op U))
  inv_hom_id := by
    

Proof state:
C : Type u_1
inst✝ : Category.{?u.223152, u_1} C
X Y : PresheafedSpace C
H : X ≅ Y
⊢ Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c ≫ H.hom.c = 𝟙 (H.hom.base _* X.presheaf)

Next tactic:
ext U
/-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 where
  hom := H.hom.c
  inv := Presheaf.pushforwardToOfIso ((forget _).mapIso H).symm H.inv.c
  hom_inv_id := by
    ext U
    rw [NatTrans.comp_app]
    simpa using congr_arg (fun f => f ≫ eqToHom _) (congr_app H.inv_hom_id (op U))
  inv_hom_id := by
    ext U
    

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.223152, u_1} C
X Y : PresheafedSpace C
H : X ≅ Y
U : Opens ↑↑Y
⊢ (Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c ≫ H.hom.c).app (op U) =
    (𝟙 (H.hom.base _* X.presheaf)).app (op U)

Next tactic:
dsimp
/-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 where
  hom := H.hom.c
  inv := Presheaf.pushforwardToOfIso ((forget _).mapIso H).symm H.inv.c
  hom_inv_id := by
    ext U
    rw [NatTrans.comp_app]
    simpa using congr_arg (fun f => f ≫ eqToHom _) (congr_app H.inv_hom_id (op U))
  inv_hom_id := by
    ext U
    dsimp
    

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.223152, u_1} C
X Y : PresheafedSpace C
H : X ≅ Y
U : Opens ↑↑Y
⊢ (Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c ≫ H.hom.c).app (op U) =
    (𝟙 (H.hom.base _* X.presheaf)).app (op U)

Next tactic:
rw [NatTrans.comp_app, NatTrans.id_app]
/-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 where
  hom := H.hom.c
  inv := Presheaf.pushforwardToOfIso ((forget _).mapIso H).symm H.inv.c
  hom_inv_id := by
    ext U
    rw [NatTrans.comp_app]
    simpa using congr_arg (fun f => f ≫ eqToHom _) (congr_app H.inv_hom_id (op U))
  inv_hom_id := by
    ext U
    dsimp
    rw [NatTrans.comp_app, NatTrans.id_app]
    

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.223152, u_1} C
X Y : PresheafedSpace C
H : X ≅ Y
U : Opens ↑↑Y
⊢ (Presheaf.pushforwardToOfIso ((forget C).mapIso H).symm H.inv.c).app (op U) ≫ H.hom.c.app (op U) =
    𝟙 ((H.hom.base _* X.presheaf).obj (op U))

Next tactic:
simp only [Presheaf.pushforwardObj_obj, op_obj, Presheaf.pushforwardToOfIso_app,
      Iso.symm_inv, mapIso_hom, forget_map, Iso.symm_hom, mapIso_inv,
      unop_op, eqToHom_map, assoc]
/-- Isomorphic `PresheafedSpace`s have naturally isomorphic presheaves. -/
@[simps]
def sheafIsoOfIso (H : X ≅ Y) : Y.2 ≅ H.hom.base _* X.2 where
  hom := H.hom.c
  inv := Presheaf.pushforwardToOfIso ((forget _).mapIso H).symm H.inv.c
  hom_inv_id := by
    ext U
    rw [NatTrans.comp_app]
    simpa using congr_arg (fun f => f ≫ eqToHom _) (congr_app H.inv_hom_id (op U))
  inv_hom_id := by
    ext U
    dsimp
    rw [NatTrans.comp_app, NatTrans.id_app]
    simp only [Presheaf.pushforwardObj_obj, op_obj, Presheaf.pushforwardToOfIso_app,
      Iso.symm_inv, mapIso_hom, forget_map, Iso.symm_hom, mapIso_inv,
      unop_op, eqToHom_map, assoc]
    

Proof state:
case w
C : Type u_1
inst✝ : Category.{?u.223152, u_1} C
X Y : PresheafedSpace C
H : X ≅ Y
U : Opens ↑↑Y
⊢ H.inv.c.app (op ((Opens.map H.hom.base).obj U)) ≫
      eqToHom
          (_ :
            Y.presheaf.obj (op ((Opens.map H.inv.base).obj ((Opens.map H.hom.base).obj U))) = Y.presheaf.obj (op U)) ≫
        H.hom.c.app (op U) =
    𝟙 (X.presheaf.obj (op ((Opens.map H.hom.base).obj U)))

Next tactic:
have eq₁ := congr_app H.hom_inv_id (op ((Opens.map H.hom.base).obj U))