Library HoTT.Categories.IndiscreteCategory
Require Import Functor.Core Category.Strict Category.Univalent Category.Morphisms.
Require Import Types.Unit Trunc HoTT.Tactics Equivalences.
Set Universe Polymorphism.
Set Implicit Arguments.
Generalizable All Variables.
Set Asymmetric Patterns.
Require Import Types.Unit Trunc HoTT.Tactics Equivalences.
Set Universe Polymorphism.
Set Implicit Arguments.
Generalizable All Variables.
Set Asymmetric Patterns.
The indiscrete category has exactly one morphism between any two
objects.
We define the symmetrized version of associaitivity differently
so that the dual of an indiscrete category is convertible with
the indiscrete category.
Definition indiscrete_category : PreCategory
:= @Build_PreCategory' X
(fun _ _ ⇒ Unit)
(fun _ ⇒ tt)
(fun _ _ _ _ _ ⇒ tt)
(fun _ _ _ _ _ _ _ ⇒ idpath)
(fun _ _ _ _ _ _ _ ⇒ idpath)
(fun _ _ f ⇒ match f with tt ⇒ idpath end)
(fun _ _ f ⇒ match f with tt ⇒ idpath end)
(fun _ ⇒ idpath)
_.
End indiscrete_category.
Definition isstrict_indiscrete_category `{H : IsHSet X}
: IsStrictCategory (indiscrete_category X)
:= H.
: IsStrictCategory (indiscrete_category X)
:= H.
Global Instance iscategory_indiscrete_category `{H : IsHProp X}
: IsCategory (indiscrete_category X).
Proof.
intros.
eapply (isequiv_adjointify
(idtoiso (indiscrete_category X) (x := s) (y := d))
(fun _ ⇒ center _));
abstract (
repeat intro;
destruct_head_hnf @Isomorphic;
destruct_head_hnf @IsIsomorphism;
destruct_head_hnf @Unit;
path_induction_hammer
).
Defined.
End Core.
: IsCategory (indiscrete_category X).
Proof.
intros.
eapply (isequiv_adjointify
(idtoiso (indiscrete_category X) (x := s) (y := d))
(fun _ ⇒ center _));
abstract (
repeat intro;
destruct_head_hnf @Isomorphic;
destruct_head_hnf @IsIsomorphism;
destruct_head_hnf @Unit;
path_induction_hammer
).
Defined.
End Core.