Theorem: CategoryTheory.InjectiveResolution.exact_ofCocomplex
File: Mathlib/CategoryTheory/Abelian/InjectiveResolution.lean

tactic: simp
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
Z : C
n : ℕ
⊢ Exact (HomologicalComplex.d (ofCocomplex Z) 0 (0 + 1)) (HomologicalComplex.d (ofCocomplex Z) (0 + 1) (0 + 2))

tactic: apply exact_f_d
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
Z : C
n : ℕ
⊢ Exact
    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))
        (d (d (Injective.ι Z)))
        (_ :
          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫
              {
                    fst :=
                      syzygies
                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := under Z,
                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                        snd :=
                          (_ :
                            { fst := under Z,
                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫
                                d
                                  { fst := under Z,
                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =
                              0) } }.snd.fst =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })
        0).d₀
    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))
        (d (d (Injective.ι Z)))
        (_ :
          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫
              {
                    fst :=
                      syzygies
                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := under Z,
                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                        snd :=
                          (_ :
                            { fst := under Z,
                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫
                                d
                                  { fst := under Z,
                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =
                              0) } }.snd.fst =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })
        (0 + 1)).d₀

tactic: simp only [ofCocomplex_X, ComplexShape.up_Rel, not_true, ofCocomplex_d,
  eqToHom_refl, Category.comp_id, dite_eq_ite, ite_true]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
Z : C
n m : ℕ
⊢ Exact (HomologicalComplex.d (ofCocomplex Z) (m + 1) (m + 1 + 1))
    (HomologicalComplex.d (ofCocomplex Z) (m + 1 + 1) (m + 1 + 2))

tactic: erw [if_pos (c := m + 1 + 1 + 1 = m + 2 + 1) rfl]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
Z : C
n m : ℕ
⊢ Exact
    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))
        (d (d (Injective.ι Z)))
        (_ :
          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫
              {
                    fst :=
                      syzygies
                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := under Z,
                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                        snd :=
                          (_ :
                            { fst := under Z,
                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫
                                d
                                  { fst := under Z,
                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =
                              0) } }.snd.fst =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })
        (m + 1)).d₀
    (if m + 1 + 1 + 1 = m + 1 + 2 then
      (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))
          (d (d (Injective.ι Z)))
          (_ :
            { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫
                {
                      fst :=
                        syzygies
                          { fst := under Z,
                                snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                      snd :=
                        {
                          fst :=
                            d
                              { fst := under Z,
                                    snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                          snd :=
                            (_ :
                              { fst := under Z,
                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫
                                  d
                                    { fst := under Z,
                                          snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =
                                0) } }.snd.fst =
              0)
          (fun t =>
            { fst := syzygies t.snd.snd.snd.snd.fst,
              snd :=
                { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })
          (m + 1 + 1)).d₀
    else 0)

tactic: apply exact_f_d
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
inst✝ : EnoughInjectives C
Z : C
n m : ℕ
⊢ Exact
    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))
        (d (d (Injective.ι Z)))
        (_ :
          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫
              {
                    fst :=
                      syzygies
                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := under Z,
                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                        snd :=
                          (_ :
                            { fst := under Z,
                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫
                                d
                                  { fst := under Z,
                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =
                              0) } }.snd.fst =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })
        (m + 1)).d₀
    (CochainComplex.mkAux (under Z) (syzygies (Injective.ι Z)) (syzygies (d (Injective.ι Z))) (d (Injective.ι Z))
        (d (d (Injective.ι Z)))
        (_ :
          { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.snd.snd ≫
              {
                    fst :=
                      syzygies
                        { fst := under Z, snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := under Z,
                                  snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd,
                        snd :=
                          (_ :
                            { fst := under Z,
                                      snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd ≫
                                d
                                  { fst := under Z,
                                        snd := { fst := syzygies (Injective.ι Z), snd := d (Injective.ι Z) } }.2.snd =
                              0) } }.snd.fst =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : t.snd.snd.snd.snd.fst ≫ d t.snd.snd.snd.snd.fst = 0) } })
        (m + 1 + 1)).d₀