Theorem: CategoryTheory.ProjectiveResolution.exact_ofComplex
File: Mathlib/CategoryTheory/Abelian/Projective.lean

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

tactic: apply exact_d_f
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
inst✝ : EnoughProjectives C
Z : C
n : ℕ
⊢ Exact
    (ChainComplex.mkAux (over Z) (syzygies (Projective.π Z)) (syzygies (d (Projective.π Z))) (d (Projective.π Z))
        (d (d (Projective.π Z)))
        (_ :
          {
                    fst :=
                      syzygies
                        { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := over Z,
                                  snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                        snd :=
                          (_ :
                            d
                                  { fst := over Z,
                                        snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd ≫
                                { fst := over Z,
                                      snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd =
                              0) } }.snd.fst ≫
              { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.snd.snd =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : d t.snd.snd.snd.snd.fst ≫ t.snd.snd.snd.snd.fst = 0) } })
        (0 + 1)).d₀
    (ChainComplex.mkAux (over Z) (syzygies (Projective.π Z)) (syzygies (d (Projective.π Z))) (d (Projective.π Z))
        (d (d (Projective.π Z)))
        (_ :
          {
                    fst :=
                      syzygies
                        { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := over Z,
                                  snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                        snd :=
                          (_ :
                            d
                                  { fst := over Z,
                                        snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd ≫
                                { fst := over Z,
                                      snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd =
                              0) } }.snd.fst ≫
              { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.snd.snd =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : d t.snd.snd.snd.snd.fst ≫ t.snd.snd.snd.snd.fst = 0) } })
        0).d₀

tactic: simp only [ofComplex_X, ComplexShape.down_Rel, ofComplex_d, eqToHom_refl,
  Category.id_comp, dite_eq_ite, not_true, ite_true]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
inst✝ : EnoughProjectives C
Z : C
n m : ℕ
⊢ Exact (HomologicalComplex.d (ofComplex Z) (m + 1 + 2) (m + 1 + 1))
    (HomologicalComplex.d (ofComplex Z) (m + 1 + 1) (m + 1))

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✝ : EnoughProjectives C
Z : C
n m : ℕ
⊢ Exact
    (if m + 1 + 2 = m + 1 + 1 + 1 then
      (ChainComplex.mkAux (over Z) (syzygies (Projective.π Z)) (syzygies (d (Projective.π Z))) (d (Projective.π Z))
          (d (d (Projective.π Z)))
          (_ :
            {
                      fst :=
                        syzygies
                          { fst := over Z,
                                snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                      snd :=
                        {
                          fst :=
                            d
                              { fst := over Z,
                                    snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                          snd :=
                            (_ :
                              d
                                    { fst := over Z,
                                          snd :=
                                            { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd ≫
                                  { fst := over Z,
                                        snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd =
                                0) } }.snd.fst ≫
                { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.snd.snd =
              0)
          (fun t =>
            { fst := syzygies t.snd.snd.snd.snd.fst,
              snd :=
                { fst := d t.snd.snd.snd.snd.fst, snd := (_ : d t.snd.snd.snd.snd.fst ≫ t.snd.snd.snd.snd.fst = 0) } })
          (m + 1 + 1)).d₀
    else 0)
    (ChainComplex.mkAux (over Z) (syzygies (Projective.π Z)) (syzygies (d (Projective.π Z))) (d (Projective.π Z))
        (d (d (Projective.π Z)))
        (_ :
          {
                    fst :=
                      syzygies
                        { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := over Z,
                                  snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                        snd :=
                          (_ :
                            d
                                  { fst := over Z,
                                        snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd ≫
                                { fst := over Z,
                                      snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd =
                              0) } }.snd.fst ≫
              { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.snd.snd =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : d t.snd.snd.snd.snd.fst ≫ t.snd.snd.snd.snd.fst = 0) } })
        (m + 1)).d₀

tactic: apply exact_d_f
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Abelian C
inst✝ : EnoughProjectives C
Z : C
n m : ℕ
⊢ Exact
    (ChainComplex.mkAux (over Z) (syzygies (Projective.π Z)) (syzygies (d (Projective.π Z))) (d (Projective.π Z))
        (d (d (Projective.π Z)))
        (_ :
          {
                    fst :=
                      syzygies
                        { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := over Z,
                                  snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                        snd :=
                          (_ :
                            d
                                  { fst := over Z,
                                        snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd ≫
                                { fst := over Z,
                                      snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd =
                              0) } }.snd.fst ≫
              { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.snd.snd =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : d t.snd.snd.snd.snd.fst ≫ t.snd.snd.snd.snd.fst = 0) } })
        (m + 1 + 1)).d₀
    (ChainComplex.mkAux (over Z) (syzygies (Projective.π Z)) (syzygies (d (Projective.π Z))) (d (Projective.π Z))
        (d (d (Projective.π Z)))
        (_ :
          {
                    fst :=
                      syzygies
                        { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                    snd :=
                      {
                        fst :=
                          d
                            { fst := over Z,
                                  snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd,
                        snd :=
                          (_ :
                            d
                                  { fst := over Z,
                                        snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd ≫
                                { fst := over Z,
                                      snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.2.snd =
                              0) } }.snd.fst ≫
              { fst := over Z, snd := { fst := syzygies (Projective.π Z), snd := d (Projective.π Z) } }.snd.snd =
            0)
        (fun t =>
          { fst := syzygies t.snd.snd.snd.snd.fst,
            snd :=
              { fst := d t.snd.snd.snd.snd.fst, snd := (_ : d t.snd.snd.snd.snd.fst ≫ t.snd.snd.snd.snd.fst = 0) } })
        (m + 1)).d₀