proposition: Lemma SumOfKernels {M:PreAdditive} {x y z X Y Z : M} (xX : BinDirectSum x X) (yY : BinDirectSum y Y) (zZ : BinDirectSum z Z) (f : x --> y) (g : y --> z) (f' : X --> Y) (g' : Y --> Z) : isKernel' f g -> isKernel' f' g' -> isKernel' (directSumMap xX yY f f') (directSumMap yY zZ g g').
proof: Proof. intros i i'. split. { refine (BinDirectSumIndArComp _ _ _ _ _ _ _ _ @ ! _). apply ToBinDirectSumUnique. - exact (zeroLeft _ @ ! zeroRight _ @ maponpaths _ (! pr1 i)). - exact (zeroLeft _ @ ! zeroRight _ @ maponpaths _ (! pr1 i')). } intros w h e. apply iscontraprop1. 2:{ assert (e1 := ! assoc _ _ _ @ ! maponpaths (precomp_with _) directSumMapEqPr1 @ assoc _ _ _ @ maponpaths (postcomp_with _) e @ zeroLeft _). assert (e2 := ! assoc _ _ _ @ ! maponpaths (precomp_with _) directSumMapEqPr2 @ assoc _ _ _ @ maponpaths (postcomp_with _) e @ zeroLeft _). induction (iscontrpr1 (pr2 i w (h · π₁) e1)) as [h1 H1]. induction (iscontrpr1 (pr2 i' w (h · π₂) e2)) as [h2 H2]. exists (ToBinDirectSum _ h1 h2). apply ToBinDirectSumsEq. + refine (! assoc _ _ _ @ _ @ H1). refine (maponpaths (precomp_with _) directSumMapEqPr1 @ _). unfold precomp_with. refine (assoc _ _ _ @ _). apply (maponpaths (postcomp_with _)). apply BinDirectSumPr1Commutes. + refine (! assoc _ _ _ @ _ @ H2). refine (maponpaths (precomp_with _) directSumMapEqPr2 @ _). unfold precomp_with. refine (assoc _ _ _ @ _). apply (maponpaths (postcomp_with _)). apply BinDirectSumPr2Commutes. } apply invproofirrelevance. intros [k K] [k' K']. apply subtypePath_prop; cbn. apply ToBinDirectSumsEq. - refine (KernelIsMonic _ _ i _ _ _ _). exact (! assoc _ _ _ @ ! maponpaths (precomp_with k) directSumMapEqPr1 @ assoc _ _ _ @ maponpaths (postcomp_with _) (K @ !K') @ ! assoc _ _ _ @ maponpaths (precomp_with k') directSumMapEqPr1 @ assoc _ _ _). - refine (KernelIsMonic _ _ i' _ _ _ _). exact (! assoc _ _ _ @ ! maponpaths (precomp_with k) directSumMapEqPr2 @ assoc _ _ _ @ maponpaths (postcomp_with _) (K @ !K') @ ! assoc _ _ _ @ maponpaths (precomp_with k') directSumMapEqPr2 @ assoc _ _ _). Qed.
imports: UniMath.Foundations.All UniMath.MoreFoundations.Notations UniMath.MoreFoundations.PartA UniMath.Algebra.BinaryOperations UniMath.Algebra.Monoids UniMath.Algebra.Groups UniMath.CategoryTheory.Core.Categories UniMath.CategoryTheory.Core.Isos UniMath.CategoryTheory.Core.Functors UniMath.CategoryTheory.Core.NaturalTransformations UniMath.CategoryTheory.Monics UniMath.CategoryTheory.Epis UniMath.CategoryTheory.Limits.Zero UniMath.CategoryTheory.Limits.Kernels UniMath.CategoryTheory.Limits.Cokernels UniMath.CategoryTheory.Limits.BinProducts UniMath.CategoryTheory.Limits.BinCoproducts UniMath.CategoryTheory.Limits.Pullbacks UniMath.CategoryTheory.Limits.Pushouts UniMath.CategoryTheory.Limits.BinDirectSums UniMath.CategoryTheory.Limits.Opp UniMath.CategoryTheory.CategoriesWithBinOps UniMath.CategoryTheory.opp_precat UniMath.CategoryTheory.PrecategoriesWithAbgrops UniMath.CategoryTheory.PreAdditive UniMath.CategoryTheory.Morphisms UniMath.CategoryTheory.Additive UniMath.CategoryTheory.Subcategory.Full UniMath.MoreFoundations.Propositions