Timings for Universe.v
Require Import Basics.Overture Basics.Tactics Basics.Equivalences Basics.PathGroupoids.
Require Import Types.Equiv.
Require Import WildCat.Core WildCat.Equiv WildCat.NatTrans WildCat.TwoOneCat.
(** ** The (1-)category of types *)
Instance isgraph_type@{u v} : IsGraph@{v u} Type@{u}
:= Build_IsGraph Type@{u} (fun a b => a -> b).
Instance is01cat_type : Is01Cat Type.
exact (fun a b c g f => g o f).
Instance is2graph_type : Is2Graph Type
:= fun x y => Build_IsGraph _ (fun f g => f == g).
Instance is01cat_arrow {A B : Type} : Is01Cat (A $-> B).
exact (fun f a => idpath).
exact (fun f g h p q a => q a @ p a).
Instance is0gpd_arrow {A B : Type}: Is0Gpd (A $-> B).
intros f g p a ; exact (p a)^.
Instance is0functor_type_postcomp {A B C : Type} (h : B $-> C):
Is0Functor (cat_postcomp A h).
intros f g p a; exact (ap h (p a)).
Instance is0functor_type_precomp {A B C : Type} (h : A $-> B):
Is0Functor (cat_precomp C h).
intros f g p a; exact (p (h a)).
Instance is1cat_strong_type : Is1Cat_Strong Type.
srapply Build_Is1Cat_Strong; cbn; intros; reflexivity.
Instance hasmorext_type `{Funext} : HasMorExt Type.
intros A B f g; cbn in *.
refine (isequiv_homotopic (@apD10 A (fun _ => B) f g) _).
Instance hasequivs_type : HasEquivs Type.
srefine (Build_HasEquivs Type _ _ _ _ Equiv (@IsEquiv) _ _ _ _ _ _ _ _); intros A B.
intros g r s; exact (isequiv_adjointify f g r s).
Instance hasmorext_core_type `{Funext} : HasMorExt (core Type) := _.
Definition catie_isequiv {A B : Type} {f : A $-> B}
`{IsEquiv A B f} : CatIsEquiv f.
#[export]
Hint Immediate catie_isequiv : typeclass_instances.
Instance isinitial_zero : IsInitial (A:=Type) Empty.
Instance isterminal_unit : IsTerminal (A:=Type) Unit.
(** ** The 2-category of types *)
Instance is3graph_type : Is3Graph Type.
Instance is1cat_type_hom A B : Is1Cat (A $-> B).
intros ? ? ? ? ? ? ? ?; apply concat_p_pp.
intros ? ? ? ? ? ? ? ?; apply concat_pp_p.
Instance is1gpd_type_hom (A B : Type) : Is1Gpd (A $-> B).
intros ? ? ? ?; apply concat_pV.
intros ? ? ? ?; apply concat_Vp.
Instance is1functor_cat_postcomp {A B C : Type} (g : B $-> C)
: Is1Functor (cat_postcomp A g).
intros ? ? ? ? p ?; exact (ap _ (p _)).
intros ? ? ? ? ? ?; cbn; apply ap_pp.
Instance is1functor_cat_precomp {A B C : Type} (f : A $-> B)
: Is1Functor (cat_precomp C f).
intros ? ? ? ? p ?; exact (p _).
Instance is21cat_type : Is21Cat Type.
intros a b c f g h k p q x; cbn.
snapply Build_Is1Natural.
exact (concat_p1 _ @ ap_compose _ _ _ @ (concat_1p _)^).
snapply Build_Is1Natural.
exact (concat_p1 _ @ ap_idmap _ @ (concat_1p _)^).
snapply Build_Is1Natural.
exact (concat_p1 _ @ (concat_1p _)^).