l3lab/ntp-mathlib huggingface dataset:
/-- A component of the natural transformation between right-derived functors can be computed
using a chosen injective resolution. -/
lemma rightDerived_app_eq
    {F G : C ⥤ D} [F.Additive] [G.Additive] (α : F ⟶ G) {X : C} (P : InjectiveResolution X)
    (n : ℕ) : (NatTrans.rightDerived α n).app X =
      (P.isoRightDerivedObj F n).hom ≫
        (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n).map
        ((NatTrans.mapHomologicalComplex α _).app P.cocomplex) ≫
        (P.isoRightDerivedObj G n).inv := by
  dsimp [NatTrans.rightDerived, isoRightDerivedObj]
  rw [InjectiveResolution.rightDerivedToHomotopyCategory_app_eq α P,
    Functor.map_comp, Functor.map_comp, assoc]
  erw [← (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) n).hom.naturality_assoc
    ((NatTrans.mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex)]
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{u_2, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
X : C
P : InjectiveResolution X
n : ℕ
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map (isoRightDerivedToHomotopyCategoryObj P F).hom ≫
      (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
          ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
            ((NatTrans.mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex)) ≫
        (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map (isoRightDerivedToHomotopyCategoryObj P G).inv =
    (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map (isoRightDerivedToHomotopyCategoryObj P F).hom ≫
      (HomotopyCategory.quotient D (ComplexShape.up ℕ) ⋙ HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
          ((NatTrans.mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) n).hom.app
            ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).obj P.cocomplex) ≫
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) n).inv.app
              ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).obj P.cocomplex) ≫
            (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
              (isoRightDerivedToHomotopyCategoryObj P G).inv

Next tactic:
simp only [Functor.comp_map, Iso.hom_inv_id_app_assoc]
/-- If `P : InjectiveResolution X` and `F` is an additive functor, this is
the canonical morphism from `F.obj X` to the cycles in degree `0` of
`(F.mapHomologicalComplex _).obj P.cocomplex`. -/
noncomputable def toRightDerivedZero' {X : C}
    (P : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.obj X ⟶ ((F.mapHomologicalComplex _).obj P.cocomplex).cycles 0 :=
  HomologicalComplex.liftCycles _ (F.map (P.ι.f 0)) 1 (by 

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.68113, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : InjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ ComplexShape.next (ComplexShape.up ℕ) 0 = 1

Next tactic:
simp
/-- If `P : InjectiveResolution X` and `F` is an additive functor, this is
the canonical morphism from `F.obj X` to the cycles in degree `0` of
`(F.mapHomologicalComplex _).obj P.cocomplex`. -/
noncomputable def toRightDerivedZero' {X : C}
    (P : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.obj X ⟶ ((F.mapHomologicalComplex _).obj P.cocomplex).cycles 0 :=
  HomologicalComplex.liftCycles _ (F.map (P.ι.f 0)) 1 (by simp) (by
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.68113, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : InjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map (HomologicalComplex.Hom.f P.ι 0) ≫
      HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj P.cocomplex) 0 1 =
    0

Next tactic:
dsimp
/-- If `P : InjectiveResolution X` and `F` is an additive functor, this is
the canonical morphism from `F.obj X` to the cycles in degree `0` of
`(F.mapHomologicalComplex _).obj P.cocomplex`. -/
noncomputable def toRightDerivedZero' {X : C}
    (P : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.obj X ⟶ ((F.mapHomologicalComplex _).obj P.cocomplex).cycles 0 :=
  HomologicalComplex.liftCycles _ (F.map (P.ι.f 0)) 1 (by simp) (by
    dsimp
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.68113, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : InjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map (HomologicalComplex.Hom.f P.ι 0) ≫ F.map (HomologicalComplex.d P.cocomplex 0 1) = 0

Next tactic:
rw [← F.map_comp, HomologicalComplex.Hom.comm, HomologicalComplex.single_obj_d,
      zero_comp, F.map_zero]
@[reassoc (attr := simp)]
lemma toRightDerivedZero'_comp_iCycles {X : C}
    (P : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    P.toRightDerivedZero' F ≫
      HomologicalComplex.iCycles _ _ = F.map (P.ι.f 0) := by
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : InjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ toRightDerivedZero' P F ≫
      HomologicalComplex.iCycles ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj P.cocomplex) 0 =
    F.map (HomologicalComplex.Hom.f P.ι 0)

Next tactic:
simp [toRightDerivedZero']
@[reassoc]
lemma toRightDerivedZero'_naturality {X Y : C} (f : X ⟶ Y)
    (P : InjectiveResolution X) (Q : InjectiveResolution Y)
    (φ : P.cocomplex ⟶ Q.cocomplex) (comm : P.ι.f 0 ≫ φ.f 0 = f ≫ Q.ι.f 0)
    (F : C ⥤ D) [F.Additive] :
    F.map f ≫ Q.toRightDerivedZero' F =
      P.toRightDerivedZero' F ≫
        HomologicalComplex.cyclesMap ((F.mapHomologicalComplex _).map φ) 0 := by
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X Y : C
f : X ⟶ Y
P : InjectiveResolution X
Q : InjectiveResolution Y
φ : P.cocomplex ⟶ Q.cocomplex
comm : HomologicalComplex.Hom.f P.ι 0 ≫ HomologicalComplex.Hom.f φ 0 = f ≫ HomologicalComplex.Hom.f Q.ι 0
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map f ≫ toRightDerivedZero' Q F =
    toRightDerivedZero' P F ≫
      HomologicalComplex.cyclesMap ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).map φ) 0

Next tactic:
simp only [← cancel_mono (HomologicalComplex.iCycles _ _),
    Functor.mapHomologicalComplex_obj_X, assoc, toRightDerivedZero'_comp_iCycles,
    CochainComplex.single₀_obj_zero, HomologicalComplex.cyclesMap_i,
    Functor.mapHomologicalComplex_map_f, toRightDerivedZero'_comp_iCycles_assoc,
    ← F.map_comp, comm]
instance (F : C ⥤ D) [F.Additive] (X : C) [Injective X] :
    IsIso ((InjectiveResolution.self X).toRightDerivedZero' F) := by
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.85748, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Injective X
⊢ IsIso (toRightDerivedZero' (self X) F)

Next tactic:
dsimp [InjectiveResolution.toRightDerivedZero']
instance (F : C ⥤ D) [F.Additive] (X : C) [Injective X] :
    IsIso ((InjectiveResolution.self X).toRightDerivedZero' F) := by
  dsimp [InjectiveResolution.toRightDerivedZero']
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.85748, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Injective X
⊢ IsIso
    (HomologicalComplex.liftCycles
      ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj ((CochainComplex.single₀ C).obj X)) (F.map (𝟙 X)) 1
      toRightDerivedZero'.proof_2
      (_ :
        F.map (HomologicalComplex.Hom.f (self X).ι 0) ≫
            HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj (self X).cocomplex) 0 1 =
          0))

Next tactic:
rw [CochainComplex.isIso_liftCycles_iff]
instance (F : C ⥤ D) [F.Additive] (X : C) [Injective X] :
    IsIso ((InjectiveResolution.self X).toRightDerivedZero' F) := by
  dsimp [InjectiveResolution.toRightDerivedZero']
  rw [CochainComplex.isIso_liftCycles_iff]
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.85748, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Injective X
⊢ ShortComplex.Exact
      (ShortComplex.mk (F.map (𝟙 X))
        (HomologicalComplex.d
          ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj ((CochainComplex.single₀ C).obj X)) 0 1)
        (_ :
          F.map (HomologicalComplex.Hom.f (self X).ι 0) ≫
              HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj (self X).cocomplex) 0 1 =
            0)) ∧
    Mono (F.map (𝟙 X))

Next tactic:
refine' ⟨ShortComplex.Splitting.exact _, inferInstance⟩
instance (F : C ⥤ D) [F.Additive] (X : C) [Injective X] :
    IsIso ((InjectiveResolution.self X).toRightDerivedZero' F) := by
  dsimp [InjectiveResolution.toRightDerivedZero']
  rw [CochainComplex.isIso_liftCycles_iff]
  refine' ⟨ShortComplex.Splitting.exact _, inferInstance⟩
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.85748, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Injective X
⊢ ShortComplex.Splitting
    (ShortComplex.mk (F.map (𝟙 X))
      (HomologicalComplex.d
        ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj ((CochainComplex.single₀ C).obj X)) 0 1)
      (_ :
        F.map (HomologicalComplex.Hom.f (self X).ι 0) ≫
            HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj (self X).cocomplex) 0 1 =
          0))

Next tactic:
exact
    { r := 𝟙 _
      s := 0
      s_g := (F.map_isZero (isZero_zero _)).eq_of_src _ _ }
/-- The natural transformation `F ⟶ F.rightDerived 0`. -/
noncomputable def Functor.toRightDerivedZero (F : C ⥤ D) [F.Additive] :
    F ⟶ F.rightDerived 0 where
  app X := (injectiveResolution X).toRightDerivedZero' F ≫
    (CochainComplex.isoHomologyπ₀ _).hom ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app _
  naturality {X Y} f := by
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.97234, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ F.map f ≫
      (fun X =>
          InjectiveResolution.toRightDerivedZero' (injectiveResolution X) F ≫
            (CochainComplex.isoHomologyπ₀
                  ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex)).hom ≫
              (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
                ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex))
        Y =
    (fun X =>
          InjectiveResolution.toRightDerivedZero' (injectiveResolution X) F ≫
            (CochainComplex.isoHomologyπ₀
                  ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex)).hom ≫
              (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
                ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex))
        X ≫
      (rightDerived F 0).map f

Next tactic:
dsimp [rightDerived]
/-- The natural transformation `F ⟶ F.rightDerived 0`. -/
noncomputable def Functor.toRightDerivedZero (F : C ⥤ D) [F.Additive] :
    F ⟶ F.rightDerived 0 where
  app X := (injectiveResolution X).toRightDerivedZero' F ≫
    (CochainComplex.isoHomologyπ₀ _).hom ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app _
  naturality {X Y} f := by
    dsimp [rightDerived]
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.97234, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ F.map f ≫
      InjectiveResolution.toRightDerivedZero' (injectiveResolution Y) F ≫
        HomologicalComplex.homologyπ
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution Y).cocomplex) 0 ≫
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution Y).cocomplex) =
    (InjectiveResolution.toRightDerivedZero' (injectiveResolution X) F ≫
        HomologicalComplex.homologyπ
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex) 0 ≫
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex)) ≫
      (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) 0).map ((rightDerivedToHomotopyCategory F).map f)

Next tactic:
rw [assoc, assoc, InjectiveResolution.toRightDerivedZero'_naturality_assoc f
      (injectiveResolution X) (injectiveResolution Y)
      (InjectiveResolution.desc f _ _) (by simp),
      ← HomologicalComplex.homologyπ_naturality_assoc]
/-- The natural transformation `F ⟶ F.rightDerived 0`. -/
noncomputable def Functor.toRightDerivedZero (F : C ⥤ D) [F.Additive] :
    F ⟶ F.rightDerived 0 where
  app X := (injectiveResolution X).toRightDerivedZero' F ≫
    (CochainComplex.isoHomologyπ₀ _).hom ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app _
  naturality {X Y} f := by
    dsimp [rightDerived]
    rw [assoc, assoc, InjectiveResolution.toRightDerivedZero'_naturality_assoc f
      (injectiveResolution X) (injectiveResolution Y)
      (InjectiveResolution.desc f _ _) (by 

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.97234, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ HomologicalComplex.Hom.f (injectiveResolution X).ι 0 ≫
      HomologicalComplex.Hom.f (InjectiveResolution.desc f (injectiveResolution Y) (injectiveResolution X)) 0 =
    f ≫ HomologicalComplex.Hom.f (injectiveResolution Y).ι 0

Next tactic:
simp
/-- The natural transformation `F ⟶ F.rightDerived 0`. -/
noncomputable def Functor.toRightDerivedZero (F : C ⥤ D) [F.Additive] :
    F ⟶ F.rightDerived 0 where
  app X := (injectiveResolution X).toRightDerivedZero' F ≫
    (CochainComplex.isoHomologyπ₀ _).hom ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app _
  naturality {X Y} f := by
    dsimp [rightDerived]
    rw [assoc, assoc, InjectiveResolution.toRightDerivedZero'_naturality_assoc f
      (injectiveResolution X) (injectiveResolution Y)
      (InjectiveResolution.desc f _ _) (by simp),
      ← HomologicalComplex.homologyπ_naturality_assoc]
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.97234, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ InjectiveResolution.toRightDerivedZero' (injectiveResolution X) F ≫
      HomologicalComplex.homologyπ ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex)
          0 ≫
        HomologicalComplex.homologyMap
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).map
              (InjectiveResolution.desc f (injectiveResolution Y) (injectiveResolution X)))
            0 ≫
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution Y).cocomplex) =
    InjectiveResolution.toRightDerivedZero' (injectiveResolution X) F ≫
      HomologicalComplex.homologyπ ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex)
          0 ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex) ≫
          (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) 0).map ((rightDerivedToHomotopyCategory F).map f)

Next tactic:
erw [← NatTrans.naturality]
/-- The natural transformation `F ⟶ F.rightDerived 0`. -/
noncomputable def Functor.toRightDerivedZero (F : C ⥤ D) [F.Additive] :
    F ⟶ F.rightDerived 0 where
  app X := (injectiveResolution X).toRightDerivedZero' F ≫
    (CochainComplex.isoHomologyπ₀ _).hom ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app _
  naturality {X Y} f := by
    dsimp [rightDerived]
    rw [assoc, assoc, InjectiveResolution.toRightDerivedZero'_naturality_assoc f
      (injectiveResolution X) (injectiveResolution Y)
      (InjectiveResolution.desc f _ _) (by simp),
      ← HomologicalComplex.homologyπ_naturality_assoc]
    erw [← NatTrans.naturality]
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.97234, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ InjectiveResolution.toRightDerivedZero' (injectiveResolution X) F ≫
      HomologicalComplex.homologyπ ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex)
          0 ≫
        HomologicalComplex.homologyMap
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).map
              (InjectiveResolution.desc f (injectiveResolution Y) (injectiveResolution X)))
            0 ≫
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution Y).cocomplex) =
    InjectiveResolution.toRightDerivedZero' (injectiveResolution X) F ≫
      HomologicalComplex.homologyπ ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex)
          0 ≫
        (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) 0).map
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).map
              (InjectiveResolution.desc f (injectiveResolution Y) (injectiveResolution X))) ≫
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
            ((mapHomologicalComplex F (ComplexShape.up ℕ)).obj ((injectiveResolutions C).obj Y).as)

Next tactic:
rfl
lemma InjectiveResolution.toRightDerivedZero_eq
    {X : C} (I : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.toRightDerivedZero.app X = I.toRightDerivedZero' F ≫
      (CochainComplex.isoHomologyπ₀ _).hom ≫ (I.isoRightDerivedObj F 0).inv := by
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X : C
I : InjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ (Functor.toRightDerivedZero F).app X =
    toRightDerivedZero' I F ≫
      (CochainComplex.isoHomologyπ₀ ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj I.cocomplex)).hom ≫
        (isoRightDerivedObj I F 0).inv

Next tactic:
dsimp [Functor.toRightDerivedZero, isoRightDerivedObj]
lemma InjectiveResolution.toRightDerivedZero_eq
    {X : C} (I : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.toRightDerivedZero.app X = I.toRightDerivedZero' F ≫
      (CochainComplex.isoHomologyπ₀ _).hom ≫ (I.isoRightDerivedObj F 0).inv := by
  dsimp [Functor.toRightDerivedZero, isoRightDerivedObj]
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X : C
I : InjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ toRightDerivedZero' (injectiveResolution X) F ≫
      HomologicalComplex.homologyπ
          ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex) 0 ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
          ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex) =
    toRightDerivedZero' I F ≫
      HomologicalComplex.homologyπ ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj I.cocomplex) 0 ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
            ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj I.cocomplex) ≫
          (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) 0).map (isoRightDerivedToHomotopyCategoryObj I F).inv

Next tactic:
have h₁ := InjectiveResolution.toRightDerivedZero'_naturality
    (𝟙 X) (injectiveResolution X) I (desc (𝟙 X) _ _) (by simp) F
lemma InjectiveResolution.toRightDerivedZero_eq
    {X : C} (I : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.toRightDerivedZero.app X = I.toRightDerivedZero' F ≫
      (CochainComplex.isoHomologyπ₀ _).hom ≫ (I.isoRightDerivedObj F 0).inv := by
  dsimp [Functor.toRightDerivedZero, isoRightDerivedObj]
  have h₁ := InjectiveResolution.toRightDerivedZero'_naturality
    (𝟙 X) (injectiveResolution X) I (desc (𝟙 X) _ _) (by 

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X : C
I : InjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ HomologicalComplex.Hom.f (injectiveResolution X).ι 0 ≫
      HomologicalComplex.Hom.f (desc (𝟙 X) I (injectiveResolution X)) 0 =
    𝟙 X ≫ HomologicalComplex.Hom.f I.ι 0

Next tactic:
simp
lemma InjectiveResolution.toRightDerivedZero_eq
    {X : C} (I : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.toRightDerivedZero.app X = I.toRightDerivedZero' F ≫
      (CochainComplex.isoHomologyπ₀ _).hom ≫ (I.isoRightDerivedObj F 0).inv := by
  dsimp [Functor.toRightDerivedZero, isoRightDerivedObj]
  have h₁ := InjectiveResolution.toRightDerivedZero'_naturality
    (𝟙 X) (injectiveResolution X) I (desc (𝟙 X) _ _) (by simp) F
  

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{u_2, u_1} D
inst✝³ : Abelian C
inst✝² : HasInjectiveResolutions C
inst✝¹ : Abelian D
X : C
I : InjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
h₁ :
  F.map (𝟙 X) ≫ toRightDerivedZero' I F =
    toRightDerivedZero' (injectiveResolution X) F ≫
      HomologicalComplex.cyclesMap
        ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).map (desc (𝟙 X) I (injectiveResolution X))) 0
⊢ toRightDerivedZero' (injectiveResolution X) F ≫
      HomologicalComplex.homologyπ
          ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex) 0 ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
          ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj (injectiveResolution X).cocomplex) =
    toRightDerivedZero' I F ≫
      HomologicalComplex.homologyπ ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj I.cocomplex) 0 ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.up ℕ) 0).inv.app
            ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj I.cocomplex) ≫
          (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) 0).map (isoRightDerivedToHomotopyCategoryObj I F).inv

Next tactic:
simp only [Functor.map_id, id_comp] at h₁