The Lambda Calculus Is Quantifiable
Abstract
In this paper we introduce several quantitative methods for the lambda-calculus based on partial metrics, a well-studied variant of standard metric spaces that have been used to metrize non-Hausdorff topologies, like those arising from Scott domains. First, we study quantitative variants, based on program distances, of sensible equational theories for the -calculus, like those arising from Böhm trees and from the contextual preorder. Then, we introduce applicative distances capturing higher-order Scott topologies, including reflexive objects like the model. Finally, we provide a quantitative insight on the well-known connection between the Böhm tree of a -term and its Taylor expansion, by showing that the latter can be presented as an isometric transformation.
Keywords and phrases:
Lambda-calculus, Scott semantics, Partial metric spaces, Böhm trees, Taylor expansionFunding:
Paolo Pistone: Research has been funded by the French project ANR-23-CPJ1-0054-01.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Lambda calculus ; Theory of computation Program semanticsEditors:
Jörg Endrullis and Sylvain SchmitzSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Two notions of program approximation.
One of the fundamental goals of program semantics is to understand when two different programs compute the same function. This is why, since its origins, the semantics of the -calculus, the mathematical foundation for higher-order programming languages, has been focused on the problem of program equivalence. Indeed, -theories, the equational theories of the -calculus, constitute one of the pillars of the mathematical theory behind this much studied language, ranging from more operational theories, like -equivalence, to more observational ones, like contextual equivalence.
Actually, several well-known denotational models of the -calculus are not just the source for some -theory, but they also provide a topological point of view on them: the interpretations of the -calculus via Böhm trees, Scott domains or the Taylor expansion, involve spaces whose objects can be seen as limits of “finite” approximants, as well as continuous functions between such spaces, that is, functions commuting with such limits. In this way, the -theory induced by a topological model is associated with a notion of approximation, in the sense that a program is equivalent to another program whenever the net of finite approximants of the first converges to the second.
However, in general computer science, the approximation of a program is more commonly thought as the fact of computing values which are close (possibly up to some probability) to those produced by the program itself. By the way, the replacement of computationally expensive algorithms by more efficient, but somehow inaccurate, ones, is pervasive in all domains involving probabilistic or numerical methods. This has motivated, in the last few years, a rise of interest towards semantic approaches to functional languages focused, rather than on program equivalence, on notions of program similarity [37, 17, 11, 14, 16]. In these approaches, each type is endowed with a pseudo-metric, measuring the amount to which two programs behave in a similar, although non necessarily equivalent, way, and thus providing ways to estimate the errors produced by approximated optimization methods. At the same time, since any pseudo-metric induces an equational theory over programs, namely the one formed by all the pairs of programs which are at no distance the one from the other, this approach can be seen as a way to enrich, or “topologize”, well-established notions of program equivalence.
Quantifying -theories via partial metrics.
In a sense, the overall goal of this paper is to reconcile these two, apparently different, ways to look at program approximations, by developing metric counterparts to well-established methods for the -calculus, thus providing ways to enrich -theories with notions of program similarity.
One reason why one could wish to approximate -theories by metrics is computational: while equational theories are generally undecidable, equivalences and, as we’ll see, distances of finite approximants can often be computed effectively. Could one thus express the equivalence between two terms as the fact that the distance between their respective approximants gets closer and closer to zero? This amounts to requiring that the limits in the topology generating the -theory are also limits in the topology generated by some program pseudo-metric. In other words, that is finer than .
At the same time, since program metrics are generally undecidable as well, could the distances between two programs be themselves approximated by looking at the (computable) distances between their approximants? This amounts to requiring, conversely, that the metric limits, that is, the limits in , are also limits in the topology inducing the -theory. In other words, that is finer than .
All this sums up to the following question: can we make the topology arising from the semantics and the topology arising from the metric coincide? At first, one would tend to answer no: for instance, while the topology of a metric space is always Hausdorff, the topologies arising from the semantics of the -calculus (e.g. Scott domains) are not. Nevertheless, there is a well-known reply to this answer, namely partial metrics [8, 9, 28, 42, 40, 38], a well-studied variant of standard metrics developed in connection with ideas from program semantics. A partial metric differs from a standard metric in that the self-distances need not be zero; correspondingly, one has a stronger triangular law of the form , taking into account the self-distance of the middle point . As a consequence, distinct points will not have disjoint neighborhoods, as soon as the self-distance of one makes it “too thick”, so to say, to separate it from the other.
In fact, any continuous domain with a countable basis is quantifiable (a term we borrow from [40]) by a partial metric. This means that its Scott topology does coincide with the topology induced by the metric [9, 35, 42, 40, 41], so that the limits in the Scott topology agree with the metric limits and viceversa.
While the quantification of domains via partial metrics has been well-known for a while, the application of such results to the study of higher-order languages has not been much explored so far. We do it in this paper: we introduce quantitative variants for well-known methods like Böhm trees, Scott domains and the Taylor expansion, based on partial metrics, at the same time providing ways to approximate their associated -theories.
Contributions.
In this paper we show that several well-known approaches to the study of the -calculus can be quantified, that is, enriched with metric reasoning on program similarity. Our contributions can be summarized as follows:
-
We introduce a partial metric variant of the notion of sensible -theory [5] and we explore quantitative versions of well-known theories like those arising from Böhm trees and the contextual preorder.
-
We introduce applicative partial metrics, and we illustrate their use to quantify higher-order Scott domains as well as reflexive objects, like Scott’s model . This opens the way to apply metric techniques to typed or non-typed higher-order languages.
-
Finally, we study the Taylor expansion of -terms [18, 19, 4], a powerful technique inspired by ideas from linear logic, and show that it can be presented as an isometric transformation from Böhm trees to sets of resource -terms, thus refining the well-known commutation theorem [20], that relates the corresponding -theories.
Outline.
In Section 2 we recall basic notions about partial metric spaces. In Section 3 we introduce quantitative variants of sensible -theories. In Section 4 we investigate the quantification of higher-order Scott domains via applicative distances, and in Section 5 we apply these ideas to the quantification of reflexive objects. In Section 6 we discuss the Taylor expansion. Finally, in Section 7 we indicate related work as well as a few future directions.
2 Partial Metric Spaces
In this section we introduce partial metric spaces and we illustrate a few examples.
Definition 1.
A function is called a partial metric (PM) when it satisfies the following axioms:
-
(P1)
,
-
(P2)
If then ,
-
(P3)
,
-
(P4)
.
is called a partial pseudo-metric (PPM) when it satisfies P1, P3 and P4, and a partial ultra-metric (PUM) when it satisfies P1, P3 and
- (P4U)
-
.
While in a standard (pseudo-)metric space each point is at distance from itself, condition P1 states that the distance of a point from itself is only required to be smaller than its distance from any other point. Condition P2 adapts the usual separation condition to non-zero self-distances, and distinguishes PMs from PPMs. Condition P3 is the usual symmetry, while P4 is a strengthening of the triangular law of metric spaces, that also takes into account the possibly non-zero self-distance of the middle point . P4U is as for standard ultra-metric spaces. Notice that P4U implies P4, so PUMs are indeed PPMs. Notice that a PPM (resp. a PUM, a PM) always induces a pseudo-metric (resp. a ultra-metric, a metric) by the formula .
A PPM induces a preorder on defined by iff . Notice that this implies by P1 that . When is a PM the preorder is indeed an order. With respect to this preorder, is antimonotonic in the sense that implies . Intuitively, the higher points are those with smaller self-distance.
The symmetrization of the preorder yields an equivalence relation . In the next section we will indeed explore the use of partial metrics as ways of approximating preorders or equivalence relations on -terms. We will say that a PPM quantifies an order (resp. an equivalence) relation over when this relation coincides with (resp. ).
Let us now talk about the topology induced by a PPM.
Definition 2 (open balls, topology).
Let be a PPM on . For any and , the open ball of center and radius is the set . The topology of , noted , is formed by all subsets which are unions of open balls.
Recall that, by P1, the distance between two points is always greater or equal than the self-distances . We could equivalently define open balls as for standard metric spaces, i.e. , but this would make empty whenever . Open balls are upper: if and , by antimonotonicity we deduce , whence . As a consequence, all open sets are upper.
Contrarily to standard metric spaces, the topology is not in general Hausdorff: suppose are distinct points such that ; since any open set containing must also contain , there can be no disjoint open sets such that and . In some cases, as we’ll see, may coincide with the Scott topology induced by the order .
In Sections 4 and 5 we will explore the use of partial metrics as ways of approximating (Scott) topologies on -terms. We will say that a PPM quantifies a topology over when .
Continuous functions between PPMs can be defined in the usual topological sense: given PPMs , respectively on and , a function is -continuous when sends open sets in onto open sets in . There is an equivalent -definition: is -continuous if for all and , there exists such that .
We compare different PPMs on a set by relating the associated topologies:
Definition 3.
Given two PPMs on , we say that is finer than (noted ) when .
Equivalently, when the identity map is -continuous, i.e. every open -ball contains an open -ball around any of its points.
We conclude this short presentation with a few examples.
Example 4 (Sierpinski space).
The simplest example of a non-Hausdorff topology that is quantified by a partial metric is the Sierpinski space , with the Scott topology induced by the order . Define the PM on by and . Notice how this implies . Since has self-distance , the unique open balls are indeed , and , that is, .
Example 5 (Intervals).
The closed intervals of , noted , admit the PM , which is the size of the smallest interval containing and . The order defined by the metric here is intuitive, it is reverse inclusion/the Scott information order: iff iff . The more information one has, the higher. This example explains the choice of the word “partial”: an interval, in term of Scott topology, represents an information on a partial execution: we have yet to discover the precise real number that we are computing. By contrast, the total elements will be those with self distance (the ones where behaves like a regular metric), i.e. of the form , a complete information, of a terminated execution.
Example 6 (Labeled trees).
Let be the set of (non necessarily finite) finitely branching -labeled trees, where is a countable set of labels. For any , let indicate the height of . For any , let be the finite tree obtained by truncating all paths of at length , if , and be undefined otherwise. We write to indicate that and are both definite and equal, and for its negation. For any , define .
The standard tree (ultra-)metric is defined by if and otherwise. We obtain instead a PUM by simply letting (where it is intended that ). For a finite tree , its self-distance is , while holds iff has infinite height. Also this case suggests that finite trees are seen as “partial” objects, while the infinite trees are the “total” ones. Indeed, , unlike , quantifies the Scott topology on (see Section 4).
3 Quantifying -Theories
In this section we introduce quantitative variants, based on partial metrics, of sensible -theories that arise from well-studied models of the untyped lambda-calculus, that is, the theory of Böhm trees and the theory of contextual equivalence. Moreover, we lift several properties of such equational theories to the corresponding notion of program similarity.
-PPMs.
Let us first recall the standard notion of -theory [5].
Definition 7.
A -theory is an equivalence relation on the set of all -terms satisfying the rules below:
- (congr1)
-
,
- (congr2)
-
,
- ()
-
,
- ()
-
.
A -theory is said extensional when it satisfies the rule :
- ()
-
.
and sensible when it equates all unsolvable terms and does not equate a solvable and an unsolvable term.
Notice that a sensible theory must be consistent: it cannot equate all terms.
A -theory may either arise from an operational theory (e.g. - and -reduction) or be induced by a model (as the theory formed by all equations between terms that are interpreted by the same entity in the model). While there exists a continuum of different -theories, beyond the theories of and -equivalence (respectively, the smallest -theory and the smallest extensional -theory), very few theories have been studied in depth. Indeed, all most common denotational models of the untyped -calculus induce one of the two sensible theories , and , that we consider below.
We now introduce a quantitative variant of -theories. Let us first recall that a point in a topological space is said generic when its closure is or, equivalently, all its neighborhoods are dense in . For instance, is generic in the Sierpinski space . In the case of PPM we have the following:
Lemma 8.
is generic in the topology iff holds for all .
Proof.
Call generic for if (that is, ) holds for all . is generic for iff the only open ball centered at is : from it follows that for any , , that is, ; conversely, if any open ball centered at is equal to , then, for all , , which implies and thus by P1.
Now, if is generic for , then any open set containing must contain some open ball , which forces since , so is generic in . Conversely, if is generic in , then for any , the closure of is . This implies that for all , , and thus that , so is generic for .
Remark 9.
Generic points are indistinguishable: if and are both generic for , then from it follows that . Conversely, if is generic and is not, then, : if , then, since , for all , , so would be generic as well.
Definition 10 (-PPM).
A pseudo-partial metric over is called a -PPM (resp. an extensional -PPM) if the following hold:
-
is a -theory (resp. an extensional -theory);
-
all contexts correspond to -continuous maps .
is called sensible if all unsolvable terms are generic while no solvable term is.
Observe that we do not require contexts to be non-expansive (or -Lipschitz), as in other standard metric approaches [37, 17, 15], but just continuous. Also notice that, by Remark 9, a sensible PPM must satisfy for all unsolvable terms , and for unsolvable and solvable: the associated -theory is thus sensible.
In the rest of this section we introduce -PPMs quantifying the -theories and .
Böhm Trees.
The interpretation of -terms as Böhm trees is one of the fundamental tools in the -calculus. The Böhm tree of a -term is a -labeled tree defined co-inductively as follows:
-
if reduces to , then has a root with label and subtrees ;
-
otherwise, only consists of the root, with label .
An alternative presentation of is via partial terms, which are -terms in normal form, enriched with the constant and rules , . We note these partial terms . The set of partial terms is ordered by the contextual closure of the relation generated by , for all . Partial terms correspond straightforwardly to finite Böhm trees.
For any -term , let the partial term be defined inductively as follows: if , and if . Let whenever -reduces to with . We then let . Observe that can be seen at the same time as a tree under the relation , and the standard tree ordering holds precisely when is included in .
The -theory contains all equations , where . is sensible but non-extensional (as e.g. ).
We now introduce the corresponding -PPM: we measure the distance between -terms by comparing their Böhm trees via the tree partial metric.
Definition 11 (Böhm partial metric).
For any two -terms , let
Observe that iff is infinite. It is not difficult to check that captures the theory :
Proposition 12.
iff , and thus iff .
As discussed in Section 4, captures the Scott topology of Böhm trees. This proves that contexts are continuous, and thus that is a -PPM. Moreover, since , the unsolvable terms are generic, while, for any solvable term , and thus, for any , the open ball does not contain the term (since ).
Remark 13.
While the theory is -complete, the distances are effectively computable whenever are finite trees (equivalently, partial terms). Moreover, to check that , it is necessary and sufficient to find approximants and such that .
Contextual equivalence.
We now consider the theory arising from contextual equivalence. Let if for all context , if is solvable, then is solvable. The theory contains all equations where and both hold. It is extensional and sensible, and is indeed the maximum sensible theory.
To quantify we define the following distance:
Definition 14 (contextual partial metric).
For all terms , we define
where is an enumeration of all contexts.
The distance intuitively counts all contexts that fail on either or . In particular, the self-distance counts the contexts that fail on .
The following result shows that captures the contextual preorder:
Proposition 15.
iff , and thus iff .
For the result above, the choice of the enumeration is irrelevant, as is the choice of the weights , which could be replaced by arbitrary weights summing up to .
Remark 16.
Contrarily to contextual equivalence, which is -complete as well, to check that one does not need to look at the behavior of and under all contexts. Intuitively, contains all those programs that behave like on certain finitely many contexts. Indeed, means that the contexts on which does converge and does not sum up to some value strictly smaller than . This is true iff converges on those finitely many contexts , where , on which converges.
Proposition 17.
is a sensible extensional -PPM.
Proof.
Let us show that contexts yield continuous maps. Take a term , and a context . We need to find some such that for all , . By Remark 16 there exists a finite number of contexts such that is solvable and iff is solvable for . Take such that for all , the context has an index smaller than , and let . Notice that is solvable. Moreover, for any term , if , then must be solvable for all . This implies then that , as desired.
The sensibility of essentially follows from the well-known genericity lemma [5, 2]: if is solvable, where is unsolvable, then must be solvable for all ; this implies that for any unsolvable , and for any term , , so is generic in . Conversely, if is solvable, then, for any unsolvable term , one can easily construct a context such that reduces to and diverges. This allows us to conclude that , and thus that is not generic in .
Similarly to the -theory , the -PPM is maximum among sensible -PPMs.
Proposition 18.
For any sensible -PPM , .
Proof.
Let be a sensible -ppm. Consider a term and . We must find such that . By Remark 16 there exists a finite number of contexts such that is solvable and iff is solvable for .
Fix an and let . Since is solvable and is sensible, we can find an open set containing and not containing any unsolvable term. Since is a -PPM, corresponds to a continuous function, and thus contains some open ball . Let : if , then for all , , so it must be solvable. We conclude then that .
Remark 19.
That can be easily seen directly: the elements of are those which converge on a finite number of contexts on which converges too (cf. Remark 16). For any such context , the convergence of to a head normal form only depends on the exploration of a finite portion of , say up to height . Letting and , we have then that . The converse inclusion cannot hold: any open ball around that does not contain its -expansion contains no open -ball around .
Other well-known characterizations of exist, which suggest different ways to quantify this theory. One is in terms of the so-called Nakajima trees (cf. [5], Ex. 19.4.4, p. 511): these are a variant of Böhm trees that are invariant under the -rule. By adapting the tree partial metric one could then obtain another partial metric that quantifies .
Moreover, the theory is induced by a large class of denotational models of the -calculus (cf. [31]), including in particular the models based on Scott domains, that we discuss in Sections 4 and 5, or the relational model from [6], to which the techniques illustrated in those sections can be easily adapted.
4 Quantifying Scott Domains
As discussed in the introduction, the -theories like or are induced by topological models, based on Scott domains, which provide notions of approximant for -terms. In this section, after discussing the connection between partial metrics and Scott domains, we introduce applicative PPMs as a means to capture domains of Scott-continuous functions, and we illustrate how this leads to quantify topological models of typed -calculi.
Scott Domains via Partial Metrics.
Let us recall some basic terminology about dcpos and Scott domains.
A partially ordered set is a dcpo (directed complete partial order) if all directed subsets of admit a least upper bound. The way below relation on a dcpo is defined by iff for all directed subset , implies , for some . A point is said compact if . A basis for a dcpo is a subset such that for any , the set is directed and . A dcpo is said continuous if it has a basis and algebraic if it has a basis formed of compact elements. A domain is a continuous dcpo with a countable basis. A domain is bounded complete if for any finite set , if an upper bound of exists in , then exists in . A bounded complete and algebraic domain is called a Scott domain.
The Scott topology on a partially ordered set has open sets being upper subsets which are finitely accessible: implies for some . A function between dcpos is said continuous iff is monotone and commutes with the lubs of directed subsets, that is, for all directed , . This is equivalent to asking to be continuous, in the usual sense, with respect to the Scott topology. The category of bounded complete domains and continuous functions is cartesian closed (cf. [1]).
Let us specify what it means for a dcpo to be quantified by a partial metric.
Definition 20.
A dcpo is quantified by a PM when its associated Scott topology is quantified by , that is, when .
Beyond the Sierpinski space , also the other two dcpos from Section 2 are quantified by the associated PMs (proofs are in the long version):
Proposition 21.
When quantifies a dcpo , the order coincides with the order of the dcpo.
Lemma 22.
Suppose the dcpo is quantified by . Then coincides with .
Proof.
coincides with the specialization order ; similarly, coincides with the specialization order . From we deduce that the two specialization orders coincide, and thus and as well.
However, checking that a partial metric captures the order of the dcpo is not in general enough to deduce that quantifies the dcpo, as shown by Example 24 below. The following proposition provides necessary (but not sufficient) conditions.
Proposition 23.
Let be a continuous dcpo and a partial metric on such that coincides with .Then the following conditions are equivalent:
-
1.
;
-
2.
open -balls are finitely accessible;
-
3.
is Scott-continuous (as a map towards the dcpo ).
Proof.
- ()
-
Since the open balls are upper sets, these are Scott open iff they are finitely accessible.
- ()
-
is Scott continuous when for all and directed subset one has . Suppose is continuous and let . We need to show that there exists such that . This implies that for some , . Since is continuous and we have then This implies in turn that for some , , that is, .
- ()
-
Suppose that open -balls are finitely accessible, hence Scott open. Let be a directed set and . We need to prove that . Observe that the “” direction directly follows from . To prove the “” direction we argue as follows: let , with . Let , so that we have . Since is Scott-open, there exists such that . From it follows that, for some , holds, whence . We have thus proved that for all there exists such that , which implies then
To check the converse condition , one must show that, given , one can form open balls around whose elements all lie way above . This corresponds to showing that the basic open sets for the Scott topology are metric open.
Example 24.
We construct a PM on that captures the tree order but fails to quantify its Scott topology. Define a variant of the tree partial metric as if or is finite, and as if is infinite. is still a partial metric and furthermore the order coincides with the tree order (and thus with as well); now, letting be a directed sequence of finite trees converging to an infinite tree , we have . Hence is not Scott-continuous, and by Proposition 23 we have that .
Remark 25 (computability of ).
An immediate and useful consequence of the fact that open balls are Scott open is that holds precisely when holds for some approximants and . In other words, to verify that is close enough to it is enough to check that the approximants of get close enough to the approximants of . When distances between approximants, as well as the relation between a point and an approximant, are computable, the property may be (semi-)decidable, even though the exact values are as hard as computing the -theory (usually, or worse). For instance, in the case of Böhm trees, to check that , it is enough to check that and coincide up to height , a property which can be semi-decided.
Example 26 (-continuity of contexts).
As quantifies the Scott topology of trees (cf. Proposition 21), it quantifies the Scott topology of Böhm trees. From the continuity theorem for Böhm trees (cf. [5]) we deduce then the following: for all context and -term and for all , there exists such that, for all terms , implies . Another way of stating this is that for all and , for all there exists such that, if and are the same up to depth , then and are the same up to depth .
Let us conclude this paragraph by recalling a very general result on the quantifiability of domains, already mentioned in the Introduction:
Theorem 27 (cf. [40]).
Let be a domain with a countable basis , and let be a sequence of weights such that . Then is quantified by the partial metric , where .
While Theorem 27 provides a general positive answer to the quantifiability problem for domains, the practical usability of metrics like depends on whether the relation between a point and an approximant, and its negation, are computable.
Applicative distances and the function space.
The categories of Scott domains (resp. bounded complete domains) and continuous functions are sub-categories of that are, as is well-known, cartesian closed. Using Theorem 27 it is possible to define, on each object of such categories, a partial metric that quantifies its topology. However, in common approaches to higher-order languages (e.g. [17, 25, 16]), one requires distances to be defined in a compositional way.
For example, given metric spaces and , a standard way to define a metric on their cartesian product is by letting . Indeed, a similar construction also works for PMs:
Proposition 28.
Let be two Scott domains, quantified, respectively, by the partial metrics . Their cartesian product is then quantified by the partial metric .
We omit the proof of Proposition 28 as it is similar to that of Proposition 30 below (still, the proof can be found in the extended version).
Remark 29.
In the following discussion we restrict attention to partial metrics valued in , rather than on . This is not a limitation, since for any partial metric with values in , the partial metric defined by induces the same topology (cf. [34]).
Let us now consider the function space. Given metric spaces and , a standard compositional way to define a metric on the space of continuous functions from to is via the -condition . Notably, when is compact, metrizes the compact-open topology on . Other compositional metrics on the space of non-expansive functions , depending on both and , can be found in the literature [10, 15]. Similar compositional definitions are also found in more operational approaches like e.g. [37, 25].
A common intuition in all these definitions is that two functions are close when their application to close (or even identical) points produces points that are still close. We will call functional distances respecting this idea applicative distances.
However, to define an applicative PM on the space of continuous functions, we cannot directly adapt a definition like : unlike for standard (pseudo-)metrics, the s of a family of PPMs does not define a PPMs. This is due to condition P4, which relies in a contravariant way on the medium self-distance .
Instead, we will rely on the remark that a continuous function is uniquely determined by its action on the (countably many) elements of a basis of . This suggests indeed the definition from the Proposition below:
Proposition 30.
Let be two bounded complete domains, quantified, respectively, by the PMs , and let be an enumeration of a basis of . Then, for all , their exponential is quantified by the PM
| (1) |
Before proving the result above, let us first discuss the PM . The distances are defined by infinite series, which are convergent by our assumption that are bounded by 1. However, for any , the verification that can be reduced to a finitary test:
Lemma 31.
For all continuous functions , for all , there exists such that, if holds for all , then .
Proof.
Let . We must choose so that . Since , this corresponds to requiring , or, equivalently, A few computations yield then the condition .
Let us show that under this condition the claim holds. Suppose holds for . Then we have
The intuition behind the test above is that for high enough, the infinite sum gets too small to actually matter in checking that is smaller than , and one is thus reduced to the finite sum . This is indeed a key ingredient in showing that open balls of functions are finitely accessible, and in particular, that if , this only depends on finitely many values of .
Conversely, from , one can deduce bounds for all , although such bounds become more and more loose as increases, due to the exponential scaling factor .
Let us now turn to the proof of Proposition 30. First, let us recall that, given bounded complete domains , with countable bases , the domain admits a countable basis formed by all functions of the form , where , and in case , while otherwise.
Importantly, while it is always the case that implies for all , the converse need not hold. Rather, the way below relation can be characterized as follows.
Lemma 32 (cf. [21]).
For all , iff there exists basis elements and such that
-
,
-
111 Recall that is a continuous domain. For two open sets , holds when any open cover of has a finite subset which covers . , for all ,
-
.
We now have all ingredients to prove Proposition 30.
Proof of Proposition 30.
- :
-
We have to show that open balls are Scott-open. First observe that open balls are upper sets. We thus only need to show that they are finitely accessible: for all we must find some such that . Let then , so that . Observe that this implies that we can find positive reals such that and . Let be such that . For all , fix some such that , and some basis element .
Let now . From it follows that , and thus that . By Lemma 32 this implies that . Let us show that . For all , we have , whence, for all , . Let’s check that :
- :
-
It suffices to show that the basic Scott open sets contain an open p-ball around any of its points . So, suppose : by Lemma 32 there exists , such that , and . From it follows that there exists such that . Let be such that for all , has an index in the enumeration of . Let .
We claim that : let , then, from , we deduce, for , , that is, . We deduce that , and thus that . We can thus conclude that .
We conclude this section with a few examples.
Example 33 (RealPCF).
The language RealPCF [22] is an extension of PCF with a type for partial real numbers (i.e. finite approximations of real numbers or, equivalently, computable closed intervals) and primitives for computable analysis, with a canonical Scott semantics in which is interpreted via the domain . This is perfectly in line with the quantification of we presented in Example 5, which sees smaller and smaller intervals as providing more and more information. Via the applicative distances just presented, we obtain then a quantification of the Scott semantics of full RealPCF.
Example 34 (Scott topologies of open and closed sets).
Given a topological space , one can endow the space of its open sets with the Scott topology induced by the inclusion order, as well as the (homeomorphic) space of its closed sets under the Scott topology induced by the reversed inclusion order.
Whenever is exponentiable in (which is the case, in particular, whenever is a Scott domain), the bijection , where is the Sierpinski space and is the characteristic function of , is a homeomorphism [24]. Given a countable basis of , and weights with , we can then quantify and via
Example 35 (Böhm trees as closed sets).
Consider the poset of partial terms. Let be the dcpo of ideals of , that is, of lower directed subsets of . Observe that any Böhm tree is an element of , and the set is a closed set under the Scott topology of . Given an enumeration of partial terms and weights , we can then define an alternative -PPM by letting . While they produce different distances, and quantify the same topology, i.e. .
Example 36 (Scott topology of the power set).
A countable set is (trivially) a domain for the order given by equality, and its Scott topology coincides with the indiscrete topology, i.e. . Given an enumeration of , the Scott topology on is thus quantified by for .
5 Quantifying a Reflexive Object
The denotational models for the untyped -calculus correspond to the reflexive objects within some cartesian closed category, that is, the objects satisfying the isomorphism . Within cpo-enriched categories, reflexive objects can be obtained by a direct limit construction, whose paradigmatic example is Scott’s model. In this section we show how to quantify this model via applicative distances, at the same time illustrating a technique that could be adapted to other similar constructions, like e.g. the reflexive object within the relational model [6].
Quantifying Scott’s .
Let us recall the idea of the direct limit construction of a reflexive object. One starts from some bounded complete domain , and constructs a sequence of spaces , , together with maps and forming a pair called an injection/retraction pair, that is, satisfying and . One obtains then a reflexive object as the direct limit of the sequence , as well as injection-retraction pairs , .
Notice that an element of yields, for any , a function ; conversely, any compact element yields a compact element , and such elements form indeed a basis of .
Suppose now that the starting space is quantified by some PM . Using the applicative metrics from the previous section we can quantify all the by letting and , where is an enumeration of the basis elements of . We obtain then a PM quantifying by letting
Intuitively, the distance compares and by considering all possible ways of evaluating the functions on basis elements of the corresponding spaces . As for the applicative metrics from the previous section, while the distances are defined via infinite series, one can check that by a finitary criterion.
Lemma 37.
For all and , there exists such that for all , if, for all , , then .
Proof.
We must find satisfying . Notice that if satisfies , then it also satisfies the other condition, so we can argue as for Lemma 31.
The following result is proved in detail in the long version.
Theorem 38.
The partial metric quantifies the Scott topology of .
Proof.
We will exploit a few properties of the maps , proved in the extended version:
-
i.
For all , and , .
-
ii.
For all , iff there exists and such that and .
-
iii.
For all , and , .
- :
-
Let . We need to find such that and . From it follows that we can find such that and . Let be such that . Since the -balls are Scott open, for all , we can find some such that . Observe that by (i.) we have . This implies in particular that the join exists in . Define . Notice that holds so we just have to check that .
First recall that, by antimonotonicity of , . Now, for all , we have that . Then we deduce . We can now compute
- :
-
Suppose . We need to find such that . By (ii.) there exists and such that . By (iii.) there exists such that . Observe that , which implies that .
For each we can find then such that . Let . Suppose : for all , from we deduce , whence , which forces . By (i.) the last inequality implies , and we thus obtain , that is, .
The Scott -PPM.
The interpretation of closed -terms in the Scott model , for an arbitrary algebraic domain quantified by a PM , yields a PPM , where indicates the interpretation of inside . When is non-trivial (i.e. ), using well-known properties of the Scott model, yields an extensional and sensible -PPM.
The result below relates to the other -PPMs discussed in Section 3.
Proposition 39.
.
Proof sketch.
- ()
-
We exploit the approximation theorem for [5] which says that, for any closed -term , letting be the set of closed partial terms and the interpretation function, . Since is algebraic, any open ball contains some compact element . By the approximation theorem, then, we deduce that there exists a partial term such that .
Consider the open ball . Thanks to Lemma 37 one can find a finite number of sequences of basis elements and positive reals such that for all term , if holds for all , then .
By reasoning as above via the approximation theorem, we obtain partial terms such that , and we deduce then . Letting now be the height and , we thus conclude that .
The strictness follows from the fact that the associated -theories and are strictly included, as argued at the end of Remark 19 for the case of .
- ()
-
By Proposition 18, we only need to prove strictness. Let and consider the terms . It can be easily checked that, for any context , if is solvable, then must be solvable as well. This implies then that, for any , the open ball contains all the terms .
Now, one can construct a compact basis element such that, for all , (see the extended version for the details). Since coincides with the Scott topology, which is generated by the sets , for a basis element, from we deduce that there exists such that . From we deduce then , we conclude that the open -ball contains no open -ball.
Recalling that induces the theory , the relation is in accordance with what happens with the corresponding -theories. By contrast, while and the contextual preorder both induce the -theory , the first induces a -PPM which is finer than the contextual partial metric. As can be seen in the proof in the Appendix, the reason behind this is that, given terms , there exists open -balls whose elements all lie above , while cannot define any such ball, since whether cannot be tested by applying only finitely many contexts to (cf. Remark 16).
6 Quantifying the Taylor Expansion
In this section we discuss the Taylor expansion of -terms [18, 19, 20], a well-studied method that refines methods based on Böhm trees and Scott domains, by decomposing the non-linear behavior of a term into the linear behavior of a set of simpler terms, called resource -terms. Notably, several well-known properties of -terms (like e.g. continuity and stability), which were originally established by topological and semantic methods, can be proved in a simpler, combinatorial way, via the Taylor expansion [4].
The famous commutation theorem [20] says that the Taylor expansion commutes with the construction of the Böhm tree, and shows that the associated -theories coincide. By presenting the Taylor expansion as an isometric transformation, we add a quantitative flavor to this result, showing that also the corresponding notions of program similarity coincide.
All proofs of the results contained in this section can be found in the extended version.
Resource terms and the Taylor expansion.
As we said, the Taylor expansion associates a -term with a set of terms, called resource terms, with a linear operational semantics. The set of resource terms is defined by the grammar , where indicates a finite multiset of terms. We define an order over resource -terms as the context closure of the relation . The operational semantics of resource terms replaces the standard -rule with a linear monadic rule that relates a redex with the set of terms , obtained by replacing each occurrence of in by the term , whenever contains exactly occurrences of and where is any permutation in . For example, the resource term reduces to the set of terms corresponding to the two possible ways of distributing across the two occurrences of in . Instead, the resource term reduces to the empty set: as the single occurrence of cannot be duplicated, it does not suffice to replace all occurrences of in . More generally, if contains a number of occurrences of different from , then . Thanks to the impossibility of duplicating terms, linear reduction is not only confluent, but also strongly normalizing (in linear time).
The Taylor expansion of a -term is a set defined inductively as , and . For example, the Taylor expansion of is composed of all resource terms of the form . Since reduction is confluent and strongly normalizing, we can define the set containing the normal forms of the resource terms in .
The Taylor expansion extends to partial -terms by letting . In this way, we can define the Taylor expansion of a Böhm tree by . The aforementioned commutation theorem says then that ; together with the injectivity of over Böhm trees (which is easily proved), this shows the equivalence of the -theory and the -theory generated by equating all closed terms whose Taylor expansions have the same normal form.
We provide an alternative, topological, presentation of the Taylor expansion of Böhm trees. A natural choice would be to take the Scott topology induced by the resource term order . However, under this order, is not a dcpo: limits of directed sequences need not exist (as they would correspond, just like Böhm trees, to infinite terms). This leads then to consider, just like for partial terms, the completion of , which forms an algebraic dcpo. The elements of can be seen as possibly infinite resource terms, and the compact elements correspond to the finite ones, that is, to ordinary resource terms.
Recall that can be identified with the set of Böhm trees; the Taylor expansion can be presented in this setting as a map defined by To see that it is well-defined, let us observe that , so is a set of ideals. Notice that the set is closed with respect to the Scott topology of .
Defining a metric on .
We introduce a PUM on quantifying the order , which is essentially an adaptation of the tree partial metric. A normal resource term is of the form , where each is a finite multiset . The height of a resource term is defined recursively as , where is as above. For any variable occurrence in , we define its height in as if is as above, and as if the occurrence is in .
For any normal resource term and , we define the resource term , corresponding to the “truncation” of at height : if , then , and if , then we replace any subterm of of the form , where is at height , by . Observe that and holds whenever .
Definition 40 (resource partial metric).
For any two resource terms , we define
By arguing similarly to the case of trees, it can be shown that is a PUM, and that the order coincides with . Notice that .
Lifting the metric to .
We now discuss how to lift the metric to subsets of . A standard way to lift a metric from a set to its powerset is via the Hausdorff lifting Intuitively, looks, for each element of one set, for its closest element in the other set, and then measures the distance that is obtained by this operation in the worst case. The same construction, when applied to a partial metric , yields the partial Hausdorff metric (see [3, 28]) which, in spite of its name, is in fact not a partial metric, as it satisfies a weaker triangular law .
In any case, the Hausdorff lifting of the resource partial metric is not the right choice for us: suppose is an infinite Böhm tree, so that its self-distance is ; then is a set of finite terms of arbitrary depth, so that . Beyond making the Taylor expansion non-isometric, from this we deduce that is constantly over all non-empty Taylor expansions!
Instead, we introduce the following variant of the Hausdorff lifting:
Definition 41.
For any PM , let be:
Intuitively, on two sets , measures how close the elements of get to the elements of as soon as one is allowed to freely move higher within and following the order . Notice that, for an infinite Böhm tree, we now have , as desired. Similarly to the partial Hausdorff metric , for a partial metric , is not in general a partial metric. Indeed, it only satisfies the following properties:
Proposition 42.
For any partial metric space , the distance satisfies:
-
1.
;
-
2.
;
-
3.
.
However, is in fact a PM when restricted to , the dcpo of ideals with respect to the order .
Proposition 43.
For any PM on , is a PM on quantifying the order .
When , the resource partial metric, indeed quantifies the Scott topology:
Proposition 44.
The PM quantifies the Scott topology on .
Taylor is an isometry.
The Taylor expansion can be presented either as a map turning a -term into a set of resource terms, or as a map turning a Böhm tree (i.e. an infinitary normal -term) into a set of infinitary resource terms.
We will show that both maps are isometries, when considering with the Böhm PM and with the tree PM, and measuring sets of (finite/infinite) resource terms via the lifting of the resource partial metric.
Let the -PPM be defined by . As we observed, the -theory generated by equating all terms such that coincides the theory . Our result will extend this to the corresponding quantitative theories.
Let us first consider the Taylor expansion of -terms.
Theorem 45.
is an isometry. Thus, .
The results above states that, whenever the Böhm trees of two terms differ at height , then, by moving higher and higher in their normalized Taylor expansions and , one can find resource terms that differ precisely at height , and can do no better.
Let us now consider the map . Since is quantified by , we can consider its lifting to . In fact, the computation of leads us back to :
Lemma 46.
For all -terms ,
Thanks to Proposition 45, this immediately produces:
Theorem 47.
is an isometry.
Remark 48.
7 Conclusions
Related Work.
Since their introduction in [8], the literature on partial metrics has grown vast, and comprises both theoretical investigations [39, 34, 3, 29] and connections with theoretical computer science [38], notably domain theory [9, 35, 40, 41]. Recently, an elegant categorical description of partial metric spaces as quantaloid-enriched categories has been proposed [28], as well as a characterization of the partial metric spaces that are exponentiable (in a category whose morphisms are the non-expansive - or 1-Lipschitz - functions and not, as in this paper, all continuous functions). While, as we have said, the metrizability of Scott domains via partial metrics has been well known since [9, 35], not much is found in this vast literature about the specific use of partial metrics for studying the topological semantics of the -calculus or, more generally, of higher-order programming languages.
Beyond partial metrics, the literature on higher-order program metrics has been growing vast as well. As the category Met of metric spaces and non-expansive functions is not cartesian closed, the literature has focused on two complementary directions: on the one hand, restrict to cartesian closed sub-categories of Met, like ultra-metric spaces [23], or injective metric spaces [10]; [15] adapts Mardare’s et al.’s quantitative equational theories [32] to higher-order languages, introducing a notion of quantitative -theory (which, contrarily to -PPMs, require contexts to be non-expansive). On the other hand, restrict attention to linear [12, 16] or graded [37, 17] -calculi, which can be modeled in Met. Notably, [17] introduces metric CPOs, that is CPOs endowed with sub-continuous metrics (i.e. satisfying whenever holds for all ). This is a weaker condition than quantifiability, since the limits in the metric need not coincide with the CPO limits.
Differential logical relations [14, 13] have been recently introduced as a generalized approach to program metrics, relaxing usual Lipschitz, and even continuity, conditions. Notably, related models based on generalized partial metric spaces are studied in [27, 36]. In such models distances need not be positive reals but are computed on an arbitrary quantale.
Finally, several works have investigated infinitary -calculi defined via a metric completion of ordinary terms [30, 33]. These approaches are based on ultrametrics akin to the tree metric considered in this paper for Böhm trees. Recall that ordinary metric spaces are topologically Hausdorff, contrarily to the spaces considered in this paper. The metric completion of partial metric spaces is discussed in [26, 28].
Future Work.
While this paper focuses on metric counterparts for well-known techniques, our results suggest several potential developments.
The metrizability of Scott domains suggests to study models based on Lipschitz-continuous, rather than just continuous, functions, as is standard in the literature on linear -calculi. For instance, considering the Böhm metric, a non-expansive context should respect depth: if two terms coincide up to depth , then and must also coincide up to depth . This suggests connections with recent work on stratified notions of program equivalence [2].
Sections 4 and 6 introduced several methods to lift a partial metric to the powerset; using such liftings, as we suggest at several places, our results based on Scott domains could be adapted to the relational model, in which -terms are interpreted via relations .
While we here just considered the untyped -calculus and basic cartesian closed structure (i.e. finite products and exponentials), the applicative distances introduced in this paper should adapt well also to languages with coproducts and dependent types; moreover, our results on the Hausdorff lifting suggests that other monadic liftings (e.g. the probability monad) could be considered. At the same time, the metric account of RealPCF suggested at in Example 33 could be explored in more depth, for instance considering the behavior of operators like the parallel if or even program derivatives.
Finally, the fact that several partial metrics considered in this paper produce computable distances between finite approximants suggests to explore potential connections with quantitative type systems related to the relational and topological semantics, like those based on non-idempotent intersection types [7].
References
- [1] Roberto M. Amadio and Pierre-Louis Curien. Domains and Lambda-Calculi. Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 1998.
- [2] Victor Arrial, Giulio Guerrieri, and Delia Kesner. Genericity through stratification. In Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’24, New York, NY, USA, 2024. Association for Computing Machinery. doi:10.1145/3661814.3662113.
- [3] Hassen Aydi, Mujahid Abbas, and Calogero Vetro. Partial Hausdorff metric and Nadler’s fixed point theorem on partial metric spaces. Topology and its Applications, 159(14):3234–3242, 2012. doi:10.1016/j.topol.2012.06.012.
- [4] Davide Barbarossa and Giulio Manzonetto. Taylor subsumes Scott, Berry, Kahn and Plotkin. Proc. ACM Program. Lang., 4(POPL), December 2019. doi:10.1145/3371069.
- [5] Hendrik Pieter Barendregt. The lambda calculus - its syntax and semantics, volume 103 of Studies in logic and the foundations of mathematics. North-Holland, 1985.
- [6] Antonio Bucciarelli, Thomas Ehrhard, and Giulio Manzonetto. Not enough points is enough. In Jacques Duparc and Thomas A. Henzinger, editors, Computer Science Logic, pages 298–312, Berlin, Heidelberg, 2007. Springer Berlin Heidelberg. doi:10.1007/978-3-540-74915-8_24.
- [7] Antonio Bucciarelli, Delia Kesner, and Daniel Ventura. Non-idempotent intersection types for the lambda-calculus. Logic Journal of the IGPL, 25(4):431–464, 2017. doi:10.1093/jigpal/jzx018.
- [8] Michael Bukatin, Ralph Kopperman, Steve Matthews, and Homeira Pajoohesh. Partial metric spaces. American Mathematical Monthly, 116:708–718, October 2009. URL: http://www.jstor.org/stable/40391197, doi:10.4169/193009709X460831.
- [9] Michael A. Bukatin and Joshua S. Scott. Towards computing distances between programs via Scott domains. In Sergei Adian and Anil Nerode, editors, Logical Foundations of Computer Science, pages 33–43, Berlin, Heidelberg, 1997. Springer Berlin Heidelberg. doi:10.1007/3-540-63045-7_4.
- [10] Maria Manuel Clementino and Dirk Hofmann. Exponentiation in V-categories. Topology and its Applications, 153(16):3113–3128, 2006. Special Issue: Aspects of Contemporary Topology. doi:10.1016/j.topol.2005.01.038.
- [11] Raphaëlle Crubillé and Ugo Dal Lago. Metric Reasoning About Lambda-Terms: The General Case. In Hongseok Yang, editor, Programming Languages and Systems - 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, volume 10201 of Lecture Notes in Computer Science, pages 341–367, Berlin, Heidelberg, 2017. Springer. doi:10.1007/978-3-662-54434-1_13.
- [12] Fredrik Dahlqvist and Renato Neves. An Internal Language for Categories Enriched over Generalised Metric Spaces. In Florin Manea and Alex Simpson, editors, 30th EACSL Annual Conference on Computer Science Logic (CSL 2022), volume 216 of Leibniz International Proceedings in Informatics (LIPIcs), pages 16:1–16:18, Dagstuhl, Germany, 2022. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.CSL.2022.16.
- [13] Ugo Dal Lago and Francesco Gavazzo. Differential logical relations part II: increments and derivatives. In Gennaro Cordasco, Luisa Gargano, and Adele A. Rescigno, editors, Proceedings of the 21st Italian Conference on Theoretical Computer Science, Ischia, Italy, September 14-16, 2020, volume 2756 of CEUR Workshop Proceedings, pages 101–114. CEUR-WS.org, 2020. URL: http://ceur-ws.org/Vol-2756/paper_10.pdf.
- [14] Ugo Dal Lago, Francesco Gavazzo, and Akira Yoshimizu. Differential logical relations, part I: the simply-typed case. In 46th International Colloquium on Automata, Languages, and Programming, ICALP 2019, July 9-12, 2019, Patras, Greece, pages 111:1–111:14, 2019. doi:10.4230/LIPIcs.ICALP.2019.111.
- [15] Ugo Dal Lago, Furio Honsell, Marina Lenisa, and Paolo Pistone. On Quantitative Algebraic Higher-Order Theories. In Amy P. Felty, editor, 7th International Conference on Formal Structures for Computation and Deduction (FSCD 2022), volume 228 of Leibniz International Proceedings in Informatics (LIPIcs), pages 4:1–4:18, Dagstuhl, Germany, 2022. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.FSCD.2022.4.
- [16] Ugo Dal Lago, Naohiko Hoshino, and Paolo Pistone. On the Lattice of Program Metrics. In Marco Gaboardi and Femke van Raamsdonk, editors, 8th International Conference on Formal Structures for Computation and Deduction (FSCD 2023), volume 260 of Leibniz International Proceedings in Informatics (LIPIcs), pages 20:1–20:19, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.FSCD.2023.20.
- [17] Arthur Azevedo de Amorim, Marco Gaboardi, Justin Hsu, Shin-ya Katsumata, and Ikram Cherigui. A semantic account of metric preservation. In Giuseppe Castagna and Andrew D. Gordon, editors, Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, Paris, France, January 18-20, 2017, POPL 2017, pages 545–556, New York, NY, USA, 2017. ACM. doi:10.1145/3009837.3009890.
- [18] Thomas Ehrhard and Laurent Regnier. The differential lambda-calculus. Theoretical Computer Science, 309:1–41, 2003. doi:10.1016/S0304-3975(03)00392-X.
- [19] Thomas Ehrhard and Laurent Regnier. Böhm Trees, Krivine’s Machine and the Taylor Expansion of Lambda-Terms. In Arnold Beckmann, Ulrich Berger, Benedikt Löwe, and John V. Tucker, editors, Logical Approaches to Computational Barriers, pages 186–197, Berlin, Heidelberg, 2006. Springer Berlin Heidelberg. doi:10.1007/11780342_20.
- [20] Thomas Ehrhard and Laurent Regnier. Uniformity and the Taylor expansion of ordinary lambda-terms. Theor. Comput. Sci., 403(2-3):347–372, 2008. doi:10.1016/j.tcs.2008.06.001.
- [21] Thomas Erker, Martín Hötzel Escardó, and Klaus Keimel. The way-below relation of function spaces over semantic domains. Topology and its Applications, 89(1):61–74, 1998. Domain Theory. doi:10.1016/S0166-8641(97)00226-5.
- [22] Martín Hötzel Escardó. PCF extended with real numbers. Theor. Comput. Sci., 162(1):79–115, 1996. doi:10.1016/0304-3975(95)00250-2.
- [23] Martín Hötzen Escardó. A metric model of PCF. Unpublished note presented at the Workshop on Realizability Semantics and Applications, June 1999. Available at the author’s webpage., 1999.
- [24] M.H. Escardo and R. Heckmann. Topologies on spaces of continuous functions. Topology Proceedings, 26(2):545–564, 2001-2002.
- [25] Francesco Gavazzo. Quantitative behavioural reasoning for higher-order effectful programs: Applicative distances. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS ’18, pages 452–461, New York, NY, USA, 2018. doi:10.1145/3209108.3209149.
- [26] Xun Ge and Shou Lin. Completions of partial metric spaces. Topology and its Applications, 182:16–23, 2015. doi:10.1016/j.topol.2014.12.013.
- [27] Guillaume Geoffroy and Paolo Pistone. A partial metric semantics of higher-order types and approximate program transformations. In Computer Science Logic 2021 (CSL 2021), volume 183 of LIPIcs–Leibniz International Proceedings in Informatics, pages 35:1–35:18, 2021. doi:10.4230/LIPIcs.CSL.2021.23.
- [28] Dirk Hofmann and Isar Stubbe. Topology from enrichment: the curious case of partial metrics. Cahiers de Topologie et Géométrie DIfférentielle Catégorique, LIX, 4:307–353, 2018.
- [29] Gunther Jäger and T. M. G. Ahsanullah. Characterization of quantale-valued metric spaces and quantale-valued partial metric spaces by convergence. Applied General Topology, 19(1):129–144, 2018.
- [30] Richard Kennaway, Jan Willem Klop, M. Ronan Sleep, and Fer-Jan de Vries. Infinitary lambda calculus. Theor. Comput. Sci., 175(1):93–125, 1997. doi:10.1016/S0304-3975(96)00171-5.
- [31] Giulio Manzonetto. Models and theories of lambda calculus. PhD thesis, Paris Diderot University, France, 2008. URL: https://tel.archives-ouvertes.fr/tel-00715207.
- [32] Radu Mardare, Prakash Panangaden, and Gordon Plotkin. Quantitative algebraic reasoning. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS 2016). IEEE Computer Society, 2016.
- [33] Damiano Mazza. Non-linearity as the metric completion of linearity. In Masahito Hasegawa, editor, Typed Lambda Calculi and Applications, pages 3–14, Berlin, Heidelberg, 2013. Springer Berlin Heidelberg. doi:10.1007/978-3-642-38946-7_3.
- [34] Volodymyr Mykhaylyuk and Vadym Myronyk. Metrizability of partial metric spaces. Topology and its Applications, 308:107949, 2022. doi:10.1016/j.topol.2021.107949.
- [35] S.J. O’Neill. Partial metrics, valuations and domain theory. Annals of the New York Academy of Sciences, 806:304–315, 1996.
- [36] Paolo Pistone. On generalized metric spaces for the simply typed lambda-calculus. In 36th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2021, Rome, Italy, June 29 - July 2, 2021, pages 1–14. IEEE, 2021. doi:10.1109/LICS52264.2021.9470696.
- [37] Jason Reed and Benjamin C. Pierce. Distance makes the types grow stronger: a calculus for differential privacy. In Paul Hudak and Stephanie Weirich, editors, Proceeding of the 15th ACM SIGPLAN international conference on Functional programming, ICFP 2010, Baltimore, Maryland, USA, September 27-29, 2010, pages 157–168. ACM, 2010. doi:10.1145/1863543.1863568.
- [38] Salvador Romaguera, Pedro Tirado, and Óscar Valero. Complete partial metric spaces have partially metrizable computational models. Int. J. Comput. Math., 89(3):284–290, 2012. doi:10.1080/00207160.2011.559229.
- [39] M. P. Schellekens. The correspondence between partial metrics and semivaluations. Theoretical Computer Science, 315(1):135–149, May 2004. doi:10.1016/j.tcs.2003.11.016.
- [40] Michel P. Schellekens. A characterization of partial metrizability: domains are quantifiable. Theor. Comput. Sci., 305(1-3):409–432, 2003. Topology in Computer Science. doi:10.1016/S0304-3975(02)00705-3.
- [41] Michael B. Smyth. The constructive maximal point space and partial metrizability. Ann. Pure Appl. Log., 137(1-3):360–379, 2006. doi:10.1016/j.apal.2005.05.032.
- [42] Pawel Waszkiewicz. Distance and measurement in domain theory. Electronic Notes in Theoretical Computer Science, 45, 2001. doi:10.1016/S1571-0661(04)80975-7.
