proposition: 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: 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.
imports: UniMath.Foundations.UnivalenceAxiom UniMath.Foundations.PartD UniMath.Foundations.Propositions UniMath.Foundations.Sets UniMath.Foundations.NaturalNumbers UniMath.MoreFoundations.PartA UniMath.Algebra.BinaryOperations UniMath.Algebra.Monoids UniMath.NumberSystems.Integers UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Isos UniMath.CategoryTheory.Core.TransportMorphisms UniMath.CategoryTheory.Limits.Zero UniMath.CategoryTheory.Limits.BinProducts UniMath.CategoryTheory.Limits.BinCoproducts UniMath.CategoryTheory.Limits.Equalizers UniMath.CategoryTheory.Limits.Coequalizers UniMath.CategoryTheory.Limits.Kernels UniMath.CategoryTheory.Limits.Cokernels UniMath.CategoryTheory.Limits.Pushouts UniMath.CategoryTheory.Limits.Pullbacks UniMath.CategoryTheory.Limits.BinDirectSums UniMath.CategoryTheory.Monics UniMath.CategoryTheory.Epis UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Adjunctions.Core UniMath.CategoryTheory.Equivalences.Core UniMath.CategoryTheory.CategoriesWithBinOps UniMath.CategoryTheory.PrecategoriesWithAbgrops UniMath.CategoryTheory.PreAdditive UniMath.CategoryTheory.Additive UniMath.CategoryTheory.Abelian UniMath.CategoryTheory.AbelianToAdditive UniMath.CategoryTheory.AdditiveFunctors UniMath.HomologicalAlgebra.Complexes UniMath.HomologicalAlgebra.KA UniMath.HomologicalAlgebra.TranslationFunctors