Skip to content

Commit 2d5b446

Browse files
Refactored precategories + has_homsets to categories in a few places
1 parent 3797ce2 commit 2d5b446

File tree

5 files changed

+35
-59
lines changed

5 files changed

+35
-59
lines changed

TypeTheory/ALV1/Transport_along_Equivs.v

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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/Auxiliary/Auxiliary.v

Lines changed: 25 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ Proof.
499499
apply id_left.
500500
Defined.
501501

502-
Definition iso_ob {C D : precategory} (hsD : has_homsets D)
503-
{F G : functor C D} (a : iso (C:= [C, D, hsD]) F G)
502+
Definition iso_ob {C : precategory} {D : category}
503+
{F G : functor C D} (a : iso (C:= [C, D]) F G)
504504
: ∏ c, iso (F c) (G c).
505505
Proof.
506506
intro c.
@@ -523,9 +523,9 @@ Proof.
523523
+ cbn. destruct p as [[a b] f].
524524
apply pathsdirprod; cbn.
525525
* apply (isotoid _ isC).
526-
apply iso_inv_from_iso. apply (iso_ob _ eta).
526+
apply iso_inv_from_iso. apply (iso_ob eta).
527527
* apply (isotoid _ isC).
528-
apply iso_inv_from_iso. apply (iso_ob _ eta).
528+
apply iso_inv_from_iso. apply (iso_ob eta).
529529
+ cbn. destruct p as [[a b] f]. cbn in *.
530530
etrans. apply (transportf_pair (λ x : C × C, C ⟦ pr2 x, pr1 x ⟧)).
531531
cbn.
@@ -544,9 +544,9 @@ Proof.
544544
+ cbn. destruct p as [[a b] f].
545545
apply pathsdirprod; cbn.
546546
* apply (isotoid _ isD).
547-
apply (iso_ob _ eps).
547+
apply (iso_ob eps).
548548
* apply (isotoid _ isD).
549-
apply (iso_ob _ eps).
549+
apply (iso_ob eps).
550550
+ cbn. destruct p as [[a b] f]. cbn in *.
551551
etrans. apply (transportf_pair (λ x : D × D, D ⟦ pr2 x, pr1 x ⟧)).
552552
cbn.
@@ -834,18 +834,6 @@ Qed.
834834

835835
Coercion univalent_category_is_univalent : univalent_category >-> is_univalent.
836836

837-
(* TODO: raise issue in [CategoryTheory.Categories]: delete [category_has_homsets], since now redundant with [homset_property], since [category] coerces to [category]. *)
838-
839-
(* TODO: raise issue: should the [HSET] provided be this by default, and current [HSET] be renamed to [HSET_precategory]? *)
840-
(* This def exists in UniMath/UniMath
841-
Definition HSET_univalent_category : univalent_category.
842-
Proof.
843-
exists HSET; split.
844-
- apply is_univalent_HSET.
845-
- apply has_homsets_HSET.
846-
Defined.
847-
*)
848-
849837
Definition functor_univalent_category (C : precategory) (D : univalent_category)
850838
: univalent_category.
851839
Proof.
@@ -884,7 +872,7 @@ Lemma yy_comp_nat_trans {C : category}
884872
: yy v ;; p = yy ((p : nat_trans _ _ ) _ v).
885873
Proof.
886874
apply nat_trans_eq.
887-
- apply has_homsets_HSET.
875+
- apply homset_property.
888876
- intro c. simpl.
889877
apply funextsec. intro f. cbn.
890878
assert (XR := toforallpaths _ _ _ (nat_trans_ax p _ _ f) v ).
@@ -1000,9 +988,8 @@ Proof.
1000988
apply id_right.
1001989
Defined.
1002990

1003-
Definition nat_iso_from_pointwise_iso (D E : precategory)
1004-
(hsE : has_homsets E)
1005-
(F G : [D, E, hsE])
991+
Definition nat_iso_from_pointwise_iso (D : precategory) (E : category)
992+
(F G : [D, E])
1006993
(a : ∏ d, iso ((F : functor _ _) d) ((G : functor _ _) d))
1007994
(H : is_nat_trans _ _ a)
1008995
: iso F G.
@@ -1014,12 +1001,12 @@ Proof.
10141001
- intro d. apply (pr2 (a d)).
10151002
Defined.
10161003

1017-
Lemma iso_from_iso_with_postcomp (D E E' : precategory) hsE hsE'
1004+
Lemma iso_from_iso_with_postcomp (D E E' : category)
10181005
(F G : functor D E) (H : functor E E')
10191006
(Hff : fully_faithful H) :
1020-
iso (C:=[D, E', hsE']) (functor_composite F H) (functor_composite G H)
1007+
iso (C:=[D, E']) (functor_composite F H) (functor_composite G H)
10211008
->
1022-
iso (C:=[D, E, hsE]) F G.
1009+
iso (C:=[D, E]) F G.
10231010
Proof.
10241011
intro a.
10251012
use nat_iso_from_pointwise_iso.
@@ -1044,9 +1031,9 @@ Proof.
10441031
Defined.
10451032

10461033

1047-
Definition functor_assoc_iso (D1 D2 D3 D4 : precategory) hsD4
1034+
Definition functor_assoc_iso (D1 D2 D3 : precategory) (D4 : category)
10481035
(F : functor D1 D2) (G : functor D2 D3) (H : functor D3 D4) :
1049-
iso (C:=[D1,D4,hsD4])
1036+
iso (C:=[D1,D4])
10501037
(functor_composite (functor_composite F G) H)
10511038
(functor_composite F (functor_composite G H)).
10521039
Proof.
@@ -1060,9 +1047,9 @@ Proof.
10601047
).
10611048
Defined.
10621049

1063-
Definition functor_comp_id_iso (D1 D2 : precategory) hsD2
1050+
Definition functor_comp_id_iso (D1 : precategory) (D2 : category)
10641051
(F : functor D1 D2) :
1065-
iso (C:=[D1,D2,hsD2]) (functor_composite F (functor_identity _ )) F.
1052+
iso (C:=[D1,D2]) (functor_composite F (functor_identity _ )) F.
10661053
Proof.
10671054
use nat_iso_from_pointwise_iso.
10681055
- intro. apply identity_iso.
@@ -1074,10 +1061,10 @@ Proof.
10741061
).
10751062
Defined.
10761063

1077-
Definition functor_precomp_iso (D1 D2 D3 : precategory) hsD3
1064+
Definition functor_precomp_iso (D1 D2 : precategory) (D3 : category)
10781065
(F : functor D1 D2) (G H : functor D2 D3) :
1079-
iso (C:=[D2,D3,hsD3]) G H ->
1080-
iso (C:=[D1,D3,hsD3]) (functor_composite F G)
1066+
iso (C:=[D2,D3]) G H ->
1067+
iso (C:=[D1,D3]) (functor_composite F G)
10811068
(functor_composite F H).
10821069
Proof.
10831070
intro a.
@@ -1231,8 +1218,7 @@ End Square_Transfers.
12311218
Section on_pullbacks.
12321219

12331220
(* TODO: make all these implicit *)
1234-
Variable C : precategory.
1235-
Variable hs : has_homsets C.
1221+
Variable C : category.
12361222
Variables a b c d : C.
12371223
Variables (f : a --> b) (g : a --> c) (k : b --> d) (h : c --> d).
12381224

@@ -1316,11 +1302,7 @@ Section on_pullbacks.
13161302
Lemma postcomp_pb_with_iso (y : C) (r : y --> d) (i : iso b y) (Hi : i ;; r = k) :
13171303
∑ H : f ;; i ;; r = g ;; h, isPullback H.
13181304
Proof.
1319-
simple refine (@commutes_and_is_pullback_transfer_iso (C,,hs)
1320-
_ _ _ _ _ _ _ _
1321-
_ _ _ _ _ _ _ _
1322-
_ _ _ _ _ _ _ _
1323-
_ Pb);
1305+
simple refine (commutes_and_is_pullback_transfer_iso _ _ _ _ _ Pb);
13241306
try apply identity_iso;
13251307
try rewrite id_left;
13261308
try rewrite id_right;
@@ -1339,13 +1321,13 @@ Section on_pullbacks.
13391321
Lemma is_symmetric'_isPullback
13401322
: isPullback (!sqr_comm) -> isPullback sqr_comm.
13411323
Proof.
1342-
refine (is_symmetric_isPullback hs _).
1324+
use is_symmetric_isPullback; apply homset_property.
13431325
Defined.
13441326

13451327
End on_pullbacks.
13461328

1347-
Arguments map_into_Pb {_ _ _ _ _ _ _ _ _ } _ _ {_} _ _ _ .
1348-
Arguments map_into_Pb_unique {_ _ _ _ _ _ _ _ _} _ _ {_} _ _ _ _ .
1329+
Arguments map_into_Pb {_ _ _ _ _ _ _ _ _ } _ Pb {_} _ _ _.
1330+
Arguments map_into_Pb_unique {_ _ _ _ _ _ _ _ _} _ Pb {_} _ _ _ _.
13491331

13501332
Section Pullbacks_hSet.
13511333

@@ -1501,7 +1483,7 @@ Proof.
15011483
+ apply (pr2 (pr1 XR) Three).
15021484
- intro t.
15031485
apply subtypePath.
1504-
+ intro. apply isapropdirprod; apply has_homsets_HSET.
1486+
+ intro. apply isapropdirprod; apply homset_property.
15051487
+ simpl.
15061488
apply path_to_ctr.
15071489
destruct t as [t [H1 H2]].

TypeTheory/Cubical/FillFromComp.v

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ now rewrite <-!assoc, H2, H3, assoc, H4, id_left, id_right.
359359
Qed.
360360

361361
(* We can lift the above operations to presheaves using yoneda *)
362-
Let yon := yoneda_functor_data C.
362+
Let yon := yoneda_functor_data C : functor_data C (PreShv C).
363363

364364
Definition p_PreShv (I : C) : yon (I+) --> yon I := # yon (p_F I).
365365

@@ -515,8 +515,7 @@ Qed.
515515

516516
Lemma e₀_f_pb {I J} (f : J --> I) : isPullback (e₀_f f).
517517
Proof.
518-
apply Auxiliary.is_symmetric'_isPullback.
519-
apply functor_category_has_homsets.
518+
apply is_symmetric'_isPullback.
520519
apply pb_if_pointwise_pb; intros K.
521520
apply Auxiliary.isPullback_HSET; intros L f1 f2.
522521
now apply e₀_pb.

TypeTheory/OtherDefs/CwF_Pitts_to_DM.v

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,11 @@ Proof.
9696
+ apply (π _ ).
9797
+ simpl. unfold dm_sub_struct_of_CwF.
9898
simpl.
99-
set (T:= postcomp_pb_with_iso CC).
100-
set (T':= T (homset_property _) _ _ _ _ (q_cwf A f) _ _ f _ (is_pullback_reindx_cwf (homset_property _) _ _ _ _ )).
101-
refine (pr1 (T' _ _ _ _ )).
99+
refine (pr1 (postcomp_pb_with_iso CC _ _ _ _ (q_cwf A f) _ _ f _
100+
(is_pullback_reindx_cwf (homset_property _) _ _ _ _ ) _ _ _ _)).
102101
sym. assumption.
103-
+
104-
set (T:= postcomp_pb_with_iso CC (homset_property _)).
105-
set (T':= T _ _ _ _ (q_cwf A f) _ _ f _ (is_pullback_reindx_cwf (homset_property _) _ _ _ _ )).
106-
eapply (pr2 (T' _ _ _ _ )).
102+
+ eapply (pr2 ( postcomp_pb_with_iso CC _ _ _ _ (q_cwf A f) _ _ f _
103+
(is_pullback_reindx_cwf (homset_property _) _ _ _ _ ) _ _ _ _ )).
107104
- simpl.
108105
apply hinhpr.
109106
unfold iso_to_dpr.

TypeTheory/OtherDefs/TypeCat_to_DM.v

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,12 @@ Proof.
8383
+ apply (dpr_typecat _ ).
8484
+ simpl. unfold dm_sub_struct_of_TypeCat.
8585
simpl.
86-
set (T:= postcomp_pb_with_iso CC (homset_property _)).
87-
refine (pr1 (T _ _ _ _ (q_typecat A f) _ _ f _ _ _ _ _ _)).
86+
(* TODO: improve implicit arguments of [postcomp_pb_with_iso] *)
87+
refine (pr1 (postcomp_pb_with_iso CC _ _ _ _ _ _ _ _ _ _ _ _ _ _)).
8888
apply is_symmetric_isPullback. { apply homset_property. }
8989
apply reind_pb_typecat.
9090
sym. assumption.
91-
+ set (T:= postcomp_pb_with_iso CC (homset_property _)).
92-
eapply (pr2 (T _ _ _ _ _ _ _ _ _ _ _ _ _ _)).
91+
+ eapply (pr2 (postcomp_pb_with_iso CC _ _ _ _ _ _ _ _ _ _ _ _ _ _)).
9392
- simpl.
9493
apply hinhpr.
9594
unfold iso_to_dpr.

0 commit comments

Comments
 (0)