--------------------------------------------------------------------------------
title: Some properties of the terminal locale
author: Ayberk Tosun
date-started: 2024-03-09
--------------------------------------------------------------------------------
We collect properties of the terminal locale in this module.
Some of the facts below can be derived from general theorems about Stone spaces,
since the terminal locale is a Stone space. At the moment of writing, however,
the machinery for Stone locales needs a bit refactoring so I'm writing these
easy facts directly.
TODO: Refactor the following as to derive them from more general theorems about
Stone spaces.
\begin{code}[hide]
{-# OPTIONS --safe --without-K #-}
open import MLTT.List hiding ([_])
open import MLTT.Spartan hiding (๐; โ; โ)
open import UF.FunExt
open import UF.PropTrunc
open import UF.Size
module Locales.TerminalLocale.Properties
(pt : propositional-truncations-exist)
(fe : Fun-Ext)
(sr : Set-Replacement pt)
where
open import Locales.Clopen pt fe sr
open import Locales.Compactness.Definition pt fe
open import Locales.Frame pt fe
open import Locales.InitialFrame pt fe
open import Locales.Spectrality.SpectralityOfOmega pt fe sr
open import Locales.Stone pt fe sr
open import Locales.StoneImpliesSpectral pt fe sr
open import Locales.ZeroDimensionality pt fe sr
open import Slice.Family
open import UF.Equiv
open import UF.Logic
open import UF.Subsingletons
open import UF.Subsingletons-FunExt
open import UF.SubtypeClassifier
open AllCombinators pt fe
open Locale
open PropositionalTruncation pt hiding (_โจ_; โจ-elim)
module _ (pe : propext ๐ค) where
open Spectrality-of-๐ ๐ค pe
\end{code}
Every compact open of the initial frame is either `โค` or `โฅ`.
\begin{code}
compact-opens-are-boolean : (P : ฮฉ ๐ค)
โ is-compact-open (๐Loc pe) P holds
โ (ฦ K ๊ ๐ ๐ค , P ๏ผ โฌ๐ [ K ]) holds
compact-opens-are-boolean P ฮบ =
โฅโฅ-rec
โ-is-prop
ฮณ
(ฮบ (๐ฎโ P)
(covers-of-directified-basis-are-directed (๐-๐ฝ๐ฃ๐ pe) โฌ๐ โฌ๐-is-basis-for-๐ P) cโ)
where
S : Fam ๐ค (๐ ๐ค)
S = prโ (โฌ๐-is-basis-for-๐ P)
c : P ๏ผ โ[ ๐ช (๐Loc pe) ] ๐ฎโ P
c = โ[ ๐ช (๐Loc pe) ]-unique (๐ฎโ P) P (prโ (โฌ๐โ-is-basis P))
cโ : (P โ โ[ ๐ช (๐Loc pe) ] ๐ฎโ P) holds
cโ = โ-gives-โ
P
(โ[ ๐ช (๐Loc pe) ] ๐ฎโ P)
(equal-โค-gives-holds _ (๏ผ-gives-โ pe P (โ[ ๐ช (๐Loc pe) ] ๐ฎโ P) c))
open PosetReasoning (poset-of (๐-๐ฝ๐ฃ๐ pe))
ฮณ : (ฮฃ bs ๊ List (P holds) , (P โ ๐ฎโ P [ bs ]) holds)
โ (ฦ K ๊ ๐ ๐ค , P ๏ผ โฌ๐ [ K ]) holds
ฮณ ([] , ฯ) = โฃ inl โ , fails-gives-equal-โฅ pe fe P โ โฃ
where
โ : ยฌ (P holds)
โ = ๐-elim โ (๐-is-bottom (๐ช (๐Loc pe)) โฅ) โ ฯ
ฮณ ((p โท _) , ฯ) = โฃ inr โ , holds-gives-equal-โค pe fe P p โฃ
\end{code}
Every compact open of the initial frame is a decidable proposition.
\begin{code}
compact-implies-boolean : (P : ฮฉ ๐ค)
โ is-compact-open (๐Loc pe) P holds
โ is-decidable (P holds)
compact-implies-boolean P ฮบ =
โฅโฅ-rec
(decidability-of-prop-is-prop fe (holds-is-prop P))
ฮณ
(compact-opens-are-boolean P ฮบ)
where
ฮณ : ฮฃ b ๊ ๐ ๐ค , P ๏ผ โฌ๐ [ b ] โ is-decidable (P holds)
ฮณ (inl p , q) = inr (equal-โฅ-gives-fails P q)
ฮณ (inr _ , p) = inl (equal-โค-gives-holds P p)
\end{code}
The bottom proposition `โฅ` is obviously the same thing as the empty join, but
this fact is not a definitional equality.
\begin{code}
๐-is-โฅ : โฅ ๏ผ ๐[ ๐ช (๐Loc pe) ]
๐-is-โฅ = โ-gives-๏ผ
pe
โฅ
๐[ ๐ช (๐Loc pe) ]
(holds-gives-equal-โค pe fe _ ((ฮป ()) , ๐-is-bottom (๐ช (๐Loc pe)) โฅ))
\end{code}
Added on 2024-05-28.
The following is probably written down somewhere else, but this is the right
place for it.
\begin{code}
binary-join-is-disjunction : (P Q : โจ ๐ช (๐Loc pe) โฉ)
โ P โจ[ ๐-๐ฝ๐ฃ๐ pe ] Q ๏ผ P โจ Q
binary-join-is-disjunction P Q =
โ[ ๐-๐ฝ๐ฃ๐ pe ]-unique โ
P , Q โ (P โจ Q) (ฯ
, ฯ) โปยน
where
open Joins (ฮป x y โ x โค[ poset-of (๐-๐ฝ๐ฃ๐ pe) ] y)
ฯ
: ((P โจ Q) is-an-upper-bound-of โ
P , Q โ) holds
ฯ
โ p = โฃ inl p โฃ
ฯ
โ q = โฃ inr q โฃ
ฯ : ((R , _) : upper-bound โ
P , Q โ) โ ((P โจ Q) โ R) holds
ฯ (R , ฯ) = โจ-elim P Q R (ฯ (inl โ)) (ฯ (inr โ))
\end{code}
End of addition
Every compact open of the initial frame is a clopen i.e. is a complemented
proposition.
\begin{code}
compact-implies-clopen : (P : ฮฉ ๐ค)
โ (is-compact-open (๐Loc pe) P
โ is-clopen (๐ช (๐Loc pe)) P) holds
compact-implies-clopen P ฮบ = cases โ โก (compact-implies-boolean P ฮบ)
where
โ : P holds โ is-clopen (๐ช (๐Loc pe)) P holds
โ p = transport
(ฮป - โ is-clopen (๐ช (๐Loc pe)) - holds)
(holds-gives-equal-โค pe fe P p โปยน)
(๐-is-clopen (๐-๐ฝ๐ฃ๐ pe))
โก : ยฌ (P holds) โ is-clopen (๐ช (๐Loc pe)) P holds
โก ฮฝ = transport
(ฮป - โ is-clopen (๐ช (๐Loc pe)) - holds)
q
(๐-is-clopen (๐-๐ฝ๐ฃ๐ pe))
where
โ
= ๐-is-โฅ โปยน
โ
ก = fails-gives-equal-โฅ pe fe P ฮฝ โปยน
q : ๐[ ๐ช (๐Loc pe) ] ๏ผ P
q = ๐[ ๐ช (๐Loc pe) ] ๏ผโจ โ
โฉ โฅ ๏ผโจ โ
ก โฉ P โ
\end{code}
Every decidable proposition of `ฮฉ` is a compact open of the initial frame.
\begin{code}
decidable-implies-compact : (P : ฮฉ ๐ค)
โ is-decidable (P holds)
โ is-compact-open (๐Loc pe) P holds
decidable-implies-compact P (inl p) = transport
(ฮป - โ is-compact-open (๐Loc pe) - holds)
(holds-gives-equal-โค pe fe P p โปยน)
(๐Frm-is-compact ๐ค pe)
decidable-implies-compact P (inr ฮฝ) =
transport (ฮป - โ is-compact-open (๐Loc pe) - holds) โ (๐-is-compact (๐Loc pe))
where
โ
= ๐-is-โฅ โปยน
โ
ก = fails-gives-equal-โฅ pe fe P ฮฝ โปยน
โ : ๐[ ๐ช (๐Loc pe) ] ๏ผ P
โ = ๐[ ๐ช (๐Loc pe) ] ๏ผโจ โ
โฉ โฅ ๏ผโจ โ
ก โฉ P โ
\end{code}
Every clopen of the terminal locale is a compact open.
\begin{code}
clopen-implies-compact : (P : ฮฉ ๐ค)
โ (is-clopen (๐ช (๐Loc pe)) P โ is-compact-open (๐Loc pe) P)
holds
clopen-implies-compact P ๐ =
clopens-are-compact-in-compact-locales (๐Loc pe) (๐Frm-is-compact ๐ค pe) P ๐
\end{code}
The type of compact opens of the terminal locale is equivalent to its type of
clopens.
\begin{code}
clopen-equiv-compact : ๐ฆ (๐Loc pe) โ ๐ (๐Loc pe)
clopen-equiv-compact = g , (h , โ ) , h , โก
where
g : ๐ฆ (๐Loc pe) โ ๐ (๐Loc pe)
g (K , ฮบ) = K , compact-implies-clopen K ฮบ
h : ๐ (๐Loc pe) โ ๐ฆ (๐Loc pe)
h (K , ๐ ) = K , clopen-implies-compact K ๐
โ : (g โ h) โผ id
โ U = to-subtype-๏ผ (holds-is-prop โ is-clopen (๐ช (๐Loc pe))) refl
โก : (h โ g) โผ id
โก U = to-subtype-๏ผ (holds-is-prop โ is-compact-open (๐Loc pe)) refl
\end{code}
The type of clopens of the terminal locale is equivalent to the type of
decidable propositions
\begin{code}
clopen-equiv-decidable : ๐ (๐Loc pe) โ (ฮฃ P ๊ ฮฉ ๐ค , is-decidable (P holds))
clopen-equiv-decidable = g , (h , โก) , h , โ
where
g : ๐ (๐Loc pe) โ ฮฃ P ๊ ฮฉ ๐ค , is-decidable (P holds)
g (K , ๐ ) = K , compact-implies-boolean K (clopen-implies-compact K ๐ )
h : (ฮฃ P ๊ ฮฉ ๐ค , is-decidable (P holds)) โ ๐ (๐Loc pe)
h (K , ฮบ) = K , compact-implies-clopen K (decidable-implies-compact K ฮบ)
โ : (h โ g) โผ id
โ U =
to-subtype-๏ผ (holds-is-prop โ is-clopen (๐ช (๐Loc pe))) refl
โก : (g โ h) โผ id
โก (P , _) =
to-subtype-๏ผ (ฮป Q โ decidability-of-prop-is-prop fe (holds-is-prop Q)) refl
\end{code}
Added on 2024-08-05.
\begin{code}
โฌ๐-consists-of-clopens : consists-of-clopens (๐ช (๐Loc pe)) โฌ๐ holds
โฌ๐-consists-of-clopens (inl โ) =
transport (ฮป - โ is-clopen (๐ช (๐Loc pe)) - holds) (p โปยน) โ
where
p : โฅ ๏ผ ๐[ ๐ช (๐Loc pe) ]
p = ๐-is-โฅ
โ : is-clopen (๐ช (๐Loc pe)) ๐[ ๐ช (๐Loc pe) ] holds
โ = ๐-is-clopen (๐ช (๐Loc pe))
โฌ๐-consists-of-clopens (inr โ) =
๐-is-clopen (๐ช (๐Loc pe))
โฌ๐โ-consists-of-clopens : consists-of-clopens (๐ช (๐Loc pe)) โฌ๐โ holds
โฌ๐โ-consists-of-clopens [] = ๐-is-clopen (๐ช (๐Loc pe))
โฌ๐โ-consists-of-clopens (i โท is) =
clopens-are-closed-under-โจ (๐ช (๐Loc pe)) (โฌ๐ [ i ]) (โฌ๐โ [ is ]) โ โก
where
โ : is-clopen (๐ช (๐Loc pe)) (โฌ๐ [ i ]) holds
โ = โฌ๐-consists-of-clopens i
โก : is-clopen (๐ช (๐Loc pe)) (โฌ๐โ [ is ]) holds
โก = โฌ๐โ-consists-of-clopens is
๐-zero-dimensionalแดฐ : zero-dimensionalแดฐ (๐ช (๐Loc pe))
๐-zero-dimensionalแดฐ = โฌ๐โ
, prโ (โฌ๐โ-directed-basisแดฐ ๐ค pe)
, โฌ๐โ-consists-of-clopens
\end{code}
Added on 2024-08-10.
\begin{code}
๐-stoneแดฐ : stoneแดฐ (๐Loc pe)
๐-stoneแดฐ = ๐Frm-is-compact ๐ค pe , ๐-zero-dimensionalแดฐ
๐-is-stone : is-stone (๐Loc pe) holds
๐-is-stone = ๐Frm-is-compact ๐ค pe
, โฃ ๐-zero-dimensionalแดฐ โฃ
\end{code}