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 involving product categories *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Types.Prod.Set Universe Polymorphism.Set Implicit Arguments.Generalizable All Variables.Set Asymmetric Patterns.Local Notationfst_type := fst.Local Notationsnd_type := snd.Local Notationpair_type := pair.LocalOpen Scope morphism_scope.LocalOpen Scope functor_scope.(** ** First and second projections from a product precategory *)Sectionproj.Context {C : PreCategory}.Context {D : PreCategory}.Definitionfst : Functor (C * D) C
:= Build_Functor (C * D) C
(@fst _ _)
(fun__ => @fst _ _)
(fun_____ => idpath)
(fun_ => idpath).Definitionsnd : Functor (C * D) D
:= Build_Functor (C * D) D
(@snd _ _)
(fun__ => @snd _ _)
(fun_____ => idpath)
(fun_ => idpath).Endproj.(** ** Product of two functors from the same domain *)Sectionprod.VariablesCDD' : PreCategory.Definitionprod (F : Functor C D) (F' : Functor C D')
: Functor C (D * D')
:= Build_Functor
C (D * D')
(func => (F c, F' c))
(funsdm => (F _1 m, F' _1 m))
(fun_____ => path_prod' (composition_of F _ _ _ _ _)
(composition_of F' _ _ _ _ _))
(fun_ => path_prod' (identity_of F _) (identity_of F' _)).Endprod.LocalInfix"*" := prod : functor_scope.(** ** Pairing of two functors *)Sectionpair.VariablesCDC'D' : PreCategory.VariableF : Functor C D.VariableF' : Functor C' D'.LocalOpen Scope functor_scope.Definitionpair : Functor (C * C') (D * D')
:= (F o fst) * (F' o snd).Endpair.LocalNotation"( x , y , .. , z )" := (pair .. (pair x y) .. z) : functor_scope.(** ** Partially applied functors out of a product precategory *)Sectioninduced.VariablesCDE : PreCategory.VariableF : Functor (C * D) E.LocalOpen Scope core_scope.Local Ltact :=
simpl; intros;
repeat (rewrite <- ?composition_of, <- ?identity_of, ?left_identity, ?right_identity; simpl);
trivial.(** Note: This is just the currying exponential law. *)(** TODO: Come up with a better name for this? *)
C, D, E: PreCategory F: Functor (C * D) E d: D
Functor C E
C, D, E: PreCategory F: Functor (C * D) E d: D
Functor C E
refine (Build_Functor
C E
(func => F (c, d))
(fun__m => @morphism_of _ _ F (_, _) (_, _) (m, identity d))
_
_);
abstract t.Defined.
C, D, E: PreCategory F: Functor (C * D) E c: C
Functor D E
C, D, E: PreCategory F: Functor (C * D) E c: C
Functor D E
refine (Build_Functor
D E
(fund => F (c, d))
(fun__m => @morphism_of _ _ F (_, _) (_, _) (identity c, m))
_
_);
abstract t.Defined.Endinduced.Local Set Warnings"-notation-overridden".ModuleExport FunctorProdCoreNotations.Infix"*" := prod : functor_scope.Notation"( x , y , .. , z )" := (pair .. (pair x y) .. z) : functor_scope.EndFunctorProdCoreNotations.