logical foundations of cyber physical systems
play

Logical Foundations of Cyber-Physical Systems Andr Platzer Andr - PowerPoint PPT Presentation

20: Virtual Substitution & Real Equations Logical Foundations of Cyber-Physical Systems Andr Platzer Logical Foundations of Cyber-Physical Systems Andr Platzer Andr Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations


  1. Framing the Miracle: Quiz Is validity of formulas decidable/semidecidable/undecidable/not semidecidable for: � Propositional logic [no variables] decidable � FOL [ p , f ,... ] uninterpreted semidecidable [Gödel’30,Herbrand’30] × FOL N [+ , · , =] Peano arithmetic not semidecidable [Gödel’31] � FOL R [+ , · , = ,< ] decidable [Tarski’31..51] √ 2 �∈ Q , ∃ x x 2 = 2 × FOL Q [+ , · , =] not semidecidable [Robinson’49] � FOL C [+ , · , =] decidable [Tarski’51,Chevalley’51] FOL R [+ , = , ∧ , ∃ ] 6 FOL R [+ , ≤ , ∧ , ∃ ] 7 FOL N [+ , = , 2 | , 3 | ,... ] 8 FOL R [+ , · , exp , = ,< ] 9 10 FOL R [+ , · , sin , = ,< ] André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 5 / 24

  2. Framing the Miracle: Quiz Is validity of formulas decidable/semidecidable/undecidable/not semidecidable for: � Propositional logic [no variables] decidable � FOL [ p , f ,... ] uninterpreted semidecidable [Gödel’30,Herbrand’30] × FOL N [+ , · , =] Peano arithmetic not semidecidable [Gödel’31] � FOL R [+ , · , = ,< ] decidable [Tarski’31..51] √ 2 �∈ Q , ∃ x x 2 = 2 × FOL Q [+ , · , =] not semidecidable [Robinson’49] � FOL C [+ , · , =] decidable [Tarski’51,Chevalley’51] � FOL R [+ , = , ∧ , ∃ ] decidable Gaussian elim. [179 CE] FOL R [+ , ≤ , ∧ , ∃ ] 7 FOL N [+ , = , 2 | , 3 | ,... ] 8 FOL R [+ , · , exp , = ,< ] 9 10 FOL R [+ , · , sin , = ,< ] André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 5 / 24

  3. Framing the Miracle: Quiz Is validity of formulas decidable/semidecidable/undecidable/not semidecidable for: � Propositional logic [no variables] decidable � FOL [ p , f ,... ] uninterpreted semidecidable [Gödel’30,Herbrand’30] × FOL N [+ , · , =] Peano arithmetic not semidecidable [Gödel’31] � FOL R [+ , · , = ,< ] decidable [Tarski’31..51] √ 2 �∈ Q , ∃ x x 2 = 2 × FOL Q [+ , · , =] not semidecidable [Robinson’49] � FOL C [+ , · , =] decidable [Tarski’51,Chevalley’51] � FOL R [+ , = , ∧ , ∃ ] decidable Gaussian elim. [179 CE] � FOL R [+ , ≤ , ∧ , ∃ ] decidable [Fourier 1826] FOL N [+ , = , 2 | , 3 | ,... ] 8 FOL R [+ , · , exp , = ,< ] 9 10 FOL R [+ , · , sin , = ,< ] André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 5 / 24

  4. Framing the Miracle: Quiz Is validity of formulas decidable/semidecidable/undecidable/not semidecidable for: � Propositional logic [no variables] decidable � FOL [ p , f ,... ] uninterpreted semidecidable [Gödel’30,Herbrand’30] × FOL N [+ , · , =] Peano arithmetic not semidecidable [Gödel’31] � FOL R [+ , · , = ,< ] decidable [Tarski’31..51] √ 2 �∈ Q , ∃ x x 2 = 2 × FOL Q [+ , · , =] not semidecidable [Robinson’49] � FOL C [+ , · , =] decidable [Tarski’51,Chevalley’51] � FOL R [+ , = , ∧ , ∃ ] decidable Gaussian elim. [179 CE] � FOL R [+ , ≤ , ∧ , ∃ ] decidable [Fourier 1826] � FOL N [+ , = , 2 | , 3 | ,... ] decidable [Presburger’29,Skolem’31] FOL R [+ , · , exp , = ,< ] 9 10 FOL R [+ , · , sin , = ,< ] André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 5 / 24

  5. Framing the Miracle: Quiz Is validity of formulas decidable/semidecidable/undecidable/not semidecidable for: � Propositional logic [no variables] decidable � FOL [ p , f ,... ] uninterpreted semidecidable [Gödel’30,Herbrand’30] × FOL N [+ , · , =] Peano arithmetic not semidecidable [Gödel’31] � FOL R [+ , · , = ,< ] decidable [Tarski’31..51] √ 2 �∈ Q , ∃ x x 2 = 2 × FOL Q [+ , · , =] not semidecidable [Robinson’49] � FOL C [+ , · , =] decidable [Tarski’51,Chevalley’51] � FOL R [+ , = , ∧ , ∃ ] decidable Gaussian elim. [179 CE] � FOL R [+ , ≤ , ∧ , ∃ ] decidable [Fourier 1826] � FOL N [+ , = , 2 | , 3 | ,... ] decidable [Presburger’29,Skolem’31] ? FOL R [+ , · , exp , = ,< ] unknown 10 FOL R [+ , · , sin , = ,< ] André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 5 / 24

  6. Framing the Miracle: Quiz Is validity of formulas decidable/semidecidable/undecidable/not semidecidable for: � Propositional logic [no variables] decidable � FOL [ p , f ,... ] uninterpreted semidecidable [Gödel’30,Herbrand’30] × FOL N [+ , · , =] Peano arithmetic not semidecidable [Gödel’31] � FOL R [+ , · , = ,< ] decidable [Tarski’31..51] √ 2 �∈ Q , ∃ x x 2 = 2 × FOL Q [+ , · , =] not semidecidable [Robinson’49] � FOL C [+ , · , =] decidable [Tarski’51,Chevalley’51] � FOL R [+ , = , ∧ , ∃ ] decidable Gaussian elim. [179 CE] � FOL R [+ , ≤ , ∧ , ∃ ] decidable [Fourier 1826] � FOL N [+ , = , 2 | , 3 | ,... ] decidable [Presburger’29,Skolem’31] ? FOL R [+ , · , exp , = ,< ] unknown × FOL R [+ , · , sin , = ,< ] sin x = 0 not semidecidable [Richardson’68] André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 5 / 24

  7. Outline Learning Objectives 1 Framing the Miracle 2 Quantifier Elimination 3 Homomorphic Normalization for QE Term Substitutions for Linear Equations Square Root √· Virtual Substitution for Quadratics 4 Square Root Algebra Virtual Substitutions of Square Roots Example Summary 5 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 5 / 24

  8. Quantifier Elimination � Projection F ≡ ∃ y ( y ≥ 0 ∧ 1 − x − 1 . 83 x 2 + 1 . 66 x 3 > y ) y x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 6 / 24

  9. Quantifier Elimination � Projection F ≡ ∃ y ( y ≥ 0 ∧ 1 − x − 1 . 83 x 2 + 1 . 66 x 3 > y ) y x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 6 / 24

  10. Quantifier Elimination � Projection F ≡ ∃ y ( y ≥ 0 ∧ 1 − x − 1 . 83 x 2 + 1 . 66 x 3 > y ) y x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 6 / 24

  11. Quantifier Elimination � Projection F ≡ ∃ y ( y ≥ 0 ∧ 1 − x − 1 . 83 x 2 + 1 . 66 x 3 > y ) y QE x QE( F ) ≡ − 0 . 75 < x ∧ x < 0 . 68 ∨ x > 1 . 18 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 6 / 24

  12. Quantifier Elimination � Projection x QE( F ) ≡ − 0 . 75 < x ∧ x < 0 . 68 ∨ x > 1 . 18 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 6 / 24

  13. Quantifier Elimination � Projection F ≡ ∃ y ( y ≥ 0 ∧ 1 − x − 1 . 83 x 2 + 1 . 66 x 3 > y ) QE x QE( F ) ≡ − 0 . 75 < x ∧ x < 0 . 68 ∨ x > 1 . 18 If all but one variable has fixed value: Finite union of intervals. Univariate polynomials have finitely many roots. Signs change finitely often. André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 6 / 24

  14. Polynomial Equations � Algebraic Varieties y y y x 2 + y 2 = 1 x 3 = y x x x y 2 = x 2 ( x + 1 ) z = x 2 − y 2 4 x 3 + 4 x 2 y + 9 xy 2 − 9 y 3 − 36 x + 36 y = 0 Algebraic variety: defined by conjunction of polynomial equations André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 7 / 24

  15. Polynomial Inequalities � Semialgebraic Sets y y y x 2 + y 2 ≤ 1 | y |≤| x 3 | ∧ xy ≥ 0 x x x y 2 = x 2 ( x + 1 ) y ∧ x ≤ 0 . 44 | y |≥| x 3 | ∧ xy ≥ 0 ∧ | y |≤ 1 . 7 | x | z = x 2 − y 2 x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 8 / 24

  16. Quantifier Elimination in Real Arithmetic Theorem (Tarski’31) First-order logic of real arithmetic is decidable since it admits quantifier elimination, i.e., for each formula P, compute quantifier-free formula QE( P ) that is equivalent, i.e., P ↔ QE( P ) is valid. André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 9 / 24

  17. Quantifier Elimination in Real Arithmetic Theorem (Tarski’31) First-order logic of real arithmetic is decidable since it admits quantifier elimination, i.e., for each formula P, compute quantifier-free formula QE( P ) that is equivalent, i.e., P ↔ QE( P ) is valid. Theorem (Complexity, Davenport&Heintz’88,Weispfenning’88) (Time and space) complexity of QE for R is doubly exponential in the number n of quantifier (alternations). 2 2 O ( n ) André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 9 / 24

  18. Quantifier Elimination in Real Arithmetic Theorem (Tarski’31) First-order logic of real arithmetic is decidable since it admits quantifier elimination, i.e., for each formula P, compute quantifier-free formula QE( P ) that is equivalent, i.e., P ↔ QE( P ) is valid. Theorem (Complexity, Davenport&Heintz’88,Weispfenning’88) (Time and space) complexity of QE for R is doubly exponential in the number n of quantifier (alternations). 2 2 O ( n ) Answer even for one free variable and only linear polynomials André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 9 / 24

  19. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∃ x ( a = b + x 2 )) ≡ QE( ∃ x ( x 2 = 2 )) ≡ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  20. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∃ x ( a = b + x 2 )) ≡ QE( ∃ x ( x 2 = 2 )) ≡ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  21. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c QE( ∃ x ( 2 x 2 + c ≤ 5 )) QE( ∃ x ( a = b + x 2 )) ≡ QE( ∃ x ( x 2 = 2 )) ≡ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  22. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c ( c ≤ 5 )) QE( ∃ x ( a = b + x 2 )) ≡ QE( ∃ x ( x 2 = 2 )) ≡ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  23. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c ( c ≤ 5 )) ≡ − 100 ≤ 5 ∧ 5 ≤ 5 ∧ 100 ≤ 5 QE( ∃ x ( a = b + x 2 )) ≡ QE( ∃ x ( x 2 = 2 )) ≡ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  24. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c ( c ≤ 5 )) ≡ − 100 ≤ 5 ∧ 5 ≤ 5 ∧ 100 ≤ 5 ≡ false QE( ∃ x ( a = b + x 2 )) ≡ QE( ∃ x ( x 2 = 2 )) ≡ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  25. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c ( c ≤ 5 )) ≡ − 100 ≤ 5 ∧ 5 ≤ 5 ∧ 100 ≤ 5 ≡ false QE( ∃ x ( a = b + x 2 )) ≡ a ≥ b QE( ∃ x ( x 2 = 2 )) ≡ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  26. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c ( c ≤ 5 )) ≡ − 100 ≤ 5 ∧ 5 ≤ 5 ∧ 100 ≤ 5 ≡ false QE( ∃ x ( a = b + x 2 )) ≡ a ≥ b QE( ∃ x ( x 2 = 2 )) ≡ true QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  27. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c ( c ≤ 5 )) ≡ − 100 ≤ 5 ∧ 5 ≤ 5 ∧ 100 ≤ 5 ≡ false QE( ∃ x ( a = b + x 2 )) ≡ a ≥ b QE( ∃ x ( x 2 = 2 )) ≡ true √ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ y = ± 2 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  28. Quantifier Elimination Examples QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ c ≤ 5 QE( ∀ c ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c QE( ∃ x ( 2 x 2 + c ≤ 5 )) ≡ QE( ∀ c ( c ≤ 5 )) ≡ − 100 ≤ 5 ∧ 5 ≤ 5 ∧ 100 ≤ 5 ≡ false QE( ∃ x ( a = b + x 2 )) ≡ a ≥ b QE( ∃ x ( x 2 = 2 )) ≡ true √ QE( ∃ x ( x 2 = 2 ∧ y = x )) ≡ y = ± 2 ≡ y 2 = 2 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 10 / 24

  29. Framework: Logical Normalization for QE QE( A ∧ B ) ≡ QE( A ∨ B ) ≡ QE( ¬ A ) ≡ QE( ∀ x A ) ≡ QE( ∃ x A ) ≡ A has quantifiers André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 11 / 24

  30. Framework: Logical Normalization for QE QE( A ∧ B ) ≡ QE( A ) ∧ QE( B ) QE( A ∨ B ) ≡ QE( A ) ∨ QE( B ) QE( ¬ A ) ≡ ¬ QE( A ) QE( ∀ x A ) ≡ QE( ¬∃ x ¬ A ) QE( ∃ x A ) ≡ QE( ∃ x QE( A )) A has quantifiers André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 11 / 24

  31. Framework: Logical Normalization for QE QE( A ∧ B ) ≡ QE( A ) ∧ QE( B ) QE( A ∨ B ) ≡ QE( A ) ∨ QE( B ) QE( ¬ A ) ≡ ¬ QE( A ) QE( ∀ x A ) ≡ QE( ¬∃ x ¬ A ) QE( ∃ x A ) ≡ QE( ∃ x QE( A )) A has quantifiers QE( ∃ x ( A ∨ B )) ≡ QE( ∃ x ¬ ( A ∧ B )) ≡ QE( ∃ x ¬ ( A ∨ B )) ≡ QE( ∃ x ¬¬ A ) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 11 / 24

  32. Framework: Logical Normalization for QE QE( A ∧ B ) ≡ QE( A ) ∧ QE( B ) QE( A ∨ B ) ≡ QE( A ) ∨ QE( B ) QE( ¬ A ) ≡ ¬ QE( A ) QE( ∀ x A ) ≡ QE( ¬∃ x ¬ A ) QE( ∃ x A ) ≡ QE( ∃ x QE( A )) A has quantifiers QE( ∃ x ( A ∨ B )) ≡ QE( ∃ x A ) ∨ QE( ∃ x B ) QE( ∃ x ¬ ( A ∧ B )) ≡ QE( ∃ x ( ¬ A ∨¬ B )) QE( ∃ x ¬ ( A ∨ B )) ≡ QE( ∃ x ( ¬ A ∧¬ B )) QE( ∃ x ¬¬ A ) ≡ QE( ∃ x A ) André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 11 / 24

  33. Framework: Logical Normalization for QE QE( A ∧ B ) ≡ QE( A ) ∧ QE( B ) QE( A ∨ B ) ≡ QE( A ) ∨ QE( B ) QE( ¬ A ) ≡ ¬ QE( A ) QE( ∀ x A ) ≡ QE( ¬∃ x ¬ A ) QE( ∃ x A ) ≡ QE( ∃ x QE( A )) A has quantifiers QE( ∃ x ( A ∨ B )) ≡ QE( ∃ x A ) ∨ QE( ∃ x B ) QE( ∃ x ¬ ( A ∧ B )) ≡ QE( ∃ x ( ¬ A ∨¬ B )) QE( ∃ x ¬ ( A ∨ B )) ≡ QE( ∃ x ( ¬ A ∧¬ B )) QE( ∃ x ¬¬ A ) ≡ QE( ∃ x A ) QE( ∃ x ( A ∧ ( B ∨ C ))) ≡ QE( ∃ x (( A ∨ B ) ∧ C )) ≡ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 11 / 24

  34. Framework: Logical Normalization for QE QE( A ∧ B ) ≡ QE( A ) ∧ QE( B ) QE( A ∨ B ) ≡ QE( A ) ∨ QE( B ) QE( ¬ A ) ≡ ¬ QE( A ) QE( ∀ x A ) ≡ QE( ¬∃ x ¬ A ) QE( ∃ x A ) ≡ QE( ∃ x QE( A )) A has quantifiers QE( ∃ x ( A ∨ B )) ≡ QE( ∃ x A ) ∨ QE( ∃ x B ) QE( ∃ x ¬ ( A ∧ B )) ≡ QE( ∃ x ( ¬ A ∨¬ B )) QE( ∃ x ¬ ( A ∨ B )) ≡ QE( ∃ x ( ¬ A ∧¬ B )) QE( ∃ x ¬¬ A ) ≡ QE( ∃ x A ) QE( ∃ x ( A ∧ ( B ∨ C ))) ≡ QE( ∃ x (( A ∧ B ) ∨ ( A ∧ C ))) expensive QE( ∃ x (( A ∨ B ) ∧ C )) ≡ QE( ∃ x (( A ∧ C ) ∨ ( B ∧ C ))) expensive André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 11 / 24

  35. Framework: Logical Normalization for QE QE( ∃ x ( A 1 ∧ ... ∧ A k )) with atomic A i Normal Form QE( A ∧ B ) ≡ QE( A ) ∧ QE( B ) QE( A ∨ B ) ≡ QE( A ) ∨ QE( B ) QE( ¬ A ) ≡ ¬ QE( A ) QE( ∀ x A ) ≡ QE( ¬∃ x ¬ A ) QE( ∃ x A ) ≡ QE( ∃ x QE( A )) A has quantifiers QE( ∃ x ( A ∨ B )) ≡ QE( ∃ x A ) ∨ QE( ∃ x B ) QE( ∃ x ¬ ( A ∧ B )) ≡ QE( ∃ x ( ¬ A ∨¬ B )) QE( ∃ x ¬ ( A ∨ B )) ≡ QE( ∃ x ( ¬ A ∧¬ B )) QE( ∃ x ¬¬ A ) ≡ QE( ∃ x A ) QE( ∃ x ( A ∧ ( B ∨ C ))) ≡ QE( ∃ x (( A ∧ B ) ∨ ( A ∧ C ))) expensive QE( ∃ x (( A ∨ B ) ∧ C )) ≡ QE( ∃ x (( A ∧ C ) ∨ ( B ∧ C ))) expensive André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 11 / 24

  36. Framework: Arithmetical Normalization for QE QE( ∃ x ( p 1 ∼ i 0 ∧ ... ∧ p k ∼ k 0 )) and ∼ i ∈ { >, = , ≥ , � = } Normal Form p = q ≡ p − q = 0 p ≥ q ≡ p − q ≥ 0 p > q ≡ p − q > 0 p � = q ≡ p − q � = 0 p ≤ q ≡ q − p ≥ 0 p < q ≡ q − p > 0 ¬ ( p ≥ q ) ≡ p < q ¬ ( p > q ) ≡ p ≤ q ¬ ( p = q ) ≡ p � = q ¬ ( p � = q ) ≡ p = q André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 12 / 24

  37. Quantifier Elimination by Virtual Substitution Virtual Substitution � A t ∧ F t ∃ x F ↔ x t ∈ T where terms T substituted (virtually) into F depend on F where A t are quantifier-free additional compatibility conditions Scalability requires simplifier for intermediate results André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 13 / 24

  38. Quantifier Elimination by Virtual Substitution Virtual Substitution � Quantifier Quantifier-free A t ∧ F t ∃ x F ↔ x t ∈ T where terms T substituted (virtually) into F depend on F where A t are quantifier-free additional compatibility conditions Scalability requires simplifier for intermediate results André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 13 / 24

  39. Naïve Virtual Substitution by Example x 0 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  40. Naïve Virtual Substitution by Example x 0 2 17 5 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  41. Naïve Virtual Substitution by Example x 0 2 17 5 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) ( 2 > 2 ∧ 2 < 17 ≡ 5 ) boundary case “ x = 2” André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  42. Naïve Virtual Substitution by Example x 0 2 17 5 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) ( 2 > 2 ∧ 2 < 17 ≡ 5 ) boundary case “ x = 2” ( 17 5 > 2 ∧ 17 5 < 17 boundary case “ x = 17 ∨ 5 ) 5 ” André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  43. Naïve Virtual Substitution by Example x 0 2 + 17 2 17 5 5 2 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) ( 2 > 2 ∧ 2 < 17 ≡ 5 ) boundary case “ x = 2” ( 17 5 > 2 ∧ 17 5 < 17 boundary case “ x = 17 ∨ 5 ) 5 ” 2 + 17 2 + 17 2 + 17 < 17 ∨ ( > 2 ∧ 5 ) intermediate case “ x = 5 5 5 ” 2 2 2 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  44. Naïve Virtual Substitution by Example x − ∞ 0 2 + 17 2 17 5 5 2 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) ( 2 > 2 ∧ 2 < 17 ≡ 5 ) boundary case “ x = 2” ( 17 5 > 2 ∧ 17 5 < 17 boundary case “ x = 17 ∨ 5 ) 5 ” 2 + 17 2 + 17 2 + 17 < 17 ∨ ( > 2 ∧ 5 ) intermediate case “ x = 5 5 5 ” 2 2 2 ( − ∞ > 2 ∧− ∞ < 17 ∨ 5 ) extremal case “ x = − ∞ ” André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  45. Naïve Virtual Substitution by Example x − ∞ 0 2 + 17 2 17 ∞ 5 5 2 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) ( 2 > 2 ∧ 2 < 17 ≡ 5 ) boundary case “ x = 2” ( 17 5 > 2 ∧ 17 5 < 17 boundary case “ x = 17 ∨ 5 ) 5 ” 2 + 17 2 + 17 2 + 17 < 17 ∨ ( > 2 ∧ 5 ) intermediate case “ x = 5 5 5 ” 2 2 2 ( − ∞ > 2 ∧− ∞ < 17 ∨ 5 ) extremal case “ x = − ∞ ” ( ∞ > 2 ∧ ∞ < 17 ∨ 5 ) extremal case “ x = ∞ ” André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  46. Naïve Virtual Substitution by Example x − ∞ 0 2 + 17 2 17 ∞ 5 5 2 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) ( 2 > 2 ∧ 2 < 17 ≡ 5 ) boundary case “ x = 2” ( 17 5 > 2 ∧ 17 5 < 17 boundary case “ x = 17 ∨ 5 ) 5 ” 2 + 17 2 + 17 2 + 17 < 17 ∨ ( > 2 ∧ 5 ) intermediate case “ x = 5 5 5 ” 2 2 2 ( − ∞ > 2 ∧− ∞ < 17 ∨ 5 ) extremal case “ x = − ∞ ” ( ∞ > 2 ∧ ∞ < 17 ∨ 5 ) extremal case “ x = ∞ ” ≡ true evaluate André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  47. Naïve Virtual Substitution by Example x − ∞ 0 2 + 17 2 17 ∞ 5 5 2 Can we get rid of the quantifier without changing the semantics? ∃ x ( x > 2 ∧ x < 17 5 ) ( 2 > 2 ∧ 2 < 17 ≡ 5 ) boundary case “ x = 2” ( 17 5 > 2 ∧ 17 5 < 17 boundary case “ x = 17 ∨ 5 ) 5 ” 2 + 17 2 + 17 2 + 17 < 17 ∨ ( > 2 ∧ 5 ) intermediate case “ x = 5 5 5 ” 2 2 2 ( − ∞ > 2 ∧− ∞ < 17 ∨ 5 ) extremal case “ x = − ∞ ” ( ∞ > 2 ∧ ∞ < 17 ∨ 5 ) extremal case “ x = ∞ ” ≡ true evaluate ∞ is not in FOL R Interior points aren’t always terms in FOL R if nonlinear Substituting them into formulas requires attention André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 14 / 24

  48. Linear Virtual Substitution Theorem (Virtual Substitution: Linear Equation) ∃ x ( bx + c = 0 ∧ F ) ↔ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 15 / 24

  49. Linear Virtual Substitution Theorem (Virtual Substitution: Linear Equation) ∃ x ( bx + c = 0 ∧ F ) ↔ F − c / b x Linear solution André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 15 / 24

  50. Linear Virtual Substitution Theorem (Virtual Substitution: Linear Equation) ∃ x ( bx + c = 0 ∧ F ) ↔ b � = 0 ∧ F − c / b x Don’t divide by 0 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 15 / 24

  51. Linear Virtual Substitution Theorem (Virtual Substitution: Linear Equation) � � ∃ x ( bx + c = 0 ∧ F ) ↔ b � = 0 ∧ F − c / b b � = 0 → x Only actually linear solution if b � = 0 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 15 / 24

  52. Linear Virtual Substitution Theorem (Virtual Substitution: Linear Equation x �∈ b , c ) � ∃ x ( bx + c = 0 ∧ F ) ↔ b � = 0 ∧ F − c / b � b � = 0 → if x �∈ b , c x Only linear if no x in b , c André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 15 / 24

  53. Linear Virtual Substitution Theorem (Virtual Substitution: Linear Equation x �∈ b , c ) � ∃ x ( bx + c = 0 ∧ F ) ↔ b � = 0 ∧ F − c / b � b � = 0 → if x �∈ b , c x Conditional equivalence, so conditions may need to be checked or case-split André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 15 / 24

  54. Linear Virtual Substitution Theorem (Virtual Substitution: Linear Equation x �∈ b , c ) � ∃ x ( bx + c = 0 ∧ F ) ↔ b � = 0 ∧ F − c / b � b � = 0 → if x �∈ b , c x Lemma (Uniform substitution of linear equations) The linear equation axiom is sound (b , c are arity 0 function symbols): � � ∃ lin b � = 0 → ∃ x ( b · x + c = 0 ∧ q ( x )) ↔ q ( − c / b ) � � 3 � � − yz − 1 − yz − 1 � ( y 2 + 4 � ) = 0 ∧ x 3 + x ≥ 0 ∃ x ) · x +( yz − 1 ↔ + ≥ 0 y 2 + 4 y 2 + 4 � �� � � �� � c b André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 15 / 24

  55. Outline Learning Objectives 1 Framing the Miracle 2 Quantifier Elimination 3 Homomorphic Normalization for QE Term Substitutions for Linear Equations Square Root √· Virtual Substitution for Quadratics 4 Square Root Algebra Virtual Substitutions of Square Roots Example Summary 5 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 15 / 24

  56. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation) ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  57. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation) ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ √ F ( − b + b 2 − 4 ac ) / ( 2 a ) x Quadratic solution André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  58. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation) ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ √ √ � � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Or negative square root solution − x 2 + x + 1 x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  59. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation) ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ √ √ � � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) a � = 0 ∧ x x Don’t divide by 0 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  60. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation) ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ √ √ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Real solution if √· exists by discriminant 2 x 2 − x + 1 1 10 x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  61. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation) ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b x √ √ ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Instead linear solution if a = 0 (may case-split) 0 x 2 + x + 1 2 x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  62. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Only equivalent if not all 0 which gives trivial equation (else use F ) André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  63. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Only linear or quadratic if no x in a , b , c André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  64. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Quantifier-free equivalent 1 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  65. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Quantifier-free equivalent 1 Just not a formula . . . 2 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  66. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Quantifier-free equivalent 1 Just not a formula . . . 2 √ b 2 − 4 ac ) / ( 2 a ) is not in FOL R and neither is − c / b ( − b + 3 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  67. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) x x Quantifier-free equivalent 1 Just not a formula . . . 2 √ b 2 − 4 ac ) / ( 2 a ) is not in FOL R and neither is − c / b ( − b + 3 Virtual substitution F ( a + b √ c ) / d acts as if it were to substitute 4 ¯ ( a + b √ x c ) / d for x in F André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  68. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b ¯ x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) ¯ ¯ x x Quantifier-free equivalent 1 Just not a formula . . . 2 √ b 2 − 4 ac ) / ( 2 a ) is not in FOL R and neither is − c / b ( − b + 3 Virtual substitution F ( a + b √ c ) / d acts as if it were to substitute 4 ¯ ( a + b √ x c ) / d for x in F . . . but it’s merely equivalent André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  69. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b ¯ x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) ¯ ¯ x x Quantifier-free equivalent 1 Just not a formula . . . 2 √ b 2 − 4 ac ) / ( 2 a ) is not in FOL R and neither is − c / b ( − b + 3 Virtual substitution F ( a + b √ c ) / d acts as if it were to substitute 4 ¯ ( a + b √ x c ) / d for x in F . . . but it’s merely equivalent ∃ r ( r 2 = c ) would do it for √ c 5 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  70. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b ¯ x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) ¯ ¯ x x Quantifier-free equivalent 1 Just not a formula . . . 2 √ b 2 − 4 ac ) / ( 2 a ) is not in FOL R and neither is − c / b ( − b + 3 Virtual substitution F ( a + b √ c ) / d acts as if it were to substitute 4 ¯ ( a + b √ x c ) / d for x in F . . . but it’s merely equivalent ∃ r ( r 2 = c ) would do it for √ c but that’s going in circles 5 André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 16 / 24

  71. Quadratic Virtual Substitution Theorem (Virtual Substitution: Quadratic Equation x �∈ a , b , c ) a � = 0 ∨ b � = 0 ∨ c � = 0 → � ∃ x ( ax 2 + bx + c = 0 ∧ F ) ↔ a = 0 ∧ b � = 0 ∧ F − c / b ¯ x √ √ �� ∨ a � = 0 ∧ b 2 − 4 ac ≥ 0 ∧ � F ( − b + b 2 − 4 ac ) / ( 2 a ) ∨ F ( − b − b 2 − 4 ac ) / ( 2 a ) ¯ ¯ x x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 17 / 24

  72. Square Root Algebra Virtual Substitution into Polynomial Virtually substitute ( a + b √ c ) / d into a polynomial p : p ( a + b √ c ) / d def = ¯ x Convention: On this slide c ′ is not a derivative but just another name . . . André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 18 / 24

  73. Square Root Algebra Virtual Substitution into Polynomial Virtually substitute ( a + b √ c ) / d into a polynomial p : p ( a + b √ = p (( a + b √ c ) / d def c ) / d ) ¯ x Convention: On this slide c ′ is not a derivative but just another name . . . André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 18 / 24

  74. Square Root Algebra Virtual Substitution into Polynomial Virtually substitute ( a + b √ c ) / d into a polynomial p : p ( a + b √ = p (( a + b √ c ) / d def c ) / d ) by algebraic evaluation of + , · ¯ x Convention: On this slide c ′ is not a derivative but just another name . . . André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 18 / 24

  75. Square Root Algebra Virtual Substitution into Polynomial Virtually substitute ( a + b √ c ) / d into a polynomial p : p ( a + b √ = p (( a + b √ c ) / d def c ) / d ) by algebraic evaluation of + , · ¯ x √ c -algebra Algebra of terms ( a + b √ c ) / d with polynomials a , b , c , d ∈ Q [ x 1 ,.., x n ] : (( a + b √ c ) / d )+(( a ′ + b ′ √ c ) / d ′ ) = (( a + b √ c ) / d ) · (( a ′ + b ′ √ c ) / d ′ ) = Convention: On this slide c ′ is not a derivative but just another name . . . André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 18 / 24

  76. Square Root Algebra Virtual Substitution into Polynomial Virtually substitute ( a + b √ c ) / d into a polynomial p : p ( a + b √ = p (( a + b √ c ) / d def c ) / d ) by algebraic evaluation of + , · ¯ x √ c -algebra Algebra of terms ( a + b √ c ) / d with polynomials a , b , c , d ∈ Q [ x 1 ,.., x n ] : (( a + b √ c ) / d )+(( a ′ + b ′ √ c ) / d ′ ) = (( ad ′ + da ′ )+( bd ′ + db ′ ) √ c ) / ( dd ′ ) (( a + b √ c ) / d ) · (( a ′ + b ′ √ c ) / d ′ ) = Convention: On this slide c ′ is not a derivative but just another name . . . André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 18 / 24

  77. Square Root Algebra Virtual Substitution into Polynomial Virtually substitute ( a + b √ c ) / d into a polynomial p : p ( a + b √ = p (( a + b √ c ) / d def c ) / d ) by algebraic evaluation of + , · ¯ x √ c -algebra Algebra of terms ( a + b √ c ) / d with polynomials a , b , c , d ∈ Q [ x 1 ,.., x n ] : (( a + b √ c ) / d )+(( a ′ + b ′ √ c ) / d ′ ) = (( ad ′ + da ′ )+( bd ′ + db ′ ) √ c ) / ( dd ′ ) (( a + b √ c ) / d ) · (( a ′ + b ′ √ c ) / d ′ ) = (( aa ′ + bb ′ c )+( ab ′ + ba ′ ) √ c ) / ( dd ′ ) Convention: On this slide c ′ is not a derivative but just another name . . . André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 18 / 24

  78. Square Root Algebra Virtual Substitution into Polynomial Virtually substitute ( a + b √ c ) / d into a polynomial p : p ( a + b √ = p (( a + b √ c ) / d def c ) / d ) by algebraic evaluation of + , · ¯ x √ c -algebra Algebra of terms ( a + b √ c ) / d with polynomials a , b , c , d ∈ Q [ x 1 ,.., x n ] : where c ≥ 0 , d , d ′ � = 0 (( a + b √ c ) / d )+(( a ′ + b ′ √ c ) / d ′ ) = (( ad ′ + da ′ )+( bd ′ + db ′ ) √ c ) / ( dd ′ ) (( a + b √ c ) / d ) · (( a ′ + b ′ √ c ) / d ′ ) = (( aa ′ + bb ′ c )+( ab ′ + ba ′ ) √ c ) / ( dd ′ ) Convention: On this slide c ′ is not a derivative but just another name . . . André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 18 / 24

  79. Virtual √· Substitution Virtual Substitution into Comparisons Virtually substitute ( a + b √ c ) / d into a comparison p ∼ 0: ( p ∼ 0 ) ( a + b √ c ) / d ≡ ¯ x André Platzer (CMU) LFCPS/20: Virtual Substitution & Real Equations LFCPS/20 19 / 24

Recommend


More recommend