Download presentation

Presentation is loading. Please wait.

Published byParker Partin Modified over 3 years ago

1
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 for Computing Science Adam Wyner University of Aberdeen Computing Science

2
Predicate Logic II

3
Fall 2013Frank / van Deemter / Wyner2 Agenda Bound and free variablesBound and free variables Vacuous quantificationVacuous quantification Empty domainsEmpty domains Complex expressionsComplex expressions –False antecedents –Quantifiers with logical connectives –Nested quantifiers Quantifier equivalencesQuantifier equivalences Defining (or not) other quantifiersDefining (or not) other quantifiers

4
Fall 2013Frank / van Deemter / Wyner3 Bound and Free Variables What do we say about the quantifiers and variables in the following expressions (same point with )?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.A "relationship" between the variable associated with the quantifier and variable associated with the predicate. Cannot vary the variable unless it is bound.

5
Fall 2013Frank / van Deemter / Wyner4 Bound and Free Variables An expression like P(x) is said to have a free variable x (i.e., x is not “specified”). "She is happy" does not have a truth value unless we know whom "she" denotes.An expression like P(x) is said to have a free variable x (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.When we indicate whom "she" is, we can determine if it is true with respect to a model.

6
Fall 2013Frank / van Deemter / Wyner5 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 bound 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 bound variables. Expression with one free variable: P(x)Expression with one free variable: P(x) Expression with the x binding the variable xExpression with the x binding the variable x x P(x)

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

8
Fall 2013Frank / van Deemter / Wyner7 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 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 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 ( 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.The free-variable occurrences in x and x are the free-variable occurrences in except for any occurrences of x.

9
Fall 2013Frank / van Deemter / Wyner8 Examples Occurrences of variables that are not free are bound. Start from atomic formula and work outwards. Which (if any) variables are free in:Occurrences of variables that are not free are bound. Start from atomic formula and work outwards. Which (if any) variables are free in: 1. x P(x) 2. x P(x) 3. y Q(x) 4. x P(b) 5. x( y R(x,y)) 6. x( y R(x,z)) A. x x P(x) B. x (P(x)) Q(x) C. y Q(y) x Q(x)

10
Fall 2013Frank / van Deemter / Wyner9 Examples 1. x P(x) (no free variable) 2. x P(x) (no free variables) 3. y Q(x) (x is a free variable) 4. x P(b) (no free variables) 5. x( y R(x,y)) (no free variables) 6. x( y R(x,z))(z is a free variable)

11
Fall 2013Frank / van Deemter / Wyner10 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 ? 1.P(x) 2.R(x,y) 3.P(b) 4. x P(x) 5. yQ(x)

12
Fall 2013Frank / van Deemter / Wyner11 Exercise 1.P(x)P(a) 2.R(x,y)R(a,y) 3.P(b)P(b) 4. x P(x) x P(a) 5. yQ(x) y Q(a)

13
Fall 2013Frank / van Deemter / Wyner12 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.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. 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)?What is the set of all the expression of the form P(b)(x:=a)?

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

15
Fall 2013Frank / van Deemter / Wyner14 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.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.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.

16
Fall 2013Frank / van Deemter / Wyner15 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.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, x P(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!But that’s not how it's done!

17
Fall 2013Frank / van Deemter / Wyner16 Suppose D is Empty Suppose D is empty. x P(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.

18
Fall 2013Frank / van Deemter / Wyner17 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.

19
Fall 2013Frank / van Deemter / Wyner18 False Antecedent Suppose M2: where D = {jill, bill, phil, will, mary}, is_happy' denotes {jill, bill, phil}, is_rich' denotes {}.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)) x (is_rich'(x) is_happy'(x)) Is this formula T or F? Recall your T-tables for .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).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).

20
Fall 2013Frank / van Deemter / Wyner19 False Antecedent Then Q(a) P(a) is true for every a (since Q(a) is false for every a)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.Consequently x (Q(x) P(x)) is true because Q(x) is false for every a. A proposition with a false antecedent is true!A proposition with a false antecedent is true! We sometimes say the formula is vacuously true. Yet, because the antecedent is always false, you can never use the formula to conclude that P holds of something.We sometimes say the formula is vacuously true. Yet, because the antecedent is always false, you can never use the formula to conclude that P holds of something.

21
Fall 2013Frank / van Deemter / Wyner20 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 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)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)

22
Fall 2013Frank / van Deemter / Wyner21 Quantifiers with Connectives Let the D be parking spaces at ABDN. Let P(x) be "x is occupied." Let Q(x) be "x is free of charge." What do the following mean/paraphrase? When are they T/F (construct models)? 1. x (Q(x) P(x)) 2. x (Q(x) P(x)) 3. x (Q(x) P(x)) 4. x (Q(x) P(x))

23
Fall 2013Frank / van Deemter / Wyner22 Construct English paraphrases 1. x (Q(x) P(x)) 2. x (Q(x) P(x)) 3. x (Q(x) P(x)) 4. 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

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

25
Fall 2013Frank / van Deemter / Wyner24 Construct a Model where 1 and 3 and 4 are T, but 2 is F 1. x (Q(x) P(x)) 2. x (Q(x) P(x)) 3. x (Q(x) P(x)) 4. x (Q(x) P(x)) M4: a model where D = {a, b}, I(Q) = {a}, I(P) = {a, b}.

26
Fall 2013Frank / van Deemter / Wyner25 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, x (Q(x) P(x)) is true iff, for some place a, Q(a) P(a) is true. Q(a) P(a) is true iff Q(a) is false or P(a) is true. Some place is either (not free of charge) or some place (is occupied).

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

Similar presentations

Presentation is loading. Please wait....

OK

Mathematics for Computing Science

Mathematics for Computing Science

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on different solid figures worksheets Ppt online gambling addiction Disaster management ppt on tsunami Ppt on regional rural banks in india Ppt on social etiquettes in india Ppt on healthy eating habits Ppt on kinetic molecular theory Download ppt on air powered cars Ppt on contact and noncontact force Ppt on eye os online