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.
(** This file implements algebra homomorphism. We show that algebras form a wild category with homomorphisms. The [WildCat] module provides some nice notations that we we use: [A $-> B] for homomorphism, [Id] for the identity homomorphism and [g $o f] for composition. *)Local Unset Elimination Schemes.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import
HoTT.Types.LocalOpen Scope Algebra_scope.Sectionis_homomorphism.Context {σ} {AB : Algebra σ} (f : forall (s : Sort σ), A s -> B s).DefinitionOpPreserving {w : SymbolType σ}
(α : Operation A w) (β : Operation B w) : Type
:= foralla : DomOperation A w,
f (sort_cod w) (α a) = β (funi => f (sorts_dom w i) (a i)).
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s H: Funext w: SymbolType σ α: Operation A w β: Operation B w
IsHProp (OpPreserving α β)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s H: Funext w: SymbolType σ α: Operation A w β: Operation B w
IsHProp (OpPreserving α β)
exact istrunc_forall.Qed.ClassIsHomomorphism : Type
:= oppreserving_hom : forall (u : Symbol σ), OpPreserving u.#A u.#B.
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s H: Funext
IsHProp IsHomomorphism
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s H: Funext
IsHProp IsHomomorphism
exact istrunc_forall.Qed.Endis_homomorphism.RecordHomomorphism {σ} {AB : Algebra σ} : Type := Build_Homomorphism
{ def_homomorphism : forall (s : Sort σ), A s -> B s
; is_homomorphism :: IsHomomorphism def_homomorphism }.Arguments Homomorphism {σ}.Arguments Build_Homomorphism {σ A B} def_homomorphism {is_homomorphism}.Global Coerciondef_homomorphism : Homomorphism >-> Funclass.Instanceisgraph_algebra (σ : Signature) : IsGraph (Algebra σ)
:= Build_IsGraph (Algebra σ) Homomorphism.
σ: Signature A, B: Algebra σ f, g: A $-> B
f = g -> foralls : Sort σ, f s == g s
σ: Signature A, B: Algebra σ f, g: A $-> B
f = g -> foralls : Sort σ, f s == g s
σ: Signature A, B: Algebra σ f, g: A $-> B p: f = g
foralls : Sort σ, f s == g s
bydestruct p.Defined.DefinitionSigHomomorphism {σ} (AB : Algebra σ) : Type :=
{ def_hom : foralls, A s -> B s | IsHomomorphism def_hom }.
σ: Signature A, B: Algebra σ
SigHomomorphism A B <~> (A $-> B)
σ: Signature A, B: Algebra σ
SigHomomorphism A B <~> (A $-> B)
issig.Defined.
H: Funext σ: Signature A, B: Algebra σ
IsHSet (A $-> B)
H: Funext σ: Signature A, B: Algebra σ
IsHSet (A $-> B)
exact (istrunc_equiv_istrunc _ (issig_homomorphism A B)).Qed.
H: Funext σ: Signature A, B: Algebra σ f, g: A $-> B p: f = g
f = g
H: Funext σ: Signature A, B: Algebra σ f, g: A $-> B p: f = g
f = g
H: Funext σ: Signature A, B: Algebra σ f, g: A $-> B p: f = g
(issig_homomorphism A B)^-1 f =
(issig_homomorphism A B)^-1 g
H: Funext σ: Signature A, B: Algebra σ f, g: A $-> B p: f = g
(f; is_homomorphism f) = (g; is_homomorphism g)
H: Funext σ: Signature A, B: Algebra σ f, g: A $-> B p: f = g
exact p.Defined.(** The identity homomorphism. *)Sectionhomomorphism_id.Context {σ} (A : Algebra σ).
σ: Signature A: Algebra σ
IsHomomorphism (funs : Sort σ => idmap)
σ: Signature A: Algebra σ
IsHomomorphism (funs : Sort σ => idmap)
σ: Signature A: Algebra σ u: Symbol σ a: foralli : Arity (σ u), A (sorts_dom (σ u) i)
u.#A a = u.#A (funi : Arity (σ u) => a i)
reflexivity.Defined.Definitionhomomorphism_id : A $-> A
:= Build_Homomorphism (funs (x : A s) => x).Endhomomorphism_id.Arguments homomorphism_id {σ} A%_Algebra_scope , {σ} {A}.(** Composition of homomorphisms. *)Sectionhomomorphism_compose.Context {σ} {ABC : Algebra σ}.
σ: Signature A, B, C: Algebra σ g: foralls : Sort σ, B s -> C s IsHomomorphism0: IsHomomorphism g f: foralls : Sort σ, A s -> B s IsHomomorphism1: IsHomomorphism f
IsHomomorphism (funs : Sort σ => g s o f s)
σ: Signature A, B, C: Algebra σ g: foralls : Sort σ, B s -> C s IsHomomorphism0: IsHomomorphism g f: foralls : Sort σ, A s -> B s IsHomomorphism1: IsHomomorphism f
IsHomomorphism (funs : Sort σ => g s o f s)
σ: Signature A, B, C: Algebra σ g: foralls : Sort σ, B s -> C s IsHomomorphism0: IsHomomorphism g f: foralls : Sort σ, A s -> B s IsHomomorphism1: IsHomomorphism f u: Symbol σ a: foralli : Arity (σ u), A (sorts_dom (σ u) i)
g (sort_cod (σ u)) (f (sort_cod (σ u)) (u.#A a)) =
u.#C
(funi : Arity (σ u) =>
g (sorts_dom (σ u) i) (f (sorts_dom (σ u) i) (a i)))
byrewrite <- (oppreserving_hom g), (oppreserving_hom f).Qed.Definitionhomomorphism_compose (g : B $-> C) (f : A $-> B) : A $-> C
:= Build_Homomorphism (funs => g s o f s).Endhomomorphism_compose.Instanceis01cat_algebra (σ : Signature) : Is01Cat (Algebra σ)
:= Build_Is01Cat _ _
(fun_ => homomorphism_id) (fun___ => homomorphism_compose).
H: Funext σ: Signature A, B, C, D: Algebra σ h: C $-> D g: B $-> C f: A $-> B
h $o g $o f = h $o (g $o f)
H: Funext σ: Signature A, B, C, D: Algebra σ h: C $-> D g: B $-> C f: A $-> B
h $o g $o f = h $o (g $o f)
byapply path_homomorphism.Defined.
H: Funext σ: Signature A, B: Algebra σ f: A $-> B
Id B $o f = f
H: Funext σ: Signature A, B: Algebra σ f: A $-> B
Id B $o f = f
byapply path_homomorphism.Defined.
H: Funext σ: Signature A, B: Algebra σ f: A $-> B
f $o Id A = f
H: Funext σ: Signature A, B: Algebra σ f: A $-> B
f $o Id A = f
byapply path_homomorphism.Defined.Instanceis2graph_algebra {σ} : Is2Graph (Algebra σ)
:= funAB
=> Build_IsGraph _ (fun (fg : A $-> B) => foralls, f s == g s).
σ: Signature A, B: Algebra σ
Is01Cat (A $-> B)
σ: Signature A, B: Algebra σ
Is01Cat (A $-> B)
σ: Signature A, B: Algebra σ
foralla : A $-> B, a $-> a
σ: Signature A, B: Algebra σ
forallabc : A $-> B,
(b $-> c) -> (a $-> b) -> a $-> c
σ: Signature A, B: Algebra σ
foralla : A $-> B, a $-> a
exact (funfsx => idpath).
σ: Signature A, B: Algebra σ
forallabc : A $-> B,
(b $-> c) -> (a $-> b) -> a $-> c
exact (funfghPQsx => Q s x @ P s x).Defined.
σ: Signature A, B: Algebra σ
Is0Gpd (A $-> B)
σ: Signature A, B: Algebra σ
Is0Gpd (A $-> B)
σ: Signature A, B: Algebra σ
forallab : A $-> B, (a $-> b) -> b $-> a
σ: Signature A, B: Algebra σ f, g: A $-> B P: f $-> g s: Sort σ x: A s
g s x = f s x
exact (P s x)^.Defined.
σ: Signature A, B, C: Algebra σ h: B $-> C
Is0Functor (cat_postcomp A h)
σ: Signature A, B, C: Algebra σ h: B $-> C
Is0Functor (cat_postcomp A h)
σ: Signature A, B, C: Algebra σ h: B $-> C
forallab : A $-> B,
(a $-> b) -> cat_postcomp A h a $-> cat_postcomp A h b
σ: Signature A, B, C: Algebra σ h: B $-> C f: foralls : Sort σ, A s -> B s is_homomorphism0: IsHomomorphism f g: foralls : Sort σ, A s -> B s is_homomorphism1: IsHomomorphism g p: {|
def_homomorphism := f;
is_homomorphism := is_homomorphism0
|} $->
{|
def_homomorphism := g;
is_homomorphism := is_homomorphism1
|} s: Sort σ x: A s
cat_postcomp A h
{|
def_homomorphism := f;
is_homomorphism := is_homomorphism0
|} s x =
cat_postcomp A h
{|
def_homomorphism := g;
is_homomorphism := is_homomorphism1
|} s x
exact (ap (h s) (p s x)).Defined.
σ: Signature A, B: Algebra σ h: A $-> B C: Algebra σ
Is0Functor (cat_precomp C h)
σ: Signature A, B: Algebra σ h: A $-> B C: Algebra σ
Is0Functor (cat_precomp C h)
σ: Signature A, B: Algebra σ h: A $-> B C: Algebra σ
forallab : B $-> C,
(a $-> b) -> cat_precomp C h a $-> cat_precomp C h b
σ: Signature A, B: Algebra σ h: A $-> B C: Algebra σ f: foralls : Sort σ, B s -> C s is_homomorphism0: IsHomomorphism f g: foralls : Sort σ, B s -> C s is_homomorphism1: IsHomomorphism g p: {|
def_homomorphism := f;
is_homomorphism := is_homomorphism0
|} $->
{|
def_homomorphism := g;
is_homomorphism := is_homomorphism1
|} s: Sort σ x: A s
cat_precomp C h
{|
def_homomorphism := f;
is_homomorphism := is_homomorphism0
|} s x =
cat_precomp C h
{|
def_homomorphism := g;
is_homomorphism := is_homomorphism1
|} s x
exact (p s (h s x)).Defined.
σ: Signature
Is1Cat (Algebra σ)
σ: Signature
Is1Cat (Algebra σ)
by rapply Build_Is1Cat.Defined.
H: Funext σ: Signature
Is1Cat_Strong (Algebra σ)
H: Funext σ: Signature
Is1Cat_Strong (Algebra σ)
H: Funext σ: Signature
forall (abcd : Algebra σ) (f : a $-> b)
(g : b $-> c) (h : c $-> d),
h $o g $o f = h $o (g $o f)
H: Funext σ: Signature
forall (abcd : Algebra σ) (f : a $-> b)
(g : b $-> c) (h : c $-> d),
h $o (g $o f) = h $o g $o f
H: Funext σ: Signature
forall (ab : Algebra σ) (f : a $-> b), Id b $o f = f
H: Funext σ: Signature
forall (ab : Algebra σ) (f : a $-> b), f $o Id a = f
H: Funext σ: Signature
forall (abcd : Algebra σ) (f : a $-> b)
(g : b $-> c) (h : c $-> d),
h $o g $o f = h $o (g $o f)
H: Funext σ: Signature a, b, c, d: Algebra σ f: a $-> b g: b $-> c h: c $-> d
h $o g $o f = h $o (g $o f)
apply assoc_homomorphism_compose.
H: Funext σ: Signature
forall (abcd : Algebra σ) (f : a $-> b)
(g : b $-> c) (h : c $-> d),
h $o (g $o f) = h $o g $o f
H: Funext σ: Signature a, b, c, d: Algebra σ f: a $-> b g: b $-> c h: c $-> d
h $o (g $o f) = h $o g $o f
symmetry; apply assoc_homomorphism_compose.
H: Funext σ: Signature
forall (ab : Algebra σ) (f : a $-> b), Id b $o f = f
H: Funext σ: Signature a, b: Algebra σ f: a $-> b
Id b $o f = f
apply left_id_homomorphism_compose.
H: Funext σ: Signature
forall (ab : Algebra σ) (f : a $-> b), f $o Id a = f