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 congruence relation. It serves as a universal algebra generalization of normal subgroup, ring ideal, etc. Congruence is used to construct quotients, in similarity with how normal subgroup and ring ideal are used to construct quotients. *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import
HoTT.Universes.HProp
HoTT.Classes.interfaces.canonical_names
HoTT.Algebra.Universal.Homomorphism.Unset Elimination Schemes.LocalOpen Scope Algebra_scope.Sectioncongruence.Context {σ : Signature} (A : Algebra σ) (Φ : foralls, Relation (A s)).(** A finitary operation [f : A s1 * A s2 * ... * A sn -> A t] satisfies [OpCompatible f] iff<< Φ s1 x1 y1 * Φ s2 x2 y2 * ... * Φ sn xn yn>> implies<< Φ t (f (x1, x2, ..., xn)) (f (y1, y2, ..., yn)).>> The below definition generalizes this to infinitary operations.*)DefinitionOpCompatible {w : SymbolType σ} (f : Operation A w) : Type
:= forall (ab : DomOperation A w),
(foralli : Arity w, Φ (sorts_dom w i) (a i) (b i)) ->
Φ (sort_cod w) (f a) (f b).ClassOpsCompatible : Type
:= ops_compatible : forall (u : Symbol σ), OpCompatible u.#A.
σ: Signature A: Algebra σ Φ: foralls : Sort σ, Relation (A s) H: Funext n: trunc_index H0: forall (s : Sort σ) (xy : A s),
IsTrunc n (Φ s x y)
IsTrunc n OpsCompatible
σ: Signature A: Algebra σ Φ: foralls : Sort σ, Relation (A s) H: Funext n: trunc_index H0: forall (s : Sort σ) (xy : A s),
IsTrunc n (Φ s x y)
IsTrunc n OpsCompatible
exact istrunc_forall.Defined.(** A family of relations [Φ] is a congruence iff it is a family of mere equivalence relations and [OpsCompatible A Φ] holds. *)ClassIsCongruence : Type := Build_IsCongruence
{ is_mere_relation_cong :: forall (s : Sort σ), is_mere_relation (A s) (Φ s)
; equiv_rel_cong :: forall (s : Sort σ), EquivRel (Φ s)
; ops_compatible_cong :: OpsCompatible }.GlobalArguments Build_IsCongruence {is_mere_relation_cong}
{equiv_rel_cong}
{ops_compatible_cong}.
bydestruct (path_ishprop C1 D1),
(path_ishprop C2 D2),
(path_ishprop C3 D3).Defined.Endcongruence.(** A homomorphism [f : forall s, A s -> B s] is compatible with a congruence [Φ] iff [Φ s x y] implies [f s x = f s y]. *)DefinitionHomCompatible {σ : Signature} {AB : Algebra σ}
(Φ : foralls, Relation (A s)) `{!IsCongruence A Φ}
(f : foralls, A s -> B s) `{!IsHomomorphism f}
: Type
:= foralls (xy : A s), Φ s x y -> f s x = f s y.