EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Predicate Logic Colin Campbell. A Formal Language Predicate Logic provides a way to formalize natural language so that ambiguity is removed. Mathematical.
Completeness and Expressiveness
Logic Concepts Lecture Module 11.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
Predicate Calculus Formal Methods in Verification of Computer Systems Jeremy Johnson.
Elementary Number Theory and Methods of Proof
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 3 Syntax of Propositional Logic Parse trees revised Construction of parse trees Semantics of propositional.
CMSC 250 Discrete Structures Exam #1 Review. 21 June 2007Exam #1 Review2 Symbols & Definitions for Compound Statements pq p  qp  qp  qp  qp  q 11.
So far we have learned about:
Discrete Mathematics Math 6A Instructor: M. Welling.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 12 Number theory Mathematical induction Proof by induction Examples.
EE1J2 – Discrete Maths Lecture 5
EE1J2 – Discrete Maths Lecture 5 Analysis of arguments (continued) More example proofs Formalisation of arguments in natural language Proof by contradiction.
Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 11 Introduction to Predicate Logic Limitations of Propositional Logic Predicates, quantifiers and propositions.
Introduction to Logic for Artificial Intelligence Lecture 2 Erik Sandewall 2010.
Adapted from Discrete Math
Harper Langston New York University Summer 2015
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Section 1.3: Predicates and Quantifiers
Propositional Logic Review
Chapter 1: The Foundations: Logic and Proofs
Review I Rosen , 3.1 Know your definitions!
Logical Form and Logical Equivalence Lecture 2 Section 1.1 Fri, Jan 19, 2007.
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Copyright © Curt Hill Mathematical Logic An Introduction.
Course Overview and Road Map Computability and Logic.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
SSK3003 DISCRETE STRUCTURES
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
1 CA 208 Logic PQ PQPQPQPQPQPQPQPQ
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
CS6133 Software Specification and Verification
1 Introduction to Abstract Mathematics Proofs in Predicate Logic , , ~, ,  Instructor: Hayk Melikya Purpose of Section: The theorems.
LOGIC AND QUANTIFIERS. INTRODUCTION Many algorithms and proofs use logical expressions such as: “IF p THEN q” or “If p1 AND p2, THEN q1 OR q2” Therefore.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Method of proofs.  Consider the statements: “Humans have two eyes”  It implies the “universal quantification”  If a is a Human then a has two eyes.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
1 Introduction to Abstract Mathematics Chapter 3: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 3.1.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Propositional and predicate logic
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Chapter 1 Logic and proofs
Predicate Calculus CS 270 Math Foundations of Computer Science Jeremy Johnson Presentation uses material from Huth and Ryan, Logic in Computer Science:
3. The Logic of Quantified Statements Summary
Introduction to Logic for Artificial Intelligence Lecture 2
CSE15 Discrete Mathematics 01/23/17
Great Theoretical Ideas in Computer Science
CMSC Discrete Structures
CS201: Data Structures and Discrete Mathematics I
Logics for Data and Knowledge Representation
1st-order Predicate Logic (FOL)
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
CS201: Data Structures and Discrete Mathematics I
1st-order Predicate Logic (FOL)
Presentation transcript:

EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse trees Formalising NL statements in predicate logic Standard equivalences in predicate logic Propositional Logic revisited The Completeness Theorem

EE1J2 - Slide 2 DNF - Example Let p, q and r be atomic propositions Consider f = (p  (q  r))  ((p  q)  r) How do we put this in disjunctive normal form? Use the construction from the proof of the theorem.

EE1J2 - Slide 3 Truth table for f (p(p  (q(q  r))  ((p  q)q)  r)r) TTTTTTTTTTT TFTFFTTTTFF TTFTTTTFFTT TTFTFTTFFTF FTTTTTFTTTT FTTFFFFTTFF FTFTTTFTFTT FTFTFFFTFFF

EE1J2 - Slide 4 Example (continued) From row 1: (p  q  r) From row 2: (p  q  r) From row 3: (p  q  r) From row 4: (p  q  r) From row 5: (  p  q  r) From row 7: (  p  q  r) Hence the desired formula is: (p  q  r)  (p  q  r)  (p  q  r)  (p  q  r)  (  p  q  r)  (  p  q  r)

EE1J2 - Slide 5 Switching Circuits Connections between propositional logic and switching circuits Can think of a truth table as indicating the ‘output’ of a particular circuit once its inputs have been set to ‘On’ or ‘Off’ Now know that any desired behaviour can be obtained provided that the gates of the circuit can instantiate the connectives ,  and 

EE1J2 - Slide 6 nand and nor gates Most common gates are nand gates and nor gates. Their truth tables are given by Truth tables for nand and nor pqp nand qp nor q TTFF TFTF FTTF FFTT

EE1J2 - Slide 7 Theorem 3 Adequacy of nand and nor Theorem: The sets {nand} and {nor} are both adequate Proof {nand}: Since { ,  } is adequate, enough to show that  and  can be expressed in terms of nand. Let p and q be atomic propositions. Then:  p  p nand p and p  q  (p nand q) nand (p nand q)

EE1J2 - Slide 8 Proof (continued) For {nor}: It is enough to notice that:  p  p nor p p  q  (p nor p) nor (q nor q)

EE1J2 - Slide 9 Arithmetic Semantics of a system like arithmetic cannot be expressed in propositional logic. We’ve already discussed formulae such as (x < 5). The truth or falsehood of this formula obviously depends on the value of x

EE1J2 - Slide 10 The qualifiers  and  A more powerful language for describing arithmetic is provided by the introduction of the qualifiers  and . (  x) (x < 5) is clearly true (there exists an x such that x < 5 ) (  x) (x < 5) is clearly false (for all x, x < 5 )

EE1J2 - Slide 11 The Predicates = and < Formally, the symbols = and < are (binary) predicates, since they express properties of pairs of terms in arithmetic So, instead of x < 5 could write P(x) where P(x) denotes the property x < 5

EE1J2 - Slide 12 The functions + and  The symbols + and  are (binary) functions A (binary) function associates pairs of elements in the domain with single elements in the domain

EE1J2 - Slide 13 Predicate Logic: Syntax Predicate logic is defined in terms three types of ingredient: Symbols, Terms, and Formulae

EE1J2 - Slide 14 Symbols of Predicate Logic The symbols of predicate logic are Logical symbols: , , , ,  and  Brackets: (, ) Variables: x, y, z, x 0, x 1,… Constants: a, b, c,… Functions: f, g (number of arguments specified) Predicate symbols: P, Q, R,… (number of arguments specified) Contradiction formula: 

EE1J2 - Slide 15 Terms of Predicate Logic The terms of predicate logic are defined as follows: Any variable or constant is a term If f is an n place function and t 1,…,t n are terms, then f(t 1,…,t n ) is a term

EE1J2 - Slide 16 Formulae of Predicate Logic If R is an n place predicate and t 1,…,t n are terms, then R(t 1,…,t n ) is a formula (called an atomic formula  is a formula If A and B are formulae, then so are  A, A  B, A  B, A  B, (  x)(A), (  x)(A)

EE1J2 - Slide 17 Parse Tree: Formulae Suppose P is a unary predicate (i.e. a predicate that has one argument), S is the successor function from arithmetic, which associates each natural number with the next biggest natural number (I.e. S(n)=n+1 ) n is a variable. Consider the formula P(0)  {(  n)(P(n)  P(S(n)))}  (  n)P(n)

EE1J2 - Slide 18 Parse Tree for Formula   nn P(n)P(n) P(0)P(0) nn  P(n)P(n) P(sn) Parse tree for the predicate logic formula P(0)  {(  n)(P(n)  P(S(n)))}  (  n)P(n). The tree shows how the formula is built up from atomic formulae

EE1J2 - Slide 19 Formalising ‘NL’ statements in Predicate Logic “Everyone in the room spoke French or German” In propositional logic look for atomic propositions In predicate logic look for predicates

EE1J2 - Slide 20 Identification of predicates Everyone in the room spoke French or German Three predicates: R(x) : x was a person in the room F(x) : x spoke French G(x) : x spoke German

EE1J2 - Slide 21 Formalisation Re-state natural language statement in a form closer to predicate logic: For every x, if x was a person in the room, then x spoke French or x spoke German Formally: (  x)(P(x)  (F(x)  G(x)))

EE1J2 - Slide 22 Another example: “Everyone in the room spoke French or German” becomes: (  x)(P(x)  (F(x)  G(x))) “Someone in the room spoke French or German” becomes: (  x)(P(x)  (F(x)  G(x)))

EE1J2 - Slide 23 The Scope of a Quantifier In a formula (  x)(  ) or (  x)(  ), the formula  is called the scope of the quantifier  x or  x The variable x is bound if it falls immediately to the right of  or , or within the scope of the qualifier  x or  x If a variable is not bound, then it is free A formula with no free variables is called a sentence

EE1J2 - Slide 24 Example Consider the formula {(  x)(P(x,y))}  Q(x,y) First two occurrences of the variable x are bound and the third is free All occurrences of y are free This formula is not a sentence

EE1J2 - Slide 25 Example (  x)(x = y  x 2 +x < 5  x < 5)  x = 5y 2 The variable x occurs 6 times: - First 5 are bound, last is free - All occurrences of y and z are free - Bound occurrences of x can be substituted by other symbols (not y or z, though) - y and z cannot be substituted Hence, original formula is equivalent to (  a)(a = y  a 2 +a < 5  a < 5)  x = 5y 2

EE1J2 - Slide 26 Semantics in Predicate Logic Two formulae f and g in predicate logic are said to be logically equivalent if for any interpretation, f is true if and only g is true. In this case we write f  g. This is not rigorous, but will do for now!

EE1J2 - Slide 27 Some equivalences f and g are formulae in predicate logic x and y are variables such that x does not occur bound in f or at all in g y does not occur at all in f or g Then:  x(f(x))   x(  f(x)),  x(f(x))   x(  f(x)) (  xf )  g  (  x f  g), (  x f)  g   x (f  g)

EE1J2 - Slide 28 More equivalences… (  xf )  g  (  x f  g), (  x f)  g   x (f  g) (  xf )  g   x( f  g), and (  xf )  g   x( f  g) f  (  xg)   x( f  g), and f  (  xg)   x( f  g)  xf(x)   yf(y),  xf(x)   yf(y)

EE1J2 - Slide 29 Proofs of equivalences  x(f(x))   x(  f(x)) Suppose  x(f(x)) Then it is not true that f(x) holds for all x Therefore there must be at least one x for which it does not hold, i.e. for which f(x) is false Or, formally,  x(  f(x)) Conversely, suppose  x(  f(x)).

EE1J2 - Slide 30 Proof (continued)  x(f(x))   x(  f(x)) suppose  x(  f(x)) Then there exists an x such that f(x) is false So it is not true that f(x) holds for all x …which is the meaning of  x(f(x))

EE1J2 - Slide 31 Analysis of Arguments in Propositional Logic So far, our analysis of the ‘soundness’ of an argument is based on logical consequence: Given an argument in NL, First identify the set  of formulae which are premises Then identify the formula f which is the consequence Then demonstrate that  ⊨ f (or not)

EE1J2 - Slide 32 Method We have two techniques to prove or disprove logical consequence: Proof by contradiction: To show that  ⊨ f is true, assume there is a truth function such that each formula in  is true and f is false. Deduce that one of the formulae in  must be false – contradiction! Proof by counter-example: To show that  ⊨ f is false, find a truth function such that each formula in  is true but f is false

EE1J2 - Slide 33 ‘Syntactic’ Proof ‘Logical Consequence’ is defined in terms of the semantics of Propositional Logic An alternative definition of the soundness of an argument might be based solely on the syntax of Propositional Logic Closer to the intuitive notion of proof

EE1J2 - Slide 34 Proofs in Propositional Logic In mathematics, a proof is a sequence of steps, each of which is: Self-evident (or axiomatic), or An explicitly stated assumption, or Deduced from previous steps by sound logical reasoning

EE1J2 - Slide 35 Completeness Theorem for Propositional Logic If  is a set of formulae in Propositional Logic, and f is a formula in Propositional Logic, then  ⊨ f if and only if  ⊢ f f is a logical consequence of  if and only if f is provable from 

EE1J2 - Slide 36 Summary of Lecture 6 Limitations of propositional logic Introduction to predicate logic Formalising NL statements in predicate logic Standard equivalences in predicate logic Propositional Logic revisited The Completeness Theorem