X (P : NotionOfStructure X) : PreCategory. Proof. refine (@Build_PreCategory _ (@morphism _ P) (fun xa => {| f := identity xa.1; h := is_structure_homomorphism_identity _ _ xa.2 |}) (fun xa yb zc gi fh => {| f := (f gi) o (f fh); h := is_structure_homomorphism_composition _ _ _ _ _ _ _ _ _ (h fh) (h gi) |}) _ _ _ (fun s d => istrunc_equiv_istrunc _ (issig_morphism P s d))); simpl; abstract ( repeat match goal with | |- @morphism _ P _ _ -> _ => intros [? ?]; simpl in * | |- _ -> _ => intro end; first [ apply path_morphism; exact (associativity _ _ _ _ _ _ _ _) | apply path_morphism; exact (left_identity _ _ _ _) | apply path_morphism; exact (right_identity _ _ _ _) ] ). Defined.
Require Import Category.Core. Require Import HoTT.Basics HoTT.Types HSet. Import PreCategoryOfStructures.