diff --git a/source/Locales/Compactness.lagda b/source/Locales/Compactness.lagda new file mode 100644 index 000000000..d7627b82d --- /dev/null +++ b/source/Locales/Compactness.lagda @@ -0,0 +1,78 @@ +Ayberk Tosun, 19 August 2023 + +The module contains the definitions of + + (1) a compact open of a locale, and + (2) a compact locale. + +These used to live in the `CompactRegular` module which is now deprecated and +will be broken down into smaller modules. + +\begin{code}[hide] + +{-# OPTIONS --safe --without-K --exact-split #-} + +open import UF.Base +open import UF.Subsingletons +open import UF.PropTrunc +open import UF.FunExt +open import MLTT.Spartan + +module Locales.Compactness (pt : propositional-truncations-exist) + (fe : Fun-Ext) where + +open import Locales.Frame pt fe +open import Locales.WayBelow pt fe +open import Slice.Family + +open Locale + +\end{code} + +An open `U : ๐’ช(X)` of a locale `X` is called compact if it is way below itself. + +\begin{code} + +is-compact-open : (X : Locale ๐“ค ๐“ฅ ๐“ฆ) โ†’ โŸจ ๐’ช X โŸฉ โ†’ ฮฉ (๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ) +is-compact-open X U = U โ‰ช[ ๐’ช X ] U + +\end{code} + +A locale `X` is called compact if its top element `๐Ÿ` is compact. + +\begin{code} + +is-compact : Locale ๐“ค ๐“ฅ ๐“ฆ โ†’ ฮฉ (๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ) +is-compact X = is-compact-open X ๐Ÿ[ ๐’ช X ] + +\end{code} + +We also define the type `๐’ฆ X` expressing the type of compact opens of a locale +`X`. + +\begin{code} + +๐’ฆ : Locale ๐“ค ๐“ฅ ๐“ฆ โ†’ ๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ ฬ‡ +๐’ฆ X = ฮฃ U ๊ž‰ โŸจ ๐’ช X โŸฉ , is-compact-open X U holds + +\end{code} + +Using this, we could define a family giving the compact opens of a locale `X`: + +\begin{code} + +โ„ฌ-compact : (X : Locale ๐“ค ๐“ฅ ๐“ฆ) โ†’ Fam (๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ) โŸจ ๐’ช X โŸฉ +โ„ฌ-compact X = ๐’ฆ X , prโ‚ + +\end{code} + +but the index of this family lives in `๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ`. This is to say that, if one +starts with a large and locally small locale, the resulting family would live in +`๐“ค โบ` which means it would be *too big*. + +\begin{code} + +โ„ฌ-compactโ‚€ : (X : Locale (๐“ค โบ) ๐“ค ๐“ค) โ†’ Fam (๐“ค โบ) โŸจ ๐’ช X โŸฉ +โ„ฌ-compactโ‚€ = โ„ฌ-compact + +\end{code} diff --git a/source/Locales/Spectrality.lagda b/source/Locales/Spectrality.lagda new file mode 100644 index 000000000..a14adc6b8 --- /dev/null +++ b/source/Locales/Spectrality.lagda @@ -0,0 +1,88 @@ +Ayberk Tosun, 19 August 2023 + +The module contains the definition of a spectral locale. + +This used to live in the `CompactRegular` module which is now deprecated and +will be broken down into smaller modules. + +\begin{code}[hide] + +{-# OPTIONS --safe --without-K --exact-split --lossy-unification #-} + +open import MLTT.Spartan +open import UF.Base +open import UF.PropTrunc +open import UF.FunExt +open import UF.Univalence +open import UF.FunExt +open import UF.EquivalenceExamples +open import MLTT.List hiding ([_]) +open import MLTT.Pi +open import Slice.Family +open import UF.Subsingletons +open import UF.Subsingletons-FunExt +open import UF.Logic + +module Locales.Spectrality (pt : propositional-truncations-exist) + (fe : Fun-Ext) where + +open import Locales.Frame pt fe +open import Locales.Compactness pt fe + +open AllCombinators pt fe + +open Locale + +\end{code} + +The following predicate expresses what it means for a locale's compact opens to +be closed under binary meets. + +\begin{code} + +compacts-of-[_]-are-closed-under-binary-meets : Locale ๐“ค ๐“ฅ ๐“ฆ โ†’ ฮฉ (๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ) +compacts-of-[ X ]-are-closed-under-binary-meets = + let + _โˆงโ‚“_ = meet-of (๐’ช X) + in + โฑฏ Kโ‚ ๊ž‰ โŸจ ๐’ช X โŸฉ , โฑฏ Kโ‚‚ ๊ž‰ โŸจ ๐’ช X โŸฉ , + is-compact-open X Kโ‚ โ‡’ is-compact-open X Kโ‚‚ โ‡’ is-compact-open X (Kโ‚ โˆงโ‚“ Kโ‚‚) + +\end{code} + +Now we express closure under finite meets, which amounts to closure under binary +meets combined with the empty meet (i.e. the top element) being compact. + +\begin{code} + +compacts-of-[_]-are-closed-under-finite-meets : Locale ๐“ค ๐“ฅ ๐“ฆ โ†’ ฮฉ (๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ) +compacts-of-[ X ]-are-closed-under-finite-meets = + is-compact X โˆง compacts-of-[ X ]-are-closed-under-binary-meets + +\end{code} + +The following predicate expresses the property of a given family to consist of +compact opens i.e. all the opens it gives being compact opens. + +\begin{code} + +consists-of-compact-opens : (X : Locale ๐“ค ๐“ฅ ๐“ฆ) โ†’ Fam ๐“ฆ โŸจ ๐’ช X โŸฉ โ†’ ฮฉ (๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ) +consists-of-compact-opens X S = โฑฏ i ๊ž‰ index S , is-compact-open X (S [ i ]) + +\end{code} + +We are now ready to define the notion of a spectral locale: + +\begin{code} + +is-spectral : Locale ๐“ค ๐“ฅ ๐“ฆ โ†’ ฮฉ (๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ) +is-spectral {_} {_} {๐“ฆ} X = โฆ…๐Ÿโฆ† โˆง โฆ…๐Ÿโฆ† + where + โฆ…๐Ÿโฆ† = compacts-of-[ X ]-are-closed-under-finite-meets + โฆ…๐Ÿโฆ† = โฑฏ U ๊ž‰ โŸจ ๐’ช X โŸฉ , + ฦŽ S ๊ž‰ (Fam ๐“ฆ โŸจ ๐’ช X โŸฉ) , + consists-of-compact-opens X S holds + ร— is-directed (๐’ช X) S holds + ร— (U ๏ผ โ‹[ ๐’ช X ] S) + +\end{code} diff --git a/source/Locales/WayBelow.lagda b/source/Locales/WayBelow.lagda new file mode 100644 index 000000000..d6f591c9a --- /dev/null +++ b/source/Locales/WayBelow.lagda @@ -0,0 +1,41 @@ +Ayberk Tosun, 19 August 2023 + +The module contains the definition of the way below relation. + +This used to live in the `CompactRegular` module which is now deprecated and +will be broken down into smaller modules. + +\begin{code}[hide] + +{-# OPTIONS --safe --without-K --exact-split #-} + +open import UF.Subsingletons +open import UF.PropTrunc +open import UF.FunExt +open import MLTT.Spartan +open import UF.Logic +open import Slice.Family + +module Locales.WayBelow (pt : propositional-truncations-exist) + (fe : Fun-Ext) where + +open import Locales.Frame pt fe + +open AllCombinators pt fe + +\end{code} + +\begin{code} + +way-below : (F : Frame ๐“ค ๐“ฅ ๐“ฆ) โ†’ โŸจ F โŸฉ โ†’ โŸจ F โŸฉ โ†’ ฮฉ (๐“ค โŠ” ๐“ฅ โŠ” ๐“ฆ โบ) +way-below {๐“ค = ๐“ค} {๐“ฆ = ๐“ฆ} F U V = + โฑฏ S ๊ž‰ Fam ๐“ฆ โŸจ F โŸฉ , is-directed F S โ‡’ + V โ‰ค (โ‹[ F ] S) โ‡’ (ฦŽ i ๊ž‰ index S , (U โ‰ค S [ i ]) holds) + where + open PosetNotation (poset-of F) using (_โ‰ค_) + +infix 5 way-below + +syntax way-below F U V = U โ‰ช[ F ] V + +\end{code}