Logic II CSE 140 etc..

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

Artificial Intelligence
Predicate Logic Colin Campbell. A Formal Language Predicate Logic provides a way to formalize natural language so that ambiguity is removed. Mathematical.
The Logic of Quantified Statements
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
CAS LX 502 8a. Formal semantics Truth and meaning The basis of formal semantics: knowing the meaning of a sentence is knowing under what conditions.
Knowledge Representation Methods
Exam #3 is Friday. It will consist of proofs, plus symbolizations in predicate logic.
Review Test 5 You need to know: How to symbolize sentences that include quantifiers of overlapping scope Definitions: Quantificational truth, falsity and.
March 5: more on quantifiers We have encountered formulas and sentences that include multiple quantifiers: Take, for example: UD: People in Michael’s office.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Predicates and Quantifiers
Predicates & Quantifiers Goal: Introduce predicate logic, including existential & universal quantification Introduce translation between English sentences.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Theory and Applications
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
Interpreting Language (with Logic)
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Theory and Applications
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Discrete Structures Predicate Logic 1 Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Copyright © Peter Cappello 2011 Predicates & Quantifiers.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Mathematics for Comter I Lecture 3: Logic (2) Propositional Equivalences Predicates and Quantifiers.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
 To combine propositions using connectives  To construct the truth table of a given compound proposition  To define de Morgan Law for logic  To define.
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.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
Chapter 7. Propositional and Predicate Logic
3. The Logic of Quantified Statements Summary
CSE15 Discrete Mathematics 01/23/17
Knowledge and reasoning – second part
7/3/2018 EMR 17 Logical Reasoning Lecture 11.
Proposition & Predicates
Truth Tables – Logic (Continued)
CMSC Discrete Structures
Chapter 1 The Foundations: Logic and Proofs
Today’s Topics Universes of Discourse
CS201: Data Structures and Discrete Mathematics I
Logics for Data and Knowledge Representation
Copyright © Cengage Learning. All rights reserved.
Chapter 1 Logic and Proof.
1st-order Predicate Logic (FOL)
Knowledge and reasoning – second part
MA/CSSE 474 More Math Review Theory of Computation
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Discrete Mathematics Lecture 3: Predicate and Quantifier
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
Chapter 7. Propositional and Predicate Logic
Discrete Mathematics Lecture 4 & 5: Predicate and Quantifier
Predicates and Quantifiers
CS201: Data Structures and Discrete Mathematics I
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
1.3 Propositional Equivalences
Predicate Logic: Syntax.
Logical and Rule-Based Reasoning Part I
Predicates and Quantifiers
Predicate Logic.
Representations & Reasoning Systems (RRS) (2.2)
1st-order Predicate Logic (FOL)
Presentation transcript:

Logic II CSE 140 etc.

Propositional Logic Connectives: and  or  not  if…then  Atomic Propositions: f, c, … Connectives: and  or  not    if…then  

Predicates The system described above gives us a formal language for the Boolean connectives. The next step is to consider complex relations, like taller than: If a is taller than b, and b is taller than c, then a is taller than c. In the logic we have described, this is ((P  Q)  R) P: a taller than b Q: b taller than c R: a taller than c But this formula lacks the structure that we are really talking about for relations like taller than

The Revised System In our predicate logic, we will have 1. The Boolean connectives, as above 2. A set of predicate names; for the moment represented with P, Q, R 3. A set of constants, that denote entities, represented by a, b, c 4. A set of variables, ranging over entities, represented by x,y,z

Predicates Predicates take arguments, which are either constants or variables. So if P is a predicate that takes n arguments, and t1…tn is a sequence of constants or variables, then P(t1…tn ) is a formula. Take Taller-than as a two-place predicate; suppose john and larry are constants. Then Taller-than(john,larry) Is a formula.

Interpretation We have a set D of entities. Suppose for the following examples that our set D is as follows: D = {Ernie, Bert, Elmo, Oscar, Grover, Cookie Monster, Big Bird…} We then define a function f that interprets the constants of the language with respect to D. Abbreviating, we have: ernie  Ernie bert  Bert elmo  Elmo oscar  Oscar grover  Grover cm  Cookie Monster bb  Big Bird :

For Predicates Now Predicates, remember, have arguments. A predicate of n arguments is represented as an n-ary sequence of entities. Example: One-place predicates are sets: f(BLUE) = {Grover, Cookie Monster…} f(RED) = {Elmo…} Example: Two-place predicates are sets of pairs: f(Taller-than) = {(Bert,Elmo), (Big Bird,Ernie)…} And so forth for n-place predicates.

Models A pair <D,f>, consisting of the domain D and the interpretation function, is a model. In terms of this we can say what it means for a formula to be true: 1. A formula that consists of an n-Place predicate P followed by an n-ary sequency of constants c1…cn, P(c1…cn), is true if and only if (f(c1), … f(cn))  f(P) That is, if the elements in D that the constants refer to are in the set that is P’s interpretation 2. Otherwise, use the truth tables for any connectives

Examples BLUE(grover) is True because f(grover)  f(BLUE) Taller-than(elmo,bb) is False because (f(elmo),f(bb))  f(Taller-than) That is, elmo denotes Elmo, bb denotes Big Bird. And the pair (Elmo, Big Bird) is not in the denotation of Taller-than

Existential Quantification The system to this point deals with predicates and constants, but not variables. We now introduce the means of using the variables. First, if f is a formula with an n-place predicate in it followed by n constants or variables, then var f Is a formula, where var is some variable. Examples: x BLUE(x) x y Taller-than(x,y)

Interpreting This The notion we have introduced, existential quantification, requires an interpretation. Idea: x P(x) is read as “There exists an x such that…” Interpretation: x P(x) is true iff there is some entity in D that P(x) holds of. That is, replacing x with a constant c, such that P(c) is true. Example: x BLUE(x) is true because there is at least one entity in D, e.g. cm (Cookie Monster), that BLUE is true of. Example: x Taller-than(x, bb) is false, because no element in the domain is taller than Big Bird, I.e in the set of pairs denoted by the relation there is no set with Big Bird second.

Demonstration Recall our domain D that the predicate Taller-than is defined on: No character is taller than Big Bird, and so the relation defined by Taller-than will not include a value for x that will make x Taller-than(x, bb) True. Notice Bert isn’t pictured here, but his height has been verified…

Bert Picture involved in the confirmation of prior claims

Universal Quantification We now introduce a second quantifier, whose interpretation is “Every x is such that…” This is Universal Quantification: x P(x) Interpretation: x P(x) is true if and only if every entity in D is such that P(x) holds of it. Example: If we had a predicate Ses for Sesame Street Character, defined as we would expect, then x Ses(x) Is true for our domain D

Quantifiers and Connectives Well look at sentences involving quantifiers and connectives. Assume we have a predicate Fuzzy. How do we say that there is a fuzzy blue character? x (Fuzzy(x)  Blue(x)) For a second example, how do we express the statement that every blue character is fuzzy? Consider (2)  x (Blue(x)  Fuzzy(x))

More Examples What does (2) mean? (2)  x (Blue(x)  Fuzzy(x)) It says that for every x in D, x is Blue and x is Fuzzy. This is false; Oscar is Green and Fuzzy, and Big Bird is neither. So we want a way of stating Every blue character is fuzzy that does not have this problem.

The Conditional Consider: (3)  x (Blue(x)  Fuzzy(x)) This says that for any x, if x is Blue, then x is Fuzzy. Recall the Truth-Table for . (P  Q) is F when P is T and Q is F. So (3) will be false if anything in D is Blue but not Fuzzy. Notice that (3) is not the same as (4): (4)  x (Fuzzy(x)  Blue(x)) This says that for any x, if x is Fuzzy then x is Blue. That is, it says that all fuzzy characters are blue. This is false.

The Conditional Again Remember as well that for (P  Q) , the formula is true whenever P is F. Let’s now define a predicate NBA-All*Star for our domain D: f(NBA-All*Star) = {} None of the characters are NBA-All*Stars. So x (NBA-All*Star(x)) Is false. But  x (NBA-All*Star(x)  Fuzzy(x)) Is True, because of the way in which material implication is defined. The antecedent of the conditional will always be false.

Further Cases Remember that we read (1) as “There exists an x such that x is blue” x Blue(x) What about (2)? (2) x  Blue(x) This is “There exists an x such that it is not the case that x is blue”. Remember for our Sesame Street model this would be true; e.g. Elmo isn’t in the denotation of Blue

More about blue things Keeping our last example in mind (2) x  Blue(x) Consider the following: (3)  x Blue(x) I.e., we have placed the negation in front of the Existential Quantifier, so that it operates on it. This is read as “It is not the case that there exists an x such that x is blue”. In other words, no one is blue. This is false. More Generally: The order of elements like negation and quantifiers in the formula is significant; different result in different meanings.

Interactions Consider first the following sentence of English: (1) Everyone saw someone. This has two quantificational elements. And the sentence is ambiguous; it can mean either a. Everyone saw some specific person, e.g. Cookie Monster (same character for all) Or b. Everyone saw some character or other (different characters were seen)

In Predicate Logic We have different formulae corresponding to these two interpretations. Abstractly, we have (1)  x y (Saw(x,y)) (2) y  x (Saw(x,y)) That is, the relative order of the two Quantifiers determines different interpretations. This difference is called scope. That is, in (1) the universal scopes over the existential, in (2) the existential scopes over the universal.

Scope Let’s begin with (1)  x y Saw(x,y) And read it as “For every x, there exists some y s.t x saw y.” Now consider when the above is true in our model. It will be true just in case in the set denoted by See, every character in D appears in the first argument. That is, iff every character is in the See relation with some other character. So F(Saw) = {(Elmo,Bert), (Bert,Ernie), (Big Bird, Cookie Monster)…} In which every character has seen at least someone.

The Other Scope Now let’s take (2) y  x Saw(x,y) And ask the same question. This is read as “There is some y in the domain such that, for every x, x saw y. Now consider when this is true. It says that that there is a single character who was seen by every other character. So if this were true, the Saw relation would have f(Saw) = {(Big Bird,Elmo),(Ernie,Elmo),(Grover,Elmo)…}

Summary Recall our ambiguous sentence: (1) Everyone saw someone. In our logic, we had different sentences for the two readings: (1)  x y Saw(x,y) (2) y  x Saw(x,y) Each statement is unambiguous. But they mean different things. Specifically, (1) will sometimes be true in a model in which (2) is false. But if (2) is true in a model, (1) will also be true in that model.