Predicate Logic. Predicates. Math 173 February 9, 2010

Similar documents
Discrete Mathematics: An Open Introduction

Recall that the expression x > 3 is not a proposition. Why?

Propositional Logic Not Enough

Predicate Calculus lecture 1

1 Predicates and Quantifiers

Section Summary. Section 1.5 9/9/2014

Discrete Mathematics and Its Applications

Math 3336: Discrete Mathematics Practice Problems for Exam I

Predicates, Quantifiers and Nested Quantifiers

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

STRATEGIES OF PROBLEM SOLVING

We have seen that the symbols,,, and can guide the logical

Chapter 1 Review of Equations and Inequalities

Supplementary Logic Notes CSE 321 Winter 2009

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

Section 1.1: Logical Form and Logical Equivalence

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

CS 2800: Logic and Computation Fall 2010 (Lecture 13)

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

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

Introduction to Sets and Logic (MATH 1190)

ICS141: Discrete Mathematics for Computer Science I

15414/614 Optional Lecture 3: Predicate Logic

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

CSE Discrete Structures

Lecture 3 : Predicates and Sets DRAFT

Introduction to Logic and Axiomatic Set Theory

Section 2.3: Statements Containing Multiple Quantifiers

Mat 243 Exam 1 Review

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

Chapter 1 Elementary Logic

Section 3.1: Direct Proof and Counterexample 1

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

Logic and Propositional Calculus

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

Predicate Logic & Quantification

Some Review Problems for Exam 1: Solutions

Math Real Analysis

MACM 101 Discrete Mathematics I. Exercises on Predicates and Quantifiers. Due: Tuesday, October 13th (at the beginning of the class)

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Homework assignment 1: Solutions

Notes from How to Prove it: A Structured Approach by Daniel J. Velleman

CM10196 Topic 2: Sets, Predicates, Boolean algebras

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

Mathematical Preliminaries. Sipser pages 1-28

Discrete Structures Lecture Predicates and Quantifiers

LECTURE 1. Logic and Proofs

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003

This is logically equivalent to the conjunction of the positive assertion Minimal Arithmetic and Representability

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

Section 2.1: Introduction to the Logic of Quantified Statements

COMP 409: Logic Homework 5

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

HOW TO CREATE A PROOF. Writing proofs is typically not a straightforward, algorithmic process such as calculating

Introducing Proof 1. hsn.uk.net. Contents

Take the Anxiety Out of Word Problems

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Proof Templates 1

EECS 1028 M: Discrete Mathematics for Engineers

Mathematical Logic Part Two

Proof Techniques (Review of Math 271)

3 The language of proof

Propositional and Predicate Logic

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

Practice Test III, Math 314, Spring 2016

Math 5a Reading Assignments for Sections

MA103 STATEMENTS, PROOF, LOGIC

Solutions to Problem Set 1

Logic and Propositional Calculus

1 Propositional Logic

Mathematical Reasoning. The Foundation of Algorithmics

Propositional and Predicate Logic

LING 501, Fall 2004: Quantification

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:

Proposi'onal Logic Not Enough

Logic and Mathematics:

Announcements CompSci 102 Discrete Math for Computer Science

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

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

Completeness in the Monadic Predicate Calculus. We have a system of eight rules of proof. Let's list them:

1.9 Algebraic Expressions

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

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Mathmatics 239 solutions to Homework for Chapter 2

MCS-236: Graph Theory Handout #A4 San Skulrattanakulchai Gustavus Adolphus College Sep 15, Methods of Proof

Truth-Functional Logic

MATH 3325: NOTES TO ACCOMPANY LECTURES. Lecture 1

What is the decimal (base 10) representation of the binary number ? Show your work and place your final answer in the box.

Chapter 1: The Logic of Compound Statements. January 7, 2008

Discrete Structures Lecture 5

University of Ottawa CSI 2101 Midterm Test Instructor: Lucia Moura. March 1, :00 pm Duration: 1:15 hs

Math.3336: Discrete Mathematics. Nested Quantifiers

Proofs. Chapter 2 P P Q Q

SYMBOLIC LOGIC UNIT 10: SINGULAR SENTENCES

HOW TO WRITE PROOFS. Dr. Min Ru, University of Houston

Math 10850, fall 2017, University of Notre Dame

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Section A (not in the text) Which of the following are statements? Explain. 3. The President of the United States in 2089 will be a woman.

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

1.1 Language and Logic

Mathematical Logic Part One

Transcription:

Math 173 February 9, 2010 Predicate Logic We have now seen two ways to translate English sentences into mathematical symbols. We can capture the logical form of a sentence using propositional logic: variables represent propositions (statements) and we combine these variables with logical connectives (,,,, and ). Alternatively, we can get at the mathematical content of a sentence by using variables to represent quantities, and setting up an equation or inequality to express the relationship between those quantities. Now we will see how these two methods of representing sentences can be combined. To capture both the mathematical content and the logical content of a sentence, we use predicate logic. Predicates We can think of predicates as properties of objects. For example, consider the predicate E which we will use to mean is even. Being even is a property of some numbers, so E needs to be applied to something. We will adopt the notation E(x) to mean x is even. (Some books would write Ex instead.) Notice that if we put a number in for x, then this becomes a sentence - and as such can be true or false. So E(2) is true, and E(3) is false. On the other hand E(x) is not true or false, since we don t know what x is. If we have a variable floating around like that, we say the expression is merely a formula, and not a sentence. Since E(2) is a statement (a proposition), we can apply propositional logic go such things. Consider E(2) E(3) which is a true sentence, because it is both the case that 2 is even and that 3 is not even. What we have done here is capture the logical form of the sentence 2 is even and 3 is not as well as the mathematical content. Notice that we can only assert even-ness of a single number at a time. That is to say, E is a one-place predicate. There are also predicates which assert a property of two or more numbers (or other objects) at the same time. Consider the two-place predicate is less than. Perhaps we will use the variable L. Now we can say L(2, 3), which is true because 2 is less than 3. Of course we are already have a symbol for this: 2 < 3. However, what about divides evenly into as a predicate? We can say D(2, 10) is true because 2 divides evenly into 10, while D(3, 10) is false since there is a remainder when you divide 10 by 3. (Incidentally, there is a standard mathematical symbol for this: 2 10 is read 2 divides 10. We ll see this again when we learn some number theory in Chapter 4.) Predicates can be as complicated and have as many places as we want or need. For example, we could R(x, y, z, u, v, w) be the predicate asserting that x, y, z are distinct natural numbers whose only common factor is u, the difference between x and y is v and the difference between y and z is w. This is a silly and most likely useless example, but it is an example of a predicate. It is true of some ordered lists of six numbers, and false of others. Additionally, predicates need not have anything to do with numbers: we could let F (a, b, c, d) be the predicate that asserts that a and b are the only two children of mother c and father d.

Quantifiers Perhaps the most important reason to use predicate logic is that doing so allows for quantification. We can now express statements like ever natural number is either even or odd, and there is a natural number such that no number is less than it. Think back to Calculus and the Mean Value Theorem. It states that for every function f and every interval (a, b), if f is continuous on the interval [a, b] and differentiable on the interval (a, b), then there exists a number c such that a c b and f (c)(b a) = f(b) f(a). Using the correct predicates and quantifiers, we could express this statement entirely in symbols. There are two quantifiers we will be interested in: existential and universal. The existential quantifier is and is read there exists or there is. For example, x(x < 1) asserts that there is a number less than 1. The universal quantifier is and is read for all or every. For example, x(x 1) asserts that every number is greater than or equal to 1. Are these statements true? Well, first notice that they cannot both be true. In fact, they assert exactly the opposite of each other. (Note that x < y (x y) although you might wonder what x and y are here, so it might be better to say x y (x < y (x y)).) Which one is it though? The answer depends entirely on our domain of discourse - the universe over which we quantify. Usually, this universe is clear from the context. If we are only discussing the natural numbers, then x... means for every natural number x.... On the other hand, in calculus we care about the real numbers, so it would mean for every real number x.... If the context is not clear, we might right x N... to mean for every natural number x.... Of course, for the two statements above, the second is true of the natural numbers, the first is true for any larger universe. Some more examples: to say every natural number is either even or odd, we would write, using E and O as the predicates for even and odd respectively: x(e(x) O(x)) To say there is a number such that no number is less than it we would write: x y(y x) Actually, I did a little translation before I wrote that down. The above statement would be literally read there is a number such that every number is greater than or equal to it. This of course amounts to the same thing. However, if I wanted to be exact, I could have also written: x y(y < x). Notice also that say that there is a number for which no number is smaller is equivalent to saying that it is not the case that for every number there is a number small than it: x y(y < x). 2

That these three statements are equivalent is no coincidence. To understand what is going on, we will need to better understand how quantification interacts with the logical connectives, specifically negation. Quantifiers and Connectives What does it mean to say that it is false that there is something that has a certain property? Well, it means that everything does not have that property. What does it mean for it to be false that everything has a certain property? It means that there is something that doesn t have the property. So in symbols, we have: and xp (x) x P (x) xp (x) x P (x). In other words, to move a negation symbol past a quantifier, you must switch the quantifier. This can be done multiple times: x y zp (x, y, z) x y z P (x, y, z). Now we also know how to move negation symbols through other connectives (using DeMorgan s Laws) so it is always possible to rewrite a statement so that the only negation symbols that appear are right in front of a predicate. This hints at the possibility of having a standard form for all predicate sentences. However, to get this we must also understand how to move quantifiers through connectives. Before we get too excited, let us note that we only need to worry about two connectives: and. This is because we can rewrite p q as p q (they are logically equivalent) and p q as (p q) ( p q) (also logically equivalent). Let us consider an example to see what can happen. Again, let s let E be the predicate for being even, and O for being odd. Consider: xe(x) xo(x), which says that there is a number which is even and a number which is odd. This is of course true. However there is no number which is both even and odd, so is false. Note also that x(e(x) O(x)) x(e(x) O(x)) while true is not really the same thing if O is instead the predicate for is less than 1 then the original statement is false, but this new one is true. Changing the quantifier also doesn t help: x(e(x) O(x) 3

is false. So what can we do? The problem is that in the original sentence, the variable x is doing double duty. We want to express the fact that there is an even number and an odd number. But that even number is in no way related to that odd number. So we might as well have said Now we can move the quantifiers out: xe(x) yo(y). x y(e(x) O(y)). The same thing works with and for both with either connective. As long as there is no repeat in quantified variables we can move the quantifiers outside of conjunctions and disjunctions. A warning though: you cannot do this for, at least not directly. Let s see what happens. Consider xp (x) yq(y) for some predicates P and Q. This sentence is not the same as x y(p (x) Q(y)). Remember that p q is the same as p q. So the original sentence is really xp (x) yq(y). Before we move the quantifiers out, we must move the x past the negation sign, which switches it to a x: x P (x) yq(y). Then we can finish by writing, or equivalently We must be similarly careful with. Conclusion x y( P (x) Q(y)) x y(p (x) Q(y)). We have seen how it is possible to capture both the mathematical and logic structure of a statement using predicates. In doing so, we found that we can also use quantifiers for greater expressibility. The goal of all of this is to simplify complex mathematical statements and then perhaps find simpler or clearer ways of expressing the same thing. In practice we will rarely use predicates as rigorously as we have here. Instead, we will use the usual mathematical notations. For example, to say that every natural number is either even or odd, we could write x( y(x = 2y) y(x = 2y 1). However, from a logical perspective, y(x = 2y) is simply a one-place predicate and behaves as such. 4

Practice 1. Translate into symbols: (a) No number is both even and odd. (b) One more than any even number is an odd number. (c) There is prime number that is even. (d) Between any two numbers there is a third number. (e) There is no number between a number and one more than that number. 2. Translate into English: (a) x(e(x) E(x + 2)) (b) x y(sin(x) = y) (c) y x(sin(x) = y) (d) x y(x 3 = y 3 x = y) 5

Homework 1. Translate the following sentences into symbols. You can use the predicates used above, or new ones, but say what they mean. (a) For any number, if it is not even, then it is odd. (b) Every number is prime or composite. (c) No even number greater than 2 is prime. (d) There is a number which is greater than all other numbers. (e) There is a least prime number. 2. Translate the following into English sentences. The predicate P (x) asserts that x is prime. (a) x(p (x) E(x)) (b) x(p (x) P (2x)) (c) x(x = 1 y(p (y) y x)) (d) x y(p (x) (P (y) x < y)) (e) x(e(x) y z(p (y) P (z) x = y + z)) (Bonus: is this true or false?) 3. Order of Quantifiers: Does the order of quantifiers matter? Sometimes it does. Find a formula ϕ such that x yϕ is true, but y xϕ is false. Then find another formula ψ such that x yψ is false, but y xψ is true. (These formulas can be any predicate or multiple predicates combined with the logical connectives, containing the free variables x and y. An equation or inequality might work, and you might want to think about the English version of these before writing them down in symbols.) 4. Disorder of Quantifiers: Although you cannot change the order of two quantifiers when one is universal and the other is existential, is there still a problem if both quantifiers are of the same type? Explain why or why not. 6