Theorem: CategoryTheory.NatTrans.rightDerived_eq
File: Mathlib/CategoryTheory/Abelian/RightDerived.lean

tactic: symm
state_before: C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ (rightDerived α n).app X =
    (Functor.rightDerivedObjIso F n P).hom ≫
      (homologyFunctor D (ComplexShape.up ℕ) n).map ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) ≫
        (Functor.rightDerivedObjIso G n P).inv

tactic: dsimp [NatTrans.rightDerived, Functor.rightDerivedObjIso]
state_before: C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ (Functor.rightDerivedObjIso F n P).hom ≫
      (homologyFunctor D (ComplexShape.up ℕ) n).map ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) ≫
        (Functor.rightDerivedObjIso G n P).inv =
    (rightDerived α n).app X

tactic: simp only [Category.comp_id, Category.id_comp]
state_before: C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ ((HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
          ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
            ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).map
              (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom)) ≫
        𝟙
          ((HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).obj
            ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).obj
              ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj P.cocomplex)))) ≫
      homology.map
          (_ :
            HomologicalComplex.dTo ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj P.cocomplex) n ≫
                HomologicalComplex.dFrom ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj P.cocomplex) n =
              0)
          (_ :
            HomologicalComplex.dTo ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).obj P.cocomplex) n ≫
                HomologicalComplex.dFrom ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).obj P.cocomplex) n =
              0)
          (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) n)
          (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) n)
          (_ :
            (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) n).right =
              (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) n).right) ≫
        𝟙 (HomologicalComplex.homology ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).obj P.cocomplex) n) ≫
          (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
            ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
              ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
                (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv)) =
    (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
      ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
        ((mapHomologicalComplex α (ComplexShape.up ℕ)).app ((injectiveResolutions C).obj X).as))

tactic: rw [← homologyFunctor_map, HomotopyCategory.homologyFunctor_map_factors]
state_before: C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
        ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
          ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).map
            (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom)) ≫
      homology.map
          (_ :
            HomologicalComplex.dTo ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj P.cocomplex) n ≫
                HomologicalComplex.dFrom ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).obj P.cocomplex) n =
              0)
          (_ :
            HomologicalComplex.dTo ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).obj P.cocomplex) n ≫
                HomologicalComplex.dFrom ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).obj P.cocomplex) n =
              0)
          (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) n)
          (HomologicalComplex.Hom.sqFrom ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) n)
          (_ :
            (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) n).right =
              (HomologicalComplex.Hom.sqTo ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex) n).right) ≫
        (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
          ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
            ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
              (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv)) =
    (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
      ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
        ((mapHomologicalComplex α (ComplexShape.up ℕ)).app ((injectiveResolutions C).obj X).as))

tactic: simp only [← Functor.map_comp]
state_before: C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
        ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
          ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).map
            (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom)) ≫
      (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
          ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
            ((mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex)) ≫
        (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
          ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
            ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
              (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv)) =
    (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
      ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
        ((mapHomologicalComplex α (ComplexShape.up ℕ)).app ((injectiveResolutions C).obj X).as))

tactic: congr 1
state_before: C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
      ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
        ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).map
            (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom ≫
          (mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex ≫
            (Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
              (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv)) =
    (HomotopyCategory.homologyFunctor D (ComplexShape.up ℕ) n).map
      ((HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
        ((mapHomologicalComplex α (ComplexShape.up ℕ)).app ((injectiveResolutions C).obj X).as))

tactic: apply HomotopyCategory.eq_of_homotopy
state_before: case e_a
C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ (HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
      ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).map
          (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom ≫
        (mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex ≫
          (Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
            (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv) =
    (HomotopyCategory.quotient D (ComplexShape.up ℕ)).map
      ((mapHomologicalComplex α (ComplexShape.up ℕ)).app ((injectiveResolutions C).obj X).as)

tactic: simp only [NatTrans.mapHomologicalComplex_naturality_assoc, ← Functor.map_comp]
state_before: case e_a.h
C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ Homotopy
    ((Functor.mapHomologicalComplex F (ComplexShape.up ℕ)).map
        (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom ≫
      (mapHomologicalComplex α (ComplexShape.up ℕ)).app P.cocomplex ≫
        (Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
          (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv)
    ((mapHomologicalComplex α (ComplexShape.up ℕ)).app ((injectiveResolutions C).obj X).as)

tactic: apply Homotopy.compLeftId
state_before: case e_a.h
C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ Homotopy
    ((mapHomologicalComplex α (ComplexShape.up ℕ)).app ((injectiveResolutions C).obj X).as ≫
      (Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
        ((InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom ≫
          (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv))
    ((mapHomologicalComplex α (ComplexShape.up ℕ)).app ((injectiveResolutions C).obj X).as)

tactic: rw [← Functor.map_id]
state_before: case e_a.h.h
C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ Homotopy
    ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
      ((InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom ≫
        (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv))
    (𝟙 ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).obj ((injectiveResolutions C).obj X).as))

tactic: apply Functor.mapHomotopy
state_before: case e_a.h.h
C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ Homotopy
    ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map
      ((InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom ≫
        (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv))
    ((Functor.mapHomologicalComplex G (ComplexShape.up ℕ)).map (𝟙 ((injectiveResolutions C).obj X).as))

tactic: apply HomotopyEquiv.homotopyHomInvId
state_before: case e_a.h.h.h
C : Type u
inst✝⁶ : Category C
D : Type u_2
inst✝⁵ : Category D
inst✝⁴ : Abelian C
inst✝³ : HasInjectiveResolutions C
inst✝² : Abelian D
F G : C ⥤ D
inst✝¹ : Functor.Additive F
inst✝ : Functor.Additive G
α : F ⟶ G
n : ℕ
X : C
P : InjectiveResolution X
⊢ Homotopy
    ((InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).hom ≫
      (InjectiveResolution.homotopyEquiv (Nonempty.some (_ : Nonempty (InjectiveResolution X))) P).inv)
    (𝟙 ((injectiveResolutions C).obj X).as)