Legacy.Base.Structures.Congruences¶
Congruences of general structures¶
This is the Legacy.Base.Structures.Congruences module of the Agda Universal Algebra Library.
{-# OPTIONS --cubical-compatible --exact-split --safe #-} module Legacy.Base.Structures.Congruences where -- Imports from Agda and the Agda Standard Library -------------------------------------- open import Agda.Primitive using () renaming ( Set to Type ) open import Data.Product using ( _,_ ; _Γ_ ; Ξ£-syntax ) renaming ( projβ to fst ) open import Function.Base using ( _β_ ) open import Level using ( Level ; suc ; _β_ ; lower ; lift ) open import Relation.Binary.PropositionalEquality using ( _β‘_ ) -- Imports from the Agda Universal Algebra Library -------------------------------------- open import Overture using ( β£_β£ ) open import Legacy.Base.Relations using ( _|:_ ; 0[_] ; Equivalence ; Quotient ; βͺ_β« ) using ( 0[_]Equivalence ; β_β ; βͺ_βΌ_β«-elim ; _/_ ) open import Legacy.Base.Equality using ( swelldef ) open import Legacy.Base.Structures.Basic using ( signature ; structure ; sigl ) using ( siglΚ³ ; compatible ) private variable πβ π₯β πβ π₯β : Level πΉ : signature πβ π₯β π : signature πβ π₯β Ξ± Ο : Level open signature ; open structure con : β {Ξ± Ο} β structure πΉ π {Ξ±}{Ο} β Type (sigl πΉ β suc Ξ± β suc Ο) con {Ξ± = Ξ±}{Ο} π¨ = Ξ£[ ΞΈ β Equivalence (carrier π¨){Ξ± β Ο} ] (compatible π¨ β£ ΞΈ β£)
The zero congruence of a structure¶
0[_]compatible : (π¨ : structure πΉ π {Ξ±} {Ο}) β swelldef (siglΚ³ πΉ) Ξ± β (π : symbol πΉ) β (op π¨) π |: (0[ carrier π¨ ] {Ο}) 0[ π¨ ]compatible wd π {i}{j} ptws0 = lift Ξ³ where Ξ³ : ((op π¨) π) i β‘ ((op π¨) π) j Ξ³ = wd ((op π¨) π) i j (lower β ptws0) 0con[_] : (π¨ : structure πΉ π {Ξ±} {Ο}) β swelldef (siglΚ³ πΉ) Ξ± β con π¨ 0con[ π¨ ] wd = 0[ carrier π¨ ]Equivalence , 0[ π¨ ]compatible wd
Quotient structures¶
_β±_ -- alias (useful on when signature and universe parameters can be inferred) quotient : (π¨ : structure πΉ π {Ξ±}{Ο}) β con π¨ β structure πΉ π quotient π¨ ΞΈ = record { carrier = Quotient (carrier π¨) β£ ΞΈ β£ -- domain of quotient structure ; op = Ξ» f b β βͺ ((op π¨) f) (Ξ» i β β b i β) β« {fst β£ ΞΈ β£} -- interp of operations ; rel = Ξ» r x β ((rel π¨) r) (Ξ» i β β x i β) -- interpretation of relations } _β±_ = quotient -- (alias) /β‘-elim : {π¨ : structure πΉ π {Ξ±}{Ο}} ((ΞΈ , _ ) : con π¨){u v : carrier π¨} β βͺ u β« {β£ ΞΈ β£} β‘ βͺ v β« {β£ ΞΈ β£} β β£ ΞΈ β£ u v /β‘-elim ΞΈ {u}{v} x = βͺ u βΌ v β«-elim{R = β£ ΞΈ β£} x
The zero congruence of a quotient structure¶
π[_β±_] : (π¨ : structure πΉ π {Ξ±}{Ο}) (ΞΈ : con π¨) β swelldef (siglΚ³ πΉ)(suc (Ξ± β Ο)) β con (π¨ β± ΞΈ) π[ π¨ β± ΞΈ ] wd = 0con[ π¨ β± ΞΈ ] wd