Skip to content

Commit 07d3120

Browse files
authored
Merge pull request #1897 from Alizter/ps/rr/add_missing_coherence_for_twoonecat
add missing coherence for TwoOneCat
2 parents 2bd6c4a + 07a55d8 commit 07d3120

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

theories/Pointed/Core.v

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,11 @@ Proof.
644644
srapply Build_pHomotopy.
645645
1: reflexivity.
646646
by pelim f p q i g h.
647+
- intros A B C f g h k p q.
648+
snrapply Build_pHomotopy.
649+
+ intros x.
650+
exact (concat_Ap q _)^.
651+
+ by pelim p f g q h k.
647652
- intros A B C D f g r1 r2 s1.
648653
srapply Build_pHomotopy.
649654
1: exact (fun _ => concat_p1 _ @ (concat_1p _)^).

theories/WildCat/TwoOneCat.v

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Require Import Basics.Overture.
1+
Require Import Basics.Overture Basics.Tactics.
22
Require Import WildCat.Core.
33
Require Import WildCat.NatTrans.
44

@@ -10,6 +10,9 @@ Class Is21Cat (A : Type) `{Is1Cat A, !Is3Graph A} :=
1010
is1gpd_hom : forall (a b : A), Is1Gpd (a $-> b) ;
1111
is1functor_postcomp : forall (a b c : A) (g : b $-> c), Is1Functor (cat_postcomp a g) ;
1212
is1functor_precomp : forall (a b c : A) (f : a $-> b), Is1Functor (cat_precomp c f) ;
13+
bifunctor_coh_comp : forall {a b c : A} {f f' : a $-> b} {g g' : b $-> c}
14+
(p : f $== f') (p' : g $== g'),
15+
(p' $@R f) $@ (g' $@L p) $== (g $@L p) $@ (p' $@R f') ;
1316

1417
(** Naturality of the associator in each variable separately *)
1518
is1natural_cat_assoc_l : forall (a b c d : A) (f : a $-> b) (g : b $-> c),
@@ -50,3 +53,41 @@ Global Existing Instance is1natural_cat_assoc_m.
5053
Global Existing Instance is1natural_cat_assoc_r.
5154
Global Existing Instance is1natural_cat_idl.
5255
Global Existing Instance is1natural_cat_idr.
56+
57+
(** *** Whiskering functoriality *)
58+
59+
Definition cat_postwhisker_pp {A} `{Is21Cat A} {a b c : A}
60+
{f g h : a $-> b} (k : b $-> c) (p : f $== g) (q : g $== h)
61+
: k $@L (p $@ q) $== (k $@L p) $@ (k $@L q).
62+
Proof.
63+
rapply fmap_comp.
64+
Defined.
65+
66+
Definition cat_prewhisker_pp {A} `{Is21Cat A} {a b c : A}
67+
{f g h : b $-> c} (k : a $-> b) (p : f $== g) (q : g $== h)
68+
: (p $@ q) $@R k $== (p $@R k) $@ (q $@R k).
69+
Proof.
70+
rapply fmap_comp.
71+
Defined.
72+
73+
(** *** Exchange law *)
74+
75+
Definition cat_exchange {A : Type} `{Is21Cat A} {a b c : A}
76+
{f f' f'' : a $-> b} {g g' g'' : b $-> c}
77+
(p : f $== f') (q : f' $== f'') (r : g $== g') (s : g' $== g'')
78+
: (p $@ q) $@@ (r $@ s) $== (p $@@ r) $@ (q $@@ s).
79+
Proof.
80+
unfold "$@@".
81+
(** We use the distributivity of [$@R] and [$@L] in a (2,1)-category (since they are functors) to see that we have the same dadta on both sides of the 3-morphism. *)
82+
nrefine ((_ $@L cat_prewhisker_pp _ _ _ ) $@ _).
83+
nrefine ((cat_postwhisker_pp _ _ _ $@R _) $@ _).
84+
(** Now we reassociate and whisker on the left and right. *)
85+
nrefine (cat_assoc _ _ _ $@ _).
86+
refine (_ $@ (cat_assoc _ _ _)^$).
87+
nrefine (_ $@L _).
88+
refine (_ $@ cat_assoc _ _ _).
89+
refine ((cat_assoc _ _ _)^$ $@ _).
90+
nrefine (_ $@R _).
91+
(** Finally we are left with the bifunctoriality condition for left and right whiskering which is part of the data of the (2,1)-cat. *)
92+
apply bifunctor_coh_comp.
93+
Defined.

theories/WildCat/Universe.v

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ Defined.
149149
Global Instance is21cat_type : Is21Cat Type.
150150
Proof.
151151
snrapply Build_Is21Cat.
152-
1-6: exact _.
152+
1-4, 6-7: exact _.
153+
- intros a b c f g h k p q x; cbn.
154+
symmetry.
155+
apply concat_Ap.
153156
- intros a b c d f g h i p x; cbn.
154157
exact (concat_p1 _ @ ap_compose _ _ _ @ (concat_1p _)^).
155158
- intros a b f g p x; cbn.

0 commit comments

Comments
 (0)