|
1 | | -Require Import Basics.Overture Basics.Tactics Basics.Equivalences Types.Equiv. |
2 | | -Require Import WildCat.Core. |
3 | | -Require Import WildCat.Equiv. |
| 1 | +Require Import Basics.Overture Basics.Tactics Basics.Equivalences Basics.PathGroupoids. |
| 2 | +Require Import Types.Equiv. |
| 3 | +Require Import WildCat.Core WildCat.Equiv WildCat.NatTrans WildCat.TwoOneCat. |
4 | 4 |
|
5 | 5 | (** ** The category of types *) |
6 | 6 |
|
@@ -112,3 +112,62 @@ Proof. |
112 | 112 | intros f x. |
113 | 113 | by destruct (f x). |
114 | 114 | Defined. |
| 115 | + |
| 116 | +Global Instance is3graph_type : Is3Graph Type. |
| 117 | +Proof. |
| 118 | + intros A B f g. |
| 119 | + apply Build_IsGraph. |
| 120 | + intros p q. |
| 121 | + exact (p == q). |
| 122 | +Defined. |
| 123 | + |
| 124 | +Global Instance is1cat_type_hom A B : Is1Cat (A $-> B). |
| 125 | +Proof. |
| 126 | + repeat unshelve esplit. |
| 127 | + - intros f g h p q x. |
| 128 | + exact (q x @ p x). |
| 129 | + - intros; by symmetry. |
| 130 | + - intros f h p x. |
| 131 | + exact (p x @@ 1). |
| 132 | + - intros g h p x. |
| 133 | + exact (1 @@ p x). |
| 134 | + - intros ? ? ? ? ? ? ? ?; apply concat_p_pp. |
| 135 | + - intros ? ? ? ?. apply concat_p1. |
| 136 | + - intros ? ? ? ?. apply concat_1p. |
| 137 | +Defined. |
| 138 | + |
| 139 | +Global Instance is1gpd_type_hom (A B : Type) : Is1Gpd (A $-> B). |
| 140 | +Proof. |
| 141 | + repeat unshelve esplit. |
| 142 | + - intros ? ? ? ?; apply concat_pV. |
| 143 | + - intros ? ? ? ?; apply concat_Vp. |
| 144 | +Defined. |
| 145 | + |
| 146 | +Global Instance is1functor_cat_postcomp {A B C : Type} (g : B $-> C) |
| 147 | + : Is1Functor (cat_postcomp A g). |
| 148 | +Proof. |
| 149 | + repeat unshelve esplit. |
| 150 | + - intros ? ? ? ? p ?; exact (ap _ (p _)). |
| 151 | + - intros ? ? ? ? ? ?; cbn; apply ap_pp. |
| 152 | +Defined. |
| 153 | + |
| 154 | +Global Instance is1functor_cat_precomp {A B C : Type} (f : A $-> B) |
| 155 | + : Is1Functor (cat_precomp C f). |
| 156 | +Proof. |
| 157 | + repeat unshelve esplit. |
| 158 | + intros ? ? ? ? p ?; exact (p _). |
| 159 | +Defined. |
| 160 | + |
| 161 | +Global Instance is21cat_type : Is21Cat Type. |
| 162 | +Proof. |
| 163 | + snrapply Build_Is21Cat. |
| 164 | + 1-6: exact _. |
| 165 | + - intros a b c d f g h i p x; cbn. |
| 166 | + exact (concat_p1 _ @ ap_compose _ _ _ @ (concat_1p _)^). |
| 167 | + - intros a b f g p x; cbn. |
| 168 | + exact (concat_p1 _ @ ap_idmap _ @ (concat_1p _)^). |
| 169 | + - intros a b f g p x; cbn. |
| 170 | + exact (concat_p1 _ @ (concat_1p _)^). |
| 171 | + - reflexivity. |
| 172 | + - reflexivity. |
| 173 | +Defined. |
0 commit comments