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

Size: px
Start display at page:

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

Transcription

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

2 Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic argument method for FOL validity Properties of FOL Overview of first-order theories

3 Propositional logic (PL) syntax Atom Literal truth symbols ( true ) and ( false ) propositional variables p, q, r, p!, q! atom α or its negation α Formula literal or application of a logical connective to F, F!, F! F not (negation) F! F! or (disjunction) F! F! and (conjunction) F! F! implies (implication) F! F! if and only if (iff)

4 PL semantics Interpretation I : mapping of each propositional variable to a truth value I: { p, q, } Satisfying interpretation : F evaluates to under I, written I F Falsifying interpretation : F evaluates to under I, written I F

5 PL semantics: inductive definition Base Cases: I I I p iff I p = I p iff I p = Inductive Cases: I F iff I F I F! F! iff I F! or I F! I F! F! iff I F! and I F! I F! F! iff I F! or I F! I F! F! iff I F! and I F!, or, I F! and I F!

6 Satisfiability and Validity F is satisfiable iff there exists I : I F F is valid iff for all I : I F Duality: F is valid iff F is unsatisfiable Procedure for deciding satisfiability or validity suffices!

7 Deciding satisfiability SAT solvers! Basic techniques Truth table method: search-based Semantic argument method: deductive technique SAT solvers combine search and deduction

8 Propositional Logic P Q P Q First-Order Logic (predicate logic/predicate calculus/ relational logic) x. p x, y y. q x, y Simple, not very expressive Decidable Automated reasoning about satisfiability/validity Very expressive Semi-decidable Not fully automated

9 Syntax of FOL constants: a, b, c variables: x, y, z n -ary functions: f, g, h n -ary predicates: p, q, r logical connectives:,,,, quantifiers:, Term constant, variable, or, n-ary function applied to n terms Atom,, or, n-ary predicate applied to n terms Literal atom or its negation FOL formula: Literal, or, application of logical connectives to an FOL formula, or, application of a quantifier to an FOL formula

10 Quantifiers existential quantifier: x. F x there exists an x such that F x universal quantifier: x. F x for all x, F x! Quantified variable Scope of quantified variable An occurrence of a variable is bound if it s in the scope of some quantifier An occurrence of a variable is free if it s not in the scope of any quantifier Closed formula: no free variables Open formula: some free variables Ground formula: no variables

11 Semantics of FOL: first-order structure U, I Universe of discourse/domain, U: Non-empty set of values or objects of interest May be finite (set of students at Purdue), countably infinite (integers) or uncountable infinite (positive reals) Interpretation, I: Mapping of variables, functions and predicates to values in U I maps each variable symbol x to some value I[x] U I maps each n-ary function symbol f to some function f! : U! U I maps each n-ary predicate symbol p to some predicate p! : U! {true, false}

12 Evaluation of formulas If F evaluates to under U, I, we write U, I F If F evaluates to under U, I, we write U, I F Evaluation of terms: I f t!,, t! = I f I t!,, I t! Evaluation of atoms: I p t!,, t! = I p I t!,, I t!

13 Evaluation of formulas: inductive definition Base Cases: U, I U, I U, I p t!,, t! iff I p t!,, t! = true Inductive Cases: U, I F iff U, I F U, I F! F! iff U, I F! or U, I F! U, I x. F U, I x. F iff for all v U, I x v F iff there exists v U, I x v F x-variant of U, I that agrees with U, I on everything except the variable x, with I x = v.

14 Satisfiability and Validity F is satisfiable iff there exists some structure U, I : U, I F F is valid iff for all structures U, I : U, I F Duality: F is valid iff F is unsatisfiable

15 Semantic argument method for validity Proof by contradiction: 1. Assume F is not valid 2. Apply proof rules 3. Contradiction (i.e, ) along every branch of proof tree F is valid 4. Otherwise, F is not valid

16 Semantic argument method for validity!,!!!,!!!,!!!,!! U, I x. F U, I[x c] F (for any c U)!,!!!!,!!!,!!!,!!!!,!!!,!! U, I x. F U, I[x c] F U, I x. F U, I[x c] F (for some fresh c U) (for some fresh c U)!,!!!!,!!!,!!!,!!!!,!!!,!! U, I x. F U, I[x c] F (for any c U)!,!!!!,,!!!,!!!!,,!!!!!!!!!!"#!""! [!,!]!,!!

17 Soundness and Completeness of Proof Rules Soundness: If every branch of semantic argument proof derives, then F is valid Completeness: If F is valid, there exists a finite-length semantic argument proof in which every branch derives.

18 Undecidability of FOL A problem is decidable if there exists a procedure that, for any input: 1. halts and says yes if answer is positive, and 2. halts and says no if answer is negative (Such a procedure is called an algorithm or a decision procedure) Undecidability of FOL [Church and Turing]: Deciding the validity of an FOL formula is undecidable Deciding the validity of a PL formula is decidable The truth table method is a decision procedure

19 Semi-decidability of FOL A problem is semi-decidable iff there exists a procedure that, for any input: 1. halts and says yes if answer is positive, and 2. may not terminate if answer is negative. Semi-decidability of FOL: For every valid FOL formula, there exists a procedure (semantic argument method) that always terminates and says yes. If an FOL formula is invalid, there exists no procedure that is guaranteed to terminate.

20 FOL is very expressive, powerful and undecidable in general Some application domains do not need the full power of FOL First-order theories are useful for reasoning about specific applications e.g., programs with arithmetic operations over integers Specialized, efficient decision procedures!

21 First-Order Theories Signature Σ! : set of constant, function, and predicate symbols Axioms A! : set of closed formulas over Σ! Axioms provide the meaning of symbols in Σ! Σ! -formula : constructed from symbols of Σ!, and variables, logical connectives, and quantifiers T-model : a first-order structure M = U, I such that M A for all A A!

22 Satisfiability and Validity Modulo T F is satisfiable modulo T iff there exists some T-model M : M F F is valid modulo T (written T F) iff for all T-models M : M F The theory T consists of all closed formulas that are valid modulo T How is validity modulo T different from FOL-validity? If a formula is valid in FOL, is it also valid modulo T for any T? If a formula is valid modulo T for some T, is it valid in FOL?

23 Decidability of a theory A theory T is decidable iff for every formula F, there is an algorithm that : 1. terminates and answers yes if F is valid modulo T, and 2. terminates and answers no, if F is not valid modulo T Next: decidable first-order theories, and theories with decidable fragments

24 Common first-order theories Theory of equality (with uninterpreted functions) Peano arithmetic (first-order arithmetic) Presburger arithmetic Theory of rationals Theory of arrays

25 Theory of equality T! Signature = binary predicate, interpreted by axioms all constant, function, and predicate symbols Σ! =, a, b, c,, f, g, h,, p, q, r

26 Theory of equality T! Axioms 1. x. x = x (reflexivity) 2. x, y. (x = y) y = x (symmetry) 3. x, y, z. (x = y y = z) x = z (transitivity) Equivalence relation 4. for n-ary function symbol f, (function congruence) x!,, x!, y!,. y!. ( i x! = y! ) f x!,, x! = f y!,., y! 5. for each n-ary predicate symbol p, (predicate congruence) x!,, x!, y!,. y!. ( i x! = y! ) ((p x!,, x! p y!,., y! )

27 Decidability results for T! T! is undecidable Quantifier-free fragment of T! is (efficiently) decidable

28 Theories with natural numbers and integers Natural numbers N = 0,1,2, Integers Z =, 2, 1, 0,1,2, Peano arithmetic T PA : natural numbers with addition and multiplication Presburger arithmetic T N : natural numbers with addition Theory of integers T Z : integers with +, -, > 28

29 Peano arithmetic T PA Signature 0, 1 constants +,. binary functions = binary predicate Σ!" = 0, 1, +,., =

30 Peano arithmetic T PA Axioms Includes equality axioms: reflexivity, symmetry, transitivity In addition: 1. x. x + 1 = 0 (zero) 2. x. x + 0 = x (plus zero) 3. x. x. 0 = 0 (times zero) 4. x, y. (x + 1 = y + 1) x = y (successor) 5. x, y. x + y + 1 = x + y + 1 (plus successor) 6. x, y. x. y + 1 = x. y + x (times successor) 7. (F 0 ( x. F x F[x + 1])) x. F x (induction) Can we express <,, >, in T!"?

31 Decidability and completeness results for T PA Validity in T!" is undecidable Validity in quantifier-free fragment of T!" is also undecidable [Matiyasevitch, 1970] T!" does not capture true arithmetic [Gödel] There are valid propositions of number theory that are not valid in T!" Drop multiplication to get decidability and completeness!

32 Presburger arithmetic T N Signature 0, 1 constants + binary function = binary predicate Σ N = 0, 1, +, =

33 Presburger arithmetic T N Axioms Includes equality axioms: reflexivity, symmetry, transitivity In addition: 1. x. x + 1 = 0 (zero) 2. x. x + 0 = x (plus zero) 3. x, y. (x + 1 = y + 1) x = y (successor) 4. x, y. x + y + 1 = x + y + 1 (plus successor) 5. (F 0 ( x. F x F[x + 1])) x. F x (induction)

34 Decidability and completeness results for T N Validity in quantifier-free fragment of T N is decidable (conp-complete) Validity in T N is also decidable [Presburger, 1929] T N is also complete: for every closed formula F, T N F or T N F T N admits quantifier elimination: for every formula F, there exists an equivalent quantifier-free formula F

35 Theory of integers T Z Signature, 2, 1, 0, 1, 2, constants, 3, 2, 2, 3, unary functions +, binary functions =, > binary predicates Σ Z =, 2, 1, 0, 1, 2,, 3, 2, 2, 3,, +,, =, > Also referred to as the theory of linear arithmetic over integers Equivalent in expressiveness to Presburger arithemetic More convenient notation

36 Theory of rationals T Q Signature 0, 1 constants + binary function =, binary predicates Σ Q = 0, 1, +, =, Can we express > in T Q?

37 Theory of rationals T Q Too many axioms, won t discuss. Every formula valid in T Z is valid in T Q, but not vice versa

38 Decidability results for T Q Validity in T Q is decidable Validity in conjunctive quantifier-free fragment of T N is (efficiently) decidable

39 Theory of arrays T A Signature a[i] binary function read(a,i) a i v ternary function write(a, i, v) Σ A =,, =

40 Theory of arrays T A Axioms Includes equality axioms: reflexivity, symmetry, transitivity In addition: 1. a, i, j. i = j a i = a j (array congruence) 2. a, v, i, j. i = j a i v j = v (read-over-write 1) 3. a, v, i, j. i j a i v j = a j (read-over-write 2)

41 Decidability results for T A Validity in T! is not decidable Quantifier-free fragment of T! is decidable

42 Combination of Theories Given theories T! and T! that have the = predicate, define combined theory T! T! : Signature Σ! Σ! Axioms A! A!

43 Decision procedures for combined theories If 1. quantifier-free fragment of T! is decidable 2. quantifier-free fragment of T! is decidable 3. and T! and T! meet certain technical requirements then quantifier-free fragment of of T! T! is also decidable. [Nelson and Oppen]

44 Summary Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic argument method for FOL validity Properties of FOL Overview of first-order theories

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

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

CS156: The Calculus of Computation

CS156: The Calculus of Computation Page 1 of 31 CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 3: First-Order Theories Page 2 of 31 First-Order Theories I First-order theory T consists of Signature Σ T - set of constant,

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

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 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

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

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

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading Course staff CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics şıl Dillig nstructor: şil Dillig E-mail: isil@cs.utexas.edu Office hours: Thursday after class until 6:30 pm

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

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

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

AAA615: Formal Methods. Lecture 2 First-Order Logic

AAA615: Formal Methods. Lecture 2 First-Order Logic AAA615: Formal Methods Lecture 2 First-Order Logic Hakjoo Oh 2017 Fall Hakjoo Oh AAA615 2017 Fall, Lecture 2 September 24, 2017 1 / 29 First-Order Logic An extension of propositional logic with predicates,

More information

CSE507. Course Introduction. Computer-Aided Reasoning for Software. Emina Torlak

CSE507. Course Introduction. Computer-Aided Reasoning for Software. Emina Torlak Computer-Aided Reasoning for Software CSE507 courses.cs.washington.edu/courses/cse507/14au/ Course Introduction Emina Torlak emina@cs.washington.edu Today What is this course about? Course logistics Review

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

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

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

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

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati

CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati CS 514, Mathematics for Computer Science Mid-semester Exam, Autumn 2017 Department of Computer Science and Engineering IIT Guwahati Important 1. No questions about the paper will be entertained during

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

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

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation Outline Formale Methoden der Informatik First-Order Logic for Forgetters Uwe Egly Vienna University of Technology Institute of Information Systems Knowledge-Based Systems Group Motivation Syntax of PL1

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

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

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

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

More information

Propositional and Predicate Logic. jean/gbooks/logic.html

Propositional and Predicate Logic.   jean/gbooks/logic.html CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/

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

Classical First-Order Logic

Classical First-Order Logic Classical First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) First-Order Logic (Classical) MFES 2008/09

More information

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/ Computer-Aided Reasoning for Software CSE507 courses.cs.washington.edu/courses/cse507/17wi/ Introduction Emina Torlak emina@cs.washington.edu Today What is this course about? Course logistics Review of

More information

Classical Propositional Logic

Classical Propositional Logic Classical Propositional Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ Ph: 02 6218 3717 Data61/CSIRO and ANU July 2017 1 / 71 Classical Logic and Reasoning Problems A 1 : Socrates is a

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

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

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

Topics in Model-Based Reasoning

Topics in Model-Based Reasoning Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational

More information

1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming A Little Logic International Center for Computational Logic Technische Universität Dresden Germany Propositional Logic Satisfiability Problems Solving Sudokus First Order Logic Logic Programming A Little

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

Notes. Corneliu Popeea. May 3, 2013

Notes. Corneliu Popeea. May 3, 2013 Notes Corneliu Popeea May 3, 2013 1 Propositional logic Syntax We rely on a set of atomic propositions, AP, containing atoms like p, q. A propositional logic formula φ Formula is then defined by the following

More information

Classical First-Order Logic

Classical First-Order Logic Classical First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2009/2010 Maria João Frade (DI-UM) First-Order Logic (Classical) MFES 2009/10

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Propositional Logic 1 / 33 Propositional

More information

First-Order Logic. Chapter Overview Syntax

First-Order Logic. Chapter Overview Syntax Chapter 10 First-Order Logic 10.1 Overview First-Order Logic is the calculus one usually has in mind when using the word logic. It is expressive enough for all of mathematics, except for those concepts

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

Propositional logic. First order logic. Alexander Clark. Autumn 2014

Propositional logic. First order logic. Alexander Clark. Autumn 2014 Propositional logic First order logic Alexander Clark Autumn 2014 Formal Logic Logical arguments are valid because of their form. Formal languages are devised to express exactly that relevant form and

More information

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19 PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board

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

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

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

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

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson Predicate Calculus Formal Methods in Verification of Computer Systems Jeremy Johnson Outline 1. Motivation 1. Variables, quantifiers and predicates 2. Syntax 1. Terms and formulas 2. Quantifiers, scope

More information

02 Propositional Logic

02 Propositional Logic SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

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

Propositional Reasoning

Propositional Reasoning Propositional Reasoning CS 440 / ECE 448 Introduction to Artificial Intelligence Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Spring 2010 Intro to AI (CS

More information

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication Announcements CS311H: Discrete Mathematics Propositional Logic II Instructor: Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Wed 09/13 Remember: Due before

More information

Exercises 1 - Solutions

Exercises 1 - Solutions Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note

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

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

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories

Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Halting and Equivalence of Program Schemes in Models of Arbitrary Theories Dexter Kozen Cornell University, Ithaca, New York 14853-7501, USA, kozen@cs.cornell.edu, http://www.cs.cornell.edu/~kozen In Honor

More information

Propositional Logic: Deductive Proof & Natural Deduction Part 1

Propositional Logic: Deductive Proof & Natural Deduction Part 1 Propositional Logic: Deductive Proof & Natural Deduction Part 1 CS402, Spring 2016 Shin Yoo Deductive Proof In propositional logic, a valid formula is a tautology. So far, we could show the validity of

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

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

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2

PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2 PROOFS IN PREDICATE LOGIC AND COMPLETENESS; WHAT DECIDABILITY MEANS HUTH AND RYAN 2.3, SUPPLEMENTARY NOTES 2 Neil D. Jones DIKU 2005 12 September, 2005 Some slides today new, some based on logic 2004 (Nils

More information

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30) Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

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

Chapter 11: Automated Proof Systems

Chapter 11: Automated Proof Systems Chapter 11: Automated Proof Systems SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems are

More information

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

Description Logics. Deduction in Propositional Logic.   franconi. Enrico Franconi (1/20) Description Logics Deduction in Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/20) Decision

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

Chapter 4: Classical Propositional Semantics

Chapter 4: Classical Propositional Semantics Chapter 4: Classical Propositional Semantics Language : L {,,, }. Classical Semantics assumptions: TWO VALUES: there are only two logical values: truth (T) and false (F), and EXTENSIONALITY: the logical

More information

MAI0203 Lecture 7: Inference and Predicate Calculus

MAI0203 Lecture 7: Inference and Predicate Calculus MAI0203 Lecture 7: Inference and Predicate Calculus Methods of Artificial Intelligence WS 2002/2003 Part II: Inference and Knowledge Representation II.7 Inference and Predicate Calculus MAI0203 Lecture

More information

Chapter 11: Automated Proof Systems (1)

Chapter 11: Automated Proof Systems (1) Chapter 11: Automated Proof Systems (1) SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems

More information

Logic for Computer Scientists

Logic for Computer Scientists Logic for Computer Scientists Pascal Hitzler http://www.pascal-hitzler.de CS 499/699 Lecture, Winter Quarter 2011 Wright State University, Dayton, OH, U.S.A. [final version: 03/10/2011] Contents 1 Propositional

More information

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

More information

Logic for Computer Scientists

Logic for Computer Scientists Logic for Computer Scientists Pascal Hitzler http://www.pascal-hitzler.de CS 499/699 Lecture, Spring Quarter 2010 Wright State University, Dayton, OH, U.S.A. Final version. Contents 1 Propositional Logic

More information

Advanced Topics in LP and FP

Advanced Topics in LP and FP Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Summer School on Formal Methods Menlo College, 2011 Bruno Dutertre and Leonardo de Moura bruno@csl.sri.com, leonardo@microsoft.com SRI International, Microsoft Research SAT/SMT

More information

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example Announcements CS243: Discrete Structures Propositional Logic II Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Tuesday 09/11 Weilin s Tuesday office hours are

More information

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning Logic Knowledge Representation & Reasoning Mechanisms Logic Logic as KR Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning Logical inferences Resolution and Theorem-proving Logic

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016

More information

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning. 3: Logic Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1 Why logic? (continued) If I don t buy a lottery ticket on

More information

3 Propositional Logic

3 Propositional Logic 3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1 3.1 Syntax Definition 3.0 An alphabet Σ consists

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

The Curry-Howard Isomorphism

The Curry-Howard Isomorphism The Curry-Howard Isomorphism Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) The Curry-Howard Isomorphism MFES 2008/09

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Logical Abstract Domains and Interpretations

Logical Abstract Domains and Interpretations Logical Abstract Domains and Interpretations Patrick Cousot 2,3, Radhia Cousot 3,1, and Laurent Mauborgne 3,4 1 Centre National de la Recherche Scientifique, Paris 2 Courant Institute of Mathematical Sciences,

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

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

Lecture 1: Logical Foundations

Lecture 1: Logical Foundations Lecture 1: Logical Foundations Zak Kincaid January 13, 2016 Logics have two components: syntax and semantics Syntax: defines the well-formed phrases of the language. given by a formal grammar. Typically

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

Language of Propositional Logic

Language of Propositional Logic Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called

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

Propositional logic. Programming and Modal Logic

Propositional logic. Programming and Modal Logic Propositional logic Programming and Modal Logic 2006-2007 4 Contents Syntax of propositional logic Semantics of propositional logic Semantic entailment Natural deduction proof system Soundness and completeness

More information

Quantifiers. Leonardo de Moura Microsoft Research

Quantifiers. Leonardo de Moura Microsoft Research Quantifiers Leonardo de Moura Microsoft Research Satisfiability a > b + 2, a = 2c + 10, c + b 1000 SAT a = 0, b = 3, c = 5 Model 0 > 3 + 2, 0 = 2 5 + 10, 5 + ( 3) 1000 Quantifiers x y x > 0 f x, y = 0

More information

Logic for Computer Scientists

Logic for Computer Scientists Logic for Computer Scientists Pascal Hitzler http://www.pascal-hitzler.de CS 499/699 Lecture, Winter Quarter 2012 Wright State University, Dayton, OH, U.S.A. [version: 03/01/2012] Contents 1 Propositional

More information

Theory Combination. Clark Barrett. New York University. CS357, Stanford University, Nov 2, p. 1/24

Theory Combination. Clark Barrett. New York University. CS357, Stanford University, Nov 2, p. 1/24 CS357, Stanford University, Nov 2, 2015. p. 1/24 Theory Combination Clark Barrett barrett@cs.nyu.edu New York University CS357, Stanford University, Nov 2, 2015. p. 2/24 Combining Theory Solvers Given

More information