Predicate Calculus. CS 270 Math Foundations of Computer Science Jeremy Johnson

Size: px
Start display at page:

Download "Predicate Calculus. CS 270 Math Foundations of Computer Science Jeremy Johnson"

Transcription

1 Predicate Calculus CS 270 Math Foundations of Computer Science Jeremy Johnson Presentation uses material from Huth and Ryan, Logic in Computer Science: Modelling and Reasoning about Systems, 2nd Edition

2 Outline 1. Motivation (program specification & derivation) 1. Variables, quantifiers and predicates 2. Syntax 1. Terms and formulas 2. Quantifiers, scope and substitution 3. Rules of natural deduction for quantifiers 4. Semantics 1. Models and semantic entailment 5. Undecidability and limitations

3 Hamiltonian Path G = (V,E) is an undirected graph with nodes V = {0,1,,n-1} and edges E V V V = {0,1,2} E = {(0,1),(1,2)} edge(0,1), edge(1,0), edge(1,2), edge(2,1)

4 Hamiltonian Path A Hamiltonian path is a sequence of n nodes, where n = V where each node is visited exactly once (i.e. a permutation of the nodes) following edges or

5 Hamiltonian Path path(i,j) is true when the jth node in the path is in the ith location Hamiltonian paths path(0,0), path(1,1), path(2,2) path(0,2), path(1,1), path(2,0) Not Hamiltonian paths path(0,0), path(1,2), path(2,1) path(0,0), path(0,1), path(1,1), path(2,2) path(0,0), path(1,1), path(1,0), path(2,2)

6 Hamiltonian Path Constraints Every node occurs exactly once in the path j i path(i,j) j i k path(i,j) path(k,j) i = k Every location has exactly one node i j path(i,j) i j k path(i,j) path(i,k) j = k Adjacent nodes must be connected by an edge i j k (i<n-1) (path(i,j) path(i+1,k) edge(j,k))

7 Simplification Every node occurs exactly once in the path j i k path(i,j) path(k,j) i = k j i k (i k (path(i,j) path(k,j)) j i k (i k) path(i,j) path(k,j) j i k (i < k) path(i,j) path(k,j)

8 Simplification Adjacent nodes must be connected by an edge i j k (i<n-1) ((path(i,j) path(i+1,k)) edge(j,k)) i j k (i<n-1) ( edge(j,k) (path(i,j) path(i+1,k))) i j k (i<n-1) ( edge(j,k) ( path(i,j) path(i+1,k))) i j k ((i<n-1) & edge(j,k)) ( path(i,j) path(i+1,k)))

9 Conversion to SAT j i path(i,j) j=0..n-1 i=0..n-1 P ij j i k (i < k) path(i,j) path(k,j) j=0..n-1 i=0..n-1 k=i+1..n-1 P ij P kj i j k ((i<n-1) & edge(j,k)) path(i,j) path(i+1,k)) i=0..n-2 (j,k) E P ij P i+1,k

10 Example 1 Every student is younger than some instructor x ( S(x) y(i(y) Y(x,y) ) S(x) : x is a student I(x) : is an instructor Y(x,y) : x is younger than y

11 Example 2 Not all birds can fly x ( B(x) F(x) ) x ( (B(x) F(x) ) B(x) : x is a bird F(x) : x can fly Semantically equivalent formulas

12 Example 3 Every child is younger than its mother x y ( C(x) M(y,x) Y(x,y) ) C(x) : x is child M(x,y) : x is y s mother Y(x,y) : x is younger than y x ( C(x) Y(x,m(x)) m(x) : function for mother of x

13 Example 4 Andy and Paul have the same maternal grandmother x y u v ( M(x,y) M(y,a) M(u,v) M(v,p) x = u ) m(m(a)) = m(m(p)) a, b : variables for Andy and Paul = : binary predicate

14 Example 5 Everyone has a mother x y ( M(y,x) ) x y ( M(y,x) ) [ not equivalent ] Everyone has exactly one mother x y ( M(y,x) z (M(z,x) z = y )

15 Example 6 Some people have more than one brother x y1 y2 ( B(y1,x) B(y2,x) (y1 = y2) )

16 Comparison to Propositional Calculus Proof calculus for predicate calculus φ 1,,φ n ψ [ extend natural deduction ] Provide semantics for predicate calculus φ 1,,φ n ψ [ models needed to evaluate functions and predicates may not be finite ] Soundness and Completeness φ 1,,φ n ψ holds iff φ 1,,φ n ψ is valid Undecidable No program exists that can always determine if φ holds

17 Terms Terms are made up of variables, constants, and functions Term ::= Variable If c is a nullary function c is a term If t 1,,t n are terms and f is an n-ary function then f(t 1,,t n ) is a term

18 Formulas Formula ::= P is a predicate and t 1,,t n are terms then P(t 1,,t n ) is a formula If ϕ is a formula ϕ is a formula If ϕ 1 and ϕ 2 are formulas, ϕ 1 ϕ 2, ϕ 1 ϕ 2, ϕ 1 ϕ 2 are formulas If ϕ is a formula and x is a variable x ϕ and x ϕ are formulas

19 Parse Trees x ( ( P(x) Q(x) ) S(x,y) ) x S P Q x y x x

20 Free and Bound Variables An occurrence of x in ϕ is free if it is a leaf node in the parse tree for ϕ with no quantifier as an ancestor x x S Q P Q x y P Q P y x x x x x

21 Substitution Given a variable x, a term t and a formula ϕ, ϕ[t/x] is the formula obtained by replacing each free occurrence of x by t x ϕ[f(x,y)/x] x Q Q P Q P y P Q P y x x x x x f x y

22 Variable Capture t is free for x in ϕ if no free x occurs in ϕ in the scope of any quantifier for any variable y occurring in t. S x P y Q x y

23 Variable Capture t is free for x in ϕ if no free x occurs in ϕ in the scope of any quantifier for any variable y occurring in t. S x P y Q f y y y

24 Equality Rules Introduction Rule t = t = i Elimination Rule t 1 = t 2 φ[t 1 /x] φ[t 2 /x] =e

25 Equivalence Relation Symmetry: tt 1 = tt 2 tt 2 = tt 1 1 tt 1 = tt 2 premise 2 tt 1 = tt 1 =i 3 tt 2 = tt 1 =e 1,2 Transitivity: tt 1 = tt 2, tt 2 = tt 3 tt 1 = tt 3 1 tt 1 = tt 2 premise 2 tt 2 = tt 3 premise 3 tt 1 = tt 3 =e 2,1

26 Conjunction Rules Introduction Rule φ ψ φ ψ i Elimination Rule φ ψ φ e1 φ ψ ψ e2

27 Universal Quantification Rules Introduction Rule x 0 φ[x 0 /x] x φ x i Elimination Rule x φ x e φ[t/x]

28 Illegal Substitution Leads to False Reasoning x ϕ ϕ = y (x < y) ϕ[y/x] = y (y < y) y is not free for x in ϕ

29 Example Proof xx P xx Q xx, xxp(xx) xxq(xx) 1 xx P xx Q xx, premise 2 xxxx(xx) premise 3 x 0 P(x 0 ) Q(x 0 ) xx e1 4 P(x 0 ) xx e2 5 Q(x 0 ) e3,4 6 xx Q(xx) xx iii 5

30 Disjunction Rules Introduction Rule φ φ ψ i1 ψ φ ψ i2 Elimination Rule (proof by case analysis) φ ψ φ χ χ ψ χ e

31 Existential Quantification Rules Introduction Rule φ[t/x] x φ x i Elimination Rule (proof by case analysis) x φ x 0 χ φ[x 0 /x] χ e

32 Example Proof xx Q xx R xx, xx(p xx Q(xx)) xx(p xx R(xx)) 1 xx Q xx R xx, premise 2 xx(p xx Q(xx)) premise 3 x 0 P(x 0 ) Q(x 0 ) assumption 4 Q xx 0 R xx 0 xx e1 5 Q(x 0 ) e R xx 0 ee 4,5 7 P(x 0 ) e P(x 0 ) R(x 0 ) i7,6 9 xx(p xx R(xx)) xxi 8 10 xx(p xx R(xx)) xxe 2,3-9

33 Quantifier Equivalences 1. x ϕ x ϕ 2. x ϕ x ϕ 3. x ϕ ψ x (ϕ ψ) [x not free in ψ] 4. x ϕ ψ x (ϕ ψ) 5. x ϕ ψ x (ϕ ψ) 6. x ϕ ψ x (ϕ ψ) 7. x (ψ ϕ) ψ x ϕ 8. x (ϕ ψ) x ϕ ψ 9. x (ϕ ψ) x ϕ ψ 10. x (ψ ϕ) ψ x ϕ

34 Quantifier Equivalences 1. x ϕ x ψ x (ϕ ψ) 2. x ϕ x ψ x (ϕ ψ) 3. x y ϕ y x ϕ 4. x y ϕ y x ϕ

35 De Morgan s Law (p 1 pp 2 ) ( p 1 pp 2 ) 1 (p 1 pp 2 ) premise 2 ( p 1 pp 2 ) assumption 3 p 1 assumption 4 p 1 pp 2 i e4,2 6 p 1 e p 2 assumption 8 p 1 pp 2 i i 4,2 10 p 2 e (p 1 pp 2 ) i 6,10 12 i 11,1 13 ( p 1 pp 2 ) e 2-12

36 Generalized De Morgan s Law x P(x) x P(x) 1 x P(x) premise 2 x P(x) assumption 3 x 0 4 P(x 0 ) assumption 5 x P(x) x i 4 6 i 5,2 7 P(x 0 ) e x P(x) x i i 8,1 10 x P(x) e 2-9

37 Generalized De Morgan s Law x ϕ x ϕ 1 xϕ premise 2 x

38 Exercise Prove the reverse x ϕ x ϕ

39 Models Let F be a set of functions and P a set of predicates. A model M for (F,P) consists of A non-empty set A [universe] of concrete values For each nullary f F an element of A = f M For each n-ary f F a function f M : A n A For each n-ary P P a subset P M A n

40 Example 1 F = {i} and P = {R,F} i a constant function, R binary and F unary predicates Model A set of states, initial state i, state transitions R, final states F A = {a,b,c} i M = a R M = {(a,a),(a,b),(a,c),(b,c), (c,c)} F M = {b,c}

41 Example 1 y R(i,y) F(i) x y z (R(x,y) R(x,z) y = z ) x y R(x,y)

42 Example 2 F = {e, } and P = { } e a constant function, a binary function, a binary predicate Model string prefix A = {binary strings} e M = ε, M concatenation, M prefix ordering [011 is a prefix of

43 Example 2 x ((x x e) x e x)) x y (y x) y x (y x) x y z ((x y) (y z) (x z)) x y z ((x y) (x z y z))

44 Satisfaction Given a model M for (F,P) and given an environment l : var A the satisfaction relation M l ϕ P(t 1,,t n ) (a 1,,a n ) and M l ϕ iff (a 1,,a n ) R M M l x ψ iff M l [x a]ψ holds for all a A M l x ψ iff M l [x a]ψ holds for some a A

45 Satisfaction Given a model M for (F,P) and given an environment l : var A the satisfaction relation M l ϕ M l ψ iff M l ψ does not hold M l ψ 1 ψ 2 iff M l ψ 1 and M l ψ 2 holds M l ψ 1 ψ 2 iff M l ψ 1 or M l ψ 2 holds M l ψ 1 ψ 2 iff M l ψ 2 holds whenever M l ψ 1 holds

46 Semantic Entailment For propositional calculus: If for all valuations (assignments of variables to truth values) for which all φ 1,,φ n evaluate to true, ψ also evaluates to true then the semantic entailment relation φ 1,,φ n ψ holds Decidable using truth tables

47 Semantic Entailment Let Γ be a set of formulas (possibly infinite) and ψ be a formula from predicate calculus Γ ψ holds iff for all models M and lookup tables l, whenever M l ϕ holds for all ϕ Γ then M l ψ holds as well ψ is satisfiable iff there is some model M and lookup table l such that M l ψ holds ψ is valid iff M l ψ holds for all models M and lookup tables l

48 Soundness and Completeness φ 1,,φ n ψ holds iff φ 1,,φ n ψ is valid In particular, ψ, a tautology, ψ is valid. I.E. ψ is a tautology iff ψ is provable Soundness you can not prove things that are not true in the truth table sense Completeness you can prove anything that is true in the truth table sense

49 Post Correspondence Given a finite sequence (s 1,t 1 ),,(s k,t k ) of pairs of binary strings. Is there a sequence of indices i 1,i 2,,i n such that s i 1 s in = t i1 t i n Example s 1 = 1, s 2 = 10, s 3 = 011 t 1 = 101, t 2 = 00, t 3 = 11 Solution (1,3,2,3)

50 Undecidability Theorem. The decision problem of validity for predicate calculus is undecidable: no program exists which, given any ϕ, can determine in a finite amount of time if ϕ Proof reduce to Post Correspondence problem. I.E. show that if the decision problem is solvable, we could solve the Post Correspondence problem. This is a contradiction.

51 Consequences of Undecidability From the soundness and completeness of predicate logic, which states that ϕ iff ϕ, we infer that we can not decide provability either Since ϕ is satisfiable iff ϕ is valid, we infer that satisfiability for predicate calculus is also undecidable.

52 Proof Construct a formula ϕ such that ϕ holds iff the corresponding Post correspondence problem has a solution. ϕ = ϕ 1 ϕ 2 ϕ 3 ϕ 1 = i=1..k P(f si (e),f ti (e)) ϕ 2 = v w (P(v,w) i=1..k P(f si (v),f ti (w))) ϕ 3 = z P(z,z)

53 Proof Find model which tells us the Post Correspondence problem has a solution e M = empty string f 0 (s) = s0, f 1 (s) = s1 P M = {(s,t) there is a sequence of indices i 1,i 2,,i n such that s i 1 s in = t i1 t in } Since ϕ holds M ϕ holds Both M ϕ 1 and M ϕ 2 holds so it follows that M ϕ 3 holds. This tells us there is a solution to the given PC problem

54 Proof Conversely assume that the PCP C has a solution i 1,i 2,,i n Show that if M is any model having a constant e M, two unary functions f0 M and f1 M, and a binary predicate P M, then the model has to satisfy ϕ Need to show if M ϕ 1 ϕ 2 then M ϕ 3

55 Proof Encode strings in A interpret(ε) = e M interpret(s0) = f 0M (interpret(s)) interpret(s1) = f 1M (interpret(s)) Interpret(011) = f 1 M (f 1 M (f 0M (e M ))) Since M ϕ 1, (interpret(s i ),interpret(t i )) P M Since M ϕ 2, If (s,t) P M then (interpret(ss i ),interpret(tt i )) P M

56 Proof Therefore, (interpret(s i1 s in ),interpret(t i1 t in )) P M Since i 1,i 2,,i n is a solution to the PCP interpret(s i1 s in ) = interpret(t i1 t in ) and z P(z,z) in M and thus M ϕ 3

57 Reachabilty When modeling systems via states and state transitions, we want to show that a bad state can not be reached from a good state. Given nodes n and n in a directed graph, is there a finite path of transitions from n to n. s0 s3 A = {s0,s1,s2,s3} R M = {(s0,s1), (s1,s0), (s1,s1),(s1,s2), (s2,s0),(s3,s0),(s3,s2)} s1 s2

58 Compactness Theorem Let Γ be a set of sentences of predicate calculus. If all finite subsets of Γ are satisfiable, then so is Γ. Proof uses soundness and completeness and finite length of proofs.

59 Reachability is Not Expressible Can reachability be expressed in predicate calculus? u=v x (R(u,x) R(x,v)) x 1 x 2 (R(u,x 1 ) R(x 1,x 2 ) R(x 2,v)) This is infinite The answer is no! Proof follows from compactness theorem.

60 Reachability is Not Expressible Theorem. There is no predicate-logic formula ϕ with u and v as its only free variables and R its only predicate such that ϕ holds in directed graphs iff there is a path from u to v. Proof. By contradiction. Suppose there is such a formula. Let ϕ n be the formula expressing that there is a path from c to c ϕ n = x 1 x n-1 (R(c,x 1 ) R(x n-1,c)).

61 Reachability is Not Expressible Proof. By contradiction. Suppose there is such a formula ϕ. Let ϕ n be the formula expressing that there is a path from c to c ϕ n = x 1 x n-1 (R(c,x 1 ) R(x n-1,c)). = { ϕ i I 0} ϕ[c/u][c /v] is unsatisfiable, but any finite subset is satisfiable. By compactness this leads to a contradiction and hence there is no such ϕ.

62 Reachability via HOL Encode Transitive closure P x y z (C 1 C 2 C 3 C 4 ) C 1 = P(x,x) C 2 = P(x,y) P(y,z) P(x,y) C 3 = P(u,v) C 4 = R(x,y) P(x,y) Note quantifier applied to predicate P (Existential second order logic)

63 Reachability via HOL Obtain formula for the existence of a path from u to v by negating previous formula (use DeMorgan s law) P x y z ( C 1 C 2 C 3 C 4 ) If both and can range over predicates then second order logic.

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

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

15414/614 Optional Lecture 3: Predicate Logic

15414/614 Optional Lecture 3: Predicate Logic 15414/614 Optional Lecture 3: Predicate Logic Anvesh Komuravelli 1 Why Predicate Logic? Consider the following statements. 1. Every student is younger than some instructor. 2. Not all birds can fly. Propositional

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

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

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

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

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

Predicate Logic. Bow-Yaw Wang. Institute of Information Science Academia Sinica, Taiwan. November 22, 2017

Predicate Logic. Bow-Yaw Wang. Institute of Information Science Academia Sinica, Taiwan. November 22, 2017 Predicate Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan November 22, 2017 Bow-Yaw Wang (Academia Sinica) Predicate Logic November 22, 2017 1 / 157 8 The Coq Proof Assistant

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

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

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

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 First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

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

More information

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

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

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

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

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

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

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

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson Natural Deduction Formal Methods in Verification of Computer Systems Jeremy Johnson Outline 1. An example 1. Validity by truth table 2. Validity by proof 2. What s a proof 1. Proof checker 3. Rules of

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

Natural Deduction for Propositional Logic

Natural Deduction for Propositional Logic Natural Deduction for Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 10, 2018 Bow-Yaw Wang (Academia Sinica) Natural Deduction for Propositional Logic

More information

Predicate Logic & Quantification

Predicate Logic & Quantification Predicate Logic & Quantification Things you should do Homework 1 due today at 3pm Via gradescope. Directions posted on the website. Group homework 1 posted, due Tuesday. Groups of 1-3. We suggest 3. In

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

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s Summary Summary Last Lecture Computational Logic Π 1 Γ, x : σ M : τ Γ λxm : σ τ Γ (λxm)n : τ Π 2 Γ N : τ = Π 1 [x\π 2 ] Γ M[x := N] Georg Moser Institute of Computer Science @ UIBK Winter 2012 the proof

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

Outline. Logic. Definition. Theorem (Gödel s Completeness Theorem) Summary of Previous Week. Undecidability. Unification

Outline. Logic. Definition. Theorem (Gödel s Completeness Theorem) Summary of Previous Week. Undecidability. Unification Logic Aart Middeldorp Vincent van Oostrom Franziska Rapp Christian Sternagel Department of Computer Science University of Innsbruck WS 2017/2018 AM (DCS @ UIBK) week 11 2/38 Definitions elimination x φ

More information

Predicate Logic: Introduction and Translations

Predicate Logic: Introduction and Translations Predicate Logic: Introduction and Translations Alice Gao Lecture 10 Based on work by J. Buss, L. Kari, A. Lubiw, B. Bonakdarpour, D. Maftuleac, C. Roberts, R. Trefler, and P. Van Beek 1/29 Outline Predicate

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

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

A Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35

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

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

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I ICS141: Discrete Mathematics for Computer Science I Dept. Information & Computer Sci., Originals slides by Dr. Baek and Dr. Still, adapted by J. Stelovsky Based on slides Dr. M. P. Frank and Dr. J.L. Gross

More information

Announcements CompSci 102 Discrete Math for Computer Science

Announcements CompSci 102 Discrete Math for Computer Science Announcements CompSci 102 Discrete Math for Computer Science Read for next time Chap. 1.4-1.6 Recitation 1 is tomorrow Homework will be posted by Friday January 19, 2012 Today more logic Prof. Rodger Most

More information

Logic: Propositional Logic Truth Tables

Logic: Propositional Logic Truth Tables Logic: Propositional Logic Truth Tables Raffaella Bernardi bernardi@inf.unibz.it P.zza Domenicani 3, Room 2.28 Faculty of Computer Science, Free University of Bolzano-Bozen http://www.inf.unibz.it/~bernardi/courses/logic06

More information

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic CS 103 Discrete Structures Chapter 1 Propositional Logic Chapter 1.1 Propositional Logic 1 1.1 Propositional Logic Definition: A proposition :is a declarative sentence (that is, a sentence that declares

More information

The predicate calculus is complete

The predicate calculus is complete The predicate calculus is complete Hans Halvorson The first thing we need to do is to precisify the inference rules UI and EE. To this end, we will use A(c) to denote a sentence containing the name c,

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

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

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

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

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

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

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

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

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

Predicates and Quantifiers. Nested Quantifiers Discrete Mathematic. Chapter 1: Logic and Proof

Predicates and Quantifiers. Nested Quantifiers Discrete Mathematic. Chapter 1: Logic and Proof Discrete Mathematic Chapter 1: Logic and Proof 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers Dr Patrick Chan School of Computer Science and Engineering South China University of Technology http://125.216.243.100/dm/

More information

Modal Logic. UIT2206: The Importance of Being Formal. Martin Henz. March 19, 2014

Modal Logic. UIT2206: The Importance of Being Formal. Martin Henz. March 19, 2014 Modal Logic UIT2206: The Importance of Being Formal Martin Henz March 19, 2014 1 Motivation The source of meaning of formulas in the previous chapters were models. Once a particular model is chosen, say

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

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

Section Summary. Section 1.5 9/9/2014

Section Summary. Section 1.5 9/9/2014 Section 1.5 Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements into Statements involving Nested Quantifiers Translated

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

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another. Math 0413 Appendix A.0 Logic Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another. This type of logic is called propositional.

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

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

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

The semantics of propositional logic

The semantics of propositional logic The semantics of propositional logic Readings: Sections 1.3 and 1.4 of Huth and Ryan. In this module, we will nail down the formal definition of a logical formula, and describe the semantics of propositional

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

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures Formal Logic: Quantifiers, Predicates, and Validity CS 130 Discrete Structures Variables and Statements Variables: A variable is a symbol that stands for an individual in a collection or set. For example,

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

Computer-Aided Verification

Computer-Aided Verification Computer-Aided Verification CS745/ECE745 Dr. Borzoo Bonakdarpour University of Waterloo (Fall 2013) Predicate Logic and Theorem Proving (Some Slides Adapted from Nancy Day s Lectures) Computer-Aided Verification

More information

INF3170 / INF4171 Notes on Resolution

INF3170 / INF4171 Notes on Resolution INF3170 / INF4171 Notes on Resolution Andreas Nakkerud Autumn 2015 1 Introduction This is a short description of the Resolution calculus for propositional logic, and for first order logic. We will only

More information

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional) Predicate Logic 1 Section Summary Predicates Variables Quantifiers Universal Quantifier Existential Quantifier Negating Quantifiers De Morgan s Laws for Quantifiers Translating English to Logic Logic Programming

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

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

CS720 Class Notes. Steve Revilak

CS720 Class Notes. Steve Revilak CS720 Class Notes Steve Revilak Jan 2007 May 2007 This are Stephen Revilak s course notes from CS720, Logical Foundations of Computer Science. This course was taught by Professor Peter Fejer at UMass

More information

Predicates and Quantifiers. CS 231 Dianna Xu

Predicates and Quantifiers. CS 231 Dianna Xu Predicates and Quantifiers CS 231 Dianna Xu 1 Predicates Consider P(x) = x < 5 P(x) has no truth values (x is not given a value) P(1) is true 1< 5 is true P(10) is false 10 < 5 is false Thus, P(x) will

More information

Predicate Logic. CSE 595 Semantic Web Instructor: Dr. Paul Fodor Stony Brook University

Predicate Logic. CSE 595 Semantic Web Instructor: Dr. Paul Fodor Stony Brook University Predicate Logic CSE 595 Semantic Web Instructor: Dr. Paul Fodor Stony Brook University http://www3.cs.stonybrook.edu/~pfodor/courses/cse595.html 1 The alphabet of predicate logic Variables Constants (identifiers,

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional Logical Operators Conjunction Disjunction Negation Exclusive Or Implication Biconditional 1 Statement meaning p q p implies q if p, then q if p, q when p, q whenever p, q q if p q when p q whenever p p

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

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

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

CSE 1400 Applied Discrete Mathematics Definitions

CSE 1400 Applied Discrete Mathematics Definitions CSE 1400 Applied Discrete Mathematics Definitions Department of Computer Sciences College of Engineering Florida Tech Fall 2011 Arithmetic 1 Alphabets, Strings, Languages, & Words 2 Number Systems 3 Machine

More information

Part I: Propositional Calculus

Part I: Propositional Calculus Logic Part I: Propositional Calculus Statements Undefined Terms True, T, #t, 1 False, F, #f, 0 Statement, Proposition Statement/Proposition -- Informal Definition Statement = anything that can meaningfully

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

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

Final Exam (100 points)

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

More information

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

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

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

More information

Logic Overview, I. and T T T T F F F T F F F F

Logic Overview, I. and T T T T F F F T F F F F Logic Overview, I DEFINITIONS A statement (proposition) is a declarative sentence that can be assigned a truth value T or F, but not both. Statements are denoted by letters p, q, r, s,... The 5 basic logical

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

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

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

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

CS589 Principles of DB Systems Fall 2008 Lecture 4e: Logic (Model-theoretic view of a DB) Lois Delcambre

CS589 Principles of DB Systems Fall 2008 Lecture 4e: Logic (Model-theoretic view of a DB) Lois Delcambre CS589 Principles of DB Systems Fall 2008 Lecture 4e: Logic (Model-theoretic view of a DB) Lois Delcambre lmd@cs.pdx.edu 503 725-2405 Goals for today Review propositional logic (including truth assignment)

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

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Today s class will be an introduction

More information

Logic Part II: Intuitionistic Logic and Natural Deduction

Logic Part II: Intuitionistic Logic and Natural Deduction Yesterday Remember yesterday? classical logic: reasoning about truth of formulas propositional logic: atomic sentences, composed by connectives validity and satisability can be decided by truth tables

More information

CHAPTER 2. FIRST ORDER LOGIC

CHAPTER 2. FIRST ORDER LOGIC CHAPTER 2. FIRST ORDER LOGIC 1. Introduction First order logic is a much richer system than sentential logic. Its interpretations include the usual structures of mathematics, and its sentences enable us

More information

Propositional Resolution Introduction

Propositional Resolution Introduction Propositional Resolution Introduction (Nilsson Book Handout) Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 SYNTAX dictionary Literal any propositional VARIABLE

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

Computational Logic. Recall of First-Order Logic. Damiano Zanardini

Computational Logic. Recall of First-Order Logic. Damiano Zanardini Computational Logic Recall of First-Order Logic Damiano Zanardini UPM European Master in Computational Logic (EMCL) School of Computer Science Technical University of Madrid damiano@fi.upm.es Academic

More information

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Why Learning Logic? Logic. Propositional Logic. Compound Propositions Logic Objectives Propositions and compound propositions Negation, conjunction, disjunction, and exclusive or Implication and biconditional Logic equivalence and satisfiability Application of propositional

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

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

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