Lean4
/-- An additive functor induces a functor between homological complexes.
This is sometimes called the "prolongation".
-/
@[simps]
def mapHomologicalComplex (F : W₁ ⥤ W₂) [F.PreservesZeroMorphisms] (c : ComplexShape ι) :
HomologicalComplex W₁ c ⥤ HomologicalComplex W₂ c
where
obj
C :=
{ X := fun i => F.obj (C.X i)
d := fun i j => F.map (C.d i j)
shape := fun i j w => by rw [C.shape _ _ w, F.map_zero]
d_comp_d' := fun i j k _ _ => by rw [← F.map_comp, C.d_comp_d, F.map_zero] }
map
f :=
{ f := fun i => F.map (f.f i)
comm' := fun i j _ => by
dsimp
rw [← F.map_comp, ← F.map_comp, f.comm] }