Tom de Jong, 3 June 2024.
We consider the lifting of a proposition P as a locally small algebraic dcpo
which does not have a small basis unless the proposition P can be resized.
\begin{code}
{-# OPTIONS --safe --without-K --lossy-unification #-}
open import MLTT.Spartan
open import UF.FunExt
open import UF.PropTrunc
open import UF.Subsingletons
module DomainTheory.Examples.LiftingLargeProposition
(pt : propositional-truncations-exist)
(fe : Fun-Ext)
(pe : Prop-Ext)
(๐ฅ ๐ค : Universe)
(P : ๐ค ฬ )
(P-is-prop : is-prop P)
where
open PropositionalTruncation pt
open import UF.Equiv
open import UF.Sets
open import UF.Size hiding (is-locally-small)
open import UF.Subsingletons-FunExt
open import UF.Subsingletons-Properties
private
P-is-set : is-set P
P-is-set = props-are-sets (P-is-prop)
open import DomainTheory.Basics.Dcpo pt fe ๐ฅ
open import DomainTheory.Basics.Miscelanea pt fe ๐ฅ
open import DomainTheory.Basics.Pointed pt fe ๐ฅ
open import DomainTheory.Basics.SupComplete pt fe ๐ฅ
open import DomainTheory.Basics.WayBelow pt fe ๐ฅ
open import DomainTheory.BasesAndContinuity.Bases pt fe ๐ฅ
open import DomainTheory.BasesAndContinuity.Continuity pt fe ๐ฅ
open import DomainTheory.Lifting.LiftingSet pt fe ๐ฅ pe
open import DomainTheory.Lifting.LiftingSetAlgebraic pt pe fe ๐ฅ hiding (ฮบ)
open import Lifting.Construction ๐ฅ
open import Lifting.Miscelanea ๐ฅ
open import Lifting.Miscelanea-PropExt-FunExt ๐ฅ pe fe
open import Lifting.UnivalentWildCategory ๐ฅ P hiding (_โ_)
open import OrderedTypes.Poset
open PosetAxioms fe
\end{code}
The lifting of a set with respect to the propositions in a universe ๐ฅ always
produces a ๐ฅ-directed complete poset. Here, we obtain a ๐ฅ-dcpo with carrier in
๐ฅ โบ โ ๐ค where P : ๐ค.
\begin{code}
๐P : DCPOโฅ {๐ฅ โบ โ ๐ค} {๐ฅ โบ โ ๐ค}
๐P = ๐-DCPOโฅ {๐ค} {P} (props-are-sets P-is-prop)
\end{code}
Because P is a proposition, the order on ๐P is equivalent to the simpler partial
order defined below. This also shows that ๐P is locally small, despite P being
(potentially) large.
\begin{code}
private
_โ_ : โช ๐P โซ โ โช ๐P โซ โ ๐ฅ ฬ
(Q , _) โ (R , _) = Q โ R
โ-is-prop-valued : (Q R : โช ๐P โซ) โ is-prop (Q โ R)
โ-is-prop-valued Q (R , _ , i) = ฮ -is-prop fe (ฮป _ โ i)
โ-to-๐-โ : (Q R : โช ๐P โซ) โ (Q โ R โ Q โโช ๐P โซ R)
โ-to-๐-โ (Q , _ , i) (R , _ , j) l h =
to-subtype-๏ผ
(ฮป _ โ ร-is-prop (ฮ -is-prop fe (ฮป _ โ P-is-prop))
(being-prop-is-prop fe))
(pe i j l (ฮป r โ h))
๐-โ-to-โ : (Q R : โช ๐P โซ) โ (Q โโช ๐P โซ R โ Q โ R)
๐-โ-to-โ Q R l = def-pr Q R (โ'-to-โ l)
๐P-is-locally-small : is-locally-small (๐P โป)
๐P-is-locally-small =
record
{ _โโ_ = _โ_ ;
โโ-โ-โ = ฮป {Q} {R} โ logically-equivalent-props-are-equivalent
(โ-is-prop-valued Q R)
(prop-valuedness (๐P โป) Q R)
(โ-to-๐-โ Q R)
(๐-โ-to-โ Q R)
}
\end{code}
We now work towards showing that ๐P is algebraic. The idea is that an element
Q : ๐P is the supremum of the directed family
๐ + Q โ ๐P
* โฆ ๐
q โฆ ๐
whose elements are compact.
\begin{code}
private
module _
(โ@(Q , Q-implies-P , Q-is-prop) : โช ๐P โซ)
where
family : Q โ โช ๐P โซ
family q = ๐ , (ฮป _ โ Q-implies-P q) , ๐-is-prop
family-members-are-compact : (q : Q) โ is-compact (๐P โป) (family q)
family-members-are-compact q I ฮฑ ฮด l = โฅโฅ-functor โฆ
2โฆ โฆ
1โฆ
where
โฆ
1โฆ : โ i ๊ I , is-defined (ฮฑ i)
โฆ
1โฆ = ๏ผ-to-is-defined (l โ) โ
โฆ
2โฆ : (ฮฃ i ๊ I , is-defined (ฮฑ i))
โ ฮฃ i ๊ I , family q โโช ๐P โซ ฮฑ i
โฆ
2โฆ (i , d) = i , ๏ผ-to-โ (๐P โป) (family q ๏ผโจ l โ โฉ
โ (๐P โป) ฮด ๏ผโจ e โปยน โฉ
ฮฑ i โ)
where
e = family-defined-somewhere-sup-๏ผ P-is-set ฮด i d
upperbound-of-family : is-upperbound _โ_ โ family
upperbound-of-family q _ = q
lowerbound-of-upperbounds-of-family : is-lowerbound-of-upperbounds _โ_ โ family
lowerbound-of-upperbounds-of-family R R-is-ub q = R-is-ub q โ
family-is-sup : is-sup _โ_ โ family
family-is-sup = upperbound-of-family , lowerbound-of-upperbounds-of-family
family-is-sup' : is-sup (underlying-order (๐P โป)) โ family
family-is-sup' = (ฮป q โ โ-to-๐-โ (family q) โ (upperbound-of-family q)) ,
(ฮป โ โ-is-ub โ โ-to-๐-โ โ โ
(lowerbound-of-upperbounds-of-family โ
(ฮป q โ ๐-โ-to-โ (family q) โ (โ-is-ub q))))
โหขหข-๏ผ : โหขหข ๐P family Q-is-prop ๏ผ โ
โหขหข-๏ผ = sups-are-unique (underlying-order (๐P โป))
(poset-axioms-of-dcpo (๐P โป))
family
(โหขหข-is-sup ๐P family Q-is-prop)
family-is-sup'
๐P-is-algebraic' : structurally-algebraic (๐P โป)
๐P-is-algebraic' =
record
{ index-of-compact-family = ฮป (Q , _) โ ๐ + Q
; compact-family = ฮป Q โ add-โฅ ๐P (family Q)
; compact-family-is-directed = ฮด
; compact-family-is-compact = ฮบ
; compact-family-โ-๏ผ = โหขหข-๏ผ
}
where
ฮบ : (Q : โช ๐P โซ) (i : ๐ + is-defined Q)
โ is-compact (๐P โป) (add-โฅ ๐P (family Q) i)
ฮบ Q (inl _) = โฅ-is-compact ๐P
ฮบ Q (inr q) = family-members-are-compact Q q
ฮด : (Q : โจ ๐P โป โฉ) โ is-Directed (๐P โป) (add-โฅ ๐P (family Q))
ฮด Q = add-โฅ-is-directed ๐P
(subsingleton-indexed-is-semidirected (๐P โป)
(family Q)
(being-defined-is-prop Q))
๐P-is-algebraic : is-algebraic-dcpo (๐P โป)
๐P-is-algebraic = โฃ ๐P-is-algebraic' โฃ
\end{code}
Since P is a proposition, the lifting of P is not just a dcpo but actually a
sup-lattice. However, it has a greatest element if and only if P is ๐ฅ small.
\begin{code}
๐P-is-sup-complete : is-sup-complete (๐P โป)
๐P-is-sup-complete = lifting-of-prop-is-sup-complete P-is-prop
greatest-element-gives-resizing : (โค : โช ๐P โซ)
โ is-greatest _โ_ โค
โ P is ๐ฅ small
greatest-element-gives-resizing (Q , Q-implies-P , Q-is-prop) grt = Q , e
where
e : Q โ P
e = logically-equivalent-props-are-equivalent
Q-is-prop
P-is-prop
Q-implies-P
(ฮป p โ grt (๐ , (ฮป _ โ p) , ๐-is-prop) โ)
resizing-gives-greatest-element : P is ๐ฅ small
โ ฮฃ โค ๊ โช ๐P โซ , is-greatest _โ_ โค
resizing-gives-greatest-element (Pโ , e) = โโ , โโ-is-greatest
where
โโ : โช ๐P โซ
โโ = Pโ , โ e โ , equiv-to-prop e P-is-prop
โโ-is-greatest : is-greatest _โ_ โโ
โโ-is-greatest (Q , Q-implies-P , Q-is-prop) q = โ e โโปยน (Q-implies-P q)
\end{code}
Since ๐P is sup-complete, taking the sup of all elements of a small basis would
produce a greatest element and hence result in the resizing of P.
\begin{code}
๐P-has-unspecified-small-basis-resizes : has-unspecified-small-basis (๐P โป)
โ P is ๐ฅ small
๐P-has-unspecified-small-basis-resizes scb =
greatest-element-gives-resizing โค โค-is-greatest
where
grt : ฮฃ โค ๊ โช ๐P โซ , ((Q : โช ๐P โซ) โ Q โโช ๐P โซ โค)
grt = greatest-element-if-sup-complete-with-small-basis
(๐P โป) ๐P-is-sup-complete scb
โค : โช ๐P โซ
โค = prโ grt
โค-is-greatest : (Q : โช ๐P โซ) โ Q โ โค
โค-is-greatest Q = ๐-โ-to-โ Q โค (prโ grt Q)
๐P-has-unspecified-small-compact-basis-resizes :
has-unspecified-small-compact-basis (๐P โป)
โ P is ๐ฅ small
๐P-has-unspecified-small-compact-basis-resizes h =
๐P-has-unspecified-small-basis-resizes
(โฅโฅ-functor (ฮป (B , ฮฒ , scb) โ B , ฮฒ , compact-basis-is-basis _ ฮฒ scb) h)
\end{code}
Conversely, if P is ๐ฅ small, then ๐P has a small compact basis.
This is because ๐ X always has a small compact basis when X : ๐ฅ. Therefore, if
P โ Pโ with Pโ : ๐ฅ, then we can use the induced isomorphism of dcpos between ๐ P
and ๐ Pโ to equip ๐ P with a small compact basis.
\begin{code}
resizing-gives-small-compact-basis : P is ๐ฅ small
โ has-specified-small-compact-basis (๐P โป)
resizing-gives-small-compact-basis (Pโ , e) =
small-compact-basis-from-โแตแถแตแต pe
(๐-DCPO Pโ-is-set) (๐P โป)
(๐ฬ-โแตแถแตแต Pโ-is-set P-is-set e)
scb
where
Pโ-is-set : is-set Pโ
Pโ-is-set = props-are-sets (equiv-to-prop e P-is-prop)
scb : has-specified-small-compact-basis (๐-DCPO Pโ-is-set)
scb = ๐-has-specified-small-compact-basis Pโ-is-set
\end{code}