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.
(** * Definition of natural transformation *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Set Universe Polymorphism.Set Implicit Arguments.Generalizable All Variables.Set Asymmetric Patterns.Declare Scope natural_transformation_scope.Delimit Scope natural_transformation_scope with natural_transformation.LocalOpen Scope morphism_scope.LocalOpen Scope natural_transformation_scope.SectionNaturalTransformation.VariablesCD : PreCategory.VariablesFG : Functor C D.(** Quoting from the lecture notes for 18.705, Commutative Algebra: A map of functors is known as a natural transformation. Namely, given two functors [F : C -> D], [G : C -> D], a natural transformation [T: F -> G] is a collection of maps [T A : F A -> G A], one for each object [A] of [C], such that [(T B) ∘ (F m) = (G m) ∘ (T A)] for every map [m : A -> B] of [C]; that is, the following diagram is commutative:<< F m F A -------> F B | | | | | T A | T B | | V G m V G A --------> G B>> **)RecordNaturalTransformation :=
Build_NaturalTransformation' {
components_of :> forallc, morphism D (F c) (G c);
commutes : forallsd (m : morphism C s d),
components_of d o F _1 m = G _1 m o components_of s;
(* We require the following symmetrized version so that for eta-expanded [T], we have [(T^op)^op = T] judgementally. *)
commutes_sym : forallsd (m : C.(morphism) s d),
G _1 m o components_of s = components_of d o F _1 m
}.DefinitionBuild_NaturalTransformationCOCOM
:= Build_NaturalTransformation'
CO
COM
(fun___ => symmetry _ _ (COM _ _ _)).EndNaturalTransformation.Bind Scope natural_transformation_scope with NaturalTransformation.Create HintDb natural_transformation discriminated.GlobalArguments components_of {C D}%_category {F G}%_functor T%_natural_transformation /
c%_object : rename.GlobalArguments commutes {C D F G} !T / _ _ _ : rename.GlobalArguments commutes_sym {C D F G} !T / _ _ _ : rename.#[export]
Hint Resolve commutes : category natural_transformation.(** ** Helper lemmas *)(** Some helper lemmas for rewriting. In the names, [p] stands for a morphism, [T] for natural transformation, and [F] for functor. *)Definitioncommutes_pT_FCD (FG : Functor C D) (T : NaturalTransformation F G)
sdd' (m : morphism C s d) (m' : morphism D _ d')
: (m' o T d) o F _1 m = (m' o G _1 m) o T s
:= ((Category.Core.associativity _ _ _ _ _ _ _ _)
@ ap _ (commutes _ _ _ _)
@ (Category.Core.associativity_sym _ _ _ _ _ _ _ _))%path.Definitioncommutes_T_FpCD (FG : Functor C D) (T : NaturalTransformation F G)
sdd' (m : morphism C s d) (m' : morphism D d' _)
: T d o (F _1 m o m') = G _1 m o (T s o m')
:= ((Category.Core.associativity_sym _ _ _ _ _ _ _ _)
@ ap10 (ap _ (commutes _ _ _ _)) _
@ (Category.Core.associativity _ _ _ _ _ _ _ _))%path.