Built with Alectryon. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use instead of Ctrl.
(** * Definition of a univalent/saturated precategory, or just "category" *)
Require Import Category.Core Category.Morphisms.
Require Import HoTT.Basics HoTT.Tactics.

Set Implicit Arguments.
Generalizable All Variables.

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 C

IsTrunc 1 C
C: PreCategory
IsCategory0: IsCategory C

IsTrunc 1 C
C: PreCategory
IsCategory0: IsCategory C

forall x y : C, IsHSet (x = y)
C: PreCategory
IsCategory0: IsCategory C
x, y: C

IsHSet (x = y)
C: PreCategory
IsCategory0: IsCategory C
x, y: C

IsHSet (x <~=~> y)%category
typeclasses eauto. Qed. Record Category := { precategory_of_category :> PreCategory; iscategory_precategory_of_category :> IsCategory precategory_of_category }. Existing Instance iscategory_precategory_of_category.