This is the Setoid.Homomorphisms.Basic module of the Agda Universal Algebra Library.
{-# OPTIONS --without-K --exact-split --safe #-} open import Overture using (π ; π₯ ; Signature ) module Setoid.Homomorphisms.Basic {π : Signature π π₯} where -- Imports from Agda and the Agda Standard Library ------------------------------ open import Agda.Primitive using () renaming ( Set to Type ) open import Data.Product using ( _,_ ; Ξ£ ; Ξ£-syntax ) open import Function.Bundles using () renaming ( Func to _βΆ_ ) open import Level using ( Level ; _β_ ) open import Relation.Binary using ( Setoid ) -- Imports from the Agda Universal Algebra Library --------------------------- open import Overture using ( β£_β£ ; β₯_β₯ ) open import Setoid.Functions using ( IsInjective ; IsSurjective ) open import Setoid.Algebras {π = π} using ( Algebra ; _Μ_ ) private variable Ξ± Ξ² Οα΅ Οα΅ : Level module _ (π¨ : Algebra Ξ± Οα΅)(π© : Algebra Ξ² Οα΅) where open Algebra π¨ using() renaming (Domain to A ) open Algebra π© using() renaming (Domain to B ) open Setoid A using() renaming ( _β_ to _ββ_ ) open Setoid B using() renaming ( _β_ to _ββ_ ) open _βΆ_ {a = Ξ±}{Οα΅}{Ξ²}{Οα΅}{From = A}{To = B} renaming (f to _β¨$β©_ ) compatible-map-op : (A βΆ B) β β£ π β£ β Type (π₯ β Ξ± β Οα΅) compatible-map-op h f = β {a} β h β¨$β© (f Μ π¨) a ββ (f Μ π©) Ξ» x β h β¨$β© (a x) compatible-map : (A βΆ B) β Type (π β π₯ β Ξ± β Οα΅) compatible-map h = β {f} β compatible-map-op h f -- The property of being a homomorphism. record IsHom (h : A βΆ B) : Type (π β π₯ β Ξ± β Οα΅ β Οα΅) where field compatible : compatible-map h hom : Type (π β π₯ β Ξ± β Οα΅ β Ξ² β Οα΅) hom = Ξ£ (A βΆ B) IsHom
record IsMon (h : A βΆ B) : Type (π β π₯ β Ξ± β Οα΅ β Ξ² β Οα΅) where field isHom : IsHom h isInjective : IsInjective h HomReduct : hom HomReduct = h , isHom mon : Type (π β π₯ β Ξ± β Οα΅ β Ξ² β Οα΅) mon = Ξ£ (A βΆ B) IsMon monβhom : mon β hom monβhom h = IsMon.HomReduct β₯ h β₯ record IsEpi (h : A βΆ B) : Type (π β π₯ β Ξ± β Οα΅ β Ξ² β Οα΅) where field isHom : IsHom h isSurjective : IsSurjective h HomReduct : hom HomReduct = h , isHom epi : Type (π β π₯ β Ξ± β Οα΅ β Ξ² β Οα΅) epi = Ξ£ (A βΆ B) IsEpi epiβhom : epi β hom epiβhom h = IsEpi.HomReduct β₯ h β₯ module _ (π¨ : Algebra Ξ± Οα΅)(π© : Algebra Ξ² Οα΅) where open IsEpi open IsMon monβintohom : mon π¨ π© β Ξ£[ h β hom π¨ π© ] IsInjective β£ h β£ monβintohom (hh , hhM) = (hh , isHom hhM) , isInjective hhM epiβontohom : epi π¨ π© β Ξ£[ h β hom π¨ π© ] IsSurjective β£ h β£ epiβontohom (hh , hhE) = (hh , isHom hhE) , isSurjective hhE
β Setoid.Homomorphisms Setoid.Homomorphisms.Properties β