δ-Decidability over the Reals

From SAT to SMT: The light at the end of a tunel

One Solver to rule them all,

One Solver to find them,
One Solver to bring them all,

and in the darkness bind them.

Goal:

A universal tool for solving problems.

A universal language for defining problems

??

?

From SAT to SMT: The light at the end of a tunel

SAT

(Boolean Satisfiability Problem)

(x_1 \lor x_2) \land (x_2 \lor \neg x_1) \land \neg x_2
(x1x2)(x2¬x1)¬x2(x_1 \lor x_2) \land (x_2 \lor \neg x_1) \land \neg x_2

NP-complete:

1-planarity, 3-dimensional matching, Bipartite dimension, Capacitated minimum spanning tree, Clique problem, Complete coloring, Domatic number, Dominating set, Bandwidth problem, Clique cover problem, Rank coloring, Degree-constrained spanning tree, Feedback vertex set, Feedback arc set, Graph homomorphism problem, Graph coloring, Hamiltonian completion, Longest path problem, Maximum independent set, Maximum Induced path, Graph intersection number, Metric dimension of a graph, Minimum k-cut, Pathwidth, Set splitting problem, Shortest total path length spanning tree, Slope number two testing, Treewidth, Vertex cover, Mathematical programming, 3-partition problem, Bin packing problem, Knapsack problem and several variants, Bottleneck traveling salesman, Numerical 3-dimensional matching, Partition problem, Quadratic assignment problem, Quadratic programming, Subset sum problem, Formal languages and string processing, Closest string, Longest common subsequence problem, The bounded variant of the Post correspondence problem, Shortest common supersequence, String-to-string correction problem, ...

From SAT to SMT: The light at the end of a tunel

SAT's hidden secret

(x_1 \lor x_2) \land (x_2 \lor \neg x_1) \land \neg x_2
(x1x2)(x2¬x1)¬x2(x_1 \lor x_2) \land (x_2 \lor \neg x_1) \land \neg x_2
\exists x_1,x_2:\ (x_1 \lor x_2) \land (x_2 \lor \neg x_1) \land \neg x_2
x1,x2: (x1x2)(x2¬x1)¬x2\exists x_1,x_2:\ (x_1 \lor x_2) \land (x_2 \lor \neg x_1) \land \neg x_2

is

From SAT to SMT: The light at the end of a tunel

QBF

\exists x_1 \forall x_2 \exists x_3 ... Q_n x_n: \phi(x_1, x_2, x_3, ... , x_n)
x1x2x3...Qnxn:ϕ(x1,x2,x3,...,xn)\exists x_1 \forall x_2 \exists x_3 ... Q_n x_n: \phi(x_1, x_2, x_3, ... , x_n)

PSPACE-complete:

Uhm...actually, it's

\text{NP}^n
NPn\text{NP}^n

but never mind

Quantified boolean formulas, Stochastic satisfiability, Linear temporal logic satisfiability and model checking, Type inhabitation problem for simply typed lambda calculus, Integer circuit evaluation, Word problem for linear bounded automata, Word problem for quasi-realtime automata, Emptiness problem for a nondeterministic two-way finite state automaton, Equivalence problem for nondeterministic finite automata, Word problem and emptiness problem for non-erasing stack automata, Deterministic finite automata intersection emptiness, A generalized version of Langton's Ant, Minimizing nondeterministic finite automata, planarity of succinct graphs, acyclicity of succinct graphs, connectedness of succinct graphs, existence of Eulerian paths in a succinct graph, Canadian traveller problem, Dynamic graph reliability, Deterministic constraint logic (unbounded), Nondeterministic Constraint Logic (unbounded), Bounded two-player Constraint Logic, Word problem for context-sensitive language, Regular language intersection, Regular expression star freeness, Equivalence problem for regular expressions, Emptiness problem for regular expressions with intersection, Equivalence problem for star-free regular expressions with squaring, Covering for linear grammars, Structural equivalence for linear grammars, Equivalence problem for Regular grammars, Emptiness problem for ET0L grammars, Word problem for ET0L grammars

(Quantified Boolean Formulae)

From SAT to SMT: The light at the end of a tunel

SMT

\exists x_1 \forall x_2 \exists x_3 ... Q_n x_n \in X: \phi(x_1, x_2, x_3, ... , x_n)
x1x2x3...QnxnX:ϕ(x1,x2,x3,...,xn)\exists x_1 \forall x_2 \exists x_3 ... Q_n x_n \in X: \phi(x_1, x_2, x_3, ... , x_n)

(Satisfiability Modulo Theories)

UNDECIDABLE

(for real numbers)

1948: A. Tarski

A decision method for elementary algebra and geometry

(quantified polynomials over reals)

Complexity: EXPSPACE ... uff...

From SAT to SMT: The light at the end of a tunel

SMT

\exists x_1 \forall x_2 \exists x_3 ... Q_n x_n \in X: \phi(x_1, x_2, x_3, ... , x_n)
x1x2x3...QnxnX:ϕ(x1,x2,x3,...,xn)\exists x_1 \forall x_2 \exists x_3 ... Q_n x_n \in X: \phi(x_1, x_2, x_3, ... , x_n)

(Satisfiability Modulo Theories)

UNDECIDABLE

(for real numbers 

transcendental functions)

A: You look so sad! What happened?

B: Universe is continuous and undecidable. We will never be able to understand it!

A: Are you sure?

B: Pretty sure, sine is undecidable.

A: No. Are you sure universe is continuous?

B: Well... I was...

The honest answer is "We don't know". Physical theories do not describe how the universe actually works, the only thing we know is that their predictions match experimental results.

δ-Decidability over the Reals

The universe does not care, so why should we?

\mathbb{D} = \{ m / 2^n : m \in \mathbb{Z}, n \in \mathbb{N}\}
D={m/2n:mZ,nN}\mathbb{D} = \{ m / 2^n : m \in \mathbb{Z}, n \in \mathbb{N}\}
\text{A name of } a \in \mathbb{R} \text{ is a function } \gamma_a: \mathbb{N} \rightarrow \mathbb{D}:
A name of aR is a function γa:ND:\text{A name of } a \in \mathbb{R} \text{ is a function } \gamma_a: \mathbb{N} \rightarrow \mathbb{D}:
\forall i \in \mathbb{N}, |\gamma_a(i) - a| < 2^{-i}
iN,γa(i)a<2i\forall i \in \mathbb{N}, |\gamma_a(i) - a| < 2^{-i}
\text{Computable real } a = \text{Computable name } \gamma_a
Computable real a=Computable name γa\text{Computable real } a = \text{Computable name } \gamma_a
\text{Type 2 computable function } f: \mathbb{R}^n \rightarrow \mathbb{R}
Type 2 computable function f:RnR\text{Type 2 computable function } f: \mathbb{R}^n \rightarrow \mathbb{R}
\text{Exists an oracle Turing machine such that:}
Exists an oracle Turing machine such that:\text{Exists an oracle Turing machine such that:}
M_f^{\gamma_x}(1), M_f^{\gamma_x}(2), ...
Mfγx(1),Mfγx(2),... M_f^{\gamma_x}(1), M_f^{\gamma_x}(2), ...
\text{is a name of } f(x)
is a name of f(x)\text{is a name of } f(x)

Assuming x is computable with arbitrary precision, it can be mapped to f(x) with arbitrary precision.

Common functions are computable: addition, multiplication, min, max, exp, sin, Lipschitz-continuous ODE...

Important properties:

\text{Any computable function is point-wise continuous.}
Any computable function is point-wise continuous.\text{Any computable function is point-wise continuous.}
\text{Assuming } dom(f) \text{ is a compact set, } f \text{ has a}
Assuming dom(f) is a compact set, f has a\text{Assuming } dom(f) \text{ is a compact set, } f \text{ has a}
\text{Computable and Uniform Modulus of Continuity}
Computable and Uniform Modulus of Continuity\text{Computable and Uniform Modulus of Continuity}

??!

We can compute necessary precision of inputs assuming we know the final desired precision.

The loss of precision is finite and quantifiable.

Reasoning about Type 2 functions

\mathcal{F} \text{ - collection of Type 2 computable functions}
F - collection of Type 2 computable functions\mathcal{F} \text{ - collection of Type 2 computable functions}

Where do the formulae come from?

t := x \mid f(t(\vec{x})) \text{, where } f \in \mathcal{F} \text{, possibly constant}
t:=xf(t(x)), where fF, possibly constantt := x \mid f(t(\vec{x})) \text{, where } f \in \mathcal{F} \text{, possibly constant}
\varphi := t(\vec{x}) > 0 \mid t(\vec{x}) \geq 0 \mid \varphi \land \varphi \mid \varphi \lor \varphi \mid \exists^{[u,v]} x_i \varphi \mid \forall^{[u,v]} x_i \varphi
φ:=t(x)>0t(x)0φφφφ[u,v]xiφ[u,v]xiφ\varphi := t(\vec{x}) > 0 \mid t(\vec{x}) \geq 0 \mid \varphi \land \varphi \mid \varphi \lor \varphi \mid \exists^{[u,v]} x_i \varphi \mid \forall^{[u,v]} x_i \varphi
  • Bounded quantifiers - will be needed later
  • Negation is pushed down to propositions

Bring in the δ!

\varphi = Q_1^{I_1} x_1 ... Q_n^{I_n} x_n . \psi[t_i > 0; t_j \geq 0]
φ=Q1I1x1...QnInxn.ψ[ti>0;tj0]\varphi = Q_1^{I_1} x_1 ... Q_n^{I_n} x_n . \psi[t_i > 0; t_j \geq 0]
\varphi^{+\delta} = Q_1^{I_1} x_1 ... Q_n^{I_n} x_n . \psi[t_i > \delta; t_j \geq \delta]
φ+δ=Q1I1x1...QnInxn.ψ[ti>δ;tjδ]\varphi^{+\delta} = Q_1^{I_1} x_1 ... Q_n^{I_n} x_n . \psi[t_i > \delta; t_j \geq \delta]
\varphi^{-\delta} = Q_1^{I_1} x_1 ... Q_n^{I_n} x_n . \psi[t_i > -\delta; t_j \geq -\delta]
φδ=Q1I1x1...QnInxn.ψ[ti>δ;tjδ]\varphi^{-\delta} = Q_1^{I_1} x_1 ... Q_n^{I_n} x_n . \psi[t_i > -\delta; t_j \geq -\delta]
\delta\text{-strenghtening:}
δ-strenghtening:\delta\text{-strenghtening:}
\delta\text{-weakening:}
δ-weakening:\delta\text{-weakening:}
\varphi^{+\delta} \Rightarrow \varphi^{+\delta'} \Rightarrow \varphi \Rightarrow \varphi^{-\delta'} \Rightarrow \varphi^{-\delta}; \delta \geq \delta'
φ+δφ+δφφδφδ;δδ\varphi^{+\delta} \Rightarrow \varphi^{+\delta'} \Rightarrow \varphi \Rightarrow \varphi^{-\delta'} \Rightarrow \varphi^{-\delta}; \delta \geq \delta'
\varphi^{+\delta}
φ+δ\varphi^{+\delta}
\varphi^{+\delta'}
φ+δ\varphi^{+\delta'}
\varphi
φ\varphi
\varphi^{-\delta'}
φδ\varphi^{-\delta'}
\varphi^{-\delta}
φδ\varphi^{-\delta}

δ-Decidability vs. δ-Robustness

\text{There exists an algorithm which for } \delta \in Q^+ \text{ computes: }
There exists an algorithm which for δQ+ computes: \text{There exists an algorithm which for } \delta \in Q^+ \text{ computes: }
True: \varphi \text{ is true}
True:φ is trueTrue: \varphi \text{ is true}
\delta\text{-}False: \varphi^{+\delta} \text{ is false}
δ-False:φ+δ is false\delta\text{-}False: \varphi^{+\delta} \text{ is false}
False: \varphi \text{ is false}
False:φ is falseFalse: \varphi \text{ is false}
\delta\text{-}True: \varphi^{-\delta} \text{ is true}
δ-True:φδ is true\delta\text{-}True: \varphi^{-\delta} \text{ is true}
\varphi^{+\delta}
φ+δ\varphi^{+\delta}
\varphi
φ\varphi
\varphi^{-\delta}
φδ\varphi^{-\delta}

δ-Decidability vs. δ-Robustness

\text{Sentence } \varphi \text{ is } \delta\text{-robust agains weakening if } \varphi^{-\delta} \Rightarrow \varphi.
Sentence φ is δ-robust agains weakening if φδφ.\text{Sentence } \varphi \text{ is } \delta\text{-robust agains weakening if } \varphi^{-\delta} \Rightarrow \varphi.
\varphi^{+\delta}
φ+δ\varphi^{+\delta}
\varphi
φ\varphi
\varphi^{-\delta}
φδ\varphi^{-\delta}
\delta\text{-robustness is as hard as regular decidability.}
δ-robustness is as hard as regular decidability.\delta\text{-robustness is as hard as regular decidability.}
\text{Sentence } \varphi \text{ is } \delta\text{-robust agains strengthening if } \varphi \Rightarrow \varphi^{+\delta}.
Sentence φ is δ-robust agains strengthening if φφ+δ.\text{Sentence } \varphi \text{ is } \delta\text{-robust agains strengthening if } \varphi \Rightarrow \varphi^{+\delta}.

δ-Decidability (Proof)

\text{Strictification of } \varphi \text{: all } t_i \geq 0 \text{ are replaced with } t_i > 0.
Strictification of φ: all ti0 are replaced with ti>0.\text{Strictification of } \varphi \text{: all } t_i \geq 0 \text{ are replaced with } t_i > 0.
\text{Destrictification of } \varphi \text{: all } t_i > 0 \text{ are replaced with } t_i \geq 0.
Destrictification of φ: all ti>0 are replaced with ti0.\text{Destrictification of } \varphi \text{: all } t_i > 0 \text{ are replaced with } t_i \geq 0.

(Similar to δ-strengthening and δ-weakening)

st(\varphi) \Rightarrow \varphi
st(φ)φst(\varphi) \Rightarrow \varphi
\varphi \Rightarrow de(\varphi)
φde(φ)\varphi \Rightarrow de(\varphi)

δ-Decidability (Proof)

\text{An inductively defined term } \alpha(\varphi):
An inductively defined term α(φ):\text{An inductively defined term } \alpha(\varphi):
\alpha(t > 0) = t \text{ and } \alpha(t \geq 0) = t
α(t>0)=t and α(t0)=t\alpha(t > 0) = t \text{ and } \alpha(t \geq 0) = t
\alpha(\varphi \land \psi) = min(\alpha(\varphi), \alpha(\psi))
α(φψ)=min(α(φ),α(ψ))\alpha(\varphi \land \psi) = min(\alpha(\varphi), \alpha(\psi))
\alpha(\varphi \lor \psi) = max(\alpha(\varphi), \alpha(\psi))
α(φψ)=max(α(φ),α(ψ))\alpha(\varphi \lor \psi) = max(\alpha(\varphi), \alpha(\psi))
\alpha(\exists^{[u,v]}x.\varphi) = min_{x\in[u,v]}(\alpha(\varphi))
α([u,v]x.φ)=minx[u,v](α(φ))\alpha(\exists^{[u,v]}x.\varphi) = min_{x\in[u,v]}(\alpha(\varphi))
\alpha(\forall^{[u,v]}x.\varphi) = max_{x\in[u,v]}(\alpha(\varphi))
α([u,v]x.φ)=maxx[u,v](α(φ))\alpha(\forall^{[u,v]}x.\varphi) = max_{x\in[u,v]}(\alpha(\varphi))
\forall^{[0,1]}x_1 \exists^{[0,x_1]}x_2.(e^{x_1} > 0 \land x_2 \geq 0)
[0,1]x1[0,x1]x2.(ex1>0x20)\forall^{[0,1]}x_1 \exists^{[0,x_1]}x_2.(e^{x_1} > 0 \land x_2 \geq 0)
min_{x_1 \in [0,1]}( max_{x_2 \in [0, x_1]}( min(e^{x_1}, x_2)))
minx1[0,1](maxx2[0,x1](min(ex1,x2)))min_{x_1 \in [0,1]}( max_{x_2 \in [0, x_1]}( min(e^{x_1}, x_2)))

δ-Decidability (Proof)

st(\varphi) \equiv \alpha(\varphi) > 0
st(φ)α(φ)>0st(\varphi) \equiv \alpha(\varphi) > 0

Observations:

st(\varphi^{+\delta}) \equiv \alpha(\varphi) > \delta
st(φ+δ)α(φ)>δst(\varphi^{+\delta}) \equiv \alpha(\varphi) > \delta
de(\varphi) \equiv \alpha(\varphi) \geq 0
de(φ)α(φ)0de(\varphi) \equiv \alpha(\varphi) \geq 0
de(\varphi^{+\delta}) \equiv \alpha(\varphi) \geq \delta
de(φ+δ)α(φ)δde(\varphi^{+\delta}) \equiv \alpha(\varphi) \geq \delta
\alpha(\varphi)\text{ is computable!}
α(φ) is computable!\alpha(\varphi)\text{ is computable!}
\forall i \in \mathbb{N}\ |M(i) - \alpha(\varphi)| < 2^{-i}
iN M(i)α(φ)<2i\forall i \in \mathbb{N}\ |M(i) - \alpha(\varphi)| < 2^{-i}
\text{Using appropriate } i \text{ we can decide: }
Using appropriate i we can decide: \text{Using appropriate } i \text{ we can decide: }
\alpha(\varphi) > \delta \Rightarrow \alpha(\varphi) > 0 \equiv st(\varphi) \Rightarrow \varphi \rightarrow True
α(φ)>δα(φ)>0st(φ)φTrue\alpha(\varphi) > \delta \Rightarrow \alpha(\varphi) > 0 \equiv st(\varphi) \Rightarrow \varphi \rightarrow True
\alpha(\varphi) < \delta \equiv \neg(\alpha(\varphi) \geq \delta) \equiv \neg de(\varphi^{+\delta}) \Rightarrow \neg\varphi^{+\delta} \rightarrow \delta \text{-} False
α(φ)<δ¬(α(φ)δ)¬de(φ+δ)¬φ+δδ-False\alpha(\varphi) < \delta \equiv \neg(\alpha(\varphi) \geq \delta) \equiv \neg de(\varphi^{+\delta}) \Rightarrow \neg\varphi^{+\delta} \rightarrow \delta \text{-} False

Complexity, revisited

  • SAT:  NP
  • QBF: PSPACE
  • SMT over Real Closed Fields: EXPSPACE
  • SMT over Transcendental fun.: ?!

Complexity, revisited

  • SAT:  NP
  • QBF: PSPACE
  • SMT with δ-Decidability: PSPACE
  • SMT over Real Closed Fields: EXPSPACE
  • SMT over Transcendental fun.: ?!

delta-SMT

By Samuel Pastva

delta-SMT

  • 345