module Order.Frame where
Framesπ
A frame is a lattice with finite meets1 and arbitrary joins satisfying the infinite distributive law
In the study of frames, for simplicity, we assume propositional resizing: that way, it suffices for a frame to have joins of families, for an arbitrary type in the same universe as to have joins for arbitrary subsets of
record is-frame {o β} (P : Poset o β) : Type (lsuc o β β) where
no-eta-equality
open Poset P
field
_β©_ : Ob β Ob β Ob
: β x y β is-meet P x y (x β© y)
β©-meets
: Top P
has-top
: β {I : Type o} (k : I β Ob) β Ob
β : β {I : Type o} (k : I β Ob) β is-lub P k (β k)
β-lubs
: β {I} x (f : I β Ob) β x β© β f β‘ β Ξ» i β x β© f i β-distribl
We have explicitly required that a frame be a meet-semilattice, but itβs worth explicitly pointing out that the infinitary join operation can also be used for more mundane purposes: By taking a join over the type of booleans (and over the empty type), we can show that all frames are also join-semilattices.
infixr 25 _β©_
module is-lubs {I} {k : I β Ob} = is-lub (β-lubs k)
open Meets β©-meets public
open Top has-top using (top; !) public
open Lubs P β-lubs public
: is-meet-semilattice P
has-meet-slat .is-meet-semilattice._β©_ = _β©_
has-meet-slat .is-meet-semilattice.β©-meets = β©-meets
has-meet-slat .is-meet-semilattice.has-top = has-top
has-meet-slat
: is-join-semilattice P
has-join-slat .is-join-semilattice._βͺ_ = _βͺ_
has-join-slat .is-join-semilattice.βͺ-joins = βͺ-joins
has-join-slat .is-join-semilattice.has-bottom = has-bottom
has-join-slat
: is-lattice P
has-lattice .is-lattice._β©_ = _β©_
has-lattice .is-lattice.β©-meets = β©-meets
has-lattice .is-lattice._βͺ_ = _βͺ_
has-lattice .is-lattice.βͺ-joins = βͺ-joins
has-lattice .is-lattice.has-top = has-top
has-lattice .is-lattice.has-bottom = has-bottom
has-lattice
private variable
: Level
o β o' β' : Poset o β
P Q R
abstract
: is-prop (is-frame P)
is-frame-is-prop {P = P} p q = path where
is-frame-is-prop open Order.Diagram.Top P using (H-Level-Top)
module p = is-frame p
module q = is-frame q
open is-frame
: β x y β x p.β© y β‘ x q.β© y
meetp = meet-unique (p.β©-meets x y) (q.β©-meets x y)
meetp x y
: β {I} (k : I β β P β) β p.β k β‘ q.β k
lubp = lub-unique (p.β-lubs k) (q.β-lubs k)
lubp k
: p β‘ q
path ._β©_ x y = meetp x y i
path i .β©-meets x y = is-propβpathp (Ξ» i β hlevel {T = is-meet P x y (meetp x y i)} 1) (p.β©-meets x y) (q.β©-meets x y) i
path i .has-top = hlevel {T = Top P} 1 p.has-top q.has-top i
path i .β k = lubp k i
path i .β-lubs k = is-propβpathp (Ξ» i β hlevel {T = is-lub P k (lubp k i)} 1) (p.β-lubs k) (q.β-lubs k) i
path i .β-distribl x f j = is-setβsquarep (Ξ» _ _ β Poset.Ob-is-set P)
path i (Ξ» i β meetp x (lubp f i) i)
(p.β-distribl x f) (q.β-distribl x f)
(Ξ» i β lubp (Ξ» e β meetp x (f e) i) i)
i j
instance
: β {n} β H-Level (is-frame P) (suc n)
H-Level-is-frame = prop-instance is-frame-is-prop H-Level-is-frame
Of course, a frame is not just a lattice, but a complete lattice. Since the infinite distributive law says exactly that βmeet with β preserves joins, this implies that it has a right adjoint, so frames are also complete Heyting algebras. Once again, the difference in naming reflects the morphisms we will consider these structures under: A frame homomorphism is a monotone map which preserves the finite meets and the infinitary joins, but not necessarily the infinitary meets (or the Heyting implication).