Lemma BinCoproduct_endo_is_identity {a b : C} (CC : BinCoproduct a b) (k : BinCoproductObject CC --> BinCoproductObject CC) (H1 : BinCoproductIn1 CC · k = BinCoproductIn1 CC) (H2 : BinCoproductIn2 CC · k = BinCoproductIn2 CC) : identity _ = k. Proof. set (H' := pr2 CC _ (BinCoproductIn1 CC) (BinCoproductIn2 CC) ); simpl in *. set (X := (∑ fg : pr1 (pr1 CC) --> BinCoproductObject CC, pr1 (pr2 (pr1 CC))· fg = BinCoproductIn1 CC × pr2 (pr2 (pr1 CC))· fg = BinCoproductIn2 CC)). set (t1 := tpair _ k (make_dirprod H1 H2) : X). set (t2 := tpair _ (identity _ ) (make_dirprod (id_right _ ) (id_right _ ) ) : X). assert (X' : t1 = t2). { apply proofirrelevancecontr. apply H'. } apply pathsinv0. apply (base_paths _ _ X'). Qed.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.NaturalTransformations. Require Import UniMath.CategoryTheory.Core.Univalence. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.PrecategoryBinProduct. Require Import UniMath.CategoryTheory.Limits.Zero. Require Import UniMath.CategoryTheory.Limits.Terminal. Require Import UniMath.CategoryTheory.Limits.Graphs.Colimits. Require Import UniMath.CategoryTheory.Limits.Coproducts. Require Import UniMath.CategoryTheory.FunctorCategory. Require Import UniMath.CategoryTheory.whiskering. Require Import UniMath.CategoryTheory.ProductCategory.