Predicate logic and inferences February 28 2020 Patrice
Predicate logic and inferences February 28, 2020 Patrice Belleville / Geoffrey Tien 1
Transformation • February 28, 2020 Patrice Belleville / Geoffrey Tien 2
De. Morgan's with predicates Generalized De. Morgan's law • February 28, 2020 Patrice Belleville / Geoffrey Tien 3
Contrapositive with predicates • February 28, 2020 Patrice Belleville / Geoffrey Tien 4
Inferences with predicate logic Universal instantiation • February 28, 2020 Patrice Belleville / Geoffrey Tien 5
Inferences with predicate logic Universal modus ponens • February 28, 2020 Patrice Belleville / Geoffrey Tien 6
Inferences with predicate logic Universal modus tollens • February 28, 2020 Patrice Belleville / Geoffrey Tien 7
Inferences with predicate logic • February 28, 2020 Patrice Belleville / Geoffrey Tien 8
Inferences with predicate logic • February 28, 2020 Patrice Belleville / Geoffrey Tien 9
Logical equivalences in predicate logic • Which propositional logic equivalences apply to predicate logic? February 28, 2020 Patrice Belleville / Geoffrey Tien 10
Rules of inference with predicate logic • February 28, 2020 Patrice Belleville / Geoffrey Tien 11
Rules of inference with predicate logic The only rules we really need • February 28, 2020 Patrice Belleville / Geoffrey Tien 12
Rules of inference with predicate logic The only rules we really need • February 28, 2020 Patrice Belleville / Geoffrey Tien 13
Truth of predicate logic statements The challenge method • A predicate logic statement is like a game with two players – you: trying to prove the statement true – an adversary: trying to prove the statement false • The two of you pick values for the quantified variables, working from left to right (inwards) – adversary picks values of universally quantified variables – you must pick values of existentially quantified variables, to attempt to "win" • If there is a strategy that allows you to always win, the statement is true – if there is a strategy for the adversary to always win, the statement is false February 28, 2020 Patrice Belleville / Geoffrey Tien 14
Challenge method exercises • February 28, 2020 Patrice Belleville / Geoffrey Tien 15
Proof techniques February 28, 2020 Patrice Belleville / Geoffrey Tien 16
Why proofs? CPSC 121 questions • How can we convince ourselves that an algorithm does what it is supposed to do? – We need to prove its correctness • How do we determine whether or not one algorithm is better than another one? – Use a proof to convince others that the number of steps our algorithm takes is what we claim it is February 28, 2020 Patrice Belleville / Geoffrey Tien 17
Direct proofs For direct proofs: • We start with some facts (premises / hypotheses) – These are known, or assumed to be true • We move one step at a time towards a conclusion • There are two general forms of statements: – Existentially quantified statements – Universally quantified statements • Different techniques are used for each type of statement February 28, 2020 Patrice Belleville / Geoffrey Tien 18
Direct proofs Proving existential statements • February 28, 2020 Patrice Belleville / Geoffrey Tien 19
Direct proofs Proving existential statements • February 28, 2020 Patrice Belleville / Geoffrey Tien 20
Direct proofs Proving existential statements • February 28, 2020 Patrice Belleville / Geoffrey Tien 21
Direct proofs Proving existential statements Worksheet problem 1 • Theorem: There are perfect squares and perfect cubes larger than 1 that are also Fibonacci numbers. February 28, 2020 Patrice Belleville / Geoffrey Tien 22
Direct proofs Proving universal statements • February 28, 2020 Patrice Belleville / Geoffrey Tien 23
Direct proofs Proving universal statements • February 28, 2020 Patrice Belleville / Geoffrey Tien 24
Direct proofs Proving universal statements • February 28, 2020 Patrice Belleville / Geoffrey Tien 25
Direct proofs Proving universal statements • This is a special case of the previous form – The textbook calls this (and only this) a direct proof • The proof looks like this: February 28, 2020 Patrice Belleville / Geoffrey Tien 26
Direct proofs Proving universal statements • February 28, 2020 Patrice Belleville / Geoffrey Tien 27
Direct proofs Proving universal statements • February 28, 2020 Patrice Belleville / Geoffrey Tien 28
Direct proofs Proving universal statements Worksheet problems 2 and 3 • February 28, 2020 Patrice Belleville / Geoffrey Tien 29
Direct proofs Dealing with nested quantifiers • How do we deal with theorems that involve multiple quantifiers? – Start with the proof from the outermost quantifier – Work your way inwards • Example: • Theorem: For any two distinct real numbers, there is a third real number that is larger than one but smaller than the other. • Written using predicate logic: February 28, 2020 Patrice Belleville / Geoffrey Tien 30
Direct proofs Dealing with nested quantifiers • February 28, 2020 Patrice Belleville / Geoffrey Tien 31
Direct proofs Nested quantifiers Worksheet problems 4 and 5 • February 28, 2020 Patrice Belleville / Geoffrey Tien 32
Readings for this lesson • Epp: – Chapter 3. 2, 3. 4 • Next class: – Epp 4 e/5 e: 4. 1, 4. 6, 4. 7, Theorem 4. 4. 1 February 28, 2020 Patrice Belleville / Geoffrey Tien 33
- Slides: 33