(Mostly Real) Quantifier Elimination Thomas Sturm AVACS Autumn - - PowerPoint PPT Presentation

mostly real quantifier elimination
SMART_READER_LITE
LIVE PREVIEW

(Mostly Real) Quantifier Elimination Thomas Sturm AVACS Autumn - - PowerPoint PPT Presentation

(Mostly Real) Quantifier Elimination Thomas Sturm AVACS Autumn School, Oldenburg, Germany, October 1, 2015 http://www.mpi-inf.mpg.de/~sturm/ Overview Introduction Definitions Virtual Substitution Variants of Quantifier Elimination Software


slide-1
SLIDE 1

(Mostly Real) Quantifier Elimination

Thomas Sturm

AVACS Autumn School, Oldenburg, Germany, October 1, 2015

http://www.mpi-inf.mpg.de/~sturm/

slide-2
SLIDE 2

Overview

Introduction Definitions Virtual Substitution Variants of Quantifier Elimination Software Applications in Geometry and Verification CAD for Satistfiability Checking CAD as a Complete Decision Procedure CAD for Quantifier Elimination Summary

Introduction · 2/42

slide-3
SLIDE 3

Quantifier Elimination and Decision

Example (Tarski Algebra = real numbers with arithmetic and ordering) R | = ∀x∃y(x2 + xy + b > 0 ∧ x + ay 2 + b ≤ 0)

  • ϕ

← → a < 0 ∧ b > 0

  • ϕ′

Introduction · 3/42

slide-4
SLIDE 4

Quantifier Elimination and Decision

Example (Tarski Algebra = real numbers with arithmetic and ordering) R | = ∀x∃y(x2 + xy + b > 0 ∧ x + ay 2 + b ≤ 0)

  • ϕ

← → a < 0 ∧ b > 0

  • ϕ′

Formally: Given 1st-order theory Θ, find algorithm with input ϕ and output ϕ′ quantifier-free such that Θ | = ϕ ← → ϕ′,

  • r prove that no such algorithm exists.

Important aspects: theoretical complexity, practical performance

Introduction · 3/42

slide-5
SLIDE 5

Quantifier Elimination and Decision

Example (Tarski Algebra = real numbers with arithmetic and ordering) R | = ∀x∃y(x2 + xy + b > 0 ∧ x + ay 2 + b ≤ 0)

  • ϕ

← → a < 0 ∧ b > 0

  • ϕ′

Formally: Given 1st-order theory Θ, find algorithm with input ϕ and output ϕ′ quantifier-free such that Θ | = ϕ ← → ϕ′,

  • r prove that no such algorithm exists.

Important aspects: theoretical complexity, practical performance Important Special Cases

◮ all variables in ϕ are quantified decision problem ◮ only existential quantifiers satisfiability problem

Introduction · 3/42

slide-6
SLIDE 6

Quantifier Elimination-relevant Research Topics

Applications chemistry engineering geometry life sciences physics planning scientific computing verification . . .

Automated Reasoning heuristics learning model-based construction . . . Algebraic Model Theory definable sets elementary extensions substructure completeness . . .

Symbolic Computation

algebraic complexity computer algebra systems exact arithmetic Gröbner bases polynomial factorization real algebraic numbers subresultants

. . .

QE

Introduction · 4/42

slide-7
SLIDE 7

Definitions

Definitions · 5/42

slide-8
SLIDE 8

Syntax and Semantics

Language (= Signature): L = (0, 1, +, −, ·, <, ≤, =, >, ≥) Semantics: Everything is interpreted over R.

Definitions · 6/42

slide-9
SLIDE 9

Syntax and Semantics

Language (= Signature): L = (0, 1, +, −, ·, <, ≤, =, >, ≥) Semantics: Everything is interpreted over R. Important convention in algebraic model theory There is always“=” which is formally not in the language. Semantics of “=” is Leibniz’s (second-order) definition of equality x = y : ⇐ ⇒ ∀pp(x) ← → p(y) in contrast to its first-order theory. For convenience, define L= := L ∪ {=}.

Definitions · 6/42

slide-10
SLIDE 10

Syntax and Semantics

Language (= Signature): L = (0, 1, +, −, ·, <, ≤, =, >, ≥) Semantics: Everything is interpreted over R. Important convention in algebraic model theory There is always“=” which is formally not in the language. Semantics of “=” is Leibniz’s (second-order) definition of equality x = y : ⇐ ⇒ ∀pp(x) ← → p(y) in contrast to its first-order theory. For convenience, define L= := L ∪ {=}. Remark There is no multiplicative inverse or division in L. We do not want to deal with partial functions.

Definitions · 6/42

slide-11
SLIDE 11

Terms and Atomic Formulas

Terms are w.l.o.g. polynomials with integer coefficients in a recursive representation t ∈ (. . . (((Z[xn])[xn−1]) . . . )[x2])[x1] Representation is unique and isomorphic to “distributive” Z[x1, . . . , xn]. Example f = x1 + (x2 + x3), f 2 = x2

1 + (2x2 + 2x3)x1 + (x2 2 + 2x3x2 + x2 3 )

We can efficiently reorder such polynomials, i.e., change the main variable.

Definitions · 7/42

slide-12
SLIDE 12

Terms and Atomic Formulas

Terms are w.l.o.g. polynomials with integer coefficients in a recursive representation t ∈ (. . . (((Z[xn])[xn−1]) . . . )[x2])[x1] Representation is unique and isomorphic to “distributive” Z[x1, . . . , xn]. Example f = x1 + (x2 + x3), f 2 = x2

1 + (2x2 + 2x3)x1 + (x2 2 + 2x3x2 + x2 3 )

We can efficiently reorder such polynomials, i.e., change the main variable. Atomic formulas (atoms) are of the form f R 0, where

◮ R ∈ L= = {≤, <, =, ≥, >, =} as discussed ◮ f a recursive polynomial in some variables x1, . . . , xn as above ◮ L= is closed under negation: For R ∈ L= there is ¯

R ∈ L= such that R | = ¬(f R 0) ← → f ¯ R 0.

Definitions · 7/42

slide-13
SLIDE 13

Quantifier-free Formulas and First-order Formulas

First-order formulas are obtained from atomic formulas using operators true, false, ∧, ∨, ∃x, ∀x, where x is a variable

Further Boolean Operators

◮ −

→ and ← → can be expressed without introducing quantifiers: α − → β

  • ¬α ∨ β,

α ← → β

  • α −

→ β ∧ β − → α.

◮ Eliminate ¬ using de Morgan’s law and closure property of L w.r.t. negation, e.g.:

¬(x = 0 ∧ y > 0)

  • x = 0 ∨ y ≤ 0.

Definitions · 8/42

slide-14
SLIDE 14

Quantifier-free Formulas and First-order Formulas

First-order formulas are obtained from atomic formulas using operators true, false, ∧, ∨, ∃x, ∀x, where x is a variable

Further Boolean Operators

◮ −

→ and ← → can be expressed without introducing quantifiers: α − → β

  • ¬α ∨ β,

α ← → β

  • α −

→ β ∧ β − → α.

◮ Eliminate ¬ using de Morgan’s law and closure property of L w.r.t. negation, e.g.:

¬(x = 0 ∧ y > 0)

  • x = 0 ∨ y ≤ 0.

Practical reson for restricting to ∧ and ∨: Simplification Quantifier-free formulas are first-order formulas not containing ∃x or ∀x. Convention: the only formulas containing true, false are true, false themselves.

Definitions · 8/42

slide-15
SLIDE 15

Prenex Formulas

We assume w.l.o.g. that all first-order formulas are in a prenex normal form Qnxn . . . Q1x1(ψ) with Q1, . . . , Qn ∈ {∃, ∀} and ψ quantifier-free. Fact (i) For every first-order formula ˜ ϕ there is an equivalent prenex formula ϕ = Qnxn . . . Q1(ψ). (ii) ϕ can be efficiently computed from ˜ ϕ such that the number of alternations in the sequence Qn, . . . , Q1 is minimized.

Definitions · 9/42

slide-16
SLIDE 16

Virtual Substitution

Virtual Substitution · 10/42

slide-17
SLIDE 17

Eliminate from the Inside to the Outside

Given ϕ = Qnxn . . . Q1x1(ψ)

◮ ψ is quantifier-free ◮ the variables of ψ are a subset of quantified (bound) variables X = {x1, . . . , xn}

and (free) parameters U = {u1, . . . , um}, where X ∩ U = ∅. We are going to eliminate Q1x1. The rest is iteration with some optimizations to discuss later on. We may assume that Q1 = ∃, because ∀x1ϕ ← → ¬∃x1¬ϕ.

Virtual Substitution · 11/42

slide-18
SLIDE 18

Elimination of One Existential Quantifier

Given ϕ = ∃x1(ψ)

◮ The variables in ψ are among x1 and V1 := (X \ {x1}) ∪ U. ◮ All variables from V1 will play the same role now, say, V1 = {v1, . . . , vk}.

If x1 does not occur in ψ, then we are done.

Key Idea

◮ Intuitively, ∃x is like a big disjunction over all real numbers. ◮ Could there be a finite E set of terms t such that

R | = ∃x1(ψ) ← →

  • t∈E

ψ[x1/t] ? Modulo a couple of technical problems, there is essentially such a set.

Virtual Substitution · 12/42

slide-19
SLIDE 19

Thought Experiment

Given ϕ = ∃x1(ψ) Temporarily and only in our minds (not in any algorithm) fix (v1, . . . , vk) := (a1, . . . , al) ∈ Rk such that ψ becomes univariate in x1. Left hand sides of atomic formulas in ψ become univariate polynomials f ∈ R[x1].

◮ Sets of satisfying values for x1 in f(x1) R 0 are

Virtual Substitution · 13/42

slide-20
SLIDE 20

Thought Experiment

Given ϕ = ∃x1(ψ) Temporarily and only in our minds (not in any algorithm) fix (v1, . . . , vk) := (a1, . . . , al) ∈ Rk such that ψ becomes univariate in x1. Left hand sides of atomic formulas in ψ become univariate polynomials f ∈ R[x1].

◮ Sets of satisfying values for x1 in f(x1) R 0 are

finite unions of intervals [b1, b2], (b1, b2), (b1, b2], [b1, b2), where b1, b2 ∈ R ∪ {∞}.

Virtual Substitution · 13/42

slide-21
SLIDE 21

Thought Experiment

Given ϕ = ∃x1(ψ) Temporarily and only in our minds (not in any algorithm) fix (v1, . . . , vk) := (a1, . . . , al) ∈ Rk such that ψ becomes univariate in x1. Left hand sides of atomic formulas in ψ become univariate polynomials f ∈ R[x1].

◮ Sets of satisfying values for x1 in f(x1) R 0 are

finite unions of intervals [b1, b2], (b1, b2), (b1, b2], [b1, b2), where b1, b2 ∈ R ∪ {∞}.

◮ if bi ∈ R, then f(bi) = 0 ◮ Set of satisfying values for x1 in ψ has the same form.

Virtual Substitution · 13/42

slide-22
SLIDE 22

Thought Experiment

Given ϕ = ∃x1(ψ) Temporarily and only in our minds (not in any algorithm) fix (v1, . . . , vk) := (a1, . . . , al) ∈ Rk such that ψ becomes univariate in x1. Left hand sides of atomic formulas in ψ become univariate polynomials f ∈ R[x1].

◮ Sets of satisfying values for x1 in f(x1) R 0 are

finite unions of intervals [b1, b2], (b1, b2), (b1, b2], [b1, b2), where b1, b2 ∈ R ∪ {∞}.

◮ if bi ∈ R, then f(bi) = 0 ◮ Set of satisfying values for x1 in ψ has the same form.

∧ is cut and ∨ is intersection of satisfying sets.

Virtual Substitution · 13/42

slide-23
SLIDE 23

Thought Experiment

Given ϕ = ∃x1(ψ) Temporarily and only in our minds (not in any algorithm) fix (v1, . . . , vk) := (a1, . . . , al) ∈ Rk such that ψ becomes univariate in x1. Left hand sides of atomic formulas in ψ become univariate polynomials f ∈ R[x1].

◮ Sets of satisfying values for x1 in f(x1) R 0 are

finite unions of intervals [b1, b2], (b1, b2), (b1, b2], [b1, b2), where b1, b2 ∈ R ∪ {∞}.

◮ if bi ∈ R, then f(bi) = 0 ◮ Set of satisfying values for x1 in ψ has the same form.

∧ is cut and ∨ is intersection of satisfying sets.

◮ Idea: E = all b2 or b2 − ε and ∞.

Virtual Substitution · 13/42

slide-24
SLIDE 24

Elimination Sets

Given ϕ = ∃x1(ψ) Supersets of the zeros of the left hand side terms f ∈ (. . . (((Z[v1])[v2]) . . . )[vk])[x1] can be computed symbolically and uniformly. Example f = a(v1 . . . , vk)x2

1 + b(v1, . . . , vk)x1 + c(v1, . . . , vk) yields candidate solutions

−b ±

  • b2 − 4ac/2a
  • t

for a = 0 ∧ b2 − 4ac ≥ 0

  • γ

, −c/b

t

for a = 0 ∧ b = 0

  • γ

.

Virtual Substitution · 14/42

slide-25
SLIDE 25

Elimination Sets

Given ϕ = ∃x1(ψ) Supersets of the zeros of the left hand side terms f ∈ (. . . (((Z[v1])[v2]) . . . )[vk])[x1] can be computed symbolically and uniformly. Example f = a(v1 . . . , vk)x2

1 + b(v1, . . . , vk)x1 + c(v1, . . . , vk) yields candidate solutions

−b ±

  • b2 − 4ac/2a
  • t

for a = 0 ∧ b2 − 4ac ≥ 0

  • γ

, −c/b

t

for a = 0 ∧ b = 0

  • γ

. An elimination set E for x1 and ψ is a finite set of pairs (γ, t) such that R | = ∃x1(ψ) ← →

  • (γ,t)∈E

γ ∧ ψ[x1/ /t].

Virtual Substitution · 14/42

slide-26
SLIDE 26

Virtual Substitution

Given ϕ = ∃x1(ψ) and E such that R | = ∃x1(ψ) ← →

  • (γ,t)∈E

γ ∧ ψ[x1/ /t]. Remaining Problem t contain /, √·, ∞, ε, . . . , which are not in our language L. Solution: Virtual Substitution [x/ /t] : atomic formulas → quantifier-free formulas

Virtual Substitution · 15/42

slide-27
SLIDE 27

Virtual Substitution

Given ϕ = ∃x1(ψ) and E such that R | = ∃x1(ψ) ← →

  • (γ,t)∈E

γ ∧ ψ[x1/ /t]. Remaining Problem t contain /, √·, ∞, ε, . . . , which are not in our language L. Solution: Virtual Substitution [x/ /t] : atomic formulas → quantifier-free formulas And beyond degree 2?

◮ Method generalizes to arbitrary degrees (in principle long known). ◮ first implementation will be available this year (PhD thesis by M. Košta). ◮ For higher degrees, t will be way more abstract.

Virtual Substitution · 15/42

slide-28
SLIDE 28

Virtual Substitution

Given ϕ = ∃x1(ψ) and E such that R | = ∃x1(ψ) ← →

  • (γ,t)∈E

γ ∧ ψ[x1/ /t]. Remaining Problem t contain /, √·, ∞, ε, . . . , which are not in our language L. Solution: Virtual Substitution [x/ /t] : atomic formulas → quantifier-free formulas And beyond degree 2?

◮ Method generalizes to arbitrary degrees (in principle long known). ◮ first implementation will be available this year (PhD thesis by M. Košta). ◮ For higher degrees, t will be way more abstract.

Important In practice, good simplification of quantifier-free (intermediate) results is crucial!

Virtual Substitution · 15/42

slide-29
SLIDE 29

Virtual Substitution by Example

Conventions: f ∈ Z[y][x], fi, gi, g∗

i ∈ Z[y]

Quotients f1x + f0 ≤ 0x/ / g1

g2

≡ f1

g1 g2 + f0 ≤ 0 ≡ f1g1g2 + f0g2 2 ≤ 0

Virtual Substitution · 16/42

slide-30
SLIDE 30

Virtual Substitution by Example

Conventions: f ∈ Z[y][x], fi, gi, g∗

i ∈ Z[y]

Quotients f1x + f0 ≤ 0x/ / g1

g2

≡ f1

g1 g2 + f0 ≤ 0 ≡ f1g1g2 + f0g2 2 ≤ 0

Formal solutions of quadratic equations

  • f = 0
  • x/

/

g1+g2 √g3 g4

  • ≡ g∗

1 + g∗ 2

√g3 g∗

4

= 0

Virtual Substitution · 16/42

slide-31
SLIDE 31

Virtual Substitution by Example

Conventions: f ∈ Z[y][x], fi, gi, g∗

i ∈ Z[y]

Quotients f1x + f0 ≤ 0x/ / g1

g2

≡ f1

g1 g2 + f0 ≤ 0 ≡ f1g1g2 + f0g2 2 ≤ 0

Formal solutions of quadratic equations

  • f = 0
  • x/

/

g1+g2 √g3 g4

  • ≡ g∗

1 + g∗ 2

√g3 g∗

4

= 0

g∗

1+g∗ 2

√g3 g∗

4

= 0 ≡ g∗

1 2 − g∗ 2 2g3 = 0 ∧ g∗ 1g∗ 2 ≤ 0

Virtual Substitution · 16/42

slide-32
SLIDE 32

Virtual Substitution by Example

Conventions: f ∈ Z[y][x], fi, gi, g∗

i ∈ Z[y]

Quotients f1x + f0 ≤ 0x/ / g1

g2

≡ f1

g1 g2 + f0 ≤ 0 ≡ f1g1g2 + f0g2 2 ≤ 0

Formal solutions of quadratic equations

  • f = 0
  • x/

/

g1+g2 √g3 g4

  • ≡ g∗

1 + g∗ 2

√g3 g∗

4

= 0

g∗

1+g∗ 2

√g3 g∗

4

= 0 ≡ g∗

1 2 − g∗ 2 2g3 = 0 ∧ g∗ 1g∗ 2 ≤ 0 g∗

1+g∗ 2

√g3 g∗

4

≤ 0 ≡ (g∗

1 2 − g∗ 2 2g3 ≥ 0 ∧ g∗ 1g∗ 4 ≤ 0) ∨ (g∗ 1 2 − g∗ 2 2g3 ≤ 0 ∧ g∗ 2g∗ 4 ≤ 0)

Virtual Substitution · 16/42

slide-33
SLIDE 33

Virtual Substitution by Example

Conventions: f ∈ Z[y][x], fi, gi, g∗

i ∈ Z[y]

Quotients f1x + f0 ≤ 0x/ / g1

g2

≡ f1

g1 g2 + f0 ≤ 0 ≡ f1g1g2 + f0g2 2 ≤ 0

Formal solutions of quadratic equations

  • f = 0
  • x/

/

g1+g2 √g3 g4

  • ≡ g∗

1 + g∗ 2

√g3 g∗

4

= 0

g∗

1+g∗ 2

√g3 g∗

4

= 0 ≡ g∗

1 2 − g∗ 2 2g3 = 0 ∧ g∗ 1g∗ 2 ≤ 0 g∗

1+g∗ 2

√g3 g∗

4

≤ 0 ≡ (g∗

1 2 − g∗ 2 2g3 ≥ 0 ∧ g∗ 1g∗ 4 ≤ 0) ∨ (g∗ 1 2 − g∗ 2 2g3 ≤ 0 ∧ g∗ 2g∗ 4 ≤ 0)

Infinity (f2x2 + f1x + f0 < 0)[x/ /∞] ≡ f2 < 0 ∨ (f2 = 0 ∧ f1 < 0) ∨ (f2 = 0 ∧ f1 = 0 ∧ f0 < 0)

Virtual Substitution · 16/42

slide-34
SLIDE 34

Virtual Substitution by Example

Conventions: f ∈ Z[y][x], fi, gi, g∗

i ∈ Z[y]

Quotients f1x + f0 ≤ 0x/ / g1

g2

≡ f1

g1 g2 + f0 ≤ 0 ≡ f1g1g2 + f0g2 2 ≤ 0

Formal solutions of quadratic equations

  • f = 0
  • x/

/

g1+g2 √g3 g4

  • ≡ g∗

1 + g∗ 2

√g3 g∗

4

= 0

g∗

1+g∗ 2

√g3 g∗

4

= 0 ≡ g∗

1 2 − g∗ 2 2g3 = 0 ∧ g∗ 1g∗ 2 ≤ 0 g∗

1+g∗ 2

√g3 g∗

4

≤ 0 ≡ (g∗

1 2 − g∗ 2 2g3 ≥ 0 ∧ g∗ 1g∗ 4 ≤ 0) ∨ (g∗ 1 2 − g∗ 2 2g3 ≤ 0 ∧ g∗ 2g∗ 4 ≤ 0)

Infinity (f2x2 + f1x + f0 < 0)[x/ /∞] ≡ f2 < 0 ∨ (f2 = 0 ∧ f1 < 0) ∨ (f2 = 0 ∧ f1 = 0 ∧ f0 < 0) Positive infinitesimals (3x2 + 6x − 3 > 0)[x/ /t − ε] ≡ 3t2 + 6t − 3 > 0 ∨ (3t2 + 6t − 3 = 0 ∧ 6t + 6 ≤ 0)

Virtual Substitution · 16/42

slide-35
SLIDE 35

Elimination of Several Existential Quantifiers by Block

Back to the bigger picture . . . ∀∗∃∗∀∗∃∗∃x1(ψ)

  • . . . ∀∗∃∗∀∗∃∗
  • (γ,t)∈E

γ ∧ ψ[x1/ /t] Disjunction is compatible with existential quantifiers ∃∗: . . . ∀∗∃∗∀∗∃∗

  • (γ,t)∈E

γ ∧ ψ[x1/ /t]

  • . . . ∀∗∃∗∀∗
  • (γ,t)∈E

∃∗(γ ∧ ψ[x1/ /t])

Virtual Substitution · 17/42

slide-36
SLIDE 36

Elimination of Several Existential Quantifiers by Block

Back to the bigger picture . . . ∀∗∃∗∀∗∃∗∃x1(ψ)

  • . . . ∀∗∃∗∀∗∃∗
  • (γ,t)∈E

γ ∧ ψ[x1/ /t] Disjunction is compatible with existential quantifiers ∃∗: . . . ∀∗∃∗∀∗∃∗

  • (γ,t)∈E

γ ∧ ψ[x1/ /t]

  • . . . ∀∗∃∗∀∗
  • (γ,t)∈E

∃∗(γ ∧ ψ[x1/ /t]) Effect

◮ more local substitution of test points With the elimination of the next quantifiers ◮ even improves upper bound on asymptotic worst-case complexity

Virtual Substitution · 17/42

slide-37
SLIDE 37

Complexity of Virtual Substitution

Upper bound on asymptotic worst-case complexity doubly exponential in the input word length (and thus optimal) More precisely doubly exponential in # quantifier alternations singly exponential in # quantifiers thanks to elimination by block polynomial in # parameters (= unquantified variables) polynomial in # atomic formulas particularly good for low degrees and many parameters For comparision: Cylindrical Algberaic Decomposition (CAD) [Collins 1973, Hong, Brown, . . . ] doubly exponential in the number of all variables For comparison: Asymptotically fast procedures [Renegar, Basu–Pollack–Roy, Grigoriev, . . . ] no practical relevance (so far)

Virtual Substitution · 18/42

slide-38
SLIDE 38

Variants of Quantifier Elimination

Variants of Quantifier Elimination · 19/42

slide-39
SLIDE 39

Extended Quantifier Elimination

Generalize ∃xϕ ← →

  • (γ,t)∈E

γ ∧ ϕ[t/ /x] to ∃xϕ     . . . . . . γ ∧ ϕ[t/ /x] x = t . . . . . .     Simple example revisited ϕ ≡ ∃x(ax2 + bx + c = 0)       a = 0 ∧ b2 − 4ac ≥ 0 x = −b −

  • b2 − 4ac

2a a = 0 ∧ b = 0 x = −c b a = 0 ∧ b = 0 ∧ c = 0 x = ∞1       Semantics (for fixed parameters) Whenever some left hand side condition holds, then ∃xϕ holds and the corresponding right hand side term is one sample solution. [M. Kosta, T.S., A. Dolzmann, J. Symb. Comput. 2016] For fixed choices of parameters, standard values can be efficiently computed for all ∞i and εi in a post-processing step.

Variants of Quantifier Elimination · 20/42

slide-40
SLIDE 40

Generic Quantifier Elimination

Collect negated equations from the γ in a global theory Θ: E = {. . . , (s = 0 ∧ γ′, t), . . . )

  • Θ = {. . . , s = 0, . . . }, E = {. . . , (γ′, t), . . . }

Semantics ϕ′ is correct for all choices of parameters satisfying Θ:

  • Θ −

→ (ϕ′ ← → ϕ). Important observation exception set has a lower dimension than the parameter space Simple example revisited ϕ ≡ ∃x(ax2 + bx + c = 0)

  • Θ = {a = 0},

ϕ′ ≡ b2 − 4ac ≥ 0

Variants of Quantifier Elimination · 21/42

slide-41
SLIDE 41

Software

Software · 22/42

slide-42
SLIDE 42

Redlog and Reduce

Everything discussed here is available in our computer logic system Redlog: http://www.redlog.eu

◮ interactive system, QE and decision for many domains, normal forms,

simplification, construction and decomposition of large formulas, . . .

◮ interfaces to Qepcad B, Gurobi, Mathematica, Z3, . . . ◮ more than 300 citations of applications in the literature:

geometry, verification, chemistry, life sciences, physics and engineering, scientific computation, geometry and planning, . . .

◮ Redlog development since 1992 as part of the CAS Reduce [Hearn, 1968] ◮ Reduce/Redlog open-source (free-BSD) on Sourceforge since 12/2008

http://reduce-algebra.sourceforge.net

◮ 48,318 downloads since 12/2008 (7,496 in 2014), 500+ SVN commits per year

Software · 23/42

slide-43
SLIDE 43

Further Theories in Redlog

Integers (AAECC 2007, CASC 2007, CASC 2009)

◮ Presburger Arithmetic ◮ weak quantifier elimination for the full linear theory ◮ weak quantifier elimination also for higher degrees (special cases)

Mixed Real-Integer (Weispfenning at ISSAC 1999)

◮ experimental

Complex Numbers (using Comprehensive Gröbner Bases)

◮ language of rings only

Differential Algebras (CASC 2004)

◮ language of rings with unary differential operator ◮ computation in differentially closed field (A. Robinson, Blum)

Software · 24/42

slide-44
SLIDE 44

Further Theories in Redlog

Padic Numbers (JSC 2000, ISSAC 1999, CASC 2001)

◮ linear formulas over p-adic fields for p prime ◮ optionally uniform in p ◮ used e.g. for solving parametric systems of congruences over the integers

Terms (CASC 2002)

◮ Malcev-type term algebras (with functions instead of relations)

Queues (C. Straßer at RWCA 2006)

◮ two-sided queues over the other theories (2-sorted) ◮ Implemented at present for queues of reals

Propositional Formulas (CASC 2003, ISSAC 2010)

◮ generalization of SAT solving ◮ quantified propositional calculus, i.e., parametric QSAT (aka QBF) solving

Software · 25/42

slide-45
SLIDE 45

Some Other Software

◮ Qepcad B (Hong and Brown)

is the reference implementation for cylindrical algebraic decomposition (CAD).

◮ The computer algebra system Mathematica

has real QE: essentially CAD + virtual substitution for preprocessing.

◮ The computer algebra system Maple

has been used in recent research on CAD (Davenport et al.)

◮ The computer algebra system Risa/Asir (originally by Fujitsu)

has QE by virtual substitution (TS, 1996)

◮ Some prototypes in Japan

based on comprehensive Gröbner bases (Sato et al.)

  • r Sturm–Habicht sequences (Anai et al. in Matlab)

◮ Specialized implementations of CAD in SMT solvers (z3) ◮ Specialized implementations of virtual substitutions for SMT (SMT-RAT)

Software · 26/42

slide-46
SLIDE 46

Applications in Geometry and Verification

Applications in Geometry and Verification · 27/42

slide-47
SLIDE 47

Variant of the Steiner–Lehmus-Theorem

[J. Autom. Reasoning 1998 – Joint work with A. Dolzmann, V. Weispfenning] The longer bisector goes to the shorter side

h1 ≡ u2 ≥ 0 ∧ x1 ≥ 0 h2 ≡ r 2 = 1 + x2

1 = u2 1 + (u2 − x1)2

h3 ≡ x2 ≤ 0 ∧ r 2 = (x2 − x1)2 h4 ≡ u1x2 + u2x3 − x2x3 = 0 h5 ≡ x4 ≤ 1 ∧ (x4 − 1)2 = (u1 − 1)2 + u2

2

h7 ≡ (−1 − u1)2 + u2

2 < 22

h6 ≡ (x4 − x5)2 + x2

6 = (u1 − x5)2 + (u2 − x6)2 ∧ u1x6 − u2x5 − u2 + x6 = 0

g ≡ (u1 − x3)2 + u2

2 < (x5 − 1)2 + x2 6 B=(1,0) M X Y W A=(−1,0) C=(u1,u2) V

Applications in Geometry and Verification · 28/42

slide-48
SLIDE 48

Variant of the Steiner–Lehmus-Theorem

[J. Autom. Reasoning 1998 – Joint work with A. Dolzmann, V. Weispfenning] The longer bisector goes to the shorter side

h1 ≡ u2 ≥ 0 ∧ x1 ≥ 0 h2 ≡ r 2 = 1 + x2

1 = u2 1 + (u2 − x1)2

h3 ≡ x2 ≤ 0 ∧ r 2 = (x2 − x1)2 h4 ≡ u1x2 + u2x3 − x2x3 = 0 h5 ≡ x4 ≤ 1 ∧ (x4 − 1)2 = (u1 − 1)2 + u2

2

h7 ≡ (−1 − u1)2 + u2

2 < 22

h6 ≡ (x4 − x5)2 + x2

6 = (u1 − x5)2 + (u2 − x6)2 ∧ u1x6 − u2x5 − u2 + x6 = 0

g ≡ (u1 − x3)2 + u2

2 < (x5 − 1)2 + x2 6 B=(1,0) M X Y W A=(−1,0) C=(u1,u2) V ◮ ϕ ≡ ∀x6∀x5∀x4∀x3∀x2∀x1∀r

7

  • i=1

hi − → g

  • Applications in Geometry and Verification · 28/42
slide-49
SLIDE 49

Variant of the Steiner–Lehmus-Theorem

[J. Autom. Reasoning 1998 – Joint work with A. Dolzmann, V. Weispfenning] The longer bisector goes to the shorter side

h1 ≡ u2 ≥ 0 ∧ x1 ≥ 0 h2 ≡ r 2 = 1 + x2

1 = u2 1 + (u2 − x1)2

h3 ≡ x2 ≤ 0 ∧ r 2 = (x2 − x1)2 h4 ≡ u1x2 + u2x3 − x2x3 = 0 h5 ≡ x4 ≤ 1 ∧ (x4 − 1)2 = (u1 − 1)2 + u2

2

h7 ≡ (−1 − u1)2 + u2

2 < 22

h6 ≡ (x4 − x5)2 + x2

6 = (u1 − x5)2 + (u2 − x6)2 ∧ u1x6 − u2x5 − u2 + x6 = 0

g ≡ (u1 − x3)2 + u2

2 < (x5 − 1)2 + x2 6 B=(1,0) M X Y W A=(−1,0) C=(u1,u2) V ◮ ϕ ≡ ∀x6∀x5∀x4∀x3∀x2∀x1∀r

7

  • i=1

hi − → g

  • ◮ Generic QE (1.1 s): ϕ′ 231 atomic formulas, Θ = {u2

1 − 2u1 + u2 2 − 3 = 0

  • (u1−1)2+u2

2=4

, u1 = 0, u2 = 0}.

Applications in Geometry and Verification · 28/42

slide-50
SLIDE 50

Variant of the Steiner–Lehmus-Theorem

[J. Autom. Reasoning 1998 – Joint work with A. Dolzmann, V. Weispfenning] The longer bisector goes to the shorter side

h1 ≡ u2 ≥ 0 ∧ x1 ≥ 0 h2 ≡ r 2 = 1 + x2

1 = u2 1 + (u2 − x1)2

h3 ≡ x2 ≤ 0 ∧ r 2 = (x2 − x1)2 h4 ≡ u1x2 + u2x3 − x2x3 = 0 h5 ≡ x4 ≤ 1 ∧ (x4 − 1)2 = (u1 − 1)2 + u2

2

h7 ≡ (−1 − u1)2 + u2

2 < 22

h6 ≡ (x4 − x5)2 + x2

6 = (u1 − x5)2 + (u2 − x6)2 ∧ u1x6 − u2x5 − u2 + x6 = 0

g ≡ (u1 − x3)2 + u2

2 < (x5 − 1)2 + x2 6 B=(1,0) M X Y W A=(−1,0) C=(u1,u2) V ◮ ϕ ≡ ∀x6∀x5∀x4∀x3∀x2∀x1∀r

7

  • i=1

hi − → g

  • ◮ Generic QE (1.1 s): ϕ′ 231 atomic formulas, Θ = {u2

1 − 2u1 + u2 2 − 3 = 0

  • (u1−1)2+u2

2=4

, u1 = 0, u2 = 0}.

◮ CAD (0.9 s): ∀u1∀u2( Θ −

→ ϕ′)

Applications in Geometry and Verification · 28/42

slide-51
SLIDE 51

Collision Avoidance with Adaptive Cruise Control

[ISSAC 2011 – Joint Work with A. Tiwari @SRI] System dynamics ˙ vf = af ∈ [−5, 2] velocity and accelleration of leading car ˙ v = a ∈ [−5, 2] velocity and accelleration of rear car ˙ gap = vf − v ˙ a = −3a − 3(v − vf) + (gap − (v + 10)) control law for rear car Initial states and safe states Init ≡ gap = 10 ∧ a = 0 ∧ vf = c1 ∧ v = c2 Safe ≡ gap > 0

Applications in Geometry and Verification · 29/42

slide-52
SLIDE 52

Collision Avoidance with Adaptive Cruise Control

[ISSAC 2011 – Joint Work with A. Tiwari @SRI] System dynamics ˙ vf = af ∈ [−5, 2] velocity and accelleration of leading car ˙ v = a ∈ [−5, 2] velocity and accelleration of rear car ˙ gap = vf − v ˙ a = −3a − 3(v − vf) + (gap − (v + 10)) control law for rear car Initial states and safe states Init ≡ gap = 10 ∧ a = 0 ∧ vf = c1 ∧ v = c2 Safe ≡ gap > 0 Certificate-based approach to find a set Inv such that

  • 1. Init ⊆ Inv
  • 2. Inv ⊆ Safe
  • 3. System dynamics cannot cause the system to leave Inv.

Applications in Geometry and Verification · 29/42

slide-53
SLIDE 53

Collision Avoidance with Adaptive Cruise Control

Linear ansatz Inv ≡ p ≥ 0 where p := c3v + c4vf + c5a + gap + c6 Inv′ ≡ −5 ≤ a ≤ 2 ∧ −5 ≤ af ≤ 2 ∧ v ≥ 0 ∧ vf ≥ 0 Certificate as a formula ∃c3∃c4∃c5∃c6∀v∀vf∀gap∀a∀af(ϕ1 ∧ ϕ2 ∧ ϕ3) where ϕ1 ≡ Init ∧ Inv′ − → Inv ϕ2 ≡ Inv ∧ Inv′ − → Safe ϕ3 ≡ p = 0 ∧ Inv′ − → ˙ p ≥ 0

Applications in Geometry and Verification · 30/42

slide-54
SLIDE 54

Collision Avoidance with Adaptive Cruise Control

Linear ansatz Inv ≡ p ≥ 0 where p := c3v + c4vf + c5a + gap + c6 Inv′ ≡ −5 ≤ a ≤ 2 ∧ −5 ≤ af ≤ 2 ∧ v ≥ 0 ∧ vf ≥ 0 Certificate as a formula ∃c3∃c4∃c5∃c6∀v∀vf∀gap∀a∀af(ϕ1 ∧ ϕ2 ∧ ϕ3) where ϕ1 ≡ Init ∧ Inv′ − → Inv ϕ2 ≡ Inv ∧ Inv′ − → Safe ϕ3 ≡ p = 0 ∧ Inv′ − → ˙ p ≥ 0 After 1 minute of computation:

◮ 584 disjuncts, 33365 atomic formulas, depth 13, some still containing ∃c5 ◮ first 33 disjuncts automatically simplify to c2 2 − 30c2 − 75 ≤ 0 for c1 > 0, c2 > 0. ◮ ⇒ no collision for c2 = v ≤ 32

Applications in Geometry and Verification · 30/42

slide-55
SLIDE 55

Cylindrical Algebraic Decomposition (CAD)

CAD for Satistfiability Checking · 31/42

slide-56
SLIDE 56

From Sign Invariant Regions to CAD Cells

ϕ(f1, f2) is a Boolean combination of constraints with left hand sides f1, f2 and right hand sides 0. f1(x, y) = 2y 2−2x3−3x2 f1(A) = −1 < 0 f1(B) = 2 > 0 f1(C) = −5 < 0 f1(D) = 0

CAD for Satistfiability Checking · 32/42

slide-57
SLIDE 57

From Sign Invariant Regions to CAD Cells

ϕ(f1, f2) is a Boolean combination of constraints with left hand sides f1, f2 and right hand sides 0. f1(x, y) = 2y 2−2x3−3x2 f1(A) = −1 < 0 f1(B) = 2 > 0 f1(C) = −5 < 0 f1(D) = 0 f2(x, y) = y 2 + x2 − 1

CAD for Satistfiability Checking · 32/42

slide-58
SLIDE 58

From Sign Invariant Regions to CAD Cells

ϕ(f1, f2) is a Boolean combination of constraints with left hand sides f1, f2 and right hand sides 0. f1(x, y) = 2y 2−2x3−3x2 f1(A) = −1 < 0 f1(B) = 2 > 0 f1(C) = −5 < 0 f1(D) = 0 f2(x, y) = y 2 + x2 − 1

CAD for Satistfiability Checking · 32/42

slide-59
SLIDE 59

From Sign Invariant Regions to CAD Cells

ϕ(f1, f2) is a Boolean combination of constraints with left hand sides f1, f2 and right hand sides 0. f1(x, y) = 2y 2−2x3−3x2 f1(A) = −1 < 0 f1(B) = 2 > 0 f1(C) = −5 < 0 f1(D) = 0 f2(x, y) = y 2 + x2 − 1 g(x) = −2x3 − 3x2 . . . projection polynomials

CAD for Satistfiability Checking · 32/42

slide-60
SLIDE 60

Projection and Base Phase (1)

ϕ(f1, f2)

◮ projection operator

computes projection set: Π({f1(x, y), f2(x, y)}) = {g1(x), . . . , gk(x)}

CAD for Satistfiability Checking · 33/42

slide-61
SLIDE 61

Projection and Base Phase (1)

ϕ(f1, f2)

◮ projection operator

computes projection set: Π({f1(x, y), f2(x, y)}) = {g1(x), . . . , gk(x)}

◮ Projections of critical points

are among the zeros of g1, . . . , gk.

CAD for Satistfiability Checking · 33/42

slide-62
SLIDE 62

Projection and Base Phase (1)

ϕ(f1, f2)

◮ projection operator

computes projection set: Π({f1(x, y), f2(x, y)}) = {g1(x), . . . , gk(x)}

◮ Projections of critical points

are among the zeros of g1, . . . , gk.

◮ The zeros of the gi are real

algebraic numbers, e.g. −

  • 2 = x2 − 2, ]−10, 1[

CAD for Satistfiability Checking · 33/42

slide-63
SLIDE 63

Projection and Base Phase (1)

ϕ(f1, f2)

◮ projection operator

computes projection set: Π({f1(x, y), f2(x, y)}) = {g1(x), . . . , gk(x)}

◮ Projections of critical points

are among the zeros of g1, . . . , gk.

◮ The zeros of the gi are real

algebraic numbers, e.g. −

  • 2 = x2 − 2, ]−10, 1[

◮ Their computation is

univariate computer algebra.

CAD for Satistfiability Checking · 33/42

slide-64
SLIDE 64

Projection and Base Phase (2)

ϕ(f1, f2)

◮ Add points

(anywhere) between the zeros as test points for the 1-dimensional cells.

CAD for Satistfiability Checking · 34/42

slide-65
SLIDE 65

Projection and Base Phase (2)

ϕ(f1, f2)

◮ Add points

(anywhere) between the zeros as test points for the 1-dimensional cells.

◮ This yields a decomposition

  • f R1 (the x-axis).

CAD for Satistfiability Checking · 34/42

slide-66
SLIDE 66

Projection and Base Phase (2)

ϕ(f1, f2)

◮ Add points

(anywhere) between the zeros as test points for the 1-dimensional cells.

◮ This yields a decomposition

  • f R1 (the x-axis).

◮ We want to lift this

decomposition to R2.

CAD for Satistfiability Checking · 34/42

slide-67
SLIDE 67

Projection and Base Phase (2)

ϕ(f1, f2)

◮ Add points

(anywhere) between the zeros as test points for the 1-dimensional cells.

◮ This yields a decomposition

  • f R1 (the x-axis).

◮ We want to lift this

decomposition to R2.

◮ By the way: How many cells

will there be in R2?

CAD for Satistfiability Checking · 34/42

slide-68
SLIDE 68

Extension Phase (Lifting)

ϕ(f1, f2) For each test point t from the base phase:

◮ compute univariate

f1(t, y), f2(t, y). with algebraic number coefficients.

CAD for Satistfiability Checking · 35/42

slide-69
SLIDE 69

Extension Phase (Lifting)

ϕ(f1, f2) For each test point t from the base phase:

◮ compute univariate

f1(t, y), f2(t, y). with algebraic number coefficients.

◮ compute zeros and points

between zeros u1, . . . , us.

CAD for Satistfiability Checking · 35/42

slide-70
SLIDE 70

Extension Phase (Lifting)

ϕ(f1, f2) For each test point t from the base phase:

◮ compute univariate

f1(t, y), f2(t, y). with algebraic number coefficients.

◮ compute zeros and points

between zeros u1, . . . , us.

◮ this yields test points

(t, u1), . . . , (t, us) ∈ R2 for the cylinder over t.

CAD for Satistfiability Checking · 35/42

slide-71
SLIDE 71

Example: a CAD as a “data structure” P3 = {x2

1 + x2 2 + x2 3 − 4}

P2 = {x2

2 + x2 1 − 4}

P1 = {x1 + 2, x1 − 2}

  • C. W. Brown, U.S. Naval Academy

3

slide-72
SLIDE 72

Example: a CAD as a “data structure” P3 = {x2

1 + x2 2 + x2 3 − 4}

P2 = {x2

2 + x2 1 − 4}

P1 = {x1 + 2, x1 − 2}

  • C. W. Brown, U.S. Naval Academy

3

slide-73
SLIDE 73

Example: a CAD as a “data structure” P3 = {x2

1 + x2 2 + x2 3 − 4}

P2 = {x2

2 + x2 1 − 4}

P1 = {x1 + 2, x1 − 2}

  • C. W. Brown, U.S. Naval Academy

3

slide-74
SLIDE 74

Example: a CAD as a “data structure” P3 = {x2

1 + x2 2 + x2 3 − 4}

P2 = {x2

2 + x2 1 − 4}

P1 = {x1 + 2, x1 − 2}

  • C. W. Brown, U.S. Naval Academy

3

slide-75
SLIDE 75

SAT-Checking

ϕ(f1, f2)

◮ Finitely many test points

T = (t1, ut1,1), . . . , (t1, ut1,s1), . . . (tr, utr ,1), . . . , (tr, utr ,sr ).

CAD for Satistfiability Checking · 36/42

slide-76
SLIDE 76

SAT-Checking

ϕ(f1, f2)

◮ Finitely many test points

T = (t1, ut1,1), . . . , (t1, ut1,s1), . . . (tr, utr ,1), . . . , (tr, utr ,sr ).

◮ R |

= ∃ϕ(f1, f2) iff ex. t ∈ T s.t. R, (x, y) = t | = ϕ(f1, f2).

CAD for Satistfiability Checking · 36/42

slide-77
SLIDE 77

Complete Decision Procedure

◮ Finitely many test points

T = (t1, ut1,1), . . . , (t1, ut1,s1), . . . (tr, utr ,1), . . . , (tr, utr ,sr ).

CAD as a Complete Decision Procedure · 37/42

slide-78
SLIDE 78

Complete Decision Procedure

◮ Finitely many test points

T = (t1, ut1,1), . . . , (t1, ut1,s1), . . . (tr, utr ,1), . . . , (tr, utr ,sr ).

◮ ∀x∃yϕ(f1, f2):

“In each cylinder there is a cell such that . . . ” Satisfying t in each row of T?

CAD as a Complete Decision Procedure · 37/42

slide-79
SLIDE 79

Complete Decision Procedure

◮ Finitely many test points

T = (t1, ut1,1), . . . , (t1, ut1,s1), . . . (tr, utr ,1), . . . , (tr, utr ,sr ).

◮ ∀x∃yϕ(f1, f2):

“In each cylinder there is a cell such that . . . ” Satisfying t in each row of T?

◮ ∃x∀yϕ(f1, f2):

“There is a cylinder such that for each cell . . . ” A satisfying column of T?

CAD as a Complete Decision Procedure · 37/42

slide-80
SLIDE 80

Complete Decision Procedure

◮ Finitely many test points

T = (t1, ut1,1), . . . , (t1, ut1,s1), . . . (tr, utr ,1), . . . , (tr, utr ,sr ).

◮ ∀x∃yϕ(f1, f2):

“In each cylinder there is a cell such that . . . ” Satisfying t in each row of T?

◮ ∃x∀yϕ(f1, f2):

“There is a cylinder such that for each cell . . . ” A satisfying column of T?

◮ The innermost variable y was

projected first.

CAD as a Complete Decision Procedure · 37/42

slide-81
SLIDE 81

Some Remarks Before We Continue

◮ Given ϕ(f1, f2) essentially all the algorithmic work we have done is valid for

arbitrary Boolean combinations ψ(f1, f2) of arbitrary constraints with left hand sides f1, f2 (and right hand sides 0).

CAD as a Complete Decision Procedure · 38/42

slide-82
SLIDE 82

Some Remarks Before We Continue

◮ Given ϕ(f1, f2) essentially all the algorithmic work we have done is valid for

arbitrary Boolean combinations ψ(f1, f2) of arbitrary constraints with left hand sides f1, f2 (and right hand sides 0).

◮ Furthermore, even for arbitrary quantification QxQ′y (in that order).

CAD as a Complete Decision Procedure · 38/42

slide-83
SLIDE 83

Some Remarks Before We Continue

◮ Given ϕ(f1, f2) essentially all the algorithmic work we have done is valid for

arbitrary Boolean combinations ψ(f1, f2) of arbitrary constraints with left hand sides f1, f2 (and right hand sides 0).

◮ Furthermore, even for arbitrary quantification QxQ′y (in that order). ◮ This indicates that the CAD procedure is somewhat an overkill.

CAD as a Complete Decision Procedure · 38/42

slide-84
SLIDE 84

Some Remarks Before We Continue

◮ Given ϕ(f1, f2) essentially all the algorithmic work we have done is valid for

arbitrary Boolean combinations ψ(f1, f2) of arbitrary constraints with left hand sides f1, f2 (and right hand sides 0).

◮ Furthermore, even for arbitrary quantification QxQ′y (in that order). ◮ This indicates that the CAD procedure is somewhat an overkill. ◮ On the other hand, the asymptotic worst complexity 22O(n)

in terms of the input word length n is known to be optimal.

CAD as a Complete Decision Procedure · 38/42

slide-85
SLIDE 85

Some Remarks Before We Continue

◮ Given ϕ(f1, f2) essentially all the algorithmic work we have done is valid for

arbitrary Boolean combinations ψ(f1, f2) of arbitrary constraints with left hand sides f1, f2 (and right hand sides 0).

◮ Furthermore, even for arbitrary quantification QxQ′y (in that order). ◮ This indicates that the CAD procedure is somewhat an overkill. ◮ On the other hand, the asymptotic worst complexity 22O(n)

in terms of the input word length n is known to be optimal.

◮ Asymptotically better bounds with refined complexity parameters.

CAD as a Complete Decision Procedure · 38/42

slide-86
SLIDE 86

Some Remarks Before We Continue

◮ Given ϕ(f1, f2) essentially all the algorithmic work we have done is valid for

arbitrary Boolean combinations ψ(f1, f2) of arbitrary constraints with left hand sides f1, f2 (and right hand sides 0).

◮ Furthermore, even for arbitrary quantification QxQ′y (in that order). ◮ This indicates that the CAD procedure is somewhat an overkill. ◮ On the other hand, the asymptotic worst complexity 22O(n)

in terms of the input word length n is known to be optimal.

◮ Asymptotically better bounds with refined complexity parameters. ◮ In practice, for general input, CAD is the best we have.

CAD as a Complete Decision Procedure · 38/42

slide-87
SLIDE 87

Some Remarks Before We Continue

◮ Given ϕ(f1, f2) essentially all the algorithmic work we have done is valid for

arbitrary Boolean combinations ψ(f1, f2) of arbitrary constraints with left hand sides f1, f2 (and right hand sides 0).

◮ Furthermore, even for arbitrary quantification QxQ′y (in that order). ◮ This indicates that the CAD procedure is somewhat an overkill. ◮ On the other hand, the asymptotic worst complexity 22O(n)

in terms of the input word length n is known to be optimal.

◮ Asymptotically better bounds with refined complexity parameters. ◮ In practice, for general input, CAD is the best we have. ◮ Until now, we have not used and did not “really know” the cells – only test points.

CAD as a Complete Decision Procedure · 38/42

slide-88
SLIDE 88

Quantifier Elimination

The essential new concept with QE is quantifier-free description of cells. This is relevant also for recent decision procedures (Jovanovic & de Moura).

CAD for Quantifier Elimination · 39/42

slide-89
SLIDE 89

Quantifier Elimination

The essential new concept with QE is quantifier-free description of cells. This is relevant also for recent decision procedures (Jovanovic & de Moura).

◮ Given ψ(x1, . . . , xk) = Qk+1xk+1 . . . Qrxrϕ(x1, . . . , xk, xk+1, . . . , xr).

CAD for Quantifier Elimination · 39/42

slide-90
SLIDE 90

Quantifier Elimination

The essential new concept with QE is quantifier-free description of cells. This is relevant also for recent decision procedures (Jovanovic & de Moura).

◮ Given ψ(x1, . . . , xk) = Qk+1xk+1 . . . Qrxrϕ(x1, . . . , xk, xk+1, . . . , xr). ◮ x1, . . . xk are parameters.

CAD for Quantifier Elimination · 39/42

slide-91
SLIDE 91

Quantifier Elimination

The essential new concept with QE is quantifier-free description of cells. This is relevant also for recent decision procedures (Jovanovic & de Moura).

◮ Given ψ(x1, . . . , xk) = Qk+1xk+1 . . . Qrxrϕ(x1, . . . , xk, xk+1, . . . , xr). ◮ x1, . . . xk are parameters. ◮ Construct CAD with projection order xr → · · · → xk+1 → xk → · · · → x1.

That is, the base phase takes place in R[x1].

CAD for Quantifier Elimination · 39/42

slide-92
SLIDE 92

Quantifier Elimination

The essential new concept with QE is quantifier-free description of cells. This is relevant also for recent decision procedures (Jovanovic & de Moura).

◮ Given ψ(x1, . . . , xk) = Qk+1xk+1 . . . Qrxrϕ(x1, . . . , xk, xk+1, . . . , xr). ◮ x1, . . . xk are parameters. ◮ Construct CAD with projection order xr → · · · → xk+1 → xk → · · · → x1.

That is, the base phase takes place in R[x1].

◮ Consider the finite set C ⊆ Pot(Rk) of cells in parameter space,

i.e., at projection level k with polynomials from R[x1, . . . , xk].

CAD for Quantifier Elimination · 39/42

slide-93
SLIDE 93

Quantifier Elimination

The essential new concept with QE is quantifier-free description of cells. This is relevant also for recent decision procedures (Jovanovic & de Moura).

◮ Given ψ(x1, . . . , xk) = Qk+1xk+1 . . . Qrxrϕ(x1, . . . , xk, xk+1, . . . , xr). ◮ x1, . . . xk are parameters. ◮ Construct CAD with projection order xr → · · · → xk+1 → xk → · · · → x1.

That is, the base phase takes place in R[x1].

◮ Consider the finite set C ⊆ Pot(Rk) of cells in parameter space,

i.e., at projection level k with polynomials from R[x1, . . . , xk].

◮ For each c ∈ C with test point tc ∈ Rn−k we can decide ψ(tc) and collect

TRUECELLS = { c ∈ C | R, (x1, . . . , xk) = tc | = ψ } ⊆ C.

CAD for Quantifier Elimination · 39/42

slide-94
SLIDE 94

Quantifier Elimination

The essential new concept with QE is quantifier-free description of cells. This is relevant also for recent decision procedures (Jovanovic & de Moura).

◮ Given ψ(x1, . . . , xk) = Qk+1xk+1 . . . Qrxrϕ(x1, . . . , xk, xk+1, . . . , xr). ◮ x1, . . . xk are parameters. ◮ Construct CAD with projection order xr → · · · → xk+1 → xk → · · · → x1.

That is, the base phase takes place in R[x1].

◮ Consider the finite set C ⊆ Pot(Rk) of cells in parameter space,

i.e., at projection level k with polynomials from R[x1, . . . , xk].

◮ For each c ∈ C with test point tc ∈ Rn−k we can decide ψ(tc) and collect

TRUECELLS = { c ∈ C | R, (x1, . . . , xk) = tc | = ψ } ⊆ C.

◮ Assume that for c ∈ C we have a quantifier-free description formula

∆c(x1, . . . , xk), i.e. x ∈ c iff R | = ∆c(x).

CAD for Quantifier Elimination · 39/42

slide-95
SLIDE 95

Quantifier Elimination

The essential new concept with QE is quantifier-free description of cells. This is relevant also for recent decision procedures (Jovanovic & de Moura).

◮ Given ψ(x1, . . . , xk) = Qk+1xk+1 . . . Qrxrϕ(x1, . . . , xk, xk+1, . . . , xr). ◮ x1, . . . xk are parameters. ◮ Construct CAD with projection order xr → · · · → xk+1 → xk → · · · → x1.

That is, the base phase takes place in R[x1].

◮ Consider the finite set C ⊆ Pot(Rk) of cells in parameter space,

i.e., at projection level k with polynomials from R[x1, . . . , xk].

◮ For each c ∈ C with test point tc ∈ Rn−k we can decide ψ(tc) and collect

TRUECELLS = { c ∈ C | R, (x1, . . . , xk) = tc | = ψ } ⊆ C.

◮ Assume that for c ∈ C we have a quantifier-free description formula

∆c(x1, . . . , xk), i.e. x ∈ c iff R | = ∆c(x). Then R | = ψ ← →

c∈TRUECELLS ∆c.

CAD for Quantifier Elimination · 39/42

slide-96
SLIDE 96

Solution Formula Construction Example

cell P1,1 P1,2 P2,1 T/F 1, 1 − − + F 2, 1 − + F 2, 2 − T 2, 3 − + F 3, 1 + − + F 3, 2 + − F 3, 3 + − − T 3, 4 + − F 3, 5 + − + F 4, 1 + + F 4, 2 + F 4, 3 + + F 5, 1 + + + F

  • C. W. Brown, U.S. Naval Academy

24

slide-97
SLIDE 97

Solution Formula Construction Example

cell P1,1 P1,2 P2,1 T/F 1, 1 − − + F 2, 1 − + F 2, 2 − T 2, 3 − + F 3, 1 + − + F 3, 2 + − F 3, 3 + − − T 3, 4 + − F 3, 5 + − + F 4, 1 + + F 4, 2 + F 4, 3 + + F 5, 1 + + + F

P2,1 < 0

  • C. W. Brown, U.S. Naval Academy

24

slide-98
SLIDE 98

Solution Formula Construction Example

cell P1,1 P1,2 P2,1 T/F 1, 1 − − + F 2, 1 − + F 2, 2 − T 2, 3 − + F 3, 1 + − + F 3, 2 + − F 3, 3 + − − T 3, 4 + − F 3, 5 + − + F 4, 1 + + F 4, 2 + F 4, 3 + + F 5, 1 + + + F

P2,1 < 0 ∨ P1,1 = 0 ∧ P2,1 = 0

  • C. W. Brown, U.S. Naval Academy

24

slide-99
SLIDE 99

Solution Formula Construction Problem

∃y[x2 + y2 − 1 < 0 ∧ x − y < 0] cell x + 1 x − 1 x2 − 2 T/F 1 − − + F 2 − + F 3 + − + T 4 + − T 5 + − − T 6 + − F 7 + − + F 8 + + F 9 + + + F

  • C. W. Brown, U.S. Naval Academy

25

slide-100
SLIDE 100

Solutions to the Solution Formula Problem (1)

Augmented Projection

◮ The approach of the original Collins article (1975). ◮ Idea: Produce sufficiently many polynomials during projection. ◮ Technically one adds “lots of derivatives.”

A very simple demonstration of the idea

◮ Consider a single polynomial f = x3 − 12x2 + 44x − 48.

CAD for Quantifier Elimination · 40/42

slide-101
SLIDE 101

Solutions to the Solution Formula Problem (1)

Augmented Projection

◮ The approach of the original Collins article (1975). ◮ Idea: Produce sufficiently many polynomials during projection. ◮ Technically one adds “lots of derivatives.”

A very simple demonstration of the idea

◮ Consider a single polynomial f = x3 − 12x2 + 44x − 48. ◮ f > 0 describes ]2, 4[ ∪ ]6, ∞[, f = 0 describes {2, 4, 6} .

CAD for Quantifier Elimination · 40/42

slide-102
SLIDE 102

Solutions to the Solution Formula Problem (1)

Augmented Projection

◮ The approach of the original Collins article (1975). ◮ Idea: Produce sufficiently many polynomials during projection. ◮ Technically one adds “lots of derivatives.”

A very simple demonstration of the idea

◮ Consider a single polynomial f = x3 − 12x2 + 44x − 48. ◮ f > 0 describes ]2, 4[ ∪ ]6, ∞[, f = 0 describes {2, 4, 6} . ◮ f cannot describe exclusively ]2, 4[ or {4}.

CAD for Quantifier Elimination · 40/42

slide-103
SLIDE 103

Solutions to the Solution Formula Problem (1)

Augmented Projection

◮ The approach of the original Collins article (1975). ◮ Idea: Produce sufficiently many polynomials during projection. ◮ Technically one adds “lots of derivatives.”

A very simple demonstration of the idea

◮ Consider a single polynomial f = x3 − 12x2 + 44x − 48. ◮ f > 0 describes ]2, 4[ ∪ ]6, ∞[, f = 0 describes {2, 4, 6} . ◮ f cannot describe exclusively ]2, 4[ or {4}. ◮ f = 0 ∧ f ′ = 3x2 − 24x + 44 < 0 describes {4}.

CAD for Quantifier Elimination · 40/42

slide-104
SLIDE 104

Solutions to the Solution Formula Problem (1)

Augmented Projection

◮ The approach of the original Collins article (1975). ◮ Idea: Produce sufficiently many polynomials during projection. ◮ Technically one adds “lots of derivatives.”

A very simple demonstration of the idea

◮ Consider a single polynomial f = x3 − 12x2 + 44x − 48. ◮ f > 0 describes ]2, 4[ ∪ ]6, ∞[, f = 0 describes {2, 4, 6} . ◮ f cannot describe exclusively ]2, 4[ or {4}. ◮ f = 0 ∧ f ′ = 3x2 − 24x + 44 < 0 describes {4}. ◮ f > 0 ∧ f ′′ = 6x − 24 < 0 describes ]2, 4[.

CAD for Quantifier Elimination · 40/42

slide-105
SLIDE 105

Solutions to the Solution Formula Problem (1)

Augmented Projection

◮ The approach of the original Collins article (1975). ◮ Idea: Produce sufficiently many polynomials during projection. ◮ Technically one adds “lots of derivatives.”

A very simple demonstration of the idea

◮ Consider a single polynomial f = x3 − 12x2 + 44x − 48. ◮ f > 0 describes ]2, 4[ ∪ ]6, ∞[, f = 0 describes {2, 4, 6} . ◮ f cannot describe exclusively ]2, 4[ or {4}. ◮ f = 0 ∧ f ′ = 3x2 − 24x + 44 < 0 describes {4}. ◮ f > 0 ∧ f ′′ = 6x − 24 < 0 describes ]2, 4[. ◮ Isn’t this somehow Rolle’s Theorem? Yes it is!

CAD for Quantifier Elimination · 40/42

slide-106
SLIDE 106

Solutions to the Solution Formula Problem (1)

Augmented Projection

◮ The approach of the original Collins article (1975). ◮ Idea: Produce sufficiently many polynomials during projection. ◮ Technically one adds “lots of derivatives.”

A very simple demonstration of the idea

◮ Consider a single polynomial f = x3 − 12x2 + 44x − 48. ◮ f > 0 describes ]2, 4[ ∪ ]6, ∞[, f = 0 describes {2, 4, 6} . ◮ f cannot describe exclusively ]2, 4[ or {4}. ◮ f = 0 ∧ f ′ = 3x2 − 24x + 44 < 0 describes {4}. ◮ f > 0 ∧ f ′′ = 6x − 24 < 0 describes ]2, 4[. ◮ Isn’t this somehow Rolle’s Theorem? Yes it is!

Augmented projection is considered practically infeasible.

CAD for Quantifier Elimination · 40/42

slide-107
SLIDE 107

Solutions to the Solution Formula Problem (2)

Extended Tarski Language

◮ PhD thesis of Brown (1999).

CAD for Quantifier Elimination · 41/42

slide-108
SLIDE 108

Solutions to the Solution Formula Problem (2)

Extended Tarski Language

◮ PhD thesis of Brown (1999). ◮ Use extended language with predicates like

x ̺ rootα(f(α), n), ̺ ∈ {=, <, >, ≤, ≥, =}.

CAD for Quantifier Elimination · 41/42

slide-109
SLIDE 109

Solutions to the Solution Formula Problem (2)

Extended Tarski Language

◮ PhD thesis of Brown (1999). ◮ Use extended language with predicates like

x ̺ rootα(f(α), n), ̺ ∈ {=, <, >, ≤, ≥, =}.

◮ Predicate is false if f has less than n roots.

CAD for Quantifier Elimination · 41/42

slide-110
SLIDE 110

Solutions to the Solution Formula Problem (2)

Extended Tarski Language

◮ PhD thesis of Brown (1999). ◮ Use extended language with predicates like

x ̺ rootα(f(α), n), ̺ ∈ {=, <, >, ≤, ≥, =}.

◮ Predicate is false if f has less than n roots.

Examples

◮ f = x3 − 12x2 + 44x − 48 revisited:

rootx(f, 1) < x < rootx(f, 2) describes ]2, 4[.

CAD for Quantifier Elimination · 41/42

slide-111
SLIDE 111

Solutions to the Solution Formula Problem (2)

Extended Tarski Language

◮ PhD thesis of Brown (1999). ◮ Use extended language with predicates like

x ̺ rootα(f(α), n), ̺ ∈ {=, <, >, ≤, ≥, =}.

◮ Predicate is false if f has less than n roots.

Examples

◮ f = x3 − 12x2 + 44x − 48 revisited:

rootx(f, 1) < x < rootx(f, 2) describes ]2, 4[.

◮ In several variables one could obtain, e.g.,

rootα(α2 − 2, 1) < x < rootα(α2 − 2, 2) ∧ rootβ(3β7 − β + 4x5, 3) < y < rootβ(3β7 − β + 4x5, 5)

CAD for Quantifier Elimination · 41/42

slide-112
SLIDE 112

Solutions to the Solution Formula Problem (2)

Extended Tarski Language

◮ PhD thesis of Brown (1999). ◮ Use extended language with predicates like

x ̺ rootα(f(α), n), ̺ ∈ {=, <, >, ≤, ≥, =}.

◮ Predicate is false if f has less than n roots.

Examples

◮ f = x3 − 12x2 + 44x − 48 revisited:

rootx(f, 1) < x < rootx(f, 2) describes ]2, 4[.

◮ In several variables one could obtain, e.g.,

rootα(α2 − 2, 1) < x < rootα(α2 − 2, 2) ∧ rootβ(3β7 − β + 4x5, 3) < y < rootβ(3β7 − β + 4x5, 5) Efficiently check for x, y ∈ R if this holds.

CAD for Quantifier Elimination · 41/42

slide-113
SLIDE 113

Solutions to the Solution Formula Problem (2)

Extended Tarski Language

◮ PhD thesis of Brown (1999). ◮ Use extended language with predicates like

x ̺ rootα(f(α), n), ̺ ∈ {=, <, >, ≤, ≥, =}.

◮ Predicate is false if f has less than n roots.

Examples

◮ f = x3 − 12x2 + 44x − 48 revisited:

rootx(f, 1) < x < rootx(f, 2) describes ]2, 4[.

◮ In several variables one could obtain, e.g.,

rootα(α2 − 2, 1) < x < rootα(α2 − 2, 2) ∧ rootβ(3β7 − β + 4x5, 3) < y < rootβ(3β7 − β + 4x5, 5) Efficiently check for x, y ∈ R if this holds. State-of-the-art in QEPCAD and Mathematica, and used in Z3/NLSAT.

CAD for Quantifier Elimination · 41/42

slide-114
SLIDE 114

Summary

◮ virtual substitution for real quantifier elimination and some variants

(extended, generic)

◮ software: Redlog and other ◮ other theories

(integers, comples, differential, padic, terms, queues, PQSAT)

◮ applications in geometry, verification, . . . ◮ cylindrical algebraic decomposition (CAD)

Summary · 42/42