l3lab/ntp-mathlib huggingface dataset:
instance lift_additive (F : C ⥤ D) : (lift R F).Additive where
  map_add {X Y} f g := by
    dsimp
    rw [Finsupp.sum_add_index'] <;> 

Proof state:
case h_add
R : Type u_1
inst✝⁴ : CommRing R
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F : C ⥤ D
X Y : Free R C
f g : X ⟶ Y
⊢ ∀ (a : X ⟶ Y) (b₁ b₂ : R), (b₁ + b₂) • F.map a = b₁ • F.map a + b₂ • F.map a

Next tactic:
simp [add_smul]
instance lift_linear (F : C ⥤ D) : (lift R F).Linear R where
  map_smul {X Y} f r := by
    

Proof state:
R : Type u_1
inst✝⁴ : CommRing R
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F : C ⥤ D
X Y : Free R C
f : X ⟶ Y
r : R
⊢ (lift R F).map (r • f) = r • (lift R F).map f

Next tactic:
dsimp
instance lift_linear (F : C ⥤ D) : (lift R F).Linear R where
  map_smul {X Y} f r := by
    dsimp
    

Proof state:
R : Type u_1
inst✝⁴ : CommRing R
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F : C ⥤ D
X Y : Free R C
f : X ⟶ Y
r : R
⊢ (sum (r • f) fun f' r => r • F.map f') = r • sum f fun f' r => r • F.map f'

Next tactic:
rw [Finsupp.sum_smul_index]
instance lift_linear (F : C ⥤ D) : (lift R F).Linear R where
  map_smul {X Y} f r := by
    dsimp
    rw [Finsupp.sum_smul_index] <;> 

Proof state:
R : Type u_1
inst✝⁴ : CommRing R
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F : C ⥤ D
X Y : Free R C
f : X ⟶ Y
r : R
⊢ (sum f fun i a => (r * a) • F.map i) = r • sum f fun f' r => r • F.map f'

Next tactic:
simp [Finsupp.smul_sum, mul_smul]
instance lift_linear (F : C ⥤ D) : (lift R F).Linear R where
  map_smul {X Y} f r := by
    dsimp
    rw [Finsupp.sum_smul_index] <;> 

Proof state:
R : Type u_1
inst✝⁴ : CommRing R
C : Type u
inst✝³ : Category.{v, u} C
D : Type u
inst✝² : Category.{v, u} D
inst✝¹ : Preadditive D
inst✝ : Linear R D
F : C ⥤ D
X Y : Free R C
f : X ⟶ Y
r : R
⊢ ∀ (i : X ⟶ Y), 0 • F.map i = 0

Next tactic:
simp [Finsupp.smul_sum, mul_smul]
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      

Proof state:
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
⊢ ∀ {X Y : Free R C} (f : X ⟶ Y), F.map f ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f

Next tactic:
intro X Y f
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      intro X Y f
      

Proof state:
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
X Y : Free R C
f : X ⟶ Y
⊢ F.map f ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f

Next tactic:
apply Finsupp.induction_linear f
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      intro X Y f
      apply Finsupp.induction_linear f
      · -- Porting note: simp used to be able to close this goal
        

Proof state:
case h0
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
X Y : Free R C
f : X ⟶ Y
⊢ F.map 0 ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map 0

Next tactic:
rw [Functor.map_zero, Limits.zero_comp, Functor.map_zero, Limits.comp_zero]
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      intro X Y f
      apply Finsupp.induction_linear f
      · -- Porting note: simp used to be able to close this goal
        rw [Functor.map_zero, Limits.zero_comp, Functor.map_zero, Limits.comp_zero]
      · 

Proof state:
case hadd
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
X Y : Free R C
f : X ⟶ Y
⊢ ∀ (f g : (X ⟶ Y) →₀ R),
    F.map f ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f →
      F.map g ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map g →
        F.map (f + g) ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map (f + g)

Next tactic:
intro f₁ f₂ w₁ w₂
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      intro X Y f
      apply Finsupp.induction_linear f
      · -- Porting note: simp used to be able to close this goal
        rw [Functor.map_zero, Limits.zero_comp, Functor.map_zero, Limits.comp_zero]
      · intro f₁ f₂ w₁ w₂
        -- Porting note: Using rw instead of simp
        

Proof state:
case hadd
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
X Y : Free R C
f : X ⟶ Y
f₁ f₂ : (X ⟶ Y) →₀ R
w₁ : F.map f₁ ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f₁
w₂ : F.map f₂ ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map f₂
⊢ F.map (f₁ + f₂) ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map (f₁ + f₂)

Next tactic:
rw [Functor.map_add, add_comp, w₁, w₂, Functor.map_add, comp_add]
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      intro X Y f
      apply Finsupp.induction_linear f
      · -- Porting note: simp used to be able to close this goal
        rw [Functor.map_zero, Limits.zero_comp, Functor.map_zero, Limits.comp_zero]
      · intro f₁ f₂ w₁ w₂
        -- Porting note: Using rw instead of simp
        rw [Functor.map_add, add_comp, w₁, w₂, Functor.map_add, comp_add]
      · 

Proof state:
case hsingle
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
X Y : Free R C
f : X ⟶ Y
⊢ ∀ (a : X ⟶ Y) (b : R),
    (F.map fun₀ | a => b) ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map fun₀ | a => b

Next tactic:
intro f' r
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      intro X Y f
      apply Finsupp.induction_linear f
      · -- Porting note: simp used to be able to close this goal
        rw [Functor.map_zero, Limits.zero_comp, Functor.map_zero, Limits.comp_zero]
      · intro f₁ f₂ w₁ w₂
        -- Porting note: Using rw instead of simp
        rw [Functor.map_add, add_comp, w₁, w₂, Functor.map_add, comp_add]
      · intro f' r
        

Proof state:
case hsingle
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
X Y : Free R C
f : X ⟶ Y
f' : X ⟶ Y
r : R
⊢ (F.map fun₀ | f' => r) ≫ ((fun X => α.app X) Y).hom = ((fun X => α.app X) X).hom ≫ G.map fun₀ | f' => r

Next tactic:
rw [Iso.app_hom, Iso.app_hom, ← smul_single_one, F.map_smul, G.map_smul, smul_comp,
          comp_smul]
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      intro X Y f
      apply Finsupp.induction_linear f
      · -- Porting note: simp used to be able to close this goal
        rw [Functor.map_zero, Limits.zero_comp, Functor.map_zero, Limits.comp_zero]
      · intro f₁ f₂ w₁ w₂
        -- Porting note: Using rw instead of simp
        rw [Functor.map_add, add_comp, w₁, w₂, Functor.map_add, comp_add]
      · intro f' r
        rw [Iso.app_hom, Iso.app_hom, ← smul_single_one, F.map_smul, G.map_smul, smul_comp,
          comp_smul]
        

Proof state:
case hsingle
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
X Y : Free R C
f : X ⟶ Y
f' : X ⟶ Y
r : R
⊢ r • (F.map fun₀ | f' => 1) ≫ α.hom.app Y = r • α.hom.app X ≫ G.map fun₀ | f' => 1

Next tactic:
change r • (embedding R C ⋙ F).map f' ≫ _ = r • _ ≫ (embedding R C ⋙ G).map f'
/-- Two `R`-linear functors out of the `R`-linear completion are isomorphic iff their
compositions with the embedding functor are isomorphic.
-/
-- Porting note: used to be @[ext]
def ext {F G : Free R C ⥤ D} [F.Additive] [F.Linear R] [G.Additive] [G.Linear R]
    (α : embedding R C ⋙ F ≅ embedding R C ⋙ G) : F ≅ G :=
  NatIso.ofComponents (fun X => α.app X)
    (by
      intro X Y f
      apply Finsupp.induction_linear f
      · -- Porting note: simp used to be able to close this goal
        rw [Functor.map_zero, Limits.zero_comp, Functor.map_zero, Limits.comp_zero]
      · intro f₁ f₂ w₁ w₂
        -- Porting note: Using rw instead of simp
        rw [Functor.map_add, add_comp, w₁, w₂, Functor.map_add, comp_add]
      · intro f' r
        rw [Iso.app_hom, Iso.app_hom, ← smul_single_one, F.map_smul, G.map_smul, smul_comp,
          comp_smul]
        change r • (embedding R C ⋙ F).map f' ≫ _ = r • _ ≫ (embedding R C ⋙ G).map f'
        

Proof state:
case hsingle
R : Type u_1
inst✝⁸ : CommRing R
C : Type u
inst✝⁷ : Category.{v, u} C
D : Type u
inst✝⁶ : Category.{v, u} D
inst✝⁵ : Preadditive D
inst✝⁴ : Linear R D
F G : Free R C ⥤ D
inst✝³ : Functor.Additive F
inst✝² : Functor.Linear R F
inst✝¹ : Functor.Additive G
inst✝ : Functor.Linear R G
α : embedding R C ⋙ F ≅ embedding R C ⋙ G
X Y : Free R C
f : X ⟶ Y
f' : X ⟶ Y
r : R
⊢ r • (embedding R C ⋙ F).map f' ≫ α.hom.app Y = r • α.hom.app X ≫ (embedding R C ⋙ G).map f'

Next tactic:
rw [α.hom.naturality f']
@[simp]
theorem map_id_c_app (F : J ⥤ PresheafedSpace.{_, _, v} C) (j) (U) :
    (F.map (𝟙 j)).c.app (op U) =
      (Pushforward.id (F.obj j).presheaf).inv.app (op U) ≫
        (pushforwardEq (by 

Proof state:
J : Type u'
inst✝¹ : Category.{v', u'} J
C : Type u
inst✝ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
j : J
U : Opens ↑↑(F.obj j)
⊢ 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base

Next tactic:
simp
@[simp]
theorem map_id_c_app (F : J ⥤ PresheafedSpace.{_, _, v} C) (j) (U) :
    (F.map (𝟙 j)).c.app (op U) =
      (Pushforward.id (F.obj j).presheaf).inv.app (op U) ≫
        (pushforwardEq (by simp) (F.obj j).presheaf).hom.app
          (op U) := by
  

Proof state:
J : Type u'
inst✝¹ : Category.{v', u'} J
C : Type u
inst✝ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
j : J
U : Opens ↑↑(F.obj j)
⊢ (F.map (𝟙 j)).c.app (op U) =
    (Pushforward.id (F.obj j).presheaf).inv.app (op U) ≫
      (pushforwardEq (_ : 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base) (F.obj j).presheaf).hom.app (op U)

Next tactic:
cases U
@[simp]
theorem map_id_c_app (F : J ⥤ PresheafedSpace.{_, _, v} C) (j) (U) :
    (F.map (𝟙 j)).c.app (op U) =
      (Pushforward.id (F.obj j).presheaf).inv.app (op U) ≫
        (pushforwardEq (by simp) (F.obj j).presheaf).hom.app
          (op U) := by
  cases U
  

Proof state:
case mk
J : Type u'
inst✝¹ : Category.{v', u'} J
C : Type u
inst✝ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
j : J
carrier✝ : Set ↑↑(F.obj j)
is_open'✝ : IsOpen carrier✝
⊢ (F.map (𝟙 j)).c.app (op { carrier := carrier✝, is_open' := is_open'✝ }) =
    (Pushforward.id (F.obj j).presheaf).inv.app (op { carrier := carrier✝, is_open' := is_open'✝ }) ≫
      (pushforwardEq (_ : 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base) (F.obj j).presheaf).hom.app
        (op { carrier := carrier✝, is_open' := is_open'✝ })

Next tactic:
simp [PresheafedSpace.congr_app (F.map_id j)]
@[simp]
theorem map_comp_c_app (F : J ⥤ PresheafedSpace.{_, _, v} C) {j₁ j₂ j₃}
    (f : j₁ ⟶ j₂) (g : j₂ ⟶ j₃) (U) :
    (F.map (f ≫ g)).c.app (op U) =
      (F.map g).c.app (op U) ≫
        (pushforwardMap (F.map g).base (F.map f).c).app (op U) ≫
          (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (F.map g).base).inv.app (op U) ≫
            (pushforwardEq (by 

Proof state:
J : Type u'
inst✝¹ : Category.{v', u'} J
C : Type u
inst✝ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
j₁ j₂ j₃ : J
f : j₁ ⟶ j₂
g : j₂ ⟶ j₃
U : Opens ↑↑(F.obj j₃)
⊢ (F.map f).base ≫ (F.map g).base = (F.map (f ≫ g)).base

Next tactic:
rw [F.map_comp]
@[simp]
theorem map_comp_c_app (F : J ⥤ PresheafedSpace.{_, _, v} C) {j₁ j₂ j₃}
    (f : j₁ ⟶ j₂) (g : j₂ ⟶ j₃) (U) :
    (F.map (f ≫ g)).c.app (op U) =
      (F.map g).c.app (op U) ≫
        (pushforwardMap (F.map g).base (F.map f).c).app (op U) ≫
          (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (F.map g).base).inv.app (op U) ≫
            (pushforwardEq (by rw [F.map_comp]; 

Proof state:
J : Type u'
inst✝¹ : Category.{v', u'} J
C : Type u
inst✝ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
j₁ j₂ j₃ : J
f : j₁ ⟶ j₂
g : j₂ ⟶ j₃
U : Opens ↑↑(F.obj j₃)
⊢ (F.map f).base ≫ (F.map g).base = (F.map f ≫ F.map g).base

Next tactic:
rfl
@[simp]
theorem map_comp_c_app (F : J ⥤ PresheafedSpace.{_, _, v} C) {j₁ j₂ j₃}
    (f : j₁ ⟶ j₂) (g : j₂ ⟶ j₃) (U) :
    (F.map (f ≫ g)).c.app (op U) =
      (F.map g).c.app (op U) ≫
        (pushforwardMap (F.map g).base (F.map f).c).app (op U) ≫
          (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (F.map g).base).inv.app (op U) ≫
            (pushforwardEq (by rw [F.map_comp]; rfl) _).hom.app
              _ := by
  

Proof state:
J : Type u'
inst✝¹ : Category.{v', u'} J
C : Type u
inst✝ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
j₁ j₂ j₃ : J
f : j₁ ⟶ j₂
g : j₂ ⟶ j₃
U : Opens ↑↑(F.obj j₃)
⊢ (F.map (f ≫ g)).c.app (op U) =
    (F.map g).c.app (op U) ≫
      (pushforwardMap (F.map g).base (F.map f).c).app (op U) ≫
        (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (F.map g).base).inv.app (op U) ≫
          (pushforwardEq (_ : (F.map f).base ≫ (F.map g).base = (F.map (f ≫ g)).base) (F.obj j₁).presheaf).hom.app
            (op U)

Next tactic:
cases U
@[simp]
theorem map_comp_c_app (F : J ⥤ PresheafedSpace.{_, _, v} C) {j₁ j₂ j₃}
    (f : j₁ ⟶ j₂) (g : j₂ ⟶ j₃) (U) :
    (F.map (f ≫ g)).c.app (op U) =
      (F.map g).c.app (op U) ≫
        (pushforwardMap (F.map g).base (F.map f).c).app (op U) ≫
          (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (F.map g).base).inv.app (op U) ≫
            (pushforwardEq (by rw [F.map_comp]; rfl) _).hom.app
              _ := by
  cases U
  

Proof state:
case mk
J : Type u'
inst✝¹ : Category.{v', u'} J
C : Type u
inst✝ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
j₁ j₂ j₃ : J
f : j₁ ⟶ j₂
g : j₂ ⟶ j₃
carrier✝ : Set ↑↑(F.obj j₃)
is_open'✝ : IsOpen carrier✝
⊢ (F.map (f ≫ g)).c.app (op { carrier := carrier✝, is_open' := is_open'✝ }) =
    (F.map g).c.app (op { carrier := carrier✝, is_open' := is_open'✝ }) ≫
      (pushforwardMap (F.map g).base (F.map f).c).app (op { carrier := carrier✝, is_open' := is_open'✝ }) ≫
        (Pushforward.comp (F.obj j₁).presheaf (F.map f).base (F.map g).base).inv.app
            (op { carrier := carrier✝, is_open' := is_open'✝ }) ≫
          (pushforwardEq (_ : (F.map f).base ≫ (F.map g).base = (F.map (f ≫ g)).base) (F.obj j₁).presheaf).hom.app
            (op { carrier := carrier✝, is_open' := is_open'✝ })

Next tactic:
simp [PresheafedSpace.congr_app (F.map_comp f g)]
/-- Given a diagram of `PresheafedSpace C`s, its colimit is computed by pushing the sheaves onto
the colimit of the underlying spaces, and taking componentwise limit.
This is the componentwise diagram for an open set `U` of the colimit of the underlying spaces.
-/
@[simps]
def componentwiseDiagram (F : J ⥤ PresheafedSpace.{_, _, v} C) [HasColimit F]
    (U : Opens (Limits.colimit F).carrier) : Jᵒᵖ ⥤ C where
  obj j := (F.obj (unop j)).presheaf.obj (op ((Opens.map (colimit.ι F (unop j)).base).obj U))
  map {j k} f := (F.map f.unop).c.app _ ≫
    (F.obj (unop k)).presheaf.map (eqToHom (by 

Proof state:
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
inst✝ : HasColimit F
U : Opens ↑↑(colimit F)
j k : Jᵒᵖ
f : j ⟶ k
⊢ (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =
    op ((Opens.map (colimit.ι F k.unop).base).obj U)

Next tactic:
rw [← colimit.w F f.unop, comp_base]
/-- Given a diagram of `PresheafedSpace C`s, its colimit is computed by pushing the sheaves onto
the colimit of the underlying spaces, and taking componentwise limit.
This is the componentwise diagram for an open set `U` of the colimit of the underlying spaces.
-/
@[simps]
def componentwiseDiagram (F : J ⥤ PresheafedSpace.{_, _, v} C) [HasColimit F]
    (U : Opens (Limits.colimit F).carrier) : Jᵒᵖ ⥤ C where
  obj j := (F.obj (unop j)).presheaf.obj (op ((Opens.map (colimit.ι F (unop j)).base).obj U))
  map {j k} f := (F.map f.unop).c.app _ ≫
    (F.obj (unop k)).presheaf.map (eqToHom (by rw [← colimit.w F f.unop, comp_base]; 

Proof state:
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
inst✝ : HasColimit F
U : Opens ↑↑(colimit F)
j k : Jᵒᵖ
f : j ⟶ k
⊢ (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =
    op ((Opens.map ((F.map f.unop).base ≫ (colimit.ι F j.unop).base)).obj U)

Next tactic:
rfl
/-- Given a diagram of `PresheafedSpace C`s, its colimit is computed by pushing the sheaves onto
the colimit of the underlying spaces, and taking componentwise limit.
This is the componentwise diagram for an open set `U` of the colimit of the underlying spaces.
-/
@[simps]
def componentwiseDiagram (F : J ⥤ PresheafedSpace.{_, _, v} C) [HasColimit F]
    (U : Opens (Limits.colimit F).carrier) : Jᵒᵖ ⥤ C where
  obj j := (F.obj (unop j)).presheaf.obj (op ((Opens.map (colimit.ι F (unop j)).base).obj U))
  map {j k} f := (F.map f.unop).c.app _ ≫
    (F.obj (unop k)).presheaf.map (eqToHom (by rw [← colimit.w F f.unop, comp_base]; rfl))
  map_comp {i j k} f g := by
    dsimp
    simp_rw [map_comp_c_app]
    simp only [op_obj, unop_op, eqToHom_op, id_eq, id_comp, assoc, eqToHom_trans]
    congr 1
    rw [TopCat.Presheaf.Pushforward.comp_inv_app, TopCat.Presheaf.pushforwardEq_hom_app,
      CategoryTheory.NatTrans.naturality_assoc, TopCat.Presheaf.pushforwardMap_app]
    congr 1
    simp
  map_id x := by
    

Proof state:
J : Type u'
inst✝² : Category.{v', u'} J
C : Type u
inst✝¹ : Category.{v, u} C
F : J ⥤ PresheafedSpace C
inst✝ : HasColimit F
U : Opens ↑↑(colimit F)
x : Jᵒᵖ
⊢ { obj := fun j => (F.obj j.unop).presheaf.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)),
          map := fun {j k} f =>
            (F.map f.unop).c.app (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫
              (F.obj k.unop).presheaf.map
                (eqToHom
                  (_ :
                    (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =
                      op ((Opens.map (colimit.ι F k.unop).base).obj U))) }.map
      (𝟙 x) =
    𝟙
      ({ obj := fun j => (F.obj j.unop).presheaf.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)),
            map := fun {j k} f =>
              (F.map f.unop).c.app (op ((Opens.map (colimit.ι F j.unop).base).obj U)) ≫
                (F.obj k.unop).presheaf.map
                  (eqToHom
                    (_ :
                      (Opens.map (F.map f.unop).base).op.obj (op ((Opens.map (colimit.ι F j.unop).base).obj U)) =
                        op ((Opens.map (colimit.ι F k.unop).base).obj U))) }.obj
        x)

Next tactic:
dsimp