1 / 27

Slides adapted from

CS2013 Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science. Slides adapted from Michael P. Frank ' s course based on the text Discrete Mathematics & Its Applications (5 th Edition) by Kenneth H. Rosen. Predicate Logic II. Agenda.

emory
Download Presentation

Slides adapted from

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. CS2013Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science Slides adapted from Michael P. Frank's course based on the textDiscrete Mathematics & Its Applications(5th Edition)by Kenneth H. Rosen

  2. Predicate Logic II

  3. Agenda • Bound and free variables • Vacuous quantification • Empty domains • Complex expressions • False antecedents • Quantifiers with logical connectives • Nested quantifiers • Quantifier equivalences • Defining (or not) other quantifiers Frank / van Deemter / Wyner

  4. Bound and Free Variables • What do we say about the quantifiers and variables in the following expressions (same point with )? • B(x) • x B(y,x) • x(B(x)  A(y)) • xy (B(y)  A(x)) • A "relationship" between the variable associated with the quantifier and variable associated with the predicate. Cannot vary the variable unless it is bound. Frank / van Deemter / Wyner

  5. Bound and Free Variables • An expression like P(x) is said to have a free variablex (i.e., x is not “specified”). "She is happy" does not have a truth value unless we know whom "she" denotes. • When we indicate whom "she" is, we can determine if it is true with respect to a model. Frank / van Deemter / Wyner

  6. Bound and Free Variables • A quantifier (either  or ) operates on an expression having one or more free variables, and it binds one or more of those variables to produce an expression having one or more boundvariables. • Expression with one free variable: P(x) • Expression with the x binding the variable x x P(x) Frank / van Deemter / Wyner

  7. Example of Binding • P(x,y) has 2 free variables, x and y. • xP(x,y) has 1 free variable and one bound variable. • An expression with zero free variables is a bona-fide (actual) proposition. P(jill',bill') Frank / van Deemter / Wyner

  8. Formal Definition of Free Variables • The free-variable occurrences in an atomic formula are all the variable occurrences in that atomic formula. • The free-variable occurrences in  are the free-variable occurrences in . • The free-variable occurrences in ( connective ) are the free-variable occurrences in  plus the free-variable occurrences in  • The free-variable occurrences in x and x are the free-variable occurrences in  except for any occurrences of x. Frank / van Deemter / Wyner

  9. Examples • Occurrences of variables that are not free are bound. Start from atomic formula and work outwards.Which (if any) variables are free in: • x P(x) • x P(x) • y Q(x) • x P(b) • x(y R(x,y)) • x(y R(x,z)) • x x P(x) • x (P(x))  Q(x) • y Q(y) x Q(x) Frank / van Deemter / Wyner

  10. Examples • x P(x) (no free variable) • x P(x) (no free variables) • y Q(x) (x is a free variable) • x P(b) (no free variables) • x(y R(x,y)) (no free variables) • x(y R(x,z)) (z is a free variable) Frank / van Deemter / Wyner

  11. Exercise Suppose(x:=a), where (x:=a) is the result of substituting all free occurrences of the variable x in  by the constant a. What is ? • P(x) • R(x,y) • P(b) • x P(x) • yQ(x) Frank / van Deemter / Wyner

  12. Exercise • P(x) P(a) • R(x,y) R(a,y) • P(b) P(b) • x P(x) x P(a) • yQ(x) y Q(a) Frank / van Deemter / Wyner

  13. Vacuous Quantification • Recall definition: Let  be a formula. Then x is true in D if every expression (x:=a) is true in D, and false otherwise. • xP(b) is true in D if every expression of the form P(b)(x:=a) is true in D, and false otherwise. • What is the set of all the expression of the form P(b)(x:=a)? Frank / van Deemter / Wyner

  14. xP(b) • What is the set of all expressions of the form P(b)(x:=a)? • That’s the singleton set {P(b)} ! • xP(b) is true in D if P(b) is true, and false otherwise. • So, xP(b) means the same as P(b) Frank / van Deemter / Wyner

  15. Empty Domains • Let  be a formula. Then the propositionx is true in D if every expression (x:=a) is true in D, and false otherwise. This is read as follows: • Let  be a formula. Then the propositionx is false in D if at least one expression (x:=a) is false in D, and true otherwise. Frank / van Deemter / Wyner

  16.  could have been defined as • Let  be a formula. Then the propositionx is true in D if D is nonempty and every expression (x:=a) is true in D, and false otherwise. • Under this definition, xP(x) would have been false whenever D is empty. Every teddy_bear is happy is false in a model where there is nothing. Sadness! • But that’s not how it's done! Frank / van Deemter / Wyner

  17. Suppose D is Empty Suppose D is empty. xP(x) (e.g., P(x) means “x is occupied.”)is true (sometimes called “vacuously true”). For the same reason, x P(x) is also true. Frank / van Deemter / Wyner

  18. Consequences of the Standard Position Two logical equivalences in Predicate Logic: x P(x)  x P(x) (“no counterexample against P”) x P(x)  x P(x) So, one of the two quantifiers suffices (cf., functional completeness of a set of connectives in propositional logic) We’ll return to these equivalences later. Frank / van Deemter / Wyner

  19. False Antecedent • Suppose M2: where D = {jill, bill, phil, will, mary}, is_happy' denotes {jill, bill, phil}, is_rich' denotes {}. • x (is_rich'(x)  is_happy'(x)) • Is this formula T or F? Recall your T-tables for . • It is clear that no constant for x will make is_rich'(x) true since the denotation of is_rich'(x) is empty. In other words,yQ(y). Frank / van Deemter / Wyner

  20. False Antecedent • Then Q(a)  P(a)is true for every a (since Q(a) is false for every a) • Consequently x (Q(x)  P(x)) is true because Q(x) is false for every a. • A proposition  with a false antecedent is true! • We sometimes say the formula is vacuouslytrue. Yet, because the antecedent is always false, you can never use the formula to conclude that P holds of something. Frank / van Deemter / Wyner

  21. Vacuous truth • Example 1: Think of a tax form: “Have you sent us details about all your children?” You have no children, so you’ve complied (without doing anything). • Example 2: Think of our definition of (x:=a) as “the result of substituting all free occurrences of x in  by a”No occurrences, so don't do anything (after which it’s true that all occurrences have been substituted) Frank / van Deemter / Wyner

  22. Quantifiers with Connectives Let the D be parking spaces at ABDN. Let P(x) be "xis occupied." Let Q(x) be "xis free of charge." What do the following mean/paraphrase? When are they T/F (construct models)? • x (Q(x)  P(x)) • x (Q(x)  P(x)) • x (Q(x) P(x)) • x (Q(x)  P(x)) Frank / van Deemter / Wyner

  23. Construct English paraphrases • x (Q(x)  P(x)) • x (Q(x)  P(x)) • x (Q(x)  P(x)) • x (Q(x)  P(x)) 1. Some places are free of charge and occupied 2. All places are free of charge and occupied 3. All places that are free of charge are occupied 4. For some places x, if x is free of charge then x is occupied Frank / van Deemter / Wyner

  24. Construct a Model where 1 and 4 are T, while 2 and 3 are F • x (Q(x)  P(x)) (true for place a below) • x (Q(x)  P(x)) (false for places b below) • x (Q(x) P(x)) (false for place b below) • x (Q(x)  P(x)) (true for place a below) M4: a model where D = {a, b}, I(Q) = {a, b}, I(P) = {a}. Frank / van Deemter / Wyner

  25. Construct a Model where 1 and 3 and 4 are T, but 2 is F • x (Q(x)  P(x)) • x (Q(x)  P(x)) • x (Q(x) P(x)) • x (Q(x)  P(x)) M4: a model where D = {a, b}, I(Q) = {a}, I(P) = {a, b}. Frank / van Deemter / Wyner

  26. About x (Q(x)  P(x)) x (Q(x)  P(x)) For some x, if x is free of charge then x is occupied x (Q(x)  P(x)) is true iff, for some place a, Q(a)  P(a) is true. Q(a)  P(a) is true iffQ(a) is false orP(a) is true. Some place is either (not free of charge) or some place (is occupied). Frank / van Deemter / Wyner

  27. Further Remainder of Predicate Logic topics next week. Then Proof. Frank / van Deemter / Wyner

More Related