Theorem: AlgebraicTopology.DoldKan.compatibility_N₂_N₁_karoubi
File: Mathlib/AlgebraicTopology/DoldKan/NReflectsIso.lean

tactic: refine CategoryTheory.Functor.ext (fun P => ?_) fun P Q f => ?_
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
⊢ N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor =
    karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
      N₁ ⋙
        (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
          (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)
state_after: case refine_1
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
⊢ (N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P =
    (karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
          N₁ ⋙
            (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
              (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
      P

case refine_2
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P Q : Karoubi (SimplicialObject C)
f : P ⟶ Q
⊢ (N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).map f =
    eqToHom ⋯ ≫
      (karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
              N₁ ⋙
                (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                  (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).map
          f ≫
        eqToHom ⋯

tactic: refine HomologicalComplex.ext ?_ ?_
state_before: case refine_1
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
⊢ (N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P =
    (karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
          N₁ ⋙
            (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
              (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
      P
state_after: case refine_1.refine_1
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
⊢ ((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).X =
    ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
            N₁ ⋙
              (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
        P).X

case refine_1.refine_2
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
⊢ ∀ (i j : ℕ),
    (ComplexShape.down ℕ).Rel i j →
      ((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).d i j ≫ eqToHom ⋯ =
        eqToHom ⋯ ≫
          ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                    N₁ ⋙
                      (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                        (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
                P).d
            i j

tactic: ext n
state_before: case refine_1.refine_1
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
⊢ ((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).X =
    ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
            N₁ ⋙
              (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
        P).X
state_after: case refine_1.refine_1.h.h_X
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).X n).X =
    (((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                N₁ ⋙
                  (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                    (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
            P).X
        n).X

case refine_1.refine_1.h.h_p
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).X n).p ≫ eqToHom ?refine_1.refine_1.h.h_X =
    eqToHom ?refine_1.refine_1.h.h_X ≫
      (((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                  N₁ ⋙
                    (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                      (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
              P).X
          n).p

tactic: rfl
state_before: case refine_1.refine_1.h.h_X
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).X n).X =
    (((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                N₁ ⋙
                  (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                    (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
            P).X
        n).X
state_after: no goals

tactic: dsimp
state_before: case refine_1.refine_1.h.h_p
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).X n).p ≫ eqToHom ⋯ =
    eqToHom ⋯ ≫
      (((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                  N₁ ⋙
                    (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                      (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
              P).X
          n).p
state_after: case refine_1.refine_1.h.h_p
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ (PInfty.f n ≫ P.p.app { unop := [n] }) ≫ 𝟙 (P.X _[n]) = 𝟙 (P.X _[n]) ≫ (PInfty.f n).f

tactic: simp only [karoubi_PInfty_f, comp_id, PInfty_f_naturality, id_comp, eqToHom_refl]
state_before: case refine_1.refine_1.h.h_p
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ (PInfty.f n ≫ P.p.app { unop := [n] }) ≫ 𝟙 (P.X _[n]) = 𝟙 (P.X _[n]) ≫ (PInfty.f n).f
state_after: no goals

tactic: rintro _ n (rfl : n + 1 = _)
state_before: case refine_1.refine_2
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
⊢ ∀ (i j : ℕ),
    (ComplexShape.down ℕ).Rel i j →
      ((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).d i j ≫ eqToHom ⋯ =
        eqToHom ⋯ ≫
          ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                    N₁ ⋙
                      (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                        (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
                P).d
            i j
state_after: case refine_1.refine_2
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ ((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).d (n + 1) n ≫ eqToHom ⋯ =
    eqToHom ⋯ ≫
      ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                N₁ ⋙
                  (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                    (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
            P).d
        (n + 1) n

tactic: ext
state_before: case refine_1.refine_2
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ ((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).d (n + 1) n ≫ eqToHom ⋯ =
    eqToHom ⋯ ≫
      ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                N₁ ⋙
                  (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                    (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
            P).d
        (n + 1) n
state_after: case refine_1.refine_2.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).d (n + 1) n ≫ eqToHom ⋯).f =
    (eqToHom ⋯ ≫
        ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                  N₁ ⋙
                    (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                      (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
              P).d
          (n + 1) n).f

tactic: have h := (AlternatingFaceMapComplex.map P.p).comm (n + 1) n
state_before: case refine_1.refine_2.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).d (n + 1) n ≫ eqToHom ⋯).f =
    (eqToHom ⋯ ≫
        ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                  N₁ ⋙
                    (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                      (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
              P).d
          (n + 1) n).f
state_after: case refine_1.refine_2.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
h :
  (AlternatingFaceMapComplex.map P.p).f (n + 1) ≫ (AlternatingFaceMapComplex.obj P.X).d (n + 1) n =
    (AlternatingFaceMapComplex.obj P.X).d (n + 1) n ≫ (AlternatingFaceMapComplex.map P.p).f n
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).d (n + 1) n ≫ eqToHom ⋯).f =
    (eqToHom ⋯ ≫
        ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                  N₁ ⋙
                    (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                      (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
              P).d
          (n + 1) n).f

tactic: dsimp [N₂, karoubiChainComplexEquivalence,
  KaroubiHomologicalComplexEquivalence.Functor.obj] at h ⊢
state_before: case refine_1.refine_2.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
h :
  (AlternatingFaceMapComplex.map P.p).f (n + 1) ≫ (AlternatingFaceMapComplex.obj P.X).d (n + 1) n =
    (AlternatingFaceMapComplex.obj P.X).d (n + 1) n ≫ (AlternatingFaceMapComplex.map P.p).f n
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).obj P).d (n + 1) n ≫ eqToHom ⋯).f =
    (eqToHom ⋯ ≫
        ((karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                  N₁ ⋙
                    (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                      (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).obj
              P).d
          (n + 1) n).f
state_after: case refine_1.refine_2.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
h :
  P.p.app { unop := [n + 1] } ≫ (AlternatingFaceMapComplex.obj P.X).d (n + 1) n =
    (AlternatingFaceMapComplex.obj P.X).d (n + 1) n ≫ P.p.app { unop := [n] }
⊢ ((PInfty.f (n + 1) ≫ P.p.app { unop := [n + 1] }) ≫ (AlternatingFaceMapComplex.obj P.X).d (n + 1) n) ≫ (eqToHom ⋯).f =
    (eqToHom ⋯).f ≫
      (PInfty.f (n + 1)).f ≫ ((AlternatingFaceMapComplex.obj (KaroubiFunctorCategoryEmbedding.obj P)).d (n + 1) n).f

tactic: simp only [assoc, Karoubi.eqToHom_f, eqToHom_refl, comp_id,
  karoubi_alternatingFaceMapComplex_d, karoubi_PInfty_f,
  ← HomologicalComplex.Hom.comm_assoc, ← h, app_idem_assoc]
state_before: case refine_1.refine_2.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P : Karoubi (SimplicialObject C)
n : ℕ
h :
  P.p.app { unop := [n + 1] } ≫ (AlternatingFaceMapComplex.obj P.X).d (n + 1) n =
    (AlternatingFaceMapComplex.obj P.X).d (n + 1) n ≫ P.p.app { unop := [n] }
⊢ ((PInfty.f (n + 1) ≫ P.p.app { unop := [n + 1] }) ≫ (AlternatingFaceMapComplex.obj P.X).d (n + 1) n) ≫ (eqToHom ⋯).f =
    (eqToHom ⋯).f ≫
      (PInfty.f (n + 1)).f ≫ ((AlternatingFaceMapComplex.obj (KaroubiFunctorCategoryEmbedding.obj P)).d (n + 1) n).f
state_after: no goals

tactic: ext n
state_before: case refine_2
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P Q : Karoubi (SimplicialObject C)
f : P ⟶ Q
⊢ (N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).map f =
    eqToHom ⋯ ≫
      (karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
              N₁ ⋙
                (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                  (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).map
          f ≫
        eqToHom ⋯
state_after: case refine_2.h.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P Q : Karoubi (SimplicialObject C)
f : P ⟶ Q
n : ℕ
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).map f).f n).f =
    ((eqToHom ⋯ ≫
            (karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                    N₁ ⋙
                      (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                        (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).map
                f ≫
              eqToHom ⋯).f
        n).f

tactic: dsimp [KaroubiKaroubi.inverse, Functor.mapHomologicalComplex]
state_before: case refine_2.h.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P Q : Karoubi (SimplicialObject C)
f : P ⟶ Q
n : ℕ
⊢ (((N₂ ⋙ (karoubiChainComplexEquivalence C ℕ).functor).map f).f n).f =
    ((eqToHom ⋯ ≫
            (karoubiFunctorCategoryEmbedding SimplexCategoryᵒᵖ C ⋙
                    N₁ ⋙
                      (karoubiChainComplexEquivalence (Karoubi C) ℕ).functor ⋙
                        (KaroubiKaroubi.equivalence C).inverse.mapHomologicalComplex (ComplexShape.down ℕ)).map
                f ≫
              eqToHom ⋯).f
        n).f
state_after: case refine_2.h.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P Q : Karoubi (SimplicialObject C)
f : P ⟶ Q
n : ℕ
⊢ PInfty.f n ≫ f.f.app { unop := [n] } =
    ((eqToHom ⋯).f n).f ≫ ((PInfty.f n).f ≫ f.f.app { unop := [n] }) ≫ ((eqToHom ⋯).f n).f

tactic: simp only [karoubi_PInfty_f, HomologicalComplex.eqToHom_f, Karoubi.eqToHom_f,
  assoc, comp_id, PInfty_f_naturality, app_p_comp,
  karoubiChainComplexEquivalence_functor_obj_X_p, N₂_obj_p_f, eqToHom_refl,
  PInfty_f_naturality_assoc, app_comp_p, PInfty_f_idem_assoc]
state_before: case refine_2.h.h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
P Q : Karoubi (SimplicialObject C)
f : P ⟶ Q
n : ℕ
⊢ PInfty.f n ≫ f.f.app { unop := [n] } =
    ((eqToHom ⋯).f n).f ≫ ((PInfty.f n).f ≫ f.f.app { unop := [n] }) ≫ ((eqToHom ⋯).f n).f
state_after: no goals