Abstract
Łukasiewicz logic is an established formal system of manyvalued logic. Decision problems in both propositional and firstorder case have been classified as to their computational complexity or degrees of undecidability; for the propositional fragment, theoremhood and provability from finite theories are \(\mathrm {coNP}\) complete. This paper extends the range of results by looking at validity degree in propositional Łukasiewicz logic, a natural optimization problem to find the minimal value of a term under a finite theory in a fixed complete semantics interpreting the logic. A classification for this problem is provided using the oracle class \(\mathrm {FP}^{\mathrm {NP}}\), where it is shown complete under metric reductions.
You have full access to this open access chapter, Download conference paper PDF
Similar content being viewed by others
1 Introduction
Łukasiewicz logic originated in the 1920s as a semantically motivated formal system for manyvalued logic. This paper works with the infinitevalued Łukasiewicz logic Ł, introduced by Łukasiewicz and Tarski [20]. As with some other nonclassical systems, such as intuitionistic logic, the syntax is similar to classical logic, while the valid inferences form a strict subset of those of classical logic.
Validity/provability degrees as a concept in Łukasiewicz logic stem from a research line proposed by Goguen [11]. The paper set the challenge to develop a formal approach allowing to derive partly true conclusions from partly true assumptions. In [26] the task was taken up by Pavelka, who offered a comprehensive formalism based on complete residuated lattices, using essentially diagrams of arbitrary but fixed residuated lattices to capture provability degrees in the syntax. Pavelka used graded terms^{Footnote 1} and his formal system incorporated rules that explicitly use the algebra on degrees/grades alongside syntactic derivations. For example, a graded modus ponens reads \(\{\langle r, \varphi \rangle , \langle s, \varphi \rightarrow \psi \rangle \}/ \langle r\odot s, \psi \rangle \) with r and s truth constants, \(\varphi \) and \(\psi \) terms, and \(\odot \) the monoidal operation of the residuated lattice. Pavelka’s approach was later simplified by Hájek [12], who proposed an expansion of Łukasiewicz infinitevalued logic with constants for rational elements of [0, 1], and rendered each graded term \(\langle r, \varphi \rangle \) as the implication \(r\rightarrow \varphi \). This was an elegant example of embedding the graded syntax approach in what turns out to be a conservative expansion of Łukasiewicz logic. The resulting logic was named Rational Pavelka logic (\(\mathrm {RPL}\)); see [12, 14, 4, 7].
Assume truth values range in a complete lattice. The validity degree of a term \(\varphi \) under a theory T is the infimum of values \(\varphi \) can get under assignments that make T true. No constants are needed to define this notion. Still, the constants provide a canonical way of introducing provability degrees, the syntactic counterpart; thus we look at the language of \(\mathrm {RPL}\) next to that of Ł.
Both Ł and \(\mathrm {RPL}\) have an equivalent algebraic semantics (in the sense of [5]). In particular, \(\L \) corresponds to the variety of MValgebras; [6, 9, 24] and the references therein provide resources for their welldeveloped theory. MValgebras are strongly linked to Abelian \(\ell \)groups ([22]); this is manifest in the choice of algebraic language, and we follow MValgebraists and use the language \(\oplus \) and \(\lnot \) as a reference language for our complexity results. This is also a matter of convenience since some previous results are framed in this language.
We shall use the realvalued (standard) MVsemantics, with the unit interval as the domain and piecewise linear functions as interpretations of the function symbols; one can prove strong completeness for finite theories over Ł w.r.t. this algebra. The algebra has been useful for obtaining complexity results for Ł, since Mundici’s pioneering \(\mathrm {NP}\) completeness result on its SAT problem [23], which also gives \(\mathrm {coNP}\) completeness for theoremhood in Ł. Other complexity results for propositional logic Ł include [1, 2] reducing the decision problems in Ł to the setting of finite MVchains, [17, 18] dealing with admissible rules, [3, 25], or [8]. All these works target decision problems.
The validity degree task (to determine the validity degree of a term \(\varphi \) under a finite theory T) is a natural optimization problem induced by the manyvalued setting and the purpose of this paper is to see where it sits among other optimization problems. Using tools of complexity theory, we classify the validity degree task in propositional Łukasiewicz logic Ł and its extension \(\mathrm {RPL}\), for instances that pair a finite theory T with a term \(\varphi \). Our emphasis is on Ł rather than \(\mathrm {RPL}\): it is far better known, and the existing algebraic methods for Ł provide us with tools. In fact, the few complexity results available for \(\mathrm {RPL}\) rely on reductions to Ł. In [12] Hájek proved that for finite theories in \(\mathrm {RPL}\), validity degrees are rational; his method inspires ours in eliminating the constants, relying on their implicit definability in Ł. Hájek also provided complexity classification for the decision version of the problem in [13], showing that provability from finite theories in propositional \(\mathrm {RPL}\) is \(\mathrm {coNP}\) complete, using mixed integer programming. In [15], the same result is obtained from analogous results for Ł, using the implicit definability of constants directly.
We fill the gap of a basic classification for the optimization problem. Our upper bounds are based on improving Hájek’s rationality proof for validity degrees with establishing an explicit polynomial bound on denominator size, relying on Aguzzoli and Ciabattoni’s paper [2]. Their paper uses the language of Ł; however, the methods of [12, 15] allow us to tackle the rational constants and to derive analogous upper bounds for \(\mathrm {RPL}\), and we do that in Sect. 4; such upper bounds then apply also to any fragments of language, i.a., the MVlanguage. For lower bounds (Sect. 5), we work with the language of \(\L \), whereby the hardness result applies also to \(\mathrm {RPL}\).
The decision version of the validity degree is \(\mathrm {coNP}\) complete, and the SAT problem for is \(\mathrm {NP}\) complete. Looking at these and similar results on NP completeness of decision versions for other common optimization problems, one might ask what would the appropriate (manyone, polytime) reduction notion be between the optimization versions, and indeed if such reductions always exist. Krentel [19] defines metric reductions in response to the former question and shows that as far as these reductions are concerned, the answer to the latter is negative unless \(\mathrm {P}=\mathrm {NP}\) (an outline of relevant results is in Sect. 3). Thus there is a sense in which a mere fact that the decision version of a problem is \(\mathrm {NP}\) complete does not provide enough information about the optimization version.
Under standard complexity assumptions, one cannot even approximate the validity degree efficiently: [16, Theorem 7.4] says that no efficient algorithm can compute the validity degree for an empty theory within a distance of \(\delta <1/2\) unless \(\mathrm {P}=\mathrm {NP}\).
The combined results of Sects. 4 and 5 yield the following statement.
Theorem 1
The validity degree task, considered in either Ł or \(\mathrm {RPL}\), is complete for the class \(\mathrm {FP}^{\mathrm {NP}}\) under metric reductions.
This appears to be the first work to shift the focus from decision to optimization problems as regards complexity of fuzzy logics, identifying a relevant complexity class. We find it compelling to investigate complexity problems for nonclassical logics that have no counterpart in classical logic, and the validity degree problem, discussed here for Ł, presents one such research direction. (While, e.g., admissible rules present another, now well established one.)
This work is about the propositional fragments of Ł and \(\mathrm {RPL}\), so notions such as language, term/formula, or assignment need to be read appropriately.
2 Łukasiewicz Logic and Rational Pavelka Logic
The basic language of propositional Łukasiewicz logic Ł has two function symbols: unary \(\lnot \) (negation) and binary \(\oplus \) (strong disjunction or sum). Other function symbols are definable: 1 as \(x\oplus \lnot x\) and 0 as \(\lnot 1\); further, \(x\odot y\) is \(\lnot (\lnot x\oplus \lnot y)\) (strong conjunction or product); \(x\rightarrow y\) is \(\lnot x \oplus y\); \(x\equiv y\) is \((x\rightarrow y)\odot (y\rightarrow x)\); \(x\vee y\) is \((x\rightarrow y) \rightarrow y\) or \((y\rightarrow x)\rightarrow x\); and \(x\wedge y\) is \(\lnot (\lnot x \vee \lnot y)\).
The interpretations of \(\oplus \), \(\odot \), \(\wedge \) and \(\vee \) are commutative and associative, so one can write, e.g., \(x_1 \oplus \dots \oplus x_n\) without worrying about order and parentheses. We write \(x^n\) for \(\underbrace{x\odot \dots \odot x}_{n \text { times}}\) and nx for \(\underbrace{x\oplus \dots \oplus x}_{n \text { times}}\). Also, \(\vee \) and \(\wedge \) distribute over each other and \(\odot \) distributes over \(\vee \).
Wellformed Łterms are defined as usual. The basic language is a point of reference for complexity considerations in this paper, however we may at times use the expanded language for clarity (as in classical logic).
Definition 1
([2]) For any term \(\varphi (x_1,\dots ,x_n)\), \(\sharp (x)\varphi \) denotes the number of occurrences of the variable x in \(\varphi \), and \(\sharp \varphi = \varSigma _{i=1}^n\sharp (x_i)\varphi \).
The \(\sharp \) function is a good notion of length for terms without iterated \(\lnot \) symbols (\(\lnot \lnot \varphi \equiv \varphi \) is a theorem of \(\mathrm {L}\)). Our complexity results apply also to the language of the Full Lambek calculus with exchange and weakening (\( \mathrm {{FL}}_\mathrm {ew} \)), i.e., \(\{\odot , \rightarrow , \vee , \wedge , 0, 1\}\) (and the MVsymbol \(\oplus \)). Indeed one observes that rendering \(\odot \) and \(\rightarrow \) in the basic language does not affect length; for \(\vee \) and \(\wedge \), any occurrence of these defined symbols can be expanded to the basic language in two different ways (due to commutativity), and this can be used to rewrite any term with these symbols with only polynomial increase in length.
2.1 MValgebras
The general MValgebraic semantics will not be needed in this paper, anymore than a formal calculus for Ł. We will work with the standard MValgebra : the domain is the real interval [0, 1] and with each MVterm \(\varphi (x_1,\dots ,x_n)\) we associate a function \(f_\varphi :[0,1]^n\longrightarrow [0,1]\), defined by induction on term structure with \(f_{\lnot \varphi }\) defined as \(1f_\varphi \), \(f_{\varphi \oplus \psi }\) as \(\min (1,f_\varphi +f_\psi )\). 1 is the only designated element, accounting for the notions of truth/validity. For any assignment v in , \(v(\varphi \rightarrow \psi )=1\) iff \(v(\varphi )\le v(\psi )\), and thus \(v(\varphi \equiv \psi )=1\) iff \(v(\varphi )=v(\psi )\).
The class of MValgebras is generated by as a quasivariety; it is also generated by the class of finite MVchains, the \((k+1)\)element MVchain being the subalgebra of on the domain \(\{0,1/k, \dots , (k+1)/k,1\}\).
Provability from finite theories in Ł coincides with the finite consequence relation of . We have bypassed introducing the formal calculus; to provide a meaning to the references to Ł within this paper, let us adopt this as a definition. We lose little since the algorithmic approach only tackles finite theories anyway.
A function \(f:[0,1]^n \rightarrow [0,1]\) is a McNaughton function if it is continuous and piecewise linear with integer coefficients: there are finitely many linear polynomials \(\{p_i\}_{i\in I}\), with \(p_i(\bar{x}) = \varSigma _{j=1}^n a_{ij}\,x_j + b_i\) and \(\bar{a_i}, b_i\) integers for each i, such that for any \(\bar{u}\in [0,1]^n\) there is an \(i\in I\) with \(f(\bar{u})= p_i(\bar{u})\). McNaughton theorem ([21]) says that termdefinable functions of coincide with McNaughton functions. The theorem highlights the fact that one can provide a countably infinite array of pairwise nonequivalent MVterms for any fixed number of variables starting with one, as opposed to the case of Boolean functions.
A polyhedral complex C is a set of polyhedra (cells) such that if A is in C, so are all faces of A, and for A, B in C, \(A\cap B\) is a common face of A and B. Given an MVterm \(\varphi (x_1,\dots ,x_n)\) one can build canonically a polyhedral complex \(C(\varphi )\) such that \([0,1]^n=\bigcup C(\varphi )\) and \(f_\varphi \) is linear over each ndimensional cell of \(C(\varphi )\). The minimum of \(f_\varphi \) is attained at a vertex of an ndimensional cell of \(C(\varphi )\). [2] derives the upper bound \((\frac{\sharp \varphi }{n})^n\) for the least common denominator of any vertex of any ndimensional cell of \(C(\varphi )\) (see also [23]). By [1] this is a tight bound on cardinality of MVchains witnessing nonvalidity of MVterms.
For any MVterm \(\varphi \), the 1region of \(f_\varphi \) is the union of cells of \(C(\varphi )\) such that \(f_\varphi \) attains the value 1 on all points in the cell. (The highest dimension of the cells in the 1region of \(\varphi \) can range anywhere between 0 and n.) The 1region of \(f_\varphi \) is compact for any \(\varphi \). One can investigate the minimum of \(f_\psi \) relative to the 1region of an \(f_\varphi \); details in [2].
2.2 RMValgebras
The language of \(\mathrm {RPL}\) expands the language \(\{\oplus ,\lnot \}\) of Ł with a set \(\mathcal{Q}= Q\cap [0,1]\) of constants. The constants are represented as ordered pairs of coprime integers in binary. The size of the binary representation of an integer n is denoted n.
The standard RMValgebra has as its MVreduct and interprets rational constants as themselves. As for Ł above, we identify \(\mathrm {RPL}\) with the finite consequence relation of . If \(\varphi \) is an RMVterm, \(f_\varphi \) is the function defined by \(\varphi \) in .
Let us extend the \(\sharp \) function to obtain a good length notion for RMVterms. Rational constants can be viewed as atoms but the number of atom occurrences is not a suitable length notion since it ignores the space needed to represent each constant, which can be arbitrary with respect to the term structure.
Definition 2
Let an RMVterm \(\varphi \) have constants \(p_1/q_1,\dots ,p_m/q_m\) and variables \(x_1,\dots ,x_n\). For a rational \(p/q \in [0,1]\), let \(\sharp (p/q)\varphi \) denote the number of occurrences of p/q in \(\varphi \). Define \(\sharp \varphi = \varSigma _{i=1}^n\sharp (x_i)\varphi + \varSigma _{j=1}^m\sharp (p_j/q_j)\varphi (p_j+q_j)\).
Each rational r in [0, 1] is implicitly definable by an MVterm in ^{Footnote 2}: i.e., there is an MVterm \(\varphi (x_1,\dots ,x_k)\) and an \(i \in \{1,\dots ,k\}\) such that, for each assignment v in , we have \(v(x_i)=r\) whenever \(v(\varphi )=1\) (cf. [12, 15]). To implicitly define a rational p/q, with \(1\le p\le q\), in , first define 1/q, using the onevariable term \(z_{1/q}\equiv (\lnot z_{1/q})^{q1}\), whereupon p/q becomes termdefinable under a theory containing this definition of 1/q, namely we have \(z_{p/q} \equiv p {z_{1/q}}\) (cf. the technical results in [28, 10, 16]). With p and q in binary, these implicit definitions are exponentialsize in p and q. One can make them polynomialsize on pain of introducing (a linear number of) new variables.
Lemma 1
([15, Lemma 4.1]) For \(q\in {\mathbb {N}}\), \(q\ge 2\), take the binary representation of \(q1\), i.e., let \(q1=\varSigma _{i=0}^m p_i 2^i\) with \(p_i\in \{0,1\}\) and \(p_m=1\). Let \(I=\{i\mid p_i=1\}\). In , the set
has a unique satisfying assignment, sending \(z_{1/q}\) to 1/q.
To define 1/q, we need \(q1+1\) variables, and the length of the product in the last equivalence is linear in q. Similarly one can achieve a polynomialsize variant of an implicit definition for p/q.
It is shown in [12] how to obtain finite strong completeness of \(\mathrm {RPL}\) w.r.t. from finite strong completeness of \(\L \) w.r.t. , based on the following statement ([12, Lemma 3.3.13]). Let \(\delta _{p/q}\) be an MVterm that implicitly defines the value p/q in a variable \(z_{p/q}\) in . First, given an RMVterm \(\varphi \) in variables \(x_1,\dots ,x_n\) and constants \(p_1/q_1,\dots ,p_m/q_m\), let \(\delta _\varphi \) stand for \(\delta _{p_1/q_1}\odot \dots \odot \delta _{p_m/q_m}\)^{Footnote 3}, and let \(\varphi ^\star \) result from \(\varphi \) by replacing each constant \(p_i/q_i\) with the variable \(z_{{p_i}/{q_i}}\). Now let \( \{\psi _1,\dots ,\psi _k\} \cup \{\varphi \}\) be a finite set of RMVterms (in some variables \(x_1,\dots ,x_n\), particularly, with no occurrences of yvariables or zvariables) and let \(\tau \) denote \(\{\psi _1 \odot \dots \odot \psi _k\}\). The statement says that . The reason is that under \(\delta _{\tau \odot \varphi }\), the variables that correspond to the implicitly defined constants behave exactly as the constants would. Moreover, \(\delta _{\tau \odot \varphi }\) is an MVterm.
Lemma 2
Let \(\tau \) and \(\varphi \) be RMVterms with rational constants \((p_1/q_1,\dots ,p_m/q_m)\). Using the \(\delta \) notation as above, we have:

1.
\(\delta _{\tau \odot \varphi }\) has \(\varSigma _{j=1}^m (p_j+q_j1) +2m\) variables.

2.
the length of \(\delta _{\tau \odot \varphi }\), written as an MVterm featuring \(\oplus \) and \(\lnot \), is at most \(\varSigma _{j=1}^m (8p_j+ 8q_j1+4)\).
Finally we are ready to define the validity degree of a term \(\varphi \) in a theory T:
where a valuation v is a model of T if it assigns the value 1 to all terms in T. We only consider finite theories; for \(T=\{\psi _1,\dots ,\psi _k\}\) write \(\tau = \psi _1 \odot \dots \odot \psi _k\); then \(\Vert \varphi \Vert _\tau = \min \{v(\varphi ) \mid v \text{ model } \text{ of } \tau \}\). For \(\tau \) inconsistent, \(\Vert \varphi \Vert _\tau =1\). In the rest of this paper, T is finite and represented by the term \(\tau \) as above. We define the optimization problem.

Validity Degree

Instance: RMVterms \(\tau \) and \(\varphi \) (possibly without constants).

Output: \(\Vert \varphi \Vert _\tau \).
Lemma 3
\(\Vert \varphi \Vert _\tau = \Vert \varphi ^\star \Vert _{(\tau ^\star \odot \delta _{\tau \odot \varphi })}\).
3 Optimization Problems and Metric Reductions
This section briefly sketches our computational paradigm, reproducing some notions and results on the structure of the oracle class \(\mathrm {FP}^{\mathrm {NP}}\) as given in Krentel [19], with a wider framework as provided in [27]. We also introduce an optimization problem from [19] that will be used in Sect. 5.
In this paper we use the term optimization problem for what is sometimes called an evaluation or cost version of a function problem (cf. [27]). In our setting, the output is the validity degree \(\Vert \varphi \Vert _\tau \) (as an extremal value of \(f_\varphi \) on the 1region of \(f_\tau \)), rather than an assignment at which the extremal value is attained.
Let \(z: {\mathbb {N}}\longrightarrow {\mathbb {N}}\) be smooth.^{Footnote 4} \(\mathrm {FP}^{\mathrm {NP}}[z(n)]\) is the class of functions computable in polynomial time with an \(\mathrm {NP}\) oracle with at most \(z(\left {x}\right )\) oracle calls for instance x. In particular, \(\mathrm {FP}^{\mathrm {NP}}\) stands for \(\mathrm {FP}^{\mathrm {NP}}[n^{O(1)}]\).
Definition 3
([19]) Let \(\varSigma \) be a finite alphabet and \(f,g: \varSigma ^*\longrightarrow {\mathbb {N}}\). A metric reduction from f to g is a pair \((h_1,h_2)\) of polynomialtime computable functions where \(h_1:\varSigma ^*\longrightarrow \varSigma ^*\) and \(h_2:\varSigma ^*\times {\mathbb {N}}\longrightarrow {\mathbb {N}}\), such that \(f(x)=h_2(x,g(h_1(x)))\) for all \(x\in \varSigma ^*\).
The concept of a metric reduction is a natural generalization of polynomialtime manyone reduction to optimization problems. It follows from the definition that for each function z as above, \(\mathrm {FP}^{\mathrm {NP}}[z(n)]\) is closed under metric reductions. The paper [19] provides examples of problems that are complete for \(\mathrm {FP}^{\mathrm {NP}}\) under metric reductions. We define one such problem (see [19]).

Weighted MaxSAT

Instance: Boolean CNF term \((C_1 \wedge \dots \wedge C_n)(x_1,\dots ,x_k)\) with weights on clauses \(w_1,\dots ,w_n\), each \(w_i\) positive integer in binary.

Output: the maximal sum of weights of true clauses over all (Boolean) assignments to the variables \(x_1,\dots ,x_k\).
Theorem 2
([19]) Weighted MaxSAT is \(\mathrm {FP}^{\mathrm {NP}}\) complete.
The paper [19] provides a separation result for problems in \(\mathrm {FP}^{\mathrm {NP}}\), a simple form of which is given below. In particular, under standard complexity assumptions there are no metric reductions from \(\mathrm {FP}^{\mathrm {NP}}\) complete problems (such as Weighted MaxSAT) to some problems in \(\mathrm {FP}^{\mathrm {NP}}[O(\log n)]\), such as the Vertex Cover problem.
Theorem 3
([19]) Assume \(\mathrm {P}\not =\mathrm {NP}\).
Then \(\mathrm {FP}^{\mathrm {NP}}[O(\log \log n)] \subsetneq \mathrm {FP}^{\mathrm {NP}}[O(\log n)] \subsetneq \mathrm {FP}^{\mathrm {NP}}[n^{O(1)}]\).
4 Upper Bound: Validity Degree is in \(\mathrm {FP}^{\mathrm {NP}}\)
We present a polynomialtime oracle computation for Validity Degree, using a \(\mathrm {coNP}\) complete decision version of the problem as an oracle; this yields membership of Validity Degree in \(\mathrm {FP}^{\mathrm {NP}}\). The instances of the problem are pairs \((\tau , \varphi )\) of RMVterms, i.e., terms with the MVsymbols \(\oplus \) and \(\lnot \) where atoms are variables and rational constants. The following oracle will be used.

DRPLGradedProvability

Instance: \((\tau ,\varphi ,k)\) with \(\tau ,\varphi \) RMVterms and k a rational number in [0, 1].

Output: \(\tau \vdash _\mathrm {RPL}k \rightarrow \varphi \)?
Note that \(\tau \vdash _\mathrm {RPL}k \rightarrow \varphi \) iff \(k\le \Vert \varphi \Vert _\tau \). By [13], RPLprovability from finite theories (given RMV terms \(\tau \) and \(\varphi \), it is the case that \(\tau \vdash _{\mathrm {RPL}}\varphi \)?) is \(\mathrm {coNP}\) complete. Hence, so is DRPLGradedProvability.
The oracle computation can employ a binary search, given an explicit upper bound on denominators. To obtain a polynomialtime (oracle) computation, the result of [12] that \(\Vert \varphi \Vert _\tau \) is rational is not enough: we need an upper bound \(N(\tau ,\varphi )\) on the denominator that is in itself of polynomial size (in binary).
To expose the algebraic methods employed in this section, let us start with a simpler related problem, interesting in its own right: the natural optimization version of the term satisfiability problem in the standard MValgebra .

Max Value

Instance: MVterm \(\varphi (x_1,\dots ,x_n)\).

Output: \(\max f_\varphi \) on \([0,1]^n\).
This problem reduces to Validity Degree: one maximizes \(f_\varphi \) by minimizing \(f_{\lnot \varphi }\) under an empty theory. As mentioned in Sect. 1, even this simpler problem cannot be efficiently approximated (see [16, Theorem 7.4]).
Lemma 4
Let \(p_1/q_1\) and \(p_2/q_2\) be two distinct rational numbers and N a positive integer, let \(q_1,q_2\le N\). Then \(\left {\frac{p_1}{q_1}\frac{p_2}{q_2}}\right \ge \frac{1}{N^2}\).
Lemma 5
Let \(a<b\) be rationals and N a positive integer. Assume the interval [a, b) contains exactly one rational c with denominator at most N, and other rationals with denominator at most N are at a distance greater than \(ba\) from c. There is a polytime algorithm that finds c on input a,b, and N in binary.
Theorem 4
Max Value is in \(\mathrm {FP}^{\mathrm {NP}}\).
Proof
Let \(\varphi (x_1,\dots ,x_n)\) be an MVterm. Then \(f_\varphi \) is maximal on a rational vector \(\langle p_1/q_1,\dots , p_n/q_n\rangle \); the least common denominator of the vector is at most \((\frac{\sharp \varphi }{n})^n\) ([2, Theorem 14]). It follows that the denominator of \(f_\varphi (p_1/q_1,\dots , p_n/q_n)\) is at most \(N(\varphi )=(\frac{\sharp \varphi }{n})^{n}\).
We sketch a polynomialtime algorithm computing \(\max (f_\varphi )\) using binary search on rationals in [0, 1] with denominators at most \(N(\varphi )\), using the generalized satisfiability (GenSAT), known to be \(\mathrm {NP}\) complete ([25]), as oracle: given MVterm \(\varphi \) and a rational \(r\in [0,1]\), is \(\max (f_\varphi ) \ge r\)?

Test \(\textsc {GenSAT}(\varphi ,1)\). If so, output 1 and terminate.

Otherwise, let \(a=0\), \(b=1\), and \(k=0\).

Repeat

\(k=k+1\); if \(\textsc {GenSAT}(\varphi , a+b/2)\), let \(a=a+b/2\), otherwise let \(b= a+b/2\)

until \(2^k>(N(\varphi ))^2\).

Finally, find \(\Vert \varphi \Vert _\tau \) in [a, b) relying on Lemma 5.
Assume the algorithm runs through the loop at least once. After the search terminates, k is the least integer s.t. \(2^k> (N(\varphi ))^2\), i.e., \(k>2\log (N(\varphi )) \ge k1\). hence the number k of passes through the loop is polynomial. Also, the semiclosed interval [a, b) of length \(1/2^k<1/(N(\varphi ))^2\) contains \(\max f_\varphi \), and by Lemma 4, \(\max f_\varphi \) is the only value in [a, b) with denominator at most \(N(\varphi )\). The values of a and b are \(l/2^k\) and \((l+1)/2^k\) respectively, so a and b are polynomial in k.
Let us address the Validity Degree problem. The binary search will be analogous, we need to establish an upper bound for the denominators. The following lemma can be obtained from the proof of [2, Theorem 17], a result on finite consequence relation in Ł.
Lemma 6
Let \(\tau \) and \(\varphi \) be MVterms and let n be the number of variables in these terms. Assume \(M,N\in {\mathbb {N}}\) are coprime nonnegative integers such that \(\Vert \varphi \Vert _\tau = M/N\). Then
Proof
Following [2] and the references therein, one can build, in a canonical way, (ndimensional^{Footnote 5}) polyhedral complexes \(C(\tau )\) and \(C(\varphi )\) such that \(\bigcup C(\tau )= [0,1]^n=\bigcup C(\varphi )\), with \(f_\tau \) linear over each ndimensional cell of \(C(\tau )\) and \(f_\varphi \) linear over each ndimensional cell of \(C(\varphi )\).
It follows from the analysis of [2] that the minimum of \(f_\varphi \) on the 1region of \(\tau \) is attained at a vertex (of an ndimensional cell) of the common refinement of \(C(\tau )\) and \(C(\varphi )\). It can further be derived from that paper that the least common denominator of any vertex in this common refinement is bounded by \((\frac{\sharp \tau +\sharp \varphi }{n})^n\); the proof is analogous to the case when \(\tau \) is void.
Hence, there is a rational vector \(\langle p_1/q_1,\dots , p_n/q_n\rangle \) on which \(f_\tau \) is 1, \(f_\varphi \) attains the value \(\Vert \varphi \Vert _\tau \), and the least common denominator of \(\langle p_1/q_1,\dots , p_n/q_n\rangle \) is \((\frac{\sharp \tau +\sharp \varphi }{n})^n\). It follows that \(N\le \left( \frac{\sharp \tau +\sharp \varphi }{n}\right) ^{n}\).
Denote by \(N(\tau ,\varphi )\) the obtained upper bound on the denominator of \(\Vert \varphi \Vert _\tau \) for MVterms \(\tau \) and \(\varphi \). To provide an upper bound \(N^\star (\tau , \varphi )\) on the denominator of \(\Vert \varphi \Vert _\tau \) in case \(\tau \) and \(\varphi \) are RMVterms, we rely on Lemma 3 in order to apply the existing results for MVterms: namely, we use the upper bounds on \(\Vert \varphi ^\star \Vert _{(\tau ^\star \odot \delta _{\tau \odot \varphi })}\).
Lemma 7
Let \(\tau \) and \(\varphi \) be RMVterms. \(N^\star (\tau ,\varphi ) = N(\tau ^\star \odot \delta _{\tau \odot \varphi },\varphi ^\star ) =\)
\(=(\frac{\sharp \tau ^\star + \sharp \delta _{\tau \odot \varphi }+ \sharp \varphi ^\star }{n})^{n}\), where n denotes the number of variables in the terms \(\tau ^\star \), \( \delta _{\tau \odot \varphi }\), and \(\varphi ^\star \).
Lemma 8
For \(\tau \) and \(\varphi \) RMVterms, \(N^\star (\tau ,\varphi )\) is polynomial size in \(\sharp \tau \) and \(\sharp \varphi \).
Theorem 5
Validity Degree is in \(\mathrm {FP}^{\mathrm {NP}}\).
Proof
We provide a polynomialtime Turing reduction of Validity Degree to DRPLGradedProvability; i.e., for RMVterms \(\tau \) and \(\varphi \) the algorithm computes \(\Vert \varphi \Vert _\tau \) in time polynomial in \(\sharp \tau +\sharp \varphi \), relying on the oracle. The algorithm is based on a binary search analogous to the algorithm for Max Value from Theorem 4.
The initial test is \(\textsc {DRPLGradedProvability}(1,\tau ,\varphi )\), where a positive answer yields \(\Vert \varphi \Vert _\tau =1\).
If this is not the case, the binary search is initiated. The upper bound \(N=N^\star (\tau ,\varphi )\) on denominator of \(\Vert \varphi \Vert _\tau \) is as in Lemma 7 and 8. This provides discrete structure to search in and the terminating condition \(2^k>N^2\).
The final application of Lemma 5 is analogous to the proof of Theorem 4.
5 Lower Bound: Validity Degree Is \(\mathrm {FP}^{\mathrm {NP}}\) Hard
We give a metric reduction of Weighted MaxSAT to Validity Degree. In this section the Validity Degree problem is considered for MVterms \(\tau \) and \(\varphi \), i.e., we work in the MVfragment of the RMV language. The lower bound obtained for the MVlanguage then applies also to RMVlanguage.
Theorem 6
Validity Degree is \(\mathrm {FP}^{\mathrm {NP}}\) hard under metric reductions.
Proof
For clarity, the proof is divided in two parts. First, we reduce Weighted MaxSAT to Validity Degree in an MVlanguage with the definable symbols. Subsequently we show how to polynomially translate general MVterms that occur in the range of the metric reduction to MVterms in the basic language.
We define the function \(h_1\) from Definition 3, which takes inputs to Weighted MaxSAT and transforms them to inputs to Validity Degree. Consider a classical CNFterm (with language \(\wedge \), \(\vee \), and \(\lnot \)) \(\varphi \) with variables \(x_1,\dots ,x_k\) and weights \(w_1,\dots , w_n\) for the clauses \(C_1,\dots ,C_n\) of \(\varphi \). One obtains the solution to Weighted MaxSAT by maximizing \(\varSigma _{i=1}^n v(C_i) w_i \) over all Boolean assignments v to \(x_1,\dots ,x_k\). To utilize Validity Degree, we need to render this expression in the MVlanguage and to isolate the Boolean semantics among the broader semantics of .
We define a finite theory T and a term \(\varPhi \) in stages by making several observations. At any stage, T is assumed to include terms specified in the earlier stages.

(a)
On any input \(\langle \tau ,\varphi \rangle \), Validity Degree gives the minimum of \(f_\varphi \) in over the 1region of \(f_\tau \). The routine can also compute the maximum of \(f_\varphi \) on the same domain if the input is \(\langle \tau ,\lnot \varphi \rangle \) and the output is subtracted from 1.

(b)
To force Boolean assignments, for each \(1\le j\le k\) put \(x_j \vee \lnot x_j\) in T. Since \(\vee \) evaluates as \(\max \) in , this condition is true only under (standard MV) assignments where either \(x_j\) is 1, or \(\lnot x_j\) is 1, i.e., \(x_j\) is 0.

(c)
The algebra can only correctly add up to the sum 1.^{Footnote 6} Thus the weights \(w_1,\dots , w_n\) need to be scaled. The computations with weights are bounded by \(w=\varSigma _{i=1}^n w_i\), which is the output of Weighted MaxSAT in case \(\varphi \) is satisfiable, so an appropriate factor to scale by is 1/w. The new weights are \(w_i'=w_i/w\) for each \(i\in \{1,\dots , n\}\) This is an orderpreserving transformation of the weights and the new weights are of polysize in the input size.

(d)
Multiplication is not available, so \(e(C_i) w_i'\) cannot be expressed with an MVterm. One can however implicitly define some rational expressions as follows.

Introduce a new variable b. To implicitly define 1/w in variable b, include in T the system from Lemma 1 that polynomially renders the condition \(b\equiv (\lnot b)^{w1}\) ; now any model v of T will have \(v(b)=1/w\).

For \(1\le i\le n\), introduce a new variable \(y_i\). Include \(y_i\rightarrow b\) in T; any model v of T will have \(v(y_i)\le 1/w\). Further, include in T a polynomial rendering of \(\underbrace{y_i\oplus y_i\oplus \dots \oplus y_i}_{w \text { times}}\equiv C_i\), using Lemma 1; then for any model v of T we have that \(v(C_i)=0\) implies \(v(y_i)=0\), whereas \(v(C_i)=1\) implies \(v(y_i)\ge 1/w\), which in combination with the other condition in this item gives \(v(y_i)= v(C_i)/w\).

For \(1\le i\le n\), introduce a new variable \(z_i\). Include in T a polynomial rendering of \(\underbrace{y_i\oplus y_i\oplus \dots \oplus y_i}_{w_i \text { times}}\equiv z_i\), again relying on Lemma 1. Any model v of T will have \(v(z_i) = v(C_i) w_i'\).

To recap, we define T as the following set of MVterms:

\(x_j \vee \lnot x_j\) for each \(j\in \{1,\dots ,k\}\);

a polynomialsized rendering of \(b\equiv (\lnot b)^{w1}\) (cf. Lemma 1);

for \(1\le i\le n\), \(y_i\rightarrow b\) and a polysized rendering of \(w y_i \equiv C_i\) (Lemma 1);

for \(1\le i\le n\), a polysized rendering of \( w_i y_i \equiv z_i\) (Lemma 1).
Let a term \(\tau \) represent T, let \(\varPhi \) stand for \(\lnot (z_1\oplus z_2\oplus \dots \oplus z_n)\). Let \(m=\Vert \varPhi \Vert _\tau \), i.e., m is the rational number that Validity Degree returns on input \(\tau \) and \(\varPhi \). We claim that \((1m) w\) (the function \(h_2\) from Definition 3) is the solution to the instance \(C_1,\dots ,C_n\) and \(w_1,\dots , w_n\) of Weighted MaxSAT on input.
To see this, observe that the models of \(\tau \) feature precisely all Boolean assignments to variables \(\{x_1,\dots ,x_k\}\). Each such model v extends to the new variables b, \(y_i\) and \(z_i\) (\(1\le i\le n\)), namely \(v(b)=1/w\), \(v(y_i)=(1/w) v(C_i)\), and \(v(z_i)=(w_i/w) v(C_i)\). In particular, if v models T, then the values of b, \(y_i\) and \(z_i\) under v are determined by the values that v assigns to the xvariables (i.e., the “Boolean” variables). Except for b, the sets of variables introduced for each i are pairwise disjoint.
It follows from the construction of \(\tau \) and \(\varPhi \) that any Boolean assignment that yields an extremal value of Weighted MaxSAT also produces an extremal value of Validity Degree and vice versa. It is easy to check that the orderreversing operations (taking \(1y\) back and forth) and the scaling and descaling work as expected (both are orderpreserving). Hence, the reduction correctly computes an input to Validity Degree and correctly renders the result of this routine as an output of Weighted MaxSAT.
Finally, both functions involved are clearly polynomialtime functions.
For the second part of the proof, we notice that \(\varPhi \) is a term in the basic language. As for \(\tau \), recall that one can render \(\varphi \odot \psi \) and \(\varphi \rightarrow \psi \) in the basic language, using the definitions, without changing the number of variable occurrences; this includes the nested occurrences of \(\odot \) in (a rendering of) \((\lnot b)^{w1}\) (recall that the product in the psize variant is of cardinality w). To rewrite each disjunction \(C_i\) in the basic language, we apply to the following claim.^{Footnote 7}
Claim: let \(\alpha = (\alpha _1\vee \dots \vee \alpha _n)\), where \(\alpha _i\) are terms in the basic language. There is a term \(\beta \) in the basic language Łequivalent to \(\alpha \) and such that \(\sharp \beta =2\sharp \alpha \).
To justify the claim, let \(\alpha ^l = \alpha '\vee \alpha _n\), where \(\alpha ' = (\alpha _1\vee \dots \vee \alpha _{n1})\). Then \(\alpha ^l\) is equivalent to \((\alpha '\rightarrow \alpha _n)\rightarrow \alpha _n\). Repeat this process for \(\alpha '\) unless it coincides with \(\alpha _1\). This produces a term equivalent to \(\alpha \), with \(\rightarrow \) as the only symbol; then rewrite \(\rightarrow \) in the basic language.
6 Closing Remarks
This result attests a key role of algebraic methods for computational complexity upper bounds in propositional Łukasiewicz logic. Syntactic derivations are not even discussed; indeed at present we have no idea how to employ them.
A prooftheoretic counterpart of a validity degree is the provability degree: \(\varphi _T = \sup \{ r \mid T \vdash _{\mathrm {RPL}} {r} \rightarrow \varphi \}\), with the provability relation defined by extending Łukasiewicz logic with suitable axioms. Hájek proved Pavelka completeness for \(\mathrm {RPL}\) in [12]: for any choice of T and \(\varphi \), \(\varphi _T\) coincides with \(\Vert \varphi \Vert _T\). Our results thereby apply also to provability degrees (for finite theories).
To our knowledge there are no works explicitly dealing with the more pragmatical tasks of providing algorithms computing the validity degree (or maximal value), identifying fragments where they might be efficient, or similar.
We have obtained hardness for \(\mathrm {FP}^{\mathrm {NP}}\) under metric reductions for Validity Degree but not Max Value. A somewhat similar reduction of Weighted MaxSAT to a 01 integer programming problem was presented in [19], where roughly speaking, some conditions in the matrix correspond to some of our conditions in the theory. We do not know how to avoid employing the theory, and cannot supply a \(\mathrm {FP}^{\mathrm {NP}}\) hardness proof for Max Value at present.
Notes
 1.
We use term and (propositional) formula interchangeably in this paper.
 2.
On the other hand, no rationals beyond 0 and 1 are termdefinable in , as a consequence of McNaughton theorem.
 3.
It is assumed that the collections of auxiliary variables for the implicit definitions of \(p_i\), \(q_i\) with \(1\le i\le n\) are pairwise disjoint and also disjoint from the variables \(x_1,\dots ,x_n\).
 4.
I.e., z is nondecreasing and the function \(1^{n}\mapsto 1^{z(n)}\) is polynomialtime computable.
 5.
The dimension of \(f_\tau \) and \(f_\varphi \) can be extended to n in a number of ways, e.g., supplying dummy variables. This will modify the length by a linear function of n.
 6.
Addition, represented by the strong disjunction \(\oplus \), is truncated at 1.
 7.
Slightly more general claim was made, without proof, at the beginning of Sect. 2.
References
Aguzzoli, S.: An asymptotically tight bound on countermodels for Łukasiewicz logic. Int. J. Approx. Reason. 43(1), 76–89 (2006)
Aguzzoli, S., Ciabattoni, A.: Finiteness in infinitevalued Łukasiewicz logic. J. Logic Lang. Inform. 9(1), 5–29 (2000). https://doi.org/10.1023/A:1008311022292
Aguzzoli, S., Mundici, D.: Weirstrass approximation theorem and Łukasiewicz formulas. In: Fitting, M.C., Orlowska, E. (eds.) Beyond Two: Theory and Applications of MultipleValued Logic. Studies in Fuzziness and Soft Computing, vol. 114, pp. 251–272. PhysicaVerlag, Heidelberg (2003)
Bělohlávek, R.: Pavelkastyle fuzzy logic in retrospect and prospect. Fuzzy Sets Syst. 281, 61–72 (2015)
Blok, W.J., Pigozzi, D.L.: Algebraizable Logics, Memoirs of the American Mathematical Society, vol. 396. American Mathematical Society, Providence (1989)
Cignoli, R., D’Ottaviano, I.M., Mundici, D.: Algebraic Foundations of ManyValued Reasoning, Trends in Logic, vol. 7. Kluwer, Dordrecht (1999)
Cintula, P.: A note on axiomatizations of Pavelkastyle complete fuzzy logics. Fuzzy Sets Syst. 292, 160–174 (2016)
Cintula, P., Hájek, P.: Complexity issues in axiomatic extensions of Łukasiewicz logic. J. Logic Comput. 19(2), 245–260 (2009)
Di Nola, A., Leuştean, I.: Łukasiewicz logic and MValgebras. In: Cintula, P., Hájek, P., Noguera, C. (eds.) Handbook of Mathematical Fuzzy Logic, vol. 2, pp. 469–583. College Publications (2011)
Gispert, J.: Universal classes of MVchains with applications to manyvalued logic. Math. Logic Q. 42, 581–601 (2002)
Goguen, J.A.: The logic of inexact concepts. Synthese 19(3–4), 325–373 (1969)
Hájek, P.: Metamathematics of Fuzzy Logic, Trends in Logic, vol. 4. Kluwer, Dordrecht (1998)
Hájek, P.: Computational complexity of tnorm based propositional fuzzy logics with rational truth constants. Fuzzy Sets Syst. 157(5), 677–682 (2006)
Hájek, P., Paris, J., Shepherdson, J.C.: Rational Pavelka logic is a conservative extension of Łukasiewicz logic. J. Symb. Logic 65(2), 669–682 (2000)
Haniková, Z.: Implicit definability of truth constants in Łukasiewicz logic. Soft. Comput. 23(7), 2279–2287 (2019). https://doi.org/10.1007/s005000183461x
Haniková, Z., Savický, P.: Term satisfiability in \(\text{ FL }_{ew}\)algebras. Theoret. Comput. Sci. 631, 1–15 (2016)
Jeřábek, E.: Admissible rules of Łukasiewicz logic. J. Logic Comput. 20(2), 425–447 (2010)
Jeřábek, E.: The complexity of admissible rules of Łukasiewicz logic. J. Logic Comput. 23(3), 693–705 (2013)
Krentel, M.W.: The complexity of optimization problems. J. Comput. Syst. Sci. 36, 490–509 (1988)
Łukasiewicz, J., Tarski, A.: Untersuchungen über den Aussagenkalkül. Comptes Rendus des Séances de la Société des Sciences et des Lettres de Varsovie, cl. III 23(iii), 30–50 (1930)
McNaughton, R.: A theorem about infinitevalued sentential logic. J. Symb. Logic 16(1), 1–13 (1951)
Mundici, D.: Mapping Abelian \(\ell \)groups with strong unit oneone into MValgebras. J. Algebra 98(1), 76–81 (1986)
Mundici, D.: Satisfiability in manyvalued sentential logic is NPcomplete. Theoret. Comput. Sci. 52(1–2), 145–153 (1987)
Mundici, D.: Advanced Łukasiewicz Calculus and MVAlgebras, Trends in Logics, vol. 35. Springer, Heidelberg (2011). https://doi.org/10.1007/9789400708402
Mundici, D., Olivetti, N.: Resolution and model building in the infinitevalued calculus of Łukasiewicz. Theoret. Comput. Sci. 200, 335–366 (1998)
Pavelka, J.: On fuzzy logic I, II, III. Zeitschrift für Mathematische Logik und Grundlagen der Mathematik 25, 45–52, 119–134, 447–464 (1979)
Stockmeyer, L.J.: Computational complexity. In: Barnhart, C., Laporte, G., et al. (ed.) Handbooks in OR & MS, vol. 3, pp. 455–517. Elsevier Science Publishers (1992)
Torrens, A.: Cyclic elements in MValgebras and post algebras. Math. Logic Q. 40(4), 431–444 (1994)
Acknowledgements
This work was supported partly by the grant GA1800113S of the Czech Science Foundation and partly by the longterm strategic development financing of the Institute of Computer Science (RVO:67985807).
The author is indebted to Stefano Aguzzoli, Tommaso Flaminio, Lluís Godo, Jirka Hanika, and Petr Savický for references, discussion and advice on the material of Sect. 4. Moreover, the feedback provided by anonymous referees simplified and improved the presentation of the material. Any shortcomings in the text remain with the author.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Haniková, Z. (2020). On the Complexity of Validity Degrees in Łukasiewicz Logic. In: Anselmo, M., Della Vedova, G., Manea, F., Pauly, A. (eds) Beyond the Horizon of Computability. CiE 2020. Lecture Notes in Computer Science(), vol 12098. Springer, Cham. https://doi.org/10.1007/9783030514662_15
Download citation
DOI: https://doi.org/10.1007/9783030514662_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 9783030514655
Online ISBN: 9783030514662
eBook Packages: Computer ScienceComputer Science (R0)