Definition precategory_total_comp'' (C : precategory_data) : ∏ f g : total_morphisms C, precategory_target C f = precategory_source C g -> total_morphisms C. Proof. intros f g e. destruct f as [[a b] f]. simpl in *. destruct g as [[b' c] g]. simpl in *. unfold precategory_target in e; simpl in e. unfold precategory_source in e; simpl in e. simpl. exists (make_dirprod a c). simpl. exact ((f · idtomor _ _ e) · g). Defined.
Require Import UniMath.Foundations.PartA. Require Import UniMath.Foundations.Sets. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Setcategories.