Skip to content

Commit d2f9b8c

Browse files
Merge pull request #2259 from jdchristensen/ap_pV-zigzag
Add ap_pV and things related to suspensions and joins
2 parents 16b3dd7 + 65a3671 commit d2f9b8c

File tree

8 files changed

+173
-104
lines changed

8 files changed

+173
-104
lines changed

theories/Basics/PathGroupoids.v

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,16 @@ Definition inverse2 {A : Type} {x y : A} {p q : x = y} (h : p = q)
11351135
: p^ = q^
11361136
:= ap inverse h.
11371137

1138+
(** Two common combinations of [ap_pp] and [ap_V]. *)
1139+
1140+
Definition ap_pV {A B : Type} (f : A -> B) {a0 a1 a0' : A} (p : a0 = a1) (q : a0' = a1)
1141+
: ap f (p @ q^) = ap f p @ (ap f q)^
1142+
:= ap_pp f p q^ @ (1 @@ ap_V f q).
1143+
1144+
Definition ap_Vp {A B : Type} (f : A -> B) {a0 a1 a1' : A} (p : a0 = a1) (q : a0 = a1')
1145+
: ap f (p^ @ q) = (ap f p)^ @ ap f q
1146+
:= ap_pp f p^ q @ (ap_V f p @@ 1).
1147+
11381148
(** Some higher coherences *)
11391149

11401150
Lemma ap_pp_concat_p1 {A B} (f : A -> B) {a b : A} (p : a = b)
@@ -1149,15 +1159,14 @@ Proof.
11491159
destruct p; reflexivity.
11501160
Defined.
11511161

1152-
Lemma ap_pp_concat_pV {A B} (f : A -> B) {x y : A} (p : x = y)
1153-
: ap_pp f p p^ @ ((1 @@ ap_V f p) @ concat_pV (ap f p))
1154-
= ap (ap f) (concat_pV p).
1162+
Lemma ap_pV_concat_pV {A B} (f : A -> B) {x y : A} (p : x = y)
1163+
: ap_pV f p p @ concat_pV (ap f p) = ap (ap f) (concat_pV p).
11551164
Proof.
11561165
destruct p; reflexivity.
11571166
Defined.
11581167

1159-
Lemma ap_pp_concat_Vp {A B} (f : A -> B) {x y : A} (p : x = y)
1160-
: ap_pp f p^ p @ ((ap_V f p @@ 1) @ concat_Vp (ap f p))
1168+
Lemma ap_Vp_concat_Vp {A B} (f : A -> B) {x y : A} (p : x = y)
1169+
: ap_Vp f p p @ concat_Vp (ap f p)
11611170
= ap (ap f) (concat_Vp p).
11621171
Proof.
11631172
destruct p; reflexivity.
@@ -1175,6 +1184,17 @@ Proof.
11751184
destruct r, p; reflexivity.
11761185
Defined.
11771186

1187+
(** Often [ap_pV_concat_pV] is combined with [concat_pV_inverse2] using a beta rule for [ap f p]. This and several above are best read from right-to-left, and the name here reflects the right-hand-side. *)
1188+
Definition ap_ap_concat_pV {A B} (f : A -> B) {x y : A} (p : x = y)
1189+
(q : f x = f y) (r : ap f p = q)
1190+
: ap_pV f p p @ ((r @@ inverse2 r) @ concat_pV q) = ap (ap f) (concat_pV p)
1191+
:= (1 @@ concat_pV_inverse2 _ q r) @ ap_pV_concat_pV f p.
1192+
1193+
Definition ap_ap_concat_Vp {A B} (f : A -> B) {x y : A} (p : x = y)
1194+
(q : f x = f y) (r : ap f p = q)
1195+
: ap_Vp f p p @ ((inverse2 r @@ r) @ concat_Vp q) = ap (ap f) (concat_Vp p)
1196+
:= (1 @@ concat_Vp_inverse2 _ q r) @ ap_Vp_concat_Vp f p.
1197+
11781198
(** *** Whiskering *)
11791199

11801200
Definition whiskerL {A : Type} {x y z : A} (p : x = y)

theories/Homotopy/Join/Core.v

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,26 @@ End Join.
143143
Arguments joinl {A B}%_type_scope _ , [A] B _.
144144
Arguments joinr {A B}%_type_scope _ , A [B] _.
145145

146+
(** ** Zigzags in joins *)
147+
148+
(** These paths are very common, so we give them names. *)
149+
Definition zigzag {A B : Type} (a a' : A) (b : B)
150+
: joinl a = joinl a'
151+
:= jglue a b @ (jglue a' b)^.
152+
153+
Definition zagzig {A B : Type} (a : A) (b b' : B)
154+
: joinr b = joinr b'
155+
:= (jglue a b)^ @ jglue a b'.
156+
157+
(** And we give a beta rule for zigzags. *)
158+
Definition Join_rec_beta_zigzag {A B P : Type} (P_A : A -> P)
159+
(P_B : B -> P) (P_g : forall a b, P_A a = P_B b) a a' b
160+
: ap (Join_rec P_A P_B P_g) (zigzag a a' b) = P_g a b @ (P_g a' b)^.
161+
Proof.
162+
lhs napply ap_pV.
163+
exact (Join_rec_beta_jglue _ _ _ a b @@ inverse2 (Join_rec_beta_jglue _ _ _ a' b)).
164+
Defined.
165+
146166
(** * [Join_rec] gives an equivalence of 0-groupoids
147167
148168
We now prove many things about [Join_rec], for example, that it is an equivalence of 0-groupoids from the [JoinRecData] that we define next. The framework we use is a bit elaborate, but it parallels the framework used in TriJoin.v, where careful organization is essential. *)
@@ -404,6 +424,22 @@ Proof.
404424
exact (isnat (join_rec_natequiv A B) g f).
405425
Defined.
406426

427+
(** We restate the previous two results using [Join_rec] for convenience. *)
428+
Definition Join_rec_homotopic (A B : Type) {P : Type}
429+
(fl : A -> P) (fr : B -> P) (fg : forall a b, fl a = fr b)
430+
(fl' : A -> P) (fr' : B -> P) (fg' : forall a b, fl' a = fr' b)
431+
(hl : forall a, fl a = fl' a)
432+
(hr : forall b, fr b = fr' b)
433+
(hg : forall a b, fg a b @ hr b = hl a @ fg' a b)
434+
: Join_rec fl fr fg == Join_rec fl' fr' fg'
435+
:= fmap join_rec (Build_JoinRecPath _ _ _
436+
{| jl:=fl; jr:=fr; jg:=fg |} {| jl:=fl'; jr:=fr'; jg:=fg' |} hl hr hg).
437+
438+
Definition Join_rec_nat (A B : Type) {P Q : Type} (g : P -> Q)
439+
(fl : A -> P) (fr : B -> P) (fg : forall a b, fl a = fr b)
440+
: Join_rec (g o fl) (g o fr) (fun a b => ap g (fg a b)) == g o Join_rec fl fr fg
441+
:= join_rec_nat _ _ g {| jl:=fl; jr:=fr; jg:=fg |}.
442+
407443
(** * Various types of equalities between paths in joins *)
408444

409445
(** Naturality squares for given paths in [A] and [B]. *)
@@ -448,7 +484,7 @@ Section Triangle.
448484
Defined.
449485

450486
Definition triangle_h' {a a' : A} (b : B) (p : a = a')
451-
: jglue a b @ (jglue a' b)^ = ap joinl p.
487+
: zigzag a a' b = ap joinl p.
452488
Proof.
453489
destruct p.
454490
apply concat_pV.
@@ -462,7 +498,7 @@ Section Triangle.
462498
Defined.
463499

464500
Definition triangle_v' (a : A) {b b' : B} (p : b = b')
465-
: (jglue a b)^ @ jglue a b' = ap joinr p.
501+
: zagzig a b b' = ap joinr p.
466502
Proof.
467503
destruct p.
468504
apply concat_Vp.
@@ -488,7 +524,7 @@ Section Diamond.
488524
:= PathSquare (jglue a b) (jglue a' b')^ (jglue a b') (jglue a' b)^.
489525

490526
Definition diamond_h {a a' : A} (b b' : B) (p : a = a')
491-
: jglue a b @ (jglue a' b)^ = jglue a b' @ (jglue a' b')^.
527+
: zigzag a a' b = zigzag a a' b'.
492528
Proof.
493529
destruct p.
494530
exact (concat_pV _ @ (concat_pV _)^).
@@ -501,7 +537,7 @@ Section Diamond.
501537
Defined.
502538

503539
Definition diamond_v (a a' : A) {b b' : B} (p : b = b')
504-
: jglue a b @ (jglue a' b)^ = jglue a b' @ (jglue a' b')^.
540+
: zigzag a a' b = zigzag a a' b'.
505541
Proof.
506542
by destruct p.
507543
Defined.
@@ -546,6 +582,11 @@ Section FunctorJoin.
546582
: ap (functor_join f g) (jglue a b) = jglue (f a) (g b)
547583
:= join_rec_beta_jg _ a b.
548584

585+
Definition functor_join_beta_zigzag {A B C D : Type} (f : A -> C) (g : B -> D)
586+
(a a' : A) (b : B)
587+
: ap (functor_join f g) (zigzag a a' b) = zigzag (f a) (f a') (g b)
588+
:= Join_rec_beta_zigzag _ _ _ a a' b.
589+
549590
Definition functor_join_compose {A B C D E F}
550591
(f : A -> C) (g : B -> D) (h : C -> E) (i : D -> F)
551592
: functor_join (h o f) (i o g) == functor_join h i o functor_join f g.

theories/Homotopy/Join/JoinSusp.v

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ Defined.
2020
Definition susp_to_join (A : Type) : Susp A -> Join Bool A.
2121
Proof.
2222
srapply (Susp_rec (joinl true) (joinl false)).
23-
intros a.
24-
exact (jglue _ a @ (jglue _ a)^).
23+
exact (zigzag true false).
2524
Defined.
2625

2726
Instance isequiv_join_to_susp (A : Type) : IsEquiv (join_to_susp A).
@@ -33,10 +32,7 @@ Proof.
3332
transport_paths FFlr.
3433
apply equiv_p1_1q.
3534
lhs napply (ap _ _); [napply Susp_rec_beta_merid | ].
36-
lhs napply (ap_pp _ _ (jglue false a)^).
37-
lhs nrefine (_ @@ _).
38-
1: lhs napply ap_V; napply (ap inverse).
39-
1,2: napply Join_rec_beta_jglue.
35+
lhs napply (Join_rec_beta_zigzag _ _ _ true false a).
4036
apply concat_p1.
4137
- srapply (Join_ind_FFlr (join_to_susp A)); cbn beta.
4238
1: intros [|]; reflexivity.
@@ -45,10 +41,10 @@ Proof.
4541
lhs nrefine (ap _ _ @@ 1).
4642
1: napply Join_rec_beta_jglue.
4743
destruct b.
48-
all: rhs napply concat_1p.
49-
+ lhs nrefine (_ @@ 1); [napply Susp_rec_beta_merid | ].
44+
+ rhs napply concat_1p.
45+
lhs nrefine (_ @@ 1); [napply Susp_rec_beta_merid | ].
5046
apply concat_pV_p.
51-
+ apply concat_1p.
47+
+ reflexivity.
5248
Defined.
5349

5450
Definition equiv_join_susp (A : Type) : Join Bool A <~> Susp A

theories/Homotopy/Smash.v

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,9 @@ Section Smash.
181181
(Pgl : forall a, Psm a pt = Pl) (Pgr : forall b, Psm pt b = Pr) (a b : X)
182182
: ap (Smash_rec Psm Pl Pr Pgl Pgr) (gluel' a b) = Pgl a @ (Pgl b)^.
183183
Proof.
184-
lhs napply ap_pp.
184+
lhs napply ap_pV.
185185
f_ap.
186186
1: apply Smash_rec_beta_gluel.
187-
lhs napply ap_V.
188187
apply inverse2.
189188
apply Smash_rec_beta_gluel.
190189
Defined.
@@ -193,10 +192,9 @@ Section Smash.
193192
(Pgl : forall a, Psm a pt = Pl) (Pgr : forall b, Psm pt b = Pr) (a b : Y)
194193
: ap (Smash_rec Psm Pl Pr Pgl Pgr) (gluer' a b) = Pgr a @ (Pgr b)^.
195194
Proof.
196-
lhs napply ap_pp.
195+
lhs napply ap_pV.
197196
f_ap.
198197
1: apply Smash_rec_beta_gluer.
199-
lhs napply ap_V.
200198
apply inverse2.
201199
apply Smash_rec_beta_gluer.
202200
Defined.

theories/Homotopy/Suspension.v

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,39 @@ Proof.
120120
srapply Pushout_rec_beta_pglue.
121121
Defined.
122122

123+
Definition Susp_rec_beta_zigzag {X Y : Type}
124+
{H_N H_S : Y} {H_merid : X -> H_N = H_S} (x x' : X)
125+
: ap (Susp_rec H_N H_S H_merid) (merid x @ (merid x')^) = H_merid x @ (H_merid x')^.
126+
Proof.
127+
lhs napply ap_pV.
128+
exact (Susp_rec_beta_merid x @@ inverse2 (Susp_rec_beta_merid x')).
129+
Defined.
130+
131+
(** A variant of [Susp_ind_FlFr] specifically for two functions both defined using [Susp_rec]. *)
132+
Definition Susp_rec_homotopic {X Y : Type} (N S N' S' : Y)
133+
(f : X -> N = S) (f' : X -> N' = S')
134+
(p : N = N') (q : S = S') (H : forall x, f x @ q = p @ f' x)
135+
: Susp_rec N S f == Susp_rec N' S' f'.
136+
Proof.
137+
snapply Susp_ind_FlFr.
138+
- exact p.
139+
- exact q.
140+
- intro x.
141+
lhs napply (Susp_rec_beta_merid x @@ 1).
142+
rhs napply (1 @@ Susp_rec_beta_merid x).
143+
apply H.
144+
Defined.
145+
146+
(** And the special case where the two functions agree definitionally on [North] and [South]. *)
147+
Definition Susp_rec_homotopic' {X Y : Type} (N S : Y)
148+
(f g : X -> N = S) (H : f == g)
149+
: Susp_rec N S f == Susp_rec N S g.
150+
Proof.
151+
snapply Susp_rec_homotopic.
152+
1, 2: reflexivity.
153+
intro x; apply equiv_p1_1q, H.
154+
Defined.
155+
123156
(** ** Eta-rule. *)
124157

125158
(** The eta-rule for suspension states that any function out of a suspension is equal to one defined by [Susp_ind] in the obvious way. We give it first in a weak form, producing just a pointwise equality, and then turn this into an actual equality using [Funext]. *)

theories/Homotopy/Wedge.v

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,7 @@ Proof.
338338
change (?t = _) with (t = loop_susp_unit X x).
339339
lhs napply (ap_compose (psusp_pinch X)).
340340
lhs napply (ap _ (psusp_pinch_beta_merid x)).
341-
lhs napply ap_pp.
342-
lhs napply (ap (fun x => _ @ x) (ap_V _ _)).
341+
lhs napply ap_pV.
343342
apply moveR_pV.
344343
rhs napply (whiskerL _ (wedge_rec_beta_wglue _ _)).
345344
lhs napply ap_pp.
@@ -369,8 +368,7 @@ Proof.
369368
change (?t = _) with (t = loop_susp_unit X x).
370369
lhs napply (ap_compose (psusp_pinch X)).
371370
lhs napply (ap _ (psusp_pinch_beta_merid x)).
372-
lhs napply ap_pp.
373-
lhs napply (ap (fun x => _ @ x) (ap_V _ _)).
371+
lhs napply ap_pV.
374372
apply moveR_pV.
375373
rhs napply (whiskerL _ (wedge_rec_beta_wglue _ _)).
376374
lhs napply ap_pp.

theories/Pointed/pSusp.v

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -150,30 +150,30 @@ Definition loop_susp_unit_natural {X Y : pType} (f : X ->* Y)
150150
==* fmap loops (fmap psusp f) o* loop_susp_unit X.
151151
Proof.
152152
pointed_reduce.
153-
simple refine (Build_pHomotopy _ _); cbn.
153+
snapply Build_pHomotopy; cbn.
154154
- intros x; symmetry.
155-
refine (concat_1p _@ (concat_p1 _ @ _)).
156-
refine (ap_pp (Susp_rec North South (merid o f))
157-
(merid x) (merid (point X))^ @ _).
158-
refine ((1 @@ ap_V _ _) @ _).
155+
lhs napply concat_1p; lhs napply concat_p1.
156+
lhs napply (ap_pV _ (merid x) (merid point0)).
159157
exact (Susp_rec_beta_merid _ @@ inverse2 (Susp_rec_beta_merid _)).
160-
- cbn. apply moveL_pV. rewrite !inv_pp, !concat_pp_p, concat_1p; symmetry.
161-
apply moveL_Vp.
162-
refine (concat_pV_inverse2 _ _ (Susp_rec_beta_merid (point X)) @ _).
163-
apply moveL_Vp, moveL_Vp.
164-
refine (ap_pp_concat_pV _ _ @ _).
165-
apply moveL_Vp, moveL_Vp.
166-
rewrite concat_p1_1, concat_1p_1.
167-
cbn; symmetry.
168-
refine (concat_p1 _ @ _).
169-
refine (ap_compose
170-
(fun p' => (ap (Susp_rec North South (merid o f))) p' @ 1)
171-
(fun p' => 1 @ p')
172-
(concat_pV (merid (point X))) @ _).
173-
apply ap.
174-
exact (ap_compose (ap (Susp_rec North South (merid o f)))
175-
(fun p' => p' @ 1) _).
176-
Qed.
158+
- cbn. apply moveL_pV.
159+
rhs napply concat_1p.
160+
apply moveR_Vp.
161+
lhs napply concat_p1.
162+
(* Handle the [ap ... (1 @ q)] part. *)
163+
lhs napply (ap_compose (fun p => ap _ p @ 1) _ (concat_pV _)).
164+
lhs_V napply concat_1p_1.
165+
rhs napply concat_pp_p.
166+
apply whiskerL.
167+
(* Handle the [ap ... (q @ 1)] part. *)
168+
lhs napply (ap_compose _ (fun q => q @ 1) (concat_pV _)).
169+
lhs_V napply concat_p1_1.
170+
rhs napply concat_pp_p.
171+
apply whiskerL.
172+
(* Finish it off. *)
173+
symmetry.
174+
lhs napply concat_pp_p.
175+
exact (ap_ap_concat_pV _ _ _ (Susp_rec_beta_merid point0)).
176+
Defined.
177177

178178
Definition loop_susp_counit (X : pType) : psusp (loops X) ->* X
179179
:= Build_pMap (psusp (loops X)) X (Susp_rec (point X) (point X) idmap) 1.
@@ -202,25 +202,23 @@ Definition loop_susp_triangle1 (X : pType)
202202
: fmap loops (loop_susp_counit X) o* loop_susp_unit (loops X)
203203
==* pmap_idmap.
204204
Proof.
205-
simple refine (Build_pHomotopy _ _).
205+
(* This proof has a lot of overlap with [loop_susp_unit_natural]. Can a common lemma be factored out? *)
206+
snapply Build_pHomotopy.
206207
- intros p; cbn.
207-
refine (concat_1p _ @ (concat_p1 _ @ _)).
208-
refine (ap_pp (Susp_rec (point X) (point X) idmap)
209-
(merid p) (merid (point (point X = point X)))^ @ _).
210-
refine ((1 @@ ap_V _ _) @ _).
211-
refine ((Susp_rec_beta_merid p
212-
@@ inverse2 (Susp_rec_beta_merid (point (loops X)))) @ _).
213-
exact (concat_p1 _).
214-
- apply moveL_pV. destruct X as [X x]; cbn; unfold point.
215-
apply whiskerR.
216-
rewrite (concat_pV_inverse2
217-
(ap (Susp_rec x x idmap) (merid 1))
218-
1 (Susp_rec_beta_merid 1)).
219-
rewrite (ap_pp_concat_pV (Susp_rec x x idmap) (merid 1)).
220-
rewrite ap_compose, (ap_compose _ (fun p => p @ 1)).
221-
rewrite concat_1p_1; apply ap.
222-
apply concat_p1_1.
223-
Qed.
208+
lhs napply concat_1p; lhs napply concat_p1.
209+
lhs napply (ap_pV _ (merid p) _).
210+
lhs napply (Susp_rec_beta_merid _ @@ inverse2 (Susp_rec_beta_merid _)).
211+
apply concat_p1.
212+
- simpl.
213+
do 2 rhs napply concat_p1.
214+
rhs napply (ap_compose (fun p => ap _ p @ 1) _ (concat_pV _)).
215+
rhs_V napply (concat_1p_1 _ _).
216+
apply whiskerL.
217+
rhs napply (ap_compose _ (fun q => q @ 1) (concat_pV _)).
218+
rhs_V napply concat_p1_1.
219+
apply whiskerL.
220+
exact (ap_ap_concat_pV _ _ _ (Susp_rec_beta_merid pt)).
221+
Defined. (* A bit slow, ~0.9s. *)
224222

225223
Definition loop_susp_triangle2 (X : pType)
226224
: loop_susp_counit (psusp X) o* fmap psusp (loop_susp_unit X)

0 commit comments

Comments
 (0)