Domain Theory in Constructive and Predicative Univalent Foundations
DDomain Theory in Constructive and PredicativeUnivalent Foundations
Tom de Jong
University of Birmingham, United Kingdom [email protected]
Martín Hötzel Escardó
University of Birmingham, United Kingdom [email protected]
Abstract
We develop domain theory in constructive univalent foundations without Voevodsky’s resizingaxioms. In previous work in this direction, we constructed the Scott model of PCF and provedits computational adequacy, based on directed complete posets (dcpos). Here we further consideralgebraic and continuous dcpos, and construct Scott’s D ∞ model of the untyped λ -calculus. Acommon approach to deal with size issues in a predicative foundation is to work with informationsystems or abstract bases or formal topologies rather than dcpos, and approximable relations ratherthan Scott continuous functions. Here we instead accept that dcpos may be large and work withtype universes to account for this. For instance, in the Scott model of PCF, the dcpos have carriersin the second universe U and suprema of directed families with indexing type in the first universe U .Seeing a poset as a category in the usual way, we can say that these dcpos are large, but locally small,and have small filtered colimits. In the case of algebraic dcpos, in order to deal with size issues, weproceed mimicking the definition of accessible category. With such a definition, our construction ofScott’s D ∞ again gives a large, locally small, algebraic dcpo with small directed suprema. Theory of computation → Constructive mathematics; Theory ofcomputation → Type theory
Keywords and phrases domain theory, constructivity, predicativity, univalent foundations
Related Version
A shorter version of this paper will appear in the proceedings of , volume 183 of
LIPIcs . In domain theory [1] one considers posets with suitable completeness properties, possiblygenerated by certain elements called compact , or more generally generated by a certain way-below relation, giving rise to algebraic and continuous domains. As is well known,domain theory has applications to programming language semantics [42, 40, 33], higher-typecomputability [27], topology, topological algebra and more [19, 18].In this work we explore the development of domain theory from the univalent point ofview [46, 49]. This means that we work with the stratification of types as singletons, proposi-tions, sets, 1-groupoids, etc., and that we work with univalence. At present, higher inductivetypes other than propositional truncation are not needed. Often the only consequences ofunivalence needed here are functional and propositional extensionality. An exception is thefundamental notion has size : if we want to know that it is a proposition, then univalence isnecessary, but this knowledge is not needed for our purposes (Section 3). Full details of ourunivalent type theory are given in Section 2.Additionally, we work constructively (we don’t assume excluded middle or choice axioms)and predicatively (we don’t assume Voevodky’s resizing principles [47, 48, 49], and so, in a r X i v : . [ m a t h . L O ] O c t Domain Theory in Constructive and Predicative UF particular, powersets are large). Most of the work presented here has been formalized in theproof assistant Agda [7, 17, 12] (see Section 7 for details). In our predicative setting, it isextremely important to check universe levels carefully, and the use of a proof assistant suchas Agda has been invaluable for this purpose.In previous work in this direction [10] (extended by Brendan Hart [20]), we constructedthe Scott model of PCF and proved its computational adequacy, based on directed completeposets (dcpos). Here we further consider algebraic and continuous dcpos, and constructScott’s D ∞ model of the untyped λ -calculus [40].A common approach to deal with size issues in a predicative foundation is to work with information systems [41], abstract bases [1] or formal topologies [38, 9] rather than dcpos,and approximable relations rather than (Scott) continuous functions. Here we instead acceptthat dcpos may be large and work with type universes to account for this. For instance, inour development of the Scott model of PCF [42, 33], the dcpos have carriers in the seconduniverse U and suprema of directed families with indexing type in the first universe U .Seeing a poset as a category in the usual way, we can say that these dcpos are large, butlocally small, and have small filtered colimits. In the case of algebraic dcpos, in order to dealwith size issues, we proceed mimicking the definition of accessible category [29]. With such adefinition, our construction of Scott’s D ∞ again gives a large, locally small, algebraic dcpowith small directed suprema. Organization
Section 2 : Foundations.
Section 3 : (Im)predicativity.
Section 4 : Basic domain theory,including directed complete posets, continuous functions, lifting, Ω-completeness, exponentials,powersets as dcpos.
Section 5 : Limit and colimits of dcpos, Scott’s D ∞ . Section 6 : Way-below relation, bases, compact element, continuous and algebraic dcpos, ideal completion,retracts, examples.
Section 7 : Conclusion and future work.
Related Work
Domain theory has been studied predicatively in the setting of formal topology [38, 9] in[39, 30, 31, 28] and the more recent categorical paper [24]. In this predicative setting, oneavoids size issues by working with abstract bases or formal topologies rather than dcpos, andapproximable relations rather than Scott continuous functions. Hedberg [21] presented theseideas in Martin-Löf Type Theory and formalized them in the proof assistant ALF. A modernformalization in Agda based on Hedberg’s work was recently carried out in Lidell’s masterthesis [26].Our development differs from the above line of work in that it studies dcpos directly anduses type universes to account for the fact that dcpos may be large. There are two Coqformalizations of domain theory in this direction [5, 13]. Both formalizations study ω -chaincomplete preorders, work with setoids, and make use of Coq’s impredicative sort Prop . Ourdevelopment avoids the use of setoids thanks to the adoption of the univalent point of view.Moreover, we work predicatively and we work with directed sets rather than ω -chains, as weintend our theory to be also applicable to topology and algebra [19, 18].There are also constructive accounts of domain theory aimed at program extraction[4, 32]. Both [4] and [32] study ω -chain complete posets ( ω -cpos) and define notions of ω -continuity for them. Interestingly, Bauer and Kavkler [4] note that there can only benon-trivial examples of ω -continuous ω -cpos when Markov’s Principle holds [4, Proposition6.2]. This leads the authors of [32] to weaken the definition of ω -continuous ω -cpo by using . de Jong and M. H. Escardó 3 the double negation of existential quantification in the definition of the way-below relation[32, Remark 3.2]. In light of this, it is interesting to observe that when we study directedcomplete posets (dcpos) rather than ω -cpos, and continuous dcpos rather than ω -continuous ω -cpos, we can avoid Markov’s Principle or a weakened notion of the way-below relation toobtain non-trivial continuous dcpos (see for instance Examples 58, 59 and 82).Another approach is the field of synthetic domain theory [37, 36, 22, 34, 35]. Althoughthe work in this area is constructive, it is still impredicative, based on topos logic, but moreimportantly it has a focus different from that of regular domain theory: the aim is to isolatea few basic axioms and find models in (realizability) toposes where “every object is a domainand every morphism is continuous”. These models often validate additional axioms, suchas Markov’s Principle and countable choice, and moreover falsify excluded middle. Ourdevelopment has a different goal, namely to develop regular domain theory constructivelyand predicatively, but in a foundation compatible with excluded middle and choice, whilenot relying on them or Markov’s Principle or countable choice. We work in intensional Martin-Löf Type Theory with type formers + (binary sum), Π (depend-ent products), Σ (dependent sum), Id (identity type), and inductive types, including (emptytype), (type with exactly one element ? : ), N (natural numbers). Moreover, we havetype universes (for which we typically write U , V , W or T ) with the following closureconditions. We assume a universe U and two operations: for every universe U a successoruniverse U + with U : U + , and for every two universes U and V another universe U t V such that for any universe U , we have U t U ≡ U and U t U + ≡ U + . Moreover, ( − ) t ( − )is idempotent, commutative, associative, and ( − ) + distributes over ( − ) t ( − ). We write U : ≡ U +0 , U : ≡ U +1 , . . . and so on. If X : U and Y : V , then X + Y : U t V and if X : U and Y : X → V , then the types Σ x : X Y ( x ) and Π x : X Y ( x ) live in the universe U t V ; finally,if X : U and x, y : X , then Id X ( x, y ) : U . The type of natural numbers N is assumed to be in U and we postulate that we have copies U and U in every universe U . All our examplesgo through with just two universes U and U , but the theory is more easily developed in ageneral setting.In general we adopt the same conventions of [46]. In particular, we simply write x = y for the identity type Id X ( x, y ) and use ≡ for the judgemental equality, and for dependentfunctions f, g : Π x : X A ( x ), we write f ∼ g for the pointwise equality Π x : X f ( x ) = g ( x ).Within this type theory, we adopt the univalent point of view [46]. A type X is a proposition (or truth value or subsingleton ) if it has at most one element, i.e. the type is-prop ( X ) : ≡ Q x,y : X x = y is inhabited. A major difference between univalent foundationsand other foundational systems is that we prove that types are propositions or properties.For instance, we can show (using function extensionality) that the axioms of directed completeposet form a proposition. A type X is a set if any two elements can be identified in at mostone way, i.e. the type Q x,y : X is-prop ( x = y ) is inhabited.We will assume two extensionality principles: (i) Propositional extensionality : if P and Q are two propositions, then we postulate that P = Q exactly when both P → Q and Q → P are inhabited. (ii) Function extensionality : if f, g : Q x : X A ( x ) are two (dependent) functions, then wepostulate that f = g exactly when f ∼ g .Function extensionality has the important consequence that the propositions form an ex-ponential ideal, i.e. if X is a type and Y : X → U is such that every Y ( x ) is a proposition, Domain Theory in Constructive and Predicative UF then so is Π x : X Y ( x ). In light of this, universal quantification is given by Π-types in ourtype theory.In Martin-Löf Type Theory, an element of Q x : X P y : Y φ ( x, y ), by definition, gives us afunction f : X → Y such that Q x : X φ ( x, f ( x )). In some cases, we wish to express the weaker“for every x : X , there exists some y : Y such that φ ( x, y )” without necessarily having anassignment of x ’s to y ’s. A good example of this is when we define directed families later(see Definition 7). This is achieved through the propositional truncation.Given a type X : U , we postulate that we have a proposition k X k : U with a function |−| : X → k X k such that for every proposition P : V in any universe V , every function f : X → P factors (necessarily uniquely, by function extensionality) through |−| . Diagram-matically, X P k X k |−| f Existential quantification ∃ x : X Y ( x ) is given by k Σ x : X Y ( x ) k . One should note that if wehave ∃ x : X Y ( x ) and we are trying to prove some proposition P , then we may assume that wehave x : X and y : Y ( x ) when constructing our inhabitant of P . Similarly, we can definedisjunction as P ∨ Q : ≡ k P + Q k . We now explain what we mean by (im)predicativity in univalent foundations. (cid:73)
Definition 1 (Has size, has-size in [16]) . A type X : U is said to have size V for someuniverse V when we have Y : V that is equivalent to X , i.e. X has-size V : ≡ P Y : V Y ’ X . Here, the symbol ’ refers to Voevodsky’s notion of equivalence [16, 46]. Notice that the type X has-size V is a proposition if and only if the univalence axiom holds [16]. (cid:73) Definition 2 (Type of propositions Ω U ) . The type of propositions in a universe U is Ω U : ≡ P P : U is-prop ( P ) : U + . Observe that Ω U itself lives in the successor universe U + . We often think of the typesin some fixed universe U as small and accordingly we say that Ω U is large . Similarly, thepowerset of a type X : U is large. Given our predicative setup, we must pay attention touniverses when considering powersets. (cid:73) Definition 3 ( V -powerset P V ( X ) , V -subsets) . Let V be a universe and X : U type. We definethe V -powerset P V ( X ) as X → Ω V : V + t U . Its elements are called V -subsets of X . (cid:73) Definition 4 ( ∈ , ⊆ ) . Let x be an element of a type X and let A be an element of P V ( X ) .We write x ∈ A for the type pr ( A ( x )) . The first projection pr is needed because A ( x ) ,being of type Ω V , is a pair. Given two V -subsets A and B of X , we write A ⊆ B for Q x : X ( x ∈ A → x ∈ B ) . Functional and propositional extensionality imply that A = B ⇐⇒ A ⊆ B and B ⊆ A . (cid:73) Definition 5 (Total type T ( A ) ) . Given a V -subset A of a type X , we write T ( A ) for the total type P x : X x ∈ A . . de Jong and M. H. Escardó 5 One could ask for a resizing axiom asserting that Ω U has size U , which we call thepropositional impredicativity of U . A closely related axiom is propositional resizing , whichasserts that every proposition P : U + has size U . Without the addition of such resizingaxioms, the type theory is said to be predicative . As an example of the use of impredicativityin mathematics, we mention that the powerset has unions of arbitrary subsets if and only ifpropositional resizing holds [16, existence-of-unions-gives-PR ].We mention that the resizing axioms are actually theorems when classical logic is assumed.This is because if P ∨ ¬ P holds for every proposition in P : U , then the only propositions(up to equivalence) are U and U , which have equivalent copies in U , and Ω U is equivalentto a type U : U with exactly two elements. The existence of a computational interpreta-tion of propositional impredicativity axioms for univalent foundations is an open problem,however [45, 43]. Our basic ingredient is the notion of directed complete poset (dcpo). In set-theoretic founda-tions, a dcpo can be defined to be a poset that has least upper bounds of all directed families.A naive translation of this to our foundation would be to proceed as follows. Define a posetin a universe U to be a type P : U with a reflexive, transitive and antisymmetric relation − v − : P × P → U . According to the univalent point of view, we also require that the type P is a set and the values p v q of the order relation are subsingletons . Then we could say thatthe poset ( P, v ) is directed complete if every directed family I → X with indexing type I : U has a least upper bound. The problem with this definition is that there are no interestingexamples in our constructive and predicative setting. For instance, assume that the poset with two elements 0 v A : U and thedirected family A + → that maps the left component to 1 and the right componentto 0. By case analysis on its hypothetical supremum, we conclude that the negation of A isdecidable. This amounts to weak excluded middle, which is known to be equivalent to DeMorgan’s Law, and doesn’t belong to the realm of constructive mathematics. To try to getan example, we may move to the poset Ω of propositions in the universe U , ordered byimplication. This poset does have all suprema of families I → Ω indexed by types I in the first universe U , given by existential quantification. But if we consider a directed family I → Ω with I in the same universe as Ω lives, namely the second universe U , existentialquantification gives a proposition in the third universe U and so doesn’t give its supremum.In this example, we get a poset such that (i) the carrier lives in the universe U , (ii) the order has truth values in the universe U , and (iii) suprema of directed families indexed by types in U exist.Regarding a poset as a category in the usual way, we have a large, but locally small, categorywith small filtered colimits (directed suprema). This is typical of all the examples we haveconsidered so far in practice, such as the dcpos in the Scott model of PCF and Scott’s D ∞ model of the untyped λ -calculus. We may say that the predicativity restriction increases theuniverse usage by one. However, for the sake of generality, we formulate our definition ofdcpo with the following universe conventions: (i) the carrier lives in a universe U , (ii) the order has truth values in a universe T , and (iii) suprema of directed families indexed by types in a universe V exist. Domain Theory in Constructive and Predicative UF
So our notion of dcpo has three universe parameters U , V , T . We will say that the dcpo is locally small when T is not necessarily the same as V , but the order has truth values ofsize V . Most of the time we mention V explicitly and leave U and T to be understood fromthe context. (cid:73) Definition 6 (Poset) . A poset ( P, v ) is a set P : U together with a proposition-valuedbinary relation v : P → P → T satisfying: (i) reflexivity : Q p : P p v p ; (ii) antisymmetry : Q p,q : P p v q → q v p → p = q ; (iii) transitivity : Q p,q,r : P p v q → q v r → p v r . (cid:73) Definition 7 (Directed family) . Let ( P, v ) be a poset and I any type. A family α : I → P is directed if it is inhabited (i.e. k I k is pointed) and Π i,j : I ∃ k : I α i v α k × α j v α k . (cid:73) Definition 8 ( V -directed complete poset, V -dcpo) . Let V be a type universe. A V -directedcomplete poset (or V -dcpo , for short) is a poset ( P, v ) such that every directed family I → P with I : V has a supremum in P . We will sometimes leave the universe V implicit, and simply speak of “a dcpo”. On otheroccasions, we need to carefully keep track of universe levels. To this end, we make thefollowing definition. (cid:73) Definition 9 ( V -DCPO U , T ) . Let V , U and T be universes. We write V - DCPO U , T for thetype of V -dcpos with carrier in U and order taking values in T . (cid:73) Definition 10 (Pointed dcpo) . A dcpo D is pointed if it has a least element, which we willdenote by ⊥ D , or simply ⊥ . (cid:73) Definition 11 (Locally small) . A V -dcpo D is locally small if we have v small : D → D → V such that Q x,y : D ( x v small y ) ’ ( x v D y ) . (cid:73) Example 12 (Powersets as pointed dcpos) . Powersets give examples of pointed dcpos.The subset inclusion ⊆ makes P V ( X ) into a poset and given a (not necessarily directed)family A ( − ) : I → P V ( X ) with I : V , we may consider its supremum in P V ( X ) as given by λx. ∃ i : I x ∈ A i . Note that ( ∃ i : I x ∈ A i ) : V for every x : X , so this is well-defined. Finally, P V has a least element, the empty set: λx. V . Thus, P V ( X ) : V - DCPO V + tU , VtU . When
V ≡ U (as in Example 59), we get the simpler, locally small P U ( X ) : U - DCPO U + , U . (cid:121) Fix two V -dcpos D and E . (cid:73) Definition 13 (Continuous function) . A function f : D → E is (Scott) continuous ifit preserves directed suprema, i.e. if I : V and α : I → D is directed, then f ( F α ) is thesupremum in E of the family f ◦ α . (cid:73) Lemma 14. If f : D → E is continuous, then it is monotone, i.e. x v D y implies f ( x ) v E f ( y ) . Proof.
Given x, y : D with x v y , consider the directed family + → D defined as inl ( ? ) x and inr ( ? ) y . Its supremum is y and f must preserve it, so f ( x ) v f ( y ). (cid:74)(cid:73) Lemma 15. If f : D → E is continuous and α : I → D is directed, then so is f ◦ α . Proof.
Using Lemma 14. (cid:74)(cid:73)
Definition 16 (Strict function) . Suppose that D and E are pointed. A continuous function f : D → E is strict if f ( ⊥ D ) = ⊥ E . . de Jong and M. H. Escardó 7 (cid:73) Construction 17 ( L V ( X ) , η X , cf. [10, 15]) . Let X : U be a set. For any universe V , weconstruct a pointed V -dcpo L V ( X ) : V - DCPO V + tU , V + tU , known as the lifting of X . Itscarrier is given by the type P P : V is-prop ( P ) × ( P → X ) of partial elements of X .Given a partial element ( P, i, ϕ ) : L V ( X ), we write ( P, i, ϕ ) ↓ for P and say that thepartial element is defined if P holds. Moreover, we often leave the second component implicit,writing ( P, ϕ ) for (
P, i, ϕ ).The order is given by l v L V ( X ) m : ≡ ( l ↓ → l = m ), and it has a least element given by( , -is-prop , unique-from- ) where -is-prop is a witness that the empty type is a propositionand unique-from- is the unique map from the empty type.Given a directed family (cid:0) Q ( − ) , ϕ ( − ) (cid:1) : I → L V ( X ), its supremum is given by ( ∃ i : I Q i , ψ ),where ψ is such that P i : I Q i D ∃ i : I Q i |−| ( i,q ) ϕ i ( q ) ψ commutes. (This is possible, because the top map is weakly constant (i.e. any of its valuesare equal) and D is a set [25, Theorem 5.4].)Finally, we write η X : X → L V ( X ) for the embedding x ( , -is-prop , λu.x ). (cid:121) Note that we require X to be a set, so that L V ( X ) is a poset, rather than an ∞ -category.In practice, we often have V ≡ U (see for instance Example 58, Section 5.2, or the Scottmodel of PCF [10]), but we develop the theory for the more general case. We can describethe order on L V ( X ) more explicitly, as follows. (cid:73) Lemma 18.
If we have elements ( P, ϕ ) and ( Q, ψ ) of L V ( X ) , then ( P, ϕ ) v ( Q, ψ ) holdsif and only if we have f : P → Q such that Q p : P ϕ ( p ) = ψ ( f ( p )) . Observe that this exhibits L V ( X ) as locally small. We will show that L V ( X ) is the free pointed V -dcpo on a set X , but to do that, we first need a lemma. (cid:73) Lemma 19.
Let D be a pointed V -dcpo. Then D has suprema of families indexed bypropositions in V , i.e. if P : V is a proposition, then any α : P → D has a supremum W α .Moreover, if E is a (not necessarily pointed) V -dcpo and f : D → E is continuous, then f ( W α ) is the supremum of the family f ◦ α . Proof.
Let D be a pointed V -dcpo, P : V a proposition and α : P → D a function. Nowdefine β : V + P → D by inl ( ? )
7→ ⊥ D and inr ( p ) α ( p ). Then, β is easily seen to bedirected and so it has a well-defined supremum in D , which is also the supremum of α . Thesecond claim follows from the fact that β is directed, so continuous maps must preserve itssupremum. (cid:74)(cid:73) Lemma 20.
Let X : U be a set and let ( P, ϕ ) be an arbitrary element of L V ( X ) . Then ( P, ϕ ) = W p : P η X ( ϕ ( p )) . (cid:73) Theorem 21.
The lifting L V ( X ) gives the free V -dcpo on a set X . Put precisely, if X : U is a set, then for every V -dcpo D : V - DCPO U , T and function f : X → D , there is a unique Domain Theory in Constructive and Predicative UF continuous function f : L V ( X ) → D such that X D L V ( X ) η X f f commutes. Proof.
We define f : L V ( X ) → D by ( P, ϕ ) W p : P f ( ϕ ( p )), which is well-defined byLemma 19 and easily seen to be continuous. For uniqueness, suppose that we have g : L V ( X ) → D continuous such that g ◦ η X = f . Let ( P, ϕ ) be an arbitrary elementof L V ( X ). Using Lemma 20, we have: g ( P, ϕ ) = g _ p : P η X ( ϕ ( p )) = _ p : P g ( η X ( ϕ ( p ))) (by Lemma 19 and continuity of g )= _ p : P f ( φ ( p )) (by assumption on g )= f ( P, ϕ ) (by definition) , as desired. (cid:74) There is yet another way in which the lifting is a free construction, cf. [10, Section 4.3].What is noteworthy about this is that freely adding subsingleton suprema automaticallygives all directed suprema. (cid:73)
Definition 22 ( Ω V -complete) . A poset ( P, v ) is Ω V -complete if it has suprema for allfamilies indexed by a proposition in V . (cid:73) Theorem 23.
The lifting L V ( X ) gives the free Ω V -complete poset on a set X . Put precisely,if X : U is a set, then for every Ω V -complete poset ( P, v ) with P : U and v taking valuesin T and function f : X → P , there exists a unique monotone f : L V ( X ) → P preservingall suprema indexed by propositions in V , such that X P L V ( X ) η X f f commutes. Proof.
Similar to the proof of Theorem 21; also see [10, Proof of Theorem 4.16]. (cid:74)
Finally, a variation of Construction 17 freely adds a least element to a dcpo. (cid:73)
Construction 24 ( L ( D ) ) . Let D : V - DCPO U , T be a V -dcpo. We construct a pointed V -dcpo L ( D ) : V - DCPO V + tU , VtT . Its carrier is given by the type P P : V is-prop ( P ) × ( P → D ).The order is given by ( P, ϕ ) v L ( D ) ( Q, ψ ) : ≡ P f : P → Q Q p : P ϕ ( p ) = ψ ( f ( p )) and has aleast element ( , -is-prop , unique-from- ). . de Jong and M. H. Escardó 9 Now let α : ≡ (cid:0) Q ( − ) , ϕ ( − ) (cid:1) : I → L ( D ) be a directed family. Consider Φ : ( P i : I Q i ) → D given by ( i, q ) ϕ i ( q ). The supremum of α is given by ( ∃ i : I Q i , ψ ), where ψ takes a witnessthat P i : I Q i is inhabited to the directed (for which we needed ∃ i : I Q i ) supremum F Φ in D .Finally, we write η D : D → L ( D ) for the continuous map x ( , -is-prop , λu.x ). (cid:121)(cid:73) Theorem 25.
The construction L ( D ) gives the free pointed V -dcpo on a V -dcpo D . Putprecisely, if D : V - DCPO U , T is a V -dcpo, then for every pointed V -dcpo E : V - DCPO U , T andcontinuous function f : D → E , there is a unique strict continuous function f : L ( D ) → E such that D E L ( D ) η D f f commutes. Proof.
Similar to the proof of Theorem 21. (cid:74) (cid:73)
Construction 26 ( E D ) . Let D and E be two V -dcpos. We construct another V -dcpo E D as follows. Its carrier is given by the type of continuous functions from D to E .These functions are ordered pointwise, i.e. if f, g : D → E , then f v E D g : ≡ Y x : D f ( x ) v E g ( x ) . Accordingly, directed suprema are also given pointwise. Explicitly, let α : I → E D be adirected family. For every x : D , we have the family α x : I → E given by i α i ( x ). This isa directed family in E and so we have a well-defined supremum F α x : E for every x : D .The supremum of α is then given by x F α x , where one should check that this assignmentis indeed continuous.Finally, if E is pointed, then so is E D , because, in that case, the function x
7→ ⊥ E is theleast continuous function from D to E . (cid:121)(cid:73) Remark 27.
In general, the universe levels of E D can be quite large and complicated. For if D : V - DCPO U , T and D : V - DCPO U , T , then E D : V - DCPO V + tUtT tU tT , UtT . Even if V = U ≡ T ≡ U ≡ T , the carrier of E D still lives in the “large” universe V + . (Actually,this scenario cannot happen non-trivially in a predicative setting, since non-trivial dcposcannot be “small” [11].) Even so, as observed in [10], if we take U ≡ T ≡ U ≡ T ≡ U and V ≡ U , then D, E, E D are all elements of U - DCPO U , U . D ∞ We now construct, predicatively, Scott’s famous pointed dcpo D ∞ which is isomorphic to itsown function space D D ∞ ∞ (Theorem 39). We follow Scott’s original paper [40] rather closely,but with two differences. Firstly, we explicitly keep track of the universe levels to make surethat our constructions go through predicatively. Secondly, [40] describes sequential (co)limits,while we study the more general directed (co)limits (Section 5.1) and then specialize tosequential (co)limits later (Section 5.2). (cid:73) Definition 28 (Deflation) . Let D be a dcpo. An endofunction f : D → D is a deflation if f ( x ) v x for all x : D . (cid:73) Definition 29 (Embedding-projection pair) . Let D and E be two dcpos. An embedding-projection pair from D to E consists of two continuous functions ε : D → E (the embedding )and π : E → D (the projection ) such that: (i) ε is a section of π ; (ii) ε ◦ π is a deflation. For the remainder of this section, fix the following setup. Let V , U , T and W be typeuniverses. Let ( I, v ) be a directed preorder with I : V and v taken values in W . Supposethat we have: (i) for every i : I , a V -dcpo D i : V - DCPO U , T ; (ii) for every i, j : I with i v j , an embedding-projection pair ( ε i,j , π i,j ) from D i to D j ;such that (i) for every i : I , we have ε i,i = π i,i = id ; (ii) for every i, j, k : I with i v j v k , we have ε i,k ∼ ε j,k ◦ ε i,j and π i,k ∼ π i,j ◦ π j,k . (cid:73) Construction 30 ( D ∞ ) . Given the above inputs, we construct another V -dcpo D ∞ : V - DCPO
UtVtW , UtT as follows. Its carrier is given by the type: X σ : Q i : I D i Y j : I,i v j π i,j ( σ j ) = σ i . These functions are ordered pointwise, i.e. if σ, τ : I → D i , then σ v D ∞ τ : ≡ Y i : I σ i v D i τ i . Accordingly, directed suprema are also given pointwise. Explicitly, let α : A → D ∞ be adirected family. For every i : I , we have the family A → D i given by a ( α ( a )) i , anddenoted by α i . One can show that α i is directed and so we have a well-defined supremum F α i : D i for every i : I . The supremum of α is then given by the function i : I F α i ,where one should check that π i,j ( F α j ) = F α i holds whenever i v j . (cid:121)(cid:73) Remark 31.
We allow for general universe levels here, which is why D ∞ lives in therelatively complicated universe U t V t W . In concrete examples, such as in Section 5.2, thesituation simplifies to V = W = U and U = T = U . (cid:73) Construction 32 ( π i, ∞ ) . For every i : I , we have a continuous function π i, ∞ : D ∞ → D i ,given by σ σ i . (cid:121)(cid:73) Construction 33 ( ε i, ∞ ) . For every i, j : I , consider the function κ : D i → X k : I i v k × j v k ! → D j κ x ( k, l i , l j ) = π i,j ( ε i,k ( x )) . Using directedness of ( I, v ), we can show that for every x : D i the map κ x is weakly constant(i.e. all its values are equal). Therefore, we can apply [25, Theorem 5.4] and factor κ x through ∃ k : I ( i v k × j v k ). But ( I, v ) is directed, so ∃ k : I ( i v k × j v k ) is a singleton. Thus, we . de Jong and M. H. Escardó 11 obtain a function ρ i,j : D i → D j such that: if we are given k : I with ( l i , l j ) : i v k × j v k ,then ρ i,j ( x ) = κ x ( k, l i , l j ).Finally, this allows us to construct for every i : I , a continuous function ε i, ∞ : D i → D ∞ by mapping x : D i to the function λ ( j : I ) .ρ i,j ( x ). (cid:121)(cid:73) Theorem 34.
For every i : I , the pair ( ε i, ∞ , π i, ∞ ) is an embedding-projection pair. (cid:73) Lemma 35.
Let i, j : I such that i v j . Then π i,j ◦ π j, ∞ ∼ π i , and ε j, ∞ ◦ ε i,j ∼ ε i, ∞ . (cid:73) Theorem 36.
The dcpo D ∞ with the maps ( π i, ∞ ) i : I is the limit of (cid:16) ( D i ) i : I , ( π i,j ) i v j (cid:17) .That is, given (i) a V -dcpo E : V - DCPO U , T , (ii) continuous functions f i : E → D i for every i : I ,such that π i,j ◦ f j ∼ f i whenever i v j , we have a continuous function f ∞ : E → D ∞ such that π i, ∞ ◦ f ∞ ∼ f i for every i : I . Moreover, f ∞ is the unique such continuous function.The function f ∞ is given by mapping y : E to the function λ ( i : I ) .f i ( y ) . (cid:73) Theorem 37.
The dcpo D ∞ with the maps ( ε i, ∞ ) i : I is the colimit of (cid:16) ( D i ) i : I , ( ε i,j ) i v j (cid:17) .That is, given (i) a V -dcpo E : V - DCPO U , T , (ii) continuous functions g i : D i → E for every i : I ,such that g j ◦ ε i,j ∼ g i whenever i v j , we have a continuous function g ∞ : D ∞ → E such that g ∞ ◦ ε i, ∞ ∼ g i for every i : I . Moreover, g ∞ is the unique such continuous function.The function g ∞ is given by σ F i : I g i ( σ i ) , where one should check that the family i g i ( σ i ) is indeed directed. Proof.
For uniqueness, it is useful to know that an element σ : D ∞ can be expressed as thedirected supremum F i : I ε i, ∞ ( σ i ). The rest can be checked directly. (cid:74) It should be noted that in both universal properties E can have its carrier in any universe U and its order taking values in any universe T , even though we required all D i to have theircarriers and orders in two fixed universes U and T , respectively. We now show that we can construct Scott’s D ∞ [40] predicatively. Formulated pre-cisely, we construct a pointed D ∞ : U - DCPO U , U such that D ∞ is isomorphic to itsself-exponential D D ∞ ∞ .We employ the machinery from Section 5.1. Following [40, pp. 126–127], we inductivelydefine pointed dcpos D n : U - DCPO U , U for every natural number n : (i) D : ≡ L U ( U ); (ii) D n +1 : ≡ D D n n .Next, we inductively define embedding-projection pairs ( ε n , π n ) from D n to D n +1 : (i) ε : D → D is given by mapping x : D to the continuous function that is constantly x ; π : D → D is given by evaluating a continuous function f : D → D at ⊥ ; (ii) ε n +1 : D n +1 → D n +2 takes a continuous function f : D n → D n to the continuouscomposite D n +1 π n −−→ D n f −→ D n ε n −→ D n +1 ; π n +1 : D n +2 → D n +1 takes a continuous function f : D n +1 → D n +1 to the continuouscomposite D n ε n −→ D n +1 f −→ D n +1 π n −−→ D n . In order to apply the machinery from Section 5.1, we will need embedding-projectionpairs ( ε n,m , π n,m ) from D n to D m whenever n ≤ m . Let n and m be natural numbers with n ≤ m and let k be the natural number m − n . We define the pairs by induction on k : (i) if k = 0, then we set ε n,n = π n,n = id ; (ii) if k = l + 1, then ε n,m = ε n + l ◦ ε n,n + l and π n,m = π n,n + l ◦ π n + l .So, Constructions 30, 32 and 33 give us D ∞ : U - DCPO U , U with embedding-projectionpairs ( ε n, ∞ , π n, ∞ ) from D n to D ∞ for every natural number n . (cid:73) Lemma 38.
Let n be a natural number. The function π n : D n +1 → D n is strict. Hence,so is π n,m whenever n ≤ m . Proof.
The first statement is proved by induction on n . The second by induction on k with k : ≡ m − n . (cid:74)(cid:73) Theorem 39.
The dcpo D ∞ is pointed and isomorphic to D D ∞ ∞ . Proof.
Since every D n is pointed, we can consider the function σ : Q n : N D n given by σ ( n ) : ≡ ⊥ D n . Then σ is an element of D ∞ by Lemma 38 and it is the least, so D ∞ is indeedpointed.We start by constructing a continuous function ε : D ∞ → D D ∞ ∞ . By Theorem 37, itsuffices to define continuous functions ε n : D n → D D ∞ ∞ for every natural number n such that ε m ◦ ε n,m ∼ ε n whenever n ≤ m . We do so as follows: (i) ε n +1 : D n +1 : ≡ D D n n → D D ∞ ∞ is given by mapping a continuous function f : D n → D n to the continuous composite D ∞ π n, ∞ −−−→ D n f −→ D n ε n, ∞ −−−→ D ∞ ; (ii) ε : D → D D ∞ ∞ is defined as the continuous composite D ε −→ D ε −→ D ∞ .Next, we construct a continuous function π : D D ∞ ∞ → D ∞ . By Theorem 36, it sufficesto define continuous functions π n : D n → D D ∞ ∞ for every natural number n such that π n,m ◦ π m ∼ π n whenever n ≤ m . We do so as follows: (i) π n +1 : D D ∞ ∞ → D n +1 : ≡ D D n n is given by mapping a continuous function f : D ∞ → D ∞ to the continuous composite D n ε n, ∞ −−−→ D ∞ f −→ D ∞ π n, ∞ −−−→ D n ; (ii) π : D D ∞ ∞ → D is defined as the continuous composite D ∞ π −→ D π −→ D .It remains to prove that ε and π are inverses. To this end, it is convenient to have analternative description of the maps ε and π .For every σ : D ∞ , we have ε ( σ ) = G n : N ε n +1 ( σ n +1 ). (1)For every continuous f : D ∞ → D ∞ , we have π ( f ) = G n : N (cid:15) n +1 , ∞ (cid:0) π n +1 ( f ) (cid:1) . (2)Using these equations we can prove that ε and π are inverses exactly as in [40, Proof of The-orem 4.4]. (cid:74)(cid:73) Remark 40.
Of course, Theorem 39 is only interesting in case D ∞ . Fortunately, D ∞ has (infinitely) many elements besides ⊥ D ∞ . For instance, we can consider x : ≡ η ( ? ) : D and σ : Q n : N D n given by σ ( n ) : ≡ ε ,n ( x ). Then, σ is an element of D ∞ not equalto ⊥ D ∞ , because x = ⊥ D . . de Jong and M. H. Escardó 13 We next consider dcpos generated by certain elements called compact, or more generallygenerated by a certain way-below relation, giving rise to algebraic and continuous domains. (cid:73)
Definition 41 (Way-below relation, x (cid:28) y ) . Let D be a V -dcpo and x, y : D . We say that x is way below y , denoted by x (cid:28) y , if for every I : V and directed family α : I → D ,whenever we have y v F α , then there exists some element i : I such that x v α i already.Symbolically, x (cid:28) y : ≡ Y I : V Y α : I → D (cid:16) is-directed ( α ) → y v G α → ∃ i : I x v α i (cid:17) . (cid:73) Lemma 42.
The way-below relation enjoys the following properties. (i)
It is proposition-valued. (ii) If x (cid:28) y , then x v y . (iii) If x v y (cid:28) v v w , then x (cid:28) w . (iv) It is antisymmetric. (v)
It is transitive. (cid:73)
Lemma 43.
Let D be a dcpo. Then x v y implies Q z : D ( z (cid:28) x → z (cid:28) y ) . Proof.
By Lemma 42(iii). (cid:74)(cid:73)
Definition 44 (Compact) . Let D be a dcpo. An element x : D is called compact if x (cid:28) x . (cid:73) Example 45.
The least element of a pointed dcpo is always compact. (cid:73)
Example 46 (Compact elements in L V ( X ) ) . Let X : U be a set. An element ( P, ϕ ) : L V ( X )is compact if and only if P is decidable. Proof.
Suppose that (
P, ϕ ) is compact. We must show that P is decidable. Consider thefamily α : ( U + P ) → L V ( X ) given by inl ( ? )
7→ ⊥ and inr ( p ) ( P, ϕ ). This is directed, so α has a supremum in L V ( X ). Observe that ( P, ϕ ) v F α holds. Hence, by assumption that( P, ϕ ) is compact, we have ∃ i : U + P (( P, ϕ ) v α i ). Since decidability of P is a proposition, weobtain i : U + P such that ( P, ϕ ) v α i . There are two cases: i = inl ( ? ) or i = inr ( p ). In thefirst case, ( P, ϕ ) v ⊥ , so ¬ P . In the second case, we have P . Hence, P is decidable.Conversely, suppose that we have ( P, ϕ ) : L V ( X ) with P decidable. There are two cases:either ¬ P or P . If ¬ P , then ( P, ϕ ) is the least element of L V ( X ), so it is compact. If P ,then let α : I → L V ( X ) be a directed family with ( P, ϕ ) v F α . Since P holds, we getthe equality ( P, ϕ ) = F α and ( F α ) ↓ . Recalling Construction 17, this means that we have ∃ i : I ( α i ) ↓ . Hence, ∃ i : I (( P, ϕ ) v α i ) holds as well, finishing the proof. (cid:67)(cid:73) Definition 47 (Kuratowski finite) . A type X is Kuratowski finite if there exists somenatural number n : N and a surjection e : Fin ( n ) (cid:16) X . That is, X is Kuratowski finite if its elements can be finitely enumerated, possibly withrepetitions. (cid:73)
Example 48 (Compact elements in P U ( X ) ) . Let X : U be a set. An element A : P U ( X ) iscompact if and only if its total type T A is Kuratowski finite. Proof.
Write ι : List ( X ) → P U ( X ) for the map that regards a list on X as a subset of X .The inductively generated type List ( X ) of lists on X lives in the same universe U as X .Suppose that A is compact. We must show that T ( A ) is Kuratowski finite. Consider themap α : List ( T ( A )) → P U ( X ) which takes a list [( x , p ) , . . . , ( x n − , p n − )] to ι ([ x , . . . , x n − ]).Since the empty list is an element of List ( T ( A )) and because we can concatenate lists, α isdirected. Moreover, List ( T ( A )) : U and A = F α holds. Hence, by compactness, there existssome l : ≡ [( x , p ) , . . . , ( x n − , p n − )] : List ( T ( A )) such that A ⊆ α ( l ) already. Hence, themap m : Fin ( n ) ( x m , p m ) : T ( A ) is a surjection, so T ( A ) is Kuratowski finite.Conversely, suppose that A is a subset such that T ( A ) is Kuratowski finite. We mustprove that it is compact. Let B ( − ) : I → P U ( X ) be directed such that A ⊆ F i : I B i . Since ∃ i : I A ⊆ B i is a proposition, we can use Kuratowski finiteness of T ( A ) to obtain a naturalnumber n and a surjection e : Fin ( n ) (cid:16) T ( A ). For each m : Fin ( n ), find i m such that e m ∈ B i m . By directedness of I , there exists k : I such that e m ∈ B k for every m : Fin ( n ).Hence, ∃ k : I A ⊆ B k , as desired. (cid:67) Classically, a continuous dcpo is a dcpo where every element is the directed join of the set ofelements way below it [3]. Predicatively, we must be careful, because if x is an element of adcpo D , then P y : D y (cid:28) x is typically large, so its directed join need not exist for size reasons.Our solution is to use a predicative version of bases [1] that accounts for size issues. For thespecial case of algebraic dcpos, our situation is the poset analogue of accessible categories [2].Indeed, in category theory requiring smallness is common, even in impredicative settings, seefor instance [23], where continuous dcpos are generalized to continuous categories. (cid:73) Definition 49 (Basis, approximating family) . A basis for V -dcpo D is a function β : B → D with B : V such that for every x : D there exists some α : I → B with I : V such that (i) β ◦ α is directed and its supremum is x ; (ii) β ( α i ) (cid:28) x for every i : I .We summarise these requirements by saying that α is an approximating family for x .Moreover, we require that (cid:28) is small when restricted to the basis. That is, we have (cid:28) B : B → B → V such that ( β ( b ) (cid:28) β ( b )) ’ (cid:0) b (cid:28) B b (cid:1) for every b, b : B . (cid:73) Definition 50 (Continuous dcpo) . A dcpo D is continuous if there exists some basis for it. We postpone giving examples of continuous dcpos until we have developed the theoryfurther, but the interested reader may look ahead to Examples 58, 59 and 82.A useful property of bases is that it allows us to express the order fully in terms of theway-below relation, giving a converse to Lemma 43. (cid:73)
Lemma 51.
Let D be a dcpo with basis β : B → D . Then x v y holds if and only if Q b : B ( β ( b ) (cid:28) x → β ( b ) (cid:28) y ) . Proof.
The left-to-right implication holds by Lemma 43. For the converse, suppose that wehave x, y : D such that for every Q b : B ( β ( b ) (cid:28) x → β ( b ) (cid:28) y ). Since x v y is a proposition,we can obtain α : I → B such that β ◦ α is directed and F β ◦ α = x and β ( α i ) (cid:28) x forevery i : I . It then suffices to show that F β ◦ α v y . Since F gives the least upper bound,it is enough to prove that β ( α i ) v y for every i : I , but this holds by our hypothesis, ourassumption that β ( α i ) (cid:28) x for every i : I , and Lemma 42(ii). (cid:74) . de Jong and M. H. Escardó 15 (cid:73) Lemma 52.
Let D be a V -dcpo with a basis β : B → D . Then v is small when restrictedto the basis, i.e. β ( b ) v β ( b ) has size V for every two elements b , b : B . Hence, we have v B : B → B → V such that Q b ,b : B (cid:0) b v B b (cid:1) ’ ( β ( b ) v β ( b )) . Proof.
Let b , b : B and note that we have the following equivalences:( β ( b ) v β ( b )) ’ Y b : B ( β ( b ) (cid:28) β ( b ) → β ( b ) (cid:28) β ( b )) (by Lemma 51) ’ Y b : B (cid:0) b (cid:28) B b → b (cid:28) B b (cid:1) (by definition of a basis) , but the latter is a type in V . (cid:74) The most significant properties of a basis are the interpolation properties. We considernullary, unary and binary versions here. The binary interpolation property actually followsfairy easily from the unary one, but we still record it, because we wish to show that basesare examples of the abstract bases that we define later (cf. Example 62). Our proof of unaryinterpolation is a predicative version of [14]. (cid:73)
Lemma 53 (Nullary interpolation) . Let D be a dcpo with a basis β : B → D . For every x : D , there exists some b : B such that β ( b ) (cid:28) x . Proof.
Immediate from the definitions of a basis and a directed family. (cid:74)(cid:73)
Lemma 54 (Unary interpolation) . Let D be a V -dcpo with basis β : B → D and let x, y : D .If x (cid:28) y , then there exists some b : B such that x (cid:28) β ( b ) (cid:28) y . Proof.
Let x, y : D with x (cid:28) y . Since β is a basis, there exists an approximating family α : I → B for y . Consider the family K : ≡ X b : B X i : I b (cid:28) B α i : V ! pr −−→ B β −→ D. ( † ) (cid:66) Claim.
The family ( † ) is directed. Proof.
By directedness of α and nullary interpolation, the type K is inhabited.Now suppose that we have b , b : B and i , i : I with b (cid:28) B α i and b (cid:28) B α i . Bydirectedness of α , there exists k : I with α i , α i v B α k . Since β is a basis for D , there existsan approximating family γ : J → B for β ( α k ). From b (cid:28) B α i we obtain b (cid:28) B α k andsimilarly, b (cid:28) B α k . Hence, there exist j , j : J such that b v B γ j and b v B γ j . Bydirectedness of J , there exists m : J with γ j , γ j v B γ m . Thus, putting this all together, wesee that: b , b v B γ j m (cid:28) B α k . Hence, ( † ) is directed. (cid:67) Thus, ( † ) has a supremum s in D . (cid:66) Claim.
We have y v s . Proof.
Since y = F β ◦ α , it suffices to prove that β ( α i ) v s for every i : I . Let i : I bearbitrary and let γ j : J → B be some approximating family for β ( α i ). Then it is enough toestablish β ( γ j ) v s for every j : J . But we know that γ j (cid:28) B α i , so β γ j v s by definition of( † ) and the fact that s is the supremum of ( † ). (cid:67) Finally, from y v s and x (cid:28) y , it follows that there must exist b : B and i : I such that: x v β ( b ) (cid:28) β ( α i ) (cid:28) y , which finishes the proof. (cid:74) (cid:73) Lemma 55 (Binary interpolation) . Let D be a V -dcpo with basis β : B → D and let x, y, z : D . If x, y (cid:28) z , then there exists some b : B such that x, y (cid:28) β ( b ) (cid:28) z . Proof.
Let x, y, z : D such that x, y (cid:28) z . By unary interpolation, there are b x , b y : B suchthat x (cid:28) β ( b x ) (cid:28) z and y (cid:28) β ( b y ) (cid:28) z . Since β is a basis, there exists a family α : I → B such that β ( α i ) (cid:28) z for every i : I , and β ◦ α is directed and has supremum z . Since β ( b x ) (cid:28) z , there must exists i x : I with β ( b x ) v β ( α i x ). Similarly, there exists i y : I suchthat β ( b y ) v β (cid:0) α i y (cid:1) . By directedness of β ◦ α , there exists k : I with β ( α i x ) , β (cid:0) α i y (cid:1) v β ( α k ).Hence, x (cid:28) β ( b x ) v β ( α i x ) v β ( α k ) (cid:28) z and y (cid:28) β ( b y ) v β (cid:0) α i y (cid:1) v β ( α k ) (cid:28) z, so that x, y (cid:28) β ( α k ) (cid:28) z , as wished. (cid:74) We now turn to a particular class of continuous dcpos, called algebraic dcpos. (cid:73)
Definition 56 (Algebraic dcpo) . A dcpo D is algebraic if there exists some basis β : B → D for it such that β ( b ) is compact for every b : B . (cid:73) Lemma 57.
Let D be a V -dcpo. Then D is algebraic if and only if there exists β : B → D with B : V such that (i) every element β ( b ) is compact; (ii) for every x : D , there exists α : I → B with I : V such that β ◦ α is directed and x = F β ◦ α . Proof.
We just need to show that having β : B → D and α : I → B such that every element β ( b ) is compact and x = F β ◦ α , already implies that β ( α i ) (cid:28) x for every i : I . But if i : I ,then β ( α i ) (cid:28) β ( α i ) v F β ◦ α = x by compactness of β ( α i ), so Lemma 42(iii) now finishesthe proof. (cid:74)(cid:73) Example 58 ( L U ( X ) is algebraic) . Let X : U be a set and consider L U ( X ) : U - DCPO U + , U + .The basis [ ⊥ , η X ] : ( U + X ) → L U ( X ) exhibits L U ( X ) as an algebraic dpco. Proof.
By Example 46, the elements ⊥ and η X ( x ) (with x : X ) are all compact, so it remainsto show that U + X is indeed a basis. Recalling Lemmas 19 and 20, we can write any element( P, ϕ ) : L V ( X ) as the directed join F ([ ⊥ , η X ] ◦ α ) with α : ≡ [ id , ϕ ] : ( U + P ) → ( U + X ).By Lemma 57 the proof is finished. (cid:67)(cid:73) Example 59 ( P U ( X ) is algebraic) . Let X : U be a set and consider P U ( X ) : U - DCPO U + , U .The basis ι : List ( X ) → P U ( X ) that maps a finite list to a Kuratowski finite subset exhibits P U ( X ) as an algebraic dpco. Proof.
By Example 48, the element ι ( l ) is compact for every list l : List ( X ), so it remains toshow that List ( X ) is indeed a basis. In the proof of Example 48, we saw that every U -subset A of X can be expressed as the directed supremum F ι ◦ α where α : List ( T ( A )) → List ( X ) takesa list [( x , p ) , . . . , ( x n − , p n − )] to the list [ x , . . . , x n − ]. Another application of Lemma 57now finishes the proof. (cid:67)(cid:73) Example 60 (Scott’s D ∞ is algebraic) . The pointed dcpo D ∞ : U - DCPO U , U with D ∞ ∼ = D D ∞ ∞ from Section 5.2 is algebraic. We postpone the proof until Section 6.4, since wewill need some additional results on locally small dcpos. . de Jong and M. H. Escardó 17 Finally, we consider how to build dcpos from posets, or more generally from abstract bases,using the rounded ideal completion [1, Section 2.2.6]. Given our definition of the notion ofdcpo, the reader might expect us to define ideals using families rather than subsets. However,we use subsets for extensionality reasons. Two subsets A and B of some X are equal exactlywhen x ∈ A ⇐⇒ x ∈ B for every x : X . However, given two (directed) families α : I → X and β : J → X , it is of course not the case (it does not even typecheck) that α = β whenΠ i : I ∃ j : J α i = β j and Π j : J ∃ i : I β j = α i hold. We could try to construct the ideal completionby quotienting the families, but then it seems impossible to define directed suprema in theideal completion without resorting to choice. (cid:73) Definition 61 (Abstract basis) . A pair ( B, ≺ ) with B : V and ≺ taking values in V is calleda V - abstract basis if: (i) ≺ is proposition-valued; (ii) ≺ is transitive; (iii) ≺ satisfies nullary interpolation, i.e. for every x : B , there exists some y : B with y ≺ x ; (iv) ≺ satisfies binary interpolation, i.e. for every x, y : B with x ≺ y , there exists some z : B with x ≺ z ≺ y . (cid:73) Example 62.
Let D be a V -dcpo with a basis β : B → D , By Lemmas 42, 53 and 55,the pair (cid:0) B, (cid:28) B (cid:1) is an example of a V -abstract basis. (cid:73) Example 63.
Any preorder ( P, v ) with P : V and v taking values in V is a V -abstractbasis, since reflexivity implies both interpolation properties.For the remainder of this section, fix some arbitrary V -abstract basis ( B, ≺ ). (cid:73) Definition 64 (Directed subset) . Let A be a V -subset of B . Then A is directed if A isinhabited (i.e. ∃ x : B x ∈ A holds) and for every x, y ∈ A , there exists some z ∈ A such that x, y v z . (cid:73) Definition 65 (Ideal, lower set) . Let A be a V -subset of B . Then A is an ideal if A is adirected subset of B and A is a lower set , i.e. if x ≺ y and y ∈ A , then x ∈ A as well. (cid:73) Construction 66 (Rounded ideal completion Idl ( B, ≺ ) ) . We construct a V -dcpo, known asthe (rounded) ideal completion Idl ( B, ≺ ) : V - DCPO V + , V of ( B, ≺ ). The carrier is given bythe type P I : B →V is-ideal ( I ) of ideals on ( B, ≺ ). The order is given by subset inclusion ⊆ .If we have a directed family α : A → Idl ( B, ≺ ) of ideals (with A : V ), then the subset givenby λx. ∃ a : A x ∈ α a is again an ideal and the supremum of α in Idl ( B, ≺ ). (cid:121)(cid:73) Lemma 67 (Rounded ideals) . The ideals of
Idl ( B, ≺ ) are rounded . That is, if I : Idl ( B, ≺ ) and x ∈ I , then there exists some y ∈ I with x ≺ y . Proof.
Immediate from the fact that ideals are directed sets. (cid:74)(cid:73)
Definition 68 (Principal ideal ↓ x ) . We write ↓ ( − ) : B → Idl ( B, ≺ ) for the map that takes x : B to the principal ideal λy.y ≺ x . (cid:73) Lemma 69.
Let I : Idl ( B, ≺ ) be an ideal. Then I may be expressed as the supremum ofthe directed family ( x, p ) : T ( I )
7→ ↓ x : Idl ( B, ≺ ) , which we will denote by I = F x ∈ I ↓ x . Proof.
Directedness of the family follows from the fact that I is a directed subset. Since I isa lower set, ↓ x ⊆ I holds for every x ∈ I , establishing F x ∈ I ↓ x ⊆ I . The reverse inclusionfollows from Lemma 67. (cid:74) We wish to prove that
Idl ( B, ≺ ) is continuous with basis ↓ ( − ) : B → Idl ( B, ≺ ). To this end,it is useful to express (cid:28) Idl ( B, ≺ ) in more elementary terms. (cid:73) Lemma 70.
Let
I, J : Idl ( B, ≺ ) be two ideals. Then I (cid:28) J holds if and only there exists x ∈ J such that I ⊆ ↓ x . Proof.
The left-to-right implication follows immediately from Lemma 69.For the converse, note that I (cid:28) J is a proposition, so we may assume that we have x ∈ J with I ⊆ ↓ x . Now let α : A → Idl ( B, ≺ ) be a directed family such that J ⊆ F α . Then theremust exist some a : A for which x ∈ α a . But I ⊆ ↓ x and α a is a lower set, so I ⊆ α a . (cid:74)(cid:73) Theorem 71.
The map ↓ ( − ) : B → Idl ( B, ≺ ) is a basis for Idl ( B, ≺ ) . Thus, Idl ( B, ≺ ) isa continuous V -dcpo. Proof.
Let I : Idl ( B, ≺ ) be arbitrary. By Lemma 69 we can express I as the supremum F x ∈ I ↓ x , so it is enough to prove that ↓ x (cid:28) I for every x ∈ I . But this follows fromLemmas 67 and 70. (cid:74)(cid:73) Lemma 72. If ≺ is reflexive, then the compact elements of Idl ( B, ≺ ) are exactly theprincipal ideals and Idl ( B, ≺ ) is algebraic. Proof.
Immediate from Lemma 70. (cid:74)(cid:73)
Theorem 73.
The ideal completion is the free dcpo on a small poset. That is, if we havea poset ( P, v ) with P : V and v taking values in V , then for every D : V - DCPO U , T andmonotone function f : P → D , there is a unique continuous function f : Idl ( P, v ) → D suchthat P D
Idl ( P, v ) ↓ ( − ) f f commutes. Proof.
Given ( P, v ), D and f as in the theorem, we define f by mapping an ideal I to thesupremum of the directed (since I is an ideal) family T ( I ) pr −−→ P f −→ D .Commutativity of the diagram expresses that f ( x ) = F y v x f ( y ) for every x : P . By anti-symmetry of v , it suffices to prove f ( x ) v F y v x f ( y ) and F y v x f ( y ) v f ( x ). The first holdsby reflexivity of v and the second holds because f is monotone.Uniqueness of f follows easily using Lemma 69. Finally, continuity of f is not hard toestablish either. (cid:74)(cid:73) Definition 74 (Continuous retract, section, retraction) . A V -dcpo D is a continuous retract of another V -dcpo E if we have continuous functions s : D → E (the section ) and r : E → D (the retraction ) such that r ( s ( x )) = x for every x : D . (cid:73) Theorem 75. If E is a dcpo with basis β : B → D and D is a continuous retract of E with retraction r , then r ◦ β is a basis for D . . de Jong and M. H. Escardó 19 Proof.
Let E be a dcpo with basis β : B → D and suppose that we have continuousretraction r : E → D with continuous section s : D → E . Given x : D , there exists someapproximating family α : I → B for s ( x ). We claim that α is an approximating family for x as well, i.e. (i) r ( β ( α i )) (cid:28) x for every i : I and (ii) F r ◦ β ◦ α = x .The second follows from continuity of r , since: F r ◦ β ◦ α = r ( F β ◦ α ) = r ( s ( x )) = x . For(i), suppose that i : I and that γ : J → D is a directed family satisfying x v F γ . We mustshow that there exists j : J with r ( β ( α I )) v γ j . By continuity of s , we get s ( x ) v F s ◦ γ .Hence, since β ( α i ) (cid:28) s ( x ), there must exist j : J with β ( α i ) v s ( γ j ). Thus, by monotonicityof r , we get the desired r ( β ( α i )) v r ( s ( γ j )) = γ j . (cid:74) We now turn to locally small dcpos, as they allow us to find canonical approximating families,which is used in the proof of Theorem 78. (cid:73)
Lemma 76.
Let D be a V -dcpo with basis β : B → D . The following are equivalent: (i) D is locally small; (ii) β ( b ) (cid:28) x has size V for every x : D and b : B . Proof.
Recalling Lemma 51, the type x v y is equivalent to Q b : B ( β ( b ) (cid:28) x → β ( b ) (cid:28) y )for every x, y : D . Thus, (ii) implies (i). Conversely, assume that D is locally small and let x : D and b : B . We claim that β ( b ) (cid:28) x is equivalent to ∃ b : B (cid:0) b (cid:28) B b × β ( b ) v small x (cid:1) : V .The left-to-right implication is given by Lemma 54, and the converse by Lemma 42(iii). (cid:74)(cid:73) Lemma 77.
Let D be a V -dcpo with basis β : B → D . If D is locally small, then anelement x : D is the supremum of the large directed family ( P b : B β ( b ) (cid:28) x ) pr −−→ B β −→ D .Moreover, if D is locally small, then this directed family is small. Proof.
The family pr ◦ β is directed by the nullary (Lemma 53) and binary (Lemma 55)interpolation properties. Now suppose that D is locally small. By Lemma 76, we have I : V and α : I → D directed such that F α is the supremum of ( P b : B β ( b ) (cid:28) x ) pr −−→ B β −→ D .Since β : B → D is a basis of D , we see that x v F α . For the reverse inequality, it suffices toshow that β ( b ) v x for every b : B with β ( b ) (cid:28) x . But this follows from Lemma 42(ii). (cid:74)(cid:73) Theorem 78.
Let D be a V -dcpo with basis β : B → D and suppose that D is locally small.Then D is a continuous retract of the algebraic V -dcpo Idl (cid:0) B, v B (cid:1) (recall Lemma 52). Proof.
By Lemma 72,
Idl (cid:0) B, v B (cid:1) is indeed algebraic. Let D be a V -dcpo satisfying thehypotheses of the lemma. Let (cid:28) small : B → D → V be such that ( b (cid:28) small x ) ’ ( β ( b ) (cid:28) x )for every x : D and b : B .For every x : D , we can consider the subset (cid:16) x given by λ ( b : B ) .b (cid:28) small x . We showthat it is an ideal. By Lemma 77 it is a directed subset. And if b ∈ (cid:16) x and b v B b , then b ∈ (cid:16) x as well by virtue of Lemma 42(iii). So (cid:16) x is a lower set, and indeed an ideal.We claim that the map (cid:16) ( − ) is continuous. By Lemma 43, it is monotone. Thus, weare left to show that if α : I → D is directed, then (cid:16) ( F α ) ⊆ F i : I (cid:16) α i . Let b ∈ (cid:16) ( F α ), i.e. b ∈ B such that b (cid:28) small F α . By Lemma 54, there exists b : B with b (cid:28) B b (cid:28) small F α .Hence, there must exist i : I such that β ( b ) (cid:28) β ( b ) v α i , thus, b ∈ (cid:16) α i and (cid:16) ( − ) is indeedcontinuous. Next, define r : Idl (cid:0) B, v B (cid:1) → D using Theorem 73 as the unique continuous functionsuch that B D
Idl (cid:0) B, v B (cid:1) ↓ ( − ) β r commutes, i.e. r maps an ideal I to the directed supremum F b ∈ I β ( b ) in D .Finally, we show that (cid:16) ( − ) is a section of r . That is, the equality F b (cid:28) small x β ( b ) = x holdsfor every x : D . But this is exactly Lemma 77. (cid:74) One may wonder how restrictive the condition that D is locally small is. We note that if X is a set, then L V ( X ) (by Lemma 18) and P V ( X ) are examples of locally small V -dcpos.A natural question is what happens with exponentials. In general, E D may fail to be locallysmall even when both D and E are. However, we do have the following result. (cid:73) Lemma 79.
Let D and E be V -dcpos. Suppose that D is continuous and E is locally small.Then E D is locally small. Proof.
Since being locally small is a proposition, we may assume that we are given a basis β : B → D of D . We claim that for every two continuous functions f, g : D → E we have anequivalence Y x : D f ( x ) v E g ( x ) ! ’ Y b : B f ( β ( b )) v small g ( β ( b )) ! . Since B : V and v small takes values in V , the second type is also in V . For the equivalence,note that the left-to-right implication is trivial. For the converse, assume the right-hand sideand let x : D . By continuity of D , there exists some approximating family α : I → B for x .We use it as follows: f ( x ) = f (cid:16)G β ◦ α (cid:17) = G i : I f ( β ( α i )) (by continuity of f ) v G i : I g ( β ( α i )) (by assumption)= g (cid:16)G β ◦ α (cid:17) (by continuity of g )= g ( x ) , which finishes the proof. (cid:74) Moreover, the (co)limit of locally small dcpos is locally small. (cid:73)
Lemma 80.
Given a system ( D i , ε i,j , π i,j ) as in Section 5.1, if every D i is locally small,then so is D ∞ . Finally, the requirement that D is locally small is necessary, in the following sense. (cid:73) Lemma 81.
Let D be a V -dcpo with basis β : B → D . Suppose that D is a continuousretract of Idl (cid:0) B, v B (cid:1) . Then D is locally small. . de Jong and M. H. Escardó 21 Proof.
Let s : D → Idl (cid:0) B, v B (cid:1) be a section of a map r : Idl (cid:0) B, v B (cid:1) → D , with both mapscontinuous. Then x v D y holds if and only if s ( x ) v Idl ( B, v B ) s ( y ). Since Idl (cid:0) B, v B (cid:1) is locallysmall, so must D . (cid:74) We have now developed the theory sufficiently to give a proof of Example 60.
Proof of Example 60 (Scott’s D ∞ is algebraic). Firstly, notice that D is not just a U -dcpo,but in fact a U -sup lattice, i.e. it has joins for all families indexed by types in U . Moreover,since joins in exponentials are given pointwise, every D n is in fact a U -sup lattice. In par-ticular, every D n has all finite joins. Hence, if we have α : I → D n with I : U , then wecan consider the directed family α : I → D n with I : ≡ P k : N ( Fin k → D n ) and α mapping apair ( k, f ) to the finite join W ≤ i Every D n is locally small and has a basis β n : B n → D n of compact elements. Proof. We prove this by induction. For n = 0, this follows from Lemma 18 and Example 58.Now suppose that B m is locally small and has a basis β m : B m → D m . By Lemma 79, thedcpo B m +1 ≡ B B m m is locally small. If we have a, b : B m , then we define the continuous step function ( a ⇒ b ) : D m → D m by x W β m ( a ) v x β m ( b ), which is well-defined since D m is locally small. We are going to show that a ⇒ b is compact for every a, b : B m and thatevery f : D m +1 is the join of certain step functions. To this end, we first observe that( a ⇒ b v f ) ⇐⇒ ( β m ( b ) v f ( β m ( a ))) , ( † )which follows from the fact that continuous functions are monotone.For compactness, suppose that a ⇒ b v F i : I f i . By ( † ) we have β m ( b ) v W i : I ( f i ( β m ( a ))).By compactness of β m ( b ), there exists i : I such that β m ( b ) v f i ( β m ( a )) already. Using ( † )once more, we get the desired a ⇒ b v f i .Now let f : D m → D m be continuous. We claim that f is the join of the step-functionsbelow it, i.e. f = W a,b : B m ,a ⇒ b v f a ⇒ b , which is well-defined, since D m +1 is locally small.One inequality clearly holds as we are only considering step-functions below f . For thereverse inequality, let x : D m be arbitrary. By Lemma 77, we have: x = G a : B m β m ( a ) (cid:28) x β m ( a ) and f ( x ) = G b : B m β m ( b ) (cid:28) f ( x ) β m ( b ) . ( ‡ )Hence, it suffices to show that β m ( b ) v W a,b : B m ,a ⇒ b v f ( a ⇒ b )( x ) whenever b : B m is suchthat β m ( b ) (cid:28) f ( x ). By ( † ) and the definition of a step-function it is enough to find a : B m such that β m ( b ) v f ( β m ( a )) and β m ( a ) v x . Using ( ‡ ), our assumption β m ( b ) (cid:28) f ( x )and continuity of f , we get that there exists a : B m with β m ( a ) (cid:28) x (and thus β m ( a ) v x )and b m ( b ) v f ( β m ( a )), as desired.Thus, by the paragraph preceding the claim, D m +1 has a basis of compact elements: β m +1 : ( P k : N ( Fin ( k ) → ( D m × D m ))) → D m +1 with β m +1 ( k, λi. ( a i , b i )) : ≡ W ≤ i Example 82 (A continuous dcpo that is not algebraic) . We inductively define a typeand an order representing dyadic rationals m/ n in the interval ( − , 1) for integers m, n .The intuition for the upcoming definitions is the following. Start with the point 0 in themiddle of the interval (represented by center below). Then consider the two functions(respectively represented by left and right below) l, r : ( − , → ( − , l ( x ) = ( x − / r ( x ) = ( x + 1) / l ( x ) < < r ( x ) for every x : ( − , (cid:73) Definition 83 (Dyadics D ) . The type of dyadics D : U is the inductive type with threeconstructors: center : D left : D → D right : D → D . (cid:73) Definition 84 (Order ≺ on D ) . Let ≺ : D → D → U be inductively defined as: center ≺ center : ≡ left x ≺ center : ≡ right x ≺ center : ≡ center ≺ left y : ≡ left x ≺ left y : ≡ x ≺ y right x ≺ left y : ≡ center ≺ right y : ≡ left x ≺ right y : ≡ right x ≺ right y : ≡ x ≺ y. One then shows that ≺ is proposition-valued, transitive, irreflexive, trichotomous, dense andthat it has no endpoints. Trichotomy means that exactly one of x ≺ y , x = y , y ≺ x holds. Density says that for every x, y : D , there exists some z : D such that x ≺ z ≺ y . Finally, having no endpoints means that for every x : D , there exist some y, z : D with y ≺ x ≺ z . . de Jong and M. H. Escardó 23 Using these properties, we can show that ( D , ≺ ) is a U -abstract basis. Thus, taking therounded ideal completion, we get Idl ( D , ≺ ) : U - DCPO U , U , which is continuous with basis ↓ ( − ) : D → Idl ( D , ≺ ) by Theorem 71. But Idl ( D , ≺ ) cannot be algebraic, since none of itselements are compact. Indeed suppose that we had an ideal I with I (cid:28) I . By Lemma 70,there would exist x ∈ I with I v ↓ x . But this implies x ≺ x , but ≺ is irreflexive, so this isimpossible. We have developed domain theory constructively and predicatively in univalent foundations,including Scott’s D ∞ model of the untyped λ -calculus, as well as notions of continuous andalgebraic dcpos. We avoid size issues in our predicative setting by having large dcpos withjoins of small directed families. Often we find it convenient to work with locally small dcpos,whose orders have small truth values.In future work, we wish to give a predicative account of the theory of algebraic andcontinuous exponentials, which is a rich and challenging topic even classically. We also intendto develop applications to topology and locale theory. First steps on formal topology andframes in cubical type theory [6, 8] are developed in Tosun’s thesis [44], and our notion ofcontinuous dcpo should be applicable to tackle local compactness and exponentiability.It is also important to understand when classical theorems do not have constructive andpredicative counterparts. For instance, Zorn’s Lemma doesn’t imply excluded middle but itimplies propositional resizing [11] and we are working on additional examples.We have formalized the following in Agda [12], in addition to the Scott model of PCFand its computational adequacy [10, 20]: dcpos, limits and colimits of dcpos, Scott’s D ∞ , lifting and exponential constructions, pointed dcpos have subsingleton joins (in the right universe), way-below relation, continuous, algebraic dcpos, interpolation properties, abstract bases and rounded ideal completions (including its universal property), continuous dcpos are continuous retract of their ideal completion, and hence of algebraicdcpos, ideal completion of dyadics, giving an example of a non-algebraic, continuous dcpo.In the near future we intend to complete our formalization to also include Theorems 21, 23and 25, Examples 59 and 60, and Lemma 79. References S. Abramsky and A. Jung. Domain theory. In S. Abramsky, D. M. Gabbay, and T. S. E.Maibaum, editors, Handbook of Logic in Computer Science , volume 3, pages 1–168. ClarendonPress, 1994. Jiří Adámek and Jiří Rosický. Locally Presentable and Accessible Categories , volume 189of London Mathematical Society Lecture Note Series . Cambridge University Press, 1994. doi:10.1017/CBO9780511600579 . Roberto M. Amadio and Pierre-Louis Curien. Domains and Lambda-Calculi , volume 46of Cambridge Tracts in Theoretical Computer Science . Cambridge University Press, 1998. doi:10.1017/CBO9780511983504 . Andrej Bauer and Iztok Kavkler. A constructive theory of continuous domains suitable forimplementation. Annals of Pure and Applied Logic , 159(3):251–267, 2009. doi:10.1016/j.apal.2008.09.025 . Nick Benton, Andrew Kennedy, and Carsten Varming. Some domain theory and denotationalsemantics in Coq. In Stefan Berghofer, Tobias Nipkow, Christian Urban, and Makarius Wenzel,editors, Theorem Proving in Higher Order Logics (TPHOLs 2009) , volume 5674 of Lecture Notesin Computer Science , pages 115–130. Springer, 2009. doi:10.1007/978-3-642-03359-9_10 . Cyril Cohen, Thierry Coquand, Simon Huber, and Anders Mörtberg. Cubical Type Theory:A Constructive Interpretation of the Univalence Axiom. In Tarmo Uustalu, editor, , volume 69 of Leibniz International Proceedings in Informatics (LIPIcs) , pages 5:1–5:34. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPIcs.TYPES.2015.5 . The Agda community. Agda wiki. https://wiki.portal.chalmers.se/agda/pmwiki.php . Thierry Coquand, Simon Huber, and Anders Mörtberg. On Higher Inductive Types inCubical Type Theory. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logicin Computer Science , pages 255–264. Association for Computing Machinery, 2018. doi:10.1145/3209108.3209197 . Thierry Coquand, Giovanni Sambin, Jan Smith, and Silvio Valentini. Inductively generatedformal topologies. Annals of Pure and Applied Logic , 124(1–3):71–106, 2003. doi:10.1016/s0168-0072(03)00052-6 . Tom de Jong. The Scott model of PCF in univalent type theory. November 2019. arXiv:1904.09810 . Tom de Jong. Domain theory in predicative Univalent Foundations. Abstract for a talk at HoTT/UF 2020 on 7 July, 2020. URL: https://hott-uf.github.io/2020/HoTTUF_2020_paper_14.pdf . Tom de Jong. Formalisation of domain theory in constructive and predicative univalentfoundations. https://github.com/tomdjong/TypeTopology , June 2020. Agda development. Robert Dockins. Formalized, Effective Domain Theory in Coq. In Gerwin Klein and RubenGamboa, editors, Interactive Theorem Proving (ITP 2014) , volume 8558 of Lecture Notes inComputer Science , pages 209–225. Springer, 2014. doi:10.1007/978-3-319-08970-6_14 . Martín H. Escardó. The proof of the interpolation property of the way-below relation ofa continuous poset. 18 March, 2000. URL: . Martín H. Escardó and Cory M. Knapp. Partial Elements and Recursion via Dominancesin Univalent Type Theory. In Valentin Goranko and Mads Dam, editors, , volume 82 of Leibniz InternationalProceedings in Informatics (LIPIcs) , pages 21:1–21:16. Schloss Dagstuhl–Leibniz-Zentrum fürInformatik, 2017. doi:10.4230/LIPIcs.CSL.2017.21 . Martín Hötzel Escardó. Introduction to Univalent Foundations of Mathematics with Agda.February 2020. arXiv:1911.00580 . Martín Hötzel Escardó. Various new theorems in constructive univalent mathematics written inAgda. https://github.com/martinescardo/TypeTopology , June 2020. Agda development. G. Gierz, K. H. Hofmann, K. Keimel, J. D. Lawson, M. Mislove, and D. S. Scott. Continu-ous Lattices and Domains , volume 93 of Encyclopedia of Mathematics and its Applications .Cambridge University Press, 2003. doi:10.1017/CBO9780511542725 . Gerhard Gierz, Karl Heinrich Hofmann, Klaus Keimel, Jimmie D. Lawson, Michael W. Mislove,and Dana S. Scott. A Compendium of Continuous Lattices . Springer Berlin Heidelberg, 1980. doi:10.1007/978-3-642-67678-9 . Brendan Hart. Investigating Properties of PCF in Agda. MSci project, School of ComputerScience, University of Birmingham, 2020. Report and Agda code available at https://github.com/BrendanHart/Investigating-Properties-of-PCF . Michael Hedberg. A type-theoretic interpretation of constructive domain theory. Journal ofAutomated Reasoning , 16(3):369–425, 1996. doi:10.1007/BF00252182 . . de Jong and M. H. Escardó 25 J. M. E. Hyland. First steps in synthetic domain theory. In A. Carboni, M. C. Peddicchio, andG. Rosolini, editors, Category Theory , volume 1488 of Lecture Notes in Mathematics , pages131–156. Springer, 1991. doi:10.1007/bfb0084217 . Peter Johnstone and André Joyal. Continuous categories and exponentiable toposes. Journalof Pure and Applied Algebra , 25(3):255–296, 1982. doi:10.1016/0022-4049(82)90083-4 . Tatsuji Kawai. Predicative theories of continuous lattices. June 2020. arXiv:2006.05642 . Nicolai Kraus, Martín Escardó, Thierry Coquand, and Thorsten Altenkirch. Notions ofAnonymous Existence in Martin-Löf Type Theory. Logical Methods in Computer Science ,13(1), 2017. doi:10.23638/LMCS-13(1:15)2017 . David Lidell. Formalizing domain models of the typed and the untyped lambda calculus inAgda. Master’s thesis, Chalmers University of Technology and University of Gothenburg,2020. Final version in preparation. Agda code available at https://github.com/DoppeD/ConsistentCwfsOfDomains . John Longley and Dag Normann. Higher-Order Computability . Springer, 2015. doi:10.1007/978-3-662-47992-6 . Maria Emilia Maietti and Silvio Valentini. Exponentiation of Scott formal topologies. InA. Jung M. Escardó, editor, Proceedings of the Workshop on Domains VI , volume 73, pages111–131, 2004. doi:10.1016/j.entcs.2004.08.005 . Michael Makkai and Robert Paré. Accessible categories: the foundations of categorical modeltheory , volume 104 of Contemporary Mathematics . American Mathematical Society, 1989. doi:10.1090/conm/104 . Sara Negri. Continuous lattices in formal topology. In Eduardo Giménez and ChristinePaulin-Mohring, editors, Types for Proofs and Programs (TYPES 1996) , volume 1512 of Lecture Notes in Computer Science , pages 333–353. Springer, 1998. doi:10.1007/BFb0097800 . Sara Negri. Continuous domains as formal spaces. Mathematical Structures in ComputerScience , 12(1):19–52, 2002. doi:10.1017/S0960129501003450 . Dirk Pattinson and Mina Mohammadian. Constructive Domains with Classical Witnesses.June 2020. arXiv:1910.04948 . G. D. Plotkin. LCF considered as a programming language. Theoretical Computer Science ,5(3):223–255, 1977. doi:10.1016/0304-3975(77)90044-5 . Bernhard Reus. Formalizing synthetic domain theory — the basic definitions. Journal ofAutomated Reasoning , 23(3-4):411–444, 1999. doi:10.1023/A:1006258506401 . Bernhard Reus and Thomas Streicher. General synthetic domain theory — a logicalapproach. Mathematical Structures in Computer Science , 9(2):177—-223, 1999. doi:10.1017/S096012959900273X . G. Rosolini. Categories and effective computations. In David H. Pitt, Axel Poigné, andDavid E. Rydeheard, editors, Category Theory and Computer Science , volume 283 of LectureNotes in Computer Science , pages 1–11. Springer, 1987. Giuseppe Rosolini. Continuity and effectiveness in topoi . PhD thesis, University of Oxford,1986. Giovanni Sambin. Intuitionistic formal spaces—a first communication. In Mathematical logicand its applications , pages 187–204. Springer, 1987. doi:10.1007/978-1-4613-0897-3_12 . Giovanni Sambin, Silvio Valentini, and Paolo Virgili. Constructive domain theory as a branchof intuitionistic pointfree topology. Theoretical Computer Science , 159(2):319–341, 1996. doi:10.1016/0304-3975(95)00169-7 . Dana S. Scott. Continuous lattices. In F.W. Lawvere, editor, Toposes, Algebraic Geometryand Logic , volume 274 of Lecture Notes in Mathematics , pages 97–136. Springer, 1972. doi:10.1007/BFB0073967 . Dana S. Scott. Lectures on a mathematical theory of computation. In Manfred Broy andGunther Schmidt, editors, Theoretical Foundations of Programming Methodology: LectureNotes of an International Summer School, directed by F. L. Bauer, E. W. Dijkstra and C. A. R. Hoare , volume 91 of NATO Advanced Study Institutes Series , pages 145–292. Springer,1982. doi:10.1007/978-94-009-7893-5_9 . Dana S. Scott. A type-theoretical alternative to ISWIM, CUCH, OWHY. Theoretical ComputerScience , 121(1):411–440, 1993. doi:10.1016/0304-3975(93)90095-B . Andrew W. Swan. Choice, collection and covering in cubical sets. Talk in the electronic HoTTEST seminar, 6 November. Slides at . Video recording at , 2019. Ayberk Tosun. Formal Topology in Univalent Foundations. Master’s thesis, ChalmersUniversity of Technology and University of Gothenburg, 2020. Agda code available at: https://github.com/ayberkt/formal-topology-in-UF . doi:20.500.12380/301098 . Taichi Uemura. Cubical Assemblies, a Univalent and Impredicative Universe and a Failureof Propositional Resizing. In Peter Dybjer, José Espírito Santo, and Luís Pinto, editors, , volume130 of Leibniz International Proceedings in Informatics (LIPIcs) , pages 7:1–7:20. SchlossDagstuhl–Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.TYPES.2018.7 . The Univalent Foundations Program. Homotopy Type Theory: Univalent Foundations ofMathematics . https://homotopytypetheory.org/book , Institute for Advanced Study, 2013. Vladimir Voevodsky. Resizing rules — their use and semantic justification. Slides from atalk at TYPES, Bergen, 11 September, 2011. URL: . Vladimir Voevodsky. An experimental library of formalized mathematics based on the univalentfoundations. Mathematical Structures in Computer Science , 25(5):1278–1294, 2015. Vladimir Voevodsky, Benedikt Ahrens, Daniel Grayson, et al. UniMath — a computer-checkedlibrary of univalent mathematics. Available at https://github.com/UniMath/UniMathhttps://github.com/UniMath/UniMath