module Cat.Gaunt where

Gaunt (pre)categories🔗

A precategory is gaunt if it is univalent and strict: its type of objects is a set, and identity in is equivalent to isomorphism in This is a truncation condition on the isomorphisms which must all be trivial.

record is-gaunt {o } (C : Precategory o ) : Type (o  ) where
    has-category : is-category C
    has-strict : is-strict C

  open Univalent.path→iso has-category hiding (hlevel) public
  open StrictIds has-category has-strict renaming (K to K-iso) public

As one would expect, being gaunt is property of a category.

module _ {o } {C : Precategory o } (gaunt : is-gaunt C) where
  open is-gaunt gaunt
  open Cat.Reasoning C

  iso-is-prop :  {x y}  is-prop (x  y)
  iso-is-prop = hlevel 1  R-H-level 

This implies that gaunt categories are skeletal: Since there is at most one isomorphism then given we can apply unique choice to retrieve the underlying map.

  gaunt→skeletal : is-skeletal C
  gaunt→skeletal = set-identity-system  _ _  squash) $
    ∥-∥-rec (has-strict _ _) (has-category .to-path)

Furthermore, if a category is skeletal and univalent, it is gaunt.

  :  {o } {C : Precategory o }
   is-skeletal C
   is-category C
   is-gaunt C
skeletal+category→gaunt skel cat .is-gaunt.has-category = cat
skeletal+category→gaunt skel cat .is-gaunt.has-strict = skeletal→strict _ skel

This implies that gaunt categories are precisely the skeletal univalent categories.

  :  {o } {C : Precategory o }
   (is-skeletal C × is-category C)  is-gaunt C
skeletal-category≃gaunt = prop-ext (hlevel 1) (hlevel 1)
     { (skel , cat)  skeletal+category→gaunt skel cat })
     gaunt  gaunt→skeletal gaunt , has-category gaunt)
  where open is-gaunt

If a category is skeletal and has only trivial automorphisms, then it is gaunt.

  :  {o } {C : Precategory o }
   is-skeletal C
   (∀ {x}  (f : Isomorphism C x x)  f  id-iso C)
   is-gaunt C

To show that is gaunt, it suffices to show that isomorphisms of are equivalent to paths. is skeletal, so it is straightforward to construct an inverse to path→iso by applying to-path to the truncation of an isomorphism. Showing that this is a right inverse is straightforward, as is strict.

skeletal+trivial-automorphisms→gaunt {C = C} skel trivial-aut =
  skeletal+category→gaunt skel $
    equiv-path→identity-system (Iso→Equiv path-iso)
    open is-gaunt

    path-iso :  {x y}  Iso (Isomorphism C x y) (x  y)
    path-iso .fst f = skel .to-path (inc f)
    path-iso .snd .is-iso.inv f = path→iso f
    path-iso .snd .is-iso.rinv _ =
      skeletal→strict C skel _ _ _ _

To see that this is a left inverse, we can use the fact that truncated isomorphisms form an identity system to contract the iso down into an automorphism. However, all automorphisms are trivial, which allows us to finish off the proof.

    path-iso {x = x} .snd .is-iso.linv f =
      IdsJ skel
         y' ∥f∥   (f : Isomorphism C x y')  path→iso (skel .to-path ∥f∥)  f)
         f  trivial-aut _  sym (trivial-aut _))
        (inc f) f