Skip to content

Commit 14161cd

Browse files
Merge pull request #196 from benediktahrens/adapt-to-unimath
Adapt to changes in UniMath/UniMath
2 parents ba042d2 + 0359993 commit 14161cd

Some content is hidden

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

46 files changed

+668
-676
lines changed

TypeTheory/ALV1/CwF_Defs_Equiv.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Definition rep1_fiber_axioms {pp : mor_total (preShv C)}
9191
:=
9292
∑ (e : ((pp : _ --> _) : nat_trans _ _ ) _ te
9393
= (# (Ty pp) π A)),
94-
isPullback _ _ _ _ (cwf_square_comm e).
94+
isPullback (cwf_square_comm e).
9595

9696
Definition rep1_axioms {pp : mor_total (preShv C)} (Y : rep1_data pp) : UU :=
9797
∏ Γ (A : Ty pp Γ : hSet), rep1_fiber_axioms A (dpr Y A) (te Y A).

TypeTheory/ALV1/CwF_SplitTypeCat_Cats_Standalone.v

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Lemma term_to_section_naturality {Y} {Y'}
109109
Proof.
110110
set (t' := (term_fun_mor_TM FY : nat_trans _ _) _ t).
111111
set (A' := (pp Y' : nat_trans _ _) _ t').
112-
set (Pb := isPullback_preShv_to_pointwise (homset_property _) (isPullback_Q_pp Y' A') Γ);
112+
set (Pb := isPullback_preShv_to_pointwise (isPullback_Q_pp Y' A') Γ);
113113
simpl in Pb.
114114
apply (pullback_HSET_elements_unique Pb); clear Pb.
115115
- unfold yoneda_morphisms_data; cbn.
@@ -393,10 +393,10 @@ Proof.
393393
- apply idpath.
394394
- etrans. apply id_right.
395395
cbn. apply PullbackArrowUnique.
396-
+ use (PullbackArrow_PullbackPr1
397-
(make_Pullback _ _ _ _ _ _ (qq_π_Pb _ f A))).
396+
+ set (XX := (make_Pullback _ (qq_π_Pb (pr1 Z) f A))).
397+
apply (PullbackArrow_PullbackPr1 XX).
398398
+ cbn; cbn in FZ. etrans. apply maponpaths, @pathsinv0, FZ.
399-
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _ _ _ _ _ _)).
399+
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _)).
400400
Qed.
401401

402402
Lemma tm_from_qq_mor_TM {Z Z' : qq_structure_precategory} (FZ : Z --> Z')
@@ -423,10 +423,10 @@ Proof.
423423
- apply idpath.
424424
- etrans. apply id_right.
425425
cbn. apply PullbackArrowUnique.
426-
+ cbn. apply (PullbackArrow_PullbackPr1 (make_Pullback _ _ _ _ _ _ _)).
426+
+ cbn. apply (PullbackArrow_PullbackPr1 (make_Pullback _ _)).
427427
+ cbn. cbn in FZ.
428428
etrans. apply maponpaths, @pathsinv0, FZ.
429-
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _ _ _ _ _ _)).
429+
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _)).
430430
Qed.
431431

432432
End Rename_me.
@@ -618,13 +618,14 @@ Proof.
618618
repeat (apply impred_isaprop; intro). apply setproperty.
619619
Qed.
620620

621+
Definition term_fun_category : category := make_category _ has_homsets_term_fun_precategory.
622+
621623
Theorem is_univalent_term_fun_structure
622-
: is_univalent term_fun_precategory.
624+
: is_univalent term_fun_category.
623625
Proof.
624-
split.
625-
- apply eq_equiv_from_retraction with iso_to_id_term_fun_precategory.
626-
intros. apply eq_iso. apply isaprop_term_fun_mor.
627-
- apply has_homsets_term_fun_precategory.
626+
use eq_equiv_from_retraction.
627+
- apply iso_to_id_term_fun_precategory.
628+
- intros. apply eq_iso. apply isaprop_term_fun_mor.
628629
Qed.
629630

630631
End Is_Univalent_Families_Strucs.
@@ -699,16 +700,17 @@ Proof.
699700
intros a b. apply isasetaprop. apply isaprop_qq_structure_mor.
700701
Qed.
701702

703+
Definition qq_structure_category : category
704+
:= make_category _ has_homsets_qq_structure_precategory.
705+
702706
Theorem is_univalent_qq_morphism
703-
: is_univalent qq_structure_precategory.
704-
Proof.
705-
split.
706-
- intros d d'.
707-
use isweqimplimpl.
708-
+ apply qq_structure_iso_to_id.
709-
+ apply isaset_qq_morphism_structure.
710-
+ apply isaprop_iso_qq_morphism_structure.
711-
- apply has_homsets_qq_structure_precategory.
707+
: is_univalent qq_structure_category.
708+
Proof.
709+
intros d d'.
710+
use isweqimplimpl.
711+
+ apply qq_structure_iso_to_id.
712+
+ apply isaset_qq_morphism_structure.
713+
+ apply isaprop_iso_qq_morphism_structure.
712714
Qed.
713715

714716
End Is_Univalent_qq_Strucs.
@@ -722,14 +724,23 @@ Proof.
722724
- apply has_homsets_qq_structure_precategory.
723725
Qed.
724726

725-
Definition pr1_equiv : adj_equivalence_of_precats compat_structures_pr1_functor.
727+
Definition compat_structures_category : category
728+
:= make_category _ has_homsets_compat_structures_precategory.
729+
730+
Definition pr1_equiv : @adj_equivalence_of_precats
731+
compat_structures_category
732+
term_fun_category
733+
compat_structures_pr1_functor.
726734
Proof.
727735
use adj_equivalence_of_precats_ff_split.
728736
- apply compat_structures_pr1_fully_faithful.
729737
- apply compat_structures_pr1_split_ess_surj.
730738
Defined.
731739

732-
Definition pr2_equiv : adj_equivalence_of_precats compat_structures_pr2_functor.
740+
Definition pr2_equiv : @adj_equivalence_of_precats
741+
compat_structures_category
742+
qq_structure_category
743+
compat_structures_pr2_functor.
733744
Proof.
734745
use adj_equivalence_of_precats_ff_split.
735746
- apply compat_structures_pr2_fully_faithful.

TypeTheory/ALV1/CwF_SplitTypeCat_Defs.v

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ Qed.
440440
Definition term_fun_structure_axioms (Y : term_fun_structure_data) :=
441441
∏ Γ (A : Ty X Γ),
442442
∑ (e : (pp Y : nat_trans _ _) _ (te Y A) = A [ π A ]),
443-
isPullback _ _ _ _ (term_fun_str_square_comm e).
443+
isPullback (term_fun_str_square_comm e).
444444

445445
Lemma isaprop_term_fun_structure_axioms Y
446446
: isaprop (term_fun_structure_axioms Y).
@@ -467,12 +467,12 @@ Definition Q_pp (Y : term_fun_structure) {Γ} (A : Ty X Γ)
467467

468468
(* TODO: rename this to [Q_pp_Pb], or [qq_π_Pb] to [isPullback_qq_π]? *)
469469
Definition isPullback_Q_pp (Y : term_fun_structure) {Γ} (A : Ty X Γ)
470-
: isPullback _ _ _ _ (Q_pp Y A)
470+
: isPullback (Q_pp Y A)
471471
:= pr2 (pr2 Y _ _ ).
472472

473473
(* TODO: look for places these three lemmas can be used to simplify proofs *)
474474
Definition Q_pp_Pb_pointwise (Y : term_fun_structure) (Γ' Γ : C) (A : Ty X Γ)
475-
:= isPullback_preShv_to_pointwise (homset_property _) (isPullback_Q_pp Y A) Γ'.
475+
:= isPullback_preShv_to_pointwise (isPullback_Q_pp Y A) Γ'.
476476

477477
Definition Q_pp_Pb_univprop (Y : term_fun_structure) (Γ' Γ : C) (A : Ty X Γ)
478478
:= pullback_HSET_univprop_elements _ (Q_pp_Pb_pointwise Y Γ' Γ A).
@@ -491,7 +491,7 @@ Lemma term_to_section_aux {Y : term_fun_structure} {Γ:C} (t : Tm Y Γ)
491491
f ;; π _ = identity Γ
492492
× (Q Y A : nat_trans _ _) Γ f = t).
493493
Proof.
494-
set (Pb := isPullback_preShv_to_pointwise (homset_property _) (isPullback_Q_pp Y A) Γ).
494+
set (Pb := isPullback_preShv_to_pointwise (isPullback_Q_pp Y A) Γ).
495495
simpl in Pb.
496496
apply (pullback_HSET_univprop_elements _ Pb).
497497
exact (toforallpaths _ _ _ (functor_id (TY X) _) A).
@@ -557,7 +557,7 @@ Definition qq_morphism_data : UU :=
557557
∑ q : ∏ {Γ Γ'} (f : C⟦Γ', Γ⟧) (A : (TY X:functor _ _ ) Γ : hSet),
558558
C ⟦Γ' ◂ A [ f ], Γ ◂ A⟧,
559559
(∏ Γ Γ' (f : C⟦Γ', Γ⟧) (A : (TY X:functor _ _ ) Γ : hSet),
560-
∑ e : q f A ;; π _ = π _ ;; f , isPullback _ _ _ _ (!e)).
560+
∑ e : q f A ;; π _ = π _ ;; f , isPullback (!e)).
561561

562562
Definition qq (Z : qq_morphism_data) {Γ Γ'} (f : C ⟦Γ', Γ⟧)
563563
(A : (TY X:functor _ _ ) Γ : hSet)
@@ -571,7 +571,7 @@ Proof.
571571
exact (pr1 (pr2 Z _ _ f A)).
572572
Qed.
573573

574-
Lemma qq_π_Pb (Z : qq_morphism_data) {Γ Γ'} (f : Γ' --> Γ) (A : _ ) : isPullback _ _ _ _ (!qq_π Z f A).
574+
Lemma qq_π_Pb (Z : qq_morphism_data) {Γ Γ'} (f : Γ' --> Γ) (A : _ ) : isPullback (!qq_π Z f A).
575575
Proof.
576576
exact (pr2 (pr2 Z _ _ f A)).
577577
Qed.

TypeTheory/ALV1/CwF_SplitTypeCat_Equivalence.v

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Proof.
5353
etrans. apply (toforallpaths _ _ _ (!functor_comp (TM Y) _ _ ) _).
5454
etrans. 2: { apply (toforallpaths _ _ _ (functor_comp (TM Y) _ _ ) _). }
5555
apply maponpaths_2.
56-
apply (@PullbackArrow_PullbackPr2 C _ _ _ _ _ (make_Pullback _ _ _ _ _ _ _)).
56+
apply (@PullbackArrow_PullbackPr2 C _ _ _ _ _ (make_Pullback _ _)).
5757
Qed.
5858

5959
Definition canonical_TM_to_given : (preShv C) ⟦tm_from_qq Z, TM (pr1 Y)⟧.
@@ -142,8 +142,9 @@ Definition canonical_TM_to_given_iso
142142
: @iso (preShv C) (tm_from_qq Z) (TM (pr1 Y)).
143143
Proof.
144144
exists canonical_TM_to_given.
145-
apply functor_iso_if_pointwise_iso. intro c.
146-
apply canonical_TM_to_given_pointwise_iso.
145+
apply functor_iso_if_pointwise_iso.
146+
intro Γ.
147+
apply (canonical_TM_to_given_pointwise_iso).
147148
Defined.
148149

149150
Definition given_TM_to_canonical_naturality
@@ -177,7 +178,7 @@ Proof.
177178
etrans. apply maponpaths, (pr2 Y).
178179
etrans. use (toforallpaths _ _ _ (!functor_comp (TM Y) _ _ )).
179180
etrans. apply maponpaths_2; cbn.
180-
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _ _ _ _ _ _)).
181+
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _)).
181182
apply (toforallpaths _ _ _ (functor_id (TM Y) _) _).
182183
Qed.
183184

@@ -229,7 +230,7 @@ Proof.
229230
etrans. apply maponpaths, YH.
230231
etrans. use (toforallpaths _ _ _ (!functor_comp tm _ _ )).
231232
etrans. apply maponpaths_2; cbn.
232-
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _ _ _ _ _ _)).
233+
apply (PullbackArrow_PullbackPr2 (make_Pullback _ _)).
233234
apply (toforallpaths _ _ _ (functor_id tm _) _).
234235
Defined.
235236

@@ -266,7 +267,7 @@ Proof.
266267
apply funextsec; intro Γ'.
267268
apply funextsec; intro f.
268269
apply funextsec; intro A.
269-
apply (invmaponpathsweq (make_weq _ (yoneda_fully_faithful _ (homset_property _) _ _ ))).
270+
apply (invmaponpathsweq (make_weq _ (yoneda_fully_faithful _ _ _ ))).
270271
apply pathsinv0.
271272
etrans. apply Yo_qq_term_Yo_of_qq.
272273
unfold Yo_of_qq.

0 commit comments

Comments
 (0)