Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
(** * Functors to cat are pseudofunctors *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Functor.Composition.Core NaturalTransformation.Composition.Core NaturalTransformation.Composition.Laws.Require Import Functor.Identity.Require Import Pseudofunctor.Core.Require Import Cat.Core.Require Import FunctorCategory.Core.Require Import FunctorCategory.Morphisms NaturalTransformation.Isomorphisms.Require Import Category.Morphisms NaturalTransformation.Paths.Require Import Basics.PathGroupoids Basics.Trunc.Set Universe Polymorphism.Set Implicit Arguments.Generalizable All Variables.Set Asymmetric Patterns.LocalOpen Scope path_scope.LocalOpen Scope morphism_scope.(** Every functor to Cat is a pseudofunctor *)Sectionof_functor.Context `{Funext}.VariableC : PreCategory.Context `{HP : forallCD, P C -> P D -> IsHSet (Functor C D)}.Local Notationcat := (@sub_pre_cat _ P HP).VariableF : Functor C cat.Definitionpath_functor_helperAB (F1F2 : Functor A B) (pf1pf2 : F1 = F2)
: P A -> P B -> pf1 = pf2
:= funPAPB => @path_ishprop _ (@HP A B PA PB F1 F2) _ _.LocalHint Extern0 (P ?x.1) => exact x.2 : core.LocalTactic Notation"transitivity_idtoiso" open_constr(hyp) :=
lazymatch goal with
| [ |- ?f (Category.Morphisms.idtoiso ?C _) = _ ] => etransitivity (f (Category.Morphisms.idtoiso C hyp));
[ do2refine (ap _ _); (* https://coq.inria.fr/bugs/show_bug.cgi?id=3626 *)apply path_functor_helper;
simpl; trivial
| path_natural_transformation ]
end.Local Ltacpseudofunctor_t :=
intros;
unfold natural_transformation_of_natural_isomorphism;
rewrite?idtoiso_whisker_r, ?idtoiso_whisker_l;
repeat (
letC := match goal with |- @paths (@NaturalTransformation ?C?D?F?G) _ _ => constr:((C -> D)%category) endinfirst [ eapply (@iso_moveL_pV C)
| eapply (@iso_moveL_Vp C)
| eapply (@iso_moveL_pM C)
| eapply (@iso_moveL_Mp C) ];
simpl
);
rewrite?idtoiso_inv;
simpl;
change @NaturalTransformation.Composition.Core.compose
with (funCDFGH => Category.Core.compose (C := C -> D) (s := F) (d := G) (d' := H));
cbv beta;
rewrite?idtoiso_comp;
first [ transitivity_idtoiso (Functor.Composition.Laws.left_identity _)
| transitivity_idtoiso ((Functor.Composition.Laws.left_identity _)^)
| transitivity_idtoiso (Functor.Composition.Laws.right_identity _)
| transitivity_idtoiso ((Functor.Composition.Laws.right_identity _)^)
| transitivity_idtoiso (Functor.Composition.Laws.associativity _ _ _)
| transitivity_idtoiso ((Functor.Composition.Laws.associativity _ _ _)^) ];
rewrite eta_idtoiso;
simpl;
rewrite?ap_V, ?Functor.Composition.Laws.left_identity_fst, ?Functor.Composition.Laws.right_identity_fst, ?Functor.Composition.Laws.associativity_fst;
tryreflexivity.(* The following helpers were generated with<<intros. repeat match goal with | [ |- context[idtoiso ?C (?f ?x)] ] => generalize (f x); intro | [ |- context[MorphismOf ?F ?f] ] => generalize dependent (MorphismOf F f); repeat (let x := fresh "x" in intro x) | [ |- context[ObjectOf ?F ?f] ] => generalize dependent (ObjectOf F f); repeat (let x := fresh "x" in intro x) end. simpl in *. unfold SubPreCatCat. simpl in *. clear. destruct_head_hnf @sig. simpl in *. repeat match goal with | [ H : _ |- _ ] => revert H end. intros H P.>> *)
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) F: Functor C cat x0, x1, x2, x: PreCategory x7, x11: Functor x0 x1 x12: x7 = x11 x6: Functor x0 x2 x9: Functor x2 x1 x14: x11 = (x9 o x6)%functor x4: Functor x0 x x5: Functor x x1 x8: x7 = (x5 o x4)%functor x10: Functor x x2 x13: x6 = (x10 o x4)%functor x15: x5 = (x9 o x10)%functor H0': P x0 H1': P x1 H2': P x2 H': P x
(associator_1 x9 x10 x4
o ((idtoiso (x -> x1) x15
:
morphism (x -> x1) x5 (x9 o x10)%functor) oR x4
o (idtoiso (x0 -> x1) x8
:
morphism (x0 -> x1) x7 (x5 o x4)%functor)))%natural_transformation =
(x9
oL (idtoiso (x0 -> x2) x13
:
morphism (x0 -> x2) x6 (x10 o x4)%functor)
o ((idtoiso (x0 -> x1) x14
:
morphism (x0 -> x1) x11 (x9 o x6)%functor)
o (idtoiso (x0 -> x1) x12
:
morphism (x0 -> x1) x7 x11)))%natural_transformation
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) F: Functor C cat x0, x1, x2, x: PreCategory x7, x11: Functor x0 x1 x12: x7 = x11 x6: Functor x0 x2 x9: Functor x2 x1 x14: x11 = (x9 o x6)%functor x4: Functor x0 x x5: Functor x x1 x8: x7 = (x5 o x4)%functor x10: Functor x x2 x13: x6 = (x10 o x4)%functor x15: x5 = (x9 o x10)%functor H0': P x0 H1': P x1 H2': P x2 H': P x
(associator_1 x9 x10 x4
o ((idtoiso (x -> x1) x15
:
morphism (x -> x1) x5 (x9 o x10)%functor) oR x4
o (idtoiso (x0 -> x1) x8
:
morphism (x0 -> x1) x7 (x5 o x4)%functor)))%natural_transformation =
(x9
oL (idtoiso (x0 -> x2) x13
:
morphism (x0 -> x2) x6 (x10 o x4)%functor)
o ((idtoiso (x0 -> x1) x14
:
morphism (x0 -> x1) x11 (x9 o x6)%functor)
o (idtoiso (x0 -> x1) x12
:
morphism (x0 -> x1) x7 x11)))%natural_transformation
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) x0, x1, x2, x: PreCategory x7, x11: Functor x0 x1 x12: x7 = x11 x6: Functor x0 x2 x9: Functor x2 x1 x14: x11 = (x9 o x6)%functor x4: Functor x0 x x5: Functor x x1 x8: x7 = (x5 o x4)%functor x10: Functor x x2 x13: x6 = (x10 o x4)%functor x15: x5 = (x9 o x10)%functor H0': P x0 H1': P x1 H2': P x2 H': P x
(associator_1 x9 x10 x4
o ((idtoiso (x -> x1) x15
:
morphism (x -> x1) x5 (x9 o x10)%functor) oR x4
o (idtoiso (x0 -> x1) x8
:
morphism (x0 -> x1) x7 (x5 o x4)%functor)))%natural_transformation =
(x9
oL (idtoiso (x0 -> x2) x13
:
morphism (x0 -> x2) x6 (x10 o x4)%functor)
o ((idtoiso (x0 -> x1) x14
:
morphism (x0 -> x1) x11 (x9 o x6)%functor)
o (idtoiso (x0 -> x1) x12
:
morphism (x0 -> x1) x7 x11)))%natural_transformation
symmetry; simpl; pseudofunctor_t.Qed.
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) F: Functor C cat x0, x: PreCategory x2: Functor x x x3: x2 = 1%functor x4, x5: Functor x0 x x6: x4 = x5 x7: x4 = (x2 o x5)%functor H0': P x0 H': P x
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) F: Functor C cat x0, x: PreCategory x2: Functor x x x3: x2 = 1%functor x4, x5: Functor x0 x x6: x4 = x5 x7: x4 = (x2 o x5)%functor H0': P x0 H': P x
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) x0, x: PreCategory x2: Functor x x x3: x2 = 1%functor x4, x5: Functor x0 x x6: x4 = x5 x7: x4 = (x2 o x5)%functor H0': P x0 H': P x
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) F: Functor C cat x0, x: PreCategory x4: Functor x0 x0 x5: x4 = 1%functor x2, x3: Functor x0 x x6: x2 = x3 x7: x2 = (x3 o x4)%functor H0': P x0 H': P x
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) F: Functor C cat x0, x: PreCategory x4: Functor x0 x0 x5: x4 = 1%functor x2, x3: Functor x0 x x6: x2 = x3 x7: x2 = (x3 o x4)%functor H0': P x0 H': P x
H: Funext C: PreCategory P: PreCategory -> Type HP: forallCD : PreCategory,
P C -> P D -> IsHSet (Functor C D) x0, x: PreCategory x4: Functor x0 x0 x5: x4 = 1%functor x2, x3: Functor x0 x x6: x2 = x3 x7: x2 = (x3 o x4)%functor H0': P x0 H': P x