cs156 the calculus of
play

CS156: The Calculus of quantifier-free formula (qff) G that is - PowerPoint PPT Presentation

Quantifier Elimination (QE) Algorithm for elimination of all quantifiers of formula F until CS156: The Calculus of quantifier-free formula (qff) G that is equivalent to F remains Note: Could be enough if F is equisatisfiable to G , that is F is


  1. Quantifier Elimination (QE) Algorithm for elimination of all quantifiers of formula F until CS156: The Calculus of quantifier-free formula (qff) G that is equivalent to F remains Note: Could be enough if F is equisatisfiable to G , that is F is Computation satisfiable iff G is satisfiable Zohar Manna A theory T admits quantifier elimination iff Winter 2010 there is an algorithm that given Σ-formula F returns a quantifier-free Σ-formula G that is T -equivalent to F . Chapter 7: Quantified Linear Arithmetic Page 1 of 40 Page 2 of 40 Example: ∃ x . 2 x = y About QE Algorithm For Σ Q -formula In developing a QE algorithm for theory T , we need only consider formulae of the form F : ∃ x . 2 x = y , ∃ x . F quantifier-free T Q -equivalent Σ Q -formula is for quantifier-free F . G : ⊤ Example: For Σ-formula For Σ Z -formula G 1 : ∃ x . ∀ y . ∃ z . F 1 [ x , y , z ] F : ∃ x . 2 x = y , � �� � there is no quantifier-free T Z -equivalent Σ Z -formula. F 2 [ x , y ] : ∃ x . ∀ y . F 2 [ x , y ] G 2 Let � T Z be T Z with divisibility predicates | . G 3 : ∃ x . ¬ ∃ y . ¬ F 2 [ x , y ] For � � �� � Σ Z -formula F 3 [ x ] F : ∃ x . 2 x = y , G 4 : ∃ x . ¬ F 3 [ x ] a quantifier-free � T Z -equivalent � Σ Z -formula is � �� � F 4 G : 2 | y . G 5 : F 4 G 5 is quantifier-free and T -equivalent to G 1 Page 3 of 40 Page 4 of 40

  2. Augmented theory � Quantifier Elimination for T Z T Z Σ Z : { . . . , − 2 , − 1 , 0 , 1 , 2 , . . . , − 3 · , − 2 · , 2 · , 3 · , . . . , + , − , = , < } � Σ Z : Σ Z with countable number of unary divisibility predicates Lemma: for k ∈ Z + k | · Given quantifier-free Σ Z -formula F [ y ] s.t. free( F [ y ]) = { y } . Intended interpretations: S represents the set of integers k | x holds iff k divides x without any remainder S : { n ∈ Z : F [ n ] is T Z -valid } . Either S ∩ Z + or Z + \ S is finite. Example: Note: Z + is the set of positive integers. x > 1 ∧ y > 1 ∧ 2 | x + y is satisfiable (choose x = 2 , y = 2). Example: Σ Z -formula F [ y ] : ∃ x . 2 x = y ¬ (2 | x ) ∧ 4 | x S : even integers is not satisfiable. S ∩ Z + : positive even integers — infinite Z + \ S : positive odd integers — infinite Axioms of � T Z : axioms of T Z with additional countable set of Therefore, by the lemma, there is no quantifier-free T Z -formula axioms that is T Z -equivalent to F [ y ]. for k ∈ Z + ∀ x . k | x ↔ ∃ y . x = ky Thus, T Z does not admit QE. Page 5 of 40 Page 6 of 40 � T Z admits QE (Cooper’s method) Cooper’s Method: Step 1 Algorithm: Given � Σ Z -formula Put F [ x ] in Negation Normal Form (NNF) F 1 [ x ], so that ∃ x . F 1 [ x ] ◮ has negations only in literals (only ∧ , ∨ ) ∃ x . F [ x ] , ◮ is � T Z -equivalent to ∃ x . F [ x ] where F is quantifier-free, construct quantifier-free � Σ Z -formula Example: that is equivalent to ∃ x . F [ x ]. 1. Put F[x] into Negation Normal Form (NNF). ∃ x . ¬ ( x − 6 < z − x ∧ 4 | 5 x + 1 → 3 x < y ) 2. Normalize literals: s < t , k | t , or ¬ ( k | t ). is equivalent to 3. Put x in s < t on one side: hx < t or s < hx . 4. Replace hx with x ′ without a factor. ∃ x . x − 6 < z − x ∧ 4 | 5 x + 1 ∧ ¬ (3 x < y ) 5. Replace F [ x ′ ] by � F [ j ] for finitely many j . Note: ¬ ( A ∧ B → C ) ⇔ ( A ∧ B ∧ ¬ C ) Page 7 of 40 Page 8 of 40

  3. Cooper’s Method: Step 2 Cooper’s Method: Step 3 Replace (left to right) Collect terms containing x so that literals have the form s = t ⇔ s < t + 1 ∧ t < s + 1 hx < t , t < hx , k | hx + t , or ¬ ( k | hx + t ) , ¬ ( s = t ) ⇔ s < t ∨ t < s where t is a term (does not contain x ) and h , k ∈ Z + . The output ¬ ( s < t ) ⇔ t < s + 1 is the formula ∃ x . F 3 [ x ], which is � T Z -equivalent to ∃ x . F [ x ]. The output ∃ x . F 2 [ x ] contains only literals of form Example: k | t , or ¬ ( k | t ) , s < t , x + x + y < z + 3 z + 2 y − 4 x 5 | − 7 x + t where s , t are � T Z -terms and k ∈ Z + . ⇓ ⇓ Example: 6 x < 4 z + y 5 | 7 x − t ¬ ( x < y ) ∧ ¬ ( x = y + 3) ⇓ y < x + 1 ∧ ( x < y + 3 ∨ y + 3 < x ) Page 9 of 40 Page 10 of 40 Cooper’s Method: Step 4 I Cooper’s Method: Step 4 II Finally, construct Let 3 [ x ′ ] ∧ δ ′ | x ′ δ ′ = lcm { h : h is a coefficient of x in F 3 [ x ] } , ∃ x ′ . F ′′ � �� � F 4 [ x ′ ] where lcm is the least common multiple. Multiply atoms in F 3 [ x ] by constants so that δ ′ is the coefficient of x everywhere: ∃ x ′ . F 4 [ x ′ ] is equivalent to ∃ x . F [ x ] and each literal of F 4 [ x ′ ] has one of the forms: hx < t ⇔ δ ′ x < h ′ t where h ′ h = δ ′ (A) x ′ < t t < hx ⇔ h ′ t < δ ′ x where h ′ h = δ ′ (B) t < x ′ k | hx + t ⇔ h ′ k | δ ′ x + h ′ t where h ′ h = δ ′ (C) k | x ′ + t ¬ ( h ′ k | δ ′ x + h ′ t ) h ′ h = δ ′ ¬ ( k | hx + t ) ⇔ where (D) ¬ ( k | x ′ + t ) where t is a term that does not contain x , and k ∈ Z + . The result ∃ x . F ′ 3 [ x ], in which all occurrences of x in F ′ 3 [ x ] are in terms δ ′ x . 3 with a fresh variable x ′ to form Replace δ ′ x terms in F ′ F ′′ : F 3 { δ ′ x �→ x ′ } 3 Page 11 of 40 Page 12 of 40

  4. Cooper’s Method: Step 4 III Cooper’s Method: Step 4 IV Example: � T Z -formula Multiply when necessary: ∃ x . 30 x < 15 z + 90 ∧ 10 y − 10 < 30 x ∧ 24 | 30 x + 6 ∃ x . 3 x + 1 > y ∧ 2 x − 6 < z ∧ 4 | 5 x + 1 � �� � Replacing 30 x with fresh x ′ and adding divisibility conjunct: F [ x ] After step 3: ∃ x ′ . x ′ < 15 z + 90 ∧ 10 y − 10 < x ′ ∧ 24 | x ′ + 6 ∧ 30 | x ′ � �� � ∃ x . 2 x < z + 6 ∧ y − 1 < 3 x ∧ 4 | 5 x + 1 F 4 [ x ′ ] � �� � F 3 [ x ] ∃ x ′ . F 4 [ x ′ ] is equivalent to ∃ x . F [ x ]. Collecting coefficients of x (step 4): δ ′ = lcm(2 , 3 , 5) = 30 Multiply when necessary: ∃ x . 30 x < 15 z + 90 ∧ 10 y − 10 < 30 x ∧ 24 | 30 x + 6 Page 13 of 40 Page 14 of 40 Cooper’s Method: Step 5 Intuition of Step 5 I Construct left infinite projection F −∞ [ x ′ ] of F 4 [ x ′ ] by Property (Periodicity) (A) replacing literals x ′ < t by ⊤ if m | δ (B) replacing literals t < x ′ by ⊥ then m | n iff m | n + λδ for all λ ∈ Z That is, m |· cannot distinguish between m | n and m | n + λδ . Idea: very small numbers satisfy (A) literals but not (B) literals By the choice of δ (lcm of the k ’s) — no | literal in F 5 can Let � � k of (C) literals k | x ′ + t distinguish between n and n + λδ , for any λ ∈ Z . δ = lcm k of (D) literals ¬ ( k | x ′ + t ) δ δ � � � F 5 : F −∞ [ j ] ∨ F 4 [ t + j ] and B be the set of terms t appearing in (B) literals of F 4 [ x ′ ]. j =1 j =1 t ∈ B Construct � δ � δ � F 5 : F −∞ [ j ] ∨ F 4 [ t + j ] . j =1 j =1 t ∈ B F 5 is quantifier-free and � T Z -equivalent to ∃ x . F [ x ]. Page 15 of 40 Page 16 of 40

  5. Intuition of Step 5 II Example of Step 5 I ◮ left disjunct � δ j =1 F −∞ [ j ] : Contains only | literals ∃ x . 3 x + 1 > y ∧ 2 x − 6 < z ∧ 4 | 5 x + 1 Asserts: no least n ∈ Z s.t. F 4 [ n ]. � �� � F [ x ] For if there exists n satisfying F −∞ , ⇓ then every n − λδ , for λ ∈ Z + , also satisfies F −∞ ∃ x ′ . x ′ < 15 z + 90 ∧ 10 y − 10 < x ′ ∧ 24 | x ′ + 6 ∧ 30 | x ′ ◮ right disjunct � δ � t ∈ B F 4 [ t + j ] : � �� � j =1 Asserts: There is least n ∈ Z s.t. F 4 [ n ]. F 4 [ x ′ ] For let t ∗ = { largest t | t < x ′ in (B) } . By step 5, If n ∈ Z is s.t. F 4 [ n ], then F −∞ [ x ′ ] : ⊤ ∧ ⊥ ∧ 24 | x ′ + 6 ∧ 30 | x ′ , ∃ j (1 ≤ j ≤ δ ) . t ∗ + j ≤ n ∧ F 4 [ t ∗ + j ] which simplifies to ⊥ . In other words, if there is a solution, then one must appear in δ interval to the right of t ∗ Page 17 of 40 Page 18 of 40 Example of Step 5 II Cooper’s Method: Example I Compute ∃ x . (3 x + 1 < 10 ∨ 7 x − 6 > 7) ∧ 2 | x δ = lcm { 24 , 30 } = 120 and B = { 10 y − 10 } . � �� � F [ x ] Then replacing x ′ by 10 y − 10 + j in F 4 [ x ′ ] produces Isolate x terms � � 120 � 10 y − 10 + j < 15 z + 90 ∧ 10 y − 10 < 10 y − 10 + j ∃ x . (3 x < 9 ∨ 13 < 7 x ) ∧ 2 | x , F 5 : ∧ 24 | 10 y − 10 + j + 6 ∧ 30 | 10 y − 10 + j j =1 so δ ′ = lcm { 3 , 7 } = 21 . which simplifies to After multiplying coefficients by proper constants, � � 120 � 10 y + j < 15 z + 100 ∧ ✘✘ 0 < j ✘ F 5 : . ∃ x . (21 x < 63 ∨ 39 < 21 x ) ∧ 42 | 21 x , ∧ 24 | 10 y + j − 4 ∧ 30 | 10 y − 10 + j j =1 we replace 21 x by x ′ : F 5 is quantifier-free and � T Z -equivalent to ∃ x . F [ x ]. ∃ x ′ . ( x ′ < 63 ∨ 39 < x ′ ) ∧ 42 | x ′ ∧ 21 | x ′ . � �� � F 4 [ x ′ ] Page 19 of 40 Page 20 of 40

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend