Skip to content

Commit ad54ca1

Browse files
Merge pull request #172 from fizruk/AKLV/direct-surjective-2
Another proof that reluniv_functor_with_ess_surj is surjective
2 parents ce63519 + 1eb89cc commit ad54ca1

File tree

2 files changed

+334
-30
lines changed

2 files changed

+334
-30
lines changed

TypeTheory/ALV2/RelUnivTransfer.v

Lines changed: 316 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,292 @@ Section RelUniv_Transfer.
332332
- apply reluniv_functor_with_ess_surj_is_faithful, S_faithful.
333333
Defined.
334334

335+
Section Surjective_if_R_split_ess_surj.
336+
Context (R_ses : split_ess_surj R)
337+
(D'_univ : is_univalent D')
338+
(invS : functor D' D)
339+
(eta : iso (C:=[D, D, pr2 D]) (functor_identity D) (S ∙ invS))
340+
(eps : iso (C:=[D', D', pr2 D']) (invS ∙ S) (functor_identity D'))
341+
(S_ff : fully_faithful S).
342+
343+
Let E := ((S,, (invS,, (pr1 eta, pr1 eps)))
344+
,, ((λ d, (pr2 (Constructions.pointwise_iso_from_nat_iso eta d )))
345+
, (λ d', (pr2 (Constructions.pointwise_iso_from_nat_iso eps d')))))
346+
: equivalence_of_precats D D'.
347+
348+
Let AE := adjointificiation E.
349+
Let η' := pr1 (pr121 AE) : nat_trans (functor_identity _) (S ∙ invS).
350+
Let ε' := pr2 (pr121 AE) : nat_trans (invS ∙ S) (functor_identity _).
351+
Let η := functor_iso_from_pointwise_iso
352+
_ _ _ _ _ η' (pr12 (adjointificiation E))
353+
: iso (C:=[D, D, pr2 D]) (functor_identity D) (S ∙ invS).
354+
Let ε := functor_iso_from_pointwise_iso
355+
_ _ _ _ _ ε' (pr22 (adjointificiation E))
356+
: iso (C:=[D', D', pr2 D']) (invS ∙ S) (functor_identity D').
357+
358+
Let ηx := Constructions.pointwise_iso_from_nat_iso (iso_inv_from_iso η).
359+
Let αx := Constructions.pointwise_iso_from_nat_iso (α,,α_is_iso).
360+
361+
Section Helpers.
362+
363+
Context (u' : reluniv_cat J').
364+
365+
Let p' := pr1 u' : mor_total D'.
366+
Let Ũ' := pr21 p' : D'.
367+
Let U' := pr11 p' : D'.
368+
Let pf' := pr2 p' : D' ⟦ Ũ', U' ⟧.
369+
370+
Let U := invS U'.
371+
Let Ũ := invS Ũ'.
372+
Let pf := # invS pf'.
373+
Local Definition p := functor_on_mor_total invS p' : mor_total D.
374+
375+
Context (X : C) (f : D ⟦ J X, U ⟧).
376+
377+
Let X' := R X : C'.
378+
Let f' := inv_from_iso (αx X) ;; # S f ;; pr11 ε U'
379+
: D' ⟦ J' X' , U' ⟧.
380+
Let pb' := pr2 u' X' f' : fpullback J' p' f'.
381+
Let Xf' := pr11 pb'.
382+
383+
Local Definition Xf := pr1 (R_ses Xf') : C.
384+
Let RXf_Xf'_iso := pr2 (R_ses Xf') : iso (R Xf) Xf'.
385+
386+
Let pp' := pr121 pb' : C' ⟦ Xf', X' ⟧.
387+
Local Definition pp : C ⟦ Xf, X ⟧.
388+
Proof.
389+
use (invweq (weq_from_fully_faithful ff_J _ _)).
390+
use (pr11 η _ ;; _ ;; pr1 (inv_from_iso η) _).
391+
use (# invS _).
392+
apply (pr1 α Xf ;; # J' (RXf_Xf'_iso ;; pp') ;; inv_from_iso (αx X)).
393+
Defined.
394+
395+
Let Q' := pr221 pb' : D' ⟦ J' Xf', Ũ' ⟧.
396+
Local Definition Q
397+
:= pr11 η _ ;; # invS (pr1 α Xf ;; # J' RXf_Xf'_iso ;; Q')
398+
: D ⟦ J Xf, invS Ũ' ⟧.
399+
400+
Let pb'_commutes := pr12 pb' : # J' pp' ;; f' = Q' ;; p'.
401+
Let pb'_isPullback := pr22 pb'.
402+
403+
Local Definition pb_commutes_and_is_pullback
404+
: commutes_and_is_pullback f p (# J pp) Q.
405+
Proof.
406+
use (@commutes_and_is_pullback_transfer_iso
407+
_ _ _ _ _
408+
_ _ _ _
409+
_ _ _ (J Xf)
410+
f p (# J pp) Q
411+
_ _ _ _
412+
_ _ _ _
413+
(functor_on_square _ _ invS pb'_commutes)
414+
).
415+
- apply identity_iso.
416+
- eapply iso_comp.
417+
apply functor_on_iso, iso_inv_from_iso, αx.
418+
apply ηx.
419+
- apply identity_iso.
420+
- eapply iso_comp. apply functor_on_iso, functor_on_iso.
421+
apply iso_inv_from_iso, RXf_Xf'_iso.
422+
eapply iso_comp. apply functor_on_iso, iso_inv_from_iso, αx.
423+
apply ηx.
424+
- unfold f', iso_comp.
425+
426+
etrans. apply id_right.
427+
etrans. apply functor_comp.
428+
etrans. apply maponpaths_2, functor_comp.
429+
etrans. apply assoc'.
430+
apply pathsinv0.
431+
etrans. apply assoc'.
432+
apply maponpaths.
433+
434+
etrans. apply pathsinv0.
435+
apply (nat_trans_ax (inv_from_iso η)).
436+
apply maponpaths.
437+
438+
apply pathsinv0.
439+
etrans. apply pathsinv0, id_left.
440+
etrans. apply maponpaths_2, pathsinv0.
441+
apply (maponpaths (λ k, pr1 k (invS U'))
442+
(iso_after_iso_inv η)).
443+
444+
etrans. apply assoc'.
445+
etrans. apply maponpaths.
446+
set (AE_tr2 := pr2 (pr221 AE) U'
447+
: pr11 η (invS U') ;; # invS (pr11 ε U')
448+
= identity _).
449+
apply AE_tr2.
450+
apply id_right.
451+
452+
- etrans. apply id_right.
453+
apply pathsinv0, id_left.
454+
455+
- apply pathsinv0.
456+
etrans. apply maponpaths.
457+
apply (homotweqinvweq (weq_from_fully_faithful ff_J _ _)). (* *)
458+
459+
etrans. apply maponpaths, assoc'.
460+
etrans. apply maponpaths, maponpaths, maponpaths_2.
461+
apply (functor_comp invS).
462+
etrans. apply maponpaths, maponpaths, assoc'.
463+
etrans. apply assoc.
464+
etrans. apply assoc.
465+
apply maponpaths_2.
466+
467+
unfold iso_comp, functor_on_iso. simpl.
468+
etrans. apply maponpaths_2, maponpaths_2, maponpaths, maponpaths.
469+
apply id_right.
470+
etrans. apply maponpaths_2, assoc'.
471+
etrans. apply maponpaths_2, maponpaths, assoc'.
472+
etrans. apply maponpaths_2, maponpaths, maponpaths.
473+
apply iso_after_iso_inv.
474+
475+
etrans. apply maponpaths_2, maponpaths, id_right.
476+
etrans. apply maponpaths, functor_comp.
477+
etrans. apply assoc.
478+
etrans. apply maponpaths_2, assoc'.
479+
etrans. apply maponpaths_2, maponpaths.
480+
apply pathsinv0, functor_comp.
481+
etrans. apply maponpaths_2, maponpaths, maponpaths.
482+
apply iso_after_iso_inv.
483+
484+
etrans. apply maponpaths_2, pathsinv0, functor_comp.
485+
etrans. apply pathsinv0, functor_comp.
486+
apply maponpaths.
487+
488+
etrans. apply maponpaths_2, id_right.
489+
etrans. apply pathsinv0, functor_comp.
490+
apply maponpaths.
491+
492+
etrans. apply assoc.
493+
etrans. apply maponpaths_2, iso_after_iso_inv.
494+
apply id_left.
495+
496+
- etrans. apply id_right.
497+
apply pathsinv0.
498+
499+
unfold Q, iso_comp, functor_on_iso. simpl.
500+
501+
etrans. apply maponpaths_2, maponpaths, maponpaths.
502+
apply id_right.
503+
504+
etrans. apply assoc.
505+
etrans. apply maponpaths_2, assoc'.
506+
etrans. apply maponpaths_2, maponpaths, assoc'.
507+
etrans. apply maponpaths_2, maponpaths, maponpaths.
508+
apply iso_after_iso_inv.
509+
510+
etrans. apply maponpaths_2, maponpaths.
511+
apply id_right.
512+
513+
etrans. apply maponpaths, functor_comp.
514+
etrans. apply assoc.
515+
etrans. apply maponpaths_2, assoc'.
516+
etrans. apply maponpaths_2, maponpaths, maponpaths, functor_comp.
517+
etrans. apply maponpaths_2, maponpaths, assoc.
518+
etrans. apply maponpaths_2, maponpaths, maponpaths_2.
519+
apply pathsinv0, functor_comp.
520+
etrans. apply maponpaths_2, maponpaths, maponpaths_2.
521+
apply maponpaths, iso_after_iso_inv.
522+
523+
etrans. apply maponpaths_2, maponpaths.
524+
apply pathsinv0, functor_comp.
525+
etrans. apply maponpaths_2, maponpaths.
526+
apply maponpaths, id_left.
527+
528+
etrans. apply maponpaths_2, pathsinv0, functor_comp.
529+
etrans. apply pathsinv0, functor_comp.
530+
apply maponpaths.
531+
532+
etrans. apply maponpaths_2, pathsinv0, functor_comp.
533+
etrans. apply maponpaths_2, maponpaths, iso_after_iso_inv.
534+
etrans. apply maponpaths_2, functor_id.
535+
apply id_left.
536+
537+
- use (isPullback_image_square _ _ invS).
538+
+ apply homset_property.
539+
+ apply (right_adj_equiv_is_ff _ _ S AE).
540+
+ apply (right_adj_equiv_is_ess_sur _ _ S AE).
541+
+ apply pb'_isPullback.
542+
Defined.
543+
544+
End Helpers.
545+
546+
Definition inv_reluniv_with_ess_surj
547+
: reluniv_cat J' → reluniv_cat J.
548+
Proof.
549+
intros u'.
550+
use tpair.
551+
+ apply (p u').
552+
+ intros X f.
553+
use tpair.
554+
* use tpair.
555+
-- apply (Xf u' X f).
556+
-- use make_dirprod.
557+
++ apply pp.
558+
++ apply Q.
559+
* apply pb_commutes_and_is_pullback.
560+
Defined.
561+
562+
Definition reluniv_functor_with_ess_surj_after_inv_iso
563+
(u' : reluniv_cat J')
564+
: iso u'
565+
(reluniv_functor_with_ess_surj (inv_reluniv_with_ess_surj u')).
566+
Proof.
567+
set (εx := Constructions.pointwise_iso_from_nat_iso ε).
568+
set (εx' := Constructions.pointwise_iso_from_nat_iso
569+
(iso_inv_from_iso ε)).
570+
use z_iso_to_iso.
571+
use make_z_iso.
572+
- use tpair.
573+
+ use make_dirprod.
574+
* cbn. apply (εx' (pr211 u')).
575+
* cbn. apply (εx' (pr111 u')).
576+
+ unfold is_gen_reluniv_mor.
577+
etrans. apply pathsinv0.
578+
apply (nat_trans_ax (pr1 (iso_inv_from_iso ε))).
579+
apply idpath.
580+
- use tpair.
581+
+ use make_dirprod.
582+
* cbn. apply (εx (pr211 u')).
583+
* cbn. apply (εx (pr111 u')).
584+
+ unfold is_gen_reluniv_mor.
585+
etrans. apply pathsinv0.
586+
apply (nat_trans_ax (pr1 ε)).
587+
apply idpath.
588+
- use make_dirprod.
589+
+ use gen_reluniv_mor_eq.
590+
* apply (maponpaths (λ k, pr1 k _) (iso_after_iso_inv ε)).
591+
* apply (maponpaths (λ k, pr1 k _) (iso_after_iso_inv ε)).
592+
+ use gen_reluniv_mor_eq.
593+
* apply (maponpaths (λ k, pr1 k _) (iso_inv_after_iso ε)).
594+
* apply (maponpaths (λ k, pr1 k _) (iso_inv_after_iso ε)).
595+
Defined.
596+
597+
Definition reluniv_functor_with_ess_surj_after_inv_id
598+
(u' : reluniv_cat J')
599+
: u' = reluniv_functor_with_ess_surj (inv_reluniv_with_ess_surj u').
600+
Proof.
601+
use isotoid.
602+
- use reluniv_cat_is_univalent.
603+
+ apply C'_univ.
604+
+ apply ff_J'.
605+
+ apply D'_univ.
606+
- apply reluniv_functor_with_ess_surj_after_inv_iso.
607+
Defined.
608+
609+
Definition reluniv_functor_with_ess_surj_issurjective
610+
: issurjective reluniv_functor_with_ess_surj.
611+
Proof.
612+
intros u'.
613+
use hinhpr.
614+
use tpair.
615+
- apply (inv_reluniv_with_ess_surj u').
616+
- apply pathsinv0, reluniv_functor_with_ess_surj_after_inv_id.
617+
Defined.
618+
619+
End Surjective_if_R_split_ess_surj.
620+
335621
End RelUniv_Transfer_with_ess_surj.
336622

337623
End RelUniv_Transfer.
@@ -529,7 +815,7 @@ Section WeakRelUniv_Transfer.
529815
- apply weak_relu_square_nat_trans_is_nat_iso.
530816
Defined.
531817

532-
Definition weak_relu_square_commutes_strictly
818+
Definition weak_relu_square_commutes_identity
533819
(C'_univ : is_univalent C')
534820
: (relu_J_to_relu_J' C'_univ ∙ weak_from_reluniv_functor J')
535821
= (weak_from_reluniv_functor J ∙ weak_reluniv_functor).
@@ -541,29 +827,29 @@ Section WeakRelUniv_Transfer.
541827
apply weak_relu_square_commutes.
542828
Defined.
543829

544-
Definition reluniv_functor_with_ess_surj_issurjective
545-
(C'_univ : is_univalent C')
546-
(AC : AxiomOfChoice.AxiomOfChoice)
547-
(obC_isaset : isaset C)
548-
: issurjective (reluniv_functor_with_ess_surj
549-
_ _ _ _ J J'
550-
R S α α_is_iso
551-
S_pb C'_univ ff_J' S_full R_es
552-
).
553-
Proof.
554-
set (W := (weak_from_reluniv_functor J'
555-
,, weak_from_reluniv_functor_is_catiso J' C'_univ ff_J')
556-
: catiso _ _).
557-
use (Core.issurjective_postcomp_with_weq _ (catiso_ob_weq W)).
558-
use (transportf (λ F, issurjective (pr11 F))
559-
(! weak_relu_square_commutes_strictly C'_univ)).
560-
use issurjcomp.
561-
- apply weak_from_reluniv_functor_issurjective.
562-
apply AC.
563-
apply obC_isaset.
564-
- apply issurjectiveweq.
565-
apply (catiso_ob_weq (_,,weak_reluniv_functor_is_catiso)).
566-
Defined.
830+
Definition reluniv_functor_with_ess_surj_issurjective_AC
831+
(C'_univ : is_univalent C')
832+
(AC : AxiomOfChoice.AxiomOfChoice)
833+
(obC_isaset : isaset C)
834+
: issurjective (reluniv_functor_with_ess_surj
835+
_ _ _ _ J J'
836+
R S α α_is_iso
837+
S_pb C'_univ ff_J' S_full R_es
838+
).
839+
Proof.
840+
set (W := (weak_from_reluniv_functor J'
841+
,, weak_from_reluniv_functor_is_catiso J' C'_univ ff_J')
842+
: catiso _ _).
843+
use (Core.issurjective_postcomp_with_weq _ (catiso_ob_weq W)).
844+
use (transportf (λ F, issurjective (pr11 F))
845+
(! weak_relu_square_commutes_identity C'_univ)).
846+
use issurjcomp.
847+
- apply weak_from_reluniv_functor_issurjective.
848+
apply AC.
849+
apply obC_isaset.
850+
- apply issurjectiveweq.
851+
apply (catiso_ob_weq (_,,weak_reluniv_functor_is_catiso)).
852+
Defined.
567853

568854
End WeakRelUniv_Transfer.
569855

@@ -614,10 +900,9 @@ Section RelUniv_Yo_Rezk.
614900
(obC_isaset : isaset C)
615901
: issurjective transfer_of_RelUnivYoneda_functor.
616902
Proof.
617-
use (reluniv_functor_with_ess_surj_issurjective
903+
use (reluniv_functor_with_ess_surj_issurjective_AC
618904
_ _ _ _ Yo Yo
619905
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
620-
AC obC_isaset
621906
).
622907
- apply is_univalent_preShv.
623908
- apply is_univalent_preShv.
@@ -627,6 +912,8 @@ Section RelUniv_Yo_Rezk.
627912
- apply fully_faithful_implies_full_and_faithful.
628913
apply right_adj_equiv_is_ff.
629914
- apply R_full.
915+
- apply AC.
916+
- apply obC_isaset.
630917
Defined.
631918

632919
Definition transfer_of_WeakRelUnivYoneda_functor
@@ -657,11 +944,11 @@ Section RelUniv_Yo_Rezk.
657944
apply weak_reluniv_functor_is_catiso.
658945
Defined.
659946

660-
Definition WeakRelUnivYoneda_functor_square_commutes_strictly
947+
Definition WeakRelUnivYoneda_functor_square_commutes_identity
661948
: (transfer_of_RelUnivYoneda_functor ∙ weak_from_reluniv_functor _)
662949
= (weak_from_reluniv_functor _ ∙ transfer_of_WeakRelUnivYoneda_functor).
663950
Proof.
664-
apply weak_relu_square_commutes_strictly.
951+
apply weak_relu_square_commutes_identity.
665952
Defined.
666953

667-
End RelUniv_Yo_Rezk.
954+
End RelUniv_Yo_Rezk.

0 commit comments

Comments
 (0)