This is the Setoid.Homomorphisms.Products module of the Agda Universal Algebra Library.
{-# OPTIONS --without-K --exact-split --safe #-} open import Overture using (π ; π₯ ; Signature) module Setoid.Homomorphisms.Products {π : Signature π π₯} where -- Imports from Agda and the Agda Standard Library -------------------------- open import Agda.Primitive using () renaming ( Set to Type ) open import Function using () renaming ( Func to _βΆ_ ) open import Data.Product using ( _,_ ) open import Level using ( Level ) open import Relation.Binary using ( Setoid ) open import Relation.Binary.PropositionalEquality as β‘ using ( _β‘_ ) -- Imports from the Agda Universal Algebras Library ---------------------- open import Overture using ( β£_β£ ; β₯_β₯) open import Setoid.Algebras {π = π} using ( Algebra ; _Μ_ ; β¨ ) open import Setoid.Homomorphisms.Basic {π = π} using ( hom ; IsHom ; epi ) private variable Ξ± Οα΅ Ξ² Οα΅ π : Level
Suppose we have an algebra π¨
, a type I : Type π
, and a family
β¬ : I β Algebra Ξ² π
of algebras. We sometimes refer to the inhabitants of I
as indices, and call β¬
an indexed family of algebras.
If in addition we have a family π½ : (i : I) β hom π¨ (β¬ i)
of homomorphisms, then
we can construct a homomorphism from π¨
to the product β¨
β¬
in the natural way.
module _ {I : Type π}{π¨ : Algebra Ξ± Οα΅}(β¬ : I β Algebra Ξ² Οα΅) where open Algebra π¨ using () renaming ( Domain to A ) open Algebra (β¨ β¬) using () renaming ( Domain to β¨ B ) open _βΆ_ using ( cong ) renaming ( f to _β¨$β©_ ) open IsHom β¨ -hom-co : (β(i : I) β hom π¨ (β¬ i)) β hom π¨ (β¨ β¬) β¨ -hom-co π½ = h , hhom where h : A βΆ β¨ B (h β¨$β© a) i = β£ π½ i β£ β¨$β© a cong h xy i = cong β£ π½ i β£ xy hhom : IsHom π¨ (β¨ β¬) h compatible hhom = Ξ» i β compatible β₯ π½ i β₯
The family π½
of homomorphisms inhabits the dependent type Ξ i κ I , hom π¨ (β¬ i)
.
The syntax we use to represent this type is available to us because of the way -Ξ
is defined in the Type Topology library. We like this syntax because it is very
close to the notation one finds in the standard type theory literature. However, we
could equally well have used one of the following alternatives, which may be closer
to βstandard Agdaβ syntax:
Ξ Ξ» i β hom π¨ (β¬ i)
or (i : I) β hom π¨ (β¬ i)
or β i β hom π¨ (β¬ i)
.
The foregoing generalizes easily to the case in which the domain is also a product of
a family of algebras. That is, if we are given π : I β Algebra Ξ± π
and
β¬ : I β Algebra Ξ² π
(two families of π
-algebras), and
π½ : Ξ i κ I , hom (π i)(β¬ i)
(a family of homomorphisms), then we can construct
a homomorphism from β¨
π
to β¨
β¬
in the following natural way.
β¨ -hom : (π : I β Algebra Ξ± Οα΅) β (β (i : I) β hom (π i) (β¬ i)) β hom (β¨ π)(β¨ β¬) β¨ -hom π π½ = F , isHom where open Algebra (β¨ π) using () renaming ( Domain to β¨ A ) F : β¨ A βΆ β¨ B (F β¨$β© x) i = β£ π½ i β£ β¨$β© x i cong F xy i = cong β£ π½ i β£ (xy i) isHom : IsHom (β¨ π) (β¨ β¬) F compatible isHom i = compatible β₯ π½ i β₯
Later we will need a proof of the fact that projecting out of a product algebra onto one of its factors is a homomorphism.
β¨ -projection-hom : (i : I) β hom (β¨ β¬) (β¬ i) β¨ -projection-hom i = F , isHom where open Algebra (β¬ i) using () renaming ( Domain to Bi ) open Setoid Bi using () renaming ( refl to reflα΅’ ) F : β¨ B βΆ Bi F β¨$β© x = x i cong F xy = xy i isHom : IsHom (β¨ β¬) (β¬ i) F compatible isHom {f} {a} = reflα΅’
We could prove a more general result involving projections onto multiple factors, but so far the single-factor result has sufficed.
β Setoid.Homomorphisms.Kernels Setoid.Homomorphisms.Noether β