Topic #3 Predicate Logic. Predicate Logic

Similar documents
Bits and Bit Operations. Today s topics

ICS141: Discrete Mathematics for Computer Science I

The Fundamentals of Logic. Foundations of Logic. Foundations of Logic. CMSC 302 Propositional Logic. In Rosen, ~98 slides, ~3 lectures

ICS141: Discrete Mathematics for Computer Science I

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Predicate Calculus lecture 1

ICS141: Discrete Mathematics for Computer Science I

Section Summary. Section 1.5 9/9/2014

Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

Discrete Structures for Computer Science

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

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

CSI30. Chapter 1. The Foundations: Logic and Proofs Nested Quantifiers

Predicate Logic & Quantification

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

Mat 243 Exam 1 Review

Review: Potential stumbling blocks

Propositional Functions. Quantifiers. Assignment of values. Existential Quantification of P(x) Universal Quantification of P(x)

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

Propositional Logic Not Enough

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

University of Aberdeen, Computing Science CS2013 Predicate Logic 4 Kees van Deemter

Predicates, Quantifiers and Nested Quantifiers

Formal (Natural) Deduction for Predicate Calculus

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

Lecture 4. Predicate logic

LIN1032 Formal Foundations for Linguistics

Chapter 2: The Logic of Quantified Statements

Thinking of Nested Quantification

Predicate in English. Predicates and Quantifiers. Predicate in Logic. Propositional Functions: Prelude. Propositional Function

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

A Little Deductive Logic

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

DISCRETE MATHEMATICS BA202

Section 2.1: Introduction to the Logic of Quantified Statements

A Little Deductive Logic

First order Logic ( Predicate Logic) and Methods of Proof

Propositional and First-Order Logic

THE LOGIC OF QUANTIFIED STATEMENTS

Proposi'onal Logic Not Enough

Exercise Set 1 Solutions Math 2020 Due: January 30, Find the truth tables of each of the following compound statements.

Lecture 3 : Predicates and Sets DRAFT

CSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker

Nested Quantifiers. Predicates and. Quantifiers. Agenda. Limitation of Propositional Logic. Try to represent them using propositional.

Chapter 1, Part II: Predicate Logic

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Logic and Propositional Calculus

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

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

Logic and Propositional Calculus

2. Use quantifiers to express the associative law for multiplication of real numbers.

I thank the author of the examination paper on which sample paper is based. VH

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Chapter 2: The Logic of Quantified Statements. January 22, 2010

The Limit of Humanly Knowable Mathematical Truth

1.3 Predicates and Quantifiers

III. Elementary Logic

CSC165 Mathematical Expression and Reasoning for Computer Science

Logic for Computer Science Handout Week 8 DERIVED RULE MODUS TOLLENS DERIVED RULE RAA DERIVED RULE TND

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

For all For every For each For any There exists at least one There exists There is Some

Chapter 3. The Logic of Quantified Statements

Logic. Quantifiers. (real numbers understood). x [x is rotten in Denmark]. x<x+x 2 +1

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

Chapter 16. Logic Programming. Topics. Logic Programming. Logic Programming Paradigm

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Introduction to first-order logic:

Logic and Proofs. (A brief summary)

Test 1 Solutions(COT3100) (1) Prove that the following Absorption Law is correct. I.e, prove this is a tautology:

Introduction to Sets and Logic (MATH 1190)

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Today s Lecture. ICS 6B Boolean Algebra & Logic. Predicates. Chapter 1: Section 1.3. Propositions. For Example. Socrates is Mortal

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

Philosophy 240 Symbolic Logic Russell Marcus Hamilton College Fall 2014

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

2-4: The Use of Quantifiers

Proof. Theorems. Theorems. Example. Example. Example. Part 4. The Big Bang Theory

Quantifiers Here is a (true) statement about real numbers: Every real number is either rational or irrational.

1 Propositional Logic

Discrete Mathematics and Its Applications

Logic and Proof. Aiichiro Nakano

Logic. Lesson 3: Tables and Models. Flavio Zelazek. October 22, 2014

06 From Propositional to Predicate Logic

CS 220: Discrete Structures and their Applications. Predicate Logic Section in zybooks

Logic Background (1A) Young W. Lim 12/14/15

Predicate Logic. Andreas Klappenecker

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.

STRATEGIES OF PROBLEM SOLVING

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

ITS336 Lecture 6 First-Order Logic

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

Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Math.3336: Discrete Mathematics. Nested Quantifiers

ECOM Discrete Mathematics

PREDICATE LOGIC. Schaum's outline chapter 4 Rosen chapter 1. September 11, ioc.pdf

Transcription:

Predicate Logic

Predicate Logic Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional logic treats simple propositions (sentences) as atomic entities. In contrast, predicate logic distinguishes the subject of a sentence from its predicate. Remember these English grammar terms?

Other Applications Predicate logic is the foundation of the field of mathematical logic, which culminated in Gödel s incompleteness theorem, which revealed the ultimate limits of mathematical thought: Given any finitely describable, consistent proof procedure, there will still be some true statements that can never be proven by that procedure. I.e., we can t discover all mathematical truths, unless we sometimes resort to making guesses.

Practical Applications Basis for clearly expressed formal specifications for any complex system. Basis for automatic theorem provers and many other Artificial Intelligence systems. Supported by some of the more sophisticated database query engines and container class libraries (these are types of programming tools).

More About Predicates Convention: Lowercase variables x, y, z... denote objects/entities; uppercase variables P, Q, R denote propositional functions (predicates). Keep in mind that the result of applying a predicate P to an object x is the proposition P(x). But the predicate P itself (e.g. P= is sleeping ) is not a proposition (not a complete sentence). E.g. if P(x) = x is a prime number, P(3) is the proposition 3 is a prime number.

Propositional Functions Predicate logic generalizes the grammatical notion of a predicate to also include propositional functions of any number of arguments, each of which may take any grammatical role that a noun can take. E.g. let P(x,y,z) = x gave y the grade z, then if x= Mike, y= Mary, z= A, then P(x,y,z) = Mike gave Mary the grade A.

Quantifier Expressions Quantifiers provide a notation that allows us to quantify (count) how many objects in the universe of disclosure satisfy a given predicate. is the FOR LL or universal quantifier. x P(x) means for all x in the u.d., P holds. is the XISTS or existential quantifier. x P(x) means there exists an x in the u.d. (that is, 1 or more) such that P(x) is true.

Free and Bound Variables An expression like P(x) is said to have a free variable x (meaning, x is undefined). A quantifier (either or ) operates on an expression having one or more free variables, and binds one or more of those variables, to produce an expression having one or more bound variables.

Example of Binding P(x,y) has 2 free variables, x and y. x P(x,y) has 1 free variable, and one bound variable. [Which is which?] P(x), where x=3 is another way to bind x. An expression with zero free variables is a bona-fide (actual) proposition. An expression with one or more free variables is still only a predicate: x P(x,y)

Quantifier Equivalence Laws Definitions of quantifiers: If u.d.=a,b,c, x P(x) P(a) P(b) P(c) x P(x) P(a) P(b) P(c) From those, we can prove the laws: x P(x) x P(x) x P(x) x P(x) Which propositional equivalence laws can be used to prove this?

Review: Predicate Logic Objects x, y, z, Predicates P, Q, R, are functions mapping objects x to propositions P(x). Multi-argument predicates P(x, y). Quantifiers: [ x P(x)] : For all x s, P(x). [ x P(x)] : There is an x such that P(x). Universes of discourse, bound & free vars.

Nesting of Quantifiers Example: Let the u.d. of x & y be people. Let L(x,y)= x likes y (a predicate w. 2 f.v. s) Then y L(x,y) = There is someone whom x likes. (A predicate w. 1 free variable, x) Then x ( y L(x,y)) = Everyone has someone whom they like. (A with free variables.)

Quantifier Exercise If R(x,y)= x relies upon y, express the following in unambiguous English: x( y R(x,y))= y( x R(x,y))= x( y R(x,y))= y( x R(x,y))= x( y R(x,y))= Everyone has someone to rely on. There s a poor overburdened soul whom everyone relies upon (including himself)! There s some needy person who relies upon everybody (including himself). Everyone has someone who relies upon them. Everyone relies upon everybody, (including themselves)!

Natural language is ambiguous! Everybody likes somebody. For everybody, there is somebody they like, x y Likes(x,y) or, there is somebody (a popular person) whom everyone likes? y x Likes(x,y) Somebody likes everybody. [Probably more likely.] Same problem: Depends on context, emphasis.

More to Know About Binding x x P(x) - x is not a free variable in x P(x), therefore the x binding isn t used. ( x P(x)) Q(x) - The variable x is outside of the scope of the x quantifier, and is therefore free. Not a complete proposition! ( x P(x)) ( x Q(x)) This is legal, because there are 2 different x s!

More Equivalence Laws x y P(x,y) y x P(x,y) x y P(x,y) y x P(x,y) x (P(x) Q(x)) ( x P(x)) ( x Q(x)) x (P(x) Q(x)) ( x P(x)) ( x Q(x))

Calculus Example One way of precisely defining the calculus concept of a limit, using quantifiers: ( ) ( ) ( ) < < > > = ε δ δ ε ) ( : 0 : 0 : ) ( lim L x f a x x L x f a x Topic #3 Predicate Logic

Example Definitions: H(x) : x is human ; M(x) : x is mortal ; G(x) : x is a god Premises: x H(x) M(x) ( Humans are mortal ) and x G(x) M(x) ( Gods are immortal ). Show that x (H(x) G(x)) ( No human is a god. )

The Derivation x H(x) M(x) and x G(x) M(x). x M(x) H(x) [Contrapositive.] x [G(x) M(x)] [ M(x) H(x)] x G(x) H(x) [Transitivity of.] x G(x) H(x) [Definition of.] x (G(x) H(x)) [DeMorgan s law.] x G(x) H(x) [An equivalence law.]

Predicate Logic From these sections you should have learned: Predicate logic notation & conventions Conversions: predicate logic clear English Meaning of quantifiers, equivalences Simple reasoning with quantifiers