Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing February, 2018 Alice E. Fischer... 1/28
1 Examples and Varieties Order of Quantifiers and Negations 2 3 Universal Existential 4 Universal Modus Ponens Universal Modus Tollens Universal Transitivity 5 Alice E. Fischer... 2/28
Examples and Varieties Order of Quantifiers and Negations Examples and Varieties Order of Quantifiers Negations of Multiply Quantified Statements Alice E. Fischer... 3/28
For All, There Exists Examples and Varieties Order of Quantifiers and Negations A statement can have multiple quantifiers: All married people have a spouse. m People, Married(m) s People, Spouse(m, s). All squares on a completed Sudoko board hold a digit 1... 9 s squares, d 1... 9, d is written in s. All columns on a completed Sudoko board contain a square with the digit 1 c Sudoku columns, s squares, s c 1 s. Alice E. Fischer... 4/28
Examples and Varieties Order of Quantifiers and Negations Turning quantified statements into English. Let the predicate T (p, x) mean p teaches x, Example p Pros x Skaters, T (p, x). Wrong English: For all pros, there exists a skater such that all pros teach the skater. Right: you need to use the x and y in the English statement. For all pros p, there exists a skater x, such that p teaches x. If you focus on any particular pro, p, there exists a skater x, such that p teaches x. Alice E. Fischer... 5/28
Same Quantifier Twice Examples and Varieties Order of Quantifiers and Negations A statement can have two quantifiers that are alike. There are pairs of men and women who are not married. m men, w women, m is not married to w. For all digits d 1... 9, and for all rows r a completed Sudoko board, d occurs once in r. d 1... 9, and r completed Sudoku rows, Once(d, r). Alice E. Fischer... 6/28
Two or More Quantifiers Examples and Varieties Order of Quantifiers and Negations Given two consecutive quantifiers in a series of two or more: If they are the same quantifier, the order does not matter. ( y Student)( x Teacher)( z Course), Teaches(x, y, z) ( x Teacher)( z Course)( y Student), Teaches(x, y, z) If they are different quantifiers, the order matters greatly. ( x Z + )( y Z ), x + y = 0. (true) ( y Z )( x Z + ), x + y = 0. (false) Alice E. Fischer... 7/28
Examples and Varieties Order of Quantifiers and Negations Order of quantifiers: All-Exists vs. Exists-All x y is not at all the same as y x a) Every man is descended from a mother. ( m Men) ( f femalepeople), f is the mother of m. b) A woman is the ancestor of every man. ( f femalepeople)( m Men), f is the ancestor of m. To disprove a, find a man without a mother. To disprove b, find two men who do not have a common ancestor. (Remember Eve!) Alice E. Fischer... 8/28
Examples and Varieties Order of Quantifiers and Negations : Interpreting Quantified Statements CS Students Ann, Bob, Cal, Don, Eva, Flo belong to three clubs. Hacking team Robotics club Programming team Ann Flo Cal Don Eva Cal Bob Ann Ann Don Eva Given the diagram, say whether each statement is true or false. 1 z Students w Students, SameClub(z, w) 2 s Students c clubs, Member(s, c). 3 t Students d clubs, Member(t, d). 4 b clubs v Students, Member(v, b) 5 s Students z Students, SameClub(s, z). 6 x Students y Students, SameClub(x, y) Alice E. Fischer... 9/28
Examples and Varieties Order of Quantifiers and Negations Negating a Statement with Two or More Quantifiers To negate a multiply quantified statement, negate each quantifier in order, from left to right. Start with this true predicate that says there is no largest or smallest integer : ( y Z)( x Z)( z Z), x < y < z. To prove this, choose y=any integer, x=y-1 and z=y+1. Now let us negate it; the result will be a predicate that is false: ( y Z)( x Z)( z Z), x < y < z. ( y Z) ( x Z)( z Z), x < y < z. ( y Z)( x Z) ( z Z), x < y < z. ( y Z)( x Z)( z Z), (x < y < z.) ( y Z)( x Z)( z Z), x y z.) To disprove this, choose x=1 and z=10. Alice E. Fischer... 10/28
Universal Modus Ponens x, P(x) Q(x) P(k) for a particular k Q(k) for that k. Example: If an integer is even, then its square is even. The integer 10 is even. Therefore, 100 is even. Universal Modus Tollens x, P(x).Q(x) Q(k) for a particular k P(k) for that k Example: All cows have hoofs. I do not have hoofs. Therefore, I am not a cow. Alice E. Fischer... 11/28
Inverse Error and Converse Error Inverse Error x, P(x) Q(x) Q(k) for a particular k P(k) for that k. Invalid! Example: All dogs have four legs, My pet fluffy has four legs. Therefore Fluffy is a dog. Not true, Fluffy is a cat. Converse Error x, P(x).Q(x) P(k) for a particular k Q(k) for that k Invalid! Example: All lawyers are educated. I am not a lawyer. Therefore I am not educated. Not true! Alice E. Fischer... 12/28
Outline Universal Existential Making an argument using quantified statements uses the same rules of inference as for propositional calculus. But we need one extra concept. is the process of applying a general quantified statement to a particular element(s) from the domain for which it applies. Sometimes we want to answer general questions: do all birds fly? Other times we might be more particular: which bird doesn t fly? allows us to focus parts of an argument on particular individuals in the domain to answer a specific question. Alice E. Fischer... 13/28
Universal Universal Existential Universal instantiation states that a quantified statement that is true for every element of a domain is equally true for one specific element of the domain. Example - All men are nerds x Men, Nerd(x) If this statement is true, and Fred is a man, then Fred is a nerd, Nerd(Fred). This version of instantiation is used commonly in everyday speech. Alice E. Fischer... 14/28
Existential Universal Existential Existential instantiation states that if a quantified statement is true for at least one element of a domain, we can give such an element an arbitrary name. Example - Some men are nerds x Men, Nerd(x) Using existential instantiation, we can give a convenient name to one of the qualifying men, say, SmartGuy. This version of instantiation is used commonly in mathematics. Alice E. Fischer... 15/28
Universal Modus Ponens Universal Modus Tollens Universal Transitivity When we made arguments in propositional calculus, we presented many different rules of inference that could be used to generate new statements that eventually led to a conclusion. The same rules apply to predicate calculus, with the help of instantiation. We will look at three of the most useful rules: modus ponens, modus tollens, and transitivity. Alice E. Fischer... 16/28
Universal Modus Ponens Universal Modus Ponens Universal Modus Tollens Universal Transitivity Universal Modus Ponens states: x, P(x) Q(x) P(k) for a particular k Q(k) for that k. In other words, if the general premise of P(x) Q(x) is true for all x in the domain, and we know that the fact P(k) is true for a particular element, k, then we can conclude that the fact Q(k) is also true. Alice E. Fischer... 17/28
An Example Outline Universal Modus Ponens Universal Modus Tollens Universal Transitivity Here is a classic argument to which universal modus ponens applies: All men are mortal. Socrates is a man. Socrates is mortal. x People, Man(x) Mortal(x) Man(Socrates) Mortal(Socrates) This can be demonstrated using Venn diagrams: Alice E. Fischer... 18/28
Beware the Converse Error Universal Modus Ponens Universal Modus Tollens Universal Transitivity Consider this argument: All men are mortal. Socrates is mortal. Socrates is a man. x People, Man(x) Mortal(x) Mortal(Socrates) Man(Socrates) This invalid argument, suffers from the converse error: Alice E. Fischer... 19/28
Beware the Inverse Error Universal Modus Ponens Universal Modus Tollens Universal Transitivity Consider this argument: All men are mortal. Zeus is not a man. Zeus is not mortal. x People, Man(x) Mortal(x) Man(Zeus) Mortal(Zeus) This invalid argument, suffers from the inverse error: Alice E. Fischer... 20/28
Universal Modus Tollens Universal Modus Ponens Universal Modus Tollens Universal Transitivity Universal Modus Tollens states x, P(x) Q(x) Q(k) for a particular k P(k) for that k In other words, if the general premise of P(x) Q(x) is true for all x in the domain, and we know that the fact Q(k) is false for a particular element, k, then we can conclude that the fact P(k) is also false. This is based on the fact that the contrapositive version of a statement is equivalent to the statement. Alice E. Fischer... 21/28
An Example Outline Universal Modus Ponens Universal Modus Tollens Universal Transitivity Here is a valid argument to which universal modus tollens applies: All men are mortal. Zeus is not mortal. Zeus is not a man. x People, Man(x) Mortal(x) Mortal(Zeus) Man(Zeus) This can be demonstrated using Venn diagrams: Alice E. Fischer... 22/28
Transitivity Outline Universal Modus Ponens Universal Modus Tollens Universal Transitivity The Law of Universal Transitivity states: x, P(x) Q(x) x, Q(x) R(x) x, P(x) R(x) In other words, if the general premise of P(x) Q(x) is true for all x in the domain, and it is also true that Q(x) R(x), then we can conclude that P(x) R(x). This can be validated by specifying P(k) is true and using universal modus ponens to show that R(k) is true, for all k. Alice E. Fischer... 23/28
An Example Outline Universal Modus Ponens Universal Modus Tollens Universal Transitivity Here is a valid argument to which universal transitivity applies: All men are mortal. All mortals die. All men die. Fred will be a dead man. x People, Man(x) Mortal(x) x People, Mortal(x) Die(x) x People, Man(x) Die(x) Man(Fred) Die(Fred) This can be demonstrated using Venn diagrams: Alice E. Fischer... 24/28
Some example arguments Consider these facts: 1 Marcus was a man 2 Marcus was a Pompeian 3 All Pompeians were Romans 4 Caesar was a ruler 5 All Romans were either loyal to Caesar or hated him 6 Everyone is loyal to someone 7 Men only try to assassinate rulers they are not loyal to 8 Marcus tried to assassinate Caesar Alice E. Fischer... 25/28
Converting From English to Predicates 1 Marcus was a man 2 Marcus was a Pompeian 3 All Pompeians were Romans 4 Caesar was a ruler 5 All Romans were either loyal to Caesar or hated him 6 Everyone is loyal to someone 7 Men only try to assassinate rulers they are not loyal to 8 Marcus tried to assassinate Caesar 1 Man(Marcus) 2 Pompeian(Marcus) 3 x People, Pompeian(x) Roman(x) 4 Ruler(Caesar) 5 x People, Roman(x) (Loyalto(x, Caesar) Hate(x, Caesar)) (Loyalto(x, Caesar) Hate(x, Caesar)) 6 x People, y People, Loyalto(x, y) 7 x People, y People, Man(x) Ruler(y) Tryassassinate(x, y) Loyalto(x, y) 8 Tryassassinate(Marcus, Caesar) Alice E. Fischer... 26/28
Did Marcus hate Caesar? 9. Loyalto(Marcus, Caesar) Wrong: Tried instantiation with 6, picking x as Marcus and y as Caesar. It was ok to pick x as Marcus because of universal instantiation. It was not ok to pick Caesar as the model for y using existential instantiation, because Caesar has special properties that are not shared by all Romans. 9. Loyalto(Marcus, Caesar) Use universal modus ponens with 1, 4, 8 and 7. Alice E. Fischer... 27/28
Did Marcus hate Caesar? 10. Roman(Marcus) Use universal modus ponens with 2 and 3 11. (Loyalto(Marcus, Caesar) Hate(Marcus, Caesar)) (Loyalto(Marcus, Caesar) Hate(Marcus, Caesar)) Use universal modus ponens with 10 and 5 12. Hate(Marcus, Caesar) Use 9 and 11 and the definitions of And and Or Alice E. Fischer... 28/28