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.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import WildCat.Core.Require Import WildCat.Equiv.Require Import WildCat.Square.Require Import WildCat.Opposite.(** * Wild Natural Transformations *)(** ** Transformations *)(** *** Definition *)(** A transformation is simply a family of 1-cells over some base type [A] between the sections of two dependent functions [F] and [G]. In most cases [F] and [G] will be non-dependent functors. *)DefinitionTransformation {A : Type} {B : A -> Type} `{forallx, IsGraph (B x)}
(F G : forall (x : A), B x)
:= forall (a : A), F a $-> G a.(** This lets us apply transformations to things. Identity Coercion tells Coq that this coercion is in fact definitionally the identity map so it doesn't need to insert it, but merely rewrite definitionally when typechecking. *)Identity Coercionfun_trans : Transformation >-> Funclass.Notation"F $=> G" := (Transformation F G).(** The identity transformation between a functor and itself is the identity function at the section. *)Definitiontrans_id {AB : Type} `{Is01Cat B} (F : A -> B)
: F $=> F
:= funa => Id (F a).(** Transformations can be composed pointwise. *)Definitiontrans_comp {AB : Type} `{Is01Cat B}
{F G K : A -> B} (gamma : G $=> K) (alpha : F $=> G)
: F $=> K
:= funa => gamma a $o alpha a.(** Transformations can be prewhiskered by a function. This means we precompose both sides of the transformation with a function. *)Definitiontrans_prewhisker {AB : Type} {C : B -> Type} {FG : forallx, C x}
`{Is01Cat B} `{!forallx, IsGraph (C x)}
`{!forallx, Is01Cat (C x)} (gamma : F $=> G) (K : A -> B)
: F o K $=> G o K
:= gamma o K.(** Transformations can be postwhiskered by a function. This means we postcompose both sides of the transformation with a function. *)Definitiontrans_postwhisker {ABC : Type} {FG : A -> B}
(K : B -> C) `{Is01Cat B, Is01Cat C, !Is0Functor K} (gamma : F $=> G)
: K o F $=> K o G
:= funa => fmap K (gamma a).(** A transformation in the opposite category is simply a transformation in the original category with the direction swapped. *)Definitiontrans_op {A} {B} `{Is01Cat B}
(F : A -> B) (G : A -> B) (alpha : F $=> G)
: Transformation (A:=A^op) (B:=fun_ => B^op) G (F : A^op -> B^op)
:= alpha.(** ** Naturality *)(** A transformation is 1-natural if there exists a 2-cell witnessing the naturality square. The codomain of the transformation must be a wild 1-category. *)ClassIs1Natural {AB : Type} `{IsGraph A, Is1Cat B}
(F : A -> B) `{!Is0Functor F} (G : A -> B) `{!Is0Functor G}
(alpha : F $=> G) := Build_Is1Natural' {
isnat {a a'} (f : a $-> a') : alpha a' $o fmap F f $== fmap G f $o alpha a;
(** We also include the transposed naturality square in the definition so that opposite natural transformations are definitionally involutive. In most cases, this will be constructed to be the inverse of the [isnat] field. *)
isnat_tr {a a'} (f : a $-> a') : fmap G f $o alpha a $== alpha a' $o fmap F f;
}.Arguments Is1Natural {A B} {isgraph_A}
{isgraph_B} {is2graph_B} {is01cat_B} {is1cat_B}
F {is0functor_F} G {is0functor_G} alpha : rename.Arguments isnat {_ _ _ _ _ _ _ _ _ _ _} alpha {alnat _ _} f : rename.Arguments isnat_tr {_ _ _ _ _ _ _ _ _ _ _} alpha {alnat _ _} f : rename.(** We coerce naturality proofs to their naturality square as the [isnat] projection can be unwieldy in certain situations where the transformation is difficult to write down. This allows for the naturality proof to be used directly. *)Coercionisnat : Is1Natural >-> Funclass.
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: F $=> G isnat: forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
Is1Natural F G alpha
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: F $=> G isnat: forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
Is1Natural F G alpha
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: F $=> G isnat: forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: F $=> G isnat: forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
forall (aa' : A) (f : a $-> a'),
fmap G f $o alpha a $== alpha a' $o fmap F f
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: F $=> G isnat: forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
exact isnat.
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: F $=> G isnat: forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
forall (aa' : A) (f : a $-> a'),
fmap G f $o alpha a $== alpha a' $o fmap F f
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: F $=> G isnat: forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a a, a': A f: a $-> a'
fmap G f $o alpha a $== alpha a' $o fmap F f
exact (isnat a a' f)^$.Defined.(** The identity transformation is 1-natural. *)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F: A -> B Is0Functor0: Is0Functor F
Is1Natural F F (trans_id F)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F: A -> B Is0Functor0: Is0Functor F
Is1Natural F F (trans_id F)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F: A -> B Is0Functor0: Is0Functor F
forall (aa' : A) (f : a $-> a'),
trans_id F a' $o fmap F f $== fmap F f $o trans_id F a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F: A -> B Is0Functor0: Is0Functor F a, b: A f: a $-> b
trans_id F b $o fmap F f $== fmap F f $o trans_id F a
exact (cat_idl _ $@ (cat_idr _)^$).Defined.(** The composite of 1-natural transformations is 1-natural. *)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G, K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: G $=> K Is1Natural0: Is1Natural G K gamma alpha: F $=> G Is1Natural1: Is1Natural F G alpha
Is1Natural F K (trans_comp gamma alpha)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G, K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: G $=> K Is1Natural0: Is1Natural G K gamma alpha: F $=> G Is1Natural1: Is1Natural F G alpha
Is1Natural F K (trans_comp gamma alpha)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G, K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: G $=> K Is1Natural0: Is1Natural G K gamma alpha: F $=> G Is1Natural1: Is1Natural F G alpha
forall (aa' : A) (f : a $-> a'),
trans_comp gamma alpha a' $o fmap F f $==
fmap K f $o trans_comp gamma alpha a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G, K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: G $=> K Is1Natural0: Is1Natural G K gamma alpha: F $=> G Is1Natural1: Is1Natural F G alpha a, b: A f: a $-> b
gamma b $o alpha b $o fmap F f $==
fmap K f $o (gamma a $o alpha a)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G, K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: G $=> K Is1Natural0: Is1Natural G K gamma alpha: F $=> G Is1Natural1: Is1Natural F G alpha a, b: A f: a $-> b
gamma b $o (fmap G f $o alpha a) $==
fmap K f $o (gamma a $o alpha a)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B F, G, K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: G $=> K Is1Natural0: Is1Natural G K gamma alpha: F $=> G Is1Natural1: Is1Natural F G alpha a, b: A f: a $-> b
fmap K f $o gamma a $o alpha a $==
fmap K f $o (gamma a $o alpha a)
apply cat_assoc.Defined.(** Prewhiskering a transformation preserves naturality. *)
A, B, C: Type F, G: B -> C K: A -> B H: IsGraph A H0: IsGraph B H1: Is01Cat B IsGraph0: IsGraph C Is2Graph0: Is2Graph C Is01Cat0: Is01Cat C H2: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: F $=> G L: Is1Natural F G gamma
Is1Natural (F o K) (G o K) (trans_prewhisker gamma K)
A, B, C: Type F, G: B -> C K: A -> B H: IsGraph A H0: IsGraph B H1: Is01Cat B IsGraph0: IsGraph C Is2Graph0: Is2Graph C Is01Cat0: Is01Cat C H2: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: F $=> G L: Is1Natural F G gamma
Is1Natural (F o K) (G o K) (trans_prewhisker gamma K)
A, B, C: Type F, G: B -> C K: A -> B H: IsGraph A H0: IsGraph B H1: Is01Cat B IsGraph0: IsGraph C Is2Graph0: Is2Graph C Is01Cat0: Is01Cat C H2: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: F $=> G L: Is1Natural F G gamma
forall (aa' : A) (f : a $-> a'),
trans_prewhisker gamma K a' $o fmap (F o K) f $==
fmap (G o K) f $o trans_prewhisker gamma K a
A, B, C: Type F, G: B -> C K: A -> B H: IsGraph A H0: IsGraph B H1: Is01Cat B IsGraph0: IsGraph C Is2Graph0: Is2Graph C Is01Cat0: Is01Cat C H2: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K gamma: F $=> G L: Is1Natural F G gamma x, y: A f: x $-> y
gamma (K y) $o fmap F (fmap K f) $==
fmap G (fmap K f) $o gamma (K x)
exact (isnat gamma _).Defined.(** Postwhiskering a transformation preserves naturality. *)
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma
Is1Natural (K o F) (K o G) (trans_postwhisker K gamma)
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma
Is1Natural (K o F) (K o G) (trans_postwhisker K gamma)
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma
forall (aa' : A) (f : a $-> a'),
trans_postwhisker K gamma a' $o fmap (K o F) f $==
fmap (K o G) f $o trans_postwhisker K gamma a
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma x, y: A f: x $-> y
fmap K (gamma y) $o fmap K (fmap F f) $==
fmap K (fmap G f) $o fmap K (gamma x)
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma x, y: A f: x $-> y
?Goal0 $-> fmap K (gamma y) $o fmap K (fmap F f)
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma x, y: A f: x $-> y
?Goal0 $== ?Goal
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma x, y: A f: x $-> y
?Goal $== fmap K (fmap G f) $o fmap K (gamma x)
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma x, y: A f: x $-> y
fmap K (gamma y $o fmap F f) $==
fmap K (fmap G f $o gamma x)
A, B, C: Type F, G: A -> B K: B -> C H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H1: Is1Cat C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K gamma: F $=> G L: Is1Natural F G gamma x, y: A f: x $-> y
gamma y $o fmap F f $== fmap G f $o gamma x
exact (isnat gamma _).Defined.(** Modifying a transformation to something pointwise equal preserves naturality. *)
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha, gamma: F $=> G Is1Natural0: Is1Natural F G gamma p: foralla : A, alpha a $== gamma a
Is1Natural F G alpha
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha, gamma: F $=> G Is1Natural0: Is1Natural F G gamma p: foralla : A, alpha a $== gamma a
Is1Natural F G alpha
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha, gamma: F $=> G Is1Natural0: Is1Natural F G gamma p: foralla : A, alpha a $== gamma a
forall (aa' : A) (f : a $-> a'),
alpha a' $o fmap F f $== fmap G f $o alpha a
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha, gamma: F $=> G Is1Natural0: Is1Natural F G gamma p: foralla : A, alpha a $== gamma a a, b: A f: a $-> b
alpha b $o fmap F f $== fmap G f $o alpha a
exact ((p b $@R _) $@ isnat gamma f $@ (_ $@L (p a)^$)).Defined.(** The opposite of a natural transformation is natural. *)
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha
Is1Natural (G : A^op -> B^op) (F : A^op -> B^op)
(trans_op F G alpha)
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha
Is1Natural (G : A^op -> B^op) (F : A^op -> B^op)
(trans_op F G alpha)
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha
Is1Natural G F (trans_op F G alpha)
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha
forall (aa' : A) (f : a $-> a'),
trans_op F G alpha a' $o fmap (G : A^op -> B^op) f $==
fmap (F : A^op -> B^op) f $o trans_op F G alpha a
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha
forall (aa' : A) (f : a $-> a'),
fmap (F : A^op -> B^op) f $o trans_op F G alpha a $==
trans_op F G alpha a' $o fmap (G : A^op -> B^op) f
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha
forall (aa' : A) (f : a $-> a'),
trans_op F G alpha a' $o fmap (G : A^op -> B^op) f $==
fmap (F : A^op -> B^op) f $o trans_op F G alpha a
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha a, b: A
forallf : a $-> b,
trans_op F G alpha b $o fmap (G : A^op -> B^op) f $==
fmap (F : A^op -> B^op) f $o trans_op F G alpha a
exact (isnat_tr alpha).
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha
forall (aa' : A) (f : a $-> a'),
fmap (F : A^op -> B^op) f $o trans_op F G alpha a $==
trans_op F G alpha a' $o fmap (G : A^op -> B^op) f
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B F: A -> B Is0Functor0: Is0Functor F G: A -> B Is0Functor1: Is0Functor G alpha: F $=> G Is1Natural0: Is1Natural F G alpha a, b: A
forallf : a $-> b,
fmap (F : A^op -> B^op) f $o trans_op F G alpha a $==
trans_op F G alpha b $o fmap (G : A^op -> B^op) f
exact (isnat alpha).Defined.(** ** Natural transformations *)(** Here we give the bundled definition of a natural transformation which can be more convenient to work with in certain situations. It forms the Hom type of the functor category. *)RecordNatTrans {AB : Type} `{IsGraph A} `{Is1Cat B} {F G : A -> B}
{ff : Is0Functor F} {fg : Is0Functor G} := {
#[reversible=no]
trans_nattrans :> F $=> G;
is1natural_nattrans :: Is1Natural F G trans_nattrans;
}.Arguments NatTrans {A B} {isgraph_A}
{isgraph_B} {is2graph_B} {is01cat_B} {is1cat_B}
F G {is0functor_F} {is0functor_G} : rename.Arguments Build_NatTrans {A B isgraph_A isgraph_B is2graph_B is01cat_B is1cat_B
F G is0functor_F is0functor_G} alpha isnat_alpha : rename.Definitionissig_NatTrans {AB : Type} `{IsGraph A} `{Is1Cat B} (F G : A -> B)
{ff : Is0Functor F} {fg : Is0Functor G}
: _ <~> NatTrans F G := ltac:(issig).Definitionnattrans_id {AB : Type} (F : A -> B)
`{IsGraph A, Is1Cat B, !Is0Functor F}
: NatTrans F F
:= Build_NatTrans (trans_id F) _.Definitionnattrans_comp {AB : Type} {FGK : A -> B}
`{IsGraph A, Is1Cat B, !Is0Functor F, !Is0Functor G, !Is0Functor K}
: NatTrans G K -> NatTrans F G -> NatTrans F K
:= funalphabeta => Build_NatTrans (trans_comp alpha beta) _.Definitionnattrans_prewhisker {ABC : Type} {FG : B -> C}
`{IsGraph A, Is1Cat B, Is1Cat C, !Is0Functor F, !Is0Functor G}
(alpha : NatTrans F G) (K : A -> B) `{!Is0Functor K}
: NatTrans (F o K) (G o K)
:= Build_NatTrans (trans_prewhisker alpha K) _.Definitionnattrans_postwhisker {ABC : Type} {FG : A -> B} (K : B -> C)
`{IsGraph A, Is1Cat B, Is1Cat C, !Is0Functor F, !Is0Functor G,
!Is0Functor K, !Is1Functor K}
: NatTrans F G -> NatTrans (K o F) (K o G)
:= funalpha => Build_NatTrans (trans_postwhisker K alpha) _.Definitionnattrans_op {AB : Type} `{Is01Cat A} `{Is1Cat B}
{F G : A -> B} `{!Is0Functor F, !Is0Functor G}
: NatTrans F G
-> NatTrans (A:=A^op) (B:=B^op) (G : A^op -> B^op) (F : A^op -> B^op)
:= funalpha => Build_NatTrans (trans_op F G alpha) _.(** ** Natural equivalences *)(** Natural equivalences are families of equivalences that are natural. *)RecordNatEquiv {AB : Type} `{IsGraph A} `{HasEquivs B}
{F G : A -> B} `{!Is0Functor F, !Is0Functor G} := {
#[reversible=no]
cat_equiv_natequiv :> foralla, F a $<~> G a ;
is1natural_natequiv :: Is1Natural F G (funa => cat_equiv_natequiv a) ;
}.Arguments NatEquiv {A B} {isgraph_A}
{isgraph_B} {is2graph_B} {is01cat_B} {is1cat_B} {hasequivs_B}
F G {is0functor_F} {is0functor_G} : rename.Arguments Build_NatEquiv {A B} {isgraph_A}
{isgraph_B} {is2graph_B} {is01cat_B} {is1cat_B} {hasequivs_B}
F G {is0functor_F} {is0functor_G} e isnat_e: rename.Definitionissig_NatEquiv {AB : Type} `{IsGraph A} `{HasEquivs B}
(F G : A -> B) `{!Is0Functor F, !Is0Functor G}
: _ <~> NatEquiv F G := ltac:(issig).(** From a given natural equivalence, we can get the underlying natural transformation. *)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G
NatEquiv F G -> NatTrans F G
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G
NatEquiv F G -> NatTrans F G
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatEquiv F G
NatTrans F G
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatEquiv F G
Is1Natural F G ?Goal
exact (is1natural_natequiv alpha).Defined.(** Throws a warning, but can probably be ignored. *)Global Set Warnings"-ambiguous-paths".Coercionnattrans_natequiv : NatEquiv >-> NatTrans.(** The above coercion sometimes doesn't trigger when it should, so we add the following. *)Definitionisnat_natequiv {AB : Type} `{IsGraph A} `{HasEquivs B}
{F G : A -> B} `{!Is0Functor F, !Is0Functor G} (alpha : NatEquiv F G)
{a a' : A} (f : a $-> a')
:= isnat (nattrans_natequiv alpha) f.(** Often we wish to build a natural equivalence from a natural transformation and a pointwise proof that it is an equivalence. *)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
NatEquiv F G
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
NatEquiv F G
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
foralla : A, F a $<~> G a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
Is1Natural F G (funa : A => ?e a)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
foralla : A, F a $<~> G a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a) a: A
F a $<~> G a
exact (Build_CatEquiv (alpha a)).
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
Is1Natural F G
(funa : A =>
(funa0 : A => Build_CatEquiv (alpha a0)) a)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
forall (aa' : A) (f : a $-> a'),
(funa0 : A =>
cate_fun
((funa1 : A => Build_CatEquiv (alpha a1)) a0)) a' $o
fmap F f $==
fmap G f $o
(funa0 : A =>
cate_fun
((funa1 : A => Build_CatEquiv (alpha a1)) a0)) a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
forall (aa' : A) (f : a $-> a'),
fmap G f $o
(funa0 : A =>
cate_fun
((funa1 : A => Build_CatEquiv (alpha a1)) a0)) a $==
(funa0 : A =>
cate_fun
((funa1 : A => Build_CatEquiv (alpha a1)) a0)) a' $o
fmap F f
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
forall (aa' : A) (f : a $-> a'),
(funa0 : A =>
cate_fun
((funa1 : A => Build_CatEquiv (alpha a1)) a0)) a' $o
fmap F f $==
fmap G f $o
(funa0 : A =>
cate_fun
((funa1 : A => Build_CatEquiv (alpha a1)) a0)) a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a) a, a': A f: a $-> a'
(funa : A =>
cate_fun
((funa0 : A => Build_CatEquiv (alpha a0)) a)) a' $o
fmap F f $==
fmap G f $o
(funa : A =>
cate_fun
((funa0 : A => Build_CatEquiv (alpha a0)) a)) a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a) a, a': A f: a $-> a'
alpha a' $o fmap F f $== fmap G f $o alpha a
exact (isnat alpha _).
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a)
forall (aa' : A) (f : a $-> a'),
fmap G f $o
(funa0 : A =>
cate_fun
((funa1 : A => Build_CatEquiv (alpha a1)) a0)) a $==
(funa0 : A =>
cate_fun
((funa1 : A => Build_CatEquiv (alpha a1)) a0)) a' $o
fmap F f
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a) a, a': A f: a $-> a'
fmap G f $o
(funa : A =>
cate_fun
((funa0 : A => Build_CatEquiv (alpha a0)) a)) a $==
(funa : A =>
cate_fun
((funa0 : A => Build_CatEquiv (alpha a0)) a)) a' $o
fmap F f
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: NatTrans F G H2: foralla : A, CatIsEquiv (alpha a) a, a': A f: a $-> a'
fmap G f $o alpha a $== alpha a' $o fmap F f
exact (isnat_tr alpha _).Defined.Definitionnatequiv_id {AB : Type} `{IsGraph A} `{HasEquivs B}
{F : A -> B} `{!Is0Functor F}
: NatEquiv F F
:= Build_NatEquiv' (nattrans_id F).Definitionnatequiv_compose {AB} {FGH : A -> B} `{IsGraph A} `{HasEquivs B}
`{!Is0Functor F, !Is0Functor G, !Is0Functor H}
(alpha : NatEquiv G H) (beta : NatEquiv F G)
: NatEquiv F H
:= Build_NatEquiv' (nattrans_comp alpha beta).Definitionnatequiv_prewhisker {ABC} {HK : B -> C}
`{IsGraph A, HasEquivs B, HasEquivs C, !Is0Functor H, !Is0Functor K}
(alpha : NatEquiv H K) (F : A -> B) `{!Is0Functor F}
: NatEquiv (H o F) (K o F)
:= Build_NatEquiv' (nattrans_prewhisker alpha F).
A, B, C: Type F, G: A -> B H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G K: B -> C alpha: NatEquiv F G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K
NatEquiv (K o F) (K o G)
A, B, C: Type F, G: A -> B H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G K: B -> C alpha: NatEquiv F G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K
NatEquiv (K o F) (K o G)
A, B, C: Type F, G: A -> B H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G K: B -> C alpha: NatEquiv F G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K
Is1Functor K
A, B, C: Type F, G: A -> B H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G K: B -> C alpha: NatEquiv F G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K
foralla : A,
CatIsEquiv (nattrans_postwhisker K alpha a)
A, B, C: Type F, G: A -> B H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G K: B -> C alpha: NatEquiv F G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K
Is1Functor K
A, B, C: Type F, G: A -> B H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G K: B -> C alpha: NatEquiv F G Is0Functor2: Is0Functor K Is1Functor0: Is1Functor K
foralla : A, CatIsEquiv (fmap K (alpha a))
all: exact _.Defined.
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B H2: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G
NatEquiv F G -> NatEquiv (G : A^op -> B^op) F
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B H2: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G
NatEquiv F G -> NatEquiv (G : A^op -> B^op) F
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B H2: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G a: foralla : A, F a $<~> G a n: Is1Natural F G (funa0 : A => a a0)
NatEquiv G F
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B H2: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G a: foralla : A, F a $<~> G a n: Is1Natural F G (funa0 : A => a a0)
foralla : A^op, G a $<~> F a
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B H2: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G a: foralla : A, F a $<~> G a n: Is1Natural F G (funa0 : A => a a0)
Is1Natural G F (funa0 : A^op => ?e a0)
A, B: Type H: IsGraph A H0: Is01Cat A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H1: Is1Cat B H2: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G a: foralla : A, F a $<~> G a n: Is1Natural F G (funa0 : A => a a0)
Is1Natural G F (funa0 : A^op => a a0)
by rapply is1natural_op.Defined.(** We can form the inverse natural equivalence by inverting each map in the family. The naturality proof follows from standard lemmas about inverses. *)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G
NatEquiv F G -> NatEquiv G F
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G
NatEquiv F G -> NatEquiv G F
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a)
NatEquiv G F
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a)
foralla : A, G a $<~> F a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a)
Is1Natural G F (funa : A => ?e a)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a)
Is1Natural G F
(funa : A => (funa0 : A => (alpha a0)^-1$) a)
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a)
forall (aa' : A) (f : a $-> a'),
(funa0 : A =>
cate_fun ((funa1 : A => (alpha a1)^-1$) a0)) a' $o
fmap G f $==
fmap F f $o
(funa0 : A =>
cate_fun ((funa1 : A => (alpha a1)^-1$) a0)) a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a)
forall (aa' : A) (f : a $-> a'),
fmap F f $o
(funa0 : A =>
cate_fun ((funa1 : A => (alpha a1)^-1$) a0)) a $==
(funa0 : A =>
cate_fun ((funa1 : A => (alpha a1)^-1$) a0)) a' $o
fmap G f
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a)
forall (aa' : A) (f : a $-> a'),
(funa0 : A =>
cate_fun ((funa1 : A => (alpha a1)^-1$) a0)) a' $o
fmap G f $==
fmap F f $o
(funa0 : A =>
cate_fun ((funa1 : A => (alpha a1)^-1$) a0)) a
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a) X, Y: A f: X $-> Y
(funa : A =>
cate_fun ((funa0 : A => (alpha a0)^-1$) a)) Y $o
fmap G f $==
fmap F f $o
(funa : A =>
cate_fun ((funa0 : A => (alpha a0)^-1$) a)) X
apply vinverse, I.
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a)
forall (aa' : A) (f : a $-> a'),
fmap F f $o
(funa0 : A =>
cate_fun ((funa1 : A => (alpha a1)^-1$) a0)) a $==
(funa0 : A =>
cate_fun ((funa1 : A => (alpha a1)^-1$) a0)) a' $o
fmap G f
A, B: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B F, G: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G alpha: foralla : A, F a $<~> G a I: Is1Natural F G (funa : A => alpha a) X, Y: A f: X $-> Y
fmap F f $o
(funa : A =>
cate_fun ((funa0 : A => (alpha a0)^-1$) a)) X $==
(funa : A =>
cate_fun ((funa0 : A => (alpha a0)^-1$) a)) Y $o
fmap G f
apply hinverse, I.Defined.(** This lemma might seem unnecessary since as functions ((F o G) o K) and (F o (G o K)) are definitionally equal. But the functor instances of both sides are different. This can be a nasty trap since you cannot see this difference clearly. *)
A, B, C, D: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C IsGraph2: IsGraph D Is2Graph2: Is2Graph D Is01Cat2: Is01Cat D H4: Is1Cat D H5: HasEquivs D F: C -> D G: B -> C K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K
NatEquiv (F o G o K) (F o (G o K))
A, B, C, D: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C IsGraph2: IsGraph D Is2Graph2: Is2Graph D Is01Cat2: Is01Cat D H4: Is1Cat D H5: HasEquivs D F: C -> D G: B -> C K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K
NatEquiv (F o G o K) (F o (G o K))
A, B, C, D: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C IsGraph2: IsGraph D Is2Graph2: Is2Graph D Is01Cat2: Is01Cat D H4: Is1Cat D H5: HasEquivs D F: C -> D G: B -> C K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K
foralla : A,
(funx : A => (F o G) (K x)) a $<~>
(funx : A => F ((G o K) x)) a
A, B, C, D: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C IsGraph2: IsGraph D Is2Graph2: Is2Graph D Is01Cat2: Is01Cat D H4: Is1Cat D H5: HasEquivs D F: C -> D G: B -> C K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K
Is1Natural (funx : A => (F o G) (K x))
(funx : A => F ((G o K) x))
(funa : A => ?e a)
A, B, C, D: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C IsGraph2: IsGraph D Is2Graph2: Is2Graph D Is01Cat2: Is01Cat D H4: Is1Cat D H5: HasEquivs D F: C -> D G: B -> C K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K
Is1Natural (funx : A => (F o G) (K x))
(funx : A => F ((G o K) x))
(funa : A =>
(funa0 : A => reflexive_cate (F (G (K a0)))) a)
A, B, C, D: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C IsGraph2: IsGraph D Is2Graph2: Is2Graph D Is01Cat2: Is01Cat D H4: Is1Cat D H5: HasEquivs D F: C -> D G: B -> C K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K
forall (aa' : A) (f : a $-> a'),
(funa0 : A =>
cate_fun
((funa1 : A => reflexive_cate (F (G (K a1)))) a0))
a' $o fmap ((funx : B => F (G x)) o K) f $==
fmap (F o (funx : A => G (K x))) f $o
(funa0 : A =>
cate_fun
((funa1 : A => reflexive_cate (F (G (K a1)))) a0))
a
A, B, C, D: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C IsGraph2: IsGraph D Is2Graph2: Is2Graph D Is01Cat2: Is01Cat D H4: Is1Cat D H5: HasEquivs D F: C -> D G: B -> C K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K X, Y: A f: X $-> Y
(funa : A =>
cate_fun
((funa0 : A => reflexive_cate (F (G (K a0)))) a))
Y $o fmap ((funx : B => F (G x)) o K) f $==
fmap (F o (funx : A => G (K x))) f $o
(funa : A =>
cate_fun
((funa0 : A => reflexive_cate (F (G (K a0)))) a))
X
A, B, C, D: Type H: IsGraph A IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H0: Is1Cat B H1: HasEquivs B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H2: Is1Cat C H3: HasEquivs C IsGraph2: IsGraph D Is2Graph2: Is2Graph D Is01Cat2: Is01Cat D H4: Is1Cat D H5: HasEquivs D F: C -> D G: B -> C K: A -> B Is0Functor0: Is0Functor F Is0Functor1: Is0Functor G Is0Functor2: Is0Functor K X, Y: A f: X $-> Y
fmap (F o (funx : A => G (K x))) f $o
reflexive_cate (F (G (K X))) $->
fmap ((funx : B => F (G x)) o K) f
exact (cat_postwhisker _ (id_cate_fun _) $@ cat_idr _).Defined.(** ** Pointed natural transformations *)DefinitionPointedTransformation {BC : Type} `{Is1Cat B, Is1Gpd C}
`{IsPointed B, IsPointed C} (F G : B -->* C)
:= {eta : F $=> G & eta (point _) $== bp_pointed F $@ (bp_pointed G)^$}.Notation"F $=>* G" := (PointedTransformation F G) (at level70).
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F, G: B -->* C
F $=>* G -> G $=>* F
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F, G: B -->* C
F $=>* G -> G $=>* F
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F, G: B -->* C h: F $=> G p: h (point B) $== bp_pointed F $@ (bp_pointed G)^$
G $=>* F
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F, G: B -->* C h: F $=> G p: h (point B) $== bp_pointed F $@ (bp_pointed G)^$
(h (point B))^$ $== bp_pointed G $@ (bp_pointed F)^$
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F, G: B -->* C h: F $=> G p: h (point B) $== bp_pointed F $@ (bp_pointed G)^$
(bp_pointed F $@ (bp_pointed G)^$)^$ $==
bp_pointed G $@ (bp_pointed F)^$
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F, G: B -->* C h: F $=> G p: h (point B) $== bp_pointed F $@ (bp_pointed G)^$
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F, G: B -->* C h: F $=> G p: h (point B) $== bp_pointed F $@ (bp_pointed G)^$
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F0, F1, F2: B -->* C
F0 $=>* F1 -> F1 $=>* F2 -> F0 $=>* F2
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F0, F1, F2: B -->* C
F0 $=>* F1 -> F1 $=>* F2 -> F0 $=>* F2
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F0, F1, F2: B -->* C h0: F0 $=> F1 p0: h0 (point B) $==
bp_pointed F0 $@ (bp_pointed F1)^$ h1: F1 $=> F2 p1: h1 (point B) $==
bp_pointed F1 $@ (bp_pointed F2)^$
F0 $=>* F2
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F0, F1, F2: B -->* C h0: F0 $=> F1 p0: h0 (point B) $==
bp_pointed F0 $@ (bp_pointed F1)^$ h1: F1 $=> F2 p1: h1 (point B) $==
bp_pointed F1 $@ (bp_pointed F2)^$
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F0, F1, F2: B -->* C h0: F0 $=> F1 p0: h0 (point B) $==
bp_pointed F0 $@ (bp_pointed F1)^$ h1: F1 $=> F2 p1: h1 (point B) $==
bp_pointed F1 $@ (bp_pointed F2)^$
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F0, F1, F2: B -->* C h0: F0 $=> F1 p0: h0 (point B) $==
bp_pointed F0 $@ (bp_pointed F1)^$ h1: F1 $=> F2 p1: h1 (point B) $==
bp_pointed F1 $@ (bp_pointed F2)^$
B, C: Type IsGraph0: IsGraph B Is2Graph0: Is2Graph B Is01Cat0: Is01Cat B H: Is1Cat B IsGraph1: IsGraph C Is2Graph1: Is2Graph C Is01Cat1: Is01Cat C H0: Is1Cat C Is0Gpd0: Is0Gpd C H1: Is1Gpd C H2: IsPointed B H3: IsPointed C F0, F1, F2: B -->* C h0: F0 $=> F1 p0: h0 (point B) $==
bp_pointed F0 $@ (bp_pointed F1)^$ h1: F1 $=> F2 p1: h1 (point B) $==
bp_pointed F1 $@ (bp_pointed F2)^$
apply gpd_h_Vh.Defined.Notation"h $@* k" := (ptransformation_compose h k) (at level40).(* TODO: *)(* Morphisms of natural transformations - Modifications *)(* Since [Transformation] is dependent, we can define a modification to be a transformation together with a cylinder condition. This doesn't seem to be too useful as of yet however. We would also need better ways to write down cylinders. *)