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

    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_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_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_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₂) :
      @[inline, reducible]

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

      Instances For
        @[inline, reducible]

        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 : α) :
          @[simp]
          theorem ChainComplex.next (α : Type u_2) [AddGroup α] [One α] (i : α) :
          @[simp]
          theorem CochainComplex.prev (α : Type u_2) [AddGroup α] [One α] (i : α) :
          @[simp]
          theorem CochainComplex.next (α : Type u_2) [AddRightCancelSemigroup α] [One α] (i : α) :
          theorem HomologicalComplex.Hom.ext {ι : Type u_1} {V : Type u} :
          ∀ {inst : CategoryTheory.Category.{v, u} V} {inst_1 : CategoryTheory.Limits.HasZeroMorphisms V} {c : ComplexShape ι} {A B : HomologicalComplex V c} (x y : HomologicalComplex.Hom A B), x.f = y.fx = y

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

          Instances For

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

            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 : ι), (HomologicalComplex V c).map CategoryTheory.CategoryStruct.toQuiver (CategoryTheory.GradedObject ι V) CategoryTheory.CategoryStruct.toQuiver (HomologicalComplex.forget V c).toPrefunctor X Y f i = HomologicalComplex.Hom.f f i
              @[simp]
              theorem HomologicalComplex.forget_obj {ι : Type u_1} (V : Type u) [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (c : ComplexShape ι) (C : HomologicalComplex V c) :
              ∀ (a : ι), (HomologicalComplex V c).obj CategoryTheory.CategoryStruct.toQuiver (CategoryTheory.GradedObject ι V) CategoryTheory.CategoryStruct.toQuiver (HomologicalComplex.forget V c).toPrefunctor C a = HomologicalComplex.X C a

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

              Instances For

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

                Instances For

                  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.

                  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.

                  @[inline, reducible]

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

                  Instances For

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

                    Instances For

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

                      Instances For
                        @[inline, reducible]

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

                        Instances For

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

                          Instances For

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

                            Instances For
                              @[inline, reducible]

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

                              Instances For
                                @[inline, reducible]

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

                                Instances For

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

                                  Instances For

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

                                    Instances For

                                      Lemmas relating chain maps and dTo/dFrom.

                                      @[inline, reducible]

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

                                      Instances For
                                        @[inline, reducible]

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

                                        Instances For

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

                                          Instances For

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

                                            Instances For
                                              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 : α) :
                                                @[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 : α) :
                                                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) :
                                                @[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 : α) :
                                                HomologicalComplex.Hom.f (ChainComplex.ofHom X d_X sq_X Y d_Y sq_Y f comm) i = f i
                                                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)) :
                                                ChainComplex.of X d_X sq_X ChainComplex.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

                                                  Auxiliary structure for setting up the recursion in mk. This is purely an implementation detail: for some reason just using the dependent 6-tuple directly results in mk_aux taking much longer (well over the -T100000 limit) to elaborate.

                                                  Instances For
                                                    def ChainComplex.MkStruct.flat {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (t : ChainComplex.MkStruct V) :
                                                    (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ X₀) ×' (d₁ : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d₁ d₀ = 0

                                                    Flatten to a tuple.

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

                                                      Auxiliary definition for mk.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      • ChainComplex.mkAux X₀ X₁ X₂ d₀ d₁ s succ 0 = { X₀ := X₀, X₁ := X₁, X₂ := X₂, d₀ := d₀, d₁ := d₁, s := s }
                                                      Instances For
                                                        def ChainComplex.mk {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ X₀) ×' (d₁ : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) → (X₃ : V) ×' (d₂ : X₃ t.snd.snd.fst) ×' CategoryTheory.CategoryStruct.comp d₂ t.snd.snd.snd.snd.fst = 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₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ X₀) ×' (d₁ : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) → (X₃ : V) ×' (d₂ : X₃ t.snd.snd.fst) ×' CategoryTheory.CategoryStruct.comp d₂ t.snd.snd.snd.snd.fst = 0) :
                                                          HomologicalComplex.X (ChainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 0 = X₀
                                                          @[simp]
                                                          theorem ChainComplex.mk_X_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ X₀) ×' (d₁ : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) → (X₃ : V) ×' (d₂ : X₃ t.snd.snd.fst) ×' CategoryTheory.CategoryStruct.comp d₂ t.snd.snd.snd.snd.fst = 0) :
                                                          HomologicalComplex.X (ChainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 1 = X₁
                                                          @[simp]
                                                          theorem ChainComplex.mk_X_2 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ X₀) ×' (d₁ : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) → (X₃ : V) ×' (d₂ : X₃ t.snd.snd.fst) ×' CategoryTheory.CategoryStruct.comp d₂ t.snd.snd.snd.snd.fst = 0) :
                                                          HomologicalComplex.X (ChainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 2 = X₂
                                                          @[simp]
                                                          theorem ChainComplex.mk_d_1_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ X₀) ×' (d₁ : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) → (X₃ : V) ×' (d₂ : X₃ t.snd.snd.fst) ×' CategoryTheory.CategoryStruct.comp d₂ t.snd.snd.snd.snd.fst = 0) :
                                                          HomologicalComplex.d (ChainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 1 0 = d₀
                                                          @[simp]
                                                          theorem ChainComplex.mk_d_2_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₁ X₀) (d₁ : X₂ X₁) (s : CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₁ X₀) ×' (d₁ : X₂ X₁) ×' CategoryTheory.CategoryStruct.comp d₁ d₀ = 0) → (X₃ : V) ×' (d₂ : X₃ t.snd.snd.fst) ×' CategoryTheory.CategoryStruct.comp d₂ t.snd.snd.snd.snd.fst = 0) :
                                                          HomologicalComplex.d (ChainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 2 1 = d₁
                                                          def ChainComplex.mk' {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (d : X₁ X₀) (succ' : (t : (X₀ : V) × (X₁ : V) × (X₁ X₀)) → (X₂ : V) ×' (d : X₂ t.snd.fst) ×' CategoryTheory.CategoryStruct.comp d t.snd.snd = 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₀ : V) (X₁ : V) (d₀ : X₁ X₀) (succ' : (t : (X₀ : V) × (X₁ : V) × (X₁ X₀)) → (X₂ : V) ×' (d : X₂ t.snd.fst) ×' CategoryTheory.CategoryStruct.comp d t.snd.snd = 0) :
                                                            HomologicalComplex.X (ChainComplex.mk' X₀ X₁ d₀ succ') 0 = X₀
                                                            @[simp]
                                                            theorem ChainComplex.mk'_X_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (d₀ : X₁ X₀) (succ' : (t : (X₀ : V) × (X₁ : V) × (X₁ X₀)) → (X₂ : V) ×' (d : X₂ t.snd.fst) ×' CategoryTheory.CategoryStruct.comp d t.snd.snd = 0) :
                                                            HomologicalComplex.X (ChainComplex.mk' X₀ X₁ d₀ succ') 1 = X₁
                                                            @[simp]
                                                            theorem ChainComplex.mk'_d_1_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (d₀ : X₁ X₀) (succ' : (t : (X₀ : V) × (X₁ : V) × (X₁ X₀)) → (X₂ : V) ×' (d : X₂ t.snd.fst) ×' CategoryTheory.CategoryStruct.comp d t.snd.snd = 0) :
                                                            HomologicalComplex.d (ChainComplex.mk' X₀ X₁ d₀ succ') 1 0 = d₀

                                                            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.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            • ChainComplex.mkHomAux P Q zero one one_zero_comm succ 0 = { fst := zero, snd := { fst := one, snd := one_zero_comm } }
                                                            Instances For

                                                              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_succ_succ {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P : ChainComplex V ) (Q : ChainComplex V ) (zero : HomologicalComplex.X P 0 HomologicalComplex.X Q 0) (one : HomologicalComplex.X P 1 HomologicalComplex.X Q 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp one (HomologicalComplex.d Q 1 0) = CategoryTheory.CategoryStruct.comp (HomologicalComplex.d P 1 0) zero) (succ : (n : ) → (p : (f : HomologicalComplex.X P n HomologicalComplex.X Q n) ×' (f' : HomologicalComplex.X P (n + 1) HomologicalComplex.X Q (n + 1)) ×' CategoryTheory.CategoryStruct.comp f' (HomologicalComplex.d Q (n + 1) n) = CategoryTheory.CategoryStruct.comp (HomologicalComplex.d P (n + 1) n) f) → (f'' : HomologicalComplex.X P (n + 2) HomologicalComplex.X Q (n + 2)) ×' CategoryTheory.CategoryStruct.comp f'' (HomologicalComplex.d Q (n + 2) (n + 1)) = CategoryTheory.CategoryStruct.comp (HomologicalComplex.d P (n + 2) (n + 1)) p.snd.fst) (n : ) :
                                                                HomologicalComplex.Hom.f (ChainComplex.mkHom P Q zero one one_zero_comm succ) (n + 2) = (succ n { fst := HomologicalComplex.Hom.f (ChainComplex.mkHom P Q zero one one_zero_comm succ) n, snd := { fst := HomologicalComplex.Hom.f (ChainComplex.mkHom P Q zero one one_zero_comm succ) (n + 1), snd := (_ : CategoryTheory.CategoryStruct.comp (HomologicalComplex.Hom.f (ChainComplex.mkHom P Q zero one one_zero_comm succ) (n + 1)) (HomologicalComplex.d Q (n + 1) n) = CategoryTheory.CategoryStruct.comp (HomologicalComplex.d P (n + 1) n) (HomologicalComplex.Hom.f (ChainComplex.mkHom P Q zero one one_zero_comm succ) n)) } }).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 : α) :
                                                                  @[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 : α) :
                                                                  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) :
                                                                  @[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 : α) :
                                                                  HomologicalComplex.Hom.f (CochainComplex.ofHom X d_X sq_X Y d_Y sq_Y f comm) i = f i
                                                                  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))) :

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

                                                                  Instances For

                                                                    Auxiliary structure for setting up the recursion in mk. This is purely an implementation detail: for some reason just using the dependent 6-tuple directly results in mkAux taking much longer (well over the -T100000 limit) to elaborate.

                                                                    Instances For
                                                                      def CochainComplex.MkStruct.flat {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (t : CochainComplex.MkStruct V) :
                                                                      (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ X₁) ×' (d₁ : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp d₀ d₁ = 0

                                                                      Flatten to a tuple.

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

                                                                        Auxiliary definition for mk.

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        • CochainComplex.mkAux X₀ X₁ X₂ d₀ d₁ s succ 0 = { X₀ := X₀, X₁ := X₁, X₂ := X₂, d₀ := d₀, d₁ := d₁, s := s }
                                                                        Instances For
                                                                          def CochainComplex.mk {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ X₁) ×' (d₁ : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) → (X₃ : V) ×' (d₂ : t.snd.snd.fst X₃) ×' CategoryTheory.CategoryStruct.comp t.snd.snd.snd.snd.fst 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₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ X₁) ×' (d₁ : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) → (X₃ : V) ×' (d₂ : t.snd.snd.fst X₃) ×' CategoryTheory.CategoryStruct.comp t.snd.snd.snd.snd.fst d₂ = 0) :
                                                                            HomologicalComplex.X (CochainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 0 = X₀
                                                                            @[simp]
                                                                            theorem CochainComplex.mk_X_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ X₁) ×' (d₁ : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) → (X₃ : V) ×' (d₂ : t.snd.snd.fst X₃) ×' CategoryTheory.CategoryStruct.comp t.snd.snd.snd.snd.fst d₂ = 0) :
                                                                            HomologicalComplex.X (CochainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 1 = X₁
                                                                            @[simp]
                                                                            theorem CochainComplex.mk_X_2 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ X₁) ×' (d₁ : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) → (X₃ : V) ×' (d₂ : t.snd.snd.fst X₃) ×' CategoryTheory.CategoryStruct.comp t.snd.snd.snd.snd.fst d₂ = 0) :
                                                                            HomologicalComplex.X (CochainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 2 = X₂
                                                                            @[simp]
                                                                            theorem CochainComplex.mk_d_1_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ X₁) ×' (d₁ : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) → (X₃ : V) ×' (d₂ : t.snd.snd.fst X₃) ×' CategoryTheory.CategoryStruct.comp t.snd.snd.snd.snd.fst d₂ = 0) :
                                                                            HomologicalComplex.d (CochainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 0 1 = d₀
                                                                            @[simp]
                                                                            theorem CochainComplex.mk_d_2_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (X₂ : V) (d₀ : X₀ X₁) (d₁ : X₁ X₂) (s : CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) (succ : (t : (X₀ : V) ×' (X₁ : V) ×' (X₂ : V) ×' (d₀ : X₀ X₁) ×' (d₁ : X₁ X₂) ×' CategoryTheory.CategoryStruct.comp d₀ d₁ = 0) → (X₃ : V) ×' (d₂ : t.snd.snd.fst X₃) ×' CategoryTheory.CategoryStruct.comp t.snd.snd.snd.snd.fst d₂ = 0) :
                                                                            HomologicalComplex.d (CochainComplex.mk X₀ X₁ X₂ d₀ d₁ s succ) 1 2 = d₁
                                                                            def CochainComplex.mk' {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (d : X₀ X₁) (succ' : (t : (X₀ : V) × (X₁ : V) × (X₀ X₁)) → (X₂ : V) ×' (d : t.snd.fst X₂) ×' CategoryTheory.CategoryStruct.comp t.snd.snd 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₀ : V) (X₁ : V) (d₀ : X₀ X₁) (succ' : (t : (X₀ : V) × (X₁ : V) × (X₀ X₁)) → (X₂ : V) ×' (d : t.snd.fst X₂) ×' CategoryTheory.CategoryStruct.comp t.snd.snd d = 0) :
                                                                              HomologicalComplex.X (CochainComplex.mk' X₀ X₁ d₀ succ') 0 = X₀
                                                                              @[simp]
                                                                              theorem CochainComplex.mk'_X_1 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (d₀ : X₀ X₁) (succ' : (t : (X₀ : V) × (X₁ : V) × (X₀ X₁)) → (X₂ : V) ×' (d : t.snd.fst X₂) ×' CategoryTheory.CategoryStruct.comp t.snd.snd d = 0) :
                                                                              HomologicalComplex.X (CochainComplex.mk' X₀ X₁ d₀ succ') 1 = X₁
                                                                              @[simp]
                                                                              theorem CochainComplex.mk'_d_1_0 {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (X₀ : V) (X₁ : V) (d₀ : X₀ X₁) (succ' : (t : (X₀ : V) × (X₁ : V) × (X₀ X₁)) → (X₂ : V) ×' (d : t.snd.fst X₂) ×' CategoryTheory.CategoryStruct.comp t.snd.snd d = 0) :
                                                                              HomologicalComplex.d (CochainComplex.mk' X₀ X₁ d₀ succ') 0 1 = d₀

                                                                              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.

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              • CochainComplex.mkHomAux P Q zero one one_zero_comm succ 0 = { fst := zero, snd := { fst := one, snd := one_zero_comm } }
                                                                              Instances For

                                                                                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_succ_succ {V : Type u} [CategoryTheory.Category.{v, u} V] [CategoryTheory.Limits.HasZeroMorphisms V] (P : CochainComplex V ) (Q : CochainComplex V ) (zero : HomologicalComplex.X P 0 HomologicalComplex.X Q 0) (one : HomologicalComplex.X P 1 HomologicalComplex.X Q 1) (one_zero_comm : CategoryTheory.CategoryStruct.comp zero (HomologicalComplex.d Q 0 1) = CategoryTheory.CategoryStruct.comp (HomologicalComplex.d P 0 1) one) (succ : (n : ) → (p : (f : HomologicalComplex.X P n HomologicalComplex.X Q n) ×' (f' : HomologicalComplex.X P (n + 1) HomologicalComplex.X Q (n + 1)) ×' CategoryTheory.CategoryStruct.comp f (HomologicalComplex.d Q n (n + 1)) = CategoryTheory.CategoryStruct.comp (HomologicalComplex.d P n (n + 1)) f') → (f'' : HomologicalComplex.X P (n + 2) HomologicalComplex.X Q (n + 2)) ×' CategoryTheory.CategoryStruct.comp p.snd.fst (HomologicalComplex.d Q (n + 1) (n + 2)) = CategoryTheory.CategoryStruct.comp (HomologicalComplex.d P (n + 1) (n + 2)) f'') (n : ) :
                                                                                  HomologicalComplex.Hom.f (CochainComplex.mkHom P Q zero one one_zero_comm succ) (n + 2) = (succ n { fst := HomologicalComplex.Hom.f (CochainComplex.mkHom P Q zero one one_zero_comm succ) n, snd := { fst := HomologicalComplex.Hom.f (CochainComplex.mkHom P Q zero one one_zero_comm succ) (n + 1), snd := (_ : CategoryTheory.CategoryStruct.comp (HomologicalComplex.Hom.f (CochainComplex.mkHom P Q zero one one_zero_comm succ) n) (HomologicalComplex.d Q n (n + 1)) = CategoryTheory.CategoryStruct.comp (HomologicalComplex.d P n (n + 1)) (HomologicalComplex.Hom.f (CochainComplex.mkHom P Q zero one one_zero_comm succ) (n + 1))) } }).fst