--- title: Properties of the locale of spectra author: Ayberk Tosun date-started: 2024-03-01 dates-updated: [2024-03-27, 2024-04-08, 2024-04-09, 2024-06-05] --- We define the spectrum locale over a distributive lattice `L`, the defining frame of which is the frame of ideals over `L`. \begin{code} {-# OPTIONS --safe --without-K #-} open import UF.PropTrunc open import UF.FunExt open import UF.Subsingletons open import UF.Size module Locales.DistributiveLattice.Spectrum-Properties (fe : Fun-Ext) (pe : Prop-Ext) (pt : propositional-truncations-exist) (sr : Set-Replacement pt) where open import Locales.Compactness.Definition pt fe open import Locales.DistributiveLattice.Definition fe pt open import Locales.DistributiveLattice.Ideal pt fe pe open import Locales.DistributiveLattice.Ideal-Properties pt fe pe open import Locales.DistributiveLattice.Properties fe pt open import Locales.DistributiveLattice.Spectrum fe pe pt open import Locales.Frame pt fe open import Locales.SmallBasis pt fe sr open import Locales.Spectrality.SpectralLocale pt fe open import MLTT.List hiding ([_]) open import MLTT.Spartan open import Slice.Family open import UF.Classifiers open import UF.Equiv renaming (_β to _πππ) open import UF.ImageAndSurjection pt open import UF.Logic open import UF.Powerset-MultiUniverse hiding (π) open import UF.SubtypeClassifier open AllCombinators pt fe renaming (_β§_ to _β§β_; _β¨_ to _β¨β_) open Locale open PropositionalSubsetInclusionNotation fe open PropositionalTruncation pt hiding (_β¨_) \end{code} We work with a fixed distributive π€-lattice `L` in this module. \begin{code} module Spectrality (L : DistributiveLattice π€) where open DefnOfFrameOfIdeal L open DistributiveLattice L renaming (X-is-set to Ο) open IdealNotation L open IdealProperties L \end{code} We abbreviate the `spectrum` of `L` to `spec-L`. \begin{code} private spec-L : Locale (π€ βΊ) π€ π€ spec-L = spectrum \end{code} The locale `spec-L` is a compact locale. \begin{code} spectrum-is-compact : is-compact spec-L holds spectrum-is-compact S Ξ΄ p = β₯β₯-rec β-is-prop β (p π (πα΅-is-top L π)) where β : Ξ£ xs κ List X , xs β S Γ (π οΌ join-listα΅ L xs) β β i κ index S , (π[ πͺ spec-L ] βα΅’ (S [ i ])) holds β (xs , c , r) = β₯β₯-rec β-is-prop β‘ (finite-subcover S xs Ξ΄ c) where β‘ : Ξ£ k κ index S , join-listα΅ L xs ββ± (S [ k ]) β β i κ index S , (π[ πͺ spec-L ] βα΅’ (S [ i ])) holds β‘ (k , p) = β£ k , contains-π-implies-above-π (S [ k ]) ΞΌ β£ where ΞΌ : π ββ± (S [ k ]) ΞΌ = transport (Ξ» - β - ββ± (S [ k ])) (r β»ΒΉ) p \end{code} Added on 2024-03-13. Every ideal `I` is the join of its principal ideals. We call this join the _factorization_ of `I` into its join of principal ideals, and we denote by `factorization` the function implementing this. \begin{code} open PrincipalIdeals L open Joins _βα΅’_ factorization : Ideal L β Ideal L factorization I = β[ πͺ spec-L ] principal-ideals-of I ideal-equal-to-factorization : (I : Ideal L) β I οΌ factorization I ideal-equal-to-factorization I = β[ πͺ spec-L ]-unique (principal-ideals-of I) I (β , β‘) where β : (I is-an-upper-bound-of (principal-ideals-of I)) holds β = ideal-is-an-upper-bound-of-its-principal-ideals I β‘ : ((Iα΅€ , _) : upper-bound (principal-ideals-of I)) β I βα΅’ Iα΅€ holds β‘ (Iα΅€ , Ο ) = ideal-is-lowerbound-of-upperbounds-of-its-principal-ideals I Iα΅€ Ο \end{code} The family of principal ideals in an ideal is a directed family. \begin{code} factorization-is-directed : (I : Ideal L) β is-directed (πͺ spec-L) (principal-ideals-of I) holds factorization-is-directed = principal-ideals-of-ideal-form-a-directed-family \end{code} Added on 2024-03-27 For every `x : L`, the principal ideal `βx` is a compact open of the locale of spectra. \begin{code} principal-ideal-is-compact : (x : β£ L β£α΅) β is-compact-open spec-L (β x) holds principal-ideal-is-compact x S Ξ΄ p = β₯β₯-rec β-is-prop β ΞΌ where ΞΌ : x βα΅’ (β[ πͺ spec-L ] S) holds ΞΌ = p x (β€α΅-is-reflexive L x) β : Ξ£ xs κ List X , xs β S Γ (x οΌ join-listα΅ L xs) β β i κ index S , β x βα΅’ (S [ i ]) holds β (xs , q , rβ²) = β₯β₯-rec β-is-prop β‘ Ξ² where Ξ² : β i κ index S , join-listα΅ L xs βα΅’ (S [ i ]) holds Ξ² = finite-subcover S xs Ξ΄ q β‘ : Ξ£ i κ index S , join-listα΅ L xs βα΅’ (S [ i ]) holds β β i κ index S , β x βα΅’ (S [ i ]) holds β‘ (i , r) = β£ i , Ξ³ β£ where open Ideal (S [ i ]) renaming (I-is-downward-closed to Sα΅’-is-downward-closed) Ξ³ : (β x βα΅’ (S [ i ])) holds Ξ³ y Ο = Sα΅’-is-downward-closed y (join-listα΅ L xs) Ο΅ r where Ο΅ : (y β€α΅[ L ] join-listα΅ L xs) holds Ο΅ = transport (Ξ» - β (y β€α΅[ L ] -) holds) rβ² Ο \end{code} Added on 2024-06-05. \begin{code} ββ_ : β£ L β£α΅ β Ξ£ I κ Ideal L , (is-compact-open spec-L I holds) ββ_ x = β x , principal-ideal-is-compact x \end{code} End of addition. Added on 2024-03-13. Every ideal has a directed covering family consisting of compact opens. \begin{code} ideal-has-directed-cover-of-compact-opens : (I : Ideal L) β has-a-directed-cover-of-compact-opens spec-L I holds ideal-has-directed-cover-of-compact-opens I = β£ principal-ideals-of I , ΞΊ , Ξ΄ , eq β£ where ΞΊ : consists-of-compact-opens spec-L (principal-ideals-of I) holds ΞΊ (x , _) = principal-ideal-is-compact x Ξ΄ : is-directed (πͺ spec-L) (principal-ideals-of I) holds Ξ΄ = principal-ideals-of-ideal-form-a-directed-family I eq : I οΌ β[ πͺ spec-L ] principal-ideals-of I eq = ideal-equal-to-factorization I \end{code} Added on 2024-04-08. We have already proved that every principal ideal is compact. We now prove the converse of this: every compact ideal is the principal ideal on some element `x` of the distributive lattice `L`. \begin{code} compact-ideal-is-principal : (I : Ideal L) β is-compact-open spec-L I holds β β x κ β£ L β£α΅ , I οΌ principal-ideal x compact-ideal-is-principal I ΞΊ = β₯β₯-rec β-is-prop Ξ³ (ΞΊ (principal-ideals-of I) Ξ΄ cβ) where c : I οΌ factorization I c = ideal-equal-to-factorization I cβ : (I βα΅’ factorization I) holds cβ = reflexivity+ (poset-of (πͺ spec-L)) c cβ : (factorization I βα΅’ I) holds cβ = reflexivity+ (poset-of (πͺ spec-L)) (c β»ΒΉ) Ξ΄ : is-directed (πͺ spec-L) (principal-ideals-of I) holds Ξ΄ = factorization-is-directed I Ξ³ : (Ξ£ (x , _) κ index (principal-ideals-of I) , (I βα΅’ β x) holds) β β x κ β£ L β£α΅ , I οΌ β x Ξ³ ((x , p) , Ο) = β£ x , β€-is-antisymmetric (poset-of (πͺ spec-L)) qβ qβ β£ where open Ideal I using (I-is-downward-closed) qβ : I βα΅’ β x holds qβ = Ο qβ : β x βα΅’ I holds qβ y ΞΌ = I-is-downward-closed y x ΞΌ p \end{code} Added on 2024-04-08. The map `β(-) : L β Idl(L)` preserves meets. \begin{code} principal-ideal-preserves-meets : (x y : β£ L β£α΅) β β (x β§ y) οΌ β x β§[ πͺ spec-L ] β y principal-ideal-preserves-meets x y = β€-is-antisymmetric (poset-of (πͺ spec-L)) β β‘ where open PosetReasoning (poset-ofα΅ L) β : (β (x β§ y) βα΅’ (β x β§[ πͺ spec-L ] β y)) holds β z p = β β , β β where β β : (z β€α΅[ L ] x) holds β β = z β€β¨ p β© x β§ y β€β¨ β§-is-a-lower-boundβ L x y β© x β β β : (z β€α΅[ L ] y) holds β β = z β€β¨ p β© x β§ y β€β¨ β§-is-a-lower-boundβ L x y β© y β β‘ : ((β x β§[ πͺ spec-L ] β y) βα΅’ β (x β§ y)) holds β‘ = β§-is-greatest L x y \end{code} Added on 2024-06-05. This has probably been written down somewhere else before. \begin{code} principal-ideal-preserves-top : β π οΌ π[ πͺ spec-L ] principal-ideal-preserves-top = only-π-is-above-π (πͺ spec-L) (β π) (Ξ» _ β id) principal-ideal-preserves-bottom : β π οΌ π[ πͺ spec-L ] principal-ideal-preserves-bottom = only-π-is-below-π (πͺ spec-L) (β π) β where β : (β π β€[ poset-of (πͺ spec-L) ] π[ πͺ spectrum ]) holds β x ΞΌ = transport (Ξ» - β - ββ± π[ πͺ spectrum ]) (p β»ΒΉ) ideal-π-contains-π where open Ideal π[ πͺ spectrum ] renaming (I-contains-π to ideal-π-contains-π) p : x οΌ π p = only-π-is-below-πα΅ L x ΞΌ \end{code} End of addition Added on 2024-04-08. The binary meet of two compact ideals is compact. \begin{code} compacts-of-the-spectrum-are-closed-under-β§ : compacts-of-[ spec-L ]-are-closed-under-binary-meets holds compacts-of-the-spectrum-are-closed-under-β§ Kβ Kβ ΞΊβ ΞΊβ = ΞΊ where ΞΉβ : β xβ κ β£ L β£α΅ , Kβ οΌ β xβ ΞΉβ = compact-ideal-is-principal Kβ ΞΊβ ΞΉβ : β xβ κ β£ L β£α΅ , Kβ οΌ β xβ ΞΉβ = compact-ideal-is-principal Kβ ΞΊβ ΞΊ : is-compact-open spec-L (Kβ β§[ πͺ spec-L ] Kβ) holds ΞΊ = β₯β₯-recβ (holds-is-prop (is-compact-open spec-L (Kβ β§[ πͺ spec-L ] Kβ))) β ΞΉβ ΞΉβ where β : Ξ£ xβ κ β£ L β£α΅ , Kβ οΌ β xβ β Ξ£ xβ κ β£ L β£α΅ , Kβ οΌ β xβ β is-compact-open spec-L (Kβ β§[ πͺ spec-L ] Kβ) holds β (xβ , pβ) (xβ , pβ) = transport (Ξ» - β is-compact-open spec-L - holds) (q β»ΒΉ) β‘ where q : Kβ β§[ πͺ spec-L ] Kβ οΌ β (xβ β§ xβ) q = Kβ β§[ πͺ spec-L ] Kβ οΌβ¨ β β© β xβ β§[ πͺ spec-L ] Kβ οΌβ¨ β ‘ β© β xβ β§[ πͺ spec-L ] β xβ οΌβ¨ β ’ β© β (xβ β§ xβ) β where β = ap (Ξ» - β - β§[ πͺ spec-L ] Kβ) pβ β ‘ = ap (Ξ» - β β xβ β§[ πͺ spec-L ] -) pβ β ’ = principal-ideal-preserves-meets xβ xβ β»ΒΉ β‘ : is-compact-open spec-L (β (xβ β§ xβ)) holds β‘ = principal-ideal-is-compact (xβ β§ xβ) \end{code} Added on 2024-04-08. Finally, we package everything up into a proof that the spectrum locale is spectral. \begin{code} spec-L-is-spectral : is-spectral spec-L holds spec-L-is-spectral = (ΞΊ , Ξ½) , ideal-has-directed-cover-of-compact-opens where ΞΊ : is-compact spec-L holds ΞΊ = spectrum-is-compact Ξ½ : compacts-of-[ spec-L ]-are-closed-under-binary-meets holds Ξ½ = compacts-of-the-spectrum-are-closed-under-β§ \end{code} Everything after this line has been added on 2024-04-09. To show that the type of compact ideals is small, we directly construct the intensional specified basis for `Idl(L)` given by the family `β(-) : L β Idl(L)`. \begin{code} β¬-spec : Fam π€ β¨ πͺ spec-L β© β¬-spec = β£ L β£α΅ , principal-ideal open classifier-single-universe β¬-spec-is-directed-basis : directed-basis-forα΄° (πͺ spec-L) β¬-spec β¬-spec-is-directed-basis β = π π€ β£ L β£α΅ (_ββ± β) , β , πΉ where c : β οΌ β[ πͺ spec-L ] β β x β£ x Ξ΅ π π€ β£ L β£α΅ (_ββ± β) β c = ideal-equal-to-factorization β β : (β is-lub-of β β x β£ x Ξ΅ π π€ β£ L β£α΅ (_ββ± β) β) holds β = transport (Ξ» - β (- is-lub-of β β x β£ x Ξ΅ π π€ β£ L β£α΅ (_ββ± β) β) holds) (c β»ΒΉ) (β[ πͺ spec-L ]-upper _ , β[ πͺ spec-L ]-least _) πΉ : is-directed (πͺ spec-L) β β x β£ x Ξ΅ (π π€ β£ L β£α΅ (_ββ± β)) β holds πΉ = factorization-is-directed β β¬-spec-is-basis : basis-forα΄° (πͺ spec-L) β¬-spec β¬-spec-is-basis = directed-basis-is-basis (πͺ spec-L) β¬-spec β¬-spec-is-directed-basis \end{code} We denote by `π¦-fam` the family corresponding to the subset of compact opens. \begin{code} π¦-fam : Fam (π€ βΊ) β¨ πͺ spec-L β© π¦-fam = π (π€ βΊ) β¨ πͺ spec-L β© (_holds β is-compact-open spec-L) \end{code} We know that the image of `β(-) : L β Idl(L)` is equivalent to type of compact opens of `spec-L`. \begin{code} image-β-equiv-to-π¦ : image principal-ideal β π¦ spec-L image-β-equiv-to-π¦ = basic-iso-to-π¦ spec-L (β¬-spec , β¬-spec-is-directed-basis) principal-ideal-is-compact \end{code} We also know that the image of `β(-)` is a π€-small type. \begin{code} image-of-β-is-small : (image principal-ideal) is π€ small image-of-β-is-small = basic-is-small spec-L (β¬-spec , β¬-spec-is-directed-basis) Ξ³ where open PosetNotation (poset-of (πͺ spec-L)) Ξ³ : β¨ πͺ spec-L β© is-locally π€ small Ξ³ I J = (I β£ J) holds , s , (r , β ) , (r , β‘) where s : (I β£ J) holds β I οΌ J s (pβ , pβ) = β€-is-antisymmetric (poset-of (πͺ spec-L)) pβ pβ r : I οΌ J β (I β£ J) holds r p = transport (Ξ» - β (- β£ J) holds) (p β»ΒΉ) (β£-is-reflexive poset-of-ideals J) β : s β r βΌ id β p = carrier-of-[ poset-of-ideals ]-is-set (s (r p)) p β‘ : r β s βΌ id β‘ p = holds-is-prop (I β£ J) (r (s p)) p \end{code} We use the superscript `(-)β»` to denote the small copy of the type `image β(-)`. \begin{code} image-ββ» : π€ Μ image-ββ» = resized (image principal-ideal) image-of-β-is-small \end{code} From the previous two equivalences, we can conclude that the type of compact opens of `spec-L` is equivalent to `image-ββ»`. \begin{code} image-ββ»-equiv-to-π¦ : image-ββ» β π¦ spec-L image-ββ»-equiv-to-π¦ = image-ββ» ββ¨ β β© image principal-ideal ββ¨ β ‘ β© π¦ spec-L πππ where β = resizing-condition image-of-β-is-small β ‘ = image-β-equiv-to-π¦ \end{code} This means that `π¦(spec-L)` is π€-small. \begin{code} spec-L-has-small-π¦ : has-small-π¦ spec-L spec-L-has-small-π¦ = image-ββ» , image-ββ»-equiv-to-π¦ \end{code}