Simcha van Collem, 12th October 2023
For a locally small dcpo π, whose carrier type lives in π₯, we can construct
continuous and algebraic structures from their respective properties. We do this
by making a canonical choice for the approximating and compact families:
the approximating family at x consists of all elements way below x, and the
compact family at x consists of all compact elements ordered below x. Their
index types live in π₯, as we assumed the carrier type of π to live in π₯ and π is
locally small.
To prove the required properties for these families, we can access the
unspecified continuous/algebraic structure, as we are proving a proposition.
\begin{code}
{-# OPTIONS --safe --without-K #-}
open import MLTT.Spartan hiding (J)
open import UF.FunExt
open import UF.PropTrunc
module DomainTheory.BasesAndContinuity.ContinuityImpredicative
(pt : propositional-truncations-exist)
(fe : Fun-Ext)
(π₯ : Universe)
where
open PropositionalTruncation pt
open import UF.Equiv
open import UF.Size hiding (is-locally-small; is-small)
open import UF.Subsingletons
open import DomainTheory.Basics.Dcpo pt fe π₯
open import DomainTheory.Basics.Miscelanea pt fe π₯
open import DomainTheory.Basics.WayBelow pt fe π₯
open import DomainTheory.BasesAndContinuity.Continuity pt fe π₯
module _
(pe : Prop-Ext)
(π : DCPO {π₯} {π£})
(ls : is-locally-small π)
where
structurally-continuous-if-continuous : is-continuous-dcpo π
β structurally-continuous π
structurally-continuous-if-continuous c =
record
{ index-of-approximating-family = index
; approximating-family = family
; approximating-family-is-directed = family-is-directed
; approximating-family-is-way-below = family-is-way-below
; approximating-family-β-οΌ = family-β-οΌ
}
where
_βͺβ_ : β¨ π β© β β¨ π β© β π₯ Μ
x βͺβ y = resized (x βͺβ¨ π β© y) (βͺ-is-small-valued pe π c ls x y)
βͺβ-β-βͺ : {x y : β¨ π β©} β x βͺβ y β x βͺβ¨ π β© y
βͺβ-β-βͺ = resizing-condition (βͺ-is-small-valued pe π c ls _ _)
βͺβ-to-βͺ : {x y : β¨ π β©} β x βͺβ y β x βͺβ¨ π β© y
βͺβ-to-βͺ = β βͺβ-β-βͺ β
βͺ-to-βͺβ : {x y : β¨ π β©} β x βͺβ¨ π β© y β x βͺβ y
βͺ-to-βͺβ = β βͺβ-β-βͺ ββ»ΒΉ
index : β¨ π β© β π₯ Μ
index x = Ξ£ y κ β¨ π β© , y βͺβ x
make-index : {x : β¨ π β©} (y : β¨ π β©) β y βͺβ¨ π β© x β index x
make-index {x} y yβͺx = y , βͺ-to-βͺβ yβͺx
family : (x : β¨ π β©) β index x β β¨ π β©
family x = prβ
family-is-directed : (x : β¨ π β©) β is-Directed π (family x)
family-is-directed x = β₯β₯-rec (being-directed-is-prop _ (family x)) Ξ³ c
where
Ξ³ : structurally-continuous π β is-Directed π (family x)
Ξ³ sc = family-is-inhabited , family-is-semidirected
where
open structurally-continuous sc
approximating-family-index-to-index : (i : index-of-approximating-family x)
β index x
approximating-family-index-to-index i =
make-index (approximating-family x i)
(approximating-family-is-way-below x i)
family-is-inhabited : β₯ index x β₯
family-is-inhabited =
β₯β₯-functor
approximating-family-index-to-index
(inhabited-if-Directed π _ (approximating-family-is-directed x))
family-is-semidirected : is-Semidirected π (family x)
family-is-semidirected (yβ , yββͺβx) (yβ , yββͺβx) =
β₯β₯-recβ β-is-prop f h1 h2
where
f : Ξ£ i κ index-of-approximating-family x , yβ ββ¨ π β© approximating-family x i
β Ξ£ j κ index-of-approximating-family x , yβ ββ¨ π β© approximating-family x j
β β k κ index x , yβ ββ¨ π β© family x k Γ
yβ ββ¨ π β© family x k
f (i , yββΞ±α΅’) (j , yββΞ±β±Ό) =
β₯β₯-functor g (semidirected-if-Directed π _ (approximating-family-is-directed x) i j)
where
g : Ξ£ k κ index-of-approximating-family x ,
approximating-family x i ββ¨ π β© approximating-family x k Γ
approximating-family x j ββ¨ π β© approximating-family x k
β Ξ£ k κ index x ,
yβ ββ¨ π β© family x k Γ
yβ ββ¨ π β© family x k
g (k , Ξ±α΅’βΞ±β , Ξ±β±ΌβΞ±β) =
approximating-family-index-to-index k ,
transitivity π _ _ _ yββΞ±α΅’ Ξ±α΅’βΞ±β ,
transitivity π _ _ _ yββΞ±β±Ό Ξ±β±ΌβΞ±β
h1 : β i κ index-of-approximating-family x , yβ ββ¨ π β© approximating-family x i
h1 = (βͺβ-to-βͺ yββͺβx) _ _ (approximating-family-is-directed x)
(approximating-family-β-β x)
h2 : β i κ index-of-approximating-family x , yβ ββ¨ π β© approximating-family x i
h2 = (βͺβ-to-βͺ yββͺβx) _ _ (approximating-family-is-directed x)
(approximating-family-β-β x)
family-is-way-below : (x : β¨ π β©) β is-way-upperbound π x (family x)
family-is-way-below x (y , yβͺβx) = βͺβ-to-βͺ yβͺβx
family-β-οΌ : (x : β¨ π β©) β β π (family-is-directed x) οΌ x
family-β-οΌ x = β₯β₯-rec (sethood π) Ξ³ c
where
Ξ³ : structurally-continuous π β β π (family-is-directed x) οΌ x
Ξ³ sc = antisymmetry π _ _
(β-is-lowerbound-of-upperbounds π _ _
Ξ» (y , yβͺβx) β βͺ-to-β π (βͺβ-to-βͺ yβͺβx))
(x ββ¨ π β©[ β¦
1β¦ ]
β π (approximating-family-is-directed x) ββ¨ π β©[ β¦
2β¦ ]
β π (family-is-directed x) ββ¨ π β©)
where
open structurally-continuous sc
β¦
1β¦ = approximating-family-β-β x
β¦
2β¦ : β π (approximating-family-is-directed x) ββ¨ π β© β π (family-is-directed x)
β¦
2β¦ = β-is-lowerbound-of-upperbounds π _ _
Ξ» i β β-is-upperbound π (family-is-directed x)
(make-index
(approximating-family x i)
(approximating-family-is-way-below x i))
structurally-algebraic-if-algebraic : is-algebraic-dcpo π
β structurally-algebraic π
structurally-algebraic-if-algebraic a =
record
{ index-of-compact-family = index
; compact-family = family
; compact-family-is-directed = family-is-directed
; compact-family-is-compact = family-is-compact
; compact-family-β-οΌ = family-β-οΌ
}
where
open is-locally-small ls
_βͺβ_ : β¨ π β© β β¨ π β© β π₯ Μ
x βͺβ y = resized (x βͺβ¨ π β© y)
(βͺ-is-small-valued pe π
(is-continuous-dcpo-if-algebraic-dcpo π a) ls x y)
βͺβ-β-βͺ : {x y : β¨ π β©} β x βͺβ y β x βͺβ¨ π β© y
βͺβ-β-βͺ = resizing-condition
(βͺ-is-small-valued pe π
(is-continuous-dcpo-if-algebraic-dcpo π a) ls _ _)
βͺβ-to-βͺ : {x y : β¨ π β©} β x βͺβ y β x βͺβ¨ π β© y
βͺβ-to-βͺ = β βͺβ-β-βͺ β
βͺ-to-βͺβ : {x y : β¨ π β©} β x βͺβ¨ π β© y β x βͺβ y
βͺ-to-βͺβ = β βͺβ-β-βͺ ββ»ΒΉ
index : β¨ π β© β π₯ Μ
index x = Ξ£ y κ β¨ π β© , (y βͺβ y) Γ (y ββ x)
make-index : {x : β¨ π β©} β (y : β¨ π β©) β is-compact π y β y ββ¨ π β© x β index x
make-index y yβͺy yβx = y , βͺ-to-βͺβ yβͺy , β-to-ββ yβx
family : (x : β¨ π β©) β index x β β¨ π β©
family x = prβ
family-is-directed : (x : β¨ π β©) β is-Directed π (family x)
family-is-directed x = β₯β₯-rec (being-directed-is-prop _ (family x)) Ξ³ a
where
Ξ³ : structurally-algebraic π β is-Directed π (family x)
Ξ³ sa = family-is-inhabited , family-is-semidirected
where
open structurally-algebraic sa
compact-family-index-to-index : (i : index-of-compact-family x)
β index x
compact-family-index-to-index i =
make-index
(compact-family x i)
(compact-family-is-compact x i)
(compact-family-is-upperbound x i)
where
β¦
1β¦ = β-is-upperbound π (compact-family-is-directed x) i
β¦
2β¦ = οΌ-to-β π (compact-family-β-οΌ x)
family-is-inhabited : β₯ index x β₯
family-is-inhabited =
β₯β₯-functor
compact-family-index-to-index
(inhabited-if-Directed π _ (compact-family-is-directed x))
family-is-semidirected : is-Semidirected π (family x)
family-is-semidirected (yβ , yββͺβyβ , yβββx) (yβ , yββͺβyβ , yβββx) =
β₯β₯-recβ β-is-prop f h1 h2
where
f : Ξ£ i κ index-of-compact-family x , yβ ββ¨ π β© compact-family x i
β Ξ£ j κ index-of-compact-family x , yβ ββ¨ π β© compact-family x j
β β k κ index x , yβ ββ¨ π β© family x k Γ
yβ ββ¨ π β© family x k
f (i , yββΞ±α΅’) (j , yββΞ±β±Ό) =
β₯β₯-functor g (semidirected-if-Directed π _ (compact-family-is-directed x) i j)
where
g : Ξ£ k κ index-of-compact-family x ,
compact-family x i ββ¨ π β© compact-family x k Γ
compact-family x j ββ¨ π β© compact-family x k
β Ξ£ k κ index x ,
yβ ββ¨ π β© family x k Γ
yβ ββ¨ π β© family x k
g (k , Ξ±α΅’βΞ±β , Ξ±β±ΌβΞ±β) =
compact-family-index-to-index k ,
transitivity π _ _ _ yββΞ±α΅’ Ξ±α΅’βΞ±β ,
transitivity π _ _ _ yββΞ±β±Ό Ξ±β±ΌβΞ±β
h1 : β i κ index-of-compact-family x , yβ ββ¨ π β© compact-family x i
h1 = βͺ-β-to-βͺ π (βͺβ-to-βͺ yββͺβyβ) (ββ-to-β yβββx) _ _ _
(οΌ-to-β π (compact-family-β-οΌ x))
h2 : β j κ index-of-compact-family x , yβ ββ¨ π β© compact-family x j
h2 = βͺ-β-to-βͺ π (βͺβ-to-βͺ yββͺβyβ) (ββ-to-β yβββx) _ _ _
(οΌ-to-β π (compact-family-β-οΌ x))
family-is-compact : (x : β¨ π β©) (i : index x) β is-compact π (family x i)
family-is-compact x (y , yβͺβy , yββx) = βͺβ-to-βͺ yβͺβy
family-β-οΌ : (x : β¨ π β©) β β π (family-is-directed x) οΌ x
family-β-οΌ x = β₯β₯-rec (sethood π) Ξ³ a
where
Ξ³ : structurally-algebraic π β β π (family-is-directed x) οΌ x
Ξ³ sa = antisymmetry π _ _
(β-is-lowerbound-of-upperbounds π _ _
Ξ» (y , yβͺβy , yββx) β ββ-to-β yββx)
(x ββ¨ π β©[ β¦
1β¦ ]
β π (compact-family-is-directed x) ββ¨ π β©[ β¦
2β¦ ]
β π (family-is-directed x) ββ¨ π β©)
where
open structurally-algebraic sa
β¦
1β¦ = οΌ-to-β π (compact-family-β-οΌ x)
β¦
2β¦ : β π (compact-family-is-directed x) ββ¨ π β© β π (family-is-directed x)
β¦
2β¦ = β-is-lowerbound-of-upperbounds π _ _ g
where
g : (i : index-of-compact-family x)
β compact-family x i ββ¨ π β© β π (family-is-directed x)
g i = β-is-upperbound π (family-is-directed x)
(make-index
(compact-family x i)
(compact-family-is-compact x i)
(compact-family-is-upperbound x i))
\end{code}