Homological complexes. #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
A homological_complex V c
with a "shape" controlled by c : complex_shape ι
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 chain_complex V α
for
α
-indexed chain complexes in which d i j ≠ 0
only if j + 1 = i
,
and similarly cochain_complex V α
, with i = j + 1
.
There is a category structure, where morphisms are chain maps.
For C : homological_complex V c
, we define C.X_next 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.X_prev j
.
Defined in terms of these we have C.d_from i : C.X i ⟶ C.X_next i
and
C.d_to j : C.X_prev j ⟶ C.X j
, which are either defined as C.d i j
, or zero, as needed.
- X : ι → V
- d : Π (i j : ι), self.X i ⟶ self.X j
- shape' : (∀ (i j : ι), ¬c.rel i j → self.d i j = 0) . "obviously"
- d_comp_d' : (∀ (i j k : ι), c.rel i j → c.rel j k → self.d i j ≫ self.d j k = 0) . "obviously"
A homological_complex V c
with a "shape" controlled by c : complex_shape ι
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 homological_complex
- homological_complex.has_sizeof_inst
- homological_complex.category_theory.category
- homological_complex.category_theory.limits.has_zero_morphisms
- homological_complex.category_theory.limits.has_zero_object
- homological_complex.inhabited
- homological_complex.category_theory.preadditive
- category_theory.idempotents.homological_complex.category_theory.is_idempotent_complete
An α
-indexed chain complex is a homological_complex
in which d i j ≠ 0
only if j + 1 = i
.
An α
-indexed cochain complex is a homological_complex
in which d i j ≠ 0
only if i + 1 = j
.
- f : Π (i : ι), A.X i ⟶ B.X i
- comm' : (∀ (i j : ι), c.rel i j → self.f i ≫ B.d i j = A.d i j ≫ self.f j) . "obviously"
A morphism of homological complexes consists of maps between the chain groups, commuting with the differentials.
Instances for homological_complex.hom
- homological_complex.hom.has_sizeof_inst
- homological_complex.hom.inhabited
Identity chain map.
Composition of chain maps.
Equations
- homological_complex.category_theory.category = {to_category_struct := {to_quiver := {hom := homological_complex.hom c}, id := homological_complex.id c, comp := homological_complex.comp c}, id_comp' := _, comp_id' := _, assoc' := _}
Equations
- homological_complex.category_theory.limits.has_zero_morphisms = {has_zero := λ (C D : homological_complex V c), {zero := {f := λ (i : ι), 0, comm' := _}}, comp_zero' := _, zero_comp' := _}
The zero complex
Equations
The functor picking out the i
-th object of a complex.
Equations
- homological_complex.eval V c i = {obj := λ (C : homological_complex V c), C.X i, map := λ (C D : homological_complex V c) (f : C ⟶ D), f.f i, map_id' := _, map_comp' := _}
Instances for homological_complex.eval
The functor forgetting the differential in a complex, obtaining a graded object.
Equations
- homological_complex.forget V c = {obj := λ (C : homological_complex V c), C.X, map := λ (_x _x_1 : homological_complex V c) (f : _x ⟶ _x_1), f.f, map_id' := _, map_comp' := _}
Forgetting the differentials than picking out the i
-th object is the same as
just picking out the i
-th object.
Equations
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 eq_to_hom
.
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 eq_to_hom
.
Either C.X i
, if there is some i
with c.rel i j
, or C.X j
.
If c.rel i j
, then C.X_prev j
is isomorphic to C.X i
.
Equations
If there is no i
so c.rel i j
, then C.X_prev j
is isomorphic to C.X j
.
Equations
Either C.X j
, if there is some j
with c.rel i j
, or C.X i
.
If c.rel i j
, then C.X_next i
is isomorphic to C.X j
.
Equations
If there is no j
so c.rel i j
, then C.X_next i
is isomorphic to C.X i
.
Equations
The differential mapping into C.X j
, or zero if there isn't one.
The differential mapping out of C.X i
, or zero if there isn't one.
The i
-th component of an isomorphism of chain complexes.
Equations
- homological_complex.hom.iso_app f i = (homological_complex.eval V c i).map_iso f
Construct an isomorphism of chain complexes from isomorphism of the objects which commute with the differentials.
Equations
- homological_complex.hom.iso_of_components f hf = {hom := {f := λ (i : ι), (f i).hom, comm' := hf}, inv := {f := λ (i : ι), (f i).inv, comm' := _}, hom_inv_id' := _, inv_hom_id' := _}
Lemmas relating chain maps and d_to
/d_from
.
f.prev j
is f.f i
if there is some r i j
, and f.f j
otherwise.
f.next i
is f.f j
if there is some r i j
, and f.f j
otherwise.
A morphism of chain complexes induces a morphism of arrows of the differentials out of each object.
Equations
A morphism of chain complexes induces a morphism of arrows of the differentials into each object.
Equations
Construct an α
-indexed chain complex from a dependently-typed differential.
A constructor for chain maps between α
-indexed chain complexes built using chain_complex.of
,
from a dependently typed collection of morphisms.
Equations
- chain_complex.of_hom X d_X sq_X Y d_Y sq_Y f comm = {f := f, comm' := _}
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 chain_complex.mk_struct
- chain_complex.mk_struct.has_sizeof_inst
Flatten to a tuple.
Auxiliary definition for mk
.
Equations
- chain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ (n + 1) = let p : chain_complex.mk_struct V := chain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ n in {X₀ := p.X₁, X₁ := p.X₂, X₂ := (succ p.flat).fst, d₀ := p.d₁, d₁ := (succ p.flat).snd.fst, s := _}
- chain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ 0 = {X₀ := X₀, X₁ := X₁, X₂ := X₂, d₀ := d₀, d₁ := d₁, s := s}
A 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 appropiately to zero.
See also mk'
, which only sees the previous differential in the inductive step.
Equations
- chain_complex.mk X₀ X₁ X₂ d₀ d₁ s succ = chain_complex.of (λ (n : ℕ), (chain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ n).X₀) (λ (n : ℕ), (chain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ n).d₀) _
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.
An auxiliary construction for mk_hom
.
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 mk_hom
.
Equations
- P.mk_hom_aux Q zero one one_zero_comm succ (n + 1) = ⟨(P.mk_hom_aux Q zero one one_zero_comm succ n).snd.fst, ⟨(succ n (P.mk_hom_aux Q zero one one_zero_comm succ n)).fst, _⟩⟩
- P.mk_hom_aux Q zero one one_zero_comm succ 0 = ⟨zero, ⟨one, one_zero_comm⟩⟩
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.
Construct an α
-indexed cochain complex from a dependently-typed differential.
A constructor for chain maps between α
-indexed cochain complexes built using cochain_complex.of
,
from a dependently typed collection of morphisms.
Equations
- cochain_complex.of_hom X d_X sq_X Y d_Y sq_Y f comm = {f := f, comm' := _}
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 cochain_complex.mk_struct
- cochain_complex.mk_struct.has_sizeof_inst
Flatten to a tuple.
Auxiliary definition for mk
.
Equations
- cochain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ (n + 1) = let p : cochain_complex.mk_struct V := cochain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ n in {X₀ := p.X₁, X₁ := p.X₂, X₂ := (succ p.flat).fst, d₀ := p.d₁, d₁ := (succ p.flat).snd.fst, s := _}
- cochain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ 0 = {X₀ := X₀, X₁ := X₁, X₂ := X₂, d₀ := d₀, d₁ := d₁, s := s}
A 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 appropiately to zero.
See also mk'
, which only sees the previous differential in the inductive step.
Equations
- cochain_complex.mk X₀ X₁ X₂ d₀ d₁ s succ = cochain_complex.of (λ (n : ℕ), (cochain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ n).X₀) (λ (n : ℕ), (cochain_complex.mk_aux X₀ X₁ X₂ d₀ d₁ s succ n).d₀) _
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.
An auxiliary construction for mk_hom
.
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 mk_hom
.
Equations
- P.mk_hom_aux Q zero one one_zero_comm succ (n + 1) = ⟨(P.mk_hom_aux Q zero one one_zero_comm succ n).snd.fst, ⟨(succ n (P.mk_hom_aux Q zero one one_zero_comm succ n)).fst, _⟩⟩
- P.mk_hom_aux Q zero one one_zero_comm succ 0 = ⟨zero, ⟨one, one_zero_comm⟩⟩
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.