--------------------------------------------------------------------------------
author: Ayberk Tosun
date-started: 2024-03-15
date-completed: 2024-05-13
--------------------------------------------------------------------------------
Let D be a Scott domain satisfying the condition that the existence of binary
upper bounds of compact elements is decidable. Denote by Ο(D) the Scott locale
of domain D.
By a βpointβ of D, we mean a continuous map π β Ο(D) (where π denotes the
terminal locale), or equivalently, a frame homomorphism πͺ(Ο(D)) β Ξ©.
Given a point F, we define the family of compact elements with principal filters
falling in F, i.e.
{ c : π¦(D) β£ βc β F }.
The notation π¦(D) above is our notation for the type of compact elements of
the domain.
\begin{code}
{-# OPTIONS --safe --without-K --lossy-unification #-}
open import MLTT.Spartan
open import UF.FunExt
open import UF.PropTrunc
open import UF.Size
open import UF.Subsingletons
module Locales.LawsonLocale.CompactElementsOfPoint
(π€ : Universe)
(fe : Fun-Ext)
(pe : Prop-Ext)
(pt : propositional-truncations-exist)
(sr : Set-Replacement pt)
where
open import DomainTheory.BasesAndContinuity.Bases pt fe π€
open import DomainTheory.BasesAndContinuity.ScottDomain pt fe π€
open import DomainTheory.Basics.Dcpo pt fe π€ renaming (β¨_β© to β¨_β©β)
open import DomainTheory.Basics.WayBelow pt fe π€
open import DomainTheory.Topology.ScottTopology pt fe π€
open import DomainTheory.Topology.ScottTopologyProperties pt fe π€
open import Locales.ContinuousMap.Definition pt fe
open import Locales.ContinuousMap.FrameHomomorphism-Definition pt fe
open import Locales.ContinuousMap.FrameHomomorphism-Properties pt fe
open import Locales.Frame pt fe hiding (is-directed)
open import Locales.InitialFrame pt fe
open import Locales.ScottLocale.Definition pt fe π€
open import Locales.ScottLocale.Properties pt fe π€
open import Locales.ScottLocale.ScottLocalesOfScottDomains pt fe sr π€
open import Locales.Point.Definition pt fe
open import Locales.Point.Properties pt fe π€ pe hiding (πL)
open import Locales.TerminalLocale.Properties pt fe sr
open import Slice.Family
open import UF.Logic
open import UF.Powerset
open import UF.SubtypeClassifier renaming (β₯ to β₯β)
open import UF.Univalence
open AllCombinators pt fe renaming (_β§_ to _β§β_; _β¨_ to _β¨β_)
open FrameHomomorphismProperties
open FrameHomomorphisms
open Locale
open PropositionalTruncation pt hiding (_β¨_)
\end{code}
We work in a module parameterized by a large and locally small locale `X`.
\begin{code}
module Preliminaries (X : Locale (π€ βΊ) π€ π€) where
open ContinuousMaps
\end{code}
We use the abbreviation `πL` for the terminal locale of the category of
`π€`-locales (i.e. large and locally small locales over universe `π€`).
\begin{code}
πL : Locale (π€ βΊ) π€ π€
πL = πLoc pe
\end{code}
This is the locale given by the frame of opens `Ξ©β`.
\begin{code}
Ξ©β : Frame (π€ βΊ) π€ π€
Ξ©β = πͺ (πLoc pe)
\end{code}
For the reader who might not be familiar, this is the locale defined by the
frame of opens `Ξ©`.
\begin{code}
_ : β¨ πͺ πL β© οΌ Ξ© π€
_ = refl
\end{code}
By a point of locale, we mean a continuous map from `πL` into `X` as mentioned
in the preamble.
\begin{code}
Point : π€ βΊ Μ
Point = πL βcβ X
\end{code}
This is definitionally the same thing as a frame homomorphism `πͺ(X) β Ξ©`.
\begin{code}
Pointβ² : π€ βΊ Μ
Pointβ² = πͺ X βfβ Ξ©β
_ : Point οΌ Pointβ²
_ = refl
\end{code}
We now proceed to the definition of the family mentioned in the preamble. We
work with a dcpo `π` that is assumed to
- have a bottom element,
- be a Scott domain, and
- satisfy the aforementioned decidability condition for upper boundedness.
\begin{code}
open DefinitionOfScottDomain
module Construction
(π : DCPO {π€ βΊ} {π€})
(ua : Univalence)
(hl : has-least (underlying-order π))
(sd : is-scott-domain π holds)
(dc : decidability-condition π) where
open SpectralScottLocaleConstructionβ π ua hl sd dc pe
open SpectralScottLocaleConstruction π hl hscb dc bc pe hiding (scb; Ξ²; Ο)
open DefnOfScottTopology π π€
open Preliminaries Οβ¦
πβ¦
open Properties π
\end{code}
We denote by `Bπ` the basis of `π`.
\begin{code}
Bπ : Fam π€ β¨ π β©β
Bπ = index-of-compact-basis π hscb , family-of-compact-elements π hscb
\end{code}
We use the abbreviation `scb` for the proof that `Bπ` is a small basis
consisting of compact opens.
\begin{code}
scb : is-small-compact-basis π (family-of-compact-elements π hscb)
scb = small-compact-basis π hscb
\end{code}
By `Ξ²β i`, we denote the element denoted by an index `i`, packaged up with the
proof that it is compact.
\begin{code}
open is-small-compact-basis scb
open BottomLemma π π hl
Ξ²β : (i : index Bπ) β Ξ£ c κ β¨ π β©β , is-compact π c
Ξ²β i = Bπ [ i ] , basis-is-compact i
\end{code}
We now write down the family of compact elements whose principal ideals fall in
a given point `β±`. We denote this `π¦-in-point β±`.
\begin{code}
π¦-in-point : Point β Fam π€ β¨ π β©β
π¦-in-point (F , _) =
β
Bπ [ i ] β£ (i , _) βΆ (Ξ£ i κ index Bπ , βΛ’[ Ξ²β i ] ββ F holds) β
\end{code}
Ideally, the name here would be `π¦-with-principal-ideals-in-point` but this is
too long, which is why we use the name `π¦-in-point`.
It makes sense to me to think of this as the family of compact approximants to
the given point, but I'm not sure this geometric view is accurate at the time of
writing. I will improve this name in the future as my understanding of the
underlying geometric intuition increases.
The family `π¦-in-point` is always inhabited.
\begin{code}
open ScottLocaleProperties π hl hscb pe
π¦-in-point-is-inhabited
: (β±@(F , _) : Point)
β is-inhabited (underlying-order π) (index (π¦-in-point β±))
π¦-in-point-is-inhabited β±@(F , _) = β₯β₯-rec β-is-prop β Ξ³
where
β
’ : F π[ πͺ Οβ¦
πβ¦ ] οΌ β€
β
’ = frame-homomorphisms-preserve-top (πͺ Οβ¦
πβ¦) (πͺ πL) β±
ΞΆ : π[ πͺ Οβ¦
πβ¦ ] β F
ΞΆ = equal-β€-gives-holds (F π[ πͺ Οβ¦
πβ¦ ]) β
’
β : Ξ£ i κ index Bπ , Bπ [ i ] οΌ β₯α΄° β β i κ index Bπ , βΛ’[ Ξ²β i ] ββ F holds
β (i , p) = β£ i , equal-β€-gives-holds (F βΛ’[ Ξ²β i ]) β» β£
where
β
= ap
F
(to-subtype-οΌ
(holds-is-prop β is-scott-open)
(ap (principal-filter π) p))
β
‘ = ap F ββ₯-is-top
β» : F βΛ’[ Ξ²β i ] οΌ β€
β» = F βΛ’[ Ξ²β i ] οΌβ¨ β
β©
F βΛ’[ β₯α΄° , β₯ΞΊ ] οΌβ¨ β
‘ β©
F π[ πͺ Οβ¦
πβ¦ ] οΌβ¨ β
’ β©
β€ β
Ξ³ : β i κ index Bπ , Bπ [ i ] οΌ β₯α΄°
Ξ³ = small-compact-basis-contains-all-compact-elements π (Bπ [_]) scb β₯α΄° β₯ΞΊ
\end{code}
Before we proceed to proving that the family `π¦-in-point` is always
semidirected, we prove a lemma that we will use in the proof. The reader not
interested in the lemma may jump directly to the proof which is implemented in
the function called `π¦-in-point-is-semidirected`.
The lemma is simply the fact that
```
βb β F and βc β F implies (βb β§ βc) β F
```
for any two compact elements `b` and `c` of `π`.
This is actually something already implemented in the `Locales.Point` directory,
where it is shown that points correspond to completely prime filters.
\begin{code}
point-preserves-meets : (β±@(F , _) : Point) (c d : β¨ π β©β)
β (ΞΊc : is-compact π c)
β (ΞΊd : is-compact π d)
β (F βΛ’[ (c , ΞΊc) ]
β F βΛ’[ (d , ΞΊd) ]
β F (βΛ’[ c , ΞΊc ] β§[ πͺ Ξ£β¦
πβ¦ ] βΛ’[ d , ΞΊd ])) holds
point-preserves-meets β±@(F , _) c d ΞΊc ΞΊd =
point-is-closed-under-β§ βΛ’[ c , ΞΊc ] βΛ’[ d , ΞΊd ]
where
open DefnOfCPF Ξ£β¦
πβ¦
open Pointα΅£ (to-pointα΅£ Ξ£β¦
πβ¦ (π° Ξ£β¦
πβ¦ β±))
\end{code}
The family `π¦-in-point` is semidirected.
\begin{code}
π¦-in-point-is-semidirected
: (β± : Point)
β is-semidirected (underlying-order π) (π¦-in-point β± [_])
π¦-in-point-is-semidirected β± (i , ΞΊα΅’) (j , ΞΊβ±Ό) =
\end{code}
To prove this, we use the assumption that upper boundedness of compact elements
is decidable.
\begin{code}
let
Ο : is-decidable (bounded-above π (Bπ [ i ]) (Bπ [ j ]) holds)
Ο = dc (Bπ [ i ]) (Bπ [ j ]) (basis-is-compact i) (basis-is-compact j)
in
\end{code}
We now proceed by case analysis on whether or not the upper bound of `Bπ [ i ]`
and `Bπ [ j ]` exists. The cases are given in `caseβ` and `caseβ`.
\begin{code}
cases caseβ caseβ Ο
where
open DefnOfScottLocale π π€ pe
F = prβ β±
\end{code}
We denote by `b` and `c`, the elements `Bπ [ i ]` and `Bπ [ j ]` respectively.
\begin{code}
b = Bπ [ i ]
ΞΊα΅ = basis-is-compact i
c = Bπ [ j ]
ΞΊαΆ = basis-is-compact j
\end{code}
We now proceed with the case analysis.
Case 1: the upper bound of `b` and `c` exists.
\begin{code}
caseβ : bounded-above π (Bπ [ i ]) (Bπ [ j ]) holds
β β k κ index (π¦-in-point β±)
, (π¦-in-point β± [ i , ΞΊα΅’ ]) ββ¨ π β© (π¦-in-point β± [ k ])
Γ (π¦-in-point β± [ j , ΞΊβ±Ό ]) ββ¨ π β© (π¦-in-point β± [ k ])
caseβ Ο
= β₯β₯-functor β‘β π·α΅
where
π : has-sup (underlying-order π) (binary-family π€ b c [_])
π = bc (binary-family π€ b c) Ο
\end{code}
Thanks to bounded completeness, the fact that an upper bound exists means that
the least upper bound exists. We denote this by `d`.
\begin{code}
d : β¨ π β©β
d = prβ π
p : b ββ¨ π β© d
p = prβ (prβ π) (inl β)
q : c ββ¨ π β© d
q = prβ (prβ π) (inr β)
ΞΊα΅ : is-compact π d
ΞΊα΅ = sup-is-compact b c d ΞΊα΅ ΞΊαΆ (prβ π)
π·α΅ : (d βimageβ (Bπ [_])) holds
π·α΅ = small-compact-basis-contains-all-compact-elements π (Bπ [_]) scb d ΞΊα΅
β‘β : Ξ£ k κ index Bπ , Bπ [ k ] οΌ d
β Ξ£ k κ index (π¦-in-point β±) ,
((π¦-in-point β± [ i , ΞΊα΅’ ]) ββ¨ π β© (Bπ [ prβ k ]))
Γ ((π¦-in-point β± [ j , ΞΊβ±Ό ]) ββ¨ π β© (Bπ [ prβ k ]))
β‘β (k , Ο) = (k , β») , β , β£
where
r : βΛ’[ d , ΞΊα΅ ] οΌ βΛ’[ b , ΞΊα΅ ] β§[ πͺ Ξ£[π] ] βΛ’[ c , ΞΊαΆ ]
r = principal-filter-reflects-joins b c d ΞΊα΅ ΞΊαΆ (prβ π)
β₯ : βΛ’[ d , ΞΊα΅ ] β F
β₯ = transport
(Ξ» - β - β F)
(r β»ΒΉ)
(point-preserves-meets β± b c ΞΊα΅ ΞΊαΆ ΞΊα΅’ ΞΊβ±Ό)
β» : βΛ’[ Ξ²β k ] β F
β» = transport
(Ξ» - β βΛ’[ - ] β F)
(to-subtype-οΌ (being-compact-is-prop π) (Ο β»ΒΉ))
β₯
abstract
β : (Bπ [ i ]) ββ¨ π β© (Bπ [ k ])
β = transport (Ξ» - β (Bπ [ i ]) ββ¨ π β© -) (Ο β»ΒΉ) p
β£ : (Bπ [ j ]) ββ¨ π β© (Bπ [ k ])
β£ = transport (Ξ» - β (Bπ [ j ]) ββ¨ π β© -) (Ο β»ΒΉ) q
\end{code}
Case 2: the upper bound of `b` and `c` _does not_ exist. We derive a
contradiction in this case.
\begin{code}
caseβ : Β¬ ((Bπ [ i ]) β[ π ] (Bπ [ j ]) holds)
β β k κ index (π¦-in-point β±)
, (π¦-in-point β± [ i , ΞΊα΅’ ]) ββ¨ π β© (π¦-in-point β± [ k ])
Γ (π¦-in-point β± [ j , ΞΊβ±Ό ]) ββ¨ π β© (π¦-in-point β± [ k ])
caseβ Ξ½ = π-elim (β₯-is-not-β€ Ο)
where
\end{code}
We have that `β(b) β§ β(c) οΌ π`, given by `not-bounded-lemma`.
\begin{code}
Ξ² : βΛ’[ b , ΞΊα΅ ] β§[ πͺ Ξ£β¦
πβ¦ ] βΛ’[ c , ΞΊαΆ ] οΌ π[ πͺ Ξ£β¦
πβ¦ ]
Ξ² = not-bounded-lemma b c ΞΊα΅ ΞΊαΆ Ξ½
\end{code}
Because the point `F` is a frame homomorphism, we have that
```
F(βb) β§ F(βc) οΌ F(βb β§ βc) οΌ F(π)
```
Because we know that `F(βb)` and `F(βc)` hold, we know that `F(π)` holds, which
is a contradiction since `F(π) οΌ β₯`.
\begin{code}
β
= π-is-β₯ pe
β
‘ = frame-homomorphisms-preserve-bottom (πͺ Ξ£β¦
πβ¦) (π-π½π£π pe) β± β»ΒΉ
β
’ = ap F (Ξ² β»ΒΉ)
β
£ = holds-gives-equal-β€
pe
fe
(F (βΛ’[ b , ΞΊα΅ ] β§[ πͺ Ξ£β¦
πβ¦ ] βΛ’[ c , ΞΊαΆ ]))
(point-preserves-meets β± b c ΞΊα΅ ΞΊαΆ ΞΊα΅’ ΞΊβ±Ό)
Ο : β₯β οΌ β€
Ο = β₯β οΌβ¨ β
β©
π[ π-π½π£π pe ] οΌβ¨ β
‘ β©
F π[ πͺ Ξ£β¦
πβ¦ ] οΌβ¨ β
’ β©
F (βΛ’[ b , ΞΊα΅ ] β§[ πͺ Ξ£β¦
πβ¦ ] βΛ’[ c , ΞΊαΆ ]) οΌβ¨ β
£ β©
β€ β
\end{code}
We now have everything required to record the proof that the family
`π¦-in-point β±` is directed.
\begin{code}
π¦-in-point-is-directed : (β± : Point)
β is-directed (underlying-order π) (π¦-in-point β± [_])
π¦-in-point-is-directed β± = π¦-in-point-is-inhabited β±
, π¦-in-point-is-semidirected β±
\end{code}
Added on 2024-05-23.
\begin{code}
π¦-in-pointβ : (β± : Point) β Famβ
π¦-in-pointβ β± = π¦-in-point β± , π¦-in-point-is-directed β±
\end{code}