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 [IsHomomorphism] and [IsIsomorphism]. It develops basic algebra homomorphisms and isomorphims. The main theorem in this file is the [path_isomorphism] theorem, which states that there is a path between isomorphic algebras. *)
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import
HoTT.Types
HoTT.Tactics.Import algebra_notations ne_list.notations.Sectionis_homomorphism.Context {σ} {AB : Algebra σ} (f : ∀ (s : Sort σ), A s → B s).(** The family of functions [f] above is [OpPreserving α β] with respect to operations [α : A s1 → A s2 → ... → A sn → A t] and [β : B s1 → B s2 → ... → B sn → B t] if<< f t (α x1 x2 ... xn) = β (f s1 x1) (f s2 x2) ... (f sn xn)>>*)FixpointOpPreserving {w : SymbolType σ}
: Operation A w → Operation B w → Type
:= match w with
| [:s:] => λαβ, f s α = β
| s ::: y => λαβ, ∀ (x : A s), OpPreserving (α x) (β (f s x))
end.
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s H: Funext n: trunc_index IsTruncAlgebra0: IsTruncAlgebra n.+1 B w: SymbolType σ α: Operation A w β: Operation B w
IsTrunc n (OpPreserving α β)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s H: Funext n: trunc_index IsTruncAlgebra0: IsTruncAlgebra n.+1 B w: SymbolType σ α: Operation A w β: Operation B w
IsTrunc n (OpPreserving α β)
induction w; exact _.Qed.(** The family of functions [f : ∀ (s : Sort σ), A s → B s] above is a homomorphism if for each function symbol [u : Symbol σ], it is [OpPreserving u.#A u.#B] with respect to the algebra operations [u.#A] and [u.#B] corresponding to [u]. *)ClassIsHomomorphism : Type
:= oppreserving_hom : ∀ (u : Symbol σ), OpPreserving u.#A u.#B.
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s H: Funext n: trunc_index IsTruncAlgebra0: IsTruncAlgebra n.+1 B
IsTrunc n IsHomomorphism
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s H: Funext n: trunc_index IsTruncAlgebra0: IsTruncAlgebra n.+1 B
IsTrunc n IsHomomorphism
apply istrunc_forall.Qed.Endis_homomorphism.RecordHomomorphism {σ} {AB : Algebra σ} : Type := BuildHomomorphism
{ def_hom : ∀ (s : Sort σ), A s → B s
; is_homomorphism_hom :: IsHomomorphism def_hom }.Arguments Homomorphism {σ}.Arguments BuildHomomorphism {σ A B} def_hom {is_homomorphism_hom}.(** We the implicit coercion from [Homomorphism A B] to the family of functions [∀ s, A s → B s]. *)Global Coerciondef_hom : Homomorphism >-> Funclass.
σ: Signature A, B: Algebra σ f, g: Homomorphism A B
f = g -> foralls : Sort σ, f s == g s
σ: Signature A, B: Algebra σ f, g: Homomorphism A B
f = g -> foralls : Sort σ, f s == g s
σ: Signature A, B: Algebra σ f, g: Homomorphism A B p: f = g
foralls : Sort σ, f s == g s
bydestruct p.Defined.DefinitionSigHomomorphism {σ} (AB : Algebra σ) : Type :=
{ def_hom : ∀s, A s → B s | IsHomomorphism def_hom }.
σ: Signature A, B: Algebra σ
SigHomomorphism A B <~> Homomorphism A B
σ: Signature A, B: Algebra σ
SigHomomorphism A B <~> Homomorphism A B
issig.Defined.
H: Funext σ: Signature A, B: Algebra σ n: trunc_index IsTruncAlgebra0: IsTruncAlgebra n B
IsTrunc n (Homomorphism A B)
H: Funext σ: Signature A, B: Algebra σ n: trunc_index IsTruncAlgebra0: IsTruncAlgebra n B
IsTrunc n (Homomorphism A B)
apply (istrunc_equiv_istrunc _ (issig_homomorphism A B)).Qed.(** To find a path between two homomorphisms [f g : Homomorphism A B] it suffices to find a path between the defining families of functions and the [is_homomorphism_hom] witnesses. *)
σ: Signature A, B: Algebra σ f, g: Homomorphism A B p: f = g q: transport IsHomomorphism p (is_homomorphism_hom f) =
is_homomorphism_hom g
f = g
σ: Signature A, B: Algebra σ f, g: Homomorphism A B p: f = g q: transport IsHomomorphism p (is_homomorphism_hom f) =
is_homomorphism_hom g
f = g
σ: Signature A, B: Algebra σ def_hom0: foralls : Sort σ, A s -> B s is_homomorphism_hom0: IsHomomorphism def_hom0 def_hom1: foralls : Sort σ, A s -> B s is_homomorphism_hom1: IsHomomorphism def_hom1 p: {|
def_hom := def_hom0;
is_homomorphism_hom := is_homomorphism_hom0
|} =
{|
def_hom := def_hom1;
is_homomorphism_hom := is_homomorphism_hom1
|} q: transport IsHomomorphism p
(is_homomorphism_hom
{|
def_hom := def_hom0;
is_homomorphism_hom := is_homomorphism_hom0
|}) =
is_homomorphism_hom
{|
def_hom := def_hom1;
is_homomorphism_hom := is_homomorphism_hom1
|}
σ: Signature A, B: Algebra σ def_hom0: foralls : Sort σ, A s -> B s is_homomorphism_hom0: IsHomomorphism def_hom0 def_hom1: foralls : Sort σ, A s -> B s is_homomorphism_hom1: IsHomomorphism def_hom1 p: def_hom0 = def_hom1 q: transport IsHomomorphism p is_homomorphism_hom0 =
is_homomorphism_hom1
by path_induction.Defined.(** To find a path between two homomorphisms [f g : Homomorphism A B] it suffices to find a path between the defining families of functions if [IsHSetAlgebra B]. *)
H: Funext σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B f, g: Homomorphism A B p: f = g
f = g
H: Funext σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B f, g: Homomorphism A B p: f = g
f = g
H: Funext σ: Signature A, B: Algebra σ IsHSetAlgebra0: IsHSetAlgebra B f, g: Homomorphism A B p: f = g
transport IsHomomorphism p (is_homomorphism_hom f) =
is_homomorphism_hom g
apply path_ishprop.Defined.(** A family of functions [f : ∀ s, A s → B s] is an isomorphism if it is a homomorphism, and for each [s : Sort σ], [f s] is an equivalence. *)(* We make [IsHomomorphism] an argument here, rather than a field, so having both [f : Homomorphism A B] and [X : IsIsomorphism f] in context does not result in having two proofs of [IsHomomorphism f] in context. *)ClassIsIsomorphism {σ : Signature} {AB : Algebra σ}
(f : ∀s, A s → B s) `{!IsHomomorphism f}
:= isequiv_isomorphism :: ∀ (s : Sort σ), IsEquiv (f s).
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f
foralls : Sort σ, A s <~> B s
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f
foralls : Sort σ, A s <~> B s
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f s: Sort σ
A s <~> B s
rapply (Build_Equiv _ _ (f s)).Defined.
H: Funext σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f
IsHProp (IsIsomorphism f)
H: Funext σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f
IsHProp (IsIsomorphism f)
apply istrunc_forall.Qed.(** Let [f : ∀ s, A s → B s] be a homomorphism. The following section proves that [f] is "OpPreserving" with respect to uncurried algebra operations in the sense that<< f t (α (x1,x2,...,xn,tt)) = β (f s1 x1,f s2 x1,...,f sn xn,tt)>> for all [(x1,x2,...,xn,tt) : FamilyProd A [s1;s2;...;sn]], where [α] and [β] are uncurried algebra operations in [A] and [B] respectively.*)Sectionhomomorphism_ap_operation.Context {σ : Signature} {AB : Algebra σ}.
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s w: SymbolType σ a: FamilyProd A (dom_symboltype w) α: Operation A w β: Operation B w P: OpPreserving f α β
f (cod_symboltype w) (ap_operation α a) =
ap_operation β (map_family_prod f a)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s w: SymbolType σ a: FamilyProd A (dom_symboltype w) α: Operation A w β: Operation B w P: OpPreserving f α β
f (cod_symboltype w) (ap_operation α a) =
ap_operation β (map_family_prod f a)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s t: Sort σ a: FamilyProd A (dom_symboltype [:t:]) α: Operation A [:t:] β: Operation B [:t:] P: OpPreserving f α β
f (cod_symboltype [:t:]) (ap_operation α a) =
ap_operation β (map_family_prod f a)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s t: Sort σ w: ne_list (Sort σ) a: FamilyProd A (dom_symboltype (t ::: w)) α: Operation A (t ::: w) β: Operation B (t ::: w) P: OpPreserving f α β IHw: forall (a : FamilyProd A (dom_symboltype w)) (α : Operation A w)
(β : Operation B w),
OpPreserving f α β ->
f (cod_symboltype w) (ap_operation α a) =
ap_operation β (map_family_prod f a)
f (cod_symboltype (t ::: w)) (ap_operation α a) =
ap_operation β (map_family_prod f a)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s t: Sort σ a: FamilyProd A (dom_symboltype [:t:]) α: Operation A [:t:] β: Operation B [:t:] P: OpPreserving f α β
f (cod_symboltype [:t:]) (ap_operation α a) =
ap_operation β (map_family_prod f a)
assumption.
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s t: Sort σ w: ne_list (Sort σ) a: FamilyProd A (dom_symboltype (t ::: w)) α: Operation A (t ::: w) β: Operation B (t ::: w) P: OpPreserving f α β IHw: forall (a : FamilyProd A (dom_symboltype w)) (α : Operation A w)
(β : Operation B w),
OpPreserving f α β ->
f (cod_symboltype w) (ap_operation α a) =
ap_operation β (map_family_prod f a)
f (cod_symboltype (t ::: w)) (ap_operation α a) =
ap_operation β (map_family_prod f a)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s t: Sort σ w: ne_list (Sort σ) x: A t a: Core.fold_right
(λ (i : Sort σ) (A0 : Type), A i * A0) Unit
(dom_symboltype w) α: Operation A (t ::: w) β: Operation B (t ::: w) P: OpPreserving f α β IHw: forall (a : FamilyProd A (dom_symboltype w)) (α : Operation A w)
(β : Operation B w),
OpPreserving f α β ->
f (cod_symboltype w) (ap_operation α a) =
ap_operation β (map_family_prod f a)
f (cod_symboltype (t ::: w)) (ap_operation α (x, a)) =
ap_operation β (map_family_prod f (x, a))
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s t: Sort σ w: ne_list (Sort σ) x: A t a: Core.fold_right
(λ (i : Sort σ) (A0 : Type), A i * A0) Unit
(dom_symboltype w) α: Operation A (t ::: w) β: Operation B (t ::: w) P: OpPreserving f α β IHw: forall (a : FamilyProd A (dom_symboltype w)) (α : Operation A w)
(β : Operation B w),
OpPreserving f α β ->
f (cod_symboltype w) (ap_operation α a) =
ap_operation β (map_family_prod f a)
OpPreserving f (α x)
(β (fst (map_family_prod f (x, a))))
apply P.Defined.(** A homomorphism [f : ∀ s, A s → B s] satisfies<< f t (α (a1, a2, ..., an, tt)) = β (f s1 a1, f s2 a2, ..., f sn an, tt)>> where [(a1, a2, ..., an, tt) : FamilyProd A [s1; s2; ...; sn]] and [α], [β] uncurried versions of [u.#A], [u.#B] respectively. *)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f
forall (u : Symbol σ)
(a : FamilyProd A (dom_symboltype (σ u))),
f (cod_symboltype (σ u)) (ap_operation u.#A a) =
ap_operation u.#B (map_family_prod f a)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f
forall (u : Symbol σ)
(a : FamilyProd A (dom_symboltype (σ u))),
f (cod_symboltype (σ u)) (ap_operation u.#A a) =
ap_operation u.#B (map_family_prod f a)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f u: Symbol σ a: FamilyProd A (dom_symboltype (σ u))
f (cod_symboltype (σ u)) (ap_operation u.#A a) =
ap_operation u.#B (map_family_prod f a)
byapply path_oppreserving_ap_operation.Defined.Endhomomorphism_ap_operation.(** The next section shows that the family of identity functions, [λ s x, x] is an isomorphism. *)Sectionhom_id.Context {σ} (A : Algebra σ).
σ: Signature A: Algebra σ
IsHomomorphism (λ (s : Sort σ) (x : A s), x)
σ: Signature A: Algebra σ
IsHomomorphism (λ (s : Sort σ) (x : A s), x)
σ: Signature A: Algebra σ u: Symbol σ
OpPreserving (λ (s : Sort σ) (x : A s), x) u.#A u.#A
σ: Signature A: Algebra σ u: Symbol σ
forallo : Operation A (σ u),
OpPreserving (λ (s : Sort σ) (x : A s), x) o o
σ: Signature A: Algebra σ u: Symbol σ w: Operation A (σ u)
OpPreserving (λ (s : Sort σ) (x : A s), x) w w
σ: Signature A: Algebra σ u: Symbol σ t: Sort σ w: Operation A [:t:]
OpPreserving (λ (s : Sort σ) (x : A s), x) w w
σ: Signature A: Algebra σ u: Symbol σ t: Sort σ s: ne_list (Sort σ) w: Operation A (t ::: s) IHs: forallw : Operation A s, OpPreserving (λ (s : Sort σ) (x : A s), x) w w
OpPreserving (λ (s : Sort σ) (x : A s), x) w w
σ: Signature A: Algebra σ u: Symbol σ t: Sort σ w: Operation A [:t:]
OpPreserving (λ (s : Sort σ) (x : A s), x) w w
reflexivity.
σ: Signature A: Algebra σ u: Symbol σ t: Sort σ s: ne_list (Sort σ) w: Operation A (t ::: s) IHs: forallw : Operation A s, OpPreserving (λ (s : Sort σ) (x : A s), x) w w
OpPreserving (λ (s : Sort σ) (x : A s), x) w w
byintro x.Defined.
σ: Signature A: Algebra σ
IsIsomorphism (λ (s : Sort σ) (x : A s), x)
σ: Signature A: Algebra σ
IsIsomorphism (λ (s : Sort σ) (x : A s), x)
σ: Signature A: Algebra σ s: Sort σ
IsEquiv idmap
exact _.Qed.Definitionhom_id : Homomorphism A A
:= BuildHomomorphism (λsx, x).Endhom_id.(** Suppose [f : ∀ s, A s → B s] is an isomorphism. The following section shows that the family of inverse functions, [λ s, (f s)^-1] is an isomorphism. *)Sectionhom_inv.Context
{σ} {AB : Algebra σ}
(f : ∀s, A s → B s) `{IsIsomorphism σ A B f}.
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f
IsHomomorphism (λs : Sort σ, (f s)^-1)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f
IsHomomorphism (λs : Sort σ, (f s)^-1)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ
OpPreserving (λs : Sort σ, (f s)^-1) u.#B u.#A
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ
forall (o : Operation A (σ u))
(o0 : Operation B (σ u)),
OpPreserving f o o0 ->
OpPreserving (λs : Sort σ, (f s)^-1) o0 o
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ a: Operation A (σ u) b: Operation B (σ u) P: OpPreserving f a b
OpPreserving (λs : Sort σ, (f s)^-1) b a
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ t: Sort σ a: Operation A [:t:] b: Operation B [:t:] P: OpPreserving f a b
OpPreserving (λs : Sort σ, (f s)^-1) b a
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ t: Sort σ s: ne_list (Sort σ) a: Operation A (t ::: s) b: Operation B (t ::: s) P: OpPreserving f a b IHs: forall (a : Operation A s)
(b : Operation B s),
OpPreserving f a b ->
OpPreserving (λs : Sort σ, (f s)^-1) b a
OpPreserving (λs : Sort σ, (f s)^-1) b a
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ t: Sort σ a: Operation A [:t:] b: Operation B [:t:] P: OpPreserving f a b
OpPreserving (λs : Sort σ, (f s)^-1) b a
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ t: Sort σ a: Operation A [:t:]
OpPreserving (λs : Sort σ, (f s)^-1) (f t a) a
apply (eissect (f t)).
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ t: Sort σ s: ne_list (Sort σ) a: Operation A (t ::: s) b: Operation B (t ::: s) P: OpPreserving f a b IHs: forall (a : Operation A s)
(b : Operation B s),
OpPreserving f a b ->
OpPreserving (λs : Sort σ, (f s)^-1) b a
OpPreserving (λs : Sort σ, (f s)^-1) b a
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ t: Sort σ s: ne_list (Sort σ) a: Operation A (t ::: s) b: Operation B (t ::: s) P: OpPreserving f a b IHs: forall (a : Operation A s)
(b : Operation B s),
OpPreserving f a b ->
OpPreserving (λs : Sort σ, (f s)^-1) b a x: B t
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f u: Symbol σ t: Sort σ s: ne_list (Sort σ) a: Operation A (t ::: s) b: Operation B (t ::: s) P: OpPreserving f a b IHs: forall (a : Operation A s)
(b : Operation B s),
OpPreserving f a b ->
OpPreserving (λs : Sort σ, (f s)^-1) b a x: B t
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f
IsIsomorphism (λs : Sort σ, (f s)^-1)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f
IsIsomorphism (λs : Sort σ, (f s)^-1)
σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H: IsIsomorphism f s: Sort σ
IsEquiv (f s)^-1
exact _.Qed.Definitionhom_inv : Homomorphism B A
:= BuildHomomorphism (λs, (f s)^-1).Endhom_inv.(** Let [f : ∀ s, A s → B s] and [g : ∀ s, B s → C s]. The next section shows that composition given by [λ (s : Sort σ), g s o f s] is again a homomorphism. If both [f] and [g] are isomorphisms, then the composition is an isomorphism. *)Sectionhom_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 w: SymbolType σ α: Operation A w β: Operation B w γ: Operation C w G: OpPreserving g β γ F: OpPreserving f α β
OpPreserving (λs : 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 w: SymbolType σ α: Operation A w β: Operation B w γ: Operation C w G: OpPreserving g β γ F: OpPreserving f α β
OpPreserving (λs : 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 t: Sort σ α: A t β: B t γ: C t G: g t β = γ F: f t α = β
g t (f t α) = γ
σ: 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 t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w γ: C t -> Operation C w G: forallx : B t, OpPreserving g (β x) (γ (g t x)) F: forallx : A t, OpPreserving f (α x) (β (f t x)) IHw: forall (α : Operation A w)
(β : Operation B w)
(γ : Operation C w),
OpPreserving g β γ ->
OpPreserving f α β ->
OpPreserving
(λ (s : Sort σ) (x : A s), g s (f s x)) α γ
forallx : A t,
OpPreserving (λ (s : Sort σ) (x0 : A s), g s (f s x0))
(α x) (γ (g t (f t x)))
σ: 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 t: Sort σ α: A t β: B t γ: C t G: g t β = γ F: f t α = β
g t (f t α) = γ
by path_induction.
σ: 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 t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w γ: C t -> Operation C w G: forallx : B t, OpPreserving g (β x) (γ (g t x)) F: forallx : A t, OpPreserving f (α x) (β (f t x)) IHw: forall (α : Operation A w)
(β : Operation B w)
(γ : Operation C w),
OpPreserving g β γ ->
OpPreserving f α β ->
OpPreserving
(λ (s : Sort σ) (x : A s), g s (f s x)) α γ
forallx : A t,
OpPreserving (λ (s : Sort σ) (x0 : A s), g s (f s x0))
(α x) (γ (g t (f t x)))
σ: 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 t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w γ: C t -> Operation C w G: forallx : B t, OpPreserving g (β x) (γ (g t x)) F: forallx : A t, OpPreserving f (α x) (β (f t x)) IHw: forall (α : Operation A w)
(β : Operation B w)
(γ : Operation C w),
OpPreserving g β γ ->
OpPreserving f α β ->
OpPreserving
(λ (s : Sort σ) (x : A s), g s (f s x)) α γ x: A t
OpPreserving (λ (s : Sort σ) (x : A s), g s (f s x))
(α x) (γ (g t (f t x)))
byapply (IHw _ (β (f _ x))).Defined.
σ: 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 (λs : 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 (λs : 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 σ
OpPreserving (λ (s : Sort σ) (x : A s), g s (f s x))
u.#A u.#C
byapply (oppreserving_compose g f u.#A u.#B u.#C).Defined.
σ: Signature A, B, C: Algebra σ g: foralls : Sort σ, B s -> C s IsHomomorphism0: IsHomomorphism g H: IsIsomorphism g f: foralls : Sort σ, A s -> B s IsHomomorphism1: IsHomomorphism f H0: IsIsomorphism f
IsIsomorphism (λs : Sort σ, g s o f s)
σ: Signature A, B, C: Algebra σ g: foralls : Sort σ, B s -> C s IsHomomorphism0: IsHomomorphism g H: IsIsomorphism g f: foralls : Sort σ, A s -> B s IsHomomorphism1: IsHomomorphism f H0: IsIsomorphism f
IsIsomorphism (λs : Sort σ, g s o f s)
σ: Signature A, B, C: Algebra σ g: foralls : Sort σ, B s -> C s IsHomomorphism0: IsHomomorphism g H: IsIsomorphism g f: foralls : Sort σ, A s -> B s IsHomomorphism1: IsHomomorphism f H0: IsIsomorphism f s: Sort σ
IsEquiv (λx : A s, g s (f s x))
rapply isequiv_compose.Qed.Definitionhom_compose
(g : Homomorphism B C) (f : Homomorphism A B)
: Homomorphism A C
:= BuildHomomorphism (λs, g s o f s).Endhom_compose.(** The following section shows that there is a path between isomorphic algebras. *)Sectionpath_isomorphism.Context `{Univalence} {σ : Signature} {A B : Algebra σ}.(** Let [F G : I → Type]. If [f : ∀ (i:I), F i <~> G i] is a family of equivalences, then by function extensionality composed with univalence there is a path [F = G]. *)Local Notationpath_equiv_family f
:= (path_forall _ _ (λi, path_universe (f i))).(** Given a family of equivalences [f : ∀ (s : Sort σ), A s <~> B s] which is [OpPreserving f α β] with respect to algebra operations<< α : A s1 → A s2 → ... → A sn → A t β : B s1 → B s2 → ... → B sn → B t>> By transporting [α] along the path [path_equiv_family f] we find a path from the transported operation [α] to [β]. *)
H: Univalence σ: Signature A, B: Algebra σ w: SymbolType σ α: Operation A w β: Operation B w f: foralls : Sort σ, A s <~> B s P: OpPreserving (λs : Sort σ, f s) α β
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
α = β
H: Univalence σ: Signature A, B: Algebra σ w: SymbolType σ α: Operation A w β: Operation B w f: foralls : Sort σ, A s <~> B s P: OpPreserving (λs : Sort σ, f s) α β
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
α = β
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ α: A t β: B t f: foralls : Sort σ, A s <~> B s P: f t α = β
transport (λC : Carriers σ, C t)
(path_forall A B (λi : Sort σ, path_universe (f i)))
α = β
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s P: forallx : A t,
OpPreserving (λs : Sort σ, f s) (α x) (β (f t x)) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β
transport (λC : Carriers σ, C t -> Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
α = β
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ α: A t β: B t f: foralls : Sort σ, A s <~> B s P: f t α = β
transport (λC : Carriers σ, C t)
(path_forall A B (λi : Sort σ, path_universe (f i)))
α = β
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ α: A t β: B t f: foralls : Sort σ, A s <~> B s P: f t α = β
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s P: forallx : A t,
OpPreserving (λs : Sort σ, f s) (α x) (β (f t x)) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β
transport (λC : Carriers σ, C t -> Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
α = β
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s P: forallx : A t,
OpPreserving (λs : Sort σ, f s) (α x) (β (f t x)) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β y: B t
transport (λC : Carriers σ, C t -> Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
α y = β y
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s P: forallx : A t,
OpPreserving (λs : Sort σ, f s) (α x) (β (f t x)) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β y: B t
transport (λx : Carriers σ, B t -> Operation x w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
(transport (λy : Type, y -> Operation A w)
(path_universe (f t)) α) y = β y
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s P: forallx : A t,
OpPreserving (λs : Sort σ, f s) (α x) (β (f t x)) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β y: B t
transport (λx : Carriers σ, Operation x w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
(transport (λy : Type, y -> Operation A w)
(path_universe (f t)) α y) = β y
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s P: forallx : A t,
OpPreserving (λs : Sort σ, f s) (α x) (β (f t x)) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β y: B t
transport (λx : Carriers σ, Operation x w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
(α (transport idmap (path_universe (f t))^ y)) =
β y
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s P: forallx : A t,
OpPreserving (λs : Sort σ, f s) (α x) (β (f t x)) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β y: B t
transport (λx : Carriers σ, Operation x w)
(path_forall A B (λi : Sort σ, path_universe (f i)))
(α ((f t)^-1 y)) = β y
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s P: forallx : A t,
OpPreserving (λs : Sort σ, f s) (α x) (β (f t x)) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β y: B t
H: Univalence σ: Signature A, B: Algebra σ t: Sort σ w: ne_list (Sort σ) α: A t -> Operation A w β: B t -> Operation B w f: foralls : Sort σ, A s <~> B s y: B t P: OpPreserving (λs : Sort σ, f s) (α ((f t)^-1 y))
(β (f t ((f t)^-1 y))) IHw: forall (α : Operation A w) (β : Operation B w),
OpPreserving (λs : Sort σ, f s) α β ->
transport (λC : Carriers σ, Operation C w)
(path_forall A B (λi : Sort σ, path_universe (f i))) α = β
byrewrite (eisretr (f t) y) in P.Qed.(** Suppose [u : Symbol σ] is a function symbol. Recall that [u.#A] is notation for [operations A u : Operation A (σ u)]. This is the algebra operation corresponding to function symbol [u]. *)(** An isomorphism [f : ∀ s, A s → B s] induces a family of equivalences [e : ∀ (s : Sort σ), A s <~> B s]. Let [u : Symbol σ] be a function symbol. Since [f] is a homomorphism, the induced family of equivalences [e] satisfies [OpPreserving e (u.#A) (u.#B)]. By [path_operations_equiv] above, we can then transport [u.#A] along the path [path_equiv_family e] and obtain a path to [u.#B]. *)
H: Univalence σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H0: IsIsomorphism f u: Symbol σ
transport (λC : Carriers σ, Operation C (σ u))
(path_forall A B
(λi : Sort σ,
path_universe (equiv_isomorphism f i))) u.#A =
u.#B
H: Univalence σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H0: IsIsomorphism f u: Symbol σ
transport (λC : Carriers σ, Operation C (σ u))
(path_forall A B
(λi : Sort σ,
path_universe (equiv_isomorphism f i))) u.#A =
u.#B
byapply path_operations_equiv.Defined.(** If there is an isomorphism [f : ∀ s, A s → B s] then [A = B]. *)
H: Univalence σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H0: IsIsomorphism f
A = B
H: Univalence σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H0: IsIsomorphism f
A = B
H: Univalence σ: Signature A, B: Algebra σ f: foralls : Sort σ, A s -> B s IsHomomorphism0: IsHomomorphism f H0: IsIsomorphism f
transport
(λX : Carriers σ,
forallu : Symbol σ, Operation X (σ u))
(path_forall A B
(λi : Sort σ,
path_universe (equiv_isomorphism f i)))
(operations A) = operations B
(* Make the last part abstract because it relies on [path_operations_equiv], which is opaque. In cases where the involved algebras are set algebras, then this part is a mere proposition. *)abstract (
funext u;
exact (transport_forall_constant _ _ u
@ path_operations_isomorphism f u)).Defined.Endpath_isomorphism.