Discrete Math - Module #1 - Logic

Slides:



Advertisements
Similar presentations
Predicate Logic Colin Campbell. A Formal Language Predicate Logic provides a way to formalize natural language so that ambiguity is removed. Mathematical.
Advertisements

Slides adapted from Michael P. Frank ' s course based on the text Discrete Mathematics & Its Applications (5 th Edition) by Kenneth H. Rosen CS2013 Mathematics.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Predicates and Quantifiers
© 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 
2009/91 Predicates and Quantifiers (§1.3) In the sentence “x is greater than 3”: The phrase “x” denotes the subject - the object or entity that the sentence.
1 Predicate Logic Rosen 6 th ed., § Predicate Logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Logic and Set Theory.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
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.
Predicates and Quantifiers
Predicates & Quantifiers Goal: Introduce predicate logic, including existential & universal quantification Introduce translation between English sentences.
Logical Equivalence & Predicate Logic
資訊科學數學 6 : Predicates, Quantifiers & Mathematical Induction 陳光琦助理教授 (Kuang-Chi Chen)
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
1.1 CompSci 102© Michael Frank Today’s topics Propositional equivalencesPropositional equivalences Predicate logicPredicate logic Reading: Sections Reading:
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Course Overview and Road Map Computability and Logic.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
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)
Copyright © Peter Cappello 2011 Predicates & Quantifiers.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Introduction to Logic for Artificial Intelligence Lecture 2
Axiomatic Number Theory and Gödel’s Incompleteness Theorems
Discrete Math - Module #1 - Logic
Logic II CSE 140 etc..
COT 3100, Spring 2001 Applications of Discrete Structures
Chapter 3 The Logic of Quantified Statements
Predicates & Quantifiers
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Proposition & Predicates
Chapter 1 The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
The Foundations: Logic and Proofs
Proving Existentials A proof of a statement of the form x P(x) is called an existence proof. If the proof demonstrates how to actually find or construct.
CS 220: Discrete Structures and their Applications
CSE 311 Foundations of Computing I
CSI 2101 / Predicate logic (§ ):
CHAPTER 1: LOGICS AND PROOF
A Brief Summary for Exam 1
Predicate Logic (§1.3) Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional.
First Order Logic Rosen Lecture 3: Sept 11, 12.
MA/CSSE 474 More Math Review Theory of Computation
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Computer Security: Art and Science, 2nd Edition
Negations of quantifiers
Discrete Mathematics Lecture 3: Predicate and Quantifier
Logical Entailment Computational Logic Lecture 3
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
This Lecture Substitution model
CS201: Data Structures and Discrete Mathematics I
Foundations of Discrete Mathematics
Predicates and Quantifiers
Representations & Reasoning Systems (RRS) (2.2)
Presentation transcript:

Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic Predicate Logic (§1.3) Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional logic (recall) 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? 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Applications of Predicate Logic Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic Applications of Predicate Logic It is the formal notation for writing perfectly clear, concise, and unambiguous mathematical definitions, axioms, and theorems (more on these in module 2) for any branch of mathematics. Predicate logic with function symbols, the “=” operator, and a few proof-building rules is sufficient for defining any conceivable mathematical system, and for proving anything that can be proved within that system! 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic 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 always remain some true statements that will never be proven by that procedure. I.e., we can’t discover all mathematical truths, unless we sometimes resort to making guesses. Kurt Gödel 1906-1978 A note on pronunciation: The guy’s name is Austrian. The o with the double dot over it is called an “o umlaut.” It is also sometimes written “oe” in languages without umlauts, thus, “Goedel” is also a correct way to write his name in English. An o umlaut is pronounced something between “uh” and “ur”. So, “Goedel” is pronounced something like “girdle.” One way of saying Godel’s theorem is that there are infinitely many finite mathematical statements that are true, but that are not provable from earlier statements by any finite argument following a fixed set of logical inference rules. Thus, the only way to really expand the scope of mathematics is to make guesses (through intuition or inspiration) about additional statements being true (or equivalently, additional inference rules being valid). When one makes such guesses, since they have not been proven, one should always keep in mind the possibility that they may be false (inconsistent with earlier statements), and thus may eventually be disproven. Thus, in general, we can never really know whether a given mathematical system we are using is really logically self-consistent. (Except for some very simple systems of limited power can be proven to be consistent.) Later, we will see that the mathematical world was badly shaken up when it was discovered that the simple form of set theory that everyone had been using was actually logically inconsistent! To restore consistency, the theory had to be modified, and the new set theory is self-consistent, as far as anyone knows. Goedel was also a close colleague and friend of Albert Einstein, and he discovered (among other things) that Einstein’s theory of General Relativity (the modern theory of gravity) had some theoretical solutions in which time travel into the past was possible! 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Practical Applications of Predicate Logic Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic Practical Applications of Predicate Logic It is the basis for clearly expressed formal specifications for any complex system. It is basis for automatic theorem provers and many other Artificial Intelligence systems. E.g. automatic program verification systems. Predicate-logic like statements are supported by some of the more sophisticated database query engines and container class libraries these are types of programming tools. 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Subjects and Predicates Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic Subjects and Predicates In the sentence “The dog is sleeping”: The phrase “the dog” denotes the subject - the object or entity that the sentence is about. The phrase “is sleeping” denotes the predicate- a property that is true of the subject. In predicate logic, a predicate is modeled as a function P(·) from objects to propositions. P(x) = “x is sleeping” (where x is any object). 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic 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.” 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Propositional Functions Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic 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.” 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Universes of Discourse (U.D.s) Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic Universes of Discourse (U.D.s) The power of distinguishing objects from predicates is that it lets you state things about many objects at once. E.g., let P(x)=“x+1>x”. We can then say, “For any number x, P(x) is true” instead of (0+1>0)  (1+1>1)  (2+1>2)  ... The collection of values that a variable x can take is called x’s universe of discourse. 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Quantifier Expressions Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic Quantifier Expressions Quantifiers provide a notation that allows us to quantify (count) how many objects in the univ. of disc. 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. 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

The Universal Quantifier  Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic The Universal Quantifier  Example: Let the u.d. of x be parking spaces at UF. Let P(x) be the predicate “x is full.” Then the universal quantification of P(x), x P(x), is the proposition: “All parking spaces at UF are full.” i.e., “Every parking space at UF is full.” i.e., “For each parking space at UF, that space is full.” Instructors: You can substitute your favorite overly-crowded destination in place of the University of Florida in this example. 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

The Existential Quantifier  Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic The Existential Quantifier  Example: Let the u.d. of x be parking spaces at UF. Let P(x) be the predicate “x is full.” Then the existential quantification of P(x), x P(x), is the proposition: “Some parking space at UF is full.” “There is a parking space at UF that is full.” “At least one parking space at UF is full.” 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Free and Bound Variables Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic 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. 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic 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: e.g. let Q(y) = x P(x,y) y x 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Nesting of Quantifiers Discrete Math - Module #1 - Logic 12/2/2018 Topic #3 – Predicate Logic 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.) Proposition 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank

Review: Predicate Logic (§1.3) Discrete Math - Module #1 - Logic 12/2/2018 Review: Predicate Logic (§1.3) 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. 12/2/2018 (c)2001-2004, Michael P. Frank (c)2001-2002, Michael P. Frank