Lemma InvRotMorphismIso'_eq2_2 {C1 C2 : Complex A} (f : Morphism C1 C2) (i : hz) : let DS1 := to_BinDirectSums A (C1 (i + 1 - 1 + 1)) (C2 (i + 1 - 1)) in let DS2 := to_BinDirectSums A DS1 (C1 i) in let DS3 := to_BinDirectSums A (C1 (i - 1 + 1 - 1 + 1)) (C2 (i - 1 + 1 - 1)) in let DS4 := to_BinDirectSums A DS3 (C1 (i - 1)) in let DS5 := to_BinDirectSums A (C1 (i - 1 + 1 + 1 - 1 + 1)) (C2 (i - 1 + 1 + 1 - 1)) in let DS6 := to_BinDirectSums A DS5 (C1 (i - 1 + 1)) in let DS7 := to_BinDirectSums A (C1 (i + 1 + 1 - 1 + 1)) (C2 (i + 1 + 1 - 1)) in let DS8 := to_BinDirectSums A DS7 (C1 (i + 1)) in let DS9 := to_BinDirectSums A (C1 (i + 1 - 1 + 1 - 1 + 1)) (C2 (i + 1 - 1 + 1 - 1)) in let DS10 := to_BinDirectSums A DS9 (C1 (i + 1 - 1)) in let DS11 := to_BinDirectSums A (C1 (i - 1 + 1 - 1 + 1 + 1)) (C2 (i - 1 + 1 - 1 + 1)) in to_inv (to_Pr2 DS2 · (f i · transportf (λ x' : A, A ⟦ x', DS1 ⟧) (maponpaths C2 (hzrplusminus i 1)) (to_In2 DS1) · to_In1 DS2)) = to_binop DS2 (to_BinDirectSums A (to_BinDirectSums A (C1 (i + 1 - 1 + 1)) (C2 (i + 1 - 1))) (C1 i)) (to_inv (to_Pr2 DS2 · transportf (precategory_morphisms (C1 i)) (@maponpaths hz A (λ i0 : pr1 hz, to_BinDirectSums A (to_BinDirectSums A (C1 (i0 + 1 - 1 + 1)) (C2 (i0 + 1 - 1))) (C1 i0)) _ _ (hzrminusplus i 1)) (transportf (λ x' : A, A ⟦ x', DS6 ⟧) (maponpaths C1 (hzrminusplus (i - 1 + 1) 1 @ hzrminusplus i 1)) (transportf (precategory_morphisms (C1 (i - 1 + 1 - 1 + 1))) (@maponpaths hz A (λ i0 : pr1 hz, to_BinDirectSums A (C1 (i0 + 1)) (C2 i0)) _ _ (hzrminusplus (i - 1 + 1) 1 @ ! hzrplusminus (i - 1 + 1) 1)) (to_binop (C1 (i - 1 + 1 - 1 + 1)) DS11 (to_inv (Diff C1 (i - 1 + 1 - 1 + 1)) · to_In1 DS11) (f (i - 1 + 1 - 1 + 1) · to_In2 DS11)) · to_In1 DS6)))) (to_inv (to_Pr2 DS2 · Diff C1 i · transportf (λ x' : A, A ⟦ x', DS9 ⟧) (maponpaths C1 (hzrminusplus (i + 1 - 1 + 1) 1 @ hzrminusplus (i + 1) 1)) (to_In1 DS9) · transportf (precategory_morphisms DS9) (@maponpaths hz A (λ i0 : pr1 hz, to_BinDirectSums A (to_BinDirectSums A (C1 (i0 + 1 - 1 + 1)) (C2 (i0 + 1 - 1))) (C1 i0)) _ _ (hzrplusminus i 1)) (to_In1 DS10))). Proof. intros DS1 DS2 DS3 DS4 DS5 DS6 DS7 DS8 DS9 DS10 DS11. cbn. rewrite to_binop_inv_inv. apply maponpaths. rewrite <- assoc. rewrite <- assoc. rewrite <- assoc. rewrite <- to_premor_linear'. apply cancel_precomposition. rewrite transport_compose. rewrite to_postmor_linear'. rewrite <- transport_source_to_binop. rewrite <- transport_target_to_binop. rewrite <- transport_target_postcompose. rewrite <- transport_target_postcompose. rewrite to_assoc. rewrite to_commax'. rewrite to_assoc. use (pathscomp0 (! (@to_runax'' A (Additive.to_Zero A) _ _ (f i · (transportf (λ x' : A, A ⟦ x', DS1 ⟧) (maponpaths C2 (hzrplusminus i 1)) (to_In2 DS1) · to_In1 DS2))))). use maponpaths_12. - rewrite <- transport_compose. rewrite transport_source_precompose. use (transport_target_path _ _ (! (@maponpaths hz A (λ i0 : pr1 hz, to_BinDirectSums A (to_BinDirectSums A (C1 (i0 + 1 - 1 + 1)) (C2 (i0 + 1 - 1))) (C1 i0)) _ _ (hzrminusplus i 1)))). rewrite transport_f_f. rewrite pathsinv0r. cbn. rewrite transport_target_postcompose. rewrite transport_target_postcompose. rewrite transport_target_postcompose. rewrite transport_source_precompose. set (tmp := @transport_hz_double_section A C1 C2 f _ _ (! (hzrminusplus (i - 1 + 1) 1 @ hzrminusplus i 1))). rewrite pathsinv0inv0 in tmp. cbn. cbn in tmp. rewrite <- tmp. clear tmp. rewrite transport_compose. rewrite <- assoc. apply cancel_precomposition. rewrite <- transport_source_precompose. rewrite <- transport_target_postcompose. rewrite transport_source_target_comm. rewrite <- maponpathsinv0. rewrite pathsinv0inv0. unfold DS11. unfold DS6, DS5, DS2, DS1. induction (hzrminusplus i 1). cbn. fold DS11 DS6 DS5 DS2 DS1. rewrite transport_source_precompose. apply cancel_postcomposition. rewrite pathscomp0rid. unfold DS11, DS5. induction (hzrplusminus (i - 1 + 1) 1). cbn. fold DS5. rewrite pathscomp0rid. set (tmp := @transport_hz_double_section_source_target A (λ i0 : pr1 hz, C2 i0) (λ i0 : pr1 hz, to_BinDirectSums A (C1 (i0 + 1)) (C2 i0)) (λ i0 : pr1 hz, to_In2 (to_BinDirectSums A (C1 (i0 + 1)) (C2 i0))) _ _ (hzrminusplus (i - 1 + 1 + 1 - 1) 1)). cbn in tmp. unfold DS5. use (pathscomp0 tmp). clear tmp. rewrite transport_source_target_comm. apply idpath. - rewrite <- PreAdditive_invlcomp. rewrite <- PreAdditive_invlcomp. rewrite <- transport_source_to_inv. rewrite <- transport_target_to_inv. use (pathscomp0 (! (@to_rinvax' A (Additive.to_Zero A) _ _ (transportf (precategory_morphisms (C1 i)) (@maponpaths hz A (λ i0 : pr1 hz, to_BinDirectSums A (to_BinDirectSums A (C1 (i0 + 1 - 1 + 1)) (C2 (i0 + 1 - 1))) (C1 i0)) _ _ (hzrplusminus i 1)) (Diff C1 i · (transportf (λ x' : A, A ⟦ x', DS9 ⟧) (maponpaths C1 ((hzrminusplus (i + 1 - 1 + 1) 1) @ hzrminusplus (i + 1) 1)) (to_In1 DS9) · to_In1 DS10)))))). use maponpaths_12. + apply idpath. + exact (InvRotMorphismIso'_eq2_1 f i). 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.