Predicate Logic. Andreas Klappenecker

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

Review for Midterm 1. Andreas Klappenecker

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

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

Review 1. Andreas Klappenecker

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

2-4: The Use of Quantifiers

software design & management Gachon University Chulyun Kim

Review 3. Andreas Klappenecker

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

CPSC 121: Models of Computation

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

Rules Build Arguments Rules Building Arguments

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

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

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

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

Readings: Conjecture. Theorem. Rosen Section 1.5

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.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

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.

Logic and Proof. Aiichiro Nakano

Predicate Logic - Deductive Systems

Discrete Structures for Computer Science

1 The Foundation: Logic and Proofs

Chapter 2: The Logic of Quantified Statements

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

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

DISCRETE MATH: LECTURE Chapter 3.3 Statements with Multiple Quantifiers If you want to establish the truth of a statement of the form

Supplementary Logic Notes CSE 321 Winter 2009

1 The Foundation: Logic and Proofs

Review: Potential stumbling blocks

The Process of Mathematical Proof

Inference and Proofs (1.6 & 1.7)

Chapter 3. The Logic of Quantified Statements

MAT 243 Test 1 SOLUTIONS, FORM A

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

Rules of Inference. Arguments and Validity

Today. Proof using contrapositive. Compound Propositions. Manipulating Propositions. Tautology

Chapter 1 Elementary Logic

Discrete Mathematics

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

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

Solutions to Exercises (Sections )

CSE 20 DISCRETE MATH. Winter

CS 2336 Discrete Mathematics

Argument. whenever all the assumptions are true, then the conclusion is true. If today is Wednesday, then yesterday is Tuesday. Today is Wednesday.

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

At least one of us is a knave. What are A and B?

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

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Predicate Logic & Quantification

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

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

Mathematical Reasoning Rules of Inference & Mathematical Induction. 1. Assign propositional variables to the component propositional argument.

CSE 20 DISCRETE MATH. Fall

Intro to Logic and Proofs

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Logic, Sets, and Proofs

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

CSCE 222 Discrete Structures for Computing. Review for the Final. Hyunyoung Lee

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

ICS141: Discrete Mathematics for Computer Science I

EECS 1028 M: Discrete Mathematics for Engineers

Introduction to Sets and Logic (MATH 1190)

CSE Discrete Structures

A Guide to Proof-Writing

Section 1.1 Propositions

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

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

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

1.1 Statements and Compound Statements

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

Discrete Mathematical Structures: Theory and Applications

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

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

Chapter 4, Logic using Propositional Calculus Handout

CSE Discrete Structures

Do not start until you are given the green signal

ECOM Discrete Mathematics

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

Propositional Logic Not Enough

1.1 Language and Logic

Math 3336: Discrete Mathematics Practice Problems for Exam I

Logic and Proofs. (A brief summary)

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

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Tools for reasoning: Logic. Ch. 1: Introduction to Propositional Logic Truth values, truth tables Boolean logic: Implications:

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

UNIVERSITY OF CALICUT SCHOOL OF DISTANCE EDUCATION B Sc (MATHEMATICS) I Semester Core Course. FOUNDATIONS OF MATHEMATICS (MODULE I & ii) QUESTION BANK

Discrete Mathematics Recitation Course 張玟翔

Manual of Logical Style

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

First order Logic ( Predicate Logic) and Methods of Proof

PROPOSITIONAL CALCULUS

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Transcription:

Predicate Logic Andreas Klappenecker

Predicates A function P from a set D to the set Prop of propositions is called a predicate. The set D is called the domain of P.

Example Let D=Z be the set of integers. Let a predicate P: Z -> Prop be given by P(x) = x>3. The predicate itself is neither true or false. However, for any given integer the predicate evaluates to a truth value. For example, P(4) is true and P(2) is false

Universal Quantifier (1) Let P be a predicate with domain D. The statement P(x) holds for all x in D can be written shortly as xp(x).

Universal Quantifier (2) Suppose that P(x) is a predicate over a finite domain, say D={1,2,3}. Then xp(x) is equivalent to P(1) P(2) P(3).

Universal Quantifier (3) Let P be a predicate with domain D. xp(x) is true if and only if P(x) is true for all x in D. Put differently, xp(x) is false if and only if P(x) is false for some x in D.

Existential Quantifier The statement P(x) holds for some x in the domain D can be written as x P(x) Example: x (x>0 x 2 = 2) is true if the domain is the real numbers but false if the domain is the rational numbers.

Logical Equivalence (1) Two statements involving quantifiers and predicates are logically equivalent if and only if they have the same truth values no matter which predicates are substituted into these statements and which domain is used. We write A B for logically equivalent A and B.

Logical Equivalence (2) x(p(x) Q(x)) xp(x) xq(x) Proof: Suppose x(p(x) Q(x)) is true. Then for all a in the domain P(a) Q(a) is true. Hence, both P(a) is true and Q(a) is true. Since P(a) is true for all a in the domain, xp(x) is true. Since Q(a) is true for all a in the domain, xq(x) is true. Hence xp(x) xq(x) is true. [What else do we need to show?]

Logical Equivalence (3) Suppose that xp(x) xq(x) is true. It follows that xp(x) is true, and that xq(x) is true. Hence, for each element a in the domain P(a) is true, and Q(a) is true. Hence P(a) Q(a) is true for each element a in the domain. Therefore, by definition, x(p(x) Q(x)) is true.

De Morgan s Laws The two versions of the de Morgan s laws for universal and existential quantifiers are given by xp (x) x P (x) xp (x) x P (x)

Example x(p (x) Q(x)) x(p (x) Q(x)) Proof: x(p (x) Q(x)) x (P (x) Q(x)) x ( P (x) Q(x)) x( P (x) Q(x)) x(p (x) Q(x))

Example The quantifiers can make definitions more memorable. Recall that the limit lim f(x) =L x a is defined as: For every real number ε>0 there exists a δ>0 such that f(x)-l <ε whenever 0 < x-a < δ.

Example (2) lim f(x) =L x a For every real number ε>0 there exists a δ>0 such that f(x)-l <ε whenever 0 < x-a < δ. ε δ x(0 < x a < δ f(x) L < ε)

Example (3) What does it mean that the limit does not exist? ε δ x(0 < x a < δ f(x) L < ε) ε δ x (0 < x a < δ f(x) L < ε) ε δ x ( (0 < x a < δ) f(x) L < ε) ε δ x(0 < x a < δ f(x) L ε)

Rules of Inference

Valid Arguments An argument in propositional logic is a sequence of propositions that end with a proposition called conclusion. The argument is called valid if the conclusion follows from the preceding statements (called premises). In other words, in a valid argument it is impossible that all premises are true but the conclusion is false.

Example If you have a current password, then you can log on to the network. You have a current password Therefore, You can log on to the network

Modus Ponens The tautology (p (p->q)) -> q is the basis for the rule of inference called modus ponens. p p -> q ------- q

Modus Tollens q p -> q ------ p The University will not close on Wednesday. If it snows on Wednesday, then the University will close. Therefore, It will not snow on Wednesday

Simplification p q ------ p

Formal Argument p q r p r s s t t Argument 1) p q Hypothesis 2) p Simplification of 1) 3) r p Hypothesis 4) r Modus tollens using 2) and 3) 5) r s Hyposthesis 6) s Modus ponens using 4), 5) 7) s t Hypothesis 8) t Modus ponens using 6), 7)

Quantified Statements xp (x) P (a) P (a) for an arbitrary a xp (x) xp (x) P (a) for some a P (a) for some a xp (x) Universal instantiation Universal generalization Existential instantiation Existential generalization

Universal Modus Ponens Let us combine universal instantiation and modus ponens to get the universal modus ponens rule of inference. x(p (x) Q(x)) P (a) wherea is in the domain Q(a) For example, assume that For all positive integers n, if n>4, then n 2 <2 n is true. Then the universal modus ponens implies that 100 2 <2 100. It really is that simple.