Presentation is loading. Please wait.

Presentation is loading. Please wait.

Predicates and Quantifiers

Similar presentations


Presentation on theme: "Predicates and Quantifiers"β€” Presentation transcript:

1 Predicates and Quantifiers
Dr. Yasir Ali

2 How do you translate the statement: All birds can fly
How do you translate the statement: All birds can fly. If D= Set of all creatures Take 𝐡(π‘₯)= π‘₯ is a Bird. 𝐹(π‘₯)= π‘₯ can fly. βˆ€ π‘₯, 𝐡(π‘₯)→𝐹(π‘₯) We can not say, βˆ€ π‘₯, 𝐡(π‘₯)∧𝐹(π‘₯) Since it means that All creatures are bird and they can fly, which is not a correct translation of original statement.

3 How do you translate the statement: Some birds can fly
How do you translate the statement: Some birds can fly. If D= Set of all creatures Take 𝐡(π‘₯)= π‘₯ is a Bird. 𝐹(π‘₯)= π‘₯ can fly. βˆƒ π‘₯, 𝐡(π‘₯)∧𝐹(π‘₯) We can not say, βˆƒ π‘₯, 𝐡(π‘₯)→𝐹(π‘₯) Since this statement will be true if π‘₯ is a frog. That is this statement will be true if π‘₯ is not a bird because in that case F→𝐹 and 𝐹→𝑇 both are the true statements.

4 Translate in two ways each of these statements into logical expressions using predicates, quantifiers, and logical connectives. First, let the domain consist of the students in your class and second, let it consist of all people. a) Everyone in your class has a cellular phone. b) Somebody in your class has seen a foreign movie. c) There is a person in your class who cannot swim. d) All students in your class can solve quadratic equations. e) Some student in your class does not want to be rich.

5 Precedence of Quantifiers
The quantifiers βˆ€ and βˆƒ have higher precedence than all logical operators from propositional calculus. For example, βˆ€π‘₯𝑃(π‘₯) ∨ 𝑄(π‘₯) is the disjunction of βˆ€π‘₯𝑃(π‘₯) and 𝑄(π‘₯). In other words, it means (βˆ€π‘₯𝑃(π‘₯)) ∨ 𝑄(π‘₯) rather than βˆ€π‘₯(𝑃(π‘₯) ∨ 𝑄(π‘₯)).

6 Express each of these statements using quantifiers
Express each of these statements using quantifiers. Then form the negation of the statement so that no negation is to the left of a quantifier. Next, express the negation in simple English. (Do not simply use the phrase β€œIt is not the case that.”) a) All dogs have fleas. b) There is a horse that can add. c) Every koala can climb. d) No monkey can speak French. e) There exists a pig that can swim and catch fish.

7 Translate into formal language. β€œAll lions are fierce
Translate into formal language. β€œAll lions are fierce.” β€œSome lions do not drink coffee.” β€œSome fierce creatures do not drink coffee.”

8

9 Multiple Quantified Statements
Assume that the domain for the variables π‘₯ and 𝑦 consists of all real numbers. The statement βˆ€π‘₯ βˆ€π‘¦(π‘₯ + 𝑦 = 𝑦 + π‘₯) says that π‘₯ + 𝑦 = 𝑦 + π‘₯ for all real numbers π‘₯ and 𝑦. This is the commutative law for addition of real numbers. Translate into English the statement βˆ€π‘₯ βˆ€π‘¦((π‘₯ > 0) ∧ (𝑦 < 0) β†’ (π‘₯𝑦 < 0)), where the domain for both variables consists of all real numbers. The product of a positive real number and a negative real number is always a negative real number.”

10 Translate these statements into English, where the domain for each variable consists of all real numbers. a) βˆ€π‘₯βˆƒπ‘¦(π‘₯ < 𝑦) b) βˆ€π‘₯βˆ€π‘¦(((π‘₯ β‰₯ 0) ∧ (𝑦 β‰₯ 0)) β†’ (π‘₯𝑦 β‰₯ 0)) c) βˆ€π‘₯βˆ€π‘¦βˆƒπ‘§(π‘₯𝑦 = 𝑧) Suppose the domain of the propositional function is {1,2,3}. Write out these propositions using disjunctions and conjunctions and determine the truth value of each of these statements. βˆ€π‘₯βˆƒπ‘¦(π‘₯ + 𝑦 = 1) βˆ€π‘₯βˆ€π‘¦βˆƒπ‘§(𝑧 = (π‘₯ + 𝑦))

11 The Order of Quantifiers
Consider the statements: βˆ€ π‘π‘’π‘œπ‘π‘™π‘’ π‘₯ βˆƒ π‘Ž π‘π‘’π‘Ÿπ‘ π‘œπ‘› 𝑦 π‘ π‘’π‘β„Ž π‘‘β„Žπ‘Žπ‘‘ π‘₯ π‘™π‘œπ‘£π‘’π‘  𝑦. βˆƒ π‘Ž π‘π‘’π‘Ÿπ‘ π‘œπ‘› 𝑦 βˆ€ π‘π‘’π‘œπ‘π‘™π‘’ π‘₯ π‘ π‘’π‘β„Ž π‘‘β„Žπ‘Žπ‘‘ π‘₯ π‘™π‘œπ‘£π‘’π‘  𝑦.

12 Let 𝑄(π‘₯, 𝑦) denote β€œπ‘₯ + 𝑦 = 0.” What are the truth values of the quantifications βˆƒπ‘¦βˆ€π‘₯𝑄(π‘₯, 𝑦) and βˆ€π‘₯βˆƒπ‘¦π‘„(π‘₯, 𝑦), where the domain for all variables consists of all real numbers? βˆƒπ‘¦βˆ€π‘₯𝑄(π‘₯, 𝑦) denotes the proposition β€œThere is a real number 𝑦 such that for every real number π‘₯, 𝑄(π‘₯, 𝑦).” The quantification βˆ€π‘₯βˆƒπ‘¦π‘„(π‘₯, 𝑦) β€œFor every real number π‘₯ there is a real number 𝑦 such that 𝑄(π‘₯, 𝑦).”

13 Quantifications of Two Variables
Statement When True? When False? βˆ€π‘₯βˆ€π‘¦π‘ƒ(π‘₯, 𝑦) βˆ€π‘¦βˆ€π‘₯𝑃(π‘₯, 𝑦) 𝑃(π‘₯, 𝑦) is true for every pair π‘₯, 𝑦. There is a pair π‘₯, 𝑦 for which 𝑃(π‘₯, 𝑦) is false. βˆ€π‘₯βˆƒπ‘¦π‘ƒ(π‘₯, 𝑦) For every π‘₯ there is a 𝑦 for which 𝑃(π‘₯, 𝑦) is true. There is an x such that 𝑃(π‘₯, 𝑦) is false for every 𝑦. βˆƒπ‘₯βˆ€π‘¦π‘ƒ(π‘₯, 𝑦) There is an π‘₯ for which 𝑃(π‘₯, 𝑦) is true for every 𝑦. For every π‘₯ there is a 𝑦 for which 𝑃(π‘₯, 𝑦) is false. βˆƒπ‘₯βˆƒπ‘¦π‘ƒ(π‘₯, 𝑦) βˆƒπ‘¦βˆƒπ‘₯𝑃(π‘₯, 𝑦) There is a pair π‘₯, 𝑦 for which 𝑃(π‘₯, 𝑦) is true. 𝑃(π‘₯, 𝑦) is false for every pair π‘₯, 𝑦.

14 Express each of these mathematical statements using predicates, quantifiers, logical connectives, and mathematical operators. a) The product of two negative real numbers is positive. b) The difference of a real number and itself is zero. d) A negative real number does not have a square root that is a real number.

15 Let F(x, y) be the statement β€œx can fool y,” where the domain consists of all people in the world. Use quantifiers to express each of these statements. a) Everybody can fool Fred. b) Evelyn can fool everybody. c) Everybody can fool somebody. d) There is no one who can fool everybody. e) Everyone can be fooled by somebody. f ) No one can fool both Fred and Jerry. g) Nancy can fool exactly two people.

16 Translate each of these nested quantifications into an English statement that expresses a mathematical fact. The domain in each case consists of all real numbers. a) βˆƒπ‘₯βˆ€π‘¦(π‘₯ + 𝑦 = 𝑦) b) βˆ€π‘₯βˆ€π‘¦(((π‘₯ β‰₯ 0) ∧ (𝑦 < 0)) β†’ (π‘₯ βˆ’π‘¦ > 0)) c) βˆƒπ‘₯βˆƒπ‘¦(((π‘₯ ≀ 0) ∧ (𝑦 ≀ 0)) ∧ (π‘₯ βˆ’π‘¦ > 0)) d) βˆ€π‘₯βˆ€π‘¦((π‘₯ = 0) ∧ (𝑦 = 0) ↔ (π‘₯𝑦 = 0))

17 Rules of inference for quantified statements
Rule of Inference Name βˆ€xP(x) ∴ P(c) Universal instantiation P(c) for an arbitrary c ∴ βˆ€xP(x) Universal generalization βˆƒxP(x) ∴ P(c) for some element c Existential instantiation P(c) for some element c ∴ βˆƒxP(x) Existential generalization

18 Show that the following argument is valid or not: β€œAli, a student in this class, knows how to write programs in JAVA. Everyone who knows how to write programs in JAVA can get a high-paying job. Therefore, someone in this class can get a high-paying job.” Everyone enrolled in the university has lived in a dormitory. Mia has never lived in a dormitory. Therefore, Mia is not enrolled in the university.


Download ppt "Predicates and Quantifiers"

Similar presentations


Ads by Google