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]
(** * Wild categories, functors, and transformations *)(** ** Directed graphs *)ClassIsGraph (A : Type) :=
{
Hom : A -> A -> Type
}.Notation"a $-> b" := (Hom a b).Definitiongraph_hfiber {BC : Type} `{IsGraph C} (F : B -> C) (c : C)
:= {b : B & F b $-> c}.(** ** 0-categorical structures *)(** A wild (0,1)-category has 1-morphisms and operations on them, but no coherence. *)ClassIs01Cat (A : Type) `{IsGraph A} :=
{
Id : forall (a : A), a $-> a;
cat_comp : forall (abc : A), (b $-> c) -> (a $-> b) -> (a $-> c);
}.(** The [&] symbol here is a "bidirectionality hint". It directs Rocq to typecheck the application of [Build_Is01Cat] to the argument [A] before computing the type of the full term and trying to unify it with the goal, and only afterwards to typecheck the remaining arguments; it will be easier for Rocq to elaborate and typecheck the later arguments [Id] and [cat_comp] if [A] is already known. *)Arguments Build_Is01Cat A &.Arguments cat_comp {A _ _ a b c} _ _.Notation"g $o f" := (cat_comp g f).Definitioncat_postcomp {A} `{Is01Cat A} (a : A) {b c : A} (g : b $-> c)
: (a $-> b) -> (a $-> c)
:= cat_comp g.Definitioncat_precomp {A} `{Is01Cat A} {a b : A} (c : A) (f : a $-> b)
: (b $-> c) -> (a $-> c)
:= fung => g $o f.(** A wild 0-groupoid is a wild (0,1)-category whose morphisms can be reversed. This is also known as a setoid. *)ClassIs0Gpd (A : Type) `{Is01Cat A} :=
{ gpd_rev : forall {ab : A}, (a $-> b) -> (b $-> a) }.DefinitionGpdHom {A} `{Is0Gpd A} (a b : A) := a $-> b.Notation"a $== b" := (GpdHom a b).Instancereflexive_GpdHom {A} `{Is0Gpd A}
: Reflexive GpdHom
:= funa => Id a.Instancereflexive_Hom {A} `{Is01Cat A}
: Reflexive Hom
:= funa => Id a.Definitiongpd_comp {A} `{Is0Gpd A} {a b c : A}
: (a $== b) -> (b $== c) -> (a $== c)
:= funpq => q $o p.Infix"$@" := gpd_comp.Instancetransitive_GpdHom {A} `{Is0Gpd A}
: Transitive GpdHom
:= funabcfg => f $@ g.Instancetransitive_Hom {A} `{Is01Cat A}
: Transitive Hom
:= funabcfg => g $o f.Notation"p ^$" := (gpd_rev p).Instancesymmetric_GpdHom {A} `{Is0Gpd A}
: Symmetric GpdHom
:= funabf => f^$.Instancesymmetric_Hom {A} `{Is0Gpd A}
: Symmetric Hom
:= funabf => f^$.
A: Type H: IsGraph A H0: Is01Cat A a, b: A p: a = b
a $-> b
A: Type H: IsGraph A H0: Is01Cat A a, b: A p: a = b
a $-> b
destruct p; apply Id.Defined.DefinitionGpdHom_path {A} `{Is0Gpd A} {a b : A} (p : a = b) : a $== b
:= Hom_path p.(** A 0-functor acts on morphisms, but satisfies no axioms. *)ClassIs0Functor {AB : Type} `{IsGraph A} `{IsGraph B} (F : A -> B)
:= { fmap : forall (ab : A) (f : a $-> b), F a $-> F b }.Arguments fmap {A B isgraph_A isgraph_B} F {is0functor_F a b} f : rename.ClassIs2Graph (A : Type) `{IsGraph A}
:= isgraph_hom : forall (ab : A), IsGraph (a $-> b).Existing Instanceisgraph_hom | 20.#[global] Typeclasses Transparent Is2Graph.(** ** Wild 1-categorical structures *)ClassIs1Cat (A : Type) `{!IsGraph A, !Is2Graph A, !Is01Cat A} :=
{
is01cat_hom :: forall (ab : A), Is01Cat (a $-> b) ;
is0gpd_hom :: forall (ab : A), Is0Gpd (a $-> b) ;
is0functor_postcomp :: forall (abc : A) (g : b $-> c), Is0Functor (cat_postcomp a g) ;
is0functor_precomp :: forall (abc : A) (f : a $-> b), Is0Functor (cat_precomp c f) ;
cat_assoc : forall (abcd : A) (f : a $-> b) (g : b $-> c) (h : c $-> d),
(h $o g) $o f $== h $o (g $o f);
cat_assoc_opp : forall (abcd : A) (f : a $-> b) (g : b $-> c) (h : c $-> d),
h $o (g $o f) $== (h $o g) $o f;
cat_idl : forall (ab : A) (f : a $-> b), Id b $o f $== f;
cat_idr : forall (ab : A) (f : a $-> b), f $o Id a $== f;
}.Arguments cat_assoc {_ _ _ _ _ _ _ _ _} f g h.Arguments cat_assoc_opp {_ _ _ _ _ _ _ _ _} f g h.Arguments cat_idl {_ _ _ _ _ _ _} f.Arguments cat_idr {_ _ _ _ _ _ _} f.(** An alternate constructor that doesn't require the proof of [cat_assoc_opp]. This can be used for defining examples of wild categories, but shouldn't be used for the general theory of wild categories. *)DefinitionBuild_Is1Cat' (A : Type) `{!IsGraph A, !Is2Graph A, !Is01Cat A}
(is01cat_hom : forallab : A, Is01Cat (a $-> b))
(is0gpd_hom : forallab : A, Is0Gpd (a $-> b))
(is0functor_postcomp : forall (abc : A) (g : b $-> c), Is0Functor (cat_postcomp a g))
(is0functor_precomp : forall (abc : A) (f : a $-> b), Is0Functor (cat_precomp c f))
(cat_assoc : forall (abcd : A) (f : a $-> b) (g : b $-> c) (h : c $-> d),
h $o g $o f $== h $o (g $o f))
(cat_idl : forall (ab : A) (f : a $-> b), Id b $o f $== f)
(cat_idr : forall (ab : A) (f : a $-> b), f $o Id a $== f)
: Is1Cat A
:= Build_Is1Cat A _ _ _ is01cat_hom is0gpd_hom is0functor_postcomp is0functor_precomp
cat_assoc (funabcdfgh => (cat_assoc a b c d f g h)^$) cat_idl cat_idr.(** Whiskering and horizontal composition of 2-cells. *)Definitioncat_postwhisker {A} `{Is1Cat A} {a b c : A}
{f g : a $-> b} (h : b $-> c) (p : f $== g)
: h $o f $== h $o g
:= fmap (cat_postcomp a h) p.Notation"h $@L p" := (cat_postwhisker h p).Definitioncat_prewhisker {A} `{Is1Cat A} {a b c : A}
{f g : b $-> c} (p : f $== g) (h : a $-> b)
: f $o h $== g $o h
:= fmap (cat_precomp c h) p.Notation"p $@R h" := (cat_prewhisker p h).Definitioncat_comp2 {A} `{Is1Cat A} {a b c : A}
{f g : a $-> b} {h k : b $-> c}
(p : f $== g) (q : h $== k )
: h $o f $== k $o g
:= (q $@R _) $@ (_ $@L p).Notation"q $@@ p" := (cat_comp2 q p).(** Monomorphisms and epimorphisms. *)DefinitionMonic {A} `{Is1Cat A} {b c: A} (f : b $-> c)
:= foralla (gh : a $-> b), f $o g $== f $o h -> g $== h.DefinitionEpic {A} `{Is1Cat A} {a b : A} (f : a $-> b)
:= forallc (gh : b $-> c), g $o f $== h $o f -> g $== h.(** Section might be a clearer name but it's better to avoid confusion with Coq keywords. *)RecordSectionOf {A} `{Is1Cat A} {a b : A} (f : a $-> b) :=
{
comp_right_inverse : b $-> a;
is_section : f $o comp_right_inverse $== Id b
}.RecordRetractionOf {A} `{Is1Cat A} {a b : A} (f : a $-> b) :=
{
comp_left_inverse : b $-> a;
is_retraction : comp_left_inverse $o f $== Id a
}.(** Often, the coherences are actually equalities rather than homotopies. *)ClassIs1Cat_Strong (A : Type)`{!IsGraph A, !Is2Graph A, !Is01Cat A} :=
{
is01cat_hom_strong : forall (ab : A), Is01Cat (a $-> b) ;
is0gpd_hom_strong : forall (ab : A), Is0Gpd (a $-> b) ;
is0functor_postcomp_strong : forall (abc : A) (g : b $-> c),
Is0Functor (cat_postcomp a g) ;
is0functor_precomp_strong : forall (abc : A) (f : a $-> b),
Is0Functor (cat_precomp c f) ;
cat_assoc_strong : forall (abcd : A)
(f : a $-> b) (g : b $-> c) (h : c $-> d),
(h $o g) $o f = h $o (g $o f) ;
cat_assoc_opp_strong : forall (abcd : A)
(f : a $-> b) (g : b $-> c) (h : c $-> d),
h $o (g $o f) = (h $o g) $o f ;
cat_idl_strong : forall (ab : A) (f : a $-> b), Id b $o f = f ;
cat_idr_strong : forall (ab : A) (f : a $-> b), f $o Id a = f ;
}.Arguments cat_assoc_strong {_ _ _ _ _ _ _ _ _} f g h.Arguments cat_assoc_opp_strong {_ _ _ _ _ _ _ _ _} f g h.Arguments cat_idl_strong {_ _ _ _ _ _ _} f.Arguments cat_idr_strong {_ _ _ _ _ _ _} f.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
Is1Cat A
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
Is1Cat A
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
forallab : A, Is01Cat (a $-> b)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
forallab : A, Is0Gpd (a $-> b)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
forall (abc : A) (g : b $-> c),
Is0Functor (cat_postcomp a g)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
forall (abc : A) (f : a $-> b),
Is0Functor (cat_precomp c f)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
forall (abcd : A) (f : a $-> b)
(g : b $-> c) (h : c $-> d),
h $o g $o f $== h $o (g $o f)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
forall (abcd : A) (f : a $-> b)
(g : b $-> c) (h : c $-> d),
h $o (g $o f) $== h $o g $o f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
forall (ab : A) (f : a $-> b), Id b $o f $== f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A
forall (ab : A) (f : a $-> b), f $o Id a $== f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
Is01Cat (a $-> b)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
Is0Gpd (a $-> b)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forall (c : A) (g : b $-> c),
Is0Functor (cat_postcomp a g)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forall (c : A) (f : a $-> b),
Is0Functor (cat_precomp c f)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forall (cd : A) (f : a $-> b)
(g : b $-> c) (h : c $-> d),
h $o g $o f $== h $o (g $o f)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forall (cd : A) (f : a $-> b)
(g : b $-> c) (h : c $-> d),
h $o (g $o f) $== h $o g $o f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forallf : a $-> b, Id b $o f $== f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forallf : a $-> b, f $o Id a $== f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
Is01Cat (a $-> b)
apply is01cat_hom_strong.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
Is0Gpd (a $-> b)
apply is0gpd_hom_strong.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forall (c : A) (g : b $-> c),
Is0Functor (cat_postcomp a g)
apply is0functor_postcomp_strong.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forall (c : A) (f : a $-> b),
Is0Functor (cat_precomp c f)
apply is0functor_precomp_strong.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forall (cd : A) (f : a $-> b) (g : b $-> c)
(h : c $-> d), h $o g $o f $== h $o (g $o f)
intros; apply GpdHom_path, cat_assoc_strong.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forall (cd : A) (f : a $-> b) (g : b $-> c)
(h : c $-> d), h $o (g $o f) $== h $o g $o f
intros; apply GpdHom_path, cat_assoc_opp_strong.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forallf : a $-> b, Id b $o f $== f
intros; apply GpdHom_path, cat_idl_strong.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat_Strong A a, b: A
forallf : a $-> b, f $o Id a $== f
intros; apply GpdHom_path, cat_idr_strong.Defined.Hint Immediate is1cat_is1cat_strong : typeclass_instances.(** Initial objects *)DefinitionIsInitial {A : Type} `{Is1Cat A} (x : A)
:= forall (y : A), {f : x $-> y & forallg, f $== g}.Existing ClassIsInitial.Definitionmor_initial {A : Type} `{Is1Cat A} (x y : A) {h : IsInitial x}
: x $-> y
:= (h y).1.Definitionmor_initial_unique {A : Type} `{Is1Cat A} (x y : A) {h : IsInitial x}
(f : x $-> y)
: mor_initial x y $== f
:= (h y).2 f.(** Terminal objects *)DefinitionIsTerminal {A : Type} `{Is1Cat A} (y : A)
:= forall (x : A), {f : x $-> y & forallg, f $== g}.Existing ClassIsTerminal.Definitionmor_terminal {A : Type} `{Is1Cat A} (x y : A) {h : IsTerminal y}
: x $-> y
:= (h x).1.Definitionmor_terminal_unique {A : Type} `{Is1Cat A} (x y : A) {h : IsTerminal y}
(f : x $-> y)
: mor_terminal x y $== f
:= (h x).2 f.(** Generalizing function extensionality, "Morphism extensionality" states that homwise [GpdHom_path] is an equivalence. *)ClassHasMorExt (A : Type) `{Is1Cat A} :=
isequiv_Htpy_path :: forall (ab : A) fg, IsEquiv (@GpdHom_path (a $-> b) _ _ _ f g).Definitionpath_hom {A} `{HasMorExt A} {a b : A} {f g : a $-> b} (p : f $== g)
: f = g
:= GpdHom_path^-1 p.(** A 1-category with morphism extensionality induces a strong 1-category *)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A
Is1Cat_Strong A
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A
Is1Cat_Strong A
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A a, b, c, d: A f: a $-> b g: b $-> c h: c $-> d
h $o g $o f $== h $o (g $o f)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A a, b, c, d: A f: a $-> b g: b $-> c h: c $-> d
h $o (g $o f) $== h $o g $o f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A a, b: A f: a $-> b
Id b $o f $== f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A a, b: A f: a $-> b
f $o Id a $== f
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A a, b, c, d: A f: a $-> b g: b $-> c h: c $-> d
h $o g $o f $== h $o (g $o f)
apply cat_assoc.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A a, b, c, d: A f: a $-> b g: b $-> c h: c $-> d
h $o (g $o f) $== h $o g $o f
apply cat_assoc_opp.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A a, b: A f: a $-> b
Id b $o f $== f
apply cat_idl.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A H0: HasMorExt A a, b: A f: a $-> b
f $o Id a $== f
apply cat_idr.Defined.(** A 1-functor acts on 2-cells (satisfying no axioms) and also preserves composition and identities up to a 2-cell. *)(* The [!] tells Coq to use typeclass search to find the [IsGraph] parameters of [Is0Functor] instead of assuming additional copies of them. *)ClassIs1Functor {AB : Type} `{Is1Cat A} `{Is1Cat B}
(F : A -> B) `{!Is0Functor F} :=
{
fmap2 : forallab (fg : a $-> b), (f $== g) -> (fmap F f $== fmap F g) ;
fmap_id : foralla, fmap F (Id a) $== Id (F a);
fmap_comp : forallabc (f : a $-> b) (g : b $-> c),
fmap F (g $o f) $== fmap F g $o fmap F f;
}.Arguments fmap2 {A B
isgraph_A is2graph_A is01cat_A is1cat_A
isgraph_B is2graph_B is01cat_B is1cat_B}
F {is0functor_F is1functor_F a b f g} p : rename.Arguments fmap_id {A B
isgraph_A is2graph_A is01cat_A is1cat_A
isgraph_B is2graph_B is01cat_B is1cat_B}
F {is0functor_F is1functor_F} a : rename.Arguments fmap_comp {A B
isgraph_A is2graph_A is01cat_A is1cat_A
isgraph_B is2graph_B is01cat_B is1cat_B}
F {is0functor_F is1functor_F a b c} f g : rename.ClassFaithful {AB : Type} (F : A -> B) `{Is1Functor A B F} :=
faithful : forall (xy : A) (fg : x $-> y),
fmap F f $== fmap F g -> f $== g.(** Identity functor *)SectionIdentityFunctor.
A: Type H: IsGraph A
Is0Functor idmap
A: Type H: IsGraph A
Is0Functor idmap
byapply Build_Is0Functor.Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A
Is1Functor idmap
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A
Is1Functor idmap
byapply Build_Is1Functor.Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A
Faithful idmap
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A
A, B: Type H: IsGraph A H0: IsGraph B H1: Is01Cat B x: B
Is0Functor (fun_ : A => x)
A, B: Type H: IsGraph A H0: IsGraph B H1: Is01Cat B x: B
Is0Functor (fun_ : A => x)
A, B: Type H: IsGraph A H0: IsGraph B H1: Is01Cat B x: B
forallab : A,
(a $-> b) -> (fun_ : A => x) a $-> (fun_ : A => x) b
intros a b f; apply Id.Defined.
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B
Is1Functor (fun_ : A => x)
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B
Is1Functor (fun_ : A => x)
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B
forall (ab : A) (fg : a $-> b),
f $== g ->
fmap (fun_ : A => x) f $== fmap (fun_ : A => x) g
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B
foralla : A,
fmap (fun_ : A => x) (Id a) $==
Id ((fun_ : A => x) a)
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B
forall (abc : A) (f : a $-> b)
(g : b $-> c),
fmap (fun_ : A => x) (g $o f) $==
fmap (fun_ : A => x) g $o fmap (fun_ : A => x) f
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B
forall (ab : A) (fg : a $-> b),
f $== g ->
fmap (fun_ : A => x) f $== fmap (fun_ : A => x) g
intros a b f g p; apply Id.
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B
foralla : A,
fmap (fun_ : A => x) (Id a) $==
Id ((fun_ : A => x) a)
intro; apply Id.
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B
forall (abc : A) (f : a $-> b) (g : b $-> c),
fmap (fun_ : A => x) (g $o f) $==
fmap (fun_ : A => x) g $o fmap (fun_ : A => x) f
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B a, b, c: A f: a $-> b g: b $-> c
fmap (fun_ : A => x) (g $o f) $==
fmap (fun_ : A => x) g $o fmap (fun_ : A => x) f
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B a, b, c: A f: a $-> b g: b $-> c
Id x $== Id x $o Id x
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B x: B a, b, c: A f: a $-> b g: b $-> c
A, B, C: Type H: IsGraph A H0: IsGraph B H1: IsGraph C F: A -> B Is0Functor0: Is0Functor F G: B -> C Is0Functor1: Is0Functor G
Is0Functor (G o F)
A, B, C: Type H: IsGraph A H0: IsGraph B H1: IsGraph C F: A -> B Is0Functor0: Is0Functor F G: B -> C Is0Functor1: Is0Functor G
Is0Functor (G o F)
A, B, C: Type H: IsGraph A H0: IsGraph B H1: IsGraph C F: A -> B Is0Functor0: Is0Functor F G: B -> C Is0Functor1: Is0Functor G
forallab : A,
(a $-> b) ->
(funx : A => G (F x)) a $-> (funx : A => G (F x)) b
intros a b f; exact (fmap G (fmap F f)).Defined.
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G
Is1Functor (G o F)
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G
Is1Functor (G o F)
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G
forall (ab : A) (fg : a $-> b),
f $== g -> fmap (G o F) f $== fmap (G o F) g
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G
foralla : A,
fmap (G o F) (Id a) $== Id ((funx : A => G (F x)) a)
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G
forall (abc : A) (f : a $-> b)
(g : b $-> c),
fmap (G o F) (g $o f) $==
fmap (G o F) g $o fmap (G o F) f
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G
forall (ab : A) (fg : a $-> b),
f $== g -> fmap (G o F) f $== fmap (G o F) g
intros a b f g p; exact (fmap2 G (fmap2 F p)).
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G
foralla : A,
fmap (G o F) (Id a) $== Id ((funx : A => G (F x)) a)
intros a; exact (fmap2 G (fmap_id F a) $@ fmap_id G (F a)).
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G
forall (abc : A) (f : a $-> b) (g : b $-> c),
fmap (G o F) (g $o f) $==
fmap (G o F) g $o fmap (G o F) f
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G a, b, c: A f: a $-> b g: b $-> c
fmap (G o F) (g $o f) $==
fmap (G o F) g $o fmap (G o F) f
A, B, C: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B IsGraph2: IsGraph C Is2Graph2: Is2Graph C Is01Cat2: Is01Cat C H1: Is1Cat C F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F G: B -> C Is0Functor1: Is0Functor G Is1Functor1: Is1Functor G a, b, c: A f: a $-> b g: b $-> c
fmap G (fmap F g $o fmap F f) $==
fmap (G o F) g $o fmap (G o F) f
exact (fmap_comp G (fmap F f) (fmap F g)).Defined.(** We give all arguments names in order to refer to them later. This allows us to write things like [is0functor (isgraph_A := _)] without having to make all the variables explicit. *)Arguments is0functor_compose {A B C} {isgraph_A isgraph_B isgraph_C}
F {is0functor_F} G {is0functor_G} : rename.Arguments is1functor_compose {A B C}
{isgraph_A is2graph_A is01cat_A is1cat_A
isgraph_B is2graph_B is01cat_B is1cat_B
isgraph_C is2graph_C is01cat_C is1cat_C}
F {is0functor_F} {is1functor_F}
G {is0functor_G} {is1functor_G}
: rename.(** ** Wild 1-groupoids *)ClassIs1Gpd (A : Type) `{Is1Cat A, !Is0Gpd A} :=
{
gpd_issect : forall {ab : A} (f : a $-> b), f^$ $o f $== Id a ;
gpd_isretr : forall {ab : A} (f : a $-> b), f $o f^$ $== Id b ;
}.(** Some more convenient equalities for morphisms in a 1-groupoid. The naming scheme is similar to [PathGroupoids.v].*)Definitiongpd_V_hh {A} `{Is1Gpd A} {a b c : A} (f : b $-> c) (g : a $-> b)
: f^$ $o (f $o g) $== g :=
(cat_assoc _ _ _)^$ $@ (gpd_issect f $@R g) $@ cat_idl g.Definitiongpd_h_Vh {A} `{Is1Gpd A} {a b c : A} (f : c $-> b) (g : a $-> b)
: f $o (f^$ $o g) $== g :=
(cat_assoc _ _ _)^$ $@ (gpd_isretr f $@R g) $@ cat_idl g.Definitiongpd_hh_V {A} `{Is1Gpd A} {a b c : A} (f : b $-> c) (g : a $-> b)
: (f $o g) $o g^$ $== f :=
cat_assoc _ _ _ $@ (f $@L gpd_isretr g) $@ cat_idr f.Definitiongpd_hV_h {A} `{Is1Gpd A} {a b c : A} (f : b $-> c) (g : b $-> a)
: (f $o g^$) $o g $== f :=
cat_assoc _ _ _ $@ (f $@L gpd_issect g) $@ cat_idr f.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: p $o q^$ $== Id y
p $== q
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: p $o q^$ $== Id y
p $== q
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: p $o q^$ $== Id y
p $o q^$ $o q $== q
exact ((r $@R q) $@ cat_idl q).Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p: x $-> y q: y $-> x r: Id y $== p $o q
p^$ $== q
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p: x $-> y q: y $-> x r: Id y $== p $o q
p^$ $== q
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p: x $-> y q: y $-> x r: Id y $== p $o q
p^$ $o (p $o q) $== q
apply gpd_V_hh.Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: Id x $== p^$ $o q
p $== q
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: Id x $== p^$ $o q
p $== q
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: Id x $== p^$ $o q
p $== p $o (p^$ $o q)
exact ((cat_idr p)^$ $@ (p $@L r)).Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: Id y $== q $o p^$
p $== q
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: Id y $== q $o p^$
p $== q
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: Id y $== q $o p^$
Id y $o p $== q $o Id x
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: Id y $== q $o p^$
Id y $o p $== q $o p^$ $o p
exact (r $@R p).Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p: x $-> y q: y $-> x r: p $o q $== Id y
p $== q^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p: x $-> y q: y $-> x r: p $o q $== Id y
p $== q^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p: x $-> y q: y $-> x r: p $o q $== Id y
p $== Id y $o q^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p: x $-> y q: y $-> x r: p $o q $== Id y
p $== p $o q $o q^$
exact (gpd_hh_V _ _)^$.Defined.Definitiongpd_moveR_hV {A : Type} `{Is1Gpd A} {x y z : A} {p : y $-> z}
{q : x $-> y} {r : x $-> z} (s : r $== p $o q)
: r $o q^$ $== p
:= (s $@R q^$) $@ gpd_hh_V _ _.Definitiongpd_moveR_Vh {A : Type} `{Is1Gpd A} {x y z : A} {p : y $-> z}
{q : x $-> y} {r : x $-> z} (s : r $== p $o q)
: p^$ $o r $== q
:= (p^$ $@L s) $@ gpd_V_hh _ _.Definitiongpd_moveL_hM {A : Type} `{Is1Gpd A} {x y z : A} {p : y $-> z}
{q : x $-> y} {r : x $-> z} (s : r $o q^$ $== p)
: r $== p $o q := ((gpd_hV_h _ _)^$ $@ (s $@R _)).Definitiongpd_moveL_hV {A : Type} `{Is1Gpd A} {x y z : A} {p : y $-> z}
{q : x $-> y} {r : x $-> z} (s : p $o q $== r)
: p $== r $o q^$
:= (gpd_moveR_hV s^$)^$.Definitiongpd_moveL_Mh {A : Type} `{Is1Gpd A} {x y z : A} {p : y $-> z}
{q : x $-> y} {r : x $-> z} (s : p^$ $o r $== q)
: r $== p $o q := ((gpd_h_Vh _ _)^$ $@ (p $@L s)).Definitiongpd_moveL_Vh {A : Type} `{Is1Gpd A} {x y z : A} {p : y $-> z}
{q : x $-> y} {r : x $-> z} (s : p $o q $== r)
: q $== p^$ $o r
:= (gpd_moveR_Vh s^$)^$.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: p $== q
p^$ $== q^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: p $== q
p^$ $== q^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: p $== q
Id y $== p $o q^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A x, y: A p, q: x $-> y r: p $== q
Id y $o q $== p
exact (cat_idl q $@ r^$).Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a, b, c: A f: b $-> c g: a $-> b
(f $o g)^$ $== g^$ $o f^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a, b, c: A f: b $-> c g: a $-> b
(f $o g)^$ $== g^$ $o f^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a, b, c: A f: b $-> c g: a $-> b
Id c $== f $o g $o (g^$ $o f^$)
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a, b, c: A f: b $-> c g: a $-> b
Id c $== f $o g $o g^$ $o f^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a, b, c: A f: b $-> c g: a $-> b
Id c $o f $== f $o g $o g^$
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a, b, c: A f: b $-> c g: a $-> b
f $== f $o g $o g^$
exact (gpd_hh_V _ _)^$.Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a: A
(Id a)^$ $== Id a
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a: A
(Id a)^$ $== Id a
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a: A
((Id a)^$ $o Id a)^$ $== Id a
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a: A
(Id a)^$ $o ((Id a)^$)^$ $== Id a
apply gpd_isretr.Defined.
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a0, a1: A g: a0 $== a1
(g^$)^$ $== g
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a0, a1: A g: a0 $== a1
(g^$)^$ $== g
A: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A a0, a1: A g: a0 $== a1
Id a0 $== g^$ $o g
exact (gpd_issect _)^$.Defined.(** 1-functors between 1-groupoids preserve identities *)
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H1: Is1Cat B Is0Gpd1: Is0Gpd B H2: Is1Gpd B F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F a0, a1: A f: a0 $== a1
fmap F f^$ $== (fmap F f)^$
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H1: Is1Cat B Is0Gpd1: Is0Gpd B H2: Is1Gpd B F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F a0, a1: A f: a0 $== a1
fmap F f^$ $== (fmap F f)^$
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H1: Is1Cat B Is0Gpd1: Is0Gpd B H2: Is1Gpd B F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F a0, a1: A f: a0 $== a1
fmap F f^$ $o fmap F f $== Id (F a0)
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H1: Is1Cat B Is0Gpd1: Is0Gpd B H2: Is1Gpd B F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F a0, a1: A f: a0 $== a1
fmap F (f^$ $o f) $== fmap F (Id a0)
A, B: Type IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A Is0Gpd0: Is0Gpd A H0: Is1Gpd A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H1: Is1Cat B Is0Gpd1: Is0Gpd B H2: Is1Gpd B F: A -> B Is0Functor0: Is0Functor F Is1Functor0: Is1Functor F a0, a1: A f: a0 $== a1
f^$ $o f $== Id a0
apply gpd_issect.Defined.(** Movement lemmas with extensionality *)(** For more complex movements you probably want to apply [path_hom] and use the lemmas above. *)Definitiongpd_strong_V_hh {A} `{Is1Gpd A, !HasMorExt A} {a b c : A} (f : b $-> c) (g : a $-> b)
: f^$ $o (f $o g) = g := path_hom (gpd_V_hh f g).Definitiongpd_strong_h_Vh {A} `{Is1Gpd A, !HasMorExt A} {a b c : A} (f : c $-> b) (g : a $-> b)
: f $o (f^$ $o g) = g := path_hom (gpd_h_Vh f g).Definitiongpd_strong_hh_V {A} `{Is1Gpd A, !HasMorExt A} {a b c : A} (f : b $-> c) (g : a $-> b)
: (f $o g) $o g^$ = f := path_hom (gpd_hh_V f g).Definitiongpd_strong_hV_h {A} `{Is1Gpd A, !HasMorExt A} {a b c : A} (f : b $-> c) (g : b $-> a)
: (f $o g^$) $o g = f := path_hom (gpd_hV_h f g).Definitiongpd_strong_rev_pp {A} `{Is1Gpd A, !HasMorExt A} {a b c : A} (f : b $-> c) (g : a $-> b)
: (f $o g)^$ = g^$ $o f^$
:= path_hom (gpd_rev_pp f g).Definitiongpd_strong_rev_1 {A} `{Is1Gpd A, !HasMorExt A} {a : A}
: (Id a)^$ = Id a
:= path_hom gpd_rev_1.Definitiongpd_strong_rev_rev {A} `{Is1Gpd A, !HasMorExt A} {a0 a1 : A} (g : a0 $== a1)
: (g^$)^$ = g := path_hom (gpd_rev_rev g).Definitionfmap_id_strong {AB} `{Is1Cat A, Is1Cat B, !HasMorExt B}
(F : A -> B) `{!Is0Functor F, !Is1Functor F} (a : A)
: fmap F (Id a) = Id (F a)
:= path_hom (fmap_id F a).Definitiongpd_strong_1functor_V {AB} `{Is1Gpd A, Is1Gpd B, !HasMorExt B}
(F : A -> B) `{!Is0Functor F, !Is1Functor F}
{a0 a1 : A} (f : a0 $== a1)
: fmap F f^$ = (fmap F f)^$
:= path_hom (gpd_1functor_V F f).ClassIs3Graph (A : Type) `{Is2Graph A}
:= isgraph_hom_hom : forall (ab : A), Is2Graph (a $-> b).Existing Instanceisgraph_hom_hom | 30.#[global] Typeclasses Transparent Is3Graph.(** *** Preservation of initial and terminal objects *)ClassPreservesInitial {AB : Type} (F : A -> B)
`{Is1Functor A B F} : Type
:= isinitial_preservesinitial
:: forall (x : A), IsInitial x -> IsInitial (F x).(** The initial morphism is preserved by such a functor. *)
A, B: Type F: A -> B IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B Is0Functor0: Is0Functor F H1: Is1Functor F H2: PreservesInitial F x, y: A h: IsInitial x
fmap F (mor_initial x y) $== mor_initial (F x) (F y)
A, B: Type F: A -> B IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B Is0Functor0: Is0Functor F H1: Is1Functor F H2: PreservesInitial F x, y: A h: IsInitial x
fmap F (mor_initial x y) $== mor_initial (F x) (F y)
exact (mor_initial_unique _ _ _)^$.Defined.ClassPreservesTerminal {AB : Type} (F : A -> B)
`{Is1Functor A B F} : Type
:= isterminal_preservesterminal
:: forall (x : A), IsTerminal x -> IsTerminal (F x).(** The terminal morphism is preserved by such a functor. *)
A, B: Type F: A -> B IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B Is0Functor0: Is0Functor F H1: Is1Functor F H2: PreservesTerminal F x, y: A h: IsTerminal y
fmap F (mor_terminal x y) $== mor_terminal (F x) (F y)
A, B: Type F: A -> B IsGraph0: IsGraph A Is2Graph0: Is2Graph A Is01Cat0: Is01Cat A H: Is1Cat A IsGraph1: IsGraph B Is2Graph1: Is2Graph B Is01Cat1: Is01Cat B H0: Is1Cat B Is0Functor0: Is0Functor F H1: Is1Functor F H2: PreservesTerminal F x, y: A h: IsTerminal y
fmap F (mor_terminal x y) $== mor_terminal (F x) (F y)
B, C, D: Type H: IsGraph B H0: Is01Cat B H1: IsGraph C H2: Is01Cat C H3: IsGraph D H4: Is01Cat D H5: IsPointed B H6: IsPointed C H7: IsPointed D F: B -->* C G: C -->* D
B -->* D
B, C, D: Type H: IsGraph B H0: Is01Cat B H1: IsGraph C H2: Is01Cat C H3: IsGraph D H4: Is01Cat D H5: IsPointed B H6: IsPointed C H7: IsPointed D F: B -->* C G: C -->* D
B -->* D
B, C, D: Type H: IsGraph B H0: Is01Cat B H1: IsGraph C H2: Is01Cat C H3: IsGraph D H4: Is01Cat D H5: IsPointed B H6: IsPointed C H7: IsPointed D F: B -->* C G: C -->* D
B -> D
B, C, D: Type H: IsGraph B H0: Is01Cat B H1: IsGraph C H2: Is01Cat C H3: IsGraph D H4: Is01Cat D H5: IsPointed B H6: IsPointed C H7: IsPointed D F: B -->* C G: C -->* D
Is0Functor ?bp_map
B, C, D: Type H: IsGraph B H0: Is01Cat B H1: IsGraph C H2: Is01Cat C H3: IsGraph D H4: Is01Cat D H5: IsPointed B H6: IsPointed C H7: IsPointed D F: B -->* C G: C -->* D
?bp_map (point B) $-> point D
B, C, D: Type H: IsGraph B H0: Is01Cat B H1: IsGraph C H2: Is01Cat C H3: IsGraph D H4: Is01Cat D H5: IsPointed B H6: IsPointed C H7: IsPointed D F: B -->* C G: C -->* D
B -> D
exact (G o F).
B, C, D: Type H: IsGraph B H0: Is01Cat B H1: IsGraph C H2: Is01Cat C H3: IsGraph D H4: Is01Cat D H5: IsPointed B H6: IsPointed C H7: IsPointed D F: B -->* C G: C -->* D
Is0Functor (G o F)
exact _.
B, C, D: Type H: IsGraph B H0: Is01Cat B H1: IsGraph C H2: Is01Cat C H3: IsGraph D H4: Is01Cat D H5: IsPointed B H6: IsPointed C H7: IsPointed D F: B -->* C G: C -->* D
(G o F) (point B) $-> point D
exact (bp_pointed G $o fmap G (bp_pointed F)).Defined.Notation"G $o* F" := (basepointpreservingfunctor_compose F G) (at level40).