Skip to content

Commit 9242475

Browse files
Merge pull request #202 from peterlefanulumsdaine/housekeeping
Housekeeping
2 parents c315f86 + 5d4f8f4 commit 9242475

File tree

92 files changed

+3870
-4142
lines changed

Some content is hidden

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

92 files changed

+3870
-4142
lines changed

TypeTheory/ALV1/CwF_Defs_Equiv.v

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Require Import UniMath.Foundations.Sets.
3535
Require Import TypeTheory.Auxiliary.CategoryTheoryImports.
3636

3737
Require Import TypeTheory.Auxiliary.Auxiliary.
38+
Require Import TypeTheory.Auxiliary.CategoryTheory.
39+
Require Import TypeTheory.Auxiliary.SetsAndPresheaves.
40+
Require Import TypeTheory.Auxiliary.TypeOfMorphisms.
41+
3842
Require Import TypeTheory.ALV1.CwF_def.
3943
Require Import TypeTheory.ALV1.CwF_SplitTypeCat_Defs.
4044

@@ -89,8 +93,7 @@ Definition rep1_fiber_axioms {pp : mor_total (preShv C)}
8993
{Γ} (A : Ty pp Γ : hSet)
9094
{ΓA : C} (π : ΓA --> Γ) (te : Tm pp ΓA : hSet) : UU
9195
:=
92-
∑ (e : ((pp : _ --> _) : nat_trans _ _ ) _ te
93-
= (# (Ty pp) π A)),
96+
∑ (e : pp $nt te = # (Ty pp) π A),
9497
isPullback (cwf_square_comm e).
9598

9699
Definition rep1_axioms {pp : mor_total (preShv C)} (Y : rep1_data pp) : UU :=

TypeTheory/ALV1/CwF_SplitTypeCat_Cats_Standalone.v

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
This file defines the categories of term-structures and _q_-morphism structures over a fixed object-extension structure, and proves that they are univalent and equivalent.
1010
11-
For the more interesting case where the object-extension structure is also allowed to vary, see [CwF_Split_TypeCat_Cats], where this more general category is constructed, using the formalism of displayed categories.
11+
For the more interesting case where the object-extension structure is also allowed to vary, see [CwF_Split_TypeCat_Cats], where this more general category is constructed, using the formalism of displayed categories, and [CwF_SplitTypeCat_Equiv_Cats], giving the equivalence in the displayed setting.
1212
1313
In general, this file should be deprecated, and the displayed version should be used for all further development. This standalone version is included just to give the equivalence in a form independent of the development of displayed categories.
1414
@@ -27,7 +27,11 @@ Require Import UniMath.Foundations.All.
2727
Require Import UniMath.MoreFoundations.All.
2828
Require Import TypeTheory.Auxiliary.CategoryTheoryImports.
2929
Require Import UniMath.CategoryTheory.Equivalences.CompositesAndInverses.
30+
3031
Require Import TypeTheory.Auxiliary.Auxiliary.
32+
Require Import TypeTheory.Auxiliary.CategoryTheory.
33+
Require Import TypeTheory.Auxiliary.SetsAndPresheaves.
34+
3135
Require Import TypeTheory.ALV1.CwF_SplitTypeCat_Defs.
3236
Require Import TypeTheory.ALV1.CwF_SplitTypeCat_Maps.
3337
Require Import TypeTheory.ALV1.CwF_SplitTypeCat_Equivalence.
@@ -36,8 +40,9 @@ Require Import TypeTheory.ALV1.CwF_SplitTypeCat_Equivalence.
3640
(** Some local notations, *)
3741

3842
Local Notation "Γ ◂ A" := (comp_ext _ Γ A) (at level 30).
39-
Local Notation "'Ty'" := (fun X Γ => (TY X : functor _ _) Γ : hSet) (at level 10).
40-
Local Notation "'Tm'" := (fun Y Γ => (TM Y : functor _ _) Γ : hSet) (at level 10).
43+
Local Notation "'Ty'" := (fun X Γ => TY X $p Γ) (at level 10).
44+
Local Notation "'Tm'" := (fun Y Γ => TM Y $p Γ) (at level 10).
45+
4146
Local Notation Δ := comp_ext_compare.
4247

4348
Section fix_cat_obj_ext.
@@ -56,7 +61,7 @@ Definition term_fun_mor
5661
FF_TM ;; pp Y' = pp Y
5762
×
5863
∏ {Γ:C} {A : Ty X Γ},
59-
(FF_TM : nat_trans _ _) _ (te Y A) = (te Y' _).
64+
FF_TM $nt (te Y A) = te Y' _.
6065

6166

6267
Definition term_fun_mor_TM {Y Y'} (FF : term_fun_mor Y Y')
@@ -69,7 +74,7 @@ Definition term_fun_mor_pp {Y Y'} (FF : term_fun_mor Y Y')
6974

7075
Definition term_fun_mor_te {Y Y'} (FF : term_fun_mor Y Y')
7176
{Γ:C} (A : Ty X Γ)
72-
: (term_fun_mor_TM FF : nat_trans _ _) _ (te Y A) = (te Y' _)
77+
: term_fun_mor_TM FF $nt (te Y A) = (te Y' _)
7378
:= pr2 (pr2 FF) Γ A.
7479

7580
Definition term_fun_mor_Q {Y Y'} (FF : term_fun_mor Y Y')
@@ -79,16 +84,15 @@ Proof.
7984
apply nat_trans_eq. apply homset_property.
8085
intros Γ'; simpl in Γ'.
8186
unfold yoneda_objects_ob. apply funextsec; intros f.
82-
etrans.
83-
use (toforallpaths (nat_trans_ax (term_fun_mor_TM FF) _)).
87+
etrans. apply nat_trans_ax_pshf.
8488
cbn. apply maponpaths, term_fun_mor_te.
8589
Qed.
8690

8791
(* Defined only locally, since once [isaprop_term_fun_mor_eq] is defined, that should always be used in place of this. *)
8892
Local Lemma term_fun_mor_eq {Y} {Y'} (FF FF' : term_fun_mor Y Y')
8993
(e_TM : ∏ Γ (t : Tm Y Γ),
90-
(term_fun_mor_TM FF : nat_trans _ _) _ t
91-
= (term_fun_mor_TM FF' : nat_trans _ _) _ t)
94+
term_fun_mor_TM FF $nt t
95+
= term_fun_mor_TM FF' $nt t)
9296
: FF = FF'.
9397
Proof.
9498
apply subtypePath.
@@ -103,13 +107,13 @@ Qed.
103107
(* This is not full naturality of [term_to_section]; it is just what is required for [isaprop_term_fun_mor] below. *)
104108
Lemma term_to_section_naturality {Y} {Y'}
105109
{FY : term_fun_mor Y Y'}
106-
{Γ : C} (t : Tm Y Γ) (A := (pp Y : nat_trans _ _) _ t)
107-
: pr1 (term_to_section ((term_fun_mor_TM FY : nat_trans _ _) _ t))
110+
{Γ : C} (t : Tm Y Γ) (A := pp Y $nt t)
111+
: pr1 (term_to_section (term_fun_mor_TM FY $nt t))
108112
= pr1 (term_to_section t)
109-
;; Δ (!toforallpaths (nat_trans_eq_pointwise (term_fun_mor_pp FY) Γ) t).
113+
;; Δ (!nat_trans_eq_pointwise_pshf (term_fun_mor_pp FY) _).
110114
Proof.
111-
set (t' := (term_fun_mor_TM FY : nat_trans _ _) _ t).
112-
set (A' := (pp Y' : nat_trans _ _) _ t').
115+
set (t' := term_fun_mor_TM FY $nt t).
116+
set (A' := pp Y' $nt t').
113117
set (Pb := isPullback_preShv_to_pointwise (isPullback_Q_pp Y' A') Γ);
114118
simpl in Pb.
115119
apply (pullback_HSET_elements_unique Pb); clear Pb.
@@ -119,19 +123,19 @@ Proof.
119123
etrans. apply @pathsinv0, assoc.
120124
apply maponpaths.
121125
apply comp_ext_compare_π.
122-
- etrans. apply term_to_section_recover. apply pathsinv0.
126+
- etrans. apply term_to_section_recover.
127+
apply pathsinv0.
123128
etrans. apply Q_comp_ext_compare.
124-
etrans. apply @pathsinv0.
125-
set (H1 := nat_trans_eq_pointwise (term_fun_mor_Q FY A) Γ).
126-
exact (toforallpaths H1 _).
127-
cbn. apply maponpaths. apply term_to_section_recover.
129+
etrans.
130+
eapply pathsinv0, nat_trans_eq_pointwise_pshf, term_fun_mor_Q.
131+
cbn. apply maponpaths, term_to_section_recover.
128132
Qed.
129133

130134
Lemma term_fun_mor_recover_term {Y} {Y'}
131135
{FY : term_fun_mor Y Y'}
132136
{Γ : C} (t : Tm Y Γ)
133-
: (term_fun_mor_TM FY : nat_trans _ _) Γ t
134-
= (Q Y' _ : nat_trans _ _) Γ (pr1 (term_to_section t) ).
137+
: term_fun_mor_TM FY $nt t
138+
= Q Y' _ $nt (pr1 (term_to_section t) ).
135139
Proof.
136140
etrans. apply @pathsinv0, term_to_section_recover.
137141
etrans. apply maponpaths, term_to_section_naturality.
@@ -251,7 +255,8 @@ Proof.
251255
- exact (∑ YZ : (term_fun_precategory × qq_structure_precategory),
252256
iscompatible_term_qq (pr1 YZ) (pr2 YZ)).
253257
- intros YZ YZ'.
254-
exact ((pr1 (pr1 YZ)) --> (pr1 (pr1 YZ')) × (pr2 (pr1 YZ)) --> pr2 (pr1 YZ')).
258+
exact ((pr1 (pr1 YZ)) --> (pr1 (pr1 YZ'))
259+
× (pr2 (pr1 YZ)) --> pr2 (pr1 YZ')).
255260
Defined.
256261

257262
Definition strucs_compat_id_comp
@@ -336,7 +341,7 @@ Proof.
336341
- etrans. apply qq_π.
337342
apply pathsinv0, qq_π.
338343
- etrans. cbn. apply maponpaths, @pathsinv0, (term_fun_mor_te FY).
339-
etrans. use (toforallpaths (!nat_trans_ax (term_fun_mor_TM _) _)).
344+
etrans. apply pathsinv0, nat_trans_ax_pshf.
340345
etrans. cbn. apply maponpaths, @pathsinv0, W.
341346
etrans. apply term_fun_mor_te.
342347
apply W'.
@@ -373,12 +378,11 @@ Lemma term_from_qq_mor
373378
: (Y --> Y').
374379
Abort.
375380

376-
(* TODO: rename and move this section! *)
381+
(* TODO: rename and upstream this section! *)
377382
Section Rename_me.
378383
(* TODO: naming conventions in this section clash rather with those of [ALV1.CwF_SplitTypeCat_Equivalence]. Consider! *)
379-
(* TODO: one would expect the type of this to be [nat_trans_data]. However, that name breaks HORRIBLY with general naming conventions: it is not the _type_ of the data (which is un-named for [nat_trans]), but is the _access function_ for that data! Submit issue for this? *)
380384
Lemma tm_from_qq_mor_data {Z Z' : qq_structure_precategory} (FZ : Z --> Z')
381-
: forall Γ : C, (tm_from_qq Z Γ) --> (tm_from_qq Z' Γ).
385+
: nat_trans_data (tm_from_qq Z) (tm_from_qq Z').
382386
Proof.
383387
intros Γ Ase; exact Ase. (* ! *)
384388
Defined.
@@ -618,7 +622,8 @@ Proof.
618622
repeat (apply impred_isaprop; intro). apply setproperty.
619623
Qed.
620624

621-
Definition term_fun_category : category := make_category _ has_homsets_term_fun_precategory.
625+
Definition term_fun_category : category
626+
:= make_category _ has_homsets_term_fun_precategory.
622627

623628
Theorem is_univalent_term_fun_structure
624629
: is_univalent term_fun_category.
@@ -668,7 +673,7 @@ Qed.
668673
Lemma qq_structure_eq
669674
(x : obj_ext_structure C)
670675
(d d' : qq_morphism_structure x)
671-
(H : ∏ (Γ Γ' : C) (f : Γ' --> Γ) (A : (TY x : functor _ _ ) Γ : hSet),
676+
(H : ∏ (Γ Γ' : C) (f : Γ' --> Γ) (A : Ty x Γ),
672677
qq d f A = qq d' f A)
673678
: d = d'.
674679
Proof.

0 commit comments

Comments
 (0)