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.
(** * Functoriality of the construction of adjunctions *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Functor.Identity Functor.Composition.Core.Require Import NaturalTransformation.Composition.Core NaturalTransformation.Composition.Laws.Require Import NaturalTransformation.Identity.Require Import NaturalTransformation.Paths.Require Import Functor.Dual NaturalTransformation.Dual.Require Import Adjoint.Core Adjoint.UnitCounit Adjoint.Dual.Require Import Adjoint.Functorial.Parts.Require Import HoTT.Tactics.Require Import Basics.Tactics.Set Universe Polymorphism.Set Implicit Arguments.Generalizable All Variables.Set Asymmetric Patterns.LocalOpen Scope natural_transformation_scope.LocalOpen Scope morphism_scope.Sectionlaws.(** Some tactics to handle all the proofs. The tactics deal with the "obvious" commutativity requirements by writing back and forth with associativity and respectfulness of composition, trying to find applications of the adjunction laws. *)Local Ltactry_various_ways tac :=
progressrepeatfirst [ progress tac
| rewrite <- ?Functor.Core.composition_of;
progress try_associativity_quick tac
| rewrite -> ?Functor.Core.composition_of;
progress try_associativity_quick tac ].(** This is suboptimal, because we keep rewriting back and forth with associativity and [composition_of]. But it only takes 0.74 seconds total, so it's probably not worth optimizing. *)Local Ltachandle_laws' :=
idtac;
match goal with
| _ => reflexivity
| _ => progressrewrite?identity_of, ?Category.Core.left_identity, ?Category.Core.right_identity
| _ => try_various_ways ltac:(f_ap)
| [ |- context[components_of ?T?x] ]
=> try_various_ways ltac:(simplrewrite <- (commutes T))
| [ |- context[unit ?A] ]
=> try_various_ways ltac:(rewrite (unit_counit_equation_1 A))
| [ |- context[unit ?A] ]
=> try_various_ways ltac:(rewrite (unit_counit_equation_2 A))
end.Local Ltact :=
apply path_natural_transformation; intro;
cbn;
repeat handle_laws'.Sectionleft.LocalArguments unit : simpl never.LocalArguments counit : simpl never.Sectionidentity_of.Context `{Funext}.VariablesCD : PreCategory.VariableG : Functor D C.VariableF : Functor C D.VariableA : F -| G.
H: Funext C, D: PreCategory G: Functor D C F: Functor C D A: F -| G
left_morphism_of A A 1 =
(left_identity_natural_transformation_2 F
o right_identity_natural_transformation_1 F)%natural_transformation
H: Funext C, D: PreCategory G: Functor D C F: Functor C D A: F -| G
left_morphism_of A A 1 =
(left_identity_natural_transformation_2 F
o right_identity_natural_transformation_1 F)%natural_transformation
t.Qed.
H: Funext C, D: PreCategory G: Functor D C F: Functor C D A: F -| G
left_morphism_of_nondep A A 1 =
1%natural_transformation
H: Funext C, D: PreCategory G: Functor D C F: Functor C D A: F -| G
left_morphism_of_nondep A A 1 =
1%natural_transformation
t.Qed.Endidentity_of.Sectioncomposition_of_dep.Context `{Funext}.VariablesCC'C'' : PreCategory.VariableCF : Functor C C'.VariableCF' : Functor C' C''.VariablesDD'D'' : PreCategory.VariableDF : Functor D D'.VariableDF' : Functor D' D''.VariableG : Functor D C.VariableF : Functor C D.VariableA : F -| G.VariableG' : Functor D' C'.VariableF' : Functor C' D'.VariableA' : F' -| G'.VariableG'' : Functor D'' C''.VariableF'' : Functor C'' D''.VariableA'' : F'' -| G''.VariableT : NaturalTransformation (CF o G) (G' o DF).VariableT' : NaturalTransformation (CF' o G') (G'' o DF').LocalOpen Scope natural_transformation_scope.
H: Funext C, C', C'': PreCategory CF: Functor C C' CF': Functor C' C'' D, D', D'': PreCategory DF: Functor D D' DF': Functor D' D'' G: Functor D C F: Functor C D A: F -| G G': Functor D' C' F': Functor C' D' A': F' -| G' G'': Functor D'' C'' F'': Functor C'' D'' A'': F'' -| G'' T: NaturalTransformation (CF o G) (G' o DF) T': NaturalTransformation (CF' o G') (G'' o DF')
left_morphism_of A A''
(associator_1 G'' DF' DF o (T' oR DF)
o associator_2 CF' G' DF o (CF' oL T)
o associator_1 CF' CF G) =
associator_2 DF' DF F
o (DF' oL left_morphism_of A A' T)
o associator_1 DF' F' CF
o (left_morphism_of A' A'' T' oR CF)
o associator_2 F'' CF' CF
H: Funext C, C', C'': PreCategory CF: Functor C C' CF': Functor C' C'' D, D', D'': PreCategory DF: Functor D D' DF': Functor D' D'' G: Functor D C F: Functor C D A: F -| G G': Functor D' C' F': Functor C' D' A': F' -| G' G'': Functor D'' C'' F'': Functor C'' D'' A'': F'' -| G'' T: NaturalTransformation (CF o G) (G' o DF) T': NaturalTransformation (CF' o G') (G'' o DF')
left_morphism_of A A''
(associator_1 G'' DF' DF o (T' oR DF)
o associator_2 CF' G' DF o (CF' oL T)
o associator_1 CF' CF G) =
associator_2 DF' DF F
o (DF' oL left_morphism_of A A' T)
o associator_1 DF' F' CF
o (left_morphism_of A' A'' T' oR CF)
o associator_2 F'' CF' CF
t.Qed.Endcomposition_of_dep.Sectioncomposition_of.Context `{Funext}.VariablesCD : PreCategory.VariableG : Functor D C.VariableF : Functor C D.VariableA : F -| G.VariableG' : Functor D C.VariableF' : Functor C D.VariableA' : F' -| G'.VariableG'' : Functor D C.VariableF'' : Functor C D.VariableA'' : F'' -| G''.VariableT : NaturalTransformation G G'.VariableT' : NaturalTransformation G' G''.LocalOpen Scope natural_transformation_scope.
H: Funext C, D: PreCategory G: Functor D C F: Functor C D A: F -| G G': Functor D C F': Functor C D A': F' -| G' G'': Functor D C F'': Functor C D A'': F'' -| G'' T: NaturalTransformation G G' T': NaturalTransformation G' G''
left_morphism_of_nondep A A'' (T' o T) =
left_morphism_of_nondep A A' T
o left_morphism_of_nondep A' A'' T'
H: Funext C, D: PreCategory G: Functor D C F: Functor C D A: F -| G G': Functor D C F': Functor C D A': F' -| G' G'': Functor D C F'': Functor C D A'': F'' -| G'' T: NaturalTransformation G G' T': NaturalTransformation G' G''
left_morphism_of_nondep A A'' (T' o T) =
left_morphism_of_nondep A A' T
o left_morphism_of_nondep A' A'' T'
t.Qed.Endcomposition_of.Endleft.Sectionright.Sectionidentity_of.Context `{Funext}.VariablesCD : PreCategory.VariableF : Functor C D.VariableG : Functor D C.VariableA : F -| G.Definitionright_identity_of
: @right_morphism_of C C 1 D D 1 F G A F G A 1
= ((right_identity_natural_transformation_2 _)
o (left_identity_natural_transformation_1 _))%natural_transformation
:= ap (@NaturalTransformation.Dual.opposite _ _ _ _)
(@left_identity_of _ _ _ F^op G^op A^op).Definitionright_identity_of_nondep
: @right_morphism_of_nondep C D F G A F G A 1 = 1%natural_transformation
:= ap (@NaturalTransformation.Dual.opposite _ _ _ _)
(@left_identity_of_nondep _ _ _ F^op G^op A^op).Endidentity_of.Sectioncomposition_of_dep.Context `{Funext}.VariablesCC'C'' : PreCategory.VariableCF : Functor C C'.VariableCF' : Functor C' C''.VariablesDD'D'' : PreCategory.VariableDF : Functor D D'.VariableDF' : Functor D' D''.VariableF : Functor C D.VariableG : Functor D C.VariableA : F -| G.VariableF' : Functor C' D'.VariableG' : Functor D' C'.VariableA' : F' -| G'.VariableF'' : Functor C'' D''.VariableG'' : Functor D'' C''.VariableA'' : F'' -| G''.VariableT : NaturalTransformation (F' o CF) (DF o F).VariableT' : NaturalTransformation (F'' o CF') (DF' o F').LocalOpen Scope natural_transformation_scope.(** This is slow, at about 3.8 s. It also requires the opposite association to unify. *)Definitionright_composition_of
: right_morphism_of
A A''
((associator_2 DF' DF F)
o ((DF' oL T)
o ((associator_1 DF' F' CF)
o ((T' oR CF)
o (associator_2 F'' CF' CF)))))
= (associator_1 G'' DF' DF)
o ((right_morphism_of A' A'' T' oR DF)
o ((associator_2 CF' G' DF)
o ((CF' oL right_morphism_of A A' T)
o (associator_1 CF' CF G))))
:= ap (@NaturalTransformation.Dual.opposite _ _ _ _)
(@left_composition_of
_ _ _ _ (DF^op) (DF'^op) _ _ _ (CF^op) (CF'^op)
_ _ A^op _ _ A'^op _ _ A''^op T^op T'^op).Endcomposition_of_dep.Sectioncomposition_of.Context `{Funext}.VariablesCD : PreCategory.VariableF : Functor C D.VariableG : Functor D C.VariableA : F -| G.VariableF' : Functor C D.VariableG' : Functor D C.VariableA' : F' -| G'.VariableF'' : Functor C D.VariableG'' : Functor D C.VariableA'' : F'' -| G''.VariableT : NaturalTransformation F F'.VariableT' : NaturalTransformation F' F''.LocalOpen Scope natural_transformation_scope.Definitionright_composition_of_nondep
: (@right_morphism_of_nondep _ _ _ _ A'' _ _ A (T' o T))
= ((right_morphism_of_nondep A' A T)
o (right_morphism_of_nondep A'' A' T'))
:= ap (@NaturalTransformation.Dual.opposite _ _ _ _)
(@left_composition_of_nondep _ _ _ _ _ A''^op _ _ A'^op _ _ A^op T'^op T^op).Endcomposition_of.Endright.Endlaws.