cs156 the calculus of
play

CS156: The Calculus of Signature T - set of constant, function, and - PowerPoint PPT Presentation

First-Order Theories I First-order theory T consists of CS156: The Calculus of Signature T - set of constant, function, and predicate symbols Computation Set of axioms A T - set of closed (no free variables) Zohar Manna T -formulae


  1. First-Order Theories I First-order theory T consists of CS156: The Calculus of ◮ Signature Σ T - set of constant, function, and predicate symbols Computation ◮ Set of axioms A T - set of closed (no free variables) Zohar Manna Σ T -formulae Winter 2010 A Σ T -formula is a formula constructed of constants, functions, and predicate symbols from Σ T , and variables, logical connectives, and quantifiers. The symbols of Σ T are just symbols without prior meaning — the axioms of T provide their meaning. Chapter 3: First-Order Theories Page 1 of 31 Page 2 of 31 First-Order Theories II Fragments of Theories A Σ T -formula F is valid in theory T ( T -valid, also T | = F ), A fragment of theory T is a syntactically-restricted subset of iff every interpretation I that satisfies the axioms of T , formulae of the theory. i.e. I | = A for every A ∈ A T ( T -interpretation) Example: a quantifier-free fragment of theory T is the set of also satisfies F , quantifier-free formulae in T . i.e. I | = F A theory T is decidable if T | = F ( T -validity) is decidable for A Σ T -formula F is satisfiable in T ( T -satisfiable), if there is a every Σ T -formula F ; T -interpretation (i.e. satisfies all the axioms of T ) that satisfies F i.e., there is an algorithm that always terminate with “yes”, if F is T -valid, and “no”, if F is T -invalid. Two formulae F 1 and F 2 are equivalent in T ( T -equivalent), iff T | = F 1 ↔ F 2 , A fragment of T is decidable if T | = F is decidable for every i.e. if for every T -interpretation I , I | = F 1 iff I | = F 2 Σ T -formula F obeying the syntactic restriction. Note: ◮ I | = F stands for “ F true under interpretation I ” ◮ T | = F stands for “ F is valid in theory T ” Page 3 of 31 Page 4 of 31

  2. Theory of Equality T E I Theory of Equality T E II 5. for each positive integer n and n -ary predicate symbol p , Signature: ∀ x 1 , . . . , x n , y 1 , . . . , y n . � i x i = y i → ( p ( x 1 , . . . , x n ) ↔ p ( y 1 , . . . , y n )) (predicate congruence) Σ = : { = , a , b , c , · · · , f , g , h , · · · , p , q , r , · · · } (function) and (predicate) are axiom schemata. consists of Example: ◮ =, a binary predicate, interpreted with meaning provided by (function) for binary function f for n = 2: axioms ◮ all constant, function, and predicate symbols ∀ x 1 , x 2 , y 1 , y 2 . x 1 = y 1 ∧ x 2 = y 2 → f ( x 1 , x 2 ) = f ( y 1 , y 2 ) Axioms of T E (predicate) for unary predicate p for n = 1: 1. ∀ x . x = x (reflexivity) ∀ x , y . x = y → ( p ( x ) ↔ p ( y )) 2. ∀ x , y . x = y → y = x (symmetry) 3. ∀ x , y , z . x = y ∧ y = z → x = z (transitivity) Note: we omit “congruence” for brevity. 4. for each positive integer n and n -ary function symbol f , ∀ x 1 , . . . , x n , y 1 , . . . , y n . � i x i = y i → f ( x 1 , . . . , x n ) = f ( y 1 , . . . , y n ) (function congruence) Page 5 of 31 Page 6 of 31 Decidability of T E I Decidability of T E II Suppose not; then there exists a T E -interpretation I such that T E is undecidable. I �| = F . Then, The quantifier-free fragment of T E is decidable. Very efficient algorithm. 1 . I �| = F assumption 2 . I = | a = b ∧ b = c 1, → Semantic argument method can be used for T E 3 . I = �| g ( f ( a ) , b ) = g ( f ( c ) , a ) 1, → Example: Prove 4 . | = a = b 2, ∧ I 5 . I | = b = c 2, ∧ F : a = b ∧ b = c → g ( f ( a ) , b ) = g ( f ( c ) , a ) 6 . I = | a = c 4, 5, (transitivity) is T E -valid. 7 . I | = f ( a ) = f ( c ) 6, (function) 8 . = | b = a 4, (symmetry) I 9 . I | = g ( f ( a ) , b ) = g ( f ( c ) , a ) 7, 8, (function) 10 . I | = ⊥ 3, 9 contradictory F is T E -valid. Page 7 of 31 Page 8 of 31

  3. Natural Numbers and Integers 1. Peano Arithmetic T PA (first-order arithmetic) Natural numbers N = { 0 , 1 , 2 , · · · } Σ PA : { 0 , 1 , + , · , = } Integers Z = {· · · , − 2 , − 1 , 0 , 1 , 2 , · · · } Equality Axioms: (reflexivity), (symmetry), (transitivity), Three variations: (function) for +, (function) for · . ◮ Peano arithmetic T PA : natural numbers with addition, And the axioms: multiplication, = 1. ∀ x . ¬ ( x + 1 = 0) (zero) ◮ Presburger arithmetic T N : natural numbers with addition, = ◮ Theory of integers T Z : integers with + , − , >, =, 2. ∀ x , y . x + 1 = y + 1 → x = y (successor) multiplication by constants 3. F [0] ∧ ( ∀ x . F [ x ] → F [ x + 1]) → ∀ x . F [ x ] (induction) 4. ∀ x . x + 0 = x (plus zero) 5. ∀ x , y . x + ( y + 1) = ( x + y ) + 1 (plus successor) 6. ∀ x . x · 0 = 0 (times zero) 7. ∀ x , y . x · ( y + 1) = x · y + x (times successor) Line 3 is an axiom schema. Page 9 of 31 Page 10 of 31 Example: 3 x + 5 = 2 y can be written using Σ PA as Decidability of Peano Arithmetic T PA is undecidable. (G¨ odel, Turing, Post, Church) x + x + x + 1 + 1 + 1 + 1 + 1 = y + y The quantifier-free fragment of T PA is undecidable. Note: we have > and ≥ since (Matiyasevich, 1970) 3 x + 5 > 2 y write as ∃ z . z � = 0 ∧ 3 x + 5 = 2 y + z Remark: G¨ odel’s first incompleteness theorem 3 x + 5 ≥ 2 y write as ∃ z . 3 x + 5 = 2 y + z Peano arithmetic T PA does not capture true arithmetic: Example: There exist closed Σ PA -formulae representing valid propositions of number theory that are not T PA -valid. Existence of pythagorean triples ( F is T PA -valid): The reason: T PA actually admits nonstandard interpretations . F : ∃ x , y , z . x � = 0 ∧ y � = 0 ∧ z � = 0 ∧ x · x + y · y = z · z For decidability: no multiplication Page 11 of 31 Page 12 of 31

  4. 2. Presburger Arithmetic T N 3. Theory of Integers T Z Signature: Signature Σ N : { 0 , 1 , + , = } no multiplication! Σ Z : { . . . , − 2 , − 1 , 0 , 1 , 2 , . . . , − 3 · , − 2 · , 2 · , 3 · , . . . , + , − , >, = } Axioms of T N (equality axioms, with 1-5): where 1. ∀ x . ¬ ( x + 1 = 0) (zero) ◮ . . . , − 2 , − 1 , 0 , 1 , 2 , . . . are constants 2. ∀ x , y . x + 1 = y + 1 → x = y (successor) ◮ . . . , − 3 · , − 2 · , 2 · , 3 · , . . . are unary functions 3. F [0] ∧ ( ∀ x . F [ x ] → F [ x + 1]) → ∀ x . F [ x ] (induction) (intended meaning: 2 · x is x + x , − 3 · x is − x − x − x ) 4. ∀ x . x + 0 = x (plus zero) ◮ + , − , >, = have the usual meanings. 5. ∀ x , y . x + ( y + 1) = ( x + y ) + 1 (plus successor) Relation between T Z and T N : Line 3 is an axiom schema. T Z and T N have the same expressiveness: ◮ For every Σ Z -formula there is an equisatisfiable Σ N -formula. ◮ For every Σ N -formula there is an equisatisfiable Σ Z -formula. T N -satisfiability (and thus T N -validity) is decidable Σ Z -formula F and Σ N -formula G are equisatisfiable iff: (Presburger, 1929) F is T Z -satisfiable iff G is T N -satisfiable Page 13 of 31 Page 14 of 31 Σ Z -formula to Σ N -formula I Σ Z -formula to Σ N -formula II Eliminate > and numbers: Example: consider the Σ Z -formula ∀ w p , w n , x p , x n . ∃ y p , y n , z p , z n . ∃ u . F 0 : ∀ w , x . ∃ y , z . x + 2 y − z − 7 > − 3 w + 4 . ¬ ( u = 0) ∧ x p + y p + y p + z n + w p + w p + w p F 3 : Introduce two variables, v p and v n (range over the nonnegative = x n + y n + y n + z p + w n + w n + w n + u integers) for each variable v (range over the integers) of F 0 : + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 ∀ w p , w n , x p , x n . ∃ y p , y n , z p , z n . which is a Σ N -formula equisatisfiable to F 0 . F 1 : ( x p − x n ) + 2( y p − y n ) − ( z p − z n ) − 7 > − 3( w p − w n ) + 4 To decide T Z -validity for a Σ Z -formula F : Eliminate − by moving to the other side of > : ◮ transform ¬ F to an equisatisfiable Σ N -formula ¬ G , ∀ w p , w n , x p , x n . ∃ y p , y n , z p , z n . ◮ decide T N -validity of G . F 2 : x p + 2 y p + z n + 3 w p > x n + 2 y n + z p + 7 + 3 w n + 4 Page 15 of 31 Page 16 of 31

  5. Σ Z -formula to Σ N -formula III Rationals and Reals Example: The Σ N -formula Signatures: Σ Q = { 0 , 1 , + , − , = , ≥} ∀ x . ∃ y . x = y + 1 Σ R = Σ Q ∪ {·} is equisatisfiable to the Σ Z -formula: ◮ Theory of Reals T R (with multiplication) √ ∀ x . x > − 1 → ∃ y . y > − 1 ∧ x = y + 1 . x · x = 2 ⇒ x = ± 2 ◮ Theory of Rationals T Q (no multiplication) x = 7 2 x = 7 ⇒ 2 ���� x + x Note: strict inequality okay; simply rewrite x + y > z as follows: ¬ ( x + y = z ) ∧ x + y ≥ z Page 17 of 31 Page 18 of 31 1. Theory of Reals T R 2. Theory of Rationals T Q Signature: Signature: Σ R : { 0 , 1 , + , − , · , = , ≥} Σ Q : { 0 , 1 , + , − , = , ≥} with multiplication. Axioms in text. without multiplication. Axioms in text. Example: Rational coefficients are simple to express in T Q . ∀ a , b , c . b 2 − 4 ac ≥ 0 ↔ ∃ x . ax 2 + bx + c = 0 Example: Rewrite 1 2 x + 2 3 y ≥ 4 is T R -valid. as the Σ Q -formula T R is decidable (Tarski, 1930) 3 x + 4 y ≥ 24 High time complexity T Q is decidable Quantifier-free fragment of T Q is efficiently decidable Page 19 of 31 Page 20 of 31

Recommend


More recommend