l3lab/ntp-mathlib huggingface dataset:
/-- A component of the natural transformation between left-derived functors can be computed
using a chosen projective resolution. -/
lemma leftDerived_app_eq
    {F G : C ⥤ D} [F.Additive] [G.Additive] (α : F ⟶ G) {X : C} (P : ProjectiveResolution X)
    (n : ℕ) : (NatTrans.leftDerived α n).app X =
      (P.isoLeftDerivedObj F n).hom ≫
        (HomologicalComplex.homologyFunctor D (ComplexShape.down ℕ) n).map
        ((NatTrans.mapHomologicalComplex α _).app P.complex) ≫
        (P.isoLeftDerivedObj G n).inv := by
  dsimp [NatTrans.leftDerived, isoLeftDerivedObj]
  rw [ProjectiveResolution.leftDerivedToHomotopyCategory_app_eq α P,
    Functor.map_comp, Functor.map_comp, assoc]
  

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✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
X : C
P : ProjectiveResolution X
n : ℕ
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map (isoLeftDerivedToHomotopyCategoryObj P F).hom ≫
      (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map
          ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map
            ((NatTrans.mapHomologicalComplex α (ComplexShape.down ℕ)).app P.complex)) ≫
        (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map (isoLeftDerivedToHomotopyCategoryObj P G).inv =
    (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map (isoLeftDerivedToHomotopyCategoryObj P F).hom ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) n).hom.app
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) ≫
        HomologicalComplex.homologyMap ((NatTrans.mapHomologicalComplex α (ComplexShape.down ℕ)).app P.complex) n ≫
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) n).inv.app
              ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj P.complex) ≫
            (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map
              (isoLeftDerivedToHomotopyCategoryObj P G).inv

Next tactic:
erw [← (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) n).hom.naturality_assoc
    ((NatTrans.mapHomologicalComplex α (ComplexShape.down ℕ)).app P.complex)]
/-- A component of the natural transformation between left-derived functors can be computed
using a chosen projective resolution. -/
lemma leftDerived_app_eq
    {F G : C ⥤ D} [F.Additive] [G.Additive] (α : F ⟶ G) {X : C} (P : ProjectiveResolution X)
    (n : ℕ) : (NatTrans.leftDerived α n).app X =
      (P.isoLeftDerivedObj F n).hom ≫
        (HomologicalComplex.homologyFunctor D (ComplexShape.down ℕ) n).map
        ((NatTrans.mapHomologicalComplex α _).app P.complex) ≫
        (P.isoLeftDerivedObj G n).inv := by
  dsimp [NatTrans.leftDerived, isoLeftDerivedObj]
  rw [ProjectiveResolution.leftDerivedToHomotopyCategory_app_eq α P,
    Functor.map_comp, Functor.map_comp, assoc]
  erw [← (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) n).hom.naturality_assoc
    ((NatTrans.mapHomologicalComplex α (ComplexShape.down ℕ)).app P.complex)]
  

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✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
X : C
P : ProjectiveResolution X
n : ℕ
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map (isoLeftDerivedToHomotopyCategoryObj P F).hom ≫
      (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map
          ((HomotopyCategory.quotient D (ComplexShape.down ℕ)).map
            ((NatTrans.mapHomologicalComplex α (ComplexShape.down ℕ)).app P.complex)) ≫
        (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map (isoLeftDerivedToHomotopyCategoryObj P G).inv =
    (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map (isoLeftDerivedToHomotopyCategoryObj P F).hom ≫
      (HomotopyCategory.quotient D (ComplexShape.down ℕ) ⋙
              HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map
          ((NatTrans.mapHomologicalComplex α (ComplexShape.down ℕ)).app P.complex) ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) n).hom.app
            ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj P.complex) ≫
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) n).inv.app
              ((Functor.mapHomologicalComplex G (ComplexShape.down ℕ)).obj P.complex) ≫
            (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) n).map
              (isoLeftDerivedToHomotopyCategoryObj P G).inv

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

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.67927, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ ComplexShape.prev (ComplexShape.down ℕ) 0 = 1

Next tactic:
simp
/-- If `P : ProjectiveResolution X` and `F` is an additive functor, this is
the canonical morphism from the opcycles in degree `0` of
`(F.mapHomologicalComplex _).obj P.complex` to `F.obj X`. -/
noncomputable def fromLeftDerivedZero' {X : C}
    (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    ((F.mapHomologicalComplex _).obj P.complex).opcycles 0 ⟶ F.obj X :=
  HomologicalComplex.descOpcycles _ (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.67927, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 1 0 ≫
      F.map (HomologicalComplex.Hom.f P.π 0) =
    0

Next tactic:
dsimp
/-- If `P : ProjectiveResolution X` and `F` is an additive functor, this is
the canonical morphism from the opcycles in degree `0` of
`(F.mapHomologicalComplex _).obj P.complex` to `F.obj X`. -/
noncomputable def fromLeftDerivedZero' {X : C}
    (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    ((F.mapHomologicalComplex _).obj P.complex).opcycles 0 ⟶ F.obj X :=
  HomologicalComplex.descOpcycles _ (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.67927, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ F.map (HomologicalComplex.d P.complex 1 0) ≫ F.map (HomologicalComplex.Hom.f P.π 0) = 0

Next tactic:
rw [← F.map_comp, complex_d_comp_π_f_zero, F.map_zero]
@[reassoc (attr := simp)]
lemma pOpcycles_comp_fromLeftDerivedZero' {X : C}
    (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    HomologicalComplex.pOpcycles _ _ ≫ P.fromLeftDerivedZero' F = 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✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ HomologicalComplex.pOpcycles ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫
      fromLeftDerivedZero' P F =
    F.map (HomologicalComplex.Hom.f P.π 0)

Next tactic:
simp [fromLeftDerivedZero']
@[reassoc]
lemma fromLeftDerivedZero'_naturality {X Y : C} (f : X ⟶ Y)
    (P : ProjectiveResolution X) (Q : ProjectiveResolution Y)
    (φ : P.complex ⟶ Q.complex) (comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f)
    (F : C ⥤ D) [F.Additive] :
    HomologicalComplex.opcyclesMap ((F.mapHomologicalComplex _).map φ) 0 ≫
        Q.fromLeftDerivedZero' F = P.fromLeftDerivedZero' F ≫ F.map f := 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✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X Y : C
f : X ⟶ Y
P : ProjectiveResolution X
Q : ProjectiveResolution Y
φ : P.complex ⟶ Q.complex
comm : HomologicalComplex.Hom.f φ 0 ≫ HomologicalComplex.Hom.f Q.π 0 = HomologicalComplex.Hom.f P.π 0 ≫ f
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ HomologicalComplex.opcyclesMap ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).map φ) 0 ≫
      fromLeftDerivedZero' Q F =
    fromLeftDerivedZero' P F ≫ F.map f

Next tactic:
simp only [← cancel_epi (HomologicalComplex.pOpcycles _ _), ← F.map_comp, comm,
    HomologicalComplex.p_opcyclesMap_assoc, Functor.mapHomologicalComplex_map_f,
    pOpcycles_comp_fromLeftDerivedZero', pOpcycles_comp_fromLeftDerivedZero'_assoc]
instance (F : C ⥤ D) [F.Additive] (X : C) [Projective X] :
    IsIso ((ProjectiveResolution.self X).fromLeftDerivedZero' F) := by
  

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

Next tactic:
dsimp [ProjectiveResolution.fromLeftDerivedZero']
instance (F : C ⥤ D) [F.Additive] (X : C) [Projective X] :
    IsIso ((ProjectiveResolution.self X).fromLeftDerivedZero' F) := by
  dsimp [ProjectiveResolution.fromLeftDerivedZero']
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.85060, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Projective X
⊢ IsIso
    (HomologicalComplex.descOpcycles
      ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((ChainComplex.single₀ C).obj X)) (F.map (𝟙 X)) 1
      fromLeftDerivedZero'.proof_2
      (_ :
        HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj (self X).complex) 1 0 ≫
            F.map (HomologicalComplex.Hom.f (self X).π 0) =
          0))

Next tactic:
rw [ChainComplex.isIso_descOpcycles_iff]
instance (F : C ⥤ D) [F.Additive] (X : C) [Projective X] :
    IsIso ((ProjectiveResolution.self X).fromLeftDerivedZero' F) := by
  dsimp [ProjectiveResolution.fromLeftDerivedZero']
  rw [ChainComplex.isIso_descOpcycles_iff]
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.85060, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Projective X
⊢ ShortComplex.Exact
      (ShortComplex.mk
        (HomologicalComplex.d
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((ChainComplex.single₀ C).obj X)) 1 0)
        (F.map (𝟙 X))
        (_ :
          HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj (self X).complex) 1 0 ≫
              F.map (HomologicalComplex.Hom.f (self X).π 0) =
            0)) ∧
    Epi (F.map (𝟙 X))

Next tactic:
refine' ⟨ShortComplex.Splitting.exact _, inferInstance⟩
instance (F : C ⥤ D) [F.Additive] (X : C) [Projective X] :
    IsIso ((ProjectiveResolution.self X).fromLeftDerivedZero' F) := by
  dsimp [ProjectiveResolution.fromLeftDerivedZero']
  rw [ChainComplex.isIso_descOpcycles_iff]
  refine' ⟨ShortComplex.Splitting.exact _, inferInstance⟩
  

Proof state:
C : Type u
inst✝⁶ : Category.{v, u} C
D : Type u_1
inst✝⁵ : Category.{?u.85060, u_1} D
inst✝⁴ : Abelian C
inst✝³ : HasProjectiveResolutions C
inst✝² : Abelian D
F : C ⥤ D
inst✝¹ : Functor.Additive F
X : C
inst✝ : Projective X
⊢ ShortComplex.Splitting
    (ShortComplex.mk
      (HomologicalComplex.d
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((ChainComplex.single₀ C).obj X)) 1 0)
      (F.map (𝟙 X))
      (_ :
        HomologicalComplex.d ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj (self X).complex) 1 0 ≫
            F.map (HomologicalComplex.Hom.f (self X).π 0) =
          0))

Next tactic:
exact
    { r := 0
      s := 𝟙 _
      f_r := (F.map_isZero (isZero_zero _)).eq_of_src _ _ }
/-- The natural transformation `F.leftDerived 0 ⟶ F`. -/
noncomputable def Functor.fromLeftDerivedZero (F : C ⥤ D) [F.Additive] :
    F.leftDerived 0 ⟶ F where
  app X := (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app _ ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫ (projectiveResolution X).fromLeftDerivedZero' F
  naturality {X Y} f := by
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.96538, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ (leftDerived F 0).map f ≫
      (fun X =>
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
              ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
            (ChainComplex.isoHomologyι₀
                  ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as)).hom ≫
              ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution X) F)
        Y =
    (fun X =>
          (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
              ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
            (ChainComplex.isoHomologyι₀
                  ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as)).hom ≫
              ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution X) F)
        X ≫
      F.map f

Next tactic:
dsimp [leftDerived]
/-- The natural transformation `F.leftDerived 0 ⟶ F`. -/
noncomputable def Functor.fromLeftDerivedZero (F : C ⥤ D) [F.Additive] :
    F.leftDerived 0 ⟶ F where
  app X := (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app _ ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫ (projectiveResolution X).fromLeftDerivedZero' F
  naturality {X Y} f := by
    dsimp [leftDerived]
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.96538, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map ((leftDerivedToHomotopyCategory F).map f) ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj Y).as) ≫
        HomologicalComplex.homologyι
            ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj Y).as) 0 ≫
          ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution Y) F =
    ((HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
        HomologicalComplex.homologyι
            ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) 0 ≫
          ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution X) F) ≫
      F.map f

Next tactic:
rw [assoc, assoc, ← ProjectiveResolution.fromLeftDerivedZero'_naturality f
      (projectiveResolution X) (projectiveResolution Y)
      (ProjectiveResolution.lift f _ _) (by simp),
      ← HomologicalComplex.homologyι_naturality_assoc]
/-- The natural transformation `F.leftDerived 0 ⟶ F`. -/
noncomputable def Functor.fromLeftDerivedZero (F : C ⥤ D) [F.Additive] :
    F.leftDerived 0 ⟶ F where
  app X := (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app _ ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫ (projectiveResolution X).fromLeftDerivedZero' F
  naturality {X Y} f := by
    dsimp [leftDerived]
    rw [assoc, assoc, ← ProjectiveResolution.fromLeftDerivedZero'_naturality f
      (projectiveResolution X) (projectiveResolution Y)
      (ProjectiveResolution.lift f _ _) (by 

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.96538, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ HomologicalComplex.Hom.f (ProjectiveResolution.lift f (projectiveResolution X) (projectiveResolution Y)) 0 ≫
      HomologicalComplex.Hom.f (projectiveResolution Y).π 0 =
    HomologicalComplex.Hom.f (projectiveResolution X).π 0 ≫ f

Next tactic:
simp
/-- The natural transformation `F.leftDerived 0 ⟶ F`. -/
noncomputable def Functor.fromLeftDerivedZero (F : C ⥤ D) [F.Additive] :
    F.leftDerived 0 ⟶ F where
  app X := (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app _ ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫ (projectiveResolution X).fromLeftDerivedZero' F
  naturality {X Y} f := by
    dsimp [leftDerived]
    rw [assoc, assoc, ← ProjectiveResolution.fromLeftDerivedZero'_naturality f
      (projectiveResolution X) (projectiveResolution Y)
      (ProjectiveResolution.lift f _ _) (by simp),
      ← HomologicalComplex.homologyι_naturality_assoc]
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.96538, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map ((leftDerivedToHomotopyCategory F).map f) ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj Y).as) ≫
        HomologicalComplex.homologyι
            ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj Y).as) 0 ≫
          ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution Y) F =
    (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
        ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
      HomologicalComplex.homologyMap
          ((mapHomologicalComplex F (ComplexShape.down ℕ)).map
            (ProjectiveResolution.lift f (projectiveResolution X) (projectiveResolution Y)))
          0 ≫
        HomologicalComplex.homologyι
            ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj (projectiveResolution Y).complex) 0 ≫
          ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution Y) F

Next tactic:
erw [← NatTrans.naturality_assoc]
/-- The natural transformation `F.leftDerived 0 ⟶ F`. -/
noncomputable def Functor.fromLeftDerivedZero (F : C ⥤ D) [F.Additive] :
    F.leftDerived 0 ⟶ F where
  app X := (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app _ ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫ (projectiveResolution X).fromLeftDerivedZero' F
  naturality {X Y} f := by
    dsimp [leftDerived]
    rw [assoc, assoc, ← ProjectiveResolution.fromLeftDerivedZero'_naturality f
      (projectiveResolution X) (projectiveResolution Y)
      (ProjectiveResolution.lift f _ _) (by simp),
      ← HomologicalComplex.homologyι_naturality_assoc]
    erw [← NatTrans.naturality_assoc]
    

Proof state:
C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u_1
inst✝⁴ : Category.{?u.96538, u_1} D
inst✝³ : Abelian C
inst✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
F : C ⥤ D
inst✝ : Additive F
X Y : C
f : X ⟶ Y
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map ((leftDerivedToHomotopyCategory F).map f) ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj Y).as) ≫
        HomologicalComplex.homologyι
            ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj Y).as) 0 ≫
          ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution Y) F =
    (HomotopyCategory.quotient D (ComplexShape.down ℕ) ⋙ HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map
        ((mapHomologicalComplex F (ComplexShape.down ℕ)).map
          (ProjectiveResolution.lift f (projectiveResolution X) (projectiveResolution Y))) ≫
      (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj (projectiveResolution Y).complex) ≫
        HomologicalComplex.homologyι
            ((mapHomologicalComplex F (ComplexShape.down ℕ)).obj (projectiveResolution Y).complex) 0 ≫
          ProjectiveResolution.fromLeftDerivedZero' (projectiveResolution Y) F

Next tactic:
rfl
lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F := 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✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ (Functor.fromLeftDerivedZero F).app X =
    (isoLeftDerivedObj P F 0).hom ≫
      (ChainComplex.isoHomologyι₀ ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)).hom ≫
        fromLeftDerivedZero' P F

Next tactic:
dsimp [Functor.fromLeftDerivedZero, isoLeftDerivedObj]
lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F := by
  dsimp [Functor.fromLeftDerivedZero, isoLeftDerivedObj]
  

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✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
        ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) ≫
      HomologicalComplex.homologyι
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj ((projectiveResolutions C).obj X).as) 0 ≫
        fromLeftDerivedZero' (projectiveResolution X) F =
    ((HomotopyCategory.homologyFunctor D (ComplexShape.down ℕ) 0).map (isoLeftDerivedToHomotopyCategoryObj P F).hom ≫
        (HomotopyCategory.homologyFunctorFactors D (ComplexShape.down ℕ) 0).hom.app
          ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex)) ≫
      HomologicalComplex.homologyι ((Functor.mapHomologicalComplex F (ComplexShape.down ℕ)).obj P.complex) 0 ≫
        fromLeftDerivedZero' P F

Next tactic:
have h₁ := ProjectiveResolution.fromLeftDerivedZero'_naturality
    (𝟙 X) P (projectiveResolution X) (lift (𝟙 X) _ _) (by simp) F
lemma ProjectiveResolution.fromLeftDerivedZero_eq
    {X : C} (P : ProjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.fromLeftDerivedZero.app X = (P.isoLeftDerivedObj F 0).hom ≫
      (ChainComplex.isoHomologyι₀ _).hom ≫
        P.fromLeftDerivedZero' F := by
  dsimp [Functor.fromLeftDerivedZero, isoLeftDerivedObj]
  have h₁ := ProjectiveResolution.fromLeftDerivedZero'_naturality
    (𝟙 X) P (projectiveResolution X) (lift (𝟙 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✝² : HasProjectiveResolutions C
inst✝¹ : Abelian D
X : C
P : ProjectiveResolution X
F : C ⥤ D
inst✝ : Functor.Additive F
⊢ HomologicalComplex.Hom.f (lift (𝟙 X) P (projectiveResolution X)) 0 ≫
      HomologicalComplex.Hom.f (projectiveResolution X).π 0 =
    HomologicalComplex.Hom.f P.π 0 ≫ 𝟙 X

Next tactic:
simp