l3lab/ntp-mathlib huggingface dataset:
/-- Given a diagram of presheafed spaces,
we can push all the presheaves forward to the colimit `X` of the underlying topological spaces,
obtaining a diagram in `(Presheaf C X)ᵒᵖ`.
-/
@[simps]
def pushforwardDiagramToColimit (F : J ⥤ PresheafedSpace.{_, _, v} C) :
    J ⥤ (Presheaf C (colimit (F ⋙ PresheafedSpace.forget C)))ᵒᵖ where
  obj j := op (colimit.ι (F ⋙ PresheafedSpace.forget C) j _* (F.obj j).presheaf)
  map {j j'} f :=
    (pushforwardMap (colimit.ι (F ⋙ PresheafedSpace.forget C) j') (F.map f).c ≫
        (Pushforward.comp (F.obj j).presheaf ((F ⋙ PresheafedSpace.forget C).map f)
              (colimit.ι (F ⋙ PresheafedSpace.forget C) j')).inv ≫
          (pushforwardEq (colimit.w (F ⋙ PresheafedSpace.forget C) f) (F.obj j).presheaf).hom).op
  map_id j := by
    

Proof state:
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimitsOfShape J TopCat
F : J ⥤ PresheafedSpace C
j : J
⊢ { obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),
          map := fun {j j'} f =>
            (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫
                (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫
                  (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)
                      (F.obj j).presheaf).hom).op }.map
      (𝟙 j) =
    𝟙
      ({ obj := fun j => op (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf),
            map := fun {j j'} f =>
              (pushforwardMap (colimit.ι (F ⋙ forget C) j') (F.map f).c ≫
                  (Pushforward.comp (F.obj j).presheaf ((F ⋙ forget C).map f) (colimit.ι (F ⋙ forget C) j')).inv ≫
                    (pushforwardEq (_ : (F ⋙ forget C).map f ≫ colimit.ι (F ⋙ forget C) j' = colimit.ι (F ⋙ forget C) j)
                        (F.obj j).presheaf).hom).op }.obj
        j)

Next tactic:
apply (opEquiv _ _).injective
/-- Given a diagram of presheafed spaces,
we can push all the presheaves forward to the colimit `X` of the underlying topological spaces,
obtaining a diagram in `(Presheaf C X)ᵒᵖ`.
-/
@[simps]
def pushforwardDiagramToColimit (F : J ⥤ PresheafedSpace.{_, _, v} C) :
    J ⥤ (Presheaf C (colimit (F ⋙ PresheafedSpace.forget C)))ᵒᵖ where
  obj j := op (colimit.ι (F ⋙ PresheafedSpace.forget C) j _* (F.obj j).presheaf)
  map {j j'} f :=
    (pushforwardMap (colimit.ι (F ⋙ PresheafedSpace.forget C) j') (F.map f).c ≫
        (Pushforward.comp (F.obj j).presheaf ((F ⋙ PresheafedSpace.forget C).map f)
              (colimit.ι (F ⋙ PresheafedSpace.forget C) j')).inv ≫
          (pushforwardEq (colimit.w (F ⋙ PresheafedSpace.forget C) f) (F.obj j).presheaf).hom).op
  map_id j := by
    apply (opEquiv _ _).injective
    refine NatTrans.ext _ _ (funext fun U => ?_)
    induction U with
    | h U =>
      rcases U with ⟨U, hU⟩
      dsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op,
        pushforwardObj_obj, op_obj, Opens.map_obj, opEquiv, Equiv.coe_fn_mk, unop_comp,
        Quiver.Hom.unop_op, unop_id]
      -- Porting note : some `simp` lemmas are not picked up
      

Proof state:
case a.h.mk
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimitsOfShape J TopCat
F : J ⥤ PresheafedSpace C
j : J
U : Set ↑(colimit (F ⋙ forget C))
hU : IsOpen U
⊢ (pushforwardMap (colimit.ι (F ⋙ forget C) j) (F.map (𝟙 j)).c ≫
          (Pushforward.comp (F.obj j).presheaf (F.map (𝟙 j)).base (colimit.ι (F ⋙ forget C) j)).inv ≫
            (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)
                (F.obj j).presheaf).hom).app
      (op { carrier := U, is_open' := hU }) =
    (𝟙 (colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf)).app (op { carrier := U, is_open' := hU })

Next tactic:
rw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]
/-- Given a diagram of presheafed spaces,
we can push all the presheaves forward to the colimit `X` of the underlying topological spaces,
obtaining a diagram in `(Presheaf C X)ᵒᵖ`.
-/
@[simps]
def pushforwardDiagramToColimit (F : J ⥤ PresheafedSpace.{_, _, v} C) :
    J ⥤ (Presheaf C (colimit (F ⋙ PresheafedSpace.forget C)))ᵒᵖ where
  obj j := op (colimit.ι (F ⋙ PresheafedSpace.forget C) j _* (F.obj j).presheaf)
  map {j j'} f :=
    (pushforwardMap (colimit.ι (F ⋙ PresheafedSpace.forget C) j') (F.map f).c ≫
        (Pushforward.comp (F.obj j).presheaf ((F ⋙ PresheafedSpace.forget C).map f)
              (colimit.ι (F ⋙ PresheafedSpace.forget C) j')).inv ≫
          (pushforwardEq (colimit.w (F ⋙ PresheafedSpace.forget C) f) (F.obj j).presheaf).hom).op
  map_id j := by
    apply (opEquiv _ _).injective
    refine NatTrans.ext _ _ (funext fun U => ?_)
    induction U with
    | h U =>
      rcases U with ⟨U, hU⟩
      dsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op,
        pushforwardObj_obj, op_obj, Opens.map_obj, opEquiv, Equiv.coe_fn_mk, unop_comp,
        Quiver.Hom.unop_op, unop_id]
      -- Porting note : some `simp` lemmas are not picked up
      rw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]
      

Proof state:
case a.h.mk
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimitsOfShape J TopCat
F : J ⥤ PresheafedSpace C
j : J
U : Set ↑(colimit (F ⋙ forget C))
hU : IsOpen U
⊢ (F.map (𝟙 j)).c.app ((Opens.map (colimit.ι (F ⋙ forget C) j)).op.obj (op { carrier := U, is_open' := hU })) ≫
      ((Pushforward.comp (F.obj j).presheaf (F.map (𝟙 j)).base (colimit.ι (F ⋙ forget C) j)).inv ≫
            (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)
                (F.obj j).presheaf).hom).app
        (op { carrier := U, is_open' := hU }) =
    𝟙 ((colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf).obj (op { carrier := U, is_open' := hU }))

Next tactic:
simp only [op_obj, unop_op, Opens.map_obj, map_id_c_app, Opens.map_id_obj',
        map_id, pushforwardEq_hom_app, eqToHom_op, id_eq, eqToHom_map, id_comp,
        TopCat.Presheaf.Pushforward.id_inv_app']
/-- Given a diagram of presheafed spaces,
we can push all the presheaves forward to the colimit `X` of the underlying topological spaces,
obtaining a diagram in `(Presheaf C X)ᵒᵖ`.
-/
@[simps]
def pushforwardDiagramToColimit (F : J ⥤ PresheafedSpace.{_, _, v} C) :
    J ⥤ (Presheaf C (colimit (F ⋙ PresheafedSpace.forget C)))ᵒᵖ where
  obj j := op (colimit.ι (F ⋙ PresheafedSpace.forget C) j _* (F.obj j).presheaf)
  map {j j'} f :=
    (pushforwardMap (colimit.ι (F ⋙ PresheafedSpace.forget C) j') (F.map f).c ≫
        (Pushforward.comp (F.obj j).presheaf ((F ⋙ PresheafedSpace.forget C).map f)
              (colimit.ι (F ⋙ PresheafedSpace.forget C) j')).inv ≫
          (pushforwardEq (colimit.w (F ⋙ PresheafedSpace.forget C) f) (F.obj j).presheaf).hom).op
  map_id j := by
    apply (opEquiv _ _).injective
    refine NatTrans.ext _ _ (funext fun U => ?_)
    induction U with
    | h U =>
      rcases U with ⟨U, hU⟩
      dsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op,
        pushforwardObj_obj, op_obj, Opens.map_obj, opEquiv, Equiv.coe_fn_mk, unop_comp,
        Quiver.Hom.unop_op, unop_id]
      -- Porting note : some `simp` lemmas are not picked up
      rw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]
      simp only [op_obj, unop_op, Opens.map_obj, map_id_c_app, Opens.map_id_obj',
        map_id, pushforwardEq_hom_app, eqToHom_op, id_eq, eqToHom_map, id_comp,
        TopCat.Presheaf.Pushforward.id_inv_app']
      

Proof state:
case a.h.mk
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimitsOfShape J TopCat
F : J ⥤ PresheafedSpace C
j : J
U : Set ↑(colimit (F ⋙ forget C))
hU : IsOpen U
⊢ eqToHom
        (_ :
          (F.obj j).presheaf.obj
              (op
                { carrier := ⇑(𝟙 ↑(F.obj j)) ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),
                  is_open' := (_ : IsOpen (⇑(𝟙 ↑(F.obj j)) ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) }) =
            (F.obj j).presheaf.obj
              (op
                { carrier := ⇑(F.map (𝟙 j)).base ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),
                  is_open' := (_ : IsOpen (⇑(F.map (𝟙 j)).base ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) })) ≫
      ((Pushforward.comp (F.obj j).presheaf (F.map (𝟙 j)).base (colimit.ι (F ⋙ forget C) j)).inv ≫
            (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)
                (F.obj j).presheaf).hom).app
        (op { carrier := U, is_open' := hU }) =
    𝟙 ((colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf).obj (op { carrier := U, is_open' := hU }))

Next tactic:
rw [NatTrans.comp_app, Pushforward.comp_inv_app, id_comp]
/-- Given a diagram of presheafed spaces,
we can push all the presheaves forward to the colimit `X` of the underlying topological spaces,
obtaining a diagram in `(Presheaf C X)ᵒᵖ`.
-/
@[simps]
def pushforwardDiagramToColimit (F : J ⥤ PresheafedSpace.{_, _, v} C) :
    J ⥤ (Presheaf C (colimit (F ⋙ PresheafedSpace.forget C)))ᵒᵖ where
  obj j := op (colimit.ι (F ⋙ PresheafedSpace.forget C) j _* (F.obj j).presheaf)
  map {j j'} f :=
    (pushforwardMap (colimit.ι (F ⋙ PresheafedSpace.forget C) j') (F.map f).c ≫
        (Pushforward.comp (F.obj j).presheaf ((F ⋙ PresheafedSpace.forget C).map f)
              (colimit.ι (F ⋙ PresheafedSpace.forget C) j')).inv ≫
          (pushforwardEq (colimit.w (F ⋙ PresheafedSpace.forget C) f) (F.obj j).presheaf).hom).op
  map_id j := by
    apply (opEquiv _ _).injective
    refine NatTrans.ext _ _ (funext fun U => ?_)
    induction U with
    | h U =>
      rcases U with ⟨U, hU⟩
      dsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op,
        pushforwardObj_obj, op_obj, Opens.map_obj, opEquiv, Equiv.coe_fn_mk, unop_comp,
        Quiver.Hom.unop_op, unop_id]
      -- Porting note : some `simp` lemmas are not picked up
      rw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]
      simp only [op_obj, unop_op, Opens.map_obj, map_id_c_app, Opens.map_id_obj',
        map_id, pushforwardEq_hom_app, eqToHom_op, id_eq, eqToHom_map, id_comp,
        TopCat.Presheaf.Pushforward.id_inv_app']
      rw [NatTrans.comp_app, Pushforward.comp_inv_app, id_comp]
      

Proof state:
case a.h.mk
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimitsOfShape J TopCat
F : J ⥤ PresheafedSpace C
j : J
U : Set ↑(colimit (F ⋙ forget C))
hU : IsOpen U
⊢ eqToHom
        (_ :
          (F.obj j).presheaf.obj
              (op
                { carrier := ⇑(𝟙 ↑(F.obj j)) ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),
                  is_open' := (_ : IsOpen (⇑(𝟙 ↑(F.obj j)) ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) }) =
            (F.obj j).presheaf.obj
              (op
                { carrier := ⇑(F.map (𝟙 j)).base ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),
                  is_open' := (_ : IsOpen (⇑(F.map (𝟙 j)).base ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) })) ≫
      (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)
              (F.obj j).presheaf).hom.app
        (op { carrier := U, is_open' := hU }) =
    𝟙 ((colimit.ι (F ⋙ forget C) j _* (F.obj j).presheaf).obj (op { carrier := U, is_open' := hU }))

Next tactic:
dsimp
/-- Given a diagram of presheafed spaces,
we can push all the presheaves forward to the colimit `X` of the underlying topological spaces,
obtaining a diagram in `(Presheaf C X)ᵒᵖ`.
-/
@[simps]
def pushforwardDiagramToColimit (F : J ⥤ PresheafedSpace.{_, _, v} C) :
    J ⥤ (Presheaf C (colimit (F ⋙ PresheafedSpace.forget C)))ᵒᵖ where
  obj j := op (colimit.ι (F ⋙ PresheafedSpace.forget C) j _* (F.obj j).presheaf)
  map {j j'} f :=
    (pushforwardMap (colimit.ι (F ⋙ PresheafedSpace.forget C) j') (F.map f).c ≫
        (Pushforward.comp (F.obj j).presheaf ((F ⋙ PresheafedSpace.forget C).map f)
              (colimit.ι (F ⋙ PresheafedSpace.forget C) j')).inv ≫
          (pushforwardEq (colimit.w (F ⋙ PresheafedSpace.forget C) f) (F.obj j).presheaf).hom).op
  map_id j := by
    apply (opEquiv _ _).injective
    refine NatTrans.ext _ _ (funext fun U => ?_)
    induction U with
    | h U =>
      rcases U with ⟨U, hU⟩
      dsimp [comp_obj, forget_obj, Functor.comp_map, forget_map, op_comp, unop_op,
        pushforwardObj_obj, op_obj, Opens.map_obj, opEquiv, Equiv.coe_fn_mk, unop_comp,
        Quiver.Hom.unop_op, unop_id]
      -- Porting note : some `simp` lemmas are not picked up
      rw [NatTrans.comp_app, pushforwardMap_app, NatTrans.id_app]
      simp only [op_obj, unop_op, Opens.map_obj, map_id_c_app, Opens.map_id_obj',
        map_id, pushforwardEq_hom_app, eqToHom_op, id_eq, eqToHom_map, id_comp,
        TopCat.Presheaf.Pushforward.id_inv_app']
      rw [NatTrans.comp_app, Pushforward.comp_inv_app, id_comp]
      dsimp
      

Proof state:
case a.h.mk
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimitsOfShape J TopCat
F : J ⥤ PresheafedSpace C
j : J
U : Set ↑(colimit (F ⋙ forget C))
hU : IsOpen U
⊢ eqToHom
        (_ :
          (F.obj j).presheaf.obj
              (op
                { carrier := ⇑(𝟙 ↑(F.obj j)) ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),
                  is_open' := (_ : IsOpen (⇑(𝟙 ↑(F.obj j)) ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) }) =
            (F.obj j).presheaf.obj
              (op
                { carrier := ⇑(F.map (𝟙 j)).base ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U),
                  is_open' := (_ : IsOpen (⇑(F.map (𝟙 j)).base ⁻¹' (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U))) })) ≫
      (pushforwardEq (_ : (F ⋙ forget C).map (𝟙 j) ≫ colimit.ι (F ⋙ forget C) j = colimit.ι (F ⋙ forget C) j)
              (F.obj j).presheaf).hom.app
        (op { carrier := U, is_open' := hU }) =
    𝟙
      ((F.obj j).presheaf.obj
        (op
          { carrier := ⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U,
            is_open' := (_ : IsOpen (⇑(colimit.ι (F ⋙ forget C) j) ⁻¹' U)) }))

Next tactic:
simp
/-- Auxiliary definition for `AlgebraicGeometry.PresheafedSpace.instHasColimits`.
-/
@[simps]
def colimitCocone (F : J ⥤ PresheafedSpace.{_, _, v} C) : Cocone F where
  pt := colimit F
  ι :=
    { app := fun j =>
        { base := colimit.ι (F ⋙ PresheafedSpace.forget C) j
          c := limit.π _ (op j) }
      naturality := fun {j j'} f => by
        

Proof state:
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
⊢ F.map f ≫
      (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j' =
    (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫
      ((Functor.const J).obj (colimit F)).map f

Next tactic:
ext1
/-- Auxiliary definition for `AlgebraicGeometry.PresheafedSpace.instHasColimits`.
-/
@[simps]
def colimitCocone (F : J ⥤ PresheafedSpace.{_, _, v} C) : Cocone F where
  pt := colimit F
  ι :=
    { app := fun j =>
        { base := colimit.ι (F ⋙ PresheafedSpace.forget C) j
          c := limit.π _ (op j) }
      naturality := fun {j j'} f => by
        ext1
        · 

Proof state:
case w
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
⊢ (F.map f ≫
        (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
          j').base =
    ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫
        ((Functor.const J).obj (colimit F)).map f).base

Next tactic:
ext x
/-- Auxiliary definition for `AlgebraicGeometry.PresheafedSpace.instHasColimits`.
-/
@[simps]
def colimitCocone (F : J ⥤ PresheafedSpace.{_, _, v} C) : Cocone F where
  pt := colimit F
  ι :=
    { app := fun j =>
        { base := colimit.ι (F ⋙ PresheafedSpace.forget C) j
          c := limit.π _ (op j) }
      naturality := fun {j j'} f => by
        ext1
        · ext x
          

Proof state:
case w.w
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
x : (CategoryTheory.forget TopCat).obj ↑(F.obj j)
⊢ (F.map f ≫
          (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
            j').base
      x =
    ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫
          ((Functor.const J).obj (colimit F)).map f).base
      x

Next tactic:
exact colimit.w_apply (F ⋙ PresheafedSpace.forget C) f x
/-- Auxiliary definition for `AlgebraicGeometry.PresheafedSpace.instHasColimits`.
-/
@[simps]
def colimitCocone (F : J ⥤ PresheafedSpace.{_, _, v} C) : Cocone F where
  pt := colimit F
  ι :=
    { app := fun j =>
        { base := colimit.ι (F ⋙ PresheafedSpace.forget C) j
          c := limit.π _ (op j) }
      naturality := fun {j j'} f => by
        ext1
        · ext x
          exact colimit.w_apply (F ⋙ PresheafedSpace.forget C) f x
        · 

Proof state:
case h
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
⊢ (F.map f ≫
          (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
            j').c ≫
      whiskerRight
        (eqToHom
          (_ :
            (Opens.map
                  (F.map f ≫
                      (fun j =>
                          { base := colimit.ι (F ⋙ forget C) j,
                            c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
                        j').base).op =
              (Opens.map
                  ((fun j =>
                          { base := colimit.ι (F ⋙ forget C) j,
                            c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
                        j ≫
                      ((Functor.const J).obj (colimit F)).map f).base).op))
        (F.obj j).presheaf =
    ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫
        ((Functor.const J).obj (colimit F)).map f).c

Next tactic:
ext ⟨U, hU⟩
/-- Auxiliary definition for `AlgebraicGeometry.PresheafedSpace.instHasColimits`.
-/
@[simps]
def colimitCocone (F : J ⥤ PresheafedSpace.{_, _, v} C) : Cocone F where
  pt := colimit F
  ι :=
    { app := fun j =>
        { base := colimit.ι (F ⋙ PresheafedSpace.forget C) j
          c := limit.π _ (op j) }
      naturality := fun {j j'} f => by
        ext1
        · ext x
          exact colimit.w_apply (F ⋙ PresheafedSpace.forget C) f x
        · ext ⟨U, hU⟩
          

Proof state:
case h.w.mk
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
U : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')
hU : IsOpen U
⊢ ((F.map f ≫
              (fun j =>
                  { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
                j').c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map
                      (F.map f ≫
                          (fun j =>
                              { base := colimit.ι (F ⋙ forget C) j,
                                c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
                            j').base).op =
                  (Opens.map
                      ((fun j =>
                              { base := colimit.ι (F ⋙ forget C) j,
                                c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
                            j ≫
                          ((Functor.const J).obj (colimit F)).map f).base).op))
            (F.obj j).presheaf).app
      (op { carrier := U, is_open' := hU }) =
    ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫
            ((Functor.const J).obj (colimit F)).map f).c.app
      (op { carrier := U, is_open' := hU })

Next tactic:
dsimp
/-- Auxiliary definition for `AlgebraicGeometry.PresheafedSpace.instHasColimits`.
-/
@[simps]
def colimitCocone (F : J ⥤ PresheafedSpace.{_, _, v} C) : Cocone F where
  pt := colimit F
  ι :=
    { app := fun j =>
        { base := colimit.ι (F ⋙ PresheafedSpace.forget C) j
          c := limit.π _ (op j) }
      naturality := fun {j j'} f => by
        ext1
        · ext x
          exact colimit.w_apply (F ⋙ PresheafedSpace.forget C) f x
        · ext ⟨U, hU⟩
          dsimp
          

Proof state:
case h.w.mk
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
U : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')
hU : IsOpen U
⊢ ((F.map f ≫ { base := colimit.ι (F ⋙ forget C) j', c := limit.π (pushforwardDiagramToColimit F).leftOp (op j') }).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).op =
                  (Opens.map (colimit.ι (F ⋙ forget C) j ≫ 𝟙 (Limits.colimit (F ⋙ forget C)))).op))
            (F.obj j).presheaf).app
      (op { carrier := U, is_open' := hU }) =
    (𝟙 (colimit F)).c.app (op { carrier := U, is_open' := hU }) ≫
      (limit.π (pushforwardDiagramToColimit F).leftOp (op j)).app (op { carrier := U, is_open' := hU })

Next tactic:
rw [PresheafedSpace.id_c_app, map_id]
/-- Auxiliary definition for `AlgebraicGeometry.PresheafedSpace.instHasColimits`.
-/
@[simps]
def colimitCocone (F : J ⥤ PresheafedSpace.{_, _, v} C) : Cocone F where
  pt := colimit F
  ι :=
    { app := fun j =>
        { base := colimit.ι (F ⋙ PresheafedSpace.forget C) j
          c := limit.π _ (op j) }
      naturality := fun {j j'} f => by
        ext1
        · ext x
          exact colimit.w_apply (F ⋙ PresheafedSpace.forget C) f x
        · ext ⟨U, hU⟩
          dsimp
          rw [PresheafedSpace.id_c_app, map_id]
          

Proof state:
case h.w.mk
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
U : Set ↑↑(((Functor.const J).obj (colimit F)).obj j')
hU : IsOpen U
⊢ ((F.map f ≫ { base := colimit.ι (F ⋙ forget C) j', c := limit.π (pushforwardDiagramToColimit F).leftOp (op j') }).c ≫
          whiskerRight
            (eqToHom
              (_ :
                (Opens.map ((F.map f).base ≫ colimit.ι (F ⋙ forget C) j')).op =
                  (Opens.map (colimit.ι (F ⋙ forget C) j ≫ 𝟙 (Limits.colimit (F ⋙ forget C)))).op))
            (F.obj j).presheaf).app
      (op { carrier := U, is_open' := hU }) =
    𝟙 ((colimit F).presheaf.obj (op { carrier := U, is_open' := hU })) ≫
      (limit.π (pushforwardDiagramToColimit F).leftOp (op j)).app (op { carrier := U, is_open' := hU })

Next tactic:
erw [id_comp]