Documentation

Mathlib.Algebra.Homology.HomologicalComplex

Homological complexes. #

A HomologicalComplex V c with a "shape" controlled by c : ComplexShape ι has chain groups X i (objects in V) indexed by i : ι, and a differential d i j whenever c.Rel i j.

We in fact ask for differentials d i j for all i j : ι, but have a field shape requiring that these are zero when not allowed by c. This avoids a lot of dependent type theory hell!

The composite of any two differentials d i j ≫ d j k must be zero.

We provide ChainComplex V α for α-indexed chain complexes in which d i j ≠ 0 only if j + 1 = i, and similarly CochainComplex V α, with i = j + 1.

There is a category structure, where morphisms are chain maps.

For C : HomologicalComplex V c, we define C.xNext i, which is either C.X j for some arbitrarily chosen j such that c.r i j, or C.X i if there is no such j. Similarly we have C.xPrev j. Defined in terms of these we have C.dFrom i : C.X i ⟶ C.xNext i and C.dTo j : C.xPrev j ⟶ C.X j, which are either defined as C.d i j, or zero, as needed.

A HomologicalComplex V c with a "shape" controlled by c : ComplexShape ι has chain groups X i (objects in V) indexed by i : ι, and a differential d i j whenever c.Rel i j.

We in fact ask for differentials d i j for all i j : ι, but have a field shape requiring that these are zero when not allowed by c. This avoids a lot of dependent type theory hell!

The composite of any two differentials d i j ≫ d j k must be zero.

Instances For
    theorem HomologicalComplex.ext {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (h_X : C₁.X = C₂.X) (h_d : ∀ (i j : ι), c.Rel i jCategoryTheory.CategoryStruct.comp (C₁.d i j) (CategoryTheory.eqToHom ) = CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ) (C₂.d i j)) :
    C₁ = C₂

    The obvious isomorphism K.X p ≅ K.X q when p = q.

    Instances For
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_hom_comp_XIsoOfEq_hom {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι} (h₁₂ : p₁ = p₂) (h₂₃ : p₂ = p₃) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_hom_comp_XIsoOfEq_hom_assoc {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι} (h₁₂ : p₁ = p₂) (h₂₃ : p₂ = p₃) {Z : V} (h : K.X p₃ Z) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_hom_comp_XIsoOfEq_inv {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι} (h₁₂ : p₁ = p₂) (h₃₂ : p₃ = p₂) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_hom_comp_XIsoOfEq_inv_assoc {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι} (h₁₂ : p₁ = p₂) (h₃₂ : p₃ = p₂) {Z : V} (h : K.X p₃ Z) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_inv_comp_XIsoOfEq_hom {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι} (h₂₁ : p₂ = p₁) (h₂₃ : p₂ = p₃) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_inv_comp_XIsoOfEq_hom_assoc {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι} (h₂₁ : p₂ = p₁) (h₂₃ : p₂ = p₃) {Z : V} (h : K.X p₃ Z) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_inv_comp_XIsoOfEq_inv {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι} (h₂₁ : p₂ = p₁) (h₃₂ : p₃ = p₂) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_inv_comp_XIsoOfEq_inv_assoc {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ p₃ : ι} (h₂₁ : p₂ = p₁) (h₃₂ : p₃ = p₂) {Z : V} (h : K.X p₃ Z) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_hom_comp_d {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ : ι} (h : p₁ = p₂) (p₃ : ι) :
      CategoryTheory.CategoryStruct.comp (K.XIsoOfEq h).hom (K.d p₂ p₃) = K.d p₁ p₃
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_hom_comp_d_assoc {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₁ p₂ : ι} (h : p₁ = p₂) (p₃ : ι) {Z : V} (h✝ : K.X p₃ Z) :
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_inv_comp_d {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₂ p₁ : ι} (h : p₂ = p₁) (p₃ : ι) :
      CategoryTheory.CategoryStruct.comp (K.XIsoOfEq h).inv (K.d p₂ p₃) = K.d p₁ p₃
      @[simp]
      theorem HomologicalComplex.XIsoOfEq_inv_comp_d_assoc {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₂ p₁ : ι} (h : p₂ = p₁) (p₃ : ι) {Z : V} (h✝ : K.X p₃ Z) :
      @[simp]
      theorem HomologicalComplex.d_comp_XIsoOfEq_hom {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₂ p₃ : ι} (h : p₂ = p₃) (p₁ : ι) :
      CategoryTheory.CategoryStruct.comp (K.d p₁ p₂) (K.XIsoOfEq h).hom = K.d p₁ p₃
      @[simp]
      theorem HomologicalComplex.d_comp_XIsoOfEq_hom_assoc {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₂ p₃ : ι} (h : p₂ = p₃) (p₁ : ι) {Z : V} (h✝ : K.X p₃ Z) :
      @[simp]
      theorem HomologicalComplex.d_comp_XIsoOfEq_inv {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₂ p₃ : ι} (h : p₃ = p₂) (p₁ : ι) :
      CategoryTheory.CategoryStruct.comp (K.d p₁ p₂) (K.XIsoOfEq h).inv = K.d p₁ p₃
      @[simp]
      theorem HomologicalComplex.d_comp_XIsoOfEq_inv_assoc {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (K : HomologicalComplex V c) {p₂ p₃ : ι} (h : p₃ = p₂) (p₁ : ι) {Z : V} (h✝ : K.X p₃ Z) :
      @[reducible, inline]

      An α-indexed chain complex is a HomologicalComplex in which d i j ≠ 0 only if j + 1 = i.

      Instances For
        @[reducible, inline]

        An α-indexed cochain complex is a HomologicalComplex in which d i j ≠ 0 only if i + 1 = j.

        Instances For
          @[simp]
          theorem ChainComplex.prev (α : Type u_2) [AddRightCancelSemigroup α] [One α] (i : α) :
          (ComplexShape.down α).prev i = i + 1
          @[simp]
          theorem ChainComplex.next (α : Type u_2) [AddGroup α] [One α] (i : α) :
          (ComplexShape.down α).next i = i - 1
          @[simp]
          theorem ChainComplex.next_nat_succ (i : ) :
          (ComplexShape.down ).next (i + 1) = i
          @[simp]
          theorem CochainComplex.prev (α : Type u_2) [AddGroup α] [One α] (i : α) :
          (ComplexShape.up α).prev i = i - 1
          @[simp]
          theorem CochainComplex.next (α : Type u_2) [AddRightCancelSemigroup α] [One α] (i : α) :
          (ComplexShape.up α).next i = i + 1
          @[simp]
          theorem CochainComplex.prev_nat_succ (i : ) :
          (ComplexShape.up ).prev (i + 1) = i

          A morphism of homological complexes consists of maps between the chain groups, commuting with the differentials.

          Instances For
            theorem HomologicalComplex.Hom.ext_iff {ι : Type u_1} {V : Type u} {inst✝ : CategoryTheory.Category.{v, u} V} {inst✝¹ : CategoryTheory.Limits.HasZeroMorphisms V} {c : ComplexShape ι} {A B : HomologicalComplex V c} {x y : A.Hom B} :
            x = y x.f = y.f
            theorem HomologicalComplex.Hom.ext {ι : Type u_1} {V : Type u} {inst✝ : CategoryTheory.Category.{v, u} V} {inst✝¹ : CategoryTheory.Limits.HasZeroMorphisms V} {c : ComplexShape ι} {A B : HomologicalComplex V c} {x y : A.Hom B} (f : x.f = y.f) :
            x = y

            Composition of chain maps.

            Instances For
              theorem HomologicalComplex.hom_ext {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C D : HomologicalComplex V c} (f g : C D) (h : ∀ (i : ι), f.f i = g.f i) :
              f = g
              theorem HomologicalComplex.hom_ext_iff {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C D : HomologicalComplex V c} {f g : C D} :
              f = g ∀ (i : ι), f.f i = g.f i
              @[simp]
              theorem HomologicalComplex.comp_f {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ C₃ : HomologicalComplex V c} (f : C₁ C₂) (g : C₂ C₃) (i : ι) :
              theorem HomologicalComplex.hom_f_injective {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} :
              Function.Injective fun (f : C₁.Hom C₂) => f.f
              theorem HomologicalComplex.congr_hom {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C D : HomologicalComplex V c} {f g : C D} (w : f = g) (i : ι) :
              f.f i = g.f i

              The functor picking out the i-th object of a complex.

              Instances For
                @[simp]
                theorem HomologicalComplex.eval_map {ι : Type u_1} (V : Type u) [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (c : ComplexShape ι) (i : ι) {X✝ Y✝ : HomologicalComplex V c} (f : X✝ Y✝) :
                (eval V c i).map f = f.f i

                The functor forgetting the differential in a complex, obtaining a graded object.

                Instances For
                  @[simp]
                  theorem HomologicalComplex.forget_map {ι : Type u_1} (V : Type u) [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (c : ComplexShape ι) {X✝ Y✝ : HomologicalComplex V c} (f : X✝ Y✝) (i : ι) :
                  (forget V c).map f i = f.f i

                  Forgetting the differentials than picking out the i-th object is the same as just picking out the i-th object.

                  Instances For
                    @[simp]

                    If C.d i j and C.d i j' are both allowed, then we must have j = j', and so the differentials only differ by an eqToHom.

                    @[simp]

                    If C.d i j and C.d i' j are both allowed, then we must have i = i', and so the differentials only differ by an eqToHom.

                    @[reducible, inline]

                    Either C.X i, if there is some i with c.Rel i j, or C.X j.

                    Instances For
                      noncomputable def HomologicalComplex.xPrevIso {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (C : HomologicalComplex V c) {i j : ι} (r : c.Rel i j) :
                      C.xPrev j C.X i

                      If c.Rel i j, then C.xPrev j is isomorphic to C.X i.

                      Instances For
                        noncomputable def HomologicalComplex.xPrevIsoSelf {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (C : HomologicalComplex V c) {j : ι} (h : ¬c.Rel (c.prev j) j) :
                        C.xPrev j C.X j

                        If there is no i so c.Rel i j, then C.xPrev j is isomorphic to C.X j.

                        Instances For
                          @[reducible, inline]

                          Either C.X j, if there is some j with c.rel i j, or C.X i.

                          Instances For
                            noncomputable def HomologicalComplex.xNextIso {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (C : HomologicalComplex V c) {i j : ι} (r : c.Rel i j) :
                            C.xNext i C.X j

                            If c.Rel i j, then C.xNext i is isomorphic to C.X j.

                            Instances For
                              noncomputable def HomologicalComplex.xNextIsoSelf {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (C : HomologicalComplex V c) {i : ι} (h : ¬c.Rel i (c.next i)) :
                              C.xNext i C.X i

                              If there is no j so c.Rel i j, then C.xNext i is isomorphic to C.X i.

                              Instances For
                                @[reducible, inline]
                                noncomputable abbrev HomologicalComplex.dTo {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (C : HomologicalComplex V c) (j : ι) :
                                C.xPrev j C.X j

                                The differential mapping into C.X j, or zero if there isn't one.

                                Instances For
                                  @[reducible, inline]
                                  noncomputable abbrev HomologicalComplex.dFrom {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} (C : HomologicalComplex V c) (i : ι) :
                                  C.X i C.xNext i

                                  The differential mapping out of C.X i, or zero if there isn't one.

                                  Instances For
                                    def HomologicalComplex.Hom.isoApp {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁ C₂) (i : ι) :
                                    C₁.X i C₂.X i

                                    The i-th component of an isomorphism of chain complexes.

                                    Instances For
                                      @[simp]
                                      theorem HomologicalComplex.Hom.isoApp_hom {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁ C₂) (i : ι) :
                                      (isoApp f i).hom = f.hom.f i
                                      @[simp]
                                      theorem HomologicalComplex.Hom.isoApp_inv {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁ C₂) (i : ι) :
                                      (isoApp f i).inv = f.inv.f i
                                      def HomologicalComplex.Hom.isoOfComponents {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : (i : ι) → C₁.X i C₂.X i) (hf : ∀ (i j : ι), c.Rel i jCategoryTheory.CategoryStruct.comp (f i).hom (C₂.d i j) = CategoryTheory.CategoryStruct.comp (C₁.d i j) (f j).hom := by cat_disch) :
                                      C₁ C₂

                                      Construct an isomorphism of chain complexes from isomorphism of the objects which commute with the differentials.

                                      Instances For
                                        @[simp]
                                        theorem HomologicalComplex.Hom.isoOfComponents_hom_f {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : (i : ι) → C₁.X i C₂.X i) (hf : ∀ (i j : ι), c.Rel i jCategoryTheory.CategoryStruct.comp (f i).hom (C₂.d i j) = CategoryTheory.CategoryStruct.comp (C₁.d i j) (f j).hom := by cat_disch) (i : ι) :
                                        (isoOfComponents f hf).hom.f i = (f i).hom
                                        @[simp]
                                        theorem HomologicalComplex.Hom.isoOfComponents_inv_f {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : (i : ι) → C₁.X i C₂.X i) (hf : ∀ (i j : ι), c.Rel i jCategoryTheory.CategoryStruct.comp (f i).hom (C₂.d i j) = CategoryTheory.CategoryStruct.comp (C₁.d i j) (f j).hom := by cat_disch) (i : ι) :
                                        (isoOfComponents f hf).inv.f i = (f i).inv
                                        @[simp]
                                        theorem HomologicalComplex.Hom.isoOfComponents_app {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : (i : ι) → C₁.X i C₂.X i) (hf : ∀ (i j : ι), c.Rel i jCategoryTheory.CategoryStruct.comp (f i).hom (C₂.d i j) = CategoryTheory.CategoryStruct.comp (C₁.d i j) (f j).hom) (i : ι) :
                                        isoApp (isoOfComponents f hf) i = f i

                                        Lemmas relating chain maps and dTo/dFrom.

                                        @[reducible, inline]
                                        noncomputable abbrev HomologicalComplex.Hom.prev {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (j : ι) :
                                        C₁.xPrev j C₂.xPrev j

                                        f.prev j is f.f i if there is some r i j, and f.f j otherwise.

                                        Instances For
                                          @[reducible, inline]
                                          noncomputable abbrev HomologicalComplex.Hom.next {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (i : ι) :
                                          C₁.xNext i C₂.xNext i

                                          f.next i is f.f j if there is some r i j, and f.f j otherwise.

                                          Instances For
                                            @[simp]
                                            theorem HomologicalComplex.Hom.comm_from_apply {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (i : ι) {F : VVType uF} {carrier : VType w} {instFunLike : (X Y : V) → FunLike (F X Y) (carrier X) (carrier Y)} [inst : CategoryTheory.ConcreteCategory V F] (x : carrier (C₁.X i)) :
                                            @[simp]
                                            theorem HomologicalComplex.Hom.comm_to_apply {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (j : ι) {F : VVType uF} {carrier : VType w} {instFunLike : (X Y : V) → FunLike (F X Y) (carrier X) (carrier Y)} [inst : CategoryTheory.ConcreteCategory V F] (x : carrier (C₁.xPrev j)) :

                                            A morphism of chain complexes induces a morphism of arrows of the differentials out of each object.

                                            Instances For
                                              @[simp]
                                              theorem HomologicalComplex.Hom.sqFrom_left {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (i : ι) :
                                              (f.sqFrom i).left = f.f i
                                              @[simp]
                                              theorem HomologicalComplex.Hom.sqFrom_right {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (i : ι) :
                                              (f.sqFrom i).right = f.next i
                                              noncomputable def HomologicalComplex.Hom.sqTo {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (j : ι) :

                                              A morphism of chain complexes induces a morphism of arrows of the differentials into each object.

                                              Instances For
                                                @[simp]
                                                theorem HomologicalComplex.Hom.sqTo_left {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (j : ι) :
                                                (f.sqTo j).left = f.prev j
                                                @[simp]
                                                theorem HomologicalComplex.Hom.sqTo_right {ι : Type u_1} {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {c : ComplexShape ι} {C₁ C₂ : HomologicalComplex V c} (f : C₁.Hom C₂) (j : ι) :
                                                (f.sqTo j).right = f.f j
                                                def ChainComplex.of {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d : (n : α) → X (n + 1) X n) (sq : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d (n + 1)) (d n) = 0) :

                                                Construct an α-indexed chain complex from a dependently-typed differential.

                                                Instances For
                                                  @[simp]
                                                  theorem ChainComplex.of_x {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d : (n : α) → X (n + 1) X n) (sq : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d (n + 1)) (d n) = 0) (n : α) :
                                                  (of X d sq).X n = X n
                                                  @[simp]
                                                  theorem ChainComplex.of_d {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d : (n : α) → X (n + 1) X n) (sq : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d (n + 1)) (d n) = 0) (j : α) :
                                                  (of X d sq).d (j + 1) j = d j
                                                  theorem ChainComplex.of_d_ne {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d : (n : α) → X (n + 1) X n) (sq : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d (n + 1)) (d n) = 0) {i j : α} (h : i j + 1) :
                                                  (of X d sq).d i j = 0
                                                  def ChainComplex.ofHom {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d_X : (n : α) → X (n + 1) X n) (sq_X : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d_X (n + 1)) (d_X n) = 0) (Y : αV) (d_Y : (n : α) → Y (n + 1) Y n) (sq_Y : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d_Y (n + 1)) (d_Y n) = 0) (f : (i : α) → X i Y i) (comm : ∀ (i : α), CategoryTheory.CategoryStruct.comp (f (i + 1)) (d_Y i) = CategoryTheory.CategoryStruct.comp (d_X i) (f i)) :
                                                  of X d_X sq_X of Y d_Y sq_Y

                                                  A constructor for chain maps between α-indexed chain complexes built using ChainComplex.of, from a dependently typed collection of morphisms.

                                                  Instances For
                                                    @[simp]
                                                    theorem ChainComplex.ofHom_f {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d_X : (n : α) → X (n + 1) X n) (sq_X : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d_X (n + 1)) (d_X n) = 0) (Y : αV) (d_Y : (n : α) → Y (n + 1) Y n) (sq_Y : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d_Y (n + 1)) (d_Y n) = 0) (f : (i : α) → X i Y i) (comm : ∀ (i : α), CategoryTheory.CategoryStruct.comp (f (i + 1)) (d_Y i) = CategoryTheory.CategoryStruct.comp (d_X i) (f i)) (i : α) :
                                                    (ofHom X d_X sq_X Y d_Y sq_Y f comm).f i = f i
                                                    def ChainComplex.mkAux {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) :

                                                    Auxiliary definition for mk.

                                                    Instances For
                                                      def ChainComplex.mk {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) :

                                                      An inductive constructor for -indexed chain complexes.

                                                      You provide explicitly the first two differentials, then a function which takes two differentials and the fact they compose to zero, and returns the next object, its differential, and the fact it composes appropriately to zero.

                                                      See also mk', which only sees the previous differential in the inductive step.

                                                      Instances For
                                                        @[simp]
                                                        theorem ChainComplex.mk_X_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) :
                                                        (mk X₀ X₁ X₂ d₀ d₁ s succ).X 0 = X₀
                                                        @[simp]
                                                        theorem ChainComplex.mk_X_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) :
                                                        (mk X₀ X₁ X₂ d₀ d₁ s succ).X 1 = X₁
                                                        @[simp]
                                                        theorem ChainComplex.mk_X_2 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) :
                                                        (mk X₀ X₁ X₂ d₀ d₁ s succ).X 2 = X₂
                                                        @[simp]
                                                        theorem ChainComplex.mk_d_1_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) :
                                                        (mk X₀ X₁ X₂ d₀ d₁ s succ).d 1 0 = d₀
                                                        @[simp]
                                                        theorem ChainComplex.mk_d_2_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) :
                                                        (mk X₀ X₁ X₂ d₀ d₁ s succ).d 2 1 = d₁
                                                        theorem ChainComplex.mk_congr_succ_X₃ {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) {S S' : CategoryTheory.ShortComplex V} (h : S = S') :
                                                        (succ S).fst = (succ S').fst
                                                        theorem ChainComplex.mkAux_eq_shortComplex_mk_d_comp_d {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) (n : ) :
                                                        mkAux X₀ X₁ X₂ d₀ d₁ s succ n = { X₁ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X (n + 2), X₂ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X (n + 1), X₃ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X n, f := (mk X₀ X₁ X₂ d₀ d₁ s succ).d (n + 2) (n + 1), g := (mk X₀ X₁ X₂ d₀ d₁ s succ).d (n + 1) n, zero := }
                                                        def ChainComplex.mkXIso {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) (n : ) :
                                                        (mk X₀ X₁ X₂ d₀ d₁ s succ).X (n + 3) (succ { X₁ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X (n + 2), X₂ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X (n + 1), X₃ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X n, f := (mk X₀ X₁ X₂ d₀ d₁ s succ).d (n + 2) (n + 1), g := (mk X₀ X₁ X₂ d₀ d₁ s succ).d (n + 1) n, zero := }).fst

                                                        The isomorphism from (mk X₀ X₁ X₂ d₀ d₁ s succ).X (n + 3) that is given by the inductive construction.

                                                        Instances For
                                                          theorem ChainComplex.mk_d {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₃ : V) ×' (d₂ : X₃ S.X₁) ×' CategoryTheory.CategoryStruct.comp d₂ S.f = 0) (n : ) :
                                                          (mk X₀ X₁ X₂ d₀ d₁ s succ).d (n + 3) (n + 2) = CategoryTheory.CategoryStruct.comp (mkXIso X₀ X₁ X₂ d₀ d₁ s succ n).hom (succ { X₁ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X (n + 2), X₂ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X (n + 1), X₃ := (mk X₀ X₁ X₂ d₀ d₁ s succ).X n, f := (mk X₀ X₁ X₂ d₀ d₁ s succ).d (n + 2) (n + 1), g := (mk X₀ X₁ X₂ d₀ d₁ s succ).d (n + 1) n, zero := }).snd.fst
                                                          def ChainComplex.mk' {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d : X₁ X₀) (succ' : {X₀ X₁ : V} → (f : X₁ X₀) → (X₂ : V) ×' (d : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d f = 0) :

                                                          A simpler inductive constructor for -indexed chain complexes.

                                                          You provide explicitly the first differential, then a function which takes a differential, and returns the next object, its differential, and the fact it composes appropriately to zero.

                                                          Instances For
                                                            @[simp]
                                                            theorem ChainComplex.mk'_X_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d₀ : X₁ X₀) (succ' : {X₀ X₁ : V} → (f : X₁ X₀) → (X₂ : V) ×' (d : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d f = 0) :
                                                            (mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').X 0 = X₀
                                                            @[simp]
                                                            theorem ChainComplex.mk'_X_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d₀ : X₁ X₀) (succ' : {X₀ X₁ : V} → (f : X₁ X₀) → (X₂ : V) ×' (d : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d f = 0) :
                                                            (mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').X 1 = X₁
                                                            @[simp]
                                                            theorem ChainComplex.mk'_d_1_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d₀ : X₁ X₀) (succ' : {X₀ X₁ : V} → (f : X₁ X₀) → (X₂ : V) ×' (d : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d f = 0) :
                                                            (mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').d 1 0 = d₀
                                                            def ChainComplex.mk'XIso {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d₀ : X₁ X₀) (succ' : {X₀ X₁ : V} → (f : X₁ X₀) → (X₂ : V) ×' (d : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d f = 0) (n : ) :
                                                            (mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').X (n + 2) (succ' ((mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').d (n + 1) n)).fst

                                                            The isomorphism from (mk' X₀ X₁ d₀ succ').X (n + 2) that is given by the inductive construction.

                                                            Instances For
                                                              theorem ChainComplex.mk'_congr_succ'_d {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (succ' : {X₀ X₁ : V} → (f : X₁ X₀) → (X₂ : V) ×' (d : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d f = 0) {X Y : V} (f g : X Y) (h : f = g) :
                                                              (succ' f).snd.fst = CategoryTheory.CategoryStruct.comp (CategoryTheory.eqToHom ) (succ' g).snd.fst
                                                              theorem ChainComplex.mk'_d {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d₀ : X₁ X₀) (succ' : {X₀ X₁ : V} → (f : X₁ X₀) → (X₂ : V) ×' (d : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d f = 0) (n : ) :
                                                              (mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').d (n + 2) (n + 1) = CategoryTheory.CategoryStruct.comp (mk'XIso X₀ X₁ d₀ (fun {X₀ X₁ : V} => succ') n).hom (succ' ((mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').d (n + 1) n)).snd.fst
                                                              def ChainComplex.mkHomAux {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : ChainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp one (Q.d 1 0) = CategoryTheory.CategoryStruct.comp (P.d 1 0) zero) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f' (Q.d (n + 1) n) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) n) f) → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp f'' (Q.d (n + 2) (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d (n + 2) (n + 1)) p.snd.fst) (n : ) :
                                                              (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f' (Q.d (n + 1) n) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) n) f

                                                              An auxiliary construction for mkHom.

                                                              Here we build by induction a family of commutative squares, but don't require at the type level that these successive commutative squares actually agree. They do in fact agree, and we then capture that at the type level (i.e. by constructing a chain map) in mkHom.

                                                              Instances For
                                                                def ChainComplex.mkHom {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : ChainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp one (Q.d 1 0) = CategoryTheory.CategoryStruct.comp (P.d 1 0) zero) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f' (Q.d (n + 1) n) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) n) f) → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp f'' (Q.d (n + 2) (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d (n + 2) (n + 1)) p.snd.fst) :
                                                                P Q

                                                                A constructor for chain maps between -indexed chain complexes, working by induction on commutative squares.

                                                                You need to provide the components of the chain map in degrees 0 and 1, show that these form a commutative square, and then give a construction of each component, and the fact that it forms a commutative square with the previous component, using as an inductive hypothesis the data (and commutativity) of the previous two components.

                                                                Instances For
                                                                  @[simp]
                                                                  theorem ChainComplex.mkHom_f_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : ChainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp one (Q.d 1 0) = CategoryTheory.CategoryStruct.comp (P.d 1 0) zero) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f' (Q.d (n + 1) n) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) n) f) → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp f'' (Q.d (n + 2) (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d (n + 2) (n + 1)) p.snd.fst) :
                                                                  (P.mkHom Q zero one one_zero_comm succ).f 0 = zero
                                                                  @[simp]
                                                                  theorem ChainComplex.mkHom_f_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : ChainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp one (Q.d 1 0) = CategoryTheory.CategoryStruct.comp (P.d 1 0) zero) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f' (Q.d (n + 1) n) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) n) f) → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp f'' (Q.d (n + 2) (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d (n + 2) (n + 1)) p.snd.fst) :
                                                                  (P.mkHom Q zero one one_zero_comm succ).f 1 = one
                                                                  @[simp]
                                                                  theorem ChainComplex.mkHom_f_succ_succ {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : ChainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp one (Q.d 1 0) = CategoryTheory.CategoryStruct.comp (P.d 1 0) zero) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f' (Q.d (n + 1) n) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) n) f) → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp f'' (Q.d (n + 2) (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d (n + 2) (n + 1)) p.snd.fst) (n : ) :
                                                                  (P.mkHom Q zero one one_zero_comm succ).f (n + 2) = (succ n (P.mkHom Q zero one one_zero_comm succ).f n, (P.mkHom Q zero one one_zero_comm succ).f (n + 1), ).fst
                                                                  def CochainComplex.of {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d : (n : α) → X n X (n + 1)) (sq : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d n) (d (n + 1)) = 0) :

                                                                  Construct an α-indexed cochain complex from a dependently-typed differential.

                                                                  Instances For
                                                                    @[simp]
                                                                    theorem CochainComplex.of_x {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d : (n : α) → X n X (n + 1)) (sq : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d n) (d (n + 1)) = 0) (n : α) :
                                                                    (of X d sq).X n = X n
                                                                    @[simp]
                                                                    theorem CochainComplex.of_d {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d : (n : α) → X n X (n + 1)) (sq : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d n) (d (n + 1)) = 0) (j : α) :
                                                                    (of X d sq).d j (j + 1) = d j
                                                                    theorem CochainComplex.of_d_ne {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d : (n : α) → X n X (n + 1)) (sq : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d n) (d (n + 1)) = 0) {i j : α} (h : i + 1 j) :
                                                                    (of X d sq).d i j = 0
                                                                    def CochainComplex.ofHom {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d_X : (n : α) → X n X (n + 1)) (sq_X : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d_X n) (d_X (n + 1)) = 0) (Y : αV) (d_Y : (n : α) → Y n Y (n + 1)) (sq_Y : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d_Y n) (d_Y (n + 1)) = 0) (f : (i : α) → X i Y i) (comm : ∀ (i : α), CategoryTheory.CategoryStruct.comp (f i) (d_Y i) = CategoryTheory.CategoryStruct.comp (d_X i) (f (i + 1))) :
                                                                    of X d_X sq_X of Y d_Y sq_Y

                                                                    A constructor for chain maps between α-indexed cochain complexes built using CochainComplex.of, from a dependently typed collection of morphisms.

                                                                    Instances For
                                                                      @[simp]
                                                                      theorem CochainComplex.ofHom_f {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] {α : Type u_2} [AddRightCancelSemigroup α] [One α] [DecidableEq α] (X : αV) (d_X : (n : α) → X n X (n + 1)) (sq_X : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d_X n) (d_X (n + 1)) = 0) (Y : αV) (d_Y : (n : α) → Y n Y (n + 1)) (sq_Y : ∀ (n : α), CategoryTheory.CategoryStruct.comp (d_Y n) (d_Y (n + 1)) = 0) (f : (i : α) → X i Y i) (comm : ∀ (i : α), CategoryTheory.CategoryStruct.comp (f i) (d_Y i) = CategoryTheory.CategoryStruct.comp (d_X i) (f (i + 1))) (i : α) :
                                                                      (ofHom X d_X sq_X Y d_Y sq_Y f comm).f i = f i
                                                                      def CochainComplex.mkAux {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ X₄) ×' CategoryTheory.CategoryStruct.comp S.g d₂ = 0) :

                                                                      Auxiliary definition for mk.

                                                                      Instances For
                                                                        def CochainComplex.mk {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ X₄) ×' CategoryTheory.CategoryStruct.comp S.g d₂ = 0) :

                                                                        An inductive constructor for -indexed cochain complexes.

                                                                        You provide explicitly the first two differentials, then a function which takes two differentials and the fact they compose to zero, and returns the next object, its differential, and the fact it composes appropriately to zero.

                                                                        See also mk', which only sees the previous differential in the inductive step.

                                                                        Instances For
                                                                          @[simp]
                                                                          theorem CochainComplex.mk_X_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ X₄) ×' CategoryTheory.CategoryStruct.comp S.g d₂ = 0) :
                                                                          (mk X₀ X₁ X₂ d₀ d₁ s succ).X 0 = X₀
                                                                          @[simp]
                                                                          theorem CochainComplex.mk_X_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ X₄) ×' CategoryTheory.CategoryStruct.comp S.g d₂ = 0) :
                                                                          (mk X₀ X₁ X₂ d₀ d₁ s succ).X 1 = X₁
                                                                          @[simp]
                                                                          theorem CochainComplex.mk_X_2 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ X₄) ×' CategoryTheory.CategoryStruct.comp S.g d₂ = 0) :
                                                                          (mk X₀ X₁ X₂ d₀ d₁ s succ).X 2 = X₂
                                                                          @[simp]
                                                                          theorem CochainComplex.mk_d_1_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ X₄) ×' CategoryTheory.CategoryStruct.comp S.g d₂ = 0) :
                                                                          (mk X₀ X₁ X₂ d₀ d₁ s succ).d 0 1 = d₀
                                                                          @[simp]
                                                                          theorem CochainComplex.mk_d_2_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (S : CategoryTheory.ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ X₄) ×' CategoryTheory.CategoryStruct.comp S.g d₂ = 0) :
                                                                          (mk X₀ X₁ X₂ d₀ d₁ s succ).d 1 2 = d₁
                                                                          def CochainComplex.mk' {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d : X₀ X₁) (succ' : {X₀ X₁ : V} → (f : X₀ X₁) → (X₂ : V) ×' (d : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp f d = 0) :

                                                                          A simpler inductive constructor for -indexed cochain complexes.

                                                                          You provide explicitly the first differential, then a function which takes a differential, and returns the next object, its differential, and the fact it composes appropriately to zero.

                                                                          Instances For
                                                                            @[simp]
                                                                            theorem CochainComplex.mk'_X_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d₀ : X₀ X₁) (succ' : {X₀ X₁ : V} → (f : X₀ X₁) → (X₂ : V) ×' (d : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp f d = 0) :
                                                                            (mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').X 0 = X₀
                                                                            @[simp]
                                                                            theorem CochainComplex.mk'_X_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d₀ : X₀ X₁) (succ' : {X₀ X₁ : V} → (f : X₀ X₁) → (X₂ : V) ×' (d : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp f d = 0) :
                                                                            (mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').X 1 = X₁
                                                                            @[simp]
                                                                            theorem CochainComplex.mk'_d_1_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ X₁ : V) (d₀ : X₀ X₁) (succ' : {X₀ X₁ : V} → (f : X₀ X₁) → (X₂ : V) ×' (d : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp f d = 0) :
                                                                            (mk' X₀ X₁ d₀ fun {X₀ X₁ : V} => succ').d 0 1 = d₀
                                                                            def CochainComplex.mkHomAux {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : CochainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp zero (Q.d 0 1) = CategoryTheory.CategoryStruct.comp (P.d 0 1) one) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f (Q.d n (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d n (n + 1)) f') → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp p.snd.fst (Q.d (n + 1) (n + 2)) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) (n + 2)) f'') (n : ) :
                                                                            (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f (Q.d n (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d n (n + 1)) f'

                                                                            An auxiliary construction for mkHom.

                                                                            Here we build by induction a family of commutative squares, but don't require at the type level that these successive commutative squares actually agree. They do in fact agree, and we then capture that at the type level (i.e. by constructing a chain map) in mkHom.

                                                                            Instances For
                                                                              def CochainComplex.mkHom {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : CochainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp zero (Q.d 0 1) = CategoryTheory.CategoryStruct.comp (P.d 0 1) one) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f (Q.d n (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d n (n + 1)) f') → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp p.snd.fst (Q.d (n + 1) (n + 2)) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) (n + 2)) f'') :
                                                                              P Q

                                                                              A constructor for chain maps between -indexed cochain complexes, working by induction on commutative squares.

                                                                              You need to provide the components of the chain map in degrees 0 and 1, show that these form a commutative square, and then give a construction of each component, and the fact that it forms a commutative square with the previous component, using as an inductive hypothesis the data (and commutativity) of the previous two components.

                                                                              Instances For
                                                                                @[simp]
                                                                                theorem CochainComplex.mkHom_f_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : CochainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp zero (Q.d 0 1) = CategoryTheory.CategoryStruct.comp (P.d 0 1) one) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f (Q.d n (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d n (n + 1)) f') → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp p.snd.fst (Q.d (n + 1) (n + 2)) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) (n + 2)) f'') :
                                                                                (P.mkHom Q zero one one_zero_comm succ).f 0 = zero
                                                                                @[simp]
                                                                                theorem CochainComplex.mkHom_f_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : CochainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp zero (Q.d 0 1) = CategoryTheory.CategoryStruct.comp (P.d 0 1) one) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f (Q.d n (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d n (n + 1)) f') → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp p.snd.fst (Q.d (n + 1) (n + 2)) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) (n + 2)) f'') :
                                                                                (P.mkHom Q zero one one_zero_comm succ).f 1 = one
                                                                                @[simp]
                                                                                theorem CochainComplex.mkHom_f_succ_succ {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P Q : CochainComplex V ) (zero : P.X 0 Q.X 0) (one : P.X 1 Q.X 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp zero (Q.d 0 1) = CategoryTheory.CategoryStruct.comp (P.d 0 1) one) (succ : (n : ) → (p : (f : P.X n Q.X n) ×' (f' : P.X (n + 1) Q.X (n + 1)) ×' CategoryTheory.CategoryStruct.comp f (Q.d n (n + 1)) = CategoryTheory.CategoryStruct.comp (P.d n (n + 1)) f') → (f'' : P.X (n + 2) Q.X (n + 2)) ×' CategoryTheory.CategoryStruct.comp p.snd.fst (Q.d (n + 1) (n + 2)) = CategoryTheory.CategoryStruct.comp (P.d (n + 1) (n + 2)) f'') (n : ) :
                                                                                (P.mkHom Q zero one one_zero_comm succ).f (n + 2) = (succ n (P.mkHom Q zero one one_zero_comm succ).f n, (P.mkHom Q zero one one_zero_comm succ).f (n + 1), ).fst