Introduction. Predicates and Quantifiers. Discrete Mathematics Andrei Bulatov

Similar documents
Section Summary. Section 1.5 9/9/2014

Propositional Logic Not Enough

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

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

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

Proposi'onal Logic Not Enough

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

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

Logic and Proof. Aiichiro Nakano

Mat 243 Exam 1 Review

Predicate Calculus lecture 1

Lecture Predicates and Quantifiers 1.5 Nested Quantifiers

Introduction to Sets and Logic (MATH 1190)

First order Logic ( Predicate Logic) and Methods of Proof

Section 2.1: Introduction to the Logic of Quantified Statements

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

1.3 Predicates and Quantifiers

Discrete Structures for Computer Science

MAT2345 Discrete Math

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

Predicate Logic & Quantification

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

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

ICS141: Discrete Mathematics for Computer Science I

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

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

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

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

Discrete Mathematics and Its Applications

Logic and Propositional Calculus

Logic and Proofs. (A brief summary)

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

CSC242: Intro to AI. Lecture 12. Tuesday, February 26, 13

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

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

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

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

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

Thinking of Nested Quantification

Announcements CompSci 102 Discrete Math for Computer Science

Announcement. Homework 1

Section 2.3: Statements Containing Multiple Quantifiers

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

Reasoning. Inference. Knowledge Representation 4/6/2018. User

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

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

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

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

Lecture 3. Logic Predicates and Quantified Statements Statements with Multiple Quantifiers. Introduction to Proofs. Reading (Epp s textbook)

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

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

2-4: The Use of Quantifiers

DISCRETE MATHEMATICS BA202

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

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

STRATEGIES OF PROBLEM SOLVING

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

4 Quantifiers and Quantified Arguments 4.1 Quantifiers

Propositional and First-Order Logic

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

Logic and Propositional Calculus

THE PREDICATE CALCULUS

Chapter 1, Part II: Predicate Logic

Quantifiers. P. Danziger

Lecture 4. Predicate logic

Section 3.1: Direct Proof and Counterexample 1

Logic and Proofs. (A brief summary)

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.

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

Rules Build Arguments Rules Building Arguments

Predicates, Quantifiers and Nested Quantifiers

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Lecture 3 : Predicates and Sets DRAFT

Predicates and Quantifiers. CS 231 Dianna Xu

ICS141: Discrete Mathematics for Computer Science I

LIN1032 Formal Foundations for Linguistics

It rains now. (true) The followings are not propositions.

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.

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

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

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

1 Predicates and Quantifiers

First Order Logic (FOL)

Topic #3 Predicate Logic. Predicate Logic

Do not start until you are given the green signal

Logik für Informatiker Logic for computer scientists

Discrete Structures Lecture 5

III. Elementary Logic

THE LOGIC OF QUANTIFIED STATEMENTS

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

ECOM Discrete Mathematics

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

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

Predicate Logic: Introduction and Translations

Proving Arguments Valid in Predicate Calculus

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:

Math.3336: Discrete Mathematics. Nested Quantifiers

Transcription:

Introduction Predicates and Quantifiers Discrete Mathematics Andrei Bulatov

Discrete Mathematics Predicates and Quantifiers 7-2 What Propositional Logic Cannot Do We saw that some declarative sentences are not statements without specifying the value of `indeterminates ``x + 2 is an even number ``If x + 1 > 0, then x > 0 ``A man has a brother Some valid arguments cannot be expressed with all our machinery of tautologies, equivalences, and rules of inference Every man is mortal. Socrates is a man. Socrates is mortal

Discrete Mathematics Predicates and Quantifiers 7-3 Open Statements or Predicates Sentences like `x is greater than 3 or `person x has a brother are not true or false unless the variable is assigned some particular value. Sentence `x is greater than 3 consists of 2 parts. The first part, x, is called the variable or the subject of the sentence. The second part the predicate, `is greater than 3 refers to a property the subject can have. Sentences that have such structure are called open statements or predicates We write P(x) to denote a predicate with variable x

Discrete Mathematics Predicates and Quantifiers 7-4 Unary, Binary, and so on `x is greater than 3 `x is my brother `x is a human being contain only 1 variable, unary predicates P(x) `x is greater than y `x is the mother of y `car x has colour y contain 2 variables, binary predicates Q(x,y) `x divides y + z `x sits between y and z `x is a son of y and z contain 3 variables, ternary predicates R(x,y,z)

Discrete Mathematics Predicates and Quantifiers 7-5 Assigning a Value When a variable is assigned a value, the predicates turns into a statement, whose truth value can be evaluated. P(x) = `x is greater than 3 x=2 x=4 P(2) = `2 is greater than 3 P(4) = `4 is greater than 3 false true Q(x,y) = `car x has colour y x=my car y=red x=my car y=grey Q(my car,red) = `my car is red Q(my car,grey) = `my car is grey true false

Discrete Mathematics Predicates and Quantifiers 7-6 Universe We cannot assign a variable of a predicate ANY value. We need to obtain a meaningful statement! `x is greater than 3 23 0 a cat a big red truck Every variable of a predicate is associated with a universe or universe of discourse, and its values are taken from this universe `x is greater than 3 x is a number `x is my brother x is a human `x is an animal x is a??? `car x has colour y x is a car y is a colour

Discrete Mathematics Predicates and Quantifiers 7-7 Relational Databases A relational database is a collection of tables like No. Name Student ID Supervisor Thesis title 1. Bradley Coleman 30101234 Petra Berenbrink Algebraic graph theory A table consists of a schema and an instance. A schema is a collection of attributes, where each attribute has an associated universe of possible values. An instance is a collection of rows, where each row is a mapping that associates with each attribute of the schema a value in its universe. Every table is a predicate that is true on the rows of the instance and false otherwise.

Discrete Mathematics Predicates and Quantifiers 7-8 Quantifiers One way to obtain a statement from a predicate is to assign all its variables some values Another way to do that is to use expressions like `For every `There is such that `A can be found `Any is `Every man is mortal `There is x such that x is greater than 3 `There is a person who is my father `For any x, ' x 2 0 quantification

Discrete Mathematics Predicates and Quantifiers 7-9 Universal Quantifiers Abbreviates constructions like For all For any Every Each Asserts that a predicate is true for all values from the universe `Every man is mortal `All lions are fierce `For any x, x 2 0 ' Notation: x P(x) means that for every value a from the universe P(a) is true

Discrete Mathematics Predicates and Quantifiers 7-10 Universal Quantifiers (cntd) `For any x, x 2 0 ' `Every car is grey' true! false! my car is not grey x P(x) is false if and only if there is at least one value a from the universe such that P(a) is false Such a value a is called a counterexample

Discrete Mathematics Predicates and Quantifiers 7-11 Existential Quantifiers Abbreviates constructions like For some For at least one There is There exists Asserts that a predicate is true for at least one value from the universe `There is a living king `Some people are fierce `There is x such that x 2 10' Notation: x P(x) means that there is a value a from the universe such that P(a) is true

Discrete Mathematics Predicates and Quantifiers 7-12 Existential Quantifiers (cntd) `There is a grey car' `For some x, ' x 2 < 0 true! my friend s car is red false! x P(x) is false if and only if for all a from the universe P(a) is false Disproving an existential statement is difficult!

Discrete Mathematics Predicates and Quantifiers 7-13 Quantifiers and Negations Summarizing x P(x) x P(x) true For every value a from the universe P(a) is true There is a value a from the universe such that P(a) is true false There is a counterexample a value a from the universe such that P(a) is false For all values a from the universe P(a) is false Observe that x P(x) is false if and only if x P(x) is true x P(x) is false if and only if x P(x) is true

Discrete Mathematics Predicates and Quantifiers 7-14 Example What is the negation of each of the following statements? Statement Negation All lions are fierce x P(x) There is a peaceful lion Everyone has two legs x P(x) There is a person having more than two legs, one leg, or no legs at all Some people like coffee x P(x) There is a lady in x P(x) one of these rooms (Some rooms contain a lady) All people hate coffee There is a tiger in every room

Discrete Mathematics Predicates and Quantifiers II 8-15 Multiple quantifiers Often predicates have more than one variable. In this case we need more than one quantifier. P(x,y) = ``car x has colour y x y P(x,y) x y P(x,y) x y P(x,y) x y P(x,y) ``every car is painted all colours ``there is a car that is painted some colour ``every car is painted some colour ``there is a car that is painted all colours

Discrete Mathematics Predicates and Quantifiers II 8-16 Open and Bound Variables In the statement ``car x has some colour y P(x,y) variables x and y play completely different roles. Variable y is bound by the existential quantifier. Effectively it disappeared from the statement. Variable x is not bound, it is free. Another example: ``x is the least number Q(x,y) = ``x is less than y y Q(x,y) or y (x y) ``x is the greatest number y Q(y,x) or y (y x)

Discrete Mathematics Predicates and Quantifiers 7-17 Homework Exercises from the Book: No. 1, 2, 4acij, 9a(i,iv), 12(vii,viii) (page 100-102)