1 / 25

Logic II

Logic II. CSE 140 etc. Propositional Logic. Atomic Propositions: f, c, …. Connectives: and  or  not  if…then . Predicates.

marlow
Télécharger la présentation

Logic II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Logic II CSE 140 etc.

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

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

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

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

  6. 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 :

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

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

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

  10. 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 varf Is a formula, where var is some variable. Examples: xBLUE(x) x yTaller-than(x,y)

  11. Interpreting This The notion we have introduced, existentialquantification, 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: xBLUE(x) is true because there is at least one entity in D, e.g. cm (Cookie Monster), that BLUE is true of. Example: xTaller-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.

  12. 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 xTaller-than(x, bb) True. Notice Bert isn’t pictured here, but his height has been verified…

  13. Bert Picture involved in the confirmation of prior claims

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

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

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

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

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

  19. Further Cases • Remember that we read (1) as “There exists an x such that x is blue” • xBlue(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

  20. More about blue things Keeping our last example in mind (2) x  Blue(x) Consider the following: (3) xBlue(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.

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

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

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

  24. 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)…}

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

More Related