Ayberk Tosun.
Started on: 29 September 2023.
Finished on: 2 October 2023.
This module contains the definition of the Scott locale of a large and locally
small dcpo with a specified small compact basis, a notion defined in Tom de
Jong's domain theory development.
If one starts with a dcpo with a specified small compact basis, one can ensure
that the resulting Scott locale is locally small by quantifying over only the
basic/compact opens. This is the difference between the construction in this
module and the one in `ScottLocale.Definition`
\begin{code}[hide]
{-# OPTIONS --safe --without-K #-}
open import MLTT.Spartan
open import Slice.Family
open import UF.FunExt
open import UF.Logic
open import UF.PropTrunc
open import UF.SubtypeClassifier
open import UF.Subsingletons
\end{code}
We assume the existence of propositional truncations as well as function
extensionality, and we assume a universe `π€` over which we consider large and
locally small dcpos.
\begin{code}
module Locales.ScottLocale.ScottLocalesOfAlgebraicDcpos
(pt : propositional-truncations-exist)
(fe : Fun-Ext)
(π€ : Universe)
where
open Universal fe
open Implication fe
open Existential pt
open Conjunction
open import Locales.Frame pt fe
open import DomainTheory.Basics.Dcpo pt fe π€ renaming
(β¨_β© to β¨_β©β)
open import DomainTheory.Topology.ScottTopology pt fe π€
open import DomainTheory.BasesAndContinuity.Continuity pt fe π€
open import DomainTheory.BasesAndContinuity.Bases pt fe π€
open import Locales.ScottLocale.Definition pt fe π€
open Locale
open PropositionalTruncation pt
\end{code}
The construction is carried out over a large and locally small dcpo `π` equipped
with a small compact basis. Because the type of small compact bases for large
and locally small dcpos has _split support_, the construction can also be
carried out without assuming a specified small compact basis.
TODO: use the following module to do the same construction with only the
truncation of the basis in consideration.
\begin{code}
module ScottLocaleConstruction (π : DCPO {π€ βΊ} {π€})
(hscb : has-specified-small-compact-basis π)
(pe : propext π€) where
open DefnOfScottTopology π π€
open DefnOfScottLocale π π€ pe using (πͺβ-equality; _ββ_; ββ-is-reflexive;
ββ-is-transitive; ββ-is-antisymmetric;
β€β; β€β-is-top; _β§β_; β§β-is-meet;
distributivityβ; ββ_; ββ-is-join)
renaming (ScottLocale to ScottLocaleβ²)
\end{code}
We denote by `π` the fact that the dcpo `π` in consideration is _structurally
algebraic_.
\begin{code}
π : structurally-algebraic π
π = structurally-algebraic-if-specified-small-compact-basis π hscb
\end{code}
We denote by `I` the index type of the basis and by `Ξ²` its enumeration
function.
\begin{code}
private
I = index-of-compact-basis π hscb
Ξ² = family-of-compact-elements π hscb
\end{code}
\begin{code}
β¬ : Fam π€ β¨ π β©β
β¬ = I , Ξ²
\end{code}
The order `_ββ_` is the small version of the relation that quantifies only over
the basic opens. The order `_ββ_` is the large version.
\begin{code}
open structurally-algebraic
_ββ_ : πͺβ β πͺβ β Ξ© π€
(U , _) ββ (V , _) = β±― i κ I , U (β¬ [ i ]) β V (β¬ [ i ])
ββ-implies-ββ : (π π : πͺβ) β (π ββ π β π ββ π) holds
ββ-implies-ββ π@(U , ΞΉβ , Ο
β) π@(V , ΞΉβ , Ο
β) Ο x p =
transport (Ξ» - β (- ββ π) holds) (eq β»ΒΉ) β
where
S : Fam π€ β¨ π β©β
S = index-of-compact-family π x , compact-family π x
Sβ : Famβ
Sβ = S , compact-family-is-directed π x
eq : x οΌ β Sβ
eq = compact-family-β-οΌ π x β»ΒΉ
pβ² : ((β Sβ) ββ π) holds
pβ² = transport (Ξ» - β (- ββ π) holds) eq p
β : ((β Sβ) ββ π) holds
β = β₯β₯-rec (holds-is-prop ((β Sβ) ββ π)) β‘ (Ο
β Sβ pβ²)
where
β‘ : Ξ£ i κ index S , ((S [ i ]) ββ π) holds β ((β Sβ) ββ π) holds
β‘ (i , q) = ΞΉβ (S [ i ]) (β Sβ) r (β-is-upperbound Sβ i)
where
r : ((S [ i ]) ββ π) holds
r = Ο (prβ i) q
ββ-implies-ββ : (π π : πͺβ) β (π ββ π β π ββ π) holds
ββ-implies-ββ π π p = p β (β¬ [_])
ββ-iff-ββ : (π π : πͺβ) β (π ββ π β π ββ π) holds
ββ-iff-ββ π π = ββ-implies-ββ π π , ββ-implies-ββ π π
ββ-is-reflexive : is-reflexive _ββ_ holds
ββ-is-reflexive π@(U , Ξ΄) = ββ-implies-ββ π π (ββ-is-reflexive π)
ββ-is-transitive : is-transitive _ββ_ holds
ββ-is-transitive π@(U , Ξ΄) π@(V , Ο΅) π@(W , ΞΆ) p q = ββ-implies-ββ π π β
where
β : (π ββ π) holds
β = ββ-is-transitive π π π (ββ-implies-ββ π π p) (ββ-implies-ββ π π q)
ββ-is-antisymmetric : is-antisymmetric _ββ_
ββ-is-antisymmetric {π} {π} p q = ββ-is-antisymmetric β β‘
where
β : (π ββ π) holds
β = ββ-implies-ββ π π p
β‘ : (π ββ π) holds
β‘ = ββ-implies-ββ π π q
ββ-is-partial-order : is-partial-order πͺβ _ββ_
ββ-is-partial-order = (ββ-is-reflexive , ββ-is-transitive) , ββ-is-antisymmetric
poset-of-scott-opensβ : Poset (π€ βΊ) (π€ βΊ)
poset-of-scott-opensβ =
πͺβ , _ββ_ , (ββ-is-reflexive , ββ-is-transitive) , ββ-is-antisymmetric
\end{code}
The top open.
\begin{code}
β€β-is-top-wrt-ββ : (π : πͺβ) β (π ββ β€β) holds
β€β-is-top-wrt-ββ π = ββ-implies-ββ π β€β (β€β-is-top π)
\end{code}
The meet of two opens.
\begin{code}
open Meets _ββ_
β§β-is-meet-wrt-ββ : (π π : πͺβ) β ((π β§β π) is-glb-of (π , π)) holds
β§β-is-meet-wrt-ββ π π = β , β‘
where
β : ((π β§β π) is-a-lower-bound-of (π , π)) holds
β = ββ-implies-ββ (π β§β π) π (β§[ πͺ ScottLocaleβ² ]-lowerβ π π)
, ββ-implies-ββ (π β§β π) π (β§[ πͺ ScottLocaleβ² ]-lowerβ π π)
β‘ : ((W , _) : lower-bound (π , π)) β (W ββ (π β§β π)) holds
β‘ (π , p , q) =
ββ-implies-ββ π (π β§β π) (β§[ πͺ ScottLocaleβ² ]-greatest π π π β£ β )
where
β£ : (π ββ π) holds
β£ = ββ-implies-ββ π π p
β : (π ββ π) holds
β = ββ-implies-ββ π π q
\end{code}
The π€-join of opens.
\begin{code}
open Joins _ββ_
ββ-is-join-wrt-ββ : (S : Fam π€ πͺβ) β ((ββ S) is-lub-of S) holds
ββ-is-join-wrt-ββ S = β , β‘
where
β : ((ββ S) is-an-upper-bound-of S) holds
β i = ββ-implies-ββ (S [ i ]) (ββ S) (β[ πͺ ScottLocaleβ² ]-upper S i)
β‘ : ((U , _) : upper-bound S) β ((ββ S) ββ U) holds
β‘ (π , p) = ββ-implies-ββ (ββ S) π ((β[ πͺ ScottLocaleβ² ]-least S (π , β»)))
where
β» : (i : index S) β ((S [ i ]) ββ π) holds
β» i = ββ-implies-ββ (S [ i ]) π (p i)
\end{code}
\begin{code}
πͺβ-frame-structure : frame-structure π€ π€ πͺβ
πͺβ-frame-structure = (_ββ_ , β€β , _β§β_ , ββ_)
, ββ-is-partial-order
, β€β-is-top-wrt-ββ
, (Ξ» (U , V) β β§β-is-meet-wrt-ββ U V)
, ββ-is-join-wrt-ββ
, Ξ» (U , S) β distributivityβ U S
\end{code}
We finally define the locally small Scott locale of algebraic dcpo `π`:
\begin{code}
ScottLocale : Locale (π€ βΊ) π€ π€
ScottLocale = record { β¨_β©β = πͺβ ; frame-str-of = πͺβ-frame-structure}
\end{code}