quanti ers - university of new haven
TRANSCRIPT
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Quantifiers
Alice E. Fischer
CSCI 1166 Discrete Mathematics for ComputingFebruary, 2018
Alice E. Fischer Quantifiers. . . 1/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
1 First Order Predicate CalculusPredicates and their Truth SetsSets of Numbers
2 From English to Quantified StatementUniversal QuantifiersExistential QuantifiersPractice
3 Working with QuantifiersNegating Quantified StatementsPracticeProofs
4 Summary
Alice E. Fischer Quantifiers. . . 2/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Predicates and their Truth SetsSets of Numbers
First Order Predicate Calculus
Predicates and their Truth Sets
Sets of Numbers
Alice E. Fischer Quantifiers. . . 3/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Predicates and their Truth SetsSets of Numbers
Predicates
In English, a sentence has a subject (noun or pronoun) and apredicate (verb phrase).
In logic, a proposition is a sentence that can be true or falsebut not both.
We can write a proposition using symbols – but we assignspecific meanings to those symbols. Often, the propositionmodels some real-world situation.
If the subject of a sentence is a variable, it is not a proposition.
We call it a predicate or an open sentence.
The domain of the predicate is the set of all values that canbe substituted for the variable.
Alice E. Fischer Quantifiers. . . 4/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Predicates and their Truth SetsSets of Numbers
The Truth Set of a Predicate
The truth set of a predicate, P, is the set of all values, x , in itsdomain, D, that produce true propositions when substituted forthe predicate’s variable. {x ∈ D | P(x)}Suppose our domain is R, the real numbers. Let P be thepredicate x2 > x . What is its truth set?
P is true for all values > 1
P is false for values −1 . . . 1, including both end points.
P is true for values < −1 (their squares are positive).
We can diagram this truth set using a number line:..........−2..........−1..........0..........1..........2..........< ........true........)(.......false.......)(...true......... >
Alice E. Fischer Quantifiers. . . 5/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Predicates and their Truth SetsSets of Numbers
Names for Sets
In mathematical work, some sets are used so often that someonegave them short names:
R: The set of all real numbers.
Z : The set of all integers
Q: The set of all rational numbers (quotients)
Add a superscript + to restrict the set to positive numbers.
Add a superscript − to restrict the set to negative numbers.
Use superscript nonneg for positives plus zero.
Alice E. Fischer Quantifiers. . . 6/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
From English to Quantified Statement
Universal Conditional Statements
Practice
Alice E. Fischer Quantifiers. . . 7/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
First Order Predicate Calculus
In the propositional calculus we have propositions withoutvariables.
In the predicate calculus we have predicates containing variables.
In the first order predicate calculus we quantify over variables.
In the second order predicate calculus, we quantify over sets ofvariables and/or over uninterpreted predicate symbols, but that isway beyond the scope of this course.
Alice E. Fischer Quantifiers. . . 8/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
The Universal Quantifier
We often make universal statements (at the risk of soundingprejudiced):
All stars are a long long way from Earth.
These can be symbolized using the universal quantifier, ∀
Let S be the set of all stars that are celestial bodies. (Excludemovie stars, sports stars, paper stars, etc.)
Let W be the predicate “y is a long way from Earth.”
We can write:
∀y ∈ S ,W (y)
The predicate starts with a quantifier, a variable name, and thedomain of that variable and ends with an assertion.
Alice E. Fischer Quantifiers. . . 9/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
The Existential Quantifier
We often make claims such as:
Somebody out there likes me.
These can be symbolized using the existential quantifier, ∃
Let P be the set of all people.
Let L be the predicate “x likes me.”
We can write:
∃x ∈ P, L(x)
Alice E. Fischer Quantifiers. . . 10/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
Universal vs. Existential
A universally quantified statement is true if and only if thepredicate is true for every element of the domain.
Common terms that correspond to universal quantification include:for all, for every, for arbitrary, for any, for each, and given any.
An existentially quantified statement is true if the predicate is truefor even one element of the domain.
Common terms that correspond to existential quantificationinclude: there exists, there is a, we can find a, there is at least one,for some, and for at least one.
Alice E. Fischer Quantifiers. . . 11/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
Practice: From English to a Quantified Statement
Start with this sentence:
All fish die when removed from the water.
Define a symbol for the predicate.
What is the domain of your predicate?
Symbolize the statement using the universal quantifier.
Alice E. Fischer Quantifiers. . . 12/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
Practice
All fish die when removed from the water.
Let D be “f dies when removed from the water”.
The domain of D is L: living fish swimming in the water.
∀f ∈ L,D(f )
Alice E. Fischer Quantifiers. . . 13/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
Universal Conditional Statements
The universal conditional statement is a generalization of theconditional or implication statement in propositional calculus:P → Q.
∀x , if P(x) then Q(x) or
∀x ,P(x)→ Q(x).
This might be written P(x)⇒ Q(x), meaning that every elementx that makes P true makes Q true.
There is no existential conditional.
Alice E. Fischer Quantifiers. . . 14/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
Implicit Conditional Statements
Vegans do not eat products derived from animal sources.V= vegans A = x eats animal products∀x ∈ V ,∼ A(x) or
P = all people V = x is vegan A = x eats animal products∀x ∈ P,V (x)→ ∼ A(x)
All that glitters is not gold.T= glittery objects G = x is gold∀x ∈ T ,∼ G (x) or
O = all objects T = x glitters G = x is gold∀x ∈ O,T (x)→ ∼ G (x)
Alice E. Fischer Quantifiers. . . 15/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
Practice: From English to a Quantified Statement
Translate these statements into quantified predicates:
1 All UNH students have a student ID number.
2 Some UNH Engineering students are CS majors.
3 A student must work hard to graduate in Engineering.
Alice E. Fischer Quantifiers. . . 16/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Universal QuantifiersExistential QuantifiersPractice
Practice: From English to a Quantified Statement
1 All UNH students have a student ID number.2 ∀x ∈ UNH students, ID(x) or∀x ∈ students,UNH(x)→ ID(x)
1 Some UNH Engineering students are CS majors.2 ∃ z ∈ UNH Engineering students,CS(z) or∃ z ∈ students,UNH Engineering(z) ∧ CS(z)
1 A student must work hard to graduate in Engineering.2 ∀ s ∈ Engineering students,Graduate(s)→WorksHard(s) or
∀ s ∈ students,UNH Engineering(s) ∧ Graduate(s)→WorksHard(s)
Alice E. Fischer Quantifiers. . . 17/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Working with Quantifiers
Negating Quantified StatementsPracticeProofs
Alice E. Fischer Quantifiers. . . 18/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Negating Quantified Statements
The negation of a universally quantified statement is a negativeexistential statement.
∼ ∀x ∈ P, L(x) is equivalent to
∃x ∈ P,∼ L(x)
This follows from the fact that ∀x ∈ P, L(x) really meansL(x1) ∧ L(x2) ∧ L(x3)....
And then ∼ (L(x1) ∧ L(x2) ∧ L(x3)...) is∼ L(x1)∨ ∼ L(x2)∨ ∼ L(x3)...,
which is ∃x ∈ P,∼ L(x).
Alice E. Fischer Quantifiers. . . 19/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Negating Quantified Statements
The negation of a existentially quantified statement is a negativeuniversal statement.
∼ ∃x ∈ P, L(x) is equivalent to
∀x ∈ P,∼ L(x)
Why is this true?
Alice E. Fischer Quantifiers. . . 20/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Negating an Implication
Implications and their negations are formulas with specialimportance in logic. The negation follows from all the previousrules. Here we develop the solution step by step.
∼ (∀x ,P(x)→ Q(x))
∃x ,∼ (P(x)→ Q(x))
∃x ,P(x) ∧ ∼ Q(x)
Alice E. Fischer Quantifiers. . . 21/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Practice: Negating Quantified Statements
Remember:
1 The negation of a universally quantified statement is anegative existential statement.
2 The negation of a existentially quantified statement is anegative universal statement.
For each sentence, write a quantified statement and its negation:
1 All cows have spots.
2 Some babies are born prematurely.
3 Pianos have 88 keys.
4 A bear is in the tree!
Alice E. Fischer Quantifiers. . . 22/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Practice: Negating Quantified Statements
1 All cows have spots.Statement: ∀x ∈ cows,Spotted(x)Negation: ∃ x ∈ cows, ∼ Spotted(x)
2 Some babies are born prematurely.Statement: ∃ x ∈ babies,Premature(x)Negation: ∀x ∈ babies, ∼ Premature(x)
3 Pianos have 88 keys.Statement: ∀x ∈ Instruments,Piano(x)→ Keys88(x)Negation: ∃ x ∈ Instruments,Piano(x) ∧ ∼ Keys88(x)
4 A bear is in the tree!Statement: ∃ x ∈ animals,Bear(x) ∧ inTree(x)Negation: ∀x ∈ animals,∼ Bear(x)∨ ∼ inTree(x)
Alice E. Fischer Quantifiers. . . 23/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Practice: Say it in English
For each sentence, write a quantified statement and its negation:
1 ∀x ∈ squares,Rectangle(x).
2 ∃ y ∈ triangles, Isoceles(y)
3 ∀z ∈ USPresidents,Over35(z).
4 ∀x , y ∈ Z ,NonZero(x) ∧ NonZero(y)→ NonZero(x ∗ y).
Alice E. Fischer Quantifiers. . . 24/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Practice: Say it in English
For each sentence, write a quantified statement and its negation:
1 ∀x ∈ squares,Rectangle(x).
2 ∃ y ∈ triangles, Isoceles(y)
3 ∀z ∈ USPresidents,Over35(z).
4 ∀x , y ∈ Z ,NonZero(x) ∧ NonZero(y)→ NonZero(x ∗ y).
Alice E. Fischer Quantifiers. . . 25/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Variations on a Universal Theme
Let B be the set of all birds.Let W(x) = x has wings.Let F(x) = x can fly.
Proposition Converse∀x ∈ B,W (x)→ F (x) ∀x ∈ B,F (x)→W (x)If a bird has wings, If a bird can fly,
then it can fly. then it has wings.
Inverse Contrapositive∀x ∈ B,∼W (x)→∼ F (x) ∀x ∈ B,∼ F (x)→ ∼W (x)If a bird does not have wings, If a bird cannot fly,
then it cannot fly. then it does not have wings.
Two of these are true, two are false. Which ones are which?
Alice E. Fischer Quantifiers. . . 26/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
One or the Other is True.
A statement is true ↔ its negation is false.
Proof: Let p be any proposition.
p ∨ ∼ p Negation law.Assume ∼ p is false.Then p is true. Elimination
Now assume p is false.Then ∼ p is true. Elimination
∴ a statement is true iff its negation is false. Definition of ↔
Alice E. Fischer Quantifiers. . . 27/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Proving an Existential Statement
Symbolize this statement:
It is possible to get an “A” in this course.
Let P be the set of all people.
Let A be the predicate x got an A in this course.
∃x ∈ P,A(x)
An existentially quantified predicate can be proved by finding asingle example that makes the statement true.
Sanjay is a person. Sanjay got an A in this course.Therefore, the statement is true.
Alice E. Fischer Quantifiers. . . 28/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
(Dis)proving a Universal Statement
Symbolize this statement:
All people are good.
Let P be the set of all people.
Let G be the predicate x is good.
∀x ∈ P,G (x)
To prove a universally quantified predicate you must show it is truefor all possible elements. It is often easier to disprove by finding asingle counterexample.
Hitler was a person. Hitler was not good.Therefore, the statement is not true.
Alice E. Fischer Quantifiers. . . 29/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Negating Quantified StatementsPracticeProofs
Vacuous Truth
A universal statement can be true vacuously.
All purple cows with green spots eat scrap metal.
Unicorns are white with cream-colored horns.
A statement is true iff its negation is false. The negations are:
∃ a purple cow with green spots that does not eat scrap metal.
∃ a unicorn that is not white ∨ does not have a cream-coloredhorn.
These negations are false because unicorns and purple cows do notexist, ∴ the original statements are true.
Alice E. Fischer Quantifiers. . . 30/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Summary
Alice E. Fischer Quantifiers. . . 31/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Summary-1
Names for Sets of Numbers:
1 R, R−, R+: Real numbers, negative reals, positive reals.
2 Z , Z−, Z +: Integers, negative integers, positive integers.
3 Q, Q−, Q+: Rationals, negative rationals, positive rationals.
Note: Zero is not considered to be EITHER negative or positive.
Terminology:
The truth set of a predicate is the set of all values from therelevant domain that make the predicate true.
The propositional calculus deals with propositions (statementswith symbols, no variables no quantifiers).
The predicate calculus deals with predicates and quantifiersover sets of values.
Alice E. Fischer Quantifiers. . . 32/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Summary-2
Quantifiers:
1 ∀ is the universal quantifier and is read “for all”.
2 You can disprove a universally quantified statement by findingone counter-example.
3 ∃ is the existential quantifier and is read “there exists”.
4 You can disprove an existentially quantified statement byfinding one true example.
Alice E. Fischer Quantifiers. . . 33/34
OutlineFirst Order Predicate Calculus
From English to Quantified StatementWorking with Quantifiers
Summary
Quiz 5: Predicates
1. What is the truth set of this predicate if its domain is theintegers? x ∗ 2 < 10
2. In one word, what is the big difference between thepropositional calculus and the predicate calculus?
3. Symbolize the statement below.
Elderly (over 60) people are poor drivers.
4. Write the negative of the symbolic statement you created inproblem 3.
5. How you would go about proving or disproving it? (Justexplain how, you don’t actually have to do it)
Alice E. Fischer Quantifiers. . . 34/34