Skip to content

Commit c315f86

Browse files
Merge pull request #201 from peterlefanulumsdaine/housekeeping
Housekeeping
2 parents b5ced48 + e721f44 commit c315f86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1280
-1813
lines changed

TypeTheory/ALV1/CwF_SplitTypeCat_Cats_Standalone.v

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Main definitions:
2323
2424
*)
2525

26-
Require Import UniMath.Foundations.Sets.
26+
Require Import UniMath.Foundations.All.
27+
Require Import UniMath.MoreFoundations.All.
2728
Require Import TypeTheory.Auxiliary.CategoryTheoryImports.
2829
Require Import UniMath.CategoryTheory.Equivalences.CompositesAndInverses.
2930
Require Import TypeTheory.Auxiliary.Auxiliary.
@@ -79,7 +80,7 @@ Proof.
7980
intros Γ'; simpl in Γ'.
8081
unfold yoneda_objects_ob. apply funextsec; intros f.
8182
etrans.
82-
use (toforallpaths _ _ _ (nat_trans_ax (term_fun_mor_TM FF) _ _ _)).
83+
use (toforallpaths (nat_trans_ax (term_fun_mor_TM FF) _)).
8384
cbn. apply maponpaths, term_fun_mor_te.
8485
Qed.
8586

@@ -105,7 +106,7 @@ Lemma term_to_section_naturality {Y} {Y'}
105106
{Γ : C} (t : Tm Y Γ) (A := (pp Y : nat_trans _ _) _ t)
106107
: pr1 (term_to_section ((term_fun_mor_TM FY : nat_trans _ _) _ t))
107108
= pr1 (term_to_section t)
108-
;; Δ (!toforallpaths _ _ _ (nat_trans_eq_pointwise (term_fun_mor_pp FY) Γ) t).
109+
;; Δ (!toforallpaths (nat_trans_eq_pointwise (term_fun_mor_pp FY) Γ) t).
109110
Proof.
110111
set (t' := (term_fun_mor_TM FY : nat_trans _ _) _ t).
111112
set (A' := (pp Y' : nat_trans _ _) _ t').
@@ -122,7 +123,7 @@ Proof.
122123
etrans. apply Q_comp_ext_compare.
123124
etrans. apply @pathsinv0.
124125
set (H1 := nat_trans_eq_pointwise (term_fun_mor_Q FY A) Γ).
125-
exact (toforallpaths _ _ _ H1 _).
126+
exact (toforallpaths H1 _).
126127
cbn. apply maponpaths. apply term_to_section_recover.
127128
Qed.
128129

@@ -335,8 +336,7 @@ Proof.
335336
- etrans. apply qq_π.
336337
apply pathsinv0, qq_π.
337338
- etrans. cbn. apply maponpaths, @pathsinv0, (term_fun_mor_te FY).
338-
etrans. use (toforallpaths _ _ _
339-
(!nat_trans_ax (term_fun_mor_TM _) _ _ _)).
339+
etrans. use (toforallpaths (!nat_trans_ax (term_fun_mor_TM _) _)).
340340
etrans. cbn. apply maponpaths, @pathsinv0, W.
341341
etrans. apply term_fun_mor_te.
342342
apply W'.
@@ -601,8 +601,8 @@ Proof.
601601
apply funextsec; intros A.
602602
etrans. apply transportf_pshf.
603603
etrans.
604-
refine (toforallpaths _ _ _ _ (te _ _)).
605-
refine (toforallpaths _ _ _ _ _).
604+
refine (toforallpaths _ (te _ _)).
605+
refine (toforallpaths _ _).
606606
apply maponpaths, idtoiso_iso_to_TM_eq.
607607
apply term_fun_mor_te.
608608
Qed.
@@ -727,33 +727,33 @@ Qed.
727727
Definition compat_structures_category : category
728728
:= make_category _ has_homsets_compat_structures_precategory.
729729

730-
Definition pr1_equiv : @adj_equivalence_of_precats
730+
Definition pr1_equiv : @adj_equivalence_of_cats
731731
compat_structures_category
732732
term_fun_category
733733
compat_structures_pr1_functor.
734734
Proof.
735-
use adj_equivalence_of_precats_ff_split.
735+
use adj_equivalence_of_cats_ff_split.
736736
- apply compat_structures_pr1_fully_faithful.
737737
- apply compat_structures_pr1_split_ess_surj.
738738
Defined.
739739

740-
Definition pr2_equiv : @adj_equivalence_of_precats
740+
Definition pr2_equiv : @adj_equivalence_of_cats
741741
compat_structures_category
742742
qq_structure_category
743743
compat_structures_pr2_functor.
744744
Proof.
745-
use adj_equivalence_of_precats_ff_split.
745+
use adj_equivalence_of_cats_ff_split.
746746
- apply compat_structures_pr2_fully_faithful.
747747
- apply compat_structures_pr2_split_ess_surj.
748748
Defined.
749749

750-
Definition pr1_equiv_inv : adj_equivalence_of_precats (right_adjoint pr1_equiv).
750+
Definition pr1_equiv_inv : adj_equivalence_of_cats (right_adjoint pr1_equiv).
751751
Proof.
752-
use adj_equivalence_of_precats_inv.
752+
use adj_equivalence_of_cats_inv.
753753
Defined.
754754

755-
Definition equiv_of_structures : adj_equivalence_of_precats _
756-
:= @comp_adj_equivalence_of_precats _ _ _ _ _
755+
Definition equiv_of_structures : adj_equivalence_of_cats _
756+
:= @comp_adj_equivalence_of_cats _ _ _ _ _
757757
pr1_equiv_inv pr2_equiv.
758758

759759
Definition equiv_of_types_of_structures

TypeTheory/ALV1/CwF_SplitTypeCat_Defs.v

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ Section Obj_Ext_Structures_Disp_Utility_Lemmas.
210210
Proof.
211211
etrans.
212212
{ unfold φ. apply maponpaths.
213-
refine (toforallpaths _ _ _ _ _).
213+
refine (toforallpaths _ _).
214214
etrans.
215-
{ refine (toforallpaths _ _ _ _ _); refine (transportf_forall _ _ _). }
215+
{ refine (toforallpaths _ _); refine (transportf_forall _ _ _). }
216216
simpl. refine (transportf_forall _ _ _).
217217
}
218218
etrans. { use (pr1_transportf (nat_trans _ _)). }
@@ -390,7 +390,7 @@ Components of [Y : term_fun_structure X]:
390390
- [pp Y : TM Y --> TY X]
391391
- [Q Y A : Yo (Γ ◂ A) --> TM Y]
392392
- [Q_pp Y A : #Yo (π A) ;; yy A = Q Y A ;; pp Y]
393-
- [isPullback_Q_pp Y A : isPullback _ _ _ _ (Q_pp Y A)]
393+
- [isPullback_Q_pp Y A : isPullback (Q_pp Y A)]
394394
395395
See: Marcelo Fiore, slides 32–34 of _Discrete Generalised Polynomial Functors_ , from talk at ICALP 2012,
396396
#(<a href="http://www.cl.cam.ac.uk/~mpf23/talks/ICALP2012.pdf">link</a>)#
@@ -494,7 +494,7 @@ Proof.
494494
set (Pb := isPullback_preShv_to_pointwise (isPullback_Q_pp Y A) Γ).
495495
simpl in Pb.
496496
apply (pullback_HSET_univprop_elements _ Pb).
497-
exact (toforallpaths _ _ _ (functor_id (TY X) _) A).
497+
exact (toforallpaths (functor_id (TY X) _) A).
498498
Qed.
499499

500500
Lemma term_to_section {Y : term_fun_structure} {Γ:C} (t : Tm Y Γ)
@@ -545,7 +545,7 @@ Components of [Z : qq_morphism_structure X]:
545545
546546
- [qq Z f A : Γ' ◂ A[f] --> Γ ◂ A]
547547
- [qq_π Z f A : qq Z f A ;; π A = π _ ;; f]
548-
- [qq_π_Pb Z f A : isPullback _ _ _ _ (!qq_π Z f A)]
548+
- [qq_π_Pb Z f A : isPullback (!qq_π Z f A)]
549549
- [qq_id], [qq_comp]: functoriality for [qq]
550550
*)
551551

@@ -597,12 +597,12 @@ Definition qq_morphism_axioms (Z : qq_morphism_data) : UU
597597
:=
598598
(∏ Γ A,
599599
qq Z (identity Γ) A
600-
= Δ (toforallpaths _ _ _ (functor_id (TY X) _ ) _ ))
600+
= Δ (toforallpaths (functor_id (TY X) _ ) _ ))
601601
×
602602
(∏ Γ Γ' Γ'' (f : C⟦Γ', Γ⟧) (g : C ⟦Γ'', Γ'⟧) (A : (TY X:functor _ _ ) Γ : hSet),
603603
qq Z (g ;; f) A
604604
= Δ
605-
(toforallpaths _ _ _ (functor_comp (TY X) _ _) A)
605+
(toforallpaths (functor_comp (TY X) _ _) A)
606606
;; qq Z g (A [f])
607607
;; qq Z f A).
608608

@@ -618,14 +618,14 @@ Coercion qq_morphism_data_from_structure :
618618
Definition qq_id (Z : qq_morphism_structure)
619619
{Γ} (A : Ty X Γ)
620620
: qq Z (identity Γ) A
621-
= Δ (toforallpaths _ _ _ (functor_id (TY X) _ ) _ )
621+
= Δ (toforallpaths (functor_id (TY X) _ ) _ )
622622
:= pr1 (pr2 Z) _ _.
623623

624624
Definition qq_comp (Z : qq_morphism_structure)
625625
{Γ Γ' Γ'' : C}
626626
(f : C ⟦ Γ', Γ ⟧) (g : C ⟦ Γ'', Γ' ⟧) (A : Ty X Γ)
627627
: qq Z (g ;; f) A
628-
= Δ (toforallpaths _ _ _ (functor_comp (TY X) _ _) A)
628+
= Δ (toforallpaths (functor_comp (TY X) _ _) A)
629629
;; qq Z g (A [f]) ;; qq Z f A
630630
:= pr2 (pr2 Z) _ _ _ _ _ _.
631631

TypeTheory/ALV1/CwF_SplitTypeCat_Equivalence.v

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
Part of the [TypeTheory] library (Ahrens, Lumsdaine, Voevodsky, 2015–present).
55
*)
66

7-
Require Import UniMath.Foundations.Sets.
7+
Require Import UniMath.Foundations.All.
8+
Require Import UniMath.MoreFoundations.All.
89
Require Import TypeTheory.Auxiliary.CategoryTheoryImports.
910

1011
Require Import TypeTheory.Auxiliary.Auxiliary.
1112
Require Import TypeTheory.ALV1.CwF_SplitTypeCat_Defs.
1213
Require Import TypeTheory.ALV1.CwF_SplitTypeCat_Maps.
1314

14-
Open Scope mor_scope.
15-
1615

1716
Section Fix_Context.
1817

@@ -50,8 +49,8 @@ Proof.
5049
apply funextsec; intros [A [s e]].
5150
unfold canonical_TM_to_given_data; cbn.
5251
etrans. apply maponpaths, (pr2 Y).
53-
etrans. apply (toforallpaths _ _ _ (!functor_comp (TM Y) _ _ ) _).
54-
etrans. 2: { apply (toforallpaths _ _ _ (functor_comp (TM Y) _ _ ) _). }
52+
etrans. apply (toforallpaths (!functor_comp (TM Y) _ _ ) _).
53+
etrans. 2: { apply (toforallpaths (functor_comp (TM Y) _ _ ) _). }
5554
apply maponpaths_2.
5655
apply (@PullbackArrow_PullbackPr2 C _ _ _ _ _ (make_Pullback _ _)).
5756
Qed.
@@ -87,11 +86,11 @@ Proof.
8786
apply nat_trans_eq. apply homset_property.
8887
intros Γ; simpl in Γ. apply funextsec; intros [A [s e]].
8988
cbn. unfold canonical_TM_to_given_data.
90-
etrans. apply (toforallpaths _ _ _ (nat_trans_ax (pp Y) _ _ s)).
89+
etrans. apply (toforallpaths (nat_trans_ax (pp Y) s)).
9190
etrans. cbn. apply maponpaths, pp_te.
92-
etrans. apply (toforallpaths _ _ _ (!functor_comp (TY X) _ _) _).
91+
etrans. apply (toforallpaths (!functor_comp (TY X) _ _) _).
9392
etrans. apply maponpaths_2, e.
94-
apply (toforallpaths _ _ _ (functor_id (TY X) _ ) _).
93+
apply (toforallpaths (functor_id (TY X) _ ) _).
9594
Qed.
9695

9796
(* Functions between sets [f : X <--> Y : g] are inverse iff they are _adjoint_, in that [ f x = y <-> x = f y ] for all x, y.
@@ -105,9 +104,8 @@ Proof.
105104
intros H.
106105
(* This [assert] is to enable the [destruct eA] below. *)
107106
assert (eA : (pp Y : nat_trans _ _) _ t = A). {
108-
etrans. apply maponpaths, (!H).
109-
use (toforallpaths _ _ _
110-
(nat_trans_eq_pointwise pp_canonical_TM_to_given _)).
107+
etrans. { apply maponpaths, (!H). }
108+
use (toforallpaths (nat_trans_eq_pointwise pp_canonical_TM_to_given _)).
111109
}
112110
use total2_paths_f.
113111
exact (!eA).
@@ -176,17 +174,17 @@ Lemma canonical_TM_to_given_te {Γ:C} A
176174
Proof.
177175
cbn. unfold canonical_TM_to_given_data. cbn.
178176
etrans. apply maponpaths, (pr2 Y).
179-
etrans. use (toforallpaths _ _ _ (!functor_comp (TM Y) _ _ )).
177+
etrans. use (toforallpaths (!functor_comp (TM Y) _ _ )).
180178
etrans. apply maponpaths_2; cbn.
181179
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _)).
182-
apply (toforallpaths _ _ _ (functor_id (TM Y) _) _).
180+
apply (toforallpaths (functor_id (TM Y) _) _).
183181
Qed.
184182

185183
Lemma given_TM_to_canonical_te {Γ:C} A
186184
: (given_TM_to_canonical : nat_trans _ _) (Γ ◂ A) (te Y A) = (te_from_qq Z A).
187185
Proof.
188186
etrans.
189-
2: { exact (toforallpaths _ _ _ (canonical_to_given_to_canonical _) _). }
187+
2: { exact (toforallpaths (canonical_to_given_to_canonical _) _). }
190188
cbn. apply maponpaths, @pathsinv0, canonical_TM_to_given_te.
191189
Qed.
192190

@@ -228,10 +226,10 @@ Proof.
228226
etrans. apply transportf_isotoid_pshf.
229227
cbn. unfold canonical_TM_to_given_data. cbn.
230228
etrans. apply maponpaths, YH.
231-
etrans. use (toforallpaths _ _ _ (!functor_comp tm _ _ )).
229+
etrans. use (toforallpaths (!functor_comp tm _ _ )).
232230
etrans. apply maponpaths_2; cbn.
233231
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _)).
234-
apply (toforallpaths _ _ _ (functor_id tm _) _).
232+
apply (toforallpaths (functor_id tm _) _).
235233
Defined.
236234

237235
(** * Every compatible q-morphism structure is equal to the canonical one *)

TypeTheory/ALV1/CwF_SplitTypeCat_Maps.v

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
*)
1212

1313

14-
Require Import UniMath.Foundations.Sets.
14+
Require Import UniMath.Foundations.All.
15+
Require Import UniMath.MoreFoundations.All.
1516
Require Import TypeTheory.Auxiliary.CategoryTheoryImports.
1617

1718
Require Import TypeTheory.Auxiliary.Auxiliary.
@@ -89,12 +90,12 @@ Proof.
8990
intros Γ''. cbn. unfold yoneda_objects_ob, yoneda_morphisms_data.
9091
apply funextsec; intros g.
9192
etrans. apply maponpaths, H.
92-
use (toforallpaths _ _ _ (!functor_comp (TM Y) _ _)).
93+
use (toforallpaths (!functor_comp (TM Y) _ _)).
9394
- assert (H' := nat_trans_eq_pointwise H); clear H.
94-
assert (H'' := toforallpaths _ _ _ (H' _) (identity _)); clear H'.
95+
assert (H'' := toforallpaths (H' _) (identity _)); clear H'.
9596
cbn in H''; unfold yoneda_morphisms_data in H''.
9697
refine (_ @ H'' @ _).
97-
+ use (toforallpaths _ _ _ (!functor_id (TM Y) _)).
98+
+ use (toforallpaths (!functor_id (TM Y) _)).
9899
+ apply maponpaths_2, id_left.
99100
Qed.
100101

@@ -126,7 +127,7 @@ Proof.
126127
etrans. 2: { apply id_left. }
127128
apply maponpaths_2.
128129
exact (pr2 (term_to_section _)).
129-
- etrans. refine (!toforallpaths _ _ _ (nat_trans_eq_pointwise (W' _ _ _ _) _) _).
130+
- etrans. refine (!toforallpaths (nat_trans_eq_pointwise (W' _ _ _ _) _) _).
130131
etrans. apply Q_comp_ext_compare.
131132
apply term_to_section_recover.
132133
Qed.
@@ -194,7 +195,7 @@ Proof.
194195
use total2_paths_f; simpl.
195196
apply eA.
196197
apply subtypePath. intro; apply homset_property.
197-
simpl. eapply pathscomp0. use (pr1_transportf _ _ _ _ _ eA).
198+
simpl. eapply pathscomp0. use (pr1_transportf (Ty X Γ)).
198199
simpl. eapply pathscomp0. apply functtransportf.
199200
eapply pathscomp0. eapply pathsinv0. apply idtoiso_postcompose.
200201
exact es.
@@ -222,14 +223,14 @@ Proof.
222223
split; [unfold functor_idax | unfold functor_compax].
223224
- intro Γ; apply funextsec; intro t. destruct t as [A [s e]]; cbn.
224225
use tm_from_qq_eq; simpl.
225-
+ exact (toforallpaths _ _ _ (functor_id (TY X) _ ) A).
226+
+ exact (toforallpaths (functor_id (TY X) _ ) A).
226227
+ etrans. apply maponpaths, @pathsinv0, qq_id.
227228
etrans. apply (PullbackArrow_PullbackPr2 (make_Pullback _ _)).
228229
apply id_left.
229230
- intros Γ Γ' Γ'' f g; apply funextsec; intro t.
230231
destruct t as [A [s e]]; cbn in *.
231232
use tm_from_qq_eq; simpl.
232-
+ exact (toforallpaths _ _ _ (functor_comp (TY X) _ _) A).
233+
+ exact (toforallpaths (functor_comp (TY X) _ _) A).
233234
+ {
234235
apply PullbackArrowUnique; cbn.
235236
- rewrite <- assoc.
@@ -389,15 +390,15 @@ Proof.
389390
use tm_from_qq_eq. cbn.
390391
+ etrans.
391392
apply @pathsinv0.
392-
use (toforallpaths _ _ _ (functor_comp (TY X) _ _ ) A).
393+
use (toforallpaths (functor_comp (TY X) _ _ ) A).
393394
apply maponpaths_2.
394395
cbn.
395396
etrans. apply @pathsinv0, assoc.
396397
etrans. apply maponpaths, qq_π.
397398
etrans. apply assoc.
398399
etrans. apply maponpaths_2, e.
399400
apply id_left.
400-
+ use (map_into_Pb_unique _ (qq_π_Pb Z _ _ )).
401+
+ use (map_into_Pb_unique (qq_π_Pb Z _ _ )).
401402
* cbn.
402403
use (_ @ !e).
403404
etrans. apply @pathsinv0, assoc.
@@ -470,16 +471,16 @@ Proof.
470471
intros ? ? ? ?.
471472
(* TODO: use [tm_from_qq_eq'] here *)
472473
use tm_from_qq_eq; simpl.
473-
- etrans. apply (toforallpaths _ _ _ (!functor_comp (TY X) _ _ ) A).
474-
etrans. 2: { apply (toforallpaths _ _ _ (functor_comp (TY X) _ _ ) A). }
474+
- etrans. apply (toforallpaths (!functor_comp (TY X) _ _ ) A).
475+
etrans. 2: { apply (toforallpaths (functor_comp (TY X) _ _ ) A). }
475476
apply maponpaths_2; cbn.
476477
apply @pathsinv0, qq_π.
477478
- apply PullbackArrowUnique.
478479
+ cbn.
479480
etrans. apply @pathsinv0, assoc.
480481
etrans. apply maponpaths, comp_ext_compare_π.
481482
apply (PullbackArrow_PullbackPr1 (make_Pullback _ _)).
482-
+ apply (map_into_Pb_unique _ (qq_π_Pb Z _ _)).
483+
+ apply (map_into_Pb_unique (qq_π_Pb Z _ _)).
483484
* cbn.
484485
etrans. apply @pathsinv0, assoc.
485486
etrans. apply maponpaths, qq_π.

0 commit comments

Comments
 (0)