Skip to content

Commit b5ced48

Browse files
Merge pull request #198 from peterlefanulumsdaine/refactor-precategories
Refactor to precategories to categories where appropriate
2 parents 7fc1bbf + a4b8fe6 commit b5ced48

25 files changed

+190
-246
lines changed

TypeTheory/ALV1/CwF_SplitTypeCat_Defs.v

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
99
In this file, we give the definitions of _split type-categories_ (originally due to Cartmell, here following a version given by Pitts) and _categories with families_ (originally due to Dybjer, here following a formulation given by Fiore).
1010
11-
To facilitate comparing them afterwards, we split up their definitions in a slightly unusual way, starting with the part they share. The key definitions of this file are therefore (all over a fixed base (pre)category [C]):
11+
To facilitate comparing them afterwards, we split up their definitions in a slightly unusual way, starting with the part they share. The key definitions of this file are therefore (all over a fixed base category [C]):
1212
1313
- _object-extension structures_, [obj_ext_structure], the common core of CwF’s and split type-categories;
1414
- (_functional) term structures_, [term_fun_structure], the rest of the structure of a CwF on [C];
15-
- _cwf-structures_, [cwf_structure], the full structure of a CwF on a precategory [C];
15+
- _cwf-structures_, [cwf_structure], the full structure of a CwF on a category [C];
1616
- _CwF’s_, [cwf];
1717
- _q-morphism structures_, [qq_morphism_structure], for rest of the structure of a split type-category on [C];
1818
- _split type-cat structures_, [split_typecat_structure], the full structure of a split type-category on [C].
1919
- _split type-categories_, [split_typecat].
2020
21-
NB: we follow the convention that _category_ does not include an assumption of saturation/univalence, i.e. means what is sometimes called _precategory_.
21+
NB: we follow UniMath’s convention that _category_ does not assume saturation/univalence, i.e. means what is sometimes called _precategory_ in the literature.
2222
*)
2323

2424

@@ -526,9 +526,7 @@ End Families_Structures.
526526

527527
Section qq_Morphism_Structures.
528528

529-
(* NOTE: most of this section does not require the [homset_property] for [C]. If the few lemmas that do require it were moved out of the section, e.g. [isaprop_qq_morphism_axioms], then would could take [C] as just a [precategory] here. Perhaps worth doing so?
530-
531-
(Another alternative would be adding an extra argument of type [has_homsets C] to [isaprop_qq_morphism_axioms], but that’s less convenient for later use than just having [C] be a [category] in those lemmas.) *)
529+
(* NOTE: most of this section does not require the [homset_property] for [C]. If the few lemmas that do require it were moved out of the section, e.g. [isaprop_qq_morphism_axioms], then would could take [C] as just a [precategory] here. Perhaps worth doing so? Would mainly be relevant if we wanted to generalise to bicategories. *)
532530

533531
Context {C : category} {X : obj_ext_structure C}.
534532

TypeTheory/ALV1/CwF_def.v

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,6 @@ Let TY' : preShv D := Ty (pr1 T').
425425
Let pp : _ ⟦ TM , TY ⟧ := pr1 T.
426426
Let pp' : _ ⟦ TM' , TY' ⟧ := pr1 T'.
427427

428-
Let hsDop : has_homsets (opp_precat D) := has_homsets_opp (homset_property _).
429-
430428
Let ηη : functor (preShv D) (preShv C) :=
431429
pre_composition_functor C^op D^op _ (functor_opp F).
432430

@@ -520,8 +518,6 @@ Let TY' : preShv RC := Ty (pr1 T').
520518
Let pp : _ ⟦ TM , TY ⟧ := pr1 T.
521519
Let pp' : _ ⟦ TM' , TY' ⟧ := pr1 T'.
522520

523-
Let hsRCop : has_homsets (opp_precat RC) := has_homsets_opp (homset_property _).
524-
525521
Let ηη : functor (preShv RC) (preShv C) :=
526522
pre_composition_functor C^op RC^op _ (functor_opp (Rezk_eta C)).
527523

TypeTheory/ALV1/RelativeUniverses.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -942,8 +942,8 @@ Definition isweq_weak_relative_universe_transfer
942942
(R_full : full R)
943943
(isD : is_univalent D) (isD' : is_univalent D')
944944
(T : functor D' D)
945-
(eta : iso (C:=[D, D, pr2 D]) (functor_identity D) (S ∙ T))
946-
(eps : iso (C:=[D', D', pr2 D']) (T ∙ S) (functor_identity D'))
945+
(eta : iso (C:=[D, D]) (functor_identity D) (S ∙ T))
946+
(eps : iso (C:=[D', D']) (T ∙ S) (functor_identity D'))
947947
(S_faithful : faithful S)
948948
: isweq weak_relative_universe_transfer.
949949
Proof.
@@ -964,8 +964,8 @@ Definition weq_weak_relative_universe_transfer
964964
(R_full : full R)
965965
(isD : is_univalent D) (isD' : is_univalent D')
966966
(T : functor D' D)
967-
(eta : iso (C:=[D, D, pr2 D]) (functor_identity D) (S ∙ T))
968-
(eps : iso (C:=[D', D', pr2 D']) (T ∙ S) (functor_identity D'))
967+
(eta : iso (C:=[D, D]) (functor_identity D) (S ∙ T))
968+
(eps : iso (C:=[D', D']) (T ∙ S) (functor_identity D'))
969969
(S_ff : fully_faithful S)
970970
: weak_relative_universe J ≃ weak_relative_universe J'
971971
:= make_weq _ (isweq_weak_relative_universe_transfer R_full isD isD' T eta eps S_ff).

TypeTheory/ALV1/Transport_along_Equivs.v

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Proof.
113113
Defined.
114114

115115

116-
Definition epsinv : iso (C:=[_ , _ , has_homsets_preShv _ ])
116+
Definition epsinv : iso (C:=[_ , _])
117117
(functor_identity (preShv C)) (ext ∙ Fop_precomp).
118118
Proof.
119119
set (XR':= (counit_iso_from_adj_equivalence_of_precats equiv_Fcomp)).
@@ -122,7 +122,7 @@ Proof.
122122
Defined.
123123

124124

125-
Definition etainv : iso (C:=[ _ , _ , (has_homsets_preShv _ )])
125+
Definition etainv : iso (C:=[ _ , _])
126126
(Fop_precomp ∙ ext) (functor_identity (preShv D)).
127127
Proof.
128128
set (XR := (unit_iso_from_adj_equivalence_of_precats equiv_Fcomp)).
@@ -143,8 +143,7 @@ Proof.
143143
set (XTT := ff_Fop_precomp).
144144
specialize (T XTT).
145145
set (XR := iso_from_iso_with_postcomp).
146-
apply (XR _ _ _ (functor_category_has_homsets _ _ _ )
147-
(functor_category_has_homsets _ _ _ ) _ _ _ XTT).
146+
apply (XR _ _ _ _ _ _ XTT).
148147
eapply iso_comp.
149148
apply functor_assoc_iso.
150149
eapply iso_comp.

TypeTheory/ALV1/TypeCat.v

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Contents:
77
8-
- Definition of type-categories and split type-categories
8+
- Definition of type-(pre)categories and split type-categories
99
- A few convenience lemmas
1010
*)
1111

@@ -34,13 +34,12 @@ However, that definition includes two _strictness conditions_;
3434
we follow van den Berg and Garner, _Topological and simplicial models_, Def 2.2.1 #(<a href="http://arxiv.org/abs/1007.4638">arXiv</a>)#
3535
in separating these out from the rest of the definition.
3636
37-
An element of [type_precat], as we define it below, is thus exactly a type-category according
38-
to the definition of van den Berg and Garner; and an element of [split_type_precat] is a split type-category
39-
according to van den Berg and Garner, or a plain type-category in the sense of Pitts
40-
(modulo, in either case, the question of equality on objects of the category).
41-
37+
An element of [typecat], as we define it below, is thus exactly a type-category according
38+
to the definition of van den Berg and Garner (except with an underlying _precategory_, i.e. hom-types not assumed sets); and an element of [split_typecat] is a split type-category
39+
according to van den Berg and Garner, or a plain type-category in the sense of Pitts.
40+
4241
In order to avoid the nested sigma-types getting too deep,
43-
we split up the structure into two stages: [type_precat_structure1] and [type_precat_structure2]. *)
42+
we split up the structure into two stages: [typecat_structure1] and [typecat_structure2]. *)
4443

4544
(** * A "preview" of the definition *)
4645

@@ -174,8 +173,8 @@ Definition is_type_saturated_typecat {CC : precategory} (C : typecat_structure C
174173

175174
(** * Splitness *)
176175

177-
(** A type-precategory [C] is _split_ if each collection of types [C Γ] is a set, reindexing is strictly functorial, and the [q] maps satisfy the evident functoriality axioms *)
178-
Definition is_split_typecat {CC : precategory} (C : typecat_structure CC)
176+
(** A type-precategory [C] is _split_ if it is a category (i.e. has hom-sets); each collection of types [C Γ] is a set, reindexing is strictly functorial; and the [q] maps satisfy the evident functoriality axioms *)
177+
Definition is_split_typecat {CC : category} (C : typecat_structure CC)
179178
:= (∏ Γ:CC, isaset (C Γ))
180179
× (∑ (reind_id : ∏ Γ (A : C Γ), A {{identity Γ}} = A),
181180
∏ Γ (A : C Γ), q_typecat A (identity Γ)
@@ -188,17 +187,16 @@ Definition is_split_typecat {CC : precategory} (C : typecat_structure CC)
188187
;; q_typecat (A{{f}}) g
189188
;; q_typecat A f).
190189

191-
Lemma isaprop_is_split_typecat (CC : precategory) (hs : has_homsets CC)
190+
Lemma isaprop_is_split_typecat (CC : category)
192191
(C : typecat_structure CC) : isaprop (is_split_typecat C).
193192
Proof.
194193
repeat (apply isofhleveltotal2; intros).
195194
- apply impred; intro; apply isapropisaset.
196195
- repeat (apply impred; intro). apply x.
197-
- repeat (apply impred; intro). apply hs.
196+
- repeat (apply impred; intro). apply homset_property.
198197
- repeat (apply impred; intro). apply x.
199-
- intros.
200-
repeat (apply impred; intro).
201-
apply hs.
198+
- intros.
199+
repeat (apply impred; intro). apply homset_property.
202200
Qed.
203201

204202
Definition typecat := ∑ (C : category), (typecat_structure C).
@@ -211,14 +209,14 @@ Definition split_typecat := ∑ (C : typecat), (is_split_typecat C).
211209
Coercion typecat_of_split_typecat (C : split_typecat) := pr1 C.
212210
Coercion split_typecat_is_split (C : split_typecat) := pr2 C.
213211

214-
Definition split_typecat_structure (CC : precategory) : UU
212+
Definition split_typecat_structure (CC : category) : UU
215213
:= ∑ C : typecat_structure CC, is_split_typecat C.
216214

217-
Coercion typecat_from_split (CC : precategory) (C : split_typecat_structure CC)
215+
Coercion typecat_from_split (CC : category) (C : split_typecat_structure CC)
218216
: typecat_structure _
219217
:= pr1 C.
220218

221-
Coercion is_split_from_split_typecat (CC : precategory) (C : split_typecat_structure CC)
219+
Coercion is_split_from_split_typecat (CC : category) (C : split_typecat_structure CC)
222220
: is_split_typecat C
223221
:= pr2 C.
224222

TypeTheory/ALV2/RelUnivTransfer.v

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ Section RelUniv_Transfer.
334334
Context (R_ses : split_ess_surj R)
335335
(D'_univ : is_univalent D')
336336
(invS : functor D' D)
337-
(eta : iso (C:=[D, D, pr2 D]) (functor_identity D) (S ∙ invS))
338-
(eps : iso (C:=[D', D', pr2 D']) (invS ∙ S) (functor_identity D'))
337+
(eta : iso (C:=[D, D]) (functor_identity D) (S ∙ invS))
338+
(eps : iso (C:=[D', D']) (invS ∙ S) (functor_identity D'))
339339
(S_ff : fully_faithful S).
340340

341341
Let E := ((S,, (invS,, (pr1 eta, pr1 eps)))
@@ -348,10 +348,10 @@ Section RelUniv_Transfer.
348348
Let ε' := pr2 (pr121 AE) : nat_trans (invS ∙ S) (functor_identity _).
349349
Let η := functor_iso_from_pointwise_iso
350350
_ _ _ _ _ η' (pr12 (adjointificiation E))
351-
: iso (C:=[D, D, pr2 D]) (functor_identity D) (S ∙ invS).
351+
: iso (C:=[D, D]) (functor_identity D) (S ∙ invS).
352352
Let ε := functor_iso_from_pointwise_iso
353353
_ _ _ _ _ ε' (pr22 (adjointificiation E))
354-
: iso (C:=[D', D', pr2 D']) (invS ∙ S) (functor_identity D').
354+
: iso (C:=[D', D']) (invS ∙ S) (functor_identity D').
355355

356356
Let ηx := Constructions.pointwise_iso_from_nat_iso (iso_inv_from_iso η).
357357
Let αx := Constructions.pointwise_iso_from_nat_iso (α,,α_is_iso).
@@ -655,8 +655,8 @@ Section WeakRelUniv_Transfer.
655655

656656
(* S is an equivalence *)
657657
Context (T : functor D' D).
658-
Context (η : iso (C := [D, D, pr2 D]) (functor_identity D) (S ∙ T)).
659-
Context (ε : iso (C := [D', D', pr2 D']) (T ∙ S) (functor_identity D')).
658+
Context (η : iso (C := [D, D]) (functor_identity D) (S ∙ T)).
659+
Context (ε : iso (C := [D', D']) (T ∙ S) (functor_identity D')).
660660
Context (S_full : full S).
661661
Context (S_faithful : faithful S).
662662

TypeTheory/ALV2/SplitTypeCat_ComprehensionCat.v

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,6 @@ Section SplitTypeCat_DiscreteComprehensionCat_Equiv.
901901
apply funextsec. intros ?.
902902
apply isaprop_isPullback.
903903
+ apply isaprop_is_split_typecat.
904-
apply homset_property.
905-
906904
- intros DC.
907905
use total2_paths_f.
908906
2: use total2_paths_f.

0 commit comments

Comments
 (0)