File: Mathlib/CategoryTheory/Abelian/RightDerived.lean

full_name: CategoryTheory.Functor.rightDerivedToHomotopyCategory
code: /-- When `F : C ⥤ D` is an additive functor, this is
the functor `C ⥤ HomotopyCategory D (ComplexShape.up ℕ)` which
sends `X : C` to `F` applied to an injective resolution of `X`. -/
noncomputable def Functor.rightDerivedToHomotopyCategory (F : C ⥤ D) [F.Additive] :
    C ⥤ HomotopyCategory D (ComplexShape.up ℕ) 
goal: CategoryTheory.Functor C (HomotopyCategory D (ComplexShape.up ℕ))

full_name: CategoryTheory.InjectiveResolution.isoRightDerivedToHomotopyCategoryObj
code: /-- If `I : InjectiveResolution Z` and `F : C ⥤ D` is an additive functor, this is
an isomorphism between `F.rightDerivedToHomotopyCategory.obj X` and the complex
obtained by applying `F` to `I.cocomplex`. -/
noncomputable def InjectiveResolution.isoRightDerivedToHomotopyCategoryObj {X : C}
    (I : InjectiveResolution X) (F : C ⥤ D) [F.Additive] :
    F.rightDerivedToHomotopyCategory.obj X ≅
      (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).obj I.cocomplex 
goal: F.rightDerivedToHomotopyCategory.obj X ≅
  ((F.mapHomologicalComplex (ComplexShape.up ℕ)).comp (HomotopyCategory.quotient D (ComplexShape.up ℕ))).obj I.cocomplex

full_name: CategoryTheory.InjectiveResolution.isoRightDerivedToHomotopyCategoryObj_hom_naturality
code: @[reassoc]
lemma InjectiveResolution.isoRightDerivedToHomotopyCategoryObj_hom_naturality
    {X Y : C} (f : X ⟶ Y) (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0)
    (F : C ⥤ D) [F.Additive] :
    F.rightDerivedToHomotopyCategory.map f ≫ (J.isoRightDerivedToHomotopyCategoryObj F).hom =
      (I.isoRightDerivedToHomotopyCategoryObj F).hom ≫
        (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map φ 
goal: CategoryTheory.CategoryStruct.comp (F.rightDerivedToHomotopyCategory.map f)
    (J.isoRightDerivedToHomotopyCategoryObj F).hom =
  CategoryTheory.CategoryStruct.comp (I.isoRightDerivedToHomotopyCategoryObj F).hom
    (((F.mapHomologicalComplex (ComplexShape.up ℕ)).comp (HomotopyCategory.quotient D (ComplexShape.up ℕ))).map φ)

full_name: CategoryTheory.InjectiveResolution.isoRightDerivedToHomotopyCategoryObj_inv_naturality
code: @[reassoc]
lemma InjectiveResolution.isoRightDerivedToHomotopyCategoryObj_inv_naturality
    {X Y : C} (f : X ⟶ Y) (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0)
    (F : C ⥤ D) [F.Additive] :
    (I.isoRightDerivedToHomotopyCategoryObj F).inv ≫ F.rightDerivedToHomotopyCategory.map f =
      (F.mapHomologicalComplex _ ⋙ HomotopyCategory.quotient _ _).map φ ≫
        (J.isoRightDerivedToHomotopyCategoryObj F).inv 
goal: CategoryTheory.CategoryStruct.comp (I.isoRightDerivedToHomotopyCategoryObj F).inv
    (F.rightDerivedToHomotopyCategory.map f) =
  CategoryTheory.CategoryStruct.comp
    (((F.mapHomologicalComplex (ComplexShape.up ℕ)).comp (HomotopyCategory.quotient D (ComplexShape.up ℕ))).map φ)
    (J.isoRightDerivedToHomotopyCategoryObj F).inv

full_name: CategoryTheory.Functor.rightDerived
code: /-- The right derived functors of an additive functor. -/
noncomputable def Functor.rightDerived (F : C ⥤ D) [F.Additive] (n : ℕ) : C ⥤ D 
goal: CategoryTheory.Functor C D

full_name: CategoryTheory.InjectiveResolution.isoRightDerivedObj
code: /-- We can compute a right derived functor using a chosen injective resolution. -/
noncomputable def InjectiveResolution.isoRightDerivedObj {X : C} (I : InjectiveResolution X)
    (F : C ⥤ D) [F.Additive] (n : ℕ) :
    (F.rightDerived n).obj X ≅
      (HomologicalComplex.homologyFunctor D _ n).obj
        ((F.mapHomologicalComplex _).obj I.cocomplex) 
goal: (F.rightDerived n).obj X ≅
  (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n).obj
    ((F.mapHomologicalComplex (ComplexShape.up ℕ)).obj I.cocomplex)

full_name: CategoryTheory.InjectiveResolution.isoRightDerivedObj_hom_naturality
code: @[reassoc]
lemma InjectiveResolution.isoRightDerivedObj_hom_naturality
    {X Y : C} (f : X ⟶ Y) (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0)
    (F : C ⥤ D) [F.Additive] (n : ℕ) :
    (F.rightDerived n).map f ≫ (J.isoRightDerivedObj F n).hom =
      (I.isoRightDerivedObj F n).hom ≫
        (F.mapHomologicalComplex _ ⋙ HomologicalComplex.homologyFunctor _ _ n).map φ 
goal: CategoryTheory.CategoryStruct.comp ((F.rightDerived n).map f) (J.isoRightDerivedObj F n).hom =
  CategoryTheory.CategoryStruct.comp (I.isoRightDerivedObj F n).hom
    (((F.mapHomologicalComplex (ComplexShape.up ℕ)).comp
          (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n)).map
      φ)

full_name: CategoryTheory.InjectiveResolution.isoRightDerivedObj_inv_naturality
code: @[reassoc]
lemma InjectiveResolution.isoRightDerivedObj_inv_naturality
    {X Y : C} (f : X ⟶ Y) (I : InjectiveResolution X) (J : InjectiveResolution Y)
    (φ : I.cocomplex ⟶ J.cocomplex) (comm : I.ι.f 0 ≫ φ.f 0 = f ≫ J.ι.f 0)
    (F : C ⥤ D) [F.Additive] (n : ℕ) :
    (I.isoRightDerivedObj F n).inv ≫ (F.rightDerived n).map f =
        (F.mapHomologicalComplex _ ⋙ HomologicalComplex.homologyFunctor _ _ n).map φ ≫
          (J.isoRightDerivedObj F n).inv 
goal: CategoryTheory.CategoryStruct.comp (I.isoRightDerivedObj F n).inv ((F.rightDerived n).map f) =
  CategoryTheory.CategoryStruct.comp
    (((F.mapHomologicalComplex (ComplexShape.up ℕ)).comp
          (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n)).map
      φ)
    (J.isoRightDerivedObj F n).inv

full_name: CategoryTheory.Functor.isZero_rightDerived_obj_injective_succ
code: /-- The higher derived functors vanish on injective objects. -/
lemma Functor.isZero_rightDerived_obj_injective_succ
    (F : C ⥤ D) [F.Additive] (n : ℕ) (X : C) [Injective X] :
    IsZero ((F.rightDerived (n+1)).obj X) 
goal: CategoryTheory.Limits.IsZero ((F.rightDerived (n + 1)).obj X)

full_name: CategoryTheory.Functor.rightDerived_map_eq
code: /-- We can compute a right derived functor on a morphism using a descent of that morphism
to a cochain map between chosen injective resolutions.
-/
theorem Functor.rightDerived_map_eq (F : C ⥤ D) [F.Additive] (n : ℕ) {X Y : C} (f : X ⟶ Y)
    {P : InjectiveResolution X} {Q : InjectiveResolution Y} (g : P.cocomplex ⟶ Q.cocomplex)
    (w : P.ι ≫ g = (CochainComplex.single₀ C).map f ≫ Q.ι) :
    (F.rightDerived n).map f =
      (P.isoRightDerivedObj F n).hom ≫
        (F.mapHomologicalComplex _ ⋙ HomologicalComplex.homologyFunctor _ _ n).map g ≫
          (Q.isoRightDerivedObj F n).inv 
goal: (F.rightDerived n).map f =
  CategoryTheory.CategoryStruct.comp (P.isoRightDerivedObj F n).hom
    (CategoryTheory.CategoryStruct.comp
      (((F.mapHomologicalComplex (ComplexShape.up ℕ)).comp
            (HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n)).map
        g)
      (Q.isoRightDerivedObj F n).inv)

full_name: CategoryTheory.NatTrans.rightDerivedToHomotopyCategory
code: /-- The natural transformation
`F.rightDerivedToHomotopyCategory ⟶ G.rightDerivedToHomotopyCategory` induced by
a natural transformation `F ⟶ G` between additive functors. -/
noncomputable def NatTrans.rightDerivedToHomotopyCategory
    {F G : C ⥤ D} [F.Additive] [G.Additive] (α : F ⟶ G) :
    F.rightDerivedToHomotopyCategory ⟶ G.rightDerivedToHomotopyCategory 
goal: F.rightDerivedToHomotopyCategory ⟶ G.rightDerivedToHomotopyCategory

full_name: CategoryTheory.InjectiveResolution.rightDerivedToHomotopyCategory_app_eq
code: lemma InjectiveResolution.rightDerivedToHomotopyCategory_app_eq
    {F G : C ⥤ D} [F.Additive] [G.Additive] (α : F ⟶ G) {X : C} (P : InjectiveResolution X) :
    (NatTrans.rightDerivedToHomotopyCategory α).app X =
      (P.isoRightDerivedToHomotopyCategoryObj F).hom ≫
        (HomotopyCategory.quotient _ _).map
          ((NatTrans.mapHomologicalComplex α _).app P.cocomplex) ≫
          (P.isoRightDerivedToHomotopyCategoryObj G).inv 
goal: (CategoryTheory.NatTrans.rightDerivedToHomotopyCategory α).app X =
  CategoryTheory.CategoryStruct.comp (P.isoRightDerivedToHomotopyCategoryObj F).hom
    (CategoryTheory.CategoryStruct.comp
      ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
        ((CategoryTheory.NatTrans.mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex))
      (P.isoRightDerivedToHomotopyCategoryObj G).inv)

full_name: CategoryTheory.NatTrans.rightDerivedToHomotopyCategory_id
code: @[simp]
lemma NatTrans.rightDerivedToHomotopyCategory_id (F : C ⥤ D) [F.Additive] :
    NatTrans.rightDerivedToHomotopyCategory (𝟙 F) = 𝟙 _ 
goal: CategoryTheory.NatTrans.rightDerivedToHomotopyCategory (CategoryTheory.CategoryStruct.id F) =
  CategoryTheory.CategoryStruct.id F.rightDerivedToHomotopyCategory

full_name: CategoryTheory.NatTrans.rightDerivedToHomotopyCategory_comp
code: @[simp, reassoc]
lemma NatTrans.rightDerivedToHomotopyCategory_comp {F G H : C ⥤ D} (α : F ⟶ G) (β : G ⟶ H)
    [F.Additive] [G.Additive] [H.Additive] :
    NatTrans.rightDerivedToHomotopyCategory (α ≫ β) =
      NatTrans.rightDerivedToHomotopyCategory α ≫
        NatTrans.rightDerivedToHomotopyCategory β 
goal: CategoryTheory.NatTrans.rightDerivedToHomotopyCategory (CategoryTheory.CategoryStruct.comp α β) =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.NatTrans.rightDerivedToHomotopyCategory α)
    (CategoryTheory.NatTrans.rightDerivedToHomotopyCategory β)

full_name: CategoryTheory.NatTrans.rightDerived
code: /-- The natural transformation between right-derived functors
induced by a natural transformation. -/
noncomputable def NatTrans.rightDerived
    {F G : C ⥤ D} [F.Additive] [G.Additive] (α : F ⟶ G) (n : ℕ) :
    F.rightDerived n ⟶ G.rightDerived n 
goal: F.rightDerived n ⟶ G.rightDerived n

full_name: CategoryTheory.NatTrans.rightDerived_id
code: @[simp]
theorem NatTrans.rightDerived_id (F : C ⥤ D) [F.Additive] (n : ℕ) :
    NatTrans.rightDerived (𝟙 F) n = 𝟙 (F.rightDerived n) 
goal: CategoryTheory.NatTrans.rightDerived (CategoryTheory.CategoryStruct.id F) n =
  CategoryTheory.CategoryStruct.id (F.rightDerived n)

full_name: CategoryTheory.NatTrans.rightDerived_comp
code: @[simp, reassoc]
theorem NatTrans.rightDerived_comp {F G H : C ⥤ D} [F.Additive] [G.Additive] [H.Additive]
    (α : F ⟶ G) (β : G ⟶ H) (n : ℕ) :
    NatTrans.rightDerived (α ≫ β) n = NatTrans.rightDerived α n ≫ NatTrans.rightDerived β n 
goal: CategoryTheory.NatTrans.rightDerived (CategoryTheory.CategoryStruct.comp α β) n =
  CategoryTheory.CategoryStruct.comp (CategoryTheory.NatTrans.rightDerived α n)
    (CategoryTheory.NatTrans.rightDerived β n)

full_name: CategoryTheory.InjectiveResolution.rightDerived_app_eq
code: /-- 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 
goal: (CategoryTheory.NatTrans.rightDerived α n).app X =
  CategoryTheory.CategoryStruct.comp (P.isoRightDerivedObj F n).hom
    (CategoryTheory.CategoryStruct.comp
      ((HomologicalComplex.homologyFunctor D (ComplexShape.up ℕ) n).map
        ((CategoryTheory.NatTrans.mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex))
      (P.isoRightDerivedObj G n).inv)

full_name: CategoryTheory.InjectiveResolution.toRightDerivedZero'
code: /-- 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 
goal: F.obj X ⟶ ((F.mapHomologicalComplex (ComplexShape.up ℕ)).obj P.cocomplex).cycles 0

full_name: CategoryTheory.InjectiveResolution.toRightDerivedZero'_comp_iCycles
code: @[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) 
goal: CategoryTheory.CategoryStruct.comp (P.toRightDerivedZero' F)
    (((F.mapHomologicalComplex (ComplexShape.up ℕ)).obj P.cocomplex).iCycles 0) =
  F.map (P.ι.f 0)

full_name: CategoryTheory.InjectiveResolution.toRightDerivedZero'_naturality
code: @[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 
goal: CategoryTheory.CategoryStruct.comp (F.map f) (Q.toRightDerivedZero' F) =
  CategoryTheory.CategoryStruct.comp (P.toRightDerivedZero' F)
    (HomologicalComplex.cyclesMap ((F.mapHomologicalComplex (ComplexShape.up ℕ)).map φ) 0)

full_name: CategoryTheory.InjectiveResolution.instIsIsoToRightDerivedZero'Self
code: instance (F : C ⥤ D) [F.Additive] (X : C) [Injective X] :
    IsIso ((InjectiveResolution.self X).toRightDerivedZero' F) 
goal: CategoryTheory.IsIso ((CategoryTheory.InjectiveResolution.self X).toRightDerivedZero' F)

full_name: CategoryTheory.Functor.toRightDerivedZero
code: /-- The natural transformation `F ⟶ F.rightDerived 0`. -/
noncomputable def Functor.toRightDerivedZero (F : C ⥤ D) [F.Additive] :
    F ⟶ F.rightDerived 0 
goal: F ⟶ F.rightDerived 0

full_name: CategoryTheory.InjectiveResolution.toRightDerivedZero_eq
code: 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 
goal: F.toRightDerivedZero.app X =
  CategoryTheory.CategoryStruct.comp (I.toRightDerivedZero' F)
    (CategoryTheory.CategoryStruct.comp
      (CochainComplex.isoHomologyπ₀ ((F.mapHomologicalComplex (ComplexShape.up ℕ)).obj I.cocomplex)).hom
      (I.isoRightDerivedObj F 0).inv)

full_name: CategoryTheory.instIsIsoAppToRightDerivedZeroOfInjective
code: instance (F : C ⥤ D) [F.Additive] (X : C) [Injective X] :
    IsIso (F.toRightDerivedZero.app X) 
goal: CategoryTheory.IsIso (F.toRightDerivedZero.app X)

full_name: CategoryTheory.instIsIsoToRightDerivedZero'
code: instance {X : C} (P : InjectiveResolution X) :
    IsIso (P.toRightDerivedZero' F) 
goal: CategoryTheory.IsIso (P.toRightDerivedZero' F)

full_name: CategoryTheory.instIsIsoAppToRightDerivedZero
code: instance (X : C) : IsIso (F.toRightDerivedZero.app X) 
goal: CategoryTheory.IsIso (F.toRightDerivedZero.app X)

full_name: CategoryTheory.instIsIsoFunctorToRightDerivedZero
code: instance : IsIso F.toRightDerivedZero 
goal: CategoryTheory.IsIso F.toRightDerivedZero

full_name: CategoryTheory.Functor.rightDerivedZeroIsoSelf_inv
code: /-- The canonical isomorphism `F.rightDerived 0 ≅ F` when `F` is left exact
(i.e. preserves finite limits). -/
@[simps! inv]
noncomputable def rightDerivedZeroIsoSelf : F.rightDerived 0 ≅ F 
goal: F.rightDerivedZeroIsoSelf.inv = F.toRightDerivedZero

full_name: CategoryTheory.Functor.rightDerivedZeroIsoSelf
code: /-- The canonical isomorphism `F.rightDerived 0 ≅ F` when `F` is left exact
(i.e. preserves finite limits). -/
@[simps! inv]
noncomputable def rightDerivedZeroIsoSelf : F.rightDerived 0 ≅ F 
goal: F.rightDerived 0 ≅ F

full_name: CategoryTheory.Functor.rightDerivedZeroIsoSelf_hom_inv_id
code: @[reassoc (attr := simp)]
lemma rightDerivedZeroIsoSelf_hom_inv_id :
    F.rightDerivedZeroIsoSelf.hom ≫ F.toRightDerivedZero = 𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp F.rightDerivedZeroIsoSelf.hom F.toRightDerivedZero =
  CategoryTheory.CategoryStruct.id (F.rightDerived 0)

full_name: CategoryTheory.Functor.rightDerivedZeroIsoSelf_inv_hom_id
code: @[reassoc (attr := simp)]
lemma rightDerivedZeroIsoSelf_inv_hom_id :
    F.toRightDerivedZero ≫ F.rightDerivedZeroIsoSelf.hom = 𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp F.toRightDerivedZero F.rightDerivedZeroIsoSelf.hom =
  CategoryTheory.CategoryStruct.id F

full_name: CategoryTheory.Functor.rightDerivedZeroIsoSelf_hom_inv_id_app
code: @[reassoc (attr := simp)]
lemma rightDerivedZeroIsoSelf_hom_inv_id_app (X : C) :
    F.rightDerivedZeroIsoSelf.hom.app X ≫ F.toRightDerivedZero.app X = 𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp (F.rightDerivedZeroIsoSelf.hom.app X) (F.toRightDerivedZero.app X) =
  CategoryTheory.CategoryStruct.id ((F.rightDerived 0).obj X)

full_name: CategoryTheory.Functor.rightDerivedZeroIsoSelf_inv_hom_id_app
code: @[reassoc (attr := simp)]
lemma rightDerivedZeroIsoSelf_inv_hom_id_app (X : C) :
    F.toRightDerivedZero.app X ≫ F.rightDerivedZeroIsoSelf.hom.app X = 𝟙 _ 
goal: CategoryTheory.CategoryStruct.comp (F.toRightDerivedZero.app X) (F.rightDerivedZeroIsoSelf.hom.app X) =
  CategoryTheory.CategoryStruct.id (F.obj X)