Net
Predicate and Quantifier
Predicates
- We had a problem before with the truth of “That guy is going to the store.”
- The problem was that we couldn't decide if it was true or false, because the sentence didn't specify who “that guy” is. Some are going to the store, and some are not.
- We also have similar things elsewhere in mathematics.
- We say things like “
x/2 is an integer”. That is true for some x but not others.
- It's not a proposition either.
- A predicate is a statement with variables.
- Written with a capital letter and the variables listed as arguments, like
P(x,y,z) .
- We can express these two things using predicates.
- Let
P(x) be true if x is going to the store.
- Let
Q(x) be true if x/2 is an integer.
- Now we have something that can get a truth value. In other words, be a proposition.
- Once the variable has a value fixed, it is a proposition.
- e.g.
Q(8) is a true proposition and Q(9.3) is a false proposition.
- The same logical manipulations can be done with predicates.
- Let
R(x,y) be P(x)∧Q(y) .
- Then
R(5,John) is false (no matter what John is doing now, because of the domination law).
- The problem was that we couldn't decide if it was true or false, because the sentence didn't specify who “that guy” is. Some are going to the store, and some are not.
- We say things like “
x/2 is an integer”. That is true for somex but not others. - It's not a proposition either.
- Written with a capital letter and the variables listed as arguments, like
P(x,y,z) .
- Let
P(x) be true ifx is going to the store. - Let
Q(x) be true ifx/2 is an integer.
- Once the variable has a value fixed, it is a proposition.
- e.g.
Q(8) is a true proposition andQ(9.3) is a false proposition.
- Let
R(x,y) beP(x)∧Q(y) . - Then
R(5,John) is false (no matter what John is doing now, because of the domination law).
Quantifiers
- Two more sentences that we can't express logically yet:
- “Everyone in this class will pass the midterm.”
- “Someone in this room is sleeping now.”
- We can express the simpler versions about one person
- “
x will pass the midterm.” and “y is sleeping now.”
- “
- The universal quantifier is used to denote sentences with words like “all” or “every”.
- The notation is
∀xP(x) , meaning “for allx ,P(x) is true.” - When specifying a universal quantifier, we need to specify the domain of the variable. (Or universe of discourse if you want another term.)
- e.g. Let
P(x) be true ifx will pass the midterm. The statement “everyone in this class will pass the midterm” can be translated as∀xP(x) where the domain ofx is people in this class.
- The notation is
- The existential quantifier is used to denote sentences with words like “some” or “there is a”.
- The notation is
∃xP(x) , meaning “there is at least onex whereP(x) is true.” - Again, we need to specify the domain of the variable.
- e.g. Let
Q(x) be true ifx is sleeping now. “Someone in this room is sleeping now” can be translated as∃xQ(x) where the domain ofx is people in this room.
- The notation is
- The
∀ and∃ are in some ways like∧ and∨ .- That is, we we could make a list of everyting in the domains (
a1,a2,a3,… ), we would have these:∀xP(x)≡P(a1)∧P(a2)∧P(a3)∧⋯∃xP(x)≡P(a1)∨P(a2)∨P(a3)∨⋯
- That is, we we could make a list of everyting in the domains (
- For example, if we let
P(x) be the predicate “x is a person in this class”,D(x) be “x is a DDP student”, andF(x,y) be “x hasy as a friends”. The domain for them will be all people. How would we translate these?- “There is someone in the DDP program.”
- “Everyone in this class is a DDP student.”
- “Someone in this class is a DDP student.”
- “Everyone is their own friend.”
- “Everyone has a friend who is a DDP student.”
- “Nobody is both in this class and a DDP student.”
∃xD(x) ∀x∃yF(x,y) ∃y∀xF(x,y)
- When translating to Enlish, “For every person
x ,x is…” is a bad answer.- “Everyone is…” is good.
- Try make natural-sounding sentences. Don't just transcribe the logic.
- We have versions of De Morgan's Laws for quantifiers:
¬∃xP(x)≡∀x¬P(x)¬∀xP(x)≡∃x¬P(x) - For example, “There are no DDP students” and “Everyone is not a DDP student” are equivalent:
¬∃xD(x)≡∀x¬D(x) .
- For example, “There are no DDP students” and “Everyone is not a DDP student” are equivalent: