First-order logic Syntax and semantics

Size: px
Start display at page:

Download "First-order logic Syntax and semantics"

Transcription

1 1 / 43 First-order logic Syntax and semantics Mario Alviano University of Calabria, Italy A.Y. 2017/2018

2 Outline 2 / 43 1 Motivation Why more than propositional logic? Intuition 2 Syntax Terms Formulas 3 Semantics Structures Valuation

3 Propositional logic: is it enough? (1) We want to represent: Socrates is a human Humans are mortal From this, we want to draw the conclusion: Socrates is mortal In propositional logic Variable SH for Socrates is a human Variable HM for Humans are mortal Variable SM for Socrates is mortal We define Γ := {SH, SH SM} From this, we can draw the conclusion: Γ = SM Where is HM?!? This is not what we wanted to express! 5 / 43

4 6 / 43 Propositional logic: is it enough? (2) Humans are mortal is not an atom! Mario is a human Humans are mortal Mario is mortal We talk about objects, not about propositions! But... There is no concept of object in propositional logic

5 8 / 43 Towards first-order logic Start from propositional logic Atoms are no longer indivisible Compose atoms from: terms, representing objects, and predicates, i.e., statements about terms Example Socrates is a term Mortal is a predicate

6 9 / 43 Functions Socrates father Represents exactly one object But we refer to it from another object Function symbols map some objects to other objects

7 10 / 43 Variables Humans are mortal If some object is human then it is mortal We are not referring to any specific object We need a variable ranging over objects Note: Such variables are completely different from propositional variables! Think about them as object variables

8 11 / 43 Quantifiers Humans are mortal Actually wants to express all humans are mortal And not some humans are mortal And certainly not no humans are mortal Quantifiers express for all objects, or some object exists

9 14 / 43 Function symbols and constants Let F be a countable set of function symbols An arity (nonnegative integer) is associated with each function symbol Function symbols with arity 0 are constants (i.e., objects) Examples socrates (arity 0) father (arity 1) firstsonof (arity 2) supercalifragilistichespiralidoso287 (arity 6)

10 15 / 43 Variables Let V be a countable set of (object) variables Note: V and F are disjoint! Examples x, y, z _human _xiknve

11 16 / 43 Terms (1) Build terms from function symbols and variables, respecting arities Terms: Inductive definition If v is a variable symbol then v is a term If f is a function symbol of arity 0 then f is a term If f is a function symbol of arity n > 0, and t 1,..., t n are terms, then f (t 1,..., t n ) is a term Ground terms Terms not containing any variable!

12 17 / 43 Terms (2) Examples socrates _xiknve father(socrates) father(father(socrates)) father(father(father(socrates))) firstson(father(socrates), _xiknve) supercalifragilistichespiralidoso287(x, y, z, socrates, _xiknve, x) Intuitively, each term represents an object

13 19 / 43 Predicate symbols Let P be a countable set of predicate symbols An arity is associated with each predicate symbol Examples Human (arity 1) Mortal (arity 1) Married (arity 2) Yggdrasil (arity 18)

14 20 / 43 Atoms Atomic formula, or atom A structure of the form P(t 1,..., t n ), where P is a predicate symbol of arity n 0 t 1,..., t n are terms Examples Human(socrates) Mortal(father(_xiknve)) Married(socrates, x) Predicates with arity 0 are like propositional variables!

15 21 / 43 Formulas Similar to propositional logic with different atoms! φ is a wff if and only if φ is an atomic formula, or φ =, or φ =, or φ = ( ψ) where ψ is a formula, or φ = (ψ ψ ) where ψ, ψ are formulas, or φ = (ψ ψ ) where ψ, ψ are formulas, or φ = (ψ ψ ) where ψ, ψ are formulas, or φ = (ψ ψ ) where ψ, ψ are formulas, or φ = ( x ψ) where x is a variable and ψ is a formula, or φ = ( x ψ) where x is a variable and ψ is a formula

16 22 / 43 Quantified variables is the universal quantifier is the existential quantifier In x ψ and x ψ ψ is the scope of x x is bound in ψ Variables which are not bound in a formula are free Formulas without free variables are closed, also called sentences

17 23 / 43 Binding strength As for propositional logic, we usually minimize parentheses,, and have the same binding strength Then come,,, and, in this order Examples Human(socrates) Mortal(socrates) ( x (Human(x) Mortal(x))) ( x (Human(firstSonOf (socrates, x)) Married(socrates, x))) ( x (( y Human(firstSonOf (x, y))) ( z Married(x, z)))) (( y Human(firstSonOf (x, y))) ( z Married(x, z)))

18 24 / 43 Formulas as trees Every formula can be written as a formula tree x P(x) Q(y) P(y) R(y) x Q(y) R(y) P(x) P(y) Similarly, we can define (immediate) subformulas How to determine the scope of a variable? How to determine bound variables?

19 Examples Example 1 1 N(o) 2 x (N(x) N(s(x))) 3 x y ( E(x, y) E(s(x), s(y))) 4 x E(s(x), o) Example 2 1 x E(s(x), o) 2 x y (E(s(x), s(y)) E(x, y)) 3 x E(a(x, o), x) 4 x y E(a(x, s(y)), s(a(x, y))) 5 x E(m(x, o), o) 6 x y E(m(x, s(y)), a(m(x, y), x)) 25 / 43

20 Free variables 26 / 43 Given a term t, the set free(t) of its free variables is defined as: free(t) = {x} if t is a variable x free(t) = if t is a constant free(t) = n i=1 free(t i) if t is f (t 1,..., t n ) Given a formula φ, the set free(φ) of its free variables is defined as: free(φ) = n i=1 free(t i) if φ is an atom P(t 1,..., t n ) free(φ) = if φ is or free(φ) = free(ψ) if φ is ψ free(φ) = free(ψ) free(ψ ) if φ is ψ ψ for {,,, } free(φ) = free(ψ) \ {x} if φ is x ψ or x ψ

21 27 / 43 Term substitution (1) Substitute variable x by term t in term s, denoted s[t/x]: s[t/x] = t if s is a variable and s = x s[t/x] = s if s is a variable and s x s[t/x] = f (t 1 [t/x],..., t n [t/x]) if s = f (t 1,..., t n ) Substitute variable x by term t in a formula φ, denoted φ[t/x]: φ[t/x] = φ if φ is or φ[t/x] = P(t 1 [t/x],..., t n [t/x]) if φ is an atom P(t 1,..., t n ) φ[t/x] = ψ[t/x] if φ = ψ φ[t/x] = ψ[t/x] ψ [t/x] if φ = ψ ψ for {,,, } if φ = Qy ψ for Q {, } then φ[t/x] = Qy ψ[t/x] if x y and y / free(t) φ[t/x] = Qz ψ[z/y][t/x] if x y and y free(t), where z is a variable not occurring in ψ and t φ[t/x] = Qy ψ if x = y

22 28 / 43 Term substitution (2) t[t 1 /x 1,..., t n /x n ] denotes the simultaneous substitution of x 1,..., x n by t 1,..., t n in the term t φ[t 1 /x 1,..., t n /x n ] denotes the simultaneous substitution of x 1,..., x n by t 1,..., t n in the formula φ Example Compare the followings: 1 A(x, y)[y/x, x/y] 2 A(x, y)[y/x][x/y] 3 A(x, y)[x/y][y/x]

23 29 / 43 Formula substitution In propositional logic we replaced atoms by formulas Can we do the same in first-order logic? Yes, we can! Definition For wffs γ, φ and atom A, let γ[φ/a] denote the formula in which φ replaces all occurrences of A

24 Semantics Requirements Domain We want to speak about objects Each term represents an object We need a set of objects called domain (or universe) of discourse Interpretation function A constant symbol should be associated to an object in the domain A function symbol of arity n should be associated to a function mapping each n-tuple of objects to an object A predicate of arity n should be associated to a function mapping each n-tuple of objects to a Boolean value We need an interpretation function for this purpose 32 / 43

25 Structures Definition A structure is a pair A = (D A, I A ), where D A is a nonempty set, called domain I A is an interpretation function, i.e., a function associating each constant symbol c with an object I A (c) D A each function symbol f of arity n with a function I A (f ) : D n A D A each predicate symbol P of arity n with a relation I A (P) : D n A {0, 1} Notation. We will usually write c A, f A and P A instead of I A (c), I A (f ) and I A (P), respectively Observation. Constants are actually associated with functions of arity 0 33 / 43

26 Variable assignments What about (free) variables? We need a variable assignment, also called environment Definition A variable assignment ξ A for a structure A is a function from the set of variables to the domain, i.e., ξ A : V D A Notation We extend substitutions to variable assignments. Let ξ A be a variable assignment, x be a variable and d be an object in D A. ξ A [d/x] is the variable assignment such that ξ A [d/x](y) = d if y = x ξ A [d/x](y) = ξ A (y) if y x 34 / 43

27 The valuation ν (A,ξA) (t) of a term t wrt (A, ξ A ) is ν (A,ξA) (t) = ξ A (t) if t is a variable ν (A,ξA) (t) = f A (ν (A,ξA) (t 1 ),..., ν (A,ξA) (t n )) if t is f (t 1,..., t n ) The valuation of formulas is also defined inductively ν (A,ξA) ( ) = 1 and ν (A,ξA) ( ) = 0 ν (A,ξA) (P(t 1,..., t n )) = P A (ν (A,ξA) (t 1 ),..., ν (A,ξA) (t n )) ν (A,ξA) ( φ) = ν (A,ξA) (φ) using propositional logic ν (A,ξA) (φ ψ) = ν (A,ξA) (φ) ν (A,ξA) (ψ) using propositional logic, for {,,, } ν (A,ξA) ( x φ) = 1 iff ν (A,ξA [d/x]) (φ) = 1 for all d D A ν (A,ξA) ( x φ) = 1 iff ν (A,ξA [d/x]) (φ) = 1 for some d D A 36 / 43 Valuation Interpretation An interpretation for a first-order language is a pair (A, ξ A ), where A = (D A, I A ) is a structure ξ A is a variable assignment for A

28 37 / 43 Examples (1) Example 1 1 N(o) 2 x (N(x) N(s(x))) 3 x y ( E(x, y) E(s(x), s(y))) 4 x E(s(x), o) D A = N (natural numbers, including 0) o A = 0 s A : Successor of a number N A : True for natural numbers E A : True for equal numbers ξ A? Not relevant because there are no free variables

29 Examples (2) Example 2 1 x E(s(x), o) 2 x y (E(s(x), s(y)) E(x, y)) 3 x E(a(x, o), x) 4 x y E(a(x, s(y)), s(a(x, y))) 5 x E(m(x, o), o) 6 x y E(m(x, s(y)), a(m(x, y), x)) D A = N (natural numbers, including 0) o A = 0 s A : Successor of a number a A : Sum of two numbers m A : Product of two numbers E A : True for equal numbers ξ A? Not relevant because there are no free variables 38 / 43

30 39 / 43 Socrates example 1 Human(socrates) 2 x (Human(x) Mortal(x)) 3 Mortal(socrates) Can we conclude 3 from 1 and 2? Not yet! We must still define the notions of model and entailment

31 40 / 43 Peano (first-order) axioms 1 N(0) 2 x E(x, x) 3 x y (E(x, y) E(y, x)) 4 x y z (E(x, y) E(y, z) E(x, z)) 5 x y (N(x) E(x, y) N(y)) 6 x (N(x) N(s(x))) 7 x E(s(x), 0) 8 x y (E(s(x), s(y)) E(x, y)) 9 If P is a predicate of arity 1 then (P(0) x (P(x) P(s(x)))) x P(x)

32 Simple observations 41 / 43 Lemma Let A be a structure, and ξ1 A, ξa 2 be variable assignments such that ξ1 A(x i) = ξ2 A(x i) for i = 1,..., n. If t is a term such that free(t) = {x 1,..., x n } then ν (A,ξA 1 ) (t) = ν (A,ξA 2 ) (t) If φ is a formula such that free(φ) = {x 1,..., x n } then ν (A,ξA 1 ) (φ) = ν (A,ξA 2 ) (φ)

33 Exercises 42 / 43 1 Find the free variables in the following wffs 1 y x A(x, y) B(x, y) 2 x y(a(x, y) B(x, y)) 3 y x A(y) (B(x, y) z C(x, z)) 4 x y(a(x, y) B(x)) z C(z) D(z) 2 For each formula φ above 1 find an interpretation valuating φ as 0 2 find an interpretation valuating φ as 1 3 find a structure A such that ν (A,ξA) (φ) = 1 for every ξ A

34 END OF THE LECTURE 43 / 43

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 Predicate Logic. Basics

First-Order Predicate Logic. Basics First-Order Predicate Logic Basics 1 Syntax of predicate logic: terms A variable is a symbol of the form x i where i = 1, 2, 3.... A function symbol is of the form fi k where i = 1, 2, 3... und k = 0,

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

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo

Predicate Logic. CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo Predicate Logic CSE 191, Class Note 02: Predicate Logic Computer Sci & Eng Dept SUNY Buffalo c Xin He (University at Buffalo) CSE 191 Discrete Structures 1 / 22 Outline 1 From Proposition to Predicate

More information

Logic and Modelling. Introduction to Predicate Logic. Jörg Endrullis. VU University Amsterdam

Logic and Modelling. Introduction to Predicate Logic. Jörg Endrullis. VU University Amsterdam Logic and Modelling Introduction to Predicate Logic Jörg Endrullis VU University Amsterdam Predicate Logic In propositional logic there are: propositional variables p, q, r,... that can be T or F In predicate

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

Propositional Logic Not Enough

Propositional Logic Not Enough Section 1.4 Propositional Logic Not Enough If we have: All men are mortal. Socrates is a man. Does it follow that Socrates is mortal? Can t be represented in propositional logic. Need a language that talks

More information

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19. Intelligent Agents First Order Logic Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University last change: 19. Mai 2015 U. Schmid (CogSys) Intelligent Agents last change: 19. Mai 2015

More information

First Order Logic Semantics (3A) Young W. Lim 9/17/17

First Order Logic Semantics (3A) Young W. Lim 9/17/17 First Order Logic (3A) Young W. Lim Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

More information

First Order Logic Semantics (3A) Young W. Lim 8/9/17

First Order Logic Semantics (3A) Young W. Lim 8/9/17 First Order Logic (3A) Young W. Lim Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version

More information

GS03/4023: Validation and Verification Predicate Logic Jonathan P. Bowen Anthony Hall

GS03/4023: Validation and Verification Predicate Logic Jonathan P. Bowen   Anthony Hall GS03/4023: Validation and Verification Predicate Logic Jonathan P. Bowen www.cs.ucl.ac.uk/staff/j.bowen/gs03 Anthony Hall GS03 W1 L3 Predicate Logic 12 January 2007 1 Overview The need for extra structure

More information

Automated Reasoning Lecture 5: First-Order Logic

Automated Reasoning Lecture 5: First-Order Logic Automated Reasoning Lecture 5: First-Order Logic Jacques Fleuriot jdf@inf.ac.uk Recap Over the last three lectures, we have looked at: Propositional logic, semantics and proof systems Doing propositional

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

All psychiatrists are doctors All doctors are college graduates All psychiatrists are college graduates

All psychiatrists are doctors All doctors are college graduates All psychiatrists are college graduates Predicate Logic In what we ve discussed thus far, we haven t addressed other kinds of valid inferences: those involving quantification and predication. For example: All philosophers are wise Socrates is

More information

Logics - Introduction

Logics - Introduction Logics 1 Logics - Introduction So far we have seen a variety of operational formalisms based on some some notion of state and event/transition model the evolution of the system Now instead we will analyze

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

Introduction to Predicate Logic Part 1. Professor Anita Wasilewska Lecture Notes (1)

Introduction to Predicate Logic Part 1. Professor Anita Wasilewska Lecture Notes (1) Introduction to Predicate Logic Part 1 Professor Anita Wasilewska Lecture Notes (1) Introduction Lecture Notes (1) and (2) provide an OVERVIEW of a standard intuitive formalization and introduction to

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

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

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

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy

Mathematical Logic. Reasoning in First Order Logic. Chiara Ghidini. FBK-IRST, Trento, Italy Reasoning in First Order Logic FBK-IRST, Trento, Italy April 12, 2013 Reasoning tasks in FOL Model checking Question: Is φ true in the interpretation I with the assignment a? Answer: Yes if I = φ[a]. No

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

Introduction to first-order logic:

Introduction to first-order logic: Introduction to first-order logic: First-order structures and languages. Terms and formulae in first-order logic. Interpretations, truth, validity, and satisfaction. Valentin Goranko DTU Informatics September

More information

Logic: First Order Logic (Part I)

Logic: First Order Logic (Part I) Logic: First Order 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

First-order Logic (Session 1) Anthony W. Lin Yale-nus College, Singapore

First-order Logic (Session 1) Anthony W. Lin Yale-nus College, Singapore First-order Logic (Session 1) Anthony W. Lin Yale-nus College, Singapore Limitations of propositional logic Consider the following classical argument: (1) All men are mortal (2) Socrates is a man Therefore:

More information

Logical Structures in Natural Language: First order Logic (FoL)

Logical Structures in Natural Language: First order Logic (FoL) Logical Structures in Natural Language: First order Logic (FoL) Raffaella Bernardi Università degli Studi di Trento e-mail: bernardi@disi.unitn.it Contents 1 How far can we go with PL?................................

More information

First Order Logic vs Propositional Logic CS477 Formal Software Dev Methods

First Order Logic vs Propositional Logic CS477 Formal Software Dev Methods First Order Logic vs Propositional Logic CS477 Formal Software Dev Methods Elsa L Gunter 2112 SC, UIUC egunter@illinois.edu http://courses.engr.illinois.edu/cs477 Slides based in part on previous lectures

More information

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza

Automata theory. An algorithmic approach. Lecture Notes. Javier Esparza Automata theory An algorithmic approach Lecture Notes Javier Esparza July 2 22 2 Chapter 9 Automata and Logic A regular expression can be seen as a set of instructions ( a recipe ) for generating the words

More information

Predicate Calculus. Lila Kari. University of Waterloo. Predicate Calculus CS245, Logic and Computation 1 / 59

Predicate Calculus. Lila Kari. University of Waterloo. Predicate Calculus CS245, Logic and Computation 1 / 59 Predicate Calculus Lila Kari University of Waterloo Predicate Calculus CS245, Logic and Computation 1 / 59 Predicate Calculus Alternative names: predicate logic, first order logic, elementary logic, restricted

More information

Logic. Foundations of First Order Logic. franconi. Enrico Franconi

Logic. Foundations of First Order Logic.  franconi. Enrico Franconi (1/41) Logic Foundations of First Order Logic Enrico Franconi franconi@inf.unibz.it http://www.inf.unibz.it/ franconi Faculty of Computer Science, Free University of Bozen-Bolzano (2/41) Motivation We

More information

Discrete Structures for Computer Science

Discrete Structures for Computer Science Discrete Structures for Computer Science William Garrison bill@cs.pitt.edu 6311 Sennott Square Lecture #4: Predicates and Quantifiers Based on materials developed by Dr. Adam Lee Topics n Predicates n

More information

Automated Reasoning in First-Order Logic

Automated Reasoning in First-Order Logic Automated Reasoning in First-Order Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ 7/11/2011 Automated Reasoning in First-Order Logic... First-Order Logic Can express (mathematical) structures,

More information

Lecture 3: Semantics of Propositional Logic

Lecture 3: Semantics of Propositional Logic Lecture 3: Semantics of Propositional Logic 1 Semantics of Propositional Logic Every language has two aspects: syntax and semantics. While syntax deals with the form or structure of the language, it is

More information

Predicate Logic - Introduction

Predicate Logic - Introduction Outline Motivation Predicate Logic - Introduction Predicates & Functions Quantifiers, Coming to Terms with Formulas Quantifier Scope & Bound Variables Free Variables & Sentences c 2001 M. Lawford 1 Motivation:

More information

G52DOA - Derivation of Algorithms Predicate Logic

G52DOA - Derivation of Algorithms Predicate Logic G52DOA - Derivation of Algorithms Predicate Logic Venanzio Capretta Predicate Logic So far, we studied propositional logic, in which we started with unspecified propositional variables A, B, C, and combined

More information

Predicate Logic: Syntax

Predicate Logic: Syntax Predicate Logic: Syntax Alice Gao Lecture 12 Based on work by J. Buss, L. Kari, A. Lubiw, B. Bonakdarpour, D. Maftuleac, C. Roberts, R. Trefler, and P. Van Beek 1/31 Outline Syntax of Predicate Logic Learning

More information

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1 Přednáška 12 Důkazové kalkuly Kalkul Hilbertova typu 11/29/2006 Hilbertův kalkul 1 Formal systems, Proof calculi A proof calculus (of a theory) is given by: A. a language B. a set of axioms C. a set of

More information

Logic: The Big Picture

Logic: The Big Picture Logic: The Big Picture A typical logic is described in terms of syntax: what are the legitimate formulas semantics: under what circumstances is a formula true proof theory/ axiomatization: rules for proving

More information

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Part II - Syntax & Proofs 0-0 Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems

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

Predicate Calculus - Semantics 1/4

Predicate Calculus - Semantics 1/4 Predicate Calculus - Semantics 1/4 Moonzoo Kim CS Dept. KAIST moonzoo@cs.kaist.ac.kr 1 Introduction to predicate calculus (1/2) Propositional logic (sentence logic) dealt quite satisfactorily with sentences

More information

Propositional Logic Sequent Calculus

Propositional Logic Sequent Calculus 1 / 16 Propositional Logic Sequent Calculus Mario Alviano University of Calabria, Italy A.Y. 2017/2018 Outline 2 / 16 1 Intuition 2 The LK system 3 Derivation 4 Summary 5 Exercises Outline 3 / 16 1 Intuition

More information

Proposi'onal Logic Not Enough

Proposi'onal Logic Not Enough Section 1.4 Proposi'onal Logic Not Enough If we have: All men are mortal. Socrates is a man. Socrates is mortal Compare to: If it is snowing, then I will study discrete math. It is snowing. I will study

More information

First-Order Logic. Chapter INTRODUCTION

First-Order Logic. Chapter INTRODUCTION Chapter 5 First-Order Logic 5.1 INTRODUCTION In propositional logic, it is not possible to express assertions about elements of a structure. The weak expressive power of propositional logic accounts for

More information

Notes on Satisfiability-Based Problem Solving. First Order Logic. David Mitchell October 23, 2013

Notes on Satisfiability-Based Problem Solving. First Order Logic. David Mitchell October 23, 2013 Notes on Satisfiability-Based Problem Solving First Order Logic David Mitchell mitchell@cs.sfu.ca October 23, 2013 Preliminary draft. Please do not distribute. Corrections and suggestions welcome. In this

More information

Relations to first order logic

Relations to first order logic An Introduction to Description Logic IV Relations to first order logic Marco Cerami Palacký University in Olomouc Department of Computer Science Olomouc, Czech Republic Olomouc, November 6 th 2014 Marco

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

if t 1,...,t k Terms and P k is a k-ary predicate, then P k (t 1,...,t k ) Formulas (atomic formulas)

if t 1,...,t k Terms and P k is a k-ary predicate, then P k (t 1,...,t k ) Formulas (atomic formulas) FOL Query Evaluation Giuseppe De Giacomo Università di Roma La Sapienza Corso di Seminari di Ingegneria del Software: Data and Service Integration Laurea Specialistica in Ingegneria Informatica Università

More information

Predicate Calculus - Syntax

Predicate Calculus - Syntax Predicate Calculus - Syntax Lila Kari University of Waterloo Predicate Calculus - Syntax CS245, Logic and Computation 1 / 26 The language L pred of Predicate Calculus - Syntax L pred, the formal language

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

LING 501, Fall 2004: Quantification

LING 501, Fall 2004: Quantification LING 501, Fall 2004: Quantification The universal quantifier Ax is conjunctive and the existential quantifier Ex is disjunctive Suppose the domain of quantification (DQ) is {a, b}. Then: (1) Ax Px Pa &

More information

Lecture 10: Predicate Logic and Its Language

Lecture 10: Predicate Logic and Its Language Discrete Mathematics (II) Spring 2017 Lecture 10: Predicate Logic and Its Language Lecturer: Yi Li 1 Predicates and Quantifiers In this action, we show you why a richer language should be introduced than

More information

MATH 770 : Foundations of Mathematics. Fall Itay Ben-Yaacov

MATH 770 : Foundations of Mathematics. Fall Itay Ben-Yaacov MATH 770 : Foundations of Mathematics Fall 2005 Itay Ben-Yaacov Itay Ben-Yaacov, University of Wisconsin Madison, Department of Mathematics, 480 Lincoln Drive, Madison, WI 53706-1388, USA URL: http://www.math.wisc.edu/~pezz

More information

Introduction to Sets and Logic (MATH 1190)

Introduction to Sets and Logic (MATH 1190) Introduction to Sets Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics Statistics York University Sept 18, 2014 Outline 1 2 Tautologies Definition A tautology is a compound proposition

More information

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

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/26) Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/26) Propositional Logic - algorithms Complete calculi for deciding logical

More information

Proseminar on Semantic Theory Fall 2013 Ling 720 First Order (Predicate) Logic: Syntax and Natural Deduction 1

Proseminar on Semantic Theory Fall 2013 Ling 720 First Order (Predicate) Logic: Syntax and Natural Deduction 1 First Order (Predicate) Logic: Syntax and Natural Deduction 1 A Reminder of Our Plot I wish to provide some historical and intellectual context to the formal tools that logicians developed to study the

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

First-Order Predicate Logic. First-Order Logic 153/467

First-Order Predicate Logic. First-Order Logic 153/467 First-Order Predicate Logic First-Order Logic 153/467 What Propositional Logic Cannot Express Propositional logic dealt with logical forms of compound propositions It worked well with relationships like

More information

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula: Logic: The Big Picture 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

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

06 From Propositional to Predicate Logic

06 From Propositional to Predicate Logic Martin Henz February 19, 2014 Generated on Wednesday 19 th February, 2014, 09:48 1 Syntax of Predicate Logic 2 3 4 5 6 Need for Richer Language Predicates Variables Functions 1 Syntax of Predicate Logic

More information

Sequent calculus for predicate logic

Sequent calculus for predicate logic CHAPTER 13 Sequent calculus for predicate logic 1. Classical sequent calculus The axioms and rules of the classical sequent calculus are: Axioms { Γ, ϕ, ϕ for atomic ϕ Γ, Left Γ,α 1,α 2 Γ,α 1 α 2 Γ,β 1

More information

Logic. Propositional Logic: Syntax. Wffs

Logic. Propositional Logic: Syntax. Wffs Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about

More information

1 Introduction to Predicate Resolution

1 Introduction to Predicate Resolution 1 Introduction to Predicate Resolution The resolution proof system for Predicate Logic operates, as in propositional case on sets of clauses and uses a resolution rule as the only rule of inference. The

More information

Predicate Calculus lecture 1

Predicate Calculus lecture 1 Predicate Calculus lecture 1 Section 1.3 Limitation of Propositional Logic Consider the following reasoning All cats have tails Gouchi is a cat Therefore, Gouchi has tail. MSU/CSE 260 Fall 2009 1 MSU/CSE

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

Stanford University CS103: Math for Computer Science Handout LN9 Luca Trevisan April 25, 2014

Stanford University CS103: Math for Computer Science Handout LN9 Luca Trevisan April 25, 2014 Stanford University CS103: Math for Computer Science Handout LN9 Luca Trevisan April 25, 2014 Notes for Lecture 9 Mathematical logic is the rigorous study of the way in which we prove the validity of mathematical

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

Team Semantics and Recursive Enumerability

Team Semantics and Recursive Enumerability Team Semantics and Recursive Enumerability Antti Kuusisto University of Wroc law, Poland, Technical University of Denmark Stockholm University, Sweden antti.j.kuusisto@uta.fi Abstract. It is well known

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

Peano Arithmetic. by replacing the schematic letter R with a formula, then prefixing universal quantifiers to bind

Peano Arithmetic. by replacing the schematic letter R with a formula, then prefixing universal quantifiers to bind Peano Arithmetic Peano Arithmetic 1 or PA is the system we get from Robinson s Arithmetic by adding the induction axiom schema: ((R(0) v (œx)(r(x) 6 R(sx))) 6 (œx)r(x)). What this means is that any sentence

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

Mat 243 Exam 1 Review

Mat 243 Exam 1 Review OBJECTIVES (Review problems: on next page) 1.1 Distinguish between propositions and non-propositions. Know the truth tables (i.e., the definitions) of the logical operators,,,, and Write truth tables for

More information

Fundamentals of Software Engineering

Fundamentals of Software Engineering Fundamentals of Software Engineering First-Order Logic Ina Schaefer Institute for Software Systems Engineering TU Braunschweig, Germany Slides by Wolfgang Ahrendt, Richard Bubel, Reiner Hähnle (Chalmers

More information

Reasoning Under Uncertainty: Introduction to Probability

Reasoning Under Uncertainty: Introduction to Probability Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Lecture 23 March 12, 2007 Textbook 9 Reasoning Under Uncertainty: Introduction to Probability CPSC 322 Lecture 23, Slide 1 Lecture Overview

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

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

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation Knowledge Bases and Databases Part 1: First-Order Queries Diego Calvanese Faculty of Computer Science Master of Science in Computer Science A.Y. 2007/2008 Overview of Part 1: First-order queries 1 First-order

More information

Handout: Proof of the completeness theorem

Handout: Proof of the completeness theorem MATH 457 Introduction to Mathematical Logic Spring 2016 Dr. Jason Rute Handout: Proof of the completeness theorem Gödel s Compactness Theorem 1930. For a set Γ of wffs and a wff ϕ, we have the following.

More information

Discrete Mathematics and Its Applications

Discrete Mathematics and Its Applications Discrete Mathematics and Its Applications Lecture 1: The Foundations: Logic and Proofs (1.3-1.5) MING GAO DASE @ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 19, 2017 Outline 1 Logical

More information

SKETCHY NOTES FOR WEEKS 7 AND 8

SKETCHY NOTES FOR WEEKS 7 AND 8 SKETCHY NOTES FOR WEEKS 7 AND 8 We are now ready to start work on the proof of the Completeness Theorem for first order logic. Before we start a couple of remarks are in order (1) When we studied propositional

More information

A Logic Primer. Stavros Tripakis University of California, Berkeley

A Logic Primer. Stavros Tripakis University of California, Berkeley EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2015 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,

More information

Normal Forms for First-Order Logic

Normal Forms for First-Order Logic Logic and Proof Hilary 2016 James Worrell Normal Forms for First-Order Logic In this lecture we show how to transform an arbitrary formula of first-order logic to an equisatisfiable formula in Skolem form.

More information

https://vu5.sfc.keio.ac.jp/slide/

https://vu5.sfc.keio.ac.jp/slide/ 1 FUNDAMENTALS OF LOGIC NO.7 PREDICATE LOGIC 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

Logic for Computer Science - Week 2 The Syntax of Propositional Logic

Logic for Computer Science - Week 2 The Syntax of Propositional Logic Logic for Computer Science - Week 2 The Syntax of Propositional Logic Ștefan Ciobâcă November 30, 2017 1 An Introduction to Logical Formulae In the previous lecture, we have seen what makes an argument

More information

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier Section 1.4 Section Summary Predicate logic Quantifiers Universal Quantifier Existential Quantifier Negating Quantifiers De Morgan s Laws for Quantifiers Translating English to Logic Propositional Logic

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

First order logic. Example The deduction of statements: This reasoning is intuitively correct. Every man is mortal. Since Ade is a man, he is mortal.

First order logic. Example The deduction of statements: This reasoning is intuitively correct. Every man is mortal. Since Ade is a man, he is mortal. First Order Logic In the propositional logic, the most basic elements are atoms. Through atoms we build up formulas. We then use formulas to express various complex ideas. In this simple logic, an atom

More information

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic Introduction to EF-games Inexpressivity results for first-order logic Normal forms for first-order logic Algorithms and complexity for specific classes of structures General complexity bounds Preliminaries

More information

Formal (Natural) Deduction for Predicate Calculus

Formal (Natural) Deduction for Predicate Calculus Formal (Natural) Deduction for Predicate Calculus Lila Kari University of Waterloo Formal (Natural) Deduction for Predicate Calculus CS245, Logic and Computation 1 / 42 Formal deducibility for predicate

More information

Denote John by j and Smith by s, is a bachelor by predicate letter B. The statements (1) and (2) may be written as B(j) and B(s).

Denote John by j and Smith by s, is a bachelor by predicate letter B. The statements (1) and (2) may be written as B(j) and B(s). PREDICATE CALCULUS Predicates Statement function Variables Free and bound variables Quantifiers Universe of discourse Logical equivalences and implications for quantified statements Theory of inference

More information

Lecture 2: Axiomatic semantics

Lecture 2: Axiomatic semantics Chair of Software Engineering Trusted Components Prof. Dr. Bertrand Meyer Lecture 2: Axiomatic semantics Reading assignment for next week Ariane paper and response (see course page) Axiomatic semantics

More information

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)

THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) FOL: A language to formulate knowledge Logic is the study of entailment relationslanguages, truth conditions and rules of inference. FOL or Predicate

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

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier Section 1.4 Section Summary Predicate logic Quantifiers Universal Quantifier Existential Quantifier Negating Quantifiers De Morgan s Laws for Quantifiers Translating English to Logic Propositional Logic

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

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4

INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4 INTRODUCTION TO PREDICATE LOGIC HUTH AND RYAN 2.1, 2.2, 2.4 Neil D. Jones DIKU 2005 Some slides today new, some based on logic 2004 (Nils Andersen), some based on kernebegreber (NJ 2005) PREDICATE LOGIC:

More information

Technische Universität München Summer term 2011 Theoretische Informatik Prof. Dr. Dr. h.c J. Esparza / M. Luttenberger / R.

Technische Universität München Summer term 2011 Theoretische Informatik Prof. Dr. Dr. h.c J. Esparza / M. Luttenberger / R. Technische Universität München Summer term 2011 Theoretische Informatik Prof. Dr. Dr. h.c J. Esparza / M. Luttenberger / R. Neumann SOLUTION Logic Endterm 2 Please note : If not stated otherwise, all answers

More information

Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January )

Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January ) Notes on Propositional and First-Order Logic (CPSC 229 Class Notes, January 23 30 2017) John Lasseter Revised February 14, 2017 The following notes are a record of the class sessions we ve devoted to the

More information

First order Logic ( Predicate Logic) and Methods of Proof

First order Logic ( Predicate Logic) and Methods of Proof First order Logic ( Predicate Logic) and Methods of Proof 1 Outline Introduction Terminology: Propositional functions; arguments; arity; universe of discourse Quantifiers Definition; using, mixing, negating

More information