Setoid.Homomorphisms.Kernels¶
Kernels of Homomorphisms¶
This is the Setoid.Homomorphisms.Kernels module of the Agda Universal Algebra Library.
module _ {π : Signature π π₯} {π¨ : Algebra {π = π} Ξ± Οα΅}{π© : Algebra Ξ² Οα΅} ((hmap , hhom) : hom π¨ π©) where open Algebra π© using ( Interp ) renaming ( Domain to B ) open Setoid B using ( _β_ ; sym ; trans ; isEquivalence ) private h = _β¨$β©_ hmap
HomKerComp asserts that the kernel of a homomorphism is compatible with the basic operations.
That is, if each (u i, v i) belongs to the kernel, then so does the pair ((f ^ π¨) u , (f ^ π¨) v).
HomKerComp : π¨ β£β kerRel _β_ h HomKerComp f {u}{v} kuv = Goal where fhuv : (f ^ π©)(h β u) β (f ^ π©)(h β v) fhuv = cong Interp (refl , kuv) lem1 : h ((f ^ π¨) u) β (f ^ π©)(h β u) lem1 = IsHom.compatible hhom lem2 : (f ^ π©) (h β v) β h ((f ^ π¨) v) lem2 = sym (IsHom.compatible hhom) Goal : h ((f ^ π¨) u) β h ((f ^ π¨) v) Goal = trans lem1 (trans fhuv lem2)
The kernel of a homomorphism is a congruence of the domain, which we construct as follows.
kercon : Con π¨ Οα΅ kercon = kerRel _β_ h , mkcon (Ξ» x β cong hmap x)(kerRelOfEquiv isEquivalence h)(HomKerComp)
Now that we have a congruence, we can construct the quotient relative to the kernel.
kerquo : Algebra Ξ± Οα΅ kerquo = π¨ β± kercon ker[_β_]_ : {π : Signature π π₯} (π¨ : Algebra {π = π} Ξ± Οα΅) (π© : Algebra Ξ² Οα΅) β hom π¨ π© β Algebra _ _ ker[ π¨ β π© ] h = kerquo h
The canonical projection¶
Given an algebra π¨ and a congruence ΞΈ, the canonical projection is a map from π¨ onto π¨ β± ΞΈ that is constructed, and proved epimorphic, as follows.
module _ {π : Signature π π₯} {π¨ : Algebra {π = π} Ξ± Οα΅}{π© : Algebra Ξ² Οα΅} (h : hom π¨ π©) where open IsCongruence Οepi : (ΞΈ : Con π¨ β) β epi π¨ (π¨ β± ΞΈ) Οepi ΞΈ = p , pepi where open Setoid π»[ π¨ β± ΞΈ ] using () renaming ( sym to βsym ; refl to βrefl ) open IsHom {π¨ = (π¨ β± ΞΈ)} using ( compatible ) open IsEpi p : π»[ π¨ ] βΆ π»[ π¨ β± ΞΈ ] p β¨$β© x = x p .cong = reflexive (ΞΈ .projβ) pepi : IsEpi π¨ (π¨ β± ΞΈ) p pepi .isHom .compatible = βsym (πΎπΉ .projβ .compatible) pepi .isSurjective {y} = Image_β_.eq y βrefl
In may happen that we don't care about the surjectivity of Οepi, in which
case would might prefer to work with the homomorphic reduct of Οepi.
This is obtained by applying epi-to-hom, like so.
Οhom : (ΞΈ : Con π¨ β) β hom π¨ (π¨ β± ΞΈ) Οhom ΞΈ = epiβhom π¨ (π¨ β± ΞΈ) (Οepi ΞΈ)
We combine the foregoing to define a function that takes π-algebras π¨ and π©,
and a homomorphism h : hom π¨ π© and returns the canonical epimorphism from π¨
onto π¨ [ π© ]/ker h. (Recall, the latter is the special notation we defined
above for the quotient of π¨ modulo the kernel of h.)
Οker : epi π¨ (ker[ π¨ β π© ] h) Οker = Οepi (kercon h)
The kernel of the canonical projection of π¨ onto π¨ / ΞΈ is equal to ΞΈ,
but since equality of inhabitants of certain types (like Congruence or Rel)
can be a tricky business, we settle for proving the containment π¨ / ΞΈ β ΞΈ.
Of the two containments, this is the easier one to prove; luckily it is also
the one we need later.
ker-in-con : {ΞΈ : Con π¨ β} β β {x}{y} β kercon (Οhom ΞΈ) .projβ x y β ΞΈ .projβ x y ker-in-con = id