Top Banner
Rosen 1.3
30

Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Mar 29, 2015

Download

Documents

Keven Daughtrey
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Rosen 1.3

Page 2: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Propositional Functions

• Propositional functions (or predicates) are propositions that contain variables.

• Ex: Let P(x) denote x > 3

• P(x) has no truth value until the variable x is bound by either – assigning it a value or by – quantifying it.

Page 3: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Assignment of values

Let Q(x,y) denote “x + y = 7”.

Each of the following can be determined as T or F.

Q(4,3)

Q(3,2)

Q(4,3) Q(3,2)

[Q(4,3) Q(3,2)]

Page 4: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Quantifiers

Universe of Discourse, U: The domain of a variable in a propositional function.

Universal Quantification of P(x) is the proposition:“P(x) is true for all values of x in U.”

Existential Quantification of P(x) is the proposition: “There exists an element, x, in U such that P(x) is true.”

Page 5: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Universal Quantification of P(x)xP(x)“for all x P(x)”“for every x P(x)”Defined as:P(x0) P(x1) P(x2) P(x3) . . . for all xi in U

Example:Let P(x) denote x2 xIf U is x such that 0 < x < 1 then xP(x) is false.If U is x such that 1 < x then xP(x) is true.

Page 6: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Existential Quantification of P(x)xP(x)“there is an x such that P(x)”“there is at least one x such that P(x)”“there exists at least one x such that P(x)”Defined as:P(x0) P(x1) P(x2) P(x3) . . . for all xi in U

Example:Let P(x) denote x2 xIf U is x such that 0 < x 1 then xP(x) is true.If U is x such that x < 1 then xP(x) is true.

Page 7: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Quantifiers

xP(x)•True when P(x) is true for every x.•False if there is an x for which P(x) is false.

xP(x)•True if there exists an x for which P(x) is true.•False if P(x) is false for every x.

Page 8: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Negation (it is not the case)

xP(x) equivalent to xP(x)•True when P(x) is false for every x•False if there is an x for which P(x) is true.

xP(x) is equivalent to xP(x) •True if there exists an x for which P(x) is false.•False if P(x) is true for every x.

Page 9: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 2aLet T(a,b) denote the propositional function “a trusts b.” Let U be the set of all people in the world.

Everybody trusts Bob.xT(x,Bob)Could also say: xU T(x,Bob)

denotes membership

Bob trusts somebody.xT(Bob,x)

Page 10: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 2bAlice trusts herself.T(Alice, Alice)

Alice trusts nobody.x T(Alice,x)

Carol trusts everyone trusted by David.x(T(David,x) T(Carol,x))

Everyone trusts somebody.x y T(x,y)

Page 11: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 2c

x y T(x,y)Someone trusts everybody.

y x T(x,y)Somebody is trusted by everybody.

Bob trusts only Alice.x (x=Alice T(Bob,x))

Page 12: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Bob trusts only Alice. x (x=Alice T(Bob,x))

Let p be “x=Alice”q be “Bob trusts x”

p q p qT T TT F FF T FF F T

True only when Bob trusts Alice or Bob does not trust someone who is not Alice

Page 13: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Quantification of Two Variables(read left to right)

xyP(x,y) or yxP(x,y)•True when P(x,y) is true for every pair x,y.•False if there is a pair x,y for which P(x,y) is false.

xyP(x,y) or yxP(x,y)True if there is a pair x,y for which P(x,y) is true.False if P(x,y) is false for every pair x,y.

Page 14: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Quantification of Two VariablesxyP(x,y)•True when for every x there is a y for which P(x,y) is true.

(in this case y can depend on x)•False if there is an x such that P(x,y) is false for every y.

yxP(x,y)•True if there is a y for which P(x,y) is true for every x.

(i.e., true for a particular y regardless (or independent) of x)•False if for every y there is an x for which P(x,y) is false.

Note that order matters hereIn particular, if yxP(x,y) is true, then xyP(x,y) is true.However, if xyP(x,y) is true, it is not necessary that yxP(x,y) is true.

Page 15: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 3aLet L(x,y) be the statement “x loves y” where U for both x and y is the set of all people in the world.

Everybody loves Jerry.xL(x,Jerry)

Everybody loves somebody.x yL(x,y)

There is somebody whom everybody loves.yxL(x,y)

Page 16: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 3b1There is somebody whom Lydia does not love.xL(Lydia,x)

Nobody loves everybody. (For each person there is at least one person they do not love.)xyL(x,y)

There is somebody (one or more) whom nobody lovesy x L(x,y)

Page 17: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 3b2There is exactly one person whom everybody loves.

xyL(y,x)?No. There could be more than one person everybody loves

x{yL(y,x) w[(yL(y,w)) w=x]}If there are, say, two values x1 and x2 (or more) for which L(y,x) is true, the proposition is false.

x{yL(y,x) w[(yL(y,w)) w=x]}?

xw[(y L(y,w)) w=x]?

Page 18: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 3cThere are exactly two people whom Lynn loves.

x y{xy L(Lynn,x) L(Lynn,y)}?No.

x y{xy L(Lynn,x) L(Lynn,y) z[L(Lynn,z) (z=x z=y)]}

Everyone loves himself or herself.xL(x,x)

There is someone who loves no one besides himself or herself.xy(L(x,y) x=y)

Page 19: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Thinking of Quantification as Loops

Quantifications of more than one variable can be thought of as nested loops.

•For example, xyP(x,y) can be thought of as a loop over x, inside of which we loop over y (i.e., for each value of x).

• Likewise, xyP(x,y) can be thought of as a loop over x with a loop over y nested inside. This can be extended to any number of variables.

Page 20: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Quantification as Loops

Using this procedurexyP(x,y) is true if P(x,y) is true for all values of x,y as we loop through y for each value of x.xyP(x,y) is true if P(x,y) is true for at least one set of values x,y as we loop through y for each value of x.

…And so on….

Page 21: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Quantification of 3 Variables

Let Q(x,y,z) be the statement “x + y = z”, where x,y,z are real numbers.What is the truth values of

xyzQ(x,y,z)?

zxyQ(x,y,z)?

Page 22: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Quantification of 3 Variables

Let Q(x,y,z) be the statement “x + y = z”, where x,y,z are real numbers.xyzQ(x,y,z)is the statement, “For all real numbers x and for all real numbers y, there is a real number z such thatx + y = z.”

True

Page 23: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Quantification of 3 Variables

Let Q(x,y,z) be the statement “x + y = z”, where x,y,z are real numbers.zxyQ(x,y,z)is the statement, “There is a real number z such that for all real numbers x and for all real numbers y,x + y = z.”

False

Page 24: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 4aLetP(x) be the statement: “x is a Georgia Tech student”Q(x) be the statement: “ x is ignorant”R(x) be the statement: “x wears red”and U is the set of all people.

No Georgia Tech students are ignorant.x(P(x) Q(x))x(P(x) Q(x))

OK by Implication equivalence.x(P(x) Q(x))

Does not work. Why?

Page 25: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 4a

x(P(x) Q(x)) x (P(x) Q(x)) Negation equivalencex ( P(x) Q(x)) Implication equivalencex ( P(x) Q(x))DeMorgansx ( P(x) Q(x)) Double negationOnly true if everyone is a GT student and is not ignorant.

No Georgia Tech students are ignorant.x(P(x) Q(x))

Page 26: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 4a

P(x) be the statement: “x is a Georgia Tech student”Q(x) be the statement: “ x is ignorant”R(x) be the statement: “x wears red”and U is the set of all people.

No Georgia Tech students are ignorant.

x(P(x) Q(x))Also works. Why?

Page 27: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 4a

x(P(x) Q(x)) x (P(x) Q(x)) Negation equivalencex (P(x) Q(x)) DeMorganx (P(x) Q(x)) Implication equivalence

No Georgia Tech students are ignorant.x(P(x) Q(x))

Page 28: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 4b

LetP(x) be the statement: “x is a Georgia Tech student”Q(x) be the statement: “ x is ignorant”R(x) be the statement: “x wears red”and U is the set of all people.

All ignorant people wear red.x(Q(x) R(x))

Page 29: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 4c

LetP(x) be the statement: “x is a Georgia Tech student”Q(x) be the statement: “ x is ignorant”R(x) be the statement: “x wears red”and U is the set of all people.

No Georgia Tech student wears red.x(P(x) R(x))

What about this?x(R(x) P(x))

Page 30: Rosen 1.3 Propositional Functions Propositional functions (or predicates) are propositions that contain variables. Ex: Let P(x) denote x > 3 P(x) has.

Examples 4d

If “no Georgia Tech students are ignorant” and “all ignorant people wear red”, does it follow that “no Georgia Tech student wears red?”

x((P(x) Q(x)) (Q(x) R(x)))

NOSome misguided GT student might wear red!!This can be shown with a truth table or Wenn diagrams