CS156: The Calculus of Computation

Size: px
Start display at page:

Download "CS156: The Calculus of Computation"

Transcription

1 Page 1 of 31 CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 3: First-Order Theories

2 Page 2 of 31 First-Order Theories I First-order theory T consists of Signature Σ T - set of constant, function, and predicate symbols Set of axioms A T - set of closed (no free variables) Σ T -formulae 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.

3 Page 3 of 31 First-Order Theories II A Σ T -formula F is valid in theory T (T-valid, also T = F), iff every interpretation I that satisfies the axioms of T, i.e. I = A for every A A T (T-interpretation) also satisfies F, i.e. I = F A Σ T -formula F is satisfiable in T (T-satisfiable), if there is a T-interpretation (i.e. satisfies all the axioms of T) that satisfies F Two formulae F 1 and F 2 are equivalent in T (T-equivalent), iff T = F 1 F 2, i.e. if for every T-interpretation I, I = F 1 iff I = F 2 Note: I = F stands for F true under interpretation I T = F stands for F is valid in theory T

4 Page 4 of 31 Fragments of Theories A fragment of theory T is a syntactically-restricted subset of formulae of the theory. Example: a quantifier-free fragment of theory T is the set of quantifier-free formulae in T. A theory T is decidable if T = F (T-validity) is decidable for every Σ T -formula F; i.e., there is an algorithm that always terminate with yes, if F is T-valid, and no, if F is T-invalid. A fragment of T is decidable if T = F is decidable for every Σ T -formula F obeying the syntactic restriction.

5 Page 5 of 31 Theory of Equality T E I Signature: consists of Σ = : {=, a, b, c,, f, g, h,, p, q, r, } =, a binary predicate, interpreted with meaning provided by axioms all constant, function, and predicate symbols Axioms of T E 1. x. x = x (reflexivity) 2. x, y. x = y y = x (symmetry) 3. x, y, z. x = y y = z x = z (transitivity) 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)

6 Page 6 of 31 Theory of Equality T E II 5. for each positive integer n and n-ary predicate symbol p, 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) (function) and (predicate) are axiom schemata. Example: (function) for binary function f for n = 2: 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 ) (predicate) for unary predicate p for n = 1: x, y. x = y (p(x) p(y)) Note: we omit congruence for brevity.

7 Page 7 of 31 Decidability of T E I T E is undecidable. The quantifier-free fragment of T E is decidable. Very efficient algorithm. Semantic argument method can be used for T E Example: Prove F : a = b b = c g(f (a), b) = g(f (c), a) is T E -valid.

8 Page 8 of 31 Decidability of T E II Suppose not; then there exists a T E -interpretation I such that I = F. Then, 1. I = F assumption 2. I = a = b b = c 1, 3. I = g(f (a), b) = g(f (c), a) 1, 4. I = a = b 2, 5. I = b = c 2, 6. I = a = c 4, 5, (transitivity) 7. I = f (a) = f (c) 6, (function) 8. I = b = a 4, (symmetry) 9. I = g(f (a), b) = g(f (c), a) 7, 8, (function) 10. I = 3, 9 contradictory F is T E -valid.

9 Page 9 of 31 Natural Numbers and Integers Natural numbers N = {0, 1, 2, } Integers Z = {, 2, 1, 0, 1, 2, } Three variations: Peano arithmetic T PA : natural numbers with addition, multiplication, = Presburger arithmetic T N : natural numbers with addition, = Theory of integers T Z : integers with +,, >,=, multiplication by constants

10 Page 10 of Peano Arithmetic T PA (first-order arithmetic) Σ PA : {0, 1, +,, =} Equality Axioms: (reflexivity), (symmetry), (transitivity), (function) for +, (function) for. And the axioms: 1. x. (x + 1 = 0) (zero) 2. x, y. x + 1 = y + 1 x = y (successor) 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.

11 Page 11 of 31 Example: 3x + 5 = 2y can be written using Σ PA as x + x + x = y + y Note: we have > and since 3x + 5 > 2y write as z. z 0 3x + 5 = 2y + z 3x + 5 2y write as z. 3x + 5 = 2y + z Example: Existence of pythagorean triples (F is T PA -valid): F : x, y, z. x 0 y 0 z 0 x x + y y = z z

12 Page 12 of 31 Decidability of Peano Arithmetic T PA is undecidable. (Gödel, Turing, Post, Church) The quantifier-free fragment of T PA is undecidable. (Matiyasevich, 1970) Remark: Gödel s first incompleteness theorem Peano arithmetic T PA does not capture true arithmetic: There exist closed Σ PA -formulae representing valid propositions of number theory that are not T PA -valid. The reason: T PA actually admits nonstandard interpretations. For decidability: no multiplication

13 Page 13 of Presburger Arithmetic T N Signature Σ N : {0, 1, +, =} no multiplication! Axioms of T N (equality axioms, with 1-5): 1. x. (x + 1 = 0) (zero) 2. x, y. x + 1 = y + 1 x = y (successor) 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) Line 3 is an axiom schema. T N -satisfiability (and thus T N -validity) is decidable (Presburger, 1929)

14 Page 14 of Theory of Integers T Z Signature: Σ Z : {..., 2, 1, 0, 1, 2,..., 3, 2, 2, 3,..., +,, >, =} where..., 2, 1, 0, 1, 2,... are constants..., 3, 2, 2, 3,... are unary functions (intended meaning: 2 x is x + x, 3 x is x x x) +,, >,= have the usual meanings. Relation between T Z and T N : 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. Σ Z -formula F and Σ N -formula G are equisatisfiable iff: F is T Z -satisfiable iff G is T N -satisfiable

15 Page 15 of 31 Σ Z -formula to Σ N -formula I Example: consider the Σ Z -formula F 0 : w, x. y, z. x + 2y z 7 > 3w + 4. Introduce two variables, v p and v n (range over the nonnegative integers) for each variable v (range over the integers) of F 0 : F 1 : w p, w n, x p, x n. y p, y n, z p, z n. (x p x n ) + 2(y p y n ) (z p z n ) 7 > 3(w p w n ) + 4 Eliminate by moving to the other side of >: F 2 : w p, w n, x p, x n. y p, y n, z p, z n. x p + 2y p + z n + 3w p > x n + 2y n + z p w n + 4

16 Page 16 of 31 Σ Z -formula to Σ N -formula II Eliminate > and numbers: w p, w n, x p, x n. y p, y n, z p, z n. u. F 3 : (u = 0) x p + y p + y p + z n + w p + w p + w p = x n + y n + y n + z p + w n + w n + w n + u which is a Σ N -formula equisatisfiable to F 0. To decide T Z -validity for a Σ Z -formula F: transform F to an equisatisfiable Σ N -formula G, decide T N -validity of G.

17 Page 17 of 31 Σ Z -formula to Σ N -formula III Example: The Σ N -formula x. y. x = y + 1 is equisatisfiable to the Σ Z -formula: x. x > 1 y. y > 1 x = y + 1.

18 Rationals and Reals Signatures: Σ Q = {0, 1, +,, =, } Σ R = Σ Q { } Theory of Reals T R (with multiplication) x x = 2 x = ± 2 Theory of Rationals T Q (no multiplication) }{{} 2x = 7 x = 7 2 x+x Note: strict inequality okay; simply rewrite as follows: x + y > z (x + y = z) x + y z Page 18 of 31

19 Page 19 of Theory of Reals T R Signature: Σ R : {0, 1, +,,, =, } with multiplication. Axioms in text. Example: is T R -valid. a, b, c. b 2 4ac 0 x. ax 2 + bx + c = 0 T R is decidable (Tarski, 1930) High time complexity

20 Page 20 of Theory of Rationals T Q Signature: Σ Q : {0, 1, +,, =, } without multiplication. Axioms in text. Rational coefficients are simple to express in T Q. Example: Rewrite as the Σ Q -formula 1 2 x y 4 3x + 4y 24 T Q is decidable Quantifier-free fragment of T Q is efficiently decidable

21 Page 21 of 31 Recursive Data Structures (RDS) I Tuples of variables where the elements can be instances of the same structure: e.g., linked lists or trees. 1. Theory T cons (LISP-like lists) Signature: where Σ cons : {cons, car, cdr, atom, =} cons(a, b) list constructed by concatenating a and b car(x) left projector of x: car(cons(a, b)) = a cdr(x) right projector of x: cdr(cons(a, b)) = b atom(x) true iff x is a single-element list Note: an atom is simply something that is not a cons. In this formulation, there is no NIL value.

22 Page 22 of 31 Recursive Data Structures (RDS) II Axioms: 1. The axioms of reflexivity, symmetry, and transitivity of = 2. Function Congruence axioms x 1, x 2, y 1, y 2. x 1 = x 2 y 1 = y 2 cons(x 1, y 1 ) = cons(x 2, y 2 ) x, y. x = y car(x) = car(y) x, y. x = y cdr(x) = cdr(y)

23 Page 23 of Predicate Congruence axiom x, y. x = y (atom(x) atom(y)) 4. x, y. car(cons(x, y)) = x (left projection) 5. x, y. cdr(cons(x, y)) = y (right projection) 6. x. atom(x) cons(car(x), cdr(x)) = x (construction) 7. x, y. atom(cons(x, y)) (atom) Note: the behavior of car and cons on atoms is not specified. T cons is undecidable Quantifier-free fragment of T cons is efficiently decidable

24 Lists with equality 2. Theory T E cons (lists with equality theory) Signature: T E cons = T E T cons Σ E Σ cons (this includes uninterpreted constants, functions, and predicates) Axioms: union of the axioms of T E and T cons T E cons is undecidable Quantifier-free fragment of T E cons is efficiently decidable Example: The Σ E cons-formula F : car(x) = car(y) cdr(x) = cdr(y) atom(x) atom(y) f (x) = f (y) is T E cons-valid. Page 24 of 31

25 Suppose not; then there exists a T E cons-interpretation I such that I = F. Then, 1. I = F assumption 2. I = car(x) = car(y) 1,, 3. I = cdr(x) = cdr(y) 1,, 4. I = atom(x) 1,, 5. I = atom(y) 1,, 6. I = f (x) = f (y) 1, 7. I = cons(car(x), cdr(x)) = cons(car(y), cdr(y)) 2, 3, (function) 8. I = cons(car(x), cdr(x)) = x 4, (construction) 9. I = cons(car(y), cdr(y)) = y 5, (construction) 10. I = x = y 7, 8, 9, (transitivity) 11. I = f (x) = f (y) 10, (function) Lines 6 and 11 are contradictory, so our assumption that I = F must be wrong. Therefore, F is T E cons-valid. Page 25 of 31

26 Page 26 of 31 Theory of Arrays T A Signature: Σ A : { [ ],, =} where a[i] binary function read array a at index i ( read(a,i) ) a i v ternary function write value v to index i of array a ( write(a,i,v) ) Axioms 1. the axioms of (reflexivity), (symmetry), and (transitivity) of T E 2. a, i, j. i = j a[i] = a[j] (array congruence) 3. a, v, i, j. i = j a i v [j] = v (read-over-write 1) 4. a, v, i, j. i j a i v [j] = a[j] (read-over-write 2)

27 Page 27 of 31 Note: = is only defined for array elements not T A -valid, but is T A -valid. Also F : a[i] = e a i e = a F : a[i] = e j. a i e [j] = a[j], a = b a[i] = b[i] is not T A -valid: We have only axiomatized a restricted congruence. T A is undecidable Quantifier-free fragment of T A is decidable

28 Page 28 of Theory of Arrays T = A (with extensionality) Signature and axioms of T = A are the same as T A, with one additional axiom a, b. ( i. a[i] = b[i]) a = b (extensionality) Example: is T = A -valid. F : a[i] = e a i e = a T A = is undecidable Quantifier-free fragment of T A = is decidable

29 Page 29 of 31 First-Order Theories Quantifiers QFF Theory Decidable Decidable T E Equality T PA Peano Arithmetic T N Presburger Arithmetic T Z Linear Integer Arithmetic T R Real Arithmetic T Q Linear Rationals T cons Lists Tcons E Lists with Equality

30 Page 30 of 31 Combination of Theories How do we show that 1 x x 2 f (x) f (1) f (x) f (2) is (T E T Z )-satisfiable? Or how do we prove properties about an array of integers, or a list of reals...? Given theories T 1 and T 2 such that Σ 1 Σ 2 = {=} The combined theory T 1 T 2 has signature Σ 1 Σ 2 axioms A 1 A 2

31 Page 31 of 31 Nelson & Oppen showed that, if satisfiability of the quantifier-free fragment (qff) of T 1 is decidable, satisfiability of qff of T 2 is decidable, and certain technical simple requirements are met, then satisfiability of qff of T 1 T 2 is decidable.

CS156: The Calculus of Computation Zohar Manna Winter 2010

CS156: The Calculus of Computation Zohar Manna Winter 2010 Page 3 of 31 Page 4 of 31 CS156: The Calculus of Computation Zohar Manna Winter 2010 First-Order Theories I First-order theory T consists of Signature ΣT - set of constant, function, and predicate symbols

More information

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory Motivation CS389L: Automated Logical Reasoning Lecture 10: Overview of First-Order Theories Işıl Dillig Last few lectures: Full first-order logic In FOL, functions/predicates are uninterpreted (i.e., structure

More information

9. Quantifier-free Equality and Data Structures

9. Quantifier-free Equality and Data Structures 9. Quantifier-free Equality and Data Structures The Theory of Equality T E Σ E : {=, a, b, c,..., f, g, h,..., p, q, r,...} uninterpreted symbols: constants a, b, c,... functions f, g, h,... predicates

More information

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Winter Term 2015/16

Decision Procedures. Jochen Hoenicke. Software Engineering Albert-Ludwigs-University Freiburg. Winter Term 2015/16 Decision Procedures Jochen Hoenicke Software Engineering Albert-Ludwigs-University Freiburg Winter Term 2015/16 Jochen Hoenicke (Software Engineering) Decision Procedures Winter Term 2015/16 1 / 436 Organisation

More information

Satisfiability Modulo Theories (SMT)

Satisfiability Modulo Theories (SMT) CS510 Software Engineering Satisfiability Modulo Theories (SMT) Slides modified from those by Aarti Gupta Textbook: The Calculus of Computation by A. Bradley and Z. Manna 1 Satisfiability Modulo Theory

More information

Decision Procedures for Verification

Decision Procedures for Verification Decision Procedures for Verification Zohar Manna with Aaron R. Bradley Computer Science Department Stanford University 1 Motivation int[] BubbleSort(int[] a) { int i, j, t; for (i := a 1; i > 0; i := i

More information

03 Review of First-Order Logic

03 Review of First-Order Logic CAS 734 Winter 2014 03 Review of First-Order Logic William M. Farmer Department of Computing and Software McMaster University 18 January 2014 What is First-Order Logic? First-order logic is the study of

More information

First Order Logic (FOL)

First Order Logic (FOL) First Order Logic (FOL) Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel based on slides by Prof. Ruzica Piskac, Nikolaj Bjorner, and others References Chpater 2 of Logic for

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation Page 1 of 37 CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 4: Induction Page 2 of 37 Induction Stepwise induction (for T PA, T cons ) Complete induction (for T PA, T cons ) Theoretically

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

CS156: The Calculus of Computation Zohar Manna Winter 2010

CS156: The Calculus of Computation Zohar Manna Winter 2010 Page 3 of 35 Page 4 of 35 quantifiers CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 2: First-Order Logic (FOL) existential quantifier x. F [x] there exists an x such that F [x] Note:

More information

The Calculus of Computation: Decision Procedures with Applications to Verification. by Aaron Bradley Zohar Manna. Springer 2007

The Calculus of Computation: Decision Procedures with Applications to Verification. by Aaron Bradley Zohar Manna. Springer 2007 The Calculus of Computation: Decision Procedures with Applications to Verification by Aaron Bradley Zohar Manna Springer 2007 Part I: Foundations 1. Propositional Logic (1) 2. First-Order Logic (2) 3.

More information

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now CSC 438F/2404F Notes (S. Cook) Fall, 2008 Peano Arithmetic Goals Now 1) We will introduce a standard set of axioms for the language L A. The theory generated by these axioms is denoted PA and called Peano

More information

Syntax and Semantics. The integer arithmetic (IA) is the first order theory of integer numbers. The alphabet of the integer arithmetic consists of:

Syntax and Semantics. The integer arithmetic (IA) is the first order theory of integer numbers. The alphabet of the integer arithmetic consists of: Integer Arithmetic Syntax and Semantics The integer arithmetic (IA) is the first order theory of integer numbers. The alphabet of the integer arithmetic consists of: function symbols +,,s (s is the successor

More information

2.2 Lowenheim-Skolem-Tarski theorems

2.2 Lowenheim-Skolem-Tarski theorems Logic SEP: Day 1 July 15, 2013 1 Some references Syllabus: http://www.math.wisc.edu/graduate/guide-qe Previous years qualifying exams: http://www.math.wisc.edu/ miller/old/qual/index.html Miller s Moore

More information

Predicate Logic - Undecidability

Predicate Logic - Undecidability CS402, Spring 2016 Undecidable Problems Does the following program halts? (1) N : n, total, x, y, z (2) n GetUserInput() (3) total 3 (4) while true (5) for x 1 to total 2 (6) for y 1 to total x 1 (7) z

More information

Decision Procedures for Term Algebras with Integer Constraints

Decision Procedures for Term Algebras with Integer Constraints Decision Procedures for Term Algebras with Integer Constraints Ting Zhang, Henny B. Sipma, and Zohar Manna 1 Computer Science Department, Stanford University Abstract Term algebras can model recursive

More information

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem Valentine Kabanets October 27, 2016 1 Gödel s Second Incompleteness Theorem 1.1 Consistency We say that a proof system P is consistent

More information

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO

More information

First-Order Logic (FOL)

First-Order Logic (FOL) First-Order Logic (FOL) Also called Predicate Logic or Predicate Calculus 2. First-Order Logic (FOL) FOL Syntax variables x, y, z, constants a, b, c, functions f, g, h, terms variables, constants or n-ary

More information

Informal Statement Calculus

Informal Statement Calculus FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example

More information

A Reduction Approach to Decision Procedures

A Reduction Approach to Decision Procedures A Reduction Approach to Decision Procedures Deepak Kapur and Calogero G. Zarba University of New Mexico Abstract. We present an approach for designing decision procedures based on the reduction of complex

More information

Rewrite-Based Satisfiability Procedures for Recursive Data Structures

Rewrite-Based Satisfiability Procedures for Recursive Data Structures Rewrite-Based Satisfiability Procedures for Recursive Data Structures Maria Paola Bonacina and Mnacho Echenim Dipartimento di Informatica Università degli Studi di Verona, Italy Abstract The superposition

More information

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P. First-Order Logic Syntax The alphabet of a first-order language is organised into the following categories. Logical connectives:,,,,, and. Auxiliary symbols:.,,, ( and ). Variables: we assume a countable

More information

Part 2: First-Order Logic

Part 2: First-Order Logic Part 2: First-Order Logic First-order logic formalizes fundamental mathematical concepts is expressive (Turing-complete) is not too expressive (e. g. not axiomatizable: natural numbers, uncountable sets)

More information

Deductive Verification

Deductive Verification Deductive Verification Mooly Sagiv Slides from Zvonimir Rakamaric First-Order Logic A formal notation for mathematics, with expressions involving Propositional symbols Predicates Functions and constant

More information

CS156: The Calculus of Computation Zohar Manna Autumn 2008

CS156: The Calculus of Computation Zohar Manna Autumn 2008 Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)

More information

Chapter 3. Formal Number Theory

Chapter 3. Formal Number Theory Chapter 3. Formal Number Theory 1. An Axiom System for Peano Arithmetic (S) The language L A of Peano arithmetic has a constant 0, a unary function symbol, a binary function symbol +, binary function symbol,

More information

Notation for Logical Operators:

Notation for Logical Operators: Notation for Logical Operators: always true always false... and...... or... if... then...... if-and-only-if... x:x p(x) x:x p(x) for all x of type X, p(x) there exists an x of type X, s.t. p(x) = is equal

More information

Herbrand Theorem, Equality, and Compactness

Herbrand Theorem, Equality, and Compactness CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Herbrand Theorem, Equality, and Compactness The Herbrand Theorem We now consider a complete method for proving the unsatisfiability of sets of first-order

More information

Friendly Logics, Fall 2015, Lecture Notes 1

Friendly Logics, Fall 2015, Lecture Notes 1 Friendly Logics, Fall 2015, Lecture Notes 1 Val Tannen 1 Some references Course Web Page: http://www.cis.upenn.edu/~val/cis682. I have posted there the remarkable On the Unusual Effectiveness of Logic

More information

From Constructibility and Absoluteness to Computability and Domain Independence

From Constructibility and Absoluteness to Computability and Domain Independence From Constructibility and Absoluteness to Computability and Domain Independence Arnon Avron School of Computer Science Tel Aviv University, Tel Aviv 69978, Israel aa@math.tau.ac.il Abstract. Gödel s main

More information

Final Exam (100 points)

Final Exam (100 points) Final Exam (100 points) Honor Code: Each question is worth 10 points. There is one bonus question worth 5 points. In contrast to the homework assignments, you may not collaborate on this final exam. You

More information

Predicate Logic: Sematics Part 1

Predicate Logic: Sematics Part 1 Predicate Logic: Sematics Part 1 CS402, Spring 2018 Shin Yoo Predicate Calculus Propositional logic is also called sentential logic, i.e. a logical system that deals with whole sentences connected with

More information

07 Equational Logic and Algebraic Reasoning

07 Equational Logic and Algebraic Reasoning CAS 701 Fall 2004 07 Equational Logic and Algebraic Reasoning Instructor: W. M. Farmer Revised: 17 November 2004 1 What is Equational Logic? Equational logic is first-order logic restricted to languages

More information

Arithmetic Integration of Decision Procedures (Special University Ph.D. Oral Examination)

Arithmetic Integration of Decision Procedures (Special University Ph.D. Oral Examination) Arithmetic Integration of Decision Procedures (Special University Ph.D. Oral Examination) Ting Zhang Advisor: Prof. Zohar Manna Stanford University December 7, 2005 STeP Group, January 7, 2006 Special

More information

COLORS MAKE THEORIES HARD

COLORS MAKE THEORIES HARD DISI - Via Sommarive, 9-38123 POVO, Trento - Italy http://disi.unitn.it COLORS MAKE THEORIES HARD Roberto Sebastiani First version: February 1 2016, Latest update: July 25, 2016 Technical Report # DISI-16-001

More information

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak Computer-Aided Reasoning for Software CSE507 Satisfiability Modulo Theories courses.cs.washington.edu/courses/cse507/18sp/ Emina Torlak emina@cs.washington.edu Today Last lecture Practical applications

More information

PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2

PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2 PREDICATE LOGIC: UNDECIDABILITY AND INCOMPLETENESS HUTH AND RYAN 2.5, SUPPLEMENTARY NOTES 2 Neil D. Jones DIKU 2005 14 September, 2005 Some slides today new, some based on logic 2004 (Nils Andersen) OUTLINE,

More information

Propositional and Predicate Logic - XIII

Propositional and Predicate Logic - XIII Propositional and Predicate Logic - XIII Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - XIII WS 2016/2017 1 / 22 Undecidability Introduction Recursive

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 7: Procedures for First-Order Theories, Part 1

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 7: Procedures for First-Order Theories, Part 1 Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 7: Procedures for First-Order Theories, Part 1 Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Theory Procedures

More information

Handbook of Logic and Proof Techniques for Computer Science

Handbook of Logic and Proof Techniques for Computer Science Steven G. Krantz Handbook of Logic and Proof Techniques for Computer Science With 16 Figures BIRKHAUSER SPRINGER BOSTON * NEW YORK Preface xvii 1 Notation and First-Order Logic 1 1.1 The Use of Connectives

More information

Theory of Computation

Theory of Computation Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation / Lecture 3: Overview Decidability of Logical Theories Presburger arithmetic Decidability of Presburger Arithmetic Dr.

More information

23.1 Gödel Numberings and Diagonalization

23.1 Gödel Numberings and Diagonalization Applied Logic Lecture 23: Unsolvable Problems in Logic CS 4860 Spring 2009 Tuesday, April 14, 2009 The fact that Peano Arithmetic is expressive enough to represent all computable functions means that some

More information

Decision Procedures for Recursive Data Structures with Integer Constraints

Decision Procedures for Recursive Data Structures with Integer Constraints Decision Procedures for Recursive Data Structures with Integer Constraints Ting Zhang, Henny B. Sipma, Zohar Manna Computer Science Department Stanford University Stanford, CA 94305-9045 {tingz,sipma,zm}@theory.stanford.edu

More information

Part I: Foundations. The Calculus of Computation: Decision Procedures with Applications to Verification. by Aaron Bradley Zohar Manna.

Part I: Foundations. The Calculus of Computation: Decision Procedures with Applications to Verification. by Aaron Bradley Zohar Manna. Part I: Foundations The Calculus of Computation: Decision Procedures with Applications to Verification by Aaron Bradley Zohar Manna 1. Propositional Logic (1) 2. First-Order Logic (2) 3. First-Order Theories

More information

Part II Logic and Set Theory

Part II Logic and Set Theory Part II Logic and Set Theory Theorems Based on lectures by I. B. Leader Notes taken by Dexter Chua Lent 2015 These notes are not endorsed by the lecturers, and I have modified them (often significantly)

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2 Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2 Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Theory Procedures

More information

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

More information

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT I LL TALK ABOUT Propositional Logic Terminology, Satisfiability, Decision Procedure First-Order Logic Terminology, Background Theories Satisfiability

More information

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method Overview CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL Agenda for today: Semantic argument method for proving FOL validity Işıl Dillig Important properties of FOL

More information

Dipartimento di Scienze dell Informazione

Dipartimento di Scienze dell Informazione UNIVERSITÀ DEGLI STUDI DI MILANO Dipartimento di Scienze dell Informazione RAPPORTO INTERNO N 309-06 Deciding Extensions of the Theory of Arrays by Integrating Decision Procedures and Instantiation Strategies

More information

An Abstract Decision Procedure for a Theory of Inductive Data Types

An Abstract Decision Procedure for a Theory of Inductive Data Types An Abstract Decision Procedure for a Theory of Inductive Data Types lark Barrett Igor Shikanian Department of omputer Science ourant Institute of Mathematical Sciences New York University esare Tinelli

More information

185.A09 Advanced Mathematical Logic

185.A09 Advanced Mathematical Logic 185.A09 Advanced Mathematical Logic www.volny.cz/behounek/logic/teaching/mathlog13 Libor Běhounek, behounek@cs.cas.cz Lecture #1, October 15, 2013 Organizational matters Study materials will be posted

More information

5. Peano arithmetic and Gödel s incompleteness theorem

5. Peano arithmetic and Gödel s incompleteness theorem 5. Peano arithmetic and Gödel s incompleteness theorem In this chapter we give the proof of Gödel s incompleteness theorem, modulo technical details treated in subsequent chapters. The incompleteness theorem

More information

What s Decidable About Arrays?

What s Decidable About Arrays? What s Decidable About Arrays? Aaron R. Bradley Zohar Manna Henny B. Sipma Computer Science Department Stanford University 1 Outline 0. Motivation 1. Theories of Arrays 2. SAT A 4. Undecidable Problems

More information

Cogito ergo sum non machina!

Cogito ergo sum non machina! Cogito ergo sum non machina! About Gödel s First Incompleteness Theorem and Turing machines. Ricardo Pereira Tassinari 1 Philosophy Department of State University of São Paulo - UNESP - Campus Marília

More information

The Church-Turing Thesis and Relative Recursion

The Church-Turing Thesis and Relative Recursion The Church-Turing Thesis and Relative Recursion Yiannis N. Moschovakis UCLA and University of Athens Amsterdam, September 7, 2012 The Church -Turing Thesis (1936) in a contemporary version: CT : For every

More information

Combining Decision Procedures

Combining Decision Procedures Combining Decision Procedures Ashish Tiwari tiwari@csl.sri.com http://www.csl.sri.com/. Computer Science Laboratory SRI International 333 Ravenswood Menlo Park, CA 94025 Combining Decision Procedures (p.1

More information

Transformation of Equational Theories and the Separation Problem of Bounded Arithmetic

Transformation of Equational Theories and the Separation Problem of Bounded Arithmetic Swansea University Department of Computer Science Transformation of Equational Theories and the Separation Problem of Bounded Arithmetic MRes Thesis by David R. Sherratt supervised by Prof. Arnold Beckmann

More information

Seminar Decision Procedures and Applications

Seminar Decision Procedures and Applications Seminar Decision Procedures and pplications Background Informations Viorica Sofronie-Stokkermans University Koblenz-Landau 29 May 2013 1 Structure Topics for the talks: D. Basin & H. Ganzinger: utomated

More information

Some Applications of MATH 1090 Techniques

Some Applications of MATH 1090 Techniques 1 Some Applications of MATH 1090 Techniques 0.1 A simple problem about Nand gates in relation to And gates and inversion (Not) Gates. In this subsection the notation A means that A is proved from the axioms

More information

Every formula evaluates to either \true" or \false." To say that the value of (x = y) is true is to say that the value of the term x is the same as th

Every formula evaluates to either \true or \false. To say that the value of (x = y) is true is to say that the value of the term x is the same as th A Quick and Dirty Sketch of a Toy Logic J Strother Moore January 9, 2001 Abstract For the purposes of this paper, a \logic" consists of a syntax, a set of axioms and some rules of inference. We dene a

More information

Chapter 2 Axiomatic Set Theory

Chapter 2 Axiomatic Set Theory Chapter 2 Axiomatic Set Theory Ernst Zermelo (1871 1953) was the first to find an axiomatization of set theory, and it was later expanded by Abraham Fraenkel (1891 1965). 2.1 Zermelo Fraenkel Set Theory

More information

258 Handbook of Discrete and Combinatorial Mathematics

258 Handbook of Discrete and Combinatorial Mathematics 258 Handbook of Discrete and Combinatorial Mathematics 16.3 COMPUTABILITY Most of the material presented here is presented in far more detail in the texts of Rogers [R], Odifreddi [O], and Soare [S]. In

More information

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas. 1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is

More information

Classical Propositional Logic

Classical Propositional Logic The Language of A Henkin-style Proof for Natural Deduction January 16, 2013 The Language of A Henkin-style Proof for Natural Deduction Logic Logic is the science of inference. Given a body of information,

More information

A1 Logic (25 points) Using resolution or another proof technique of your stated choice, establish each of the following.

A1 Logic (25 points) Using resolution or another proof technique of your stated choice, establish each of the following. A1 Logic (25 points) Using resolution or another proof technique of your stated choice, establish each of the following. = ( x)( y)p (x, y, f(x, y)) ( x)( y)( z)p (x, y, z)). b. (6.25 points) Γ = ( x)p

More information

Marie Duží

Marie Duží Marie Duží marie.duzi@vsb.cz 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: 1. a language 2. a set of axioms 3. a set of deduction rules ad 1. The definition of a language

More information

The Calculus of Computation

The Calculus of Computation The Calculus of Computation Aaron R. Bradley Zohar Manna The Calculus of Computation Decision Procedures with Applications to Verification With 60 Figures 123 Authors Aaron R. Bradley Zohar Manna Gates

More information

06 Recursive Definition and Inductive Proof

06 Recursive Definition and Inductive Proof CAS 701 Fall 2002 06 Recursive Definition and Inductive Proof Instructor: W. M. Farmer Revised: 30 November 2002 1 What is Recursion? Recursion is a method of defining a structure or operation in terms

More information

TR : Binding Modalities

TR : Binding Modalities City University of New York (CUNY) CUNY Academic Works Computer Science Technical Reports Graduate Center 2012 TR-2012011: Binding Modalities Sergei N. Artemov Tatiana Yavorskaya (Sidon) Follow this and

More information

the logic of provability

the logic of provability A bird s eye view on the logic of provability Rineke Verbrugge, Institute of Artificial Intelligence, University of Groningen Annual Meet on Logic and its Applications, Calcutta Logic Circle, Kolkata,

More information

Constructions of Models in Fuzzy Logic with Evaluated Syntax

Constructions of Models in Fuzzy Logic with Evaluated Syntax Constructions of Models in Fuzzy Logic with Evaluated Syntax Petra Murinová University of Ostrava IRAFM 30. dubna 22 701 03 Ostrava Czech Republic petra.murinova@osu.cz Abstract This paper is a contribution

More information

First Order Logic (FOL) 1 znj/dm2017

First Order Logic (FOL) 1   znj/dm2017 First Order Logic (FOL) 1 http://lcs.ios.ac.cn/ znj/dm2017 Naijun Zhan March 19, 2017 1 Special thanks to Profs Hanpin Wang (PKU) and Lijun Zhang (ISCAS) for their courtesy of the slides on this course.

More information

CMPS 217 Logic in Computer Science. Lecture #17

CMPS 217 Logic in Computer Science.   Lecture #17 CMPS 217 Logic in Computer Science https://courses.soe.ucsc.edu/courses/cmps217/spring13/01 Lecture #17 1 The Complexity of FO-Truth on a Structure Structure A Complexity of Th(A) Structure of the natural

More information

Abstract model theory for extensions of modal logic

Abstract model theory for extensions of modal logic Abstract model theory for extensions of modal logic Balder ten Cate Stanford, May 13, 2008 Largely based on joint work with Johan van Benthem and Jouko Väänänen Balder ten Cate Abstract model theory for

More information

Part II. Logic and Set Theory. Year

Part II. Logic and Set Theory. Year Part II Year 2018 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2018 60 Paper 4, Section II 16G State and prove the ǫ-recursion Theorem. [You may assume the Principle of ǫ- Induction.]

More information

Decision Procedures 1: Survey of decision procedures

Decision Procedures 1: Survey of decision procedures Decision Procedures 1: Survey of decision procedures John Harrison Intel Corporation TYPES summer school 2005, Göteborg Fri 19th August 2005 (09:00 09:45) 0 Summary Interesting and uninteresting proofs

More information

Symbolic Analysis. Xiangyu Zhang

Symbolic Analysis. Xiangyu Zhang Symbolic Analysis Xiangyu Zhang What is Symbolic Analysis CS510 S o f t w a r e E n g i n e e r i n g Static analysis considers all paths are feasible Dynamic considers one path or a number of paths Symbolic

More information

Representing Scott Sets in Algebraic Settings

Representing Scott Sets in Algebraic Settings Representing Scott Sets in Algebraic Settings Alf Dolich Kingsborough Community College Julia F. Knight University of Notre Dame Karen Lange Wellesley College David Marker University of Illinois at Chicago

More information

Chapter 1. Sets and Mappings

Chapter 1. Sets and Mappings Chapter 1. Sets and Mappings 1. Sets A set is considered to be a collection of objects (elements). If A is a set and x is an element of the set A, we say x is a member of A or x belongs to A, and we write

More information

About the relationship between formal logic and complexity classes

About the relationship between formal logic and complexity classes About the relationship between formal logic and complexity classes Working paper Comments welcome; my email: armandobcm@yahoo.com Armando B. Matos October 20, 2013 1 Introduction We analyze a particular

More information

Introduction to Logic and Axiomatic Set Theory

Introduction to Logic and Axiomatic Set Theory Introduction to Logic and Axiomatic Set Theory 1 Introduction In mathematics, we seek absolute rigor in our arguments, and a solid foundation for all of the structures we consider. Here, we will see some

More information

First Order Logic: Syntax and Semantics

First Order Logic: Syntax and Semantics CS1081 First Order Logic: Syntax and Semantics COMP30412 Sean Bechhofer sean.bechhofer@manchester.ac.uk Problems Propositional logic isn t very expressive As an example, consider p = Scotland won on Saturday

More information

ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes)

ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes) ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes) Steve Vickers CS Theory Group Birmingham 2. Theories and models Categorical approach to many-sorted

More information

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos

What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos What are the recursion theoretic properties of a set of axioms? Understanding a paper by William Craig Armando B. Matos armandobcm@yahoo.com February 5, 2014 Abstract This note is for personal use. It

More information

EXP. LOGIC: M.Ziegler PSPACE. NPcomplete. School of Computing PSPACE CH #P PH. Martin Ziegler 박세원신승우조준희 ( 박찬수 ) complete. co- P NP. Re a ) Computation

EXP. LOGIC: M.Ziegler PSPACE. NPcomplete. School of Computing PSPACE CH #P PH. Martin Ziegler 박세원신승우조준희 ( 박찬수 ) complete. co- P NP. Re a ) Computation EXP PSPACE complete PSPACE CH #P PH conpcomplete NPcomplete co- NP P NP P L NP School of Computing Martin Ziegler 박세원신승우조준희 ( 박찬수 ) Complexity and Re a ) Computation Please ask questions! Informal Logic

More information

1.5 Non-linear Real Arithmetic

1.5 Non-linear Real Arithmetic A Simplex variant: Transform the satisfiability problem into the form A x = 0 l x u (where l i may be and u i may be + ). Relation to optimization problem is obscured. But: More efficient if one needs

More information

Tutorial on Axiomatic Set Theory. Javier R. Movellan

Tutorial on Axiomatic Set Theory. Javier R. Movellan Tutorial on Axiomatic Set Theory Javier R. Movellan Intuitively we think of sets as collections of elements. The crucial part of this intuitive concept is that we are willing to treat sets as entities

More information

Propositional Logic: Syntax

Propositional Logic: Syntax Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic

More information

Propositional and Predicate Logic - VII

Propositional and Predicate Logic - VII Propositional and Predicate Logic - VII Petr Gregor KTIML MFF UK WS 2015/2016 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - VII WS 2015/2016 1 / 11 Theory Validity in a theory A theory

More information

Lloyd-Topor Completion and General Stable Models

Lloyd-Topor Completion and General Stable Models Lloyd-Topor Completion and General Stable Models Vladimir Lifschitz and Fangkai Yang Department of Computer Science The University of Texas at Austin {vl,fkyang}@cs.utexas.edu Abstract. We investigate

More information

There are problems that cannot be solved by computer programs (i.e. algorithms) even assuming unlimited time and space.

There are problems that cannot be solved by computer programs (i.e. algorithms) even assuming unlimited time and space. Undecidability There are problems that cannot be solved by computer programs (i.e. algorithms) even assuming unlimited time and space. Proved by Alan Turing in 1936 What is a computer program/algorithm?

More information

Gödel s Incompleteness Theorem. Overview. Computability and Logic

Gödel s Incompleteness Theorem. Overview. Computability and Logic Gödel s Incompleteness Theorem Overview Computability and Logic Recap Remember what we set out to do in this course: Trying to find a systematic method (algorithm, procedure) which we can use to decide,

More information

MAGIC Set theory. lecture 2

MAGIC Set theory. lecture 2 MAGIC Set theory lecture 2 David Asperó University of East Anglia 22 October 2014 Recall from last time: Syntactical vs. semantical logical consequence Given a set T of formulas and a formula ', we write

More information

An Introduction to Gödel s Theorems

An Introduction to Gödel s Theorems An Introduction to Gödel s Theorems In 1931, the young Kurt Gödel published his First Incompleteness Theorem, which tells us that, for any sufficiently rich theory of arithmetic, there are some arithmetical

More information

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY

Victoria Gitman and Thomas Johnstone. New York City College of Technology, CUNY Gödel s Proof Victoria Gitman and Thomas Johnstone New York City College of Technology, CUNY vgitman@nylogic.org http://websupport1.citytech.cuny.edu/faculty/vgitman tjohnstone@citytech.cuny.edu March

More information

The Mother of All Paradoxes

The Mother of All Paradoxes The Mother of All Paradoxes Volker Halbach Truth and Intensionality Amsterdam 3rd December 2016 A theory of expressions The symbols of L are: 1. infinitely many variable symbols v 0, v 1, v 2, v 3,...

More information