Abstract 1 Introduction 2 Preliminaries and Notation 3 Rational Lawvere Logic 4 Deduction System for 𝕃 5 Applications: Proving Properties of Distances 6 Completeness and Incompleteness 7 Complexity Results 8 Conclusions References

Rational Lawvere Logic

Giorgio Bacci ORCID Department of Computer Science, Aalborg University, Denmark Radu Mardare School of Mathematical and Computer Sciences, Edinburgh, UK Prakash Panangaden School of Computer Science, McGill University, Montreal, Canada
School of Informatics, University of Edinburgh, UK
Gordon Plotkin ORCID LFCS, School of Informatics, University of Edinburgh, UK
Abstract

We study Rational Lawvere logic (𝕃). This logic is defined over the extended positive reals with an algebraic structure combining the Lawvere quantale (with the reversed order on the extended reals and a sum as tensor) and a multiplicative quantale (with the usual order on the extended reals and a multiplication as tensor); together they provide a semiring structure. The logic is designed for complex quantitative reasoning, including sequents expressing inequalities between rational functions over the extended positive reals. We give a deduction system and demonstrate its expressiveness by deriving a classical result from probability theory relating the Kantorovich and total variation distances. Our deductive system is complete for finitely axiomatizable theories. The proof of completeness relies on the Krivine-Stengle Positivstellensatz.

We additionally provide complexity results for both 𝕃 and its affine fragment 𝔸𝕃. We consider two decision problems: the satisfiability of a set of sequents and whether a sequent follows from a finite set of sequent. We show that both problems lie in PSPACE for 𝕃, and we give sharper complexity bounds for 𝔸𝕃: the first problem is NP-complete, while the second is co-NP-complete.

Keywords and phrases:
Quantitative reasoning, complete deductive system, Lawvere’s quantale
Category:
Invited Paper
Funding:
Radu Mardare: EPSRC grant EP/Y000455/1, A correct-by-construction approach to approximate computation and ARIA TA1.1 project Predicate Logic as a Foundation for Verified ML.
Prakash Panangaden: Natural Sciences and Engineering Research Council of Canada (NSERC).
Copyright and License:
[Uncaptioned image] © Giorgio Bacci, Radu Mardare, Prakash Panangaden, and Gordon Plotkin; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Logic
Editors:
Stefano Guerrini and Barbara König

1 Introduction

Some recent developments in theoretical computer science have questioned the usefulness of equality in semantics, advocating more nuanced, quantitative approaches to equivalence. For instance, exact equality is often too rigid for probabilistic systems where small changes can disrupt equivalence between processes. To address this, researchers used metrics to measure differences, thus shifting the focus from strict equivalence to quantitative comparisons. Metric-based reasoning has also been applied to other areas, such as privacy, security [19, 53], computational resource analysis [37, 38], and symbolic computation [26].

As a result, theories of semantic equality have evolved into quantitative frameworks, focusing on measuring differences rather than asserting equality. Notable examples include theories for program analysis [3, 15, 16, 39, 36, 38], distances for processes [20, 21, 24, 25, 5, 6, 10], and quantitative equational logics over algebras of terms [43, 44, 7, 45, 8, 48, 49, 1, 2]. The latter, in particular, focuses on providing foundations for quantitative reasoning. The basic idea is to replace traditional equations s=t between terms s,t of an algebra with quantitative equations of the form s=εt, expressing that s and t are at most ε apart, for a real ε0. Thus, quantitative algebraic theories are used to reason about the distances between elements of an algebra. However, equational logic is only one of many forms of logic and a question arises: how can extensions of classical logic be used to provide foundations for quantitative reasoning?

In his seminal work [40], Lawvere views the extended non-negative reals [0,] as the objects of a complete monoidal-closed category with as the sets of morphisms and an extended sum as tensor. A [0,]-enriched category is then a generalised metric space. Further, in the introduction to [41], he regards the extended non-negative reals as a kind of truth-value, with 0 and as “true ” and “false ”, and speaks of [0,]-valued relations. Further, all sups (= [0,]-limits) are preserved by tensoring, and so [0,] is a quantale, which we call the Lawvere quantale. We argue that logical reasoning on the Lawvere quantale of truth values is a natural choice for studying metric spaces. Lawvere’s generalized metric spaces are [0,]-valued preorders in it. A quantitative equation s=εt is expressed as a sequent εs=t, which corresponds to the inequality εs=t.

From a logical point of view, [0,]-valued propositional logic is then a natural place to start. Bacci et al. [9] began exploring a class of such quantitative logics, referred to as Lawvere logics111The logics are named in honor of Lawvere.. Among them, Affine Lawvere propositional logic (𝔸𝕃) was the most expressive. This logic features a tensor operation, interpreted as addition in the Lawvere quantale, a linear implication, interpreted as the adjoint residuum of addition, constants for all non-negative real numbers, and scalar multiplication by non-negative reals. So all affine functions on [0,] can be expressed in 𝔸𝕃. Logical conjunction and disjunction are derived operators. Sequents in 𝔸𝕃 are interpreted as affine inequalities on [0,].

A key innovation of [9] was the use of theorems from linear algebra, specifically Farkas’ Lemma [23] and Motzkin’s transposition theorem [50], to help establish completeness: consequence relations between finite sets of sequents and sequents were reduced to consequence relations between finite sets of linear inequalities and linear inequalities. This established a strong link between logic and classical arithmetic. However, many real-world quantitative phenomena involve non-linear interactions, making it desirable to express polynomial inequalities.

In this paper, we take on the challenge of developing Rational Lawvere Logic (𝕃). This logic extends 𝔸𝕃 by adding multiplication and division as logical connectives, enabling sequents to represent rational inequalities. Our approach builds on Lawvere’s idea by giving logical status to both sum and multiplication, with the key innovation being that the truth values come from a semiring structure involving two quantales over [0,]: the additive Lawvere one (with reverse order and sum as tensor), and the multiplicative one (with the natural order and multiplication as tensor).

Our main contributions are:

  1. 1.

    We give a deduction system for 𝕃 and demonstrate its expressiveness by (a) deriving a classical result from probability theory relating the Kantorovich and the total variation distances and (b) giving an embedding of quantitative equational logic in it (Section 5).

  2. 2.

    We prove completeness for finitely axiomatizable theories (Theorem 9). (There is no finitary complete consistent proof system for general theories (Theorem 15) as compactness fails.) The core of the completeness proof differs significantly from that in [9]. Rather than reducing to formally proving relations between linear inequalities, when we can use Farkas’ Lemma or Motzkin’s transposition theorem, we reduce to formally proving relations between polynomial inequalities, when we can use Krivine-Stengle’s Positivstellensatz [35, 58, 13], a real analogue of Hilbert’s Nullstellensatz. As all such polynomial relations can be directly expressed in the logic, this indicates a prima facie need for the Positivstellensatz.

  3. 3.

    Unlike 𝔸𝕃, 𝕃 allows formulas and sequents to be “booleanized .” We use this to prove a deduction theorem (Theorem 8) that is not available in 𝔸𝕃.

  4. 4.

    The completeness proof employs a linear-time non-deterministic reduction that translates any 𝕃 inference to a set of inferences in polynomial form. Notably, when applied to 𝔸𝕃 inferences, it significantly simplifies the normalisation algorithm proposed in [9]. Perhaps this technique can be helpful to obtain, and/or simplify, other completeness proofs.

  5. 5.

    Relying on the reduction discussed above, we establish complexity results for two fundamental decision problems (for both 𝕃 and 𝔸𝕃): the semantical consequence of a sequent from a finite set of sequents, and the satisfiability of a finite set of sequents. We show that semantical consequence is in PSPACE for 𝕃 and is co-NP-complete for 𝔸𝕃 (Theorem 17), and obtain as a corollary that satisfiability is in PSPACE for 𝕃 and is NP-complete for 𝔸𝕃 (Corollary 18).

Related Work.

Connections between arithmetic and logical reasoning are well known. A completeness interpretation of Farkas’ Lemma appears already in the literature (e.g., in [46]). In algebraic complexity there is the Nullstellensatz proof system which uses a simple reduction of propositional satisfaction to polynomial equation solvability (e.g., [11, 52]) and the Positivstellensatz calculus [29] which considers polynomial inequalities.

Parallel to Lawvere’s real-valued approach we must mention the vast development of fuzzy logic, for example [51, 12, 31]. Fuzzy logic generally employs (if not explicitly) quantales on the real interval [0,1]. The most relevant for us is product logic [32, 30, 56, 22], defined over the multiplicative quantale on [0,1]. Through the quantale isomorphism ex, 𝔸𝕃 corresponds to product logic extended with constants in [0,1], and 𝕃 corresponds to a further extension with an operation elnxlny. Neither of these extensions seems to be in the literature. Moreover, this interpretation of the logical connectives seems unnatural for quantitative reasoning over [0,], and impedes direct access to results we use, e.g., in linear algebra (such as Khachiyan’s ellipsoid method, used for complexity), and in real algebraic geometry (such as the Krivine-Stengle Positivstellensatz, used for completeness).

We must also mention the extensive works on graded (or weighted) structures, such as linear logic’s exponentials, comonads, types, or categories (e.g., [33, 28, 4, 17, 18, 42]). The gradings usually employ general semirings of some kind. However [0,] in particular is also discussed, for example in [28, 4, 33, 18]. Various possibilities for multiplication are considered: two commutative ones (ours is one) and a non-commutative one. In Section 2, we discuss all the possible monotonic, commutative, and associative addition and multiplication operations on [0,] that extend the usual ones on (0,). They are all definable in our logic (as are the non-commutative ones, as a straightforward extension of our discussion shows).

Synopsis.

Section 2 gives preliminary definitions and notation. Section 3 gives the syntax and semantics of 𝕃, and Section 4 presents a deduction system for it. Section 5 presents some nontrivial applications. Section 6 develops the completeness result. Section 7 gives the complexity results for 𝕃 and its affine fragment 𝔸𝕃. Section 8 gives concluding remarks and discusses future work.

2 Preliminaries and Notation

A quantale [55] is a complete lattice with a binary, associative operation (tensor) that distributes over joins in each argument; distributivity and completeness entail that the tensor has both right adjoints. A quantale is commutative if its tensor is; and unital if there is an element u (unit) s.t. ua=a=au, for all a; if the unit is the top element, the quantale is integral. For commutative quantales, the right adjoints of a and a coincide.

As mentioned in the introduction, our interest concerns the extended non-negative reals [0,]. We next discuss ways of extending sum and multiplication from the positive reals (0,) to [0,] and analyse the choices of quantales that one obtains from these extensions. To avoid confusion, in what follows we always use sup and inf on [0,] with respect to the natural order , even when we speak of structures using different orders.

Addition.

We would like to extend sum from the positive reals (0,) to [0,] so that we still get a sum that is associative, commutative, and monotonic w.r.t (equivalently w.r.t. op). One can show there are three choices for defining such a sum, as given in Table 1, with +1 being the addition of the Lawvere quantale.

Table 1: Three variants of sum (+1, +2, +3); truncated subtraction () ; two variants of multiplication (×1, ×2); and extended division (÷) (the first column lists numerators, the first row denominators). Note that r,s(0,).
+1 0 s
0 0 s
r r r+s
+2 0 s
0 0 0 0
r 0 r+s
0
+3 0 s
0 0 0
r 0 r+s
0 s
0 0 0 0
r r max{rs,0} 0
0
×1 0 s
0 0 0 0
r 0 rs
0
×2 0 s
0 0 0
r 0 rs
÷ 0 s
0 0 0
r rs 0
Lemma 1.
  1. 1.

    ([0,],+1,op) is a commutative, unital, integral quantale; ([0,],+1,) is not a quantale.

  2. 2.

    ([0,],+2,) is a commutative quantale; ([0,],+2,op) is not a quantale.

  3. 3.

    Neither ([0,],+3,) nor ([0,],+3,op) are quantales.

Thus, for an additive quantale on [0,], if we use the natural order , the correct choice for sum is +2; if we use the reverse order op, the correct choice is +1. The first is not unital, since 0+2=0; the Lawvere quantale, is both unital and integral. We chose +1, as this enables us to directly encode examples from quantitative equational logic (Section 5). The right adjoint to +1a, can be explicitly formulated in terms of truncated substruction , appropriately extended to [0,] as shown in Table 1. Indeed, it holds that ba=inf{cc+1ab}.

Multiplication.

One can show there are two associative, commutative, and monotonic extensions of multiplication from [0,) to [0,]: ×1 and ×2, as given in Table 1.

Lemma 2.
  1. 1.

    ([0,],×1,) is a commutative, unital quantale; ([0,],×1,op) is not a quantale.

  2. 2.

    ([0,],×2,op) is a commutative, unital quantale; ([0,],×2,) is not a quantale.

Thus, for a multiplicative quantale on [0,], if we use the natural order , it is ×1; if we use the reverse order op, it is ×2. We discuss our choice of multiplication in relation to the Lawvere quantale. On the one hand, if the choice were dictated by the quantale order, ×2 would seem the natural candidate. On the other hand, unlike ×2, choosing ×1 yields a semiring (both multiplications distribute over +, but the unit of +1 is not the null element for ×2, as ×20=). Ultimately, we choose ×1. While no choice is perfect, having a semiring enables us to directly encode examples from measure theory (Section 5) and to obtain a deduction theorem (Theorem 8).

Although the logic will use the order of the Lawvere quantale, we will still exploit the quantalic structure associated with ×1 by adding as a logical connective the right adjoint to ×1a, which can be explicitly formulated in terms of division ÷, appropriately extended to [0,] as given in Table 1. Indeed, it holds that b÷a=sup{cc×1ab}.

We conclude by showing that the other operations, namely +2, +3, and ×2, can be expressed in terms of +1, ×1, , and (and so, eventually, in 𝕃). First, binary sups and infs can be:

Lemma 3.

For a,b[0,] we have:

  1. 1.

    ab=a+(ba)

  2. 2.

    ab=(a(ab))(b(ba))

Next, we define functions N,Z:[0,][0,] by N(a)=a and Z(a)=a×1. These are “boolean functions” returning either 0 or (i.e., and in the Lawvere quantale), as:

N(a)={0if a=otherwise, Z(a)={0if a=0otherwise.

Hence, N is a test for , while Z is a test for 0. We can next define a conditional using and :

if a then b else c=[N(Z(a))b][Z(a)c]={bif a=0cotherwise.

and finally obtain:

Lemma 4.

For a,b[0,] we have:

  1. 1.

    a+2b=if (Z(a)Z(b)) then 0 else (a+1b)

  2. 2.

    a+3b=(a+2b)+1[if (N(a)N(b)) then  else 0]

  3. 3.

    a×2b=if [(Z(a)N(b))(Z(b)N(a))] then  else (a×1b)

Hereafter, when working on [0,], we simply write + for the sum instead of +1 and × for the multiplication instead of ×1. The other operations, namely and ÷ (written as a fraction), are those from Table 1. We continue writing for the natural order on [0,] and op for Lawvere’s order.

3 Rational Lawvere Logic

In this section, we introduce Rational Lawvere logic (𝕃), a propositional logic interpreted over our semiring on [0,]. It extends Affine Lawvere logic (𝔸𝕃) of [9], enabling one to reason with inequalities between rational functions over the non-negative extended reals.

Syntax.

Let be a set of propositional letters, ranged over by P,Q,R,. The formulas of 𝕃 are freely generated by the following grammar, for arbitrary P and r[0,).

ϕ,ψ::=Prϕψϕψϕψϕ/ψ

We define expected logical connectives as derived operators:

:-0,¬ϕ:-ϕ,ϕψ:-ϕ(ϕψ),
ϕψ:-((ψϕ)ϕ)((ϕψ)ψ),ϕψ:-(ϕψ)(ψϕ).

We assume the following precedence rule: multiplication and division have highest precedence, followed by ¬, then , next and , and finally and have lowest precedence. Thus, θϕψ¬θψθ is interpreted as the formula (((θϕ)ψ)(¬(θψ)))θ.

Semantics.

Interpretations are maps :[0,], extended to all formulas as follows:

():-,(r):-r,(ϕψ):-(ϕ)+(ψ),(ϕψ):-(ψ)(ϕ),
(ϕψ):-(ϕ)×(ψ),(ϕ/ψ):-(ϕ)(ψ).

Consequently, the derived connectives are interpreted as follows (recall Lemma 3):

()=0,(¬ϕ)=(ϕ),(ϕψ)=max{(ψ),(ϕ)},
(ϕψ)=min{(ψ),(ϕ)},(ϕψ)=max{(ϕ)(ψ),(ψ)(ϕ)}.

Affine Lawvere Logic.

Affine Lawvere Logic (𝔸𝕃), introduced in [9], is the sublogic of 𝕃 defined for P and r[0,), by the following grammar:222In [9] and belong to the syntax, but they can be obtained as derived operators, as in 𝕃.

𝔸𝕃:ϕ,ψ::=Prϕψϕψrψ

Boolean formulas.

While, in 𝕃, an interpretation evaluates a formula to a value in [0,], formulas such as ¬ϕ or ϕ evaluate either to 0 (“true”) or to (“false”). For example:

(¬ϕ)={0if (ϕ) is infiniteotherwise, (ϕ)={0if (ϕ) = 0otherwise.

We call such formulas boolean. They yield derived operators, such as:

|ϕ|:-¬¬ϕZϕ:-ϕ ϕ=ψ:-Z(ϕψ),ϕψ:-¬Z(ϕψ), ϕψ:-Z(ϕψ),ϕ>ψ:-¬Z(ψϕ), |ϕ|+:-|ϕ|¬Z(ϕ).

These have useful “boolean” meanings. For example:

(|ϕ|)={0if (ϕ) is finiteotherwise,(Zϕ)={0if (ϕ)=0otherwise,(|ϕ|+)={0if 0<(ϕ)<otherwise,

Using them, we can express useful facts, e.g., |ϕ| says that “ϕ is finite” and Zϕ that “ϕ is strictly positive”. We use ϕψ and ϕ<ψ as synonyms for ψϕ and ψ>ϕ.

Sequents.

A sequent in 𝕃 is a syntactic construct of the form

Γϕ, (Sequent)

where Γ=ϕ1,,ϕn is a finite ordered list of formulas, possibly with repetitions, the antecedents of the sequent, and the formula ϕ is its consequent. For Γ and Δ such lists of formulas, Γ,Δ denotes their concatenation; and ϕ is a sequent with no antecedents.

A sequent ϕ1,,ϕnψ is satisfied by an interpretation (alternatively, is a model for the sequent), denoted (ϕ1,,ϕnψ), whenever

(ϕ1)++(ϕn)(ψ). (Semantics of sequents)

In particular, (ψ) means that (ψ)=0. We write S and say that is a model for S if satisfies all sequents in S. A sequent is satisfiable if it has a model; it is unsatisfiable if it has no models; it is a tautology if it is satisfied by all interpretations. In particular, ϕϕ, , and ¬¬ϕ(>ϕ) are tautologies, while ϕ(¬¬ϕ) is not.

Note the distinction between ϕψ and the boolean formula ϕψ: while for all interpretations , we have (ϕψ) iff (ϕψ), it may not hold that (ϕψ)=(ϕψ), as (ϕψ) could be a non-zero finite number.

Definition 5 (Semantic Consequence).

A sequent γ is a semantic consequence of a set S of sequents, in symbols Sγ, if every model of S is also a model of γ.

4 Deduction System for 𝕃

An inference rule is a syntactic construct of the form Sγ with S a finite set of sequents, the hypotheses, and γ a sequent, the conclusion. As usual with inference rules, we may write SSγ for SSγ (so repetitions do not matter for hypotheses, only for sequents); γ for {γ} in hypotheses; and γγ for both γγ and γγ.

Definition 6 (Disjunctive Consequence).

Given a set 𝒟 of inference rules for a sublogic of 𝕃 containing , the disjunctive consequence relation it induces is the smallest relation S𝒟γ between finite sets of sequents S and sequents γ such that:

  1. 1.

    If Sγ𝒟 then S𝒟γ.

  2. 2.

    S,γ𝒟γ.

  3. 3.

    If S𝒟γ1,,S𝒟γn and γ1,,γn𝒟γ then S𝒟γ (for n0).

  4. 4.

    If S,Γϕ𝒟γ and S,Γψ𝒟γ then S,Γϕψ𝒟γ.

Note that weakening holds: if S𝒟γ then S,S𝒟γ. We say γ is 𝒟-provable from S if S𝒟γ, omitting 𝒟 if understood from the context, when we may write Sγ for S𝒟γ.

Table 2: Inference rules for rational Lawvere logic 𝕃.

Disjunctive consequence for 𝕃 is that induced by the inference rules in Table 2; we use the same name 𝕃 to refer to it. It contains basic inference rules of logical deduction: (cut), weakening (weak) and permutation (perm) (note that contraction is not sound). The rule (bot) behaves as expected. (zero) guarantees that the additive quantale is integral and (one) that one is finite. We also have weak-excluded-middle (wem), stating that any formula is either finite or infinite, a prelinearity rule (lin) that ensures the strong connectivity of the quantale order. (prem) is a double inference that allows us to merge premises using ; and (quant) is the double inference representing the (right) quantale implication rule. The cancellation (canc) and subtraction (sub) rules encode standard properties of addition and truncated subtraction, adjusted to allow for infinity. (prem) and (zero), together with the basic inference rules and (top), entail that forms an ordered commutative monoid with a zero. (comp), (assoc), (unit) and (comm) express that multiplication is an ordered commutative monoid with a unit. Together with (distrib) and (null) we then see that we have an ordered commutative semiring. Next, (zm) states that if a product is zero, then one of its factors must also be zero. (sum) and (mult) ensure that and logical multiplication correspond to + and × respectively when applied to real constants. Finally, (adj) states the adjunction in the multiplicative quantale and (div) is a cancellation rule for multiplication.

Theorem 7 (Soundness).

If a sequent γ is provable from S in 𝕃, then γ is a semantic consequence of S. In symbols: Sγ implies Sγ.

In 𝕃, ϕ1,,ϕnψ is provably equivalent to ϕ1ϕnψ; moreover ϕψ is provably equivalent to ϕψ. Hence, without loss of generality, we may assume that arbitrary sequents are of the form θ.

Theorem 8 (Deduction Theorem).

For arbitrary formulas ϕ,ψ in 𝕃, we have

ϕψ iff (0ϕ)(0ψ)

In [9] it is shown that 𝔸𝕃 does not enjoy a deduction theorem, not even in the weak form that holds for fuzzy logics, such as Łukasiewicz, Gödel, or product logics [31]. This is because we have proven that is not possible to “internalize” provability in the language of 𝔸𝕃. However, in 𝕃, the expressivity provided by multiplication allows us to “booleanize” the sequents.

5 Applications: Proving Properties of Distances

In this section, we show how the deductive system of 𝕃 can be used to reason about distances on probability distributions, namely, the total variation, the Kantorovich and the p-Wasserstein distances, and we discuss embedding quantitative equational logic in 𝕃.

Let X={x1,,xn} be a finite (extended) metric space with distances dij between xi and xj possibly taking as value. Denote by μ,ν,ρ, generic discrete probabilities on X and by μi,νi,ρi, their probabilities at xiX.

Total Variation.

The total variation distance dTV(μ,ν)=maxAX|μ(A)ν(A)|, is encoded in 𝕃 by the formula tμ,ν:-A{1..n}(iAμiiAνi). A simple example to start with is to demonstrate that the total variation is a pseudo-metric, i.e., satisfies the axioms of reflexivity, symmetry, and triangle inequality, which can be expressed in 𝕃:

(refl)tμ,μ (symm)tμ,νtν,μ, (triang)tμ,ν,tν,ρtμ,ρ.

The first two are trivial to derive. The derivation of the third is shown below:

Note that (perm) is used implicitly and some steps of the derivation use meta-rules which are derivable from the rules in Table 2, such as (1) and (2).

The total variation is not just a pseudo-metric, but a proper metric satisfying the Fréchet positivity axiom, which can be expressed in 𝕃 by the sequent

(positivity)(μiνi)(tμ,ν>0).

The above uses the boolean formulas of 𝕃, which can be expressed using multiplication by . In fact, this is a non-linear property that cannot be captured by 𝔸𝕃 as it allows only affine formulas.

Kantorovich distance.

The Kantorovich distance333Also known as the Wasserstein distance or Earth mover’s distance. between μ and ν can be defined using the following two equivalent (dual) formulations

dK(μ,ν)=infωi,jωijdij=supf|ifiμiifiνi| (K-R duality)

where ω ranges over joint probability distributions with μ as left-marginal (i.e., jωij=μi, for all i) and ν as right-marginal (i.e., iωij=νj, for all j); and f over non-expanding [0,)-valued maps on X, i.e., |fifj|dij, for all i,j.

As its definitions involve inf (infimum) on one hand, and sup (supremum) on the other hand, we cannot express the Kantorovich distance as a single formula in 𝕃. However, we can still reason about it if we can find a finite set of sequents that uniquely characterises its value. The set we propose, hereafter denoted by 𝒦, contains the following sequents:

i(jWijμi)j(iWijνj),i,j(dij(FjFi))i|Fi|, iFiμiiFiνiKμ,ν,Kμ,νi,jWijdij,

where Wij, Fi, and Kμ,ν are propositional atoms. This set is derived by following the steps of the proof of (strong) duality in linear programs [57], tailored to the K-R duality presented above. The sequents to the left represent the conjunction of the constraints from both the primal and dual linear programs (i.e., the marginal conditions on ω and the non-expanding condition on f). Those to the right imply iFiμiiFiνii,jWijdij, corresponding to the optimality condition for the feasible solutions. The atom Kμ,ν is a convenience.

This encoding is such that all the models of 𝒦 assign the atom Kμ,ν value dK(μ,ν), i.e., the Kantorovich distance between μ and ν. Indeed, next we show that from 𝒦 we can deduce

Kμ,ν(iFiμiiFiνi) and Kμ,νi,jWijdij. (1)

The above follows by deriving the following two sequents from 𝒦

i,jWijdijiFiμijFjνj, i,jWijdijjFjνjiFiμi

as they imply i,jWijdijiFiμiiFiνi. Note that this corresponds to the steps of the proof of weak duality in linear programs. We show only the derivation of the first one as the other is similar. Below we provide only the schematic steps of the derivation, which would otherwise take too much space

i,jWijdijiFiμi i,jWijdijiFi(jWij)) (left-marginal)
i,jFjWij (distr, prem, perm, non-expanding)
jFjνj (distr, right-marginal)

In the above a concatenation of the form ϕψϑ means that both ϕψ and ψϑ are derivable; the desired result follows by repeated applications of (cut).

Now that we have established a way to encode the Kantorovich distance, we can prove some of its properties. A well-known result from [27] relating the Kantorovich distance with the total variation is dK(μ,ν)dmindTV(μ,ν), where dmin=minijdij. According to our encoding, such a statement is equivalent to establishing the provability of Kμ,ν(ijdij)tμ,ν from 𝒦.

Due to a lack of space, below, we provide only the sketch of the proof. The key steps of it are to show that the sequents below follow from 𝒦 for all A{1,,n}

ijWijiAμiiAνi ijWijiAνiiAμi

from which, by using (quant), (2), one gets ijWijtμ,ν. Thus, by applying the inference rules of 𝕃, (1), and the fact that dii=0 for all i, we get

Kμ,νi,jWijdijijWijdijijWij(ijdij)(ijdij)tμ,ν.

The desired inference follows from the above by repeated applications of (cut).

Quantitative Equational Logic (QEL).

We showed in in [9] how one can embed the finitary part of QEL in 𝔸𝕃 (i.e., the axioms and rules of QEL other than its infinitary rule). To do so, we add, as propositional letters in our logic, all the equalities of the form s=t for all terms s,t of a chosen quantitative algebra. A quantitative equation such as s=εt is then encoded in Lawvere logic as the sequent εs=t, or equivalently as s=tε.

Next, a quantitative judgement such as the triangle inequality, which in QA has the form

s=εt,t=δus=ε+δu

can be encoded in Lawvere logic as follows, if we want to emphasize ε and δ,

(s=tε)(t=uδ)s=u(εδ)

or if ε and δ are generic, we can use an even more compact encoding that emphasize the relation between triangle inequality and transitivity

s=t,t=us=u.

The logic 𝔸𝕃 of [9] lacks a deduction theorem, and the embedding of QEL in 𝔸𝕃 therefore relied on extending 𝔸𝕃 with certain inference rules. However, in 𝕃 this problem disappears, as the inferences in [9, Table 2] can be formalized as proper sequents using the deduction theorem (Theorem 8), exactly as we have done above for the triangle inequality.

Additionally, while 𝔸𝕃 can handle only affine functions, 𝕃 can encode more complex examples, including polynomials and rational functions and even rational powers.

For instance, interpolative barycentric algebras (IBAs) were introduced in [43] as a quantitative generalization of Stone’s barycentric algebras [59]. Barycentric algebras, sometimes called convex algebras, have binary operators +e for e[0,1], where the intended interpretation of s+et on reals or distributions is the e-convex combination of s and t. To characterize the p-Wasserstein metric on the space of distributions for a strictly positive integer p, IBAs must satisfy the following axiom:

(Ip):s=ε1t,s=ε2ts+es=δt+et, where δ=(eε1p+(1e)ε2p)1p

This can be encoded in 𝕃 using a couple of judgements. Let d be a fresh propositional letter; then (Ip) can be represented in 𝕃 by:

(Ip):{(s=tε1)(s=tε2)s+es=t+etddpeε1p(e1)ε2p.

The compact quantitative algebraic theories of [47] have the property (in the case of QEL) that if a sequent is provable, then it is provable without the infinitary rule. So our finitary encodings of theories in 𝕃 are complete for compact theories in that any QEL consequence of such a theory is also, via the encoding, an 𝕃 consequence. As shown in [47], the theories of rational Wasserstein metrics are compact, as is the theory of quantitative semilattices [9].

6 Completeness and Incompleteness

We first prove that 𝕃 is complete for finite theories.

Theorem 9 (Finite Completeness).

Let S be a finite set of sequents in 𝕃. If a sequent γ is a semantic consequence of S, then γ is provable from S. That is, Sγ implies Sγ.

The proof plan is to reduce the statement above to a restricted form of completeness, which applies only to sequents in a certain polynomial form and allows us to appeal to Krivine-Stengle’s Positivstellensatz to obtain the desired result.

Definition 10.

A formula in 𝕃 is in polynomial form if it is built up from propositional letters and constants using addition and multiplication (equivalently, if it has no occurrences of , , or /).

Formulas ϕ in polynomial form evidently correspond to polynomials ϕ~ with positive coefficients over the propositional letters of ϕ, and we have ϕ~=ψ~ iff ϕψ is provable. Further, every polynomial with positive coefficients is obtained in this way, and we may identify polynomials with positive coefficients with corresponding formulas in polynomial form (chosen in some standard manner). Note that |P|, which by definition is P(P), is not in polynomial form. We extend the definition of polynomial form to sequents and sets of sequents in the obvious way: ϕ1,ϕnψ is in polynomial form if all ϕi and ψ are; a set of sequents is in polynomial form if all its elements are. We say that a sequent is finitising if it is of the form |P|, and that a set 𝔉 of finitising sequents restricts a set of sequents S if it contains |P| for every propositional letter P occurring in S.

Theorem 11 (Polynomial Completeness).

Let γ be a sequent and S a finite set of sequents, all in polynomial form, and let 𝔉 be a set of finitising sequents restricting S{γ}. Then, S𝔉γ implies S𝔉γ.

Note that S𝔉γ represents a restricted form of semantical consequence where the models are assumed to be [0,)-valued.

Before delving into the proof of Theorem 11 – which constitutes the core of the completeness result – we describe our non-deterministic linear reduction to it. The reduction is specified by rules, being finite sets

(S,γ)(Si,γi)for i=1,,k

of moves between configurations of the form (S,γ), where S is a finite set of sequents and γ is a sequent. To be sound, a rule must satisfy the following two properties:

Reliability:

Sγ implies i.Siγi (i.e., if γ is a semantical consequence of S, then each γi is semantical consequence of Si).

Faithfulness:

i.Siγi implies Sγ (i.e., if γi is provable from the Si, then γ is provable from S).

We present the reduction by means of rule schemas and divide it into five phases, performed in the following order: (1) reduction to PCF, (2) elimination of , (3) elimination of /, (4) choice of domain; and (5) reduction to polynomial form. For ease of presentation, without loss of generality, we assume that all sequents are either of the form ϕψ (with exactly one antecedent) or |P| (finitising).

Phase 1 (Reduction to PCF).

The first reduction comprises the following nine one-move rule schemas. The intent is to reduce the judgments in both the premises and the conclusions of configurations to a simplified canonical form, propositional canonical form (PCF), where logical connectives are applied only to propositional letters.

(S,ϕψ) (S{Pϕ,ψQ},PQ) (C)
(S{ϕψθ},γ) (S{PQθ,ϕP,ψQ},γ) (-L)
(S{θϕψ},γ) (S{θPQ,Pϕ,Qψ},γ) (-R)
(S{ϕψθ},γ) (S{PQθ,ϕP,ψQ},γ) (×-L)
(S{θϕψ},γ) (S{θPQ,Pϕ,Qψ},γ) (×-R)
(S{ϕψθ},γ) (S{PQθ,Pϕ,ψQ},γ) (-L)
(S{θϕψ},γ) (S{θPQ,ϕP,Qψ},γ) (-R)
(S{ϕ/ψθ},γ) (S{P/Qθ,ϕP,Qψ},γ) (/-L)
(S{θϕ/ψ},γ) (S{θP/Q,Pϕ,ψQ},γ) (/-R)

where P,Q are fresh propositional letters not occurring in the source configurations of the moves (chosen in a standard way) and at least one among ϕ or ψ is not a propositional letter.

The correctness of the rules follows from the monotonicity properties of the connectives: and × are monotone in both arguments; is antimonotone in its first argument and monotone in its second; and / is monotone in its first argument and antimonotone its second.

Observe that, since the rules bring subformulas to the top level, their repeated application ensures that every sequent is eventually brought into PCF. The next phases will keep sequents in this form, except for finitising ones.

Phase 2 (Elimination of ).

The following two rule schemas (the first with three moves) are designed to eliminate all occurrences of :

(S{PQϕ},γ) (S{P,0ϕ},γ) (-EL1)
(S{PQϕ},γ) (S{|P|,PQ,0ϕ},γ) (-EL2)
(S{PQϕ},γ) (S{|P|,QP,QPR,Rϕ},γ) (-EL3)
(S{ϕPQ},γ) (S{ϕR,RPQ},γ) (-ER)

where P,Q,R are propositional letters and R, chosen in a standard way, is fresh in the move source configurations. The rule (-EL) removes occurrences of PQ on the left-hand side of sequents; its correctness relies on the axioms (lin) and (wem). Dually, the rule (-R) removes occurrences of PQ on the right-hand side of sequents; its correctness follows from (quant). The fresh propositional letter R is used to maintain the sequents in PCF. As for the previous phase, repeated applications of these rules ensure the elimination of from all sequents except the finitising ones.

Phase 3 (Elimination of /).

The two rule schemas below (the second one comprising four moves) remove all occurrences of /:

(S{P/Qϕ},γ) (S{Rϕ,PQR},γ) (/-EL)
(S{ϕP/Q},γ) (S{0Q,ϕ},γ) (/-ER1)
(S{ϕP/Q},γ) (S{|Q|,R,QR,ϕT,TQP},γ) (/-ER2)
(S{ϕP/Q},γ) (S{Q,|P|,ϕ0},γ) (/-ER3)
(S{ϕP/Q},γ) (S{Q,P,ϕ},γ) (/-ER4)

where P,Q,R,T are propositional letters and R,T are fresh in the source configurations (chosen in a standard way). The rule (/-EL) removes occurrences of P/Q on the left-hand side of sequents; its correctness follows from (adj). Dually, the rule (/-ER) removes P/Q from the right-hand side of sequents; its soundness follows from (lin). The propositional letter R is used to encode that Q is non-zero using the combinations of the sequents R and QR; the propositional letter T to maintain the sequent in PCF.

Phase 4 (Choice of domain).

This is a rule schema comprising two moves:

(S,γ) (S{|P|},γ) (F)
(S,γ) (S{P},γ) ()

where P is a propositional letter occurring in S such that neither |P| nor P are in S.

The moves (F) and () correspond, respectively, to non-deterministically choosing whether P is finite or infinite. This phase is completed when all propositional letters in S have been “tagged” in one of the two ways above. Note that the applicability conditions ensure that the rules are never applied vacuously or repeated twice on the same propositional letter.

Phase 5 (Reduction to Polynomial Form).

Recall that a formula is in polynomial form if it has no occurrences of , , or /. The last two requirements have been taken care of by the previous phases. This phase, which we split into two stages, concerns the first requirement.

Stage 1. It removes the occurrences of infinitary propositional letters (P) by means of the following seven rule schemas (the last two comprising two moves each)

(S{P},γ) (S,γ)when P does not occur in (S,γ) (-E)
(S{P},Pϕ) (S{P},ϕ) (-CL)
(S{P},ϕP) (S{P},ϕ) (-CR)
(S{P,Pϕ},γ) (S{P,ϕ},γ)when ϕ (-PL)
(S{P,ϕP},γ) (S{P,ϕ},γ) (-PR)
(S{P,PQϕ},γ) (S{P,ϕ},γ) (-SL)
(S{P,ϕPQ},γ) (S{P,ϕ},γ) (-SR)
(S{P,PQϕ},γ) (S{P,Q,ϕ},γ) (-ML1)
(S{P,PQϕ},γ) (S{P,|R|,QR1,ϕ},γ) (-ML2)
(S{P,ϕPQ},γ) (S{P,Q,ϕ0},γ) (-MR1)
(S{P,ϕPQ},γ) (S{P,|R|,QR1,ϕ},γ) (-MR2)

where P,Q,R are propositional letters and R is fresh. The rules (-PL), (-PR), (-SL), (-SR), (-ML), and (-MR) remove an occurrence of the infinitary propositional letter P when it appears atomically or in logical connectives — we assume they apply up to commutativity of and ×. The rules (-CL) and (-CR) remove the occurrence of P from the conclusion. Once these rules can no longer apply, the rule (-E) removes P.

As the rule schemas apply for arbitrary infinitary propositional letters P, their repeated application will eventually eliminate all the occurrences of such propositional letters.

Stage 2. After the previous phases, the only sequents that are not in polynomial form apart from the finitising ones are either trivially valid (ϕ) or finitarily unsatisfiable (ϕ). The following two one-move rule schemas eliminate the last occurrences of :

(S,γ) 𝒱(S,γ) (Valid)
(S,γ) 𝒰(S,γ) (Unsat)

where, 𝒱(S,γ) and 𝒰(S,γ) are obtained from (S,γ) by replacing sequents of the form ϕ with 01 (which is still valid), and sequents of the form ϕ, where ϕ, with 10 (which is still unsatisfiable), respectively. Note that 01 and 10 are in polynomial form.

Proposition 12.
  1. 1.

    The rules of the reduction are reliable and faithful.

  2. 2.

    The non-deterministic tree of moves is finite and the leaves are configurations of the form (S𝔉,γ) where S and γ are in polynomial form, and 𝔉 is a finitising set of sequents restricting S{γ}.

  3. 3.

    If the formulas of the initial configuration (S,γ) contain only rational constants, then so do all the configurations of the tree, and the height of the tree is linear in the size of (S,γ), as is the maximum size of the configurations in the tree.

In the above, the size of a formula is intended as the total number of logical connectives and propositional atoms it contains, plus the number of bits required for the binary representation of the constants444For a rational mn, we assume the common encoding format bin(m)#bin(n), where bin denotes binary encoding and # is a separator symbol not in the binary alphabet {0,1}.. The size of a set of judgments is the sum of the sizes of its formulas, and similarly for configurations.

Now we are ready to prove polynomial completeness:

Proof of Theorem 11.

Let γ=θϑ be a sequent and S={θ1ϑ1,,θnϑn} be a finite set of sequents, all in polynomial form, and let 𝔉 be a set of finitising sequents restricting S{γ}. Assume that S𝔉γ (thus, any [0,)-valued model of S is also a model for γ).

Identifying polynomial formulas ϕ with their corresponding polynomials ϕ~, the [0,)-valued models of S are the solutions of the following system of polynomial inequalities

θiϑi0(for i=1,,n) Pj0(for j=1,,m)

where P1,,Pm are the propositional letters occurring in S{γ}. We recall one form of Krivine-Stengle’s Positivstellensatz [35, 58] (see also [13, Corollary 4.4.3]).

Theorem 13 (Positivstellensatz).

Let f,f1,,fr[X1,,Xn] n-variate polynomials over the reals and denote by W={xni.fi(x)0} their semialgebraic set and by C the cone generated by them (i.e., the subsemiring generated by f1,,fr and squares of polynomials). Then,

xW.f(x)0s.h1,h2C.h1f=f2s+h2.

By the Positivstellensatz, there are polynomials h1,h2[P1,,Pm] (obtained using sums and multiplications from (θiϑi), Pj, and squares of arbitrary polynomials) and integer s0 such that

h1θ=h1ϑ+(θϑ)2s+h2

The first step is to find formulas ρ1, ρ2 such that:

S𝔉ρ1θρ1ϑ(ϑθ)2sρ2. (2)

To this end, for any polynomial f, write f+ and f for its positive and negative parts, such that f=f+f and both f+ and f have positive coefficients. For any set of judgements S, formula ϕ, and polynomial f, define

ϕ=SfiffS𝔉totϕff+

where 𝔉tot=def{|P|P}. The next lemma allows us to turn equalities between not-necessarily positive polynomials into provable equalities between 𝕃 formulas in polynomial form.

Lemma 14.

Let f,g be polynomials and ϕ,ψ be formulas in 𝕃. Then

  1. 1.

    If ϕ=Sf and ψ=Sf, then ϕψ is provable from S and 𝔉tot.

  2. 2.

    If ϕ=Sf and ψ=Sg, then ϕψ=Sf+g and ϕψ=Sfg.

  3. 3.

    If f has only positive coefficients, then f=Sf.

  4. 4.

    (f+f)2=Sf2.

  5. 5.

    If f,g have only positive coefficients and fg is provable from S and 𝔉tot, then gf=Sfg.

Now, using Lemma 14.(2–5) we get formulas ρ1 and ρ2 such that ρi=Shi (for i=1,2). By Lemma 14.(2–4), we further obtain (ϑθ)2s=S(ϑθ)2s. By combining the above with Lemma 14.(2) we finally get ρ1θ=Sh1θ and ρ1ϑ(ϑθ)2sρ2=Sh1ϑ+(θϑ)2s+h2. Then, Lemma 14.(1) gives us ρ1θρ1ϑ(ϑθ)2sρ2, obtaining (2), as required.

We next show that S𝔉γ. There are two cases. (Case ρ10) From the conclusion of (2) we obtain ρ1θρ1ϑ and so ρ1θρ1ϑ. Then θϑ, as required. (Case ρ1=0) From the conclusion of (2) we get 0(ϑθ)2sρ2. If s=0, this is 01ρ2, which is a contradiction. Otherwise, we get (θϑ)2s with s>0, and so ϑθ. From this, we derive θϑ (recall that, ϑθ=(ϑθ)(θϑ)) and thus θϑ, as required.

With that we can prove our main completeness theorem, Theorem 9. The root node of the reduction tree is (S,γ) where Sγ. By Proposition 12, the leaf nodes have the form (S𝔉,γ) where S and γ are in polynomial form, and 𝔉 is a finitising set of sequents restricting S{γ}. As the rules are reliable we have S𝔉γ for all leaf nodes. Then, by polynomial completeness, we have S𝔉γ for them, and, finally, as the rules are faithful, we have Sγ, as required.

Turning to incompleteness, define consequential compactness to be that if Sγ is valid for a set of sequents S, then S0γ is valid for some finite S0S (using the evident extension of validity to allow an infinite set of hypotheses). This fails as the counterexample with S={1/2nPn} and γ=P shows. As only a propositional letter and rational numbers are used here, we have:

Theorem 15 (Incompleteness).

There can be no finitary complete consistent proof system for any sublogic of 𝕃 containing a propositional letter and the rational numbers.

The more usual compactness notion is that if every finite subset of a set S of sequents has a model, then so does S. The two are equivalent: if compactness fails with S then consequential compactness fails with S; and if consequential compactness fails with Sϕψ then compactness fails with S{ϕ<ψ}.

7 Complexity Results

In this section, we give complexity bounds for two fundamental decision problems:

Definition 16 (Decision problems).
  • The satisfiability problem asks, given a finite set of sequents S, whether S has a model, i.e., whether S, for some .

  • The semantical consequence problem asks, given a finite set of sequents S and a sequent γ, whether every model of S is also a model of γ, i.e., whether Sγ.

We restrict our attention to the case where formulas only have rational constants. The sizes of formulas, sequents, and sets of sequents are defined as discussed after Proposition 12.

Theorem 17.

Semantical consequence is in PSPACE for 𝕃 and co-NP complete for 𝔸𝕃.

Using faithfulness, reliability, and polynomial completeness, we see that the root node (S,γ) of the reduction tree is valid, in the sense that Sγ, iff all the leaf nodes are. Membership of 𝕃-consequence in PSPACE follows by considering a nondeterministic exploration of the tree making use at the leafs of the fact that satisfiability in the existential theory of the reals [14, 54] is in PSPACE. For 𝔸𝕃, membership in co-NP is proved similarly, but now via reduction to the infeasibility of linear programs [34]; co-NP hardness follows by a linear-time reduction from boolean propositional logic.

Observe that S has a model if and only if is not a semantical consequence of S, in symbols, S⊧̸. We therefore obtain:

Corollary 18.

Satisfiability is in PSPACE for 𝕃 and is NP-complete for 𝔸𝕃.

Moreover, as 𝔸𝕃 is a sublanguage of 𝕃, satisfiability in 𝕃 is at least NP-hard.

8 Conclusions

We have developed and studied Rational Lawvere logic (𝕃), a logic based on two quantales on [0,]: one additive and one multiplicative, forming a semiring. We presented a deduction system for 𝕃 and showed the logic is complete for finitely axiomatized theories (but necessarily incomplete for general theories). The core of the completeness proof draws on a result from real algebraic geometry, the Krivine-Stengle Positivstellensatz, providing evidence of a deep connection between arithmetic and logical reasoning. We additionally presented new complexity results for both 𝕃 and its affine fragment (𝔸𝕃). The satisfiability of a finite set of sequents is NP-complete in 𝔸𝕃 and in PSPACE for 𝕃; and semantical consequence from a finite set of sequents is co-NP-complete in 𝔸𝕃 and in PSPACE for 𝕃.

There are several possibilities for further work. One can ask if general 𝕃 theories have complete infinitary proof systems. One might seek a finitary approximation theory, building on the Weierstrass approximation theorem that continuous real-valued functions on compact subsets can be approximated arbitrarily well by polynomials, Natural extensions of 𝕃 beckon: predicate logics, modal logics, and μ-calculi.

References

  • [1] Jirí Adámek. Varieties of quantitative algebras and their monads. In Christel Baier and Dana Fisman, editors, LICS ’22: 37th Annual ACM/IEEE Symposium on Logic in Computer Science, Haifa, Israel, August 2 - 5, 2022, pages 9:1–9:10. ACM, 2022. doi:10.1145/3531130.3532405.
  • [2] Jirí Adámek, Matej Dostál, and Jirí Velebil. Strongly finitary monads for varieties of quantitative algebras. In Paolo Baldan and Valeria de Paiva, editors, 10th Conference on Algebra and Coalgebra in Computer Science, CALCO 2023, June 19-21, 2023, Indiana University Bloomington, IN, USA, volume 270 of LIPIcs, pages 10:1–10:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.CALCO.2023.10.
  • [3] André Arnold and Maurice Nivat. Metric interpretations of infinite trees and semantics of non deterministic recursive programs. Theor. Comput. Sci., 11:181–205, 1980. doi:10.1016/0304-3975(80)90045-6.
  • [4] Arthur Azevedo de Amorim, Marco Gaboardi, Justin Hsu, Shin-ya Katsumata, and Ikram Cherigui. A semantic account of metric preservation. ACM SIGPLAN Notices, 52(1):545–556, 2017.
  • [5] Giorgio Bacci, Giovanni Bacci, Kim G. Larsen, and Radu Mardare. Converging from branching to linear metrics on Markov chains. Math. Struct. Comput. Sci., 29(1):3–37, 2019. doi:10.1017/S0960129517000160.
  • [6] Giorgio Bacci, Giovanni Bacci, Kim G. Larsen, Radu Mardare, Qiyi Tang, and Franck van Breugel. Computing probabilistic bisimilarity distances for probabilistic automata. In Wan J. Fokkink and Rob van Glabbeek, editors, 30th International Conference on Concurrency Theory, CONCUR 2019, August 27-30, 2019, Amsterdam, the Netherlands, volume 140 of LIPIcs, pages 9:1–9:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.CONCUR.2019.9.
  • [7] Giorgio Bacci, Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. An algebraic theory of Markov processes. In Anuj Dawar and Erich Grädel, editors, Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018, pages 679–688. ACM, 2018. doi:10.1145/3209108.3209177.
  • [8] Giorgio Bacci, Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. Tensor of quantitative equational theories. In 9th Conference on Algebra and Coalgebra in Computer Science, 2021.
  • [9] Giorgio Bacci, Radu Mardare, Prakash Panangaden, and Gordon D. Plotkin. Propositional logics for the lawvere quantale. In Proceedings of the39th Conference on Mathematical Foundations of Programming Semantics MFPS XXXIX (MFPS 2023). ENTICS, 2023.
  • [10] Paolo Baldan, Filippo Bonchi, Henning Kerstan, and Barbara König. Behavioral metrics via functor lifting. In Venkatesh Raman and S. P. Suresh, editors, 34th International Conference on Foundation of Software Technology and Theoretical Computer Science, FSTTCS 2014, December 15-17, 2014, New Delhi, India, volume 29 of LIPIcs, pages 403–415. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2014. doi:10.4230/LIPIcs.FSTTCS.2014.403.
  • [11] Paul Beame, Russell Impagliazzo, Jan Krajíček, Toniann Pitassi, and Pavel Pudlák. Lower bounds on hilbert’s nullstellensatz and propositional proofs. Proceedings of the London Mathematical Society, 3(1):1–26, 1996.
  • [12] Radim Belohlavek. Fuzzy relational systems: foundations and principles, volume 20. Springer Science & Business Media, 2012.
  • [13] Jacek Bochnak, Michel Coste, and Marie-Françoise Roy. Real Algebraic Geometry, volume 36 of A Series of Modern Surveys in Mathematics. Springer Science & Business Media, 1998.
  • [14] John F. Canny. Some algebraic and geometric computations in PSPACE. In Janos Simon, editor, Proceedings of the 20th Annual ACM Symposium on Theory of Computing, (STOC), pages 460–467. ACM, 1988. doi:10.1145/62212.62257.
  • [15] Raphaëlle Crubillé and Ugo Dal Lago. Metric reasoning about λ-terms: The affine case. In 30th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2015, Kyoto, Japan, July 6-10, 2015, pages 633–644. IEEE Computer Society, 2015. doi:10.1109/LICS.2015.64.
  • [16] Raphaëlle Crubillé and Ugo Dal Lago. Metric reasoning about λ-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. Springer, 2017.
  • [17] Francesco Dagnino and Fabio Pasquali. Logical foundations of quantitative equality. In Christel Baier and Dana Fisman, editors, LICS ’22: 37th Annual ACM/IEEE Symposium on Logic in Computer Science, Haifa, Israel, August 2 - 5, 2022, pages 16:1–16:13. ACM, 2022. doi:10.1145/3531130.3533337.
  • [18] Ugo Dal Lago and Francesco Gavazzo. A relational theory of effects and coeffects. Proceedings of the ACM on Programming Languages, 6(POPL):1–28, 2022. doi:10.1145/3498692.
  • [19] 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, pages 545–556. ACM, 2017. doi:10.1145/3009837.3009890.
  • [20] J. Desharnais, V. Gupta, R. Jagadeesan, and P. Panangaden. Metrics for labeled Markov systems. In Proceedings of CONCUR99, number 1664 in Lecture Notes in Computer Science. Springer-Verlag, 1999.
  • [21] Josée Desharnais, Vineet Gupta, Radhakrishnan Jagadeesan, and Prakash Panangaden. A metric for labelled Markov processes. Theoretical Computer Science, 318(3):323–354, June 2004.
  • [22] Francesc Esteva, Lluís Godo, Petr Hájek, and Mirko Navara. Residuated fuzzy logics with an involutive negation. Archive for mathematical logic, 39(2):103–124, 2000. doi:10.1007/S001530050006.
  • [23] Julius Farkas. Theorie der einfachen ungleichungen. Journal für die reine und angewandte Mathematik (Crelles Journal), 1902(124):1–27, 1902.
  • [24] Norm Ferns, Prakash Panangaden, and Doina Precup. Metrics for finite Markov decision precesses. In Proceedings of the 20th Conference on Uncertainty in Artificial Intelligence, pages 162–169, July 2004. URL: https://dslpitt.org/uai/displayArticleDetails.jsp?mmnu=1&smnu=2&article_id=1103&proceeding_id=20.
  • [25] Norm Ferns, Prakash Panangaden, and Doina Precup. Metrics for Markov decision processes with infinite state spaces. In Proceedings of the 21st Conference on Uncertainty in Artificial Intelligence, pages 201–208, July 2005. URL: https://dslpitt.org/uai/displayArticleDetails.jsp?mmnu=1&smnu=2&article_id=1175&proceeding_id=21.
  • [26] Francesco Gavazzo and Cecilia Di Florio. Elements of quantitative rewriting. Proc. ACM Program. Lang., 7(POPL):1832–1863, 2023. doi:10.1145/3571256.
  • [27] Alison L. Gibbs and Francis Edward Su. On choosing and bounding probability metrics. International Statistical Review, 70(3):419–435, 2002.
  • [28] Marco Grandis. Categories, norms and weights. Journal of Homotopy and Related Structures, 2(2):171–186, 2007.
  • [29] Dima Grigoriev and Nicolai N. Vorobjov Jr. Complexity of null-and positivstellensatz proofs. Ann. Pure Appl. Log., 113(1-3):153–160, 2001. doi:10.1016/S0168-0072(01)00055-0.
  • [30] Petr Hájek. What is mathematical fuzzy logic. Fuzzy sets and systems, 157(5):597–603, 2006. doi:10.1016/J.FSS.2005.10.004.
  • [31] Petr Hájek. Metamathematics of fuzzy logic. Springer Science & Business Media, 2013.
  • [32] Petr Hájek, Lluís Godo, and Francesc Esteva. A complete many-valued logic with product-conjunction. Archive for mathematical logic, 35:191–208, 1996. doi:10.1007/BF01268618.
  • [33] Shin-ya Katsumata. A double category theoretic analysis of graded linear exponential comonads. In Foundations of Software Science and Computation Structures: 21st International Conference, FOSSACS 2018, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2018, Thessaloniki, Greece, April 14–20, 2018. Proceedings 21, pages 110–127. Springer, 2018. doi:10.1007/978-3-319-89366-2_6.
  • [34] L.G. Khachiyan. Polynomial algorithms in linear programming. USSR Computational Mathematics and Mathematical Physics, 20(1):53–72, 1980. doi:10.1016/0041-5553(80)90061-0.
  • [35] Jean-Louis Krivine. Anneaux préordonnés. Journal d’analyse mathématique, 12:p–307, 1964.
  • [36] Ugo Dal Lago and Francesco Gavazzo. Differential logical relations, part II increments and derivatives. Theor. Comput. Sci., 895:34–47, 2021. doi:10.1016/J.TCS.2021.09.027.
  • [37] Ugo Dal Lago and Francesco Gavazzo. Modal reasoning = metric reasoning, via lawvere. CoRR, abs/2103.03871, 2021. arXiv:2103.03871.
  • [38] Ugo Dal Lago and Francesco Gavazzo. A relational theory of effects and coeffects. Proc. ACM Program. Lang., 6(POPL):1–28, 2022. doi:10.1145/3498692.
  • [39] Ugo Dal Lago, Francesco Gavazzo, and Akira Yoshimizu. Differential logical relations, part I: the simply-typed case. In Christel Baier, Ioannis Chatzigiannakis, Paola Flocchini, and Stefano Leonardi, editors, 46th International Colloquium on Automata, Languages, and Programming, ICALP 2019, July 9-12, 2019, Patras, Greece, volume 132 of LIPIcs, pages 111:1–111:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.ICALP.2019.111.
  • [40] Francis William Lawvere. Metric spaces, generalized logic, and closed categories. Rendiconti del seminario matématico e fisico di Milano, 43(1):135–166, 1973.
  • [41] Francis William Lawvere. Metric spaces, generalized logic, and closed categories. Reprints in Theory and Applications of Categories, 1:1–37, 2002. Originally published in Rendiconti del Seminario Matematico e Fisico di Milano, XLIII (1973), 135–166. URL: http://www.tac.mta.ca/tac/reprints/articles/1/tr1.pdf.
  • [42] Jean-Simon Pacaud Lemay and Jean-Baptiste Vienney. Graded differential categories and graded differential linear logic. In Marie Kerjean and Paul Blain Levy, editors, Proceedings of the 39th Conference on the Mathematical Foundations of Programming Semantics, MFPS XXXIX, Indiana University, Bloomington, IN, USA, June 21-23, 2023, volume 3 of EPTICS. EpiSciences, 2023. doi:10.46298/ENTICS.12290.
  • [43] Radu Mardare, Prakash Panangaden, and Gordon Plotkin. Quantitative algebraic reasoning. In Proceedings of the 31st Annual ACM-IEEE Symposium on Logic in Computer Science, pages 700–709, 2016. doi:10.1145/2933575.2934518.
  • [44] Radu Mardare, Prakash Panangaden, and Gordon Plotkin. On the axiomatizability of quantitative algebras. In Proceedings of the 32nd Annual ACM-IEEE Symposium on Logic in Computer Science, 2017.
  • [45] Radu Mardare, Prakash Panangaden, and Gordon Plotkin. Fixed-points for quantitative equational logics. In Proceedings of the ACM-IEEE Symposium on Logic in Computer Science, 2021.
  • [46] Jiří Matoušek and Bernd Gärtner. Understanding and using linear programming, volume 1. Springer, 2007.
  • [47] Matteo Mio. Compact quantitative theories of convex algebras. In Stefan Milius and Clemens Kupke, editors, MFPS’25: 41st Conference on Mathematical Foundations of Programming Semantics, Glasgow, Scotland, June 16–20, 2025, page ?? EPTS, 2025. to appear.
  • [48] Matteo Mio, Ralph Sarkis, and Valeria Vignudelli. Combining nondeterminism, probability, and termination: Equational and metric reasoning. 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.9470717.
  • [49] Matteo Mio, Ralph Sarkis, and Valeria Vignudelli. Beyond nonexpansive operations in quantitative algebraic reasoning. In Christel Baier and Dana Fisman, editors, LICS’22: 37th Annual ACM/IEEE Symposium on Logic in Computer Science, Haifa, Israel, August 2–5, 2022, pages 52:1–52:13. ACM, 2022. doi:10.1145/3531130.3533366.
  • [50] Théodore Samuel Motzkin. Two consequences of the transposition theorem on linear inequalities. Econometrica (pre-1986), 19(2):184, 1951.
  • [51] Jan Pavelka. On fuzzy logic i, ii, iii. Zeit. Math. Logik u. Grundl. Math., 25:447–464, 1979.
  • [52] Toniann Pitassi and Iddo Tzameret. Algebraic proof complexity: Progress, frontiers and challenges. ACM SIGLOG News, 3(3):21–43, 2016. doi:10.1145/2984450.2984455.
  • [53] 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.
  • [54] James Renegar. On the computational complexity and geometry of the first-order theory of the reals. Part I: Introduction. Preliminaries. The geometry of semi-algebraic sets. The decision problem for the existential theory of the reals. Journal of Symbolic Computation, 13(3):255–299, 1992. doi:10.1016/S0747-7171(10)80003-3.
  • [55] Kimmo I. Rosenthal. Quantales and their applications. Longman Scientific and Technical, 1990.
  • [56] Petr Savickỳ, Roberto Cignoli, Francesc Esteva, Lluís Godo, and Carles Noguera. On product logic with truth-constants. Journal of Logic and Computation, 16(2):205–225, 2006. doi:10.1093/LOGCOM/EXI075.
  • [57] Alexander Schrijver. Theory of linear and integer programming. John Wiley & Sons, 1998.
  • [58] G Stengle. A nullstellensatz and a positivstellensatz in semialgebraic geometry. Mathematische Annalen, 207(2):87–97, 1974.
  • [59] Marshall H. Stone. Postulates for the barycentric calculus. Annali di Matematica Pura ed Applicata, 29(1):25–30, December 1949.