Legacy.Base.Adjunction.Closure¶
Closure Systems and Operators¶
This is the Legacy.Base.Adjunction.Closure module of the Agda Universal Algebra Library.
{-# OPTIONS --cubical-compatible --exact-split --safe #-} module Legacy.Base.Adjunction.Closure where -- Imports from Agda and the Agda Standard Library --------------------------------------- open import Agda.Primitive using () renaming ( Set to Type ) import Algebra.Definitions open import Data.Product using ( Ξ£-syntax ; _,_ ; _Γ_ ) open import Function using ( _ββ_ ) open import Function.Bundles using ( _β_ ; Inverse) open import Level using ( _β_ ; Level ) open import Relation.Binary.Bundles using ( Poset ) open import Relation.Binary.Core using ( Rel ; _Preserves_βΆ_ ) open import Relation.Unary using ( Pred ; _β_ ; β ) import Relation.Binary.Reasoning.PartialOrder as β€-Reasoning private variable Ξ± Ο β ββ ββ : Level a : Type Ξ±
Closure Systems¶
A closure system on a set X is a collection π of subsets of X that is closed
under arbitrary intersection (including the empty intersection, so β β
= X β π.
Thus a closure system is a complete meet semilattice with respect to the subset
inclusion ordering.
Since every complete meet semilattice is automatically a complete lattice, the closed sets of a closure system form a complete lattice. (See J.B. Nation's Lattice Theory Notes, Theorem 2.5.)
Some examples of closure systems are the following:
- order ideals of an ordered set
- subalgebras of an algebra
- equivalence relations on a set
- congruence relations of an algebra
Extensive : Rel a Ο β (a β a) β Type _ Extensive _β€_ C = β{x} β x β€ C x -- (We might propose a new stdlib equivalent to Extensive in, e.g., `Relation.Binary.Core`.) module _ {Ο Ο β : Level}{X : Type Ο} where IntersectClosed : Pred (Pred X β) Ο β Type _ IntersectClosed C = β {I : Type β}{c : I β Pred X β} β (β i β (c i) β C) β β I c β C ClosureSystem : Type _ ClosureSystem = Ξ£[ C β Pred (Pred X β) Ο ] IntersectClosed C
Closure Operators¶
Let π· = (P, β€) be a poset. An function C : P β P is called a closure operator
on π· if it is
- (extensive)
β x β x β€ C x - (order preserving)
β x y β x β€ y β C x β€ C y - (idempotent)
β x β C (C x) β C x, where_β_is the equivalence carried by the poset
Thus, a closure operator is an extensive, idempotent poset endomorphism.
-- ClOp, the inhabitants of which denote closure operators. record ClOp {β ββ ββ : Level}(π¨ : Poset β ββ ββ) : Type (β β ββ β ββ) where open Poset π¨ private A = Carrier open Algebra.Definitions (_β_) field C : A β A isExtensive : Extensive _β€_ C isOrderPreserving : C Preserves _β€_ βΆ _β€_ isIdempotent : IdempotentFun C
Basic properties of closure operators¶
open ClOp open Inverse module _ {π¨ : Poset β ββ ββ}(πͺ : ClOp π¨) where open Poset π¨ open β€-Reasoning π¨ private c = C πͺ A = Carrier
Theorem 1. If π¨ = (A , β¦) is a poset and c is a closure operator on A, then
β (x y : A) β (x β¦ (c y) β (c x) β¦ (c y))
clopβlawβ : (x y : A) β x β€ (c y) β (c x) β€ (c y) clopβlawβ x y xβ€cy = begin c x β€β¨ isOrderPreserving πͺ xβ€cy β© c (c y) ββ¨ isIdempotent πͺ y β© c y β clopβlawβ : (x y : A) β (c x) β€ (c y) β x β€ (c y) clopβlawβ x y cxβ€cy = begin x β€β¨ isExtensive πͺ β© c x β€β¨ cxβ€cy β© c y β
The converse of Theorem 1 also holds. That is,
Theorem 2. If π¨ = (A , β€) is a poset and c : A β A satisfies
β (x y : A) β (x β€ (c y) β (c x) β€ (c y))
then `c` is a closure operator on `A`.
module _ {π¨ : Poset β ββ ββ} where open Poset π¨ private A = Carrier open Algebra.Definitions (_β_) clopβlaw : (c : A β A) β ((x y : A) β (x β€ (c y) β (c x) β€ (c y))) β Extensive _β€_ c Γ c Preserves _β€_ βΆ _β€_ Γ IdempotentFun c clopβlaw c hyp = e , (o , i) where e : Extensive _β€_ c e = (from ββ hyp) _ _ refl o : c Preserves _β€_ βΆ _β€_ o u = (to ββ hyp) _ _ (trans u e) i : IdempotentFun c i x = antisym ((to ββ hyp) _ _ refl) ((from ββ hyp) _ _ refl)
{-# WARNING_ON_USAGE Extensive "Use Overture.Adjunction.Closure.Extensive instead. Deprecated under #305; removal planned one minor cycle later." #-} {-# WARNING_ON_USAGE IntersectClosed "Use Overture.Adjunction.Closure.IntersectClosed instead. Deprecated under #305; removal planned one minor cycle later." #-} {-# WARNING_ON_USAGE ClosureSystem "Use Overture.Adjunction.Closure.ClosureSystem instead. Deprecated under #305; removal planned one minor cycle later." #-} {-# WARNING_ON_USAGE ClOp "Use Overture.Adjunction.Closure.ClOp instead. Deprecated under #305; removal planned one minor cycle later." #-} {-# WARNING_ON_USAGE clopβlawβ "Use Overture.Adjunction.Closure.clopβlawβ instead. Deprecated under #305; removal planned one minor cycle later." #-} {-# WARNING_ON_USAGE clopβlawβ "Use Overture.Adjunction.Closure.clopβlawβ instead. Deprecated under #305; removal planned one minor cycle later." #-} {-# WARNING_ON_USAGE clopβlaw "Use Overture.Adjunction.Closure.clopβlaw instead. Deprecated under #305; removal planned one minor cycle later." #-}