towards efficient quantifier elimination in mathematica
play

Towards Efficient Quantifier Elimination in Mathematica Katherine - PowerPoint PPT Presentation

Towards Efficient Quantifier Elimination in Mathematica Katherine Cordwell 15824 December 11, 2018 Katherine Cordwell (15824) QE December 11, 2018 1 / 29 Introduction What is quantifier elimination (QE)? Example: x 1 x 2 ( x 1


  1. Towards Efficient Quantifier Elimination in Mathematica Katherine Cordwell 15824 December 11, 2018 Katherine Cordwell (15824) QE December 11, 2018 1 / 29

  2. Introduction What is quantifier elimination (QE)? • Example: ∀ x 1 ∃ x 2 ( x 1 + x 2 = 0) becomes “True” 1 Adapted from Pablo Parillo’s lecture notes Katherine Cordwell (15824) QE December 11, 2018 2 / 29

  3. Introduction What is quantifier elimination (QE)? • Example: ∀ x 1 ∃ x 2 ( x 1 + x 2 = 0) becomes “True” • Example: ∀ x 1 ∀ x 2 ( x 2 1 + ax 2 2 ≤ 1) → ax 2 1 − a 2 x 1 x 2 + 2 ≥ 0 becomes ( a ≥ 0) ∧ ( a 3 − 8 a − 16) ≤ 0 1 1 Adapted from Pablo Parillo’s lecture notes Katherine Cordwell (15824) QE December 11, 2018 2 / 29

  4. Introduction Two seminal results • Quantifier elimination is decidable (Tarski, 1930). • Cylindrical algebraic decomposition (CAD) algorithm (Collins, 1975) Katherine Cordwell (15824) QE December 11, 2018 3 / 29

  5. Introduction Why is QE important in theorem proving? • Safety proofs of hybrid systems reduce to real arithmetic questions. • Efficient QE is key for efficient proofs. Katherine Cordwell (15824) QE December 11, 2018 4 / 29

  6. Introduction Why is QE important in theorem proving? • Safety proofs of hybrid systems reduce to real arithmetic questions. • Efficient QE is key for efficient proofs. • KeYmaera X outsources QE calls to Mathematica. Katherine Cordwell (15824) QE December 11, 2018 4 / 29

  7. Introduction Our Goal Improve quantifier elimination in Mathematica, with a view towards increasing the efficiency of KeYmaera X. Katherine Cordwell (15824) QE December 11, 2018 5 / 29

  8. Approach Our Approach • Focus on the universal fragment of decision problems ∀ x 1 , ∀ x 2 , . . . , ∀ x k φ ( x 1 , . . . , x k ) Katherine Cordwell (15824) QE December 11, 2018 6 / 29

  9. Approach Our Approach • Focus on the universal fragment of decision problems ∀ x 1 , ∀ x 2 , . . . , ∀ x k φ ( x 1 , . . . , x k ) • Because we can put formulas into CNF, we focus on disjunctions. Katherine Cordwell (15824) QE December 11, 2018 6 / 29

  10. Approach Our Approach Two sub-approaches: • Analyze the structures of the input polynomials. • Analyze the structures of the polynomials computed during CAD. Katherine Cordwell (15824) QE December 11, 2018 7 / 29

  11. Approach Our Approach Two sub-approaches: • Analyze the structures of the input polynomials. • Analyze the structures of the polynomials computed during CAD. Katherine Cordwell (15824) QE December 11, 2018 8 / 29

  12. Polynomials Odd Degree Variables Example 1 ∀ v, w, x, y, z ( − 6 − 7 v 2 w 3 x + 9 v 2 w 3 xyz + 6 v 3 w 2 z 2 > 0 ∨ 6 − 5 v 2 w 2 xy + 7 v 3 wx 3 yz + vy 3 z > 0) Katherine Cordwell (15824) QE December 11, 2018 9 / 29

  13. Polynomials Odd Degree Variables Example 1 ∀ v, w, x, y, z ( − 6 − 7 v 2 w 3 x + 9 v 2 w 3 xyz + 6 v 3 w 2 z 2 > 0 ∨ 6 − 5 v 2 w 2 xy + 7 v 3 wx 3 yz + vy 3 z > 0) • Notice that v has odd degree in both polynomials. Katherine Cordwell (15824) QE December 11, 2018 10 / 29

  14. Polynomials Odd Degree Variables Example 1 ∀ v, w, x, y, z ( − 6 − 7 v 2 w 3 x + 9 v 2 w 3 xyz + 6 v 3 w 2 z 2 > 0 ∨ 6 − 5 v 2 w 2 xy + 7 v 3 wx 3 yz + vy 3 z > 0) • Notice that v has odd degree in both polynomials. • Find values of w , x , y , z so that 6 w 2 z 2 and 7 wx 3 yz are either both positive or both negative. (E.g. w = x = y = z = 1.) Katherine Cordwell (15824) QE December 11, 2018 10 / 29

  15. Polynomials Odd Degree Variables Example 1 ∀ v, w, x, y, z ( − 6 − 7 v 2 w 3 x + 9 v 2 w 3 xyz + 6 v 3 w 2 z 2 > 0 ∨ 6 − 5 v 2 w 2 xy + 7 v 3 wx 3 yz + vy 3 z > 0) • Notice that v has odd degree in both polynomials. • Find values of w , x , y , z so that 6 w 2 z 2 and 7 wx 3 yz are either both positive or both negative. (E.g. w = x = y = z = 1.) • Return FALSE with “ v is −∞ , all other variables are 1” as a witness. Katherine Cordwell (15824) QE December 11, 2018 10 / 29

  16. Polynomials Set a Variable to 0 Example 2 ∀ v, w, x, y, z (1 − 10 vw 2 y − v 3 x 3 yz 2 − v 3 wx 2 yz 3 > 0 ∨ − 7 + 9 w 2 xy 3 z + 8 v 2 w 3 xz 2 > 0) Katherine Cordwell (15824) QE December 11, 2018 11 / 29

  17. Polynomials Set a Variable to 0 Example 2 ∀ v, w, x, y, z (1 − 10 vw 2 y − v 3 x 3 yz 2 − v 3 wx 2 yz 3 > 0 ∨ − 7 + 9 w 2 xy 3 z + 8 v 2 w 3 xz 2 > 0) • Notice that if we set w = 0 in each polynomial, we get 1 − v 3 x 3 yz 2 and − 7. Katherine Cordwell (15824) QE December 11, 2018 12 / 29

  18. Polynomials Set a Variable to 0 Example 2 ∀ v, w, x, y, z (1 − 10 vw 2 y − v 3 x 3 yz 2 − v 3 wx 2 yz 3 > 0 ∨ − 7 + 9 w 2 xy 3 z + 8 v 2 w 3 xz 2 > 0) • Notice that if we set w = 0 in each polynomial, we get 1 − v 3 x 3 yz 2 and − 7. • Notice that we can find values of v, x, y, and z so that − 7 ≤ 0 and 1 − v 3 x 3 yz 2 ≤ 0. (E.g. v = x = y = z = 1.) Katherine Cordwell (15824) QE December 11, 2018 12 / 29

  19. Polynomials Set a Variable to 0 Example 2 ∀ v, w, x, y, z (1 − 10 vw 2 y − v 3 x 3 yz 2 − v 3 wx 2 yz 3 > 0 ∨ − 7 + 9 w 2 xy 3 z + 8 v 2 w 3 xz 2 > 0) • Notice that if we set w = 0 in each polynomial, we get 1 − v 3 x 3 yz 2 and − 7. • Notice that we can find values of v, x, y, and z so that − 7 ≤ 0 and 1 − v 3 x 3 yz 2 ≤ 0. (E.g. v = x = y = z = 1.) • Return FALSE with “ w is 0, all other variables are 1” as a witness. Katherine Cordwell (15824) QE December 11, 2018 12 / 29

  20. Polynomials Set all Variables Equal Example 3 ∀ v, w, x, y, z − 10 − 5 v 2 w 3 y 2 z − 10 vxyz 3 > 0 ∨ 8 + 2 v 3 wy 2 z + 4 v 3 x 2 z 2 − 4 v 2 wxy 3 z 3 > 0 Katherine Cordwell (15824) QE December 11, 2018 13 / 29

  21. Polynomials Set all Variables Equal Example 3 ∀ v, w, x, y, z − 10 − 5 v 2 w 3 y 2 z − 10 vxyz 3 > 0 ∨ 8 + 2 v 3 wy 2 z + 4 v 3 x 2 z 2 − 4 v 2 wxy 3 z 3 > 0 • Notice that the highest degree monomial in the first polynomial is − 5 v 2 w 3 y 2 z and the highest degree monomial in the second polynomial is − 4 v 2 wxy 3 z 3 . Katherine Cordwell (15824) QE December 11, 2018 14 / 29

  22. Polynomials Set all Variables Equal Example 3 ∀ v, w, x, y, z − 10 − 5 v 2 w 3 y 2 z − 10 vxyz 3 > 0 ∨ 8 + 2 v 3 wy 2 z + 4 v 3 x 2 z 2 − 4 v 2 wxy 3 z 3 > 0 • Notice that the highest degree monomial in the first polynomial is − 5 v 2 w 3 y 2 z and the highest degree monomial in the second polynomial is − 4 v 2 wxy 3 z 3 . • Notice that both have negative real coefficients. Katherine Cordwell (15824) QE December 11, 2018 14 / 29

  23. Polynomials Set all Variables Equal Example 3 ∀ v, w, x, y, z − 10 − 5 v 2 w 3 y 2 z − 10 vxyz 3 > 0 ∨ 8 + 2 v 3 wy 2 z + 4 v 3 x 2 z 2 − 4 v 2 wxy 3 z 3 > 0 • Notice that the highest degree monomial in the first polynomial is − 5 v 2 w 3 y 2 z and the highest degree monomial in the second polynomial is − 4 v 2 wxy 3 z 3 . • Notice that both have negative real coefficients. • Return FALSE with “All variables are ∞ (i.e. set all variables equal and sufficiently large)” as a witness. Katherine Cordwell (15824) QE December 11, 2018 14 / 29

  24. Polynomials Analyze Leading Coefficients Example 4 ∀ v, w, z, w, y ( − 8 + 8 v 2 w 3 z + 6 v 2 w 3 y 2 z − 7 vx 3 yz 2 > 0 ∨ − 5 − 10 v 2 w 2 x 2 + 7 vwx 3 yz − 7 v 3 wxz 2 > 0) Katherine Cordwell (15824) QE December 11, 2018 15 / 29

  25. Polynomials Analyze Leading Coefficients Example 4 ∀ v, w, z, w, y ( − 8 + 8 v 2 w 3 z + 6 v 2 w 3 y 2 z − 7 vx 3 yz 2 > 0 ∨ − 5 − 10 v 2 w 2 x 2 + 7 vwx 3 yz − 7 v 3 wxz 2 > 0) • Notice that the leading coefficients of z are − 7 vx 3 y and − 7 v 3 wx . Katherine Cordwell (15824) QE December 11, 2018 16 / 29

  26. Polynomials Analyze Leading Coefficients Example 4 ∀ v, w, z, w, y ( − 8 + 8 v 2 w 3 z + 6 v 2 w 3 y 2 z − 7 vx 3 yz 2 > 0 ∨ − 5 − 10 v 2 w 2 x 2 + 7 vwx 3 yz − 7 v 3 wxz 2 > 0) • Notice that the leading coefficients of z are − 7 vx 3 y and − 7 v 3 wx . • Notice that we can find values of v, x, y, and x to make both of these negative. (E.g. y = x = w = v = 1.) Katherine Cordwell (15824) QE December 11, 2018 16 / 29

  27. Polynomials Analyze Leading Coefficients Example 4 ∀ v, w, z, w, y ( − 8 + 8 v 2 w 3 z + 6 v 2 w 3 y 2 z − 7 vx 3 yz 2 > 0 ∨ − 5 − 10 v 2 w 2 x 2 + 7 vwx 3 yz − 7 v 3 wxz 2 > 0) • Notice that the leading coefficients of z are − 7 vx 3 y and − 7 v 3 wx . • Notice that we can find values of v, x, y, and x to make both of these negative. (E.g. y = x = w = v = 1.) • Return FALSE with “ z = ∞ , all other variables are 1” as a witness. Katherine Cordwell (15824) QE December 11, 2018 16 / 29

  28. Polynomials Polynomial Properties • For each of these examples, we have a corresponding theorem. • We implemented an algorithm for each theorem in Mathematica. Katherine Cordwell (15824) QE December 11, 2018 17 / 29

  29. Experimental Results Benchmarks We tested on several sets of benchmarks. • 328 decision problems from KeYmaera 3. 2 2 Thanks to Stefan Mitsch. 3 Mulligan et. al. Quantifier elimination for reasoning in economics , arXiv preprint (2018) Katherine Cordwell (15824) QE December 11, 2018 18 / 29

Recommend


More recommend