 Homomorphic Images

This is the Homomorphisms.HomomorphicImages module of the Agda Universal Algebra Library.

{-# OPTIONS --without-K --exact-split --safe #-}

open import Algebras.Basic

module Homomorphisms.HomomorphicImages {𝑆 : Signature 𝓞 𝓥} where

-- Imports from Agda and the Agda Standard Library ------------------------------------------
open import Agda.Primitive using ( _⊔_ ; lsuc ) renaming ( Set to Type )
open import Data.Product   using ( _,_ ; Σ-syntax ; Σ ; _×_ )
open import Level          using ( Level )
open import Relation.Binary.PropositionalEquality
using ( _≡_ ; module ≡-Reasoning ; cong ; cong-app ; sym )
open import Relation.Unary using ( Pred ; _∈_ )

-- Imports from the Agda Universal Algebra Library ------------------------------------------
open import Overture.Preliminaries      using ( 𝑖𝑑 ; ∣_∣ ; ∥_∥ ; lower∼lift ; lift∼lower )
open import Overture.Inverses           using ( Image_∋_ ; Inv ; InvIsInverseʳ ; eq )
open import Overture.Surjective         using ( IsSurjective )
open import Algebras.Products   {𝑆 = 𝑆} using ( ov )
open import Homomorphisms.Basic {𝑆 = 𝑆} using ( hom ; 𝓁𝒾𝒻𝓉 ; 𝓁ℴ𝓌ℯ𝓇 )
open import Homomorphisms.Properties {𝑆 = 𝑆} using ( Lift-hom )

Images of a single algebra

We begin with what seems, for our purposes, the most useful way to represent the class of homomorphic images of an algebra in dependent type theory.

module _ {α β : Level } where

_IsHomImageOf_ : (𝑩 : Algebra β 𝑆)(𝑨 : Algebra α 𝑆)  Type _
𝑩 IsHomImageOf 𝑨 = Σ[ φ  hom 𝑨 𝑩 ] IsSurjective  φ

HomImages : Algebra α 𝑆  Type(𝓞  𝓥  α  lsuc β)
HomImages 𝑨 = Σ[ 𝑩  Algebra β 𝑆 ] 𝑩 IsHomImageOf 𝑨

These types should be self-explanatory, but just to be sure, let’s describe the Sigma type appearing in the second definition. Given an 𝑆-algebra 𝑨 : Algebra α 𝑆, the type HomImages 𝑨 denotes the class of algebras 𝑩 : Algebra β 𝑆 with a map φ : ∣ 𝑨 ∣ → ∣ 𝑩 ∣ such that φ is a surjective homomorphism.

Images of a class of algebras

Given a class 𝒦 of 𝑆-algebras, we need a type that expresses the assertion that a given algebra is a homomorphic image of some algebra in the class, as well as a type that represents all such homomorphic images.

module _ {α : Level} where

IsHomImageOfClass : {𝒦 : Pred (Algebra α 𝑆)(lsuc α)}  Algebra α 𝑆  Type(ov α)
IsHomImageOfClass {𝒦 = 𝒦} 𝑩 = Σ[ 𝑨  Algebra α 𝑆 ] ((𝑨  𝒦) × (𝑩 IsHomImageOf 𝑨))

HomImageOfClass : Pred (Algebra α 𝑆) (lsuc α)  Type(ov α)
HomImageOfClass 𝒦 = Σ[ 𝑩  Algebra α 𝑆 ] IsHomImageOfClass{𝒦} 𝑩

Lifting tools

Here are some tools that have been useful (e.g., in the road to the proof of Birkhoff’s HSP theorem). The first states and proves the simple fact that the lift of an epimorphism is an epimorphism.

module _ {α β : Level} where

open Level
open ≡-Reasoning

Lift-epi-is-epi : {𝑨 : Algebra α 𝑆}(ℓᵃ : Level){𝑩 : Algebra β 𝑆}(ℓᵇ : Level)(h : hom 𝑨 𝑩)
IsSurjective  h   IsSurjective  Lift-hom ℓᵃ {𝑩} ℓᵇ h

Lift-epi-is-epi {𝑨 = 𝑨} ℓᵃ {𝑩} ℓᵇ h hepi y = eq (lift a) η
where
lh : hom (Lift-Alg 𝑨 ℓᵃ) (Lift-Alg 𝑩 ℓᵇ)
lh = Lift-hom ℓᵃ {𝑩} ℓᵇ h

ζ : Image  h   (lower y)
ζ = hepi (lower y)

a :  𝑨
a = Inv  h  ζ

ν : lift ( h  a)   Lift-hom ℓᵃ {𝑩} ℓᵇ h  (Level.lift a)
ν = cong  -  lift ( h  (- a))) (lower∼lift {Level-of-Carrier 𝑨}{β})

η : y   lh  (lift a)
η = y               ≡⟨ (cong-app lift∼lower) y
lift (lower y)  ≡⟨ cong lift (sym (InvIsInverseʳ ζ))
lift ( h  a)  ≡⟨ ν
lh  (lift a)

Lift-Alg-hom-image : {𝑨 : Algebra α 𝑆}(ℓᵃ : Level){𝑩 : Algebra β 𝑆}(ℓᵇ : Level)
𝑩 IsHomImageOf 𝑨
(Lift-Alg 𝑩 ℓᵇ) IsHomImageOf (Lift-Alg 𝑨 ℓᵃ)

Lift-Alg-hom-image {𝑨 = 𝑨} ℓᵃ {𝑩} ℓᵇ ((φ , φhom) , φepic) = Goal
where
: hom (Lift-Alg 𝑨 ℓᵃ) (Lift-Alg 𝑩 ℓᵇ)
= Lift-hom ℓᵃ {𝑩} ℓᵇ (φ , φhom)

lφepic : IsSurjective
lφepic = Lift-epi-is-epi ℓᵃ {𝑩} ℓᵇ (φ , φhom) φepic
Goal : (Lift-Alg 𝑩 ℓᵇ) IsHomImageOf _
Goal =  , lφepic