(** * Definition of a univalent/saturated precategory, or just "category" *)Require Import HoTT.Basics HoTT.Tactics. Set Universe Polymorphism. Set Implicit Arguments. Generalizable All Variables. Set Asymmetric Patterns. Local Open Scope morphism_scope. (** A category is a precategory for which [idtoiso] is an equivalence. *) Notation IsCategory C := (forall s d : object C, IsEquiv (@idtoiso C s d)). Notation isotoid C s d := (@equiv_inv _ _ (@idtoiso C s d) _). (** *** The objects of a category are a 1-type *)C: PreCategory
IsCategory0: IsCategory CIsTrunc 1 CC: PreCategory
IsCategory0: IsCategory CIsTrunc 1 CC: PreCategory
IsCategory0: IsCategory Cforall x y : C, IsHSet (x = y)C: PreCategory
IsCategory0: IsCategory C
x, y: CIsHSet (x = y)typeclasses eauto. Qed. Record Category := { precategory_of_category :> PreCategory; iscategory_precategory_of_category :> IsCategory precategory_of_category }. Existing Instance iscategory_precategory_of_category.C: PreCategory
IsCategory0: IsCategory C
x, y: CIsHSet (x <~=~> y)%category