@@ -274,12 +274,12 @@ Definition comp_law_4 {CC : precategory} {C : tt_reindx_type_struct CC}
274274
275275
276276
277-
278- Definition cwf_laws {CC : precategory} (C : tt_reindx_type_struct CC)
277+ (* Note: the restriction now from categories to precategories is deliberate — we are insisting that cwf’s have hom-sets. *)
278+ Definition cwf_laws {CC : category} (C : tt_reindx_type_struct CC)
279279 :=
280280 (∑ T : reindx_laws C,
281281 (comp_laws_1_2 T × comp_law_3 T × comp_law_4 T)) ×
282- (has_homsets CC × (* ∏ Γ, isaset (C⟨Γ⟩) × *) ∏ Γ (A : C⟨Γ⟩), isaset (C⟨Γ⊢ A⟩)).
282+ (∏ Γ (A : C⟨Γ⟩), isaset (C⟨Γ⊢ A⟩)).
283283
284284(** * Definition of precategory with families *)
285285(** A precategory with families [pre_cwf] is
@@ -292,52 +292,51 @@ Definition cwf_laws {CC : precategory}(C : tt_reindx_type_struct CC)
292292 *)
293293
294294
295- Definition cwf_struct (CC : precategory ) : UU
295+ Definition cwf_struct (CC : category ) : UU
296296 := ∑ C : tt_reindx_type_struct CC, cwf_laws C.
297297
298298(** * Various access functions to the components *)
299299(** Also a few generalizations are proved, providing variants with
300300 generalized proofs of identity of types, terms (which form hsets)
301301 *)
302302
303- Coercion cwf_data_from_cwf_struct (CC : precategory) (C : cwf_struct CC) : _ CC := pr1 C.
304- Coercion cwf_laws_from_cwf_struct (CC : precategory) (C : cwf_struct CC) : cwf_laws C := pr2 C.
303+ Coercion cwf_data_from_cwf_struct (CC : category) (C : cwf_struct CC)
304+ : tt_reindx_type_struct CC
305+ := pr1 C.
305306
307+ Coercion cwf_laws_from_cwf_struct (CC : category) (C : cwf_struct CC)
308+ : cwf_laws C
309+ := pr2 C.
306310
307- Coercion reindx_laws_from_cwf_struct (CC : precategory ) (C : cwf_struct CC)
311+ Coercion reindx_laws_from_cwf_struct (CC : category ) (C : cwf_struct CC)
308312 : reindx_laws C
309313 := pr1 (pr1 (pr2 C)).
310314
311-
312- Definition cwf_comp_laws {CC : precategory} (C : cwf_struct CC)
315+ Definition cwf_comp_laws {CC : category} (C : cwf_struct CC)
313316 : (comp_laws_1_2 C × comp_law_3 C × comp_law_4 C)
314317 := pr2 (pr1 (pr2 C)).
315318
316-
317- Definition has_homsets_cwf {CC : precategory} (C : cwf_struct CC) : has_homsets CC
318- := pr1 (pr2 (pr2 C)).
319-
320- Definition cwf_types_isaset {CC : precategory} (C : cwf_struct CC) Γ : isaset (C⟨Γ⟩)
319+ Definition cwf_types_isaset {CC : category} (C : cwf_struct CC) Γ : isaset (C⟨Γ⟩)
321320 := setproperty (C⟨Γ⟩).
322321
323- Definition cwf_terms_isaset {CC : precategory } (C : cwf_struct CC) : ∏ Γ A, isaset (C⟨Γ ⊢ A⟩)
324- := (pr2 (pr2 (pr2 C) )).
322+ Definition cwf_terms_isaset {CC : category } (C : cwf_struct CC) : ∏ Γ A, isaset (C⟨Γ ⊢ A⟩)
323+ := (pr2 (pr2 C )).
325324
326325
327- Definition cwf_law_1 {CC : precategory } (C : cwf_struct CC)
326+ Definition cwf_law_1 {CC : category } (C : cwf_struct CC)
328327 Γ (A : C ⟨Γ⟩) Γ' (γ : Γ' --> Γ) (a : C⟨Γ'⊢ A[[γ]]⟩)
329328 : (γ ♯ a) ;; (π _) = γ
330329 := pr1 (pr1 (cwf_comp_laws C) Γ A Γ' γ a).
331330
332- Definition cwf_law_2 {CC : precategory } (C : cwf_struct CC)
331+ Definition cwf_law_2 {CC : category } (C : cwf_struct CC)
333332 Γ (A : C ⟨Γ⟩) Γ' (γ : Γ' --> Γ) (a : C⟨Γ'⊢ A[[γ]]⟩)
334333 : transportf (λ ι, C⟨Γ'⊢ A [[ι]]⟩) (cwf_law_1 C Γ A Γ' γ a)
335334 (transportf (λ B, C⟨Γ'⊢ B⟩) (!reindx_type_comp (π _)(γ ♯ a) _ )
336335 ((ν A) ⟦γ ♯ a⟧))
337336 = a
338337 := pr2 ((pr1 (cwf_comp_laws C)) Γ A Γ' γ a).
339338
340- Definition cwf_law_2_gen {CC : precategory } (C : cwf_struct CC)
339+ Definition cwf_law_2_gen {CC : category } (C : cwf_struct CC)
341340 Γ (A : C ⟨Γ⟩) Γ' (γ : Γ' --> Γ) (a : C⟨Γ'⊢ A[[γ]]⟩)
342341 : ∏ (p : (A [[π A]]) [[γ ♯ a]] = A [[γ ♯ a;; π A]]) (p0 : γ ♯ a;; π A = γ),
343342 transportf (λ ι : Γ' --> Γ, C ⟨ Γ' ⊢ A [[ι]] ⟩) p0
@@ -346,17 +345,17 @@ Proof.
346345 intros p p'.
347346 etrans; [ | apply cwf_law_2].
348347 match goal with | [ |- _ = transportf _ ?p1 _ ] => assert (T : p' = p1) end.
349- { apply (has_homsets_cwf C) . }
348+ { apply homset_property . }
350349 rewrite T; clear T. apply maponpaths.
351350 match goal with | [ |- _ = transportf _ ?p1 _ ] => assert (T : p = p1) end.
352351 { apply (cwf_types_isaset C). }
353352 rewrite T; apply idpath.
354353Qed .
355354
356- Definition cwf_law_3 {CC : precategory } (C : cwf_struct CC) : comp_law_3 C
355+ Definition cwf_law_3 {CC : category } (C : cwf_struct CC) : comp_law_3 C
357356 := pr1 (pr2 (cwf_comp_laws C)).
358357
359- Definition cwf_law_3_gen {CC : precategory } (C : cwf_struct CC)
358+ Definition cwf_law_3_gen {CC : category } (C : cwf_struct CC)
360359 (Γ : CC) (A : C ⟨ Γ ⟩) (Γ' Γ'' : CC) (γ : Γ' --> Γ) (γ' : Γ'' --> Γ')
361360 (a : C ⟨ Γ' ⊢ A [[γ]] ⟩) (p : (A [[γ]]) [[γ']] = A [[γ';; γ]]):
362361 γ';; γ ♯ a =
@@ -369,15 +368,12 @@ Proof.
369368 rewrite T; apply idpath.
370369Qed .
371370
372- Definition cwf_law_4 {CC : precategory } (C : cwf_struct CC) : comp_law_4 C
371+ Definition cwf_law_4 {CC : category } (C : cwf_struct CC) : comp_law_4 C
373372 := pr2 (pr2 (cwf_comp_laws C)).
374373
375-
376-
377374Ltac imp := apply impred; intro.
378375
379-
380- Lemma isPredicate_cwf_laws (CC : precategory)
376+ Lemma isPredicate_cwf_laws (CC : category)
381377: isPredicate (@cwf_laws CC).
382378Proof .
383379 intros T.
@@ -386,26 +382,17 @@ Proof.
386382 set (X:= tpair _ T H : cwf_struct CC).
387383 apply (isofhleveltotal2).
388384 - apply isofhleveltotal2.
389- + apply isofhleveltotal2.
390- * intros.
391- do 3 imp. apply (cwf_terms_isaset X).
392- * intros.
393- do 7 imp. apply (cwf_terms_isaset X).
385+ + apply isofhleveltotal2;
386+ intros; repeat imp; apply (cwf_terms_isaset X).
394387 + intros.
395- repeat (apply isofhleveldirprod).
396- *
397- {
398- do 5 imp.
399- apply (isofhleveltotal2 1).
400- - apply (has_homsets_cwf X).
401- - intros. apply (cwf_terms_isaset X).
402- }
403- * do 7 imp. apply (has_homsets_cwf X).
404- * do 2 imp. apply (has_homsets_cwf X).
388+ repeat (apply isofhleveldirprod); repeat imp;
389+ try apply homset_property.
390+ apply (isofhleveltotal2 1).
391+ * apply homset_property.
392+ * intros. apply (cwf_terms_isaset X).
405393 - intros.
406394 repeat (apply isofhleveldirprod).
407- + apply isaprop_has_homsets.
408- + do 2 imp. apply isapropisaset.
395+ do 2 imp. apply isapropisaset.
409396Qed .
410397
411398
@@ -686,7 +673,7 @@ Proof.
686673 apply idpath.
687674Qed .
688675
689- Definition dpr_q_pbpairing_precwf_unique (hs : has_homsets CC)
676+ Definition dpr_q_pbpairing_precwf_unique
690677 {Γ} (A : C⟨Γ⟩)
691678 {Γ'} (f : Γ' --> Γ)
692679 {X} (h : X --> Γ ∙ A) (k : X --> Γ') (H : h ;; π A = k ;; f)
@@ -697,10 +684,10 @@ Proof.
697684 destruct t as [hk [e2 e1] ].
698685 unshelve refine (@total2_paths_f _ _ (tpair _ hk (tpair _ e2 e1)) _
699686 (dpr_q_pbpairing_precwf_mapunique A f H hk e2 e1) _).
700- unshelve refine (total2_paths_f _ _); apply hs .
687+ unshelve refine (total2_paths_f _ _); apply homset_property .
701688Qed .
702689
703- Lemma is_pullback_reindx_cwf (hs : has_homsets CC) : ∏ (Γ : CC) (A : C⟨Γ⟩) (Γ' : CC)
690+ Lemma is_pullback_reindx_cwf : ∏ (Γ : CC) (A : C⟨Γ⟩) (Γ' : CC)
704691 (f : Γ' --> Γ),
705692 isPullback (dpr_q_precwf A f).
706693Proof .
@@ -709,7 +696,6 @@ Proof.
709696 intros e h k H.
710697 exists (dpr_q_pbpairing_precwf _ _ h k H).
711698 apply dpr_q_pbpairing_precwf_unique.
712- assumption.
713699Defined .
714700
715701End CwF_lemmas.
0 commit comments