Lemma IDMappingConeEq (C : Complex A) : # (ComplexHomotFunctor A) (@identity (ComplexPreCat_Additive A) (MappingCone A (@identity (ComplexPreCat_Additive A) C))) = # (ComplexHomotFunctor A) (ZeroArrow (Additive.to_Zero (ComplexPreCat_Additive A)) _ _). Proof. use ComplexHomotFunctor_rel_mor'. - exact (MappingConeIdHomot C). - rewrite to_inv_zero. rewrite to_runax''. use MorphismEq. intros i. cbn. use (pathscomp0 (! (to_BinOpId (to_BinDirectSums A (C (i + 1)) (C i))))). unfold MappingConeIdHomot. unfold MappingConeDiff. unfold MappingConeDiff1, MappingConeDiff2, MappingConeDiff3. rewrite id_left. rewrite id_left. cbn. set (DS1 := to_BinDirectSums A (C (i + 1)) (C i)). set (DS2 := to_BinDirectSums A (C (i - 1 + 1)) (C (i - 1))). set (DS3 := to_BinDirectSums A (C (i - 1 + 1 + 1)) (C (i - 1 + 1))). set (DS4 := to_BinDirectSums A (C (i + 1 + 1)) (C (i + 1))). set (DS5 := to_BinDirectSums A (C (i + 1 - 1 + 1)) (C (i + 1 - 1))). unfold DiffTranslationComplex. rewrite to_commax'. rewrite to_premor_linear'. rewrite to_premor_linear'. rewrite to_postmor_linear'. rewrite to_postmor_linear'. rewrite <- assoc. rewrite <- assoc. rewrite <- assoc. rewrite <- transport_source_precompose. rewrite <- transport_source_precompose. rewrite <- transport_source_precompose. rewrite assoc. rewrite assoc. rewrite assoc. rewrite assoc. rewrite assoc. rewrite assoc. rewrite assoc. rewrite assoc. rewrite assoc. rewrite assoc. rewrite (to_IdIn1 DS2). rewrite id_left. rewrite id_left. rewrite (to_Unel1' DS2). rewrite ZeroArrow_comp_left. rewrite ZeroArrow_comp_left. rewrite transport_source_ZeroArrow. rewrite ZeroArrow_comp_right. rewrite to_runax''. rewrite <- to_premor_linear'. rewrite transport_target_postcompose. rewrite <- (assoc _ (to_In1 DS4)). rewrite <- (assoc _ (to_In2 DS4)). rewrite <- (assoc _ (to_In2 DS4)). rewrite (to_Unel1' DS4). rewrite (to_IdIn2 DS4). rewrite id_right. rewrite id_right. rewrite ZeroArrow_comp_right. rewrite ZeroArrow_comp_left. rewrite to_lunax''. rewrite <- to_postmor_linear'. rewrite transport_target_postcompose. rewrite <- transport_target_to_binop. assert (e1 : transportf (precategory_morphisms (C i)) (maponpaths (λ i0 : pr1 hz, BinDirectSumOb (to_BinDirectSums A (C (i0 + 1)) (C i0))) (hzrminusplus i 1)) (transportf (λ x' : A, A ⟦ x', DS3 ⟧) (maponpaths C (hzrminusplus i 1)) (to_inv (Diff C (i - 1 + 1)) · to_In1 DS3)) = to_inv (Diff C i) · to_In1 DS1). { unfold DS1. set (tmp := transport_hz_double_section_source_target A C (λ i0 : hz, (to_BinDirectSums A (C (i0 + 1)) (C i0))) (λ i0 : hz, to_inv (Diff C i0) · to_In1 (to_BinDirectSums A (C (i0 + 1)) (C i0))) _ _ (hzrminusplus i 1)). cbn beta in tmp. unfold DS3. exact (! tmp). } assert (e2 : transportf (precategory_morphisms (C i)) (maponpaths (λ i0 : pr1 hz, BinDirectSumOb (to_BinDirectSums A (C (i0 + 1)) (C i0))) (hzrminusplus i 1)) (transportf (λ x' : A, A ⟦ x', DS3 ⟧) (maponpaths C (hzrminusplus i 1)) (to_In2 DS3)) = to_In2 DS1). { unfold DS1, DS3. set (tmp := transport_hz_double_section_source_target A C (λ i0 : hz, (to_BinDirectSums A (C (i0 + 1)) (C i0))) (λ i0 : hz, to_In2 (to_BinDirectSums A (C (i0 + 1)) (C i0))) _ _ (hzrminusplus i 1)). cbn beta in tmp. exact (! tmp). } set (e3 := maponpaths_12 (to_binop _ _) e1 e2). apply (maponpaths (λ gg : _, to_Pr2 DS1 · gg)) in e3. apply (maponpaths (λ gg : _, to_binop _ _ gg (to_binop DS1 (C (i + 1)) (to_Pr1 DS1) (to_Pr2 DS1 · Diff C i) · transportf (precategory_morphisms (C (i + 1))) (maponpaths (λ i0 : pr1 hz, BinDirectSumOb (to_BinDirectSums A (C (i0 + 1)) (C i0))) (hzrplusminus i 1)) (transportf (λ x' : A, A ⟦ x', DS5 ⟧) (maponpaths C (hzrminusplus (i + 1) 1)) (to_In1 DS5))))) in e3. use (pathscomp0 _ (! e3)). clear e3. clear e1 e2. assert (e4 : transportf (precategory_morphisms (C (i + 1))) (maponpaths (λ i0 : pr1 hz, BinDirectSumOb (to_BinDirectSums A (C (i0 + 1)) (C i0))) (hzrplusminus i 1)) (transportf (λ x' : A, A ⟦ x', DS5 ⟧) (maponpaths C (hzrminusplus (i + 1) 1)) (to_In1 DS5)) = to_In1 DS1). { unfold DS1, DS5. set (tmp := transport_hz_double_section_source_target A (λ i0 : hz, C (i0 + 1)) (λ i0 : hz, (to_BinDirectSums A (C (i0 + 1)) (C i0))) (λ i0 : hz, to_In1 (to_BinDirectSums A (C (i0 + 1)) (C i0))) _ _ (hzrplusminus i 1)). cbn beta in tmp. use (pathscomp0 _ (! tmp)). clear tmp. apply maponpaths. assert (e5 : (maponpaths C (hzrminusplus (i + 1) 1)) = (maponpaths (λ i0 : hz, C (i0 + 1)) (hzrplusminus i 1))). { assert (e6 : maponpaths (λ i0 : hz, C (i0 + 1)) (hzrplusminus i 1) = maponpaths C (maponpaths (λ i0 : hz, i0 + 1) (hzrplusminus i 1))). { induction (hzrplusminus i 1). apply idpath. } rewrite e6. apply maponpaths. apply isasethz. } rewrite e5. apply idpath. } apply (maponpaths (λ gg : _, to_binop DS1 (to_BinDirectSums A (C (i + 1)) (C i)) (to_Pr2 DS1 · to_binop (C i) (to_BinDirectSums A (C (i + 1)) (C i)) (to_inv (Diff C i) · to_In1 DS1) (to_In2 DS1)) (to_binop DS1 (C (i + 1)) (to_Pr1 DS1) (to_Pr2 DS1 · Diff C i) · gg))) in e4. use (pathscomp0 _ (! e4)). clear e4. rewrite to_premor_linear'. rewrite to_postmor_linear'. rewrite <- PreAdditive_invlcomp. rewrite <- PreAdditive_invrcomp. rewrite assoc. rewrite (to_commax' A (to_inv (to_Pr2 DS1 · Diff C i · to_In1 DS1))). rewrite (to_commax' A _ (to_Pr2 DS1 · Diff C i · to_In1 DS1)). rewrite <- to_assoc. rewrite (to_assoc _ _ _ (to_Pr2 DS1 · Diff C i · to_In1 DS1)). rewrite (@to_linvax' A (Additive.to_Zero A)). rewrite to_runax''. apply idpath. Qed.
Require Import UniMath.Foundations.UnivalenceAxiom. Require Import UniMath.Foundations.PartD. Require Import UniMath.Foundations.Propositions. Require Import UniMath.Foundations.Sets. Require Import UniMath.Foundations.NaturalNumbers. Require Import UniMath.MoreFoundations.PartA. Require Import UniMath.Algebra.BinaryOperations. Require Import UniMath.Algebra.Monoids. Require Import UniMath.NumberSystems.Integers. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.TransportMorphisms. Require Import UniMath.CategoryTheory.Limits.Zero. Require Import UniMath.CategoryTheory.Limits.BinProducts. Require Import UniMath.CategoryTheory.Limits.BinCoproducts. Require Import UniMath.CategoryTheory.Limits.Equalizers. Require Import UniMath.CategoryTheory.Limits.Coequalizers. Require Import UniMath.CategoryTheory.Limits.Kernels. Require Import UniMath.CategoryTheory.Limits.Cokernels. Require Import UniMath.CategoryTheory.Limits.Pushouts. Require Import UniMath.CategoryTheory.Limits.Pullbacks. Require Import UniMath.CategoryTheory.Limits.BinDirectSums. Require Import UniMath.CategoryTheory.Monics. Require Import UniMath.CategoryTheory.Epis. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Adjunctions.Core. Require Import UniMath.CategoryTheory.Equivalences.Core. Require Import UniMath.CategoryTheory.CategoriesWithBinOps. Require Import UniMath.CategoryTheory.PrecategoriesWithAbgrops. Require Import UniMath.CategoryTheory.PreAdditive. Require Import UniMath.CategoryTheory.Additive. Require Import UniMath.CategoryTheory.Abelian. Require Import UniMath.CategoryTheory.AbelianToAdditive. Require Import UniMath.CategoryTheory.AdditiveFunctors. Require Import UniMath.HomologicalAlgebra.Complexes. Require Import UniMath.HomologicalAlgebra.KA. Require Import UniMath.HomologicalAlgebra.TranslationFunctors.