Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Rewriting Predicate Logic Statements Steve Wolfman, based on notes by Patrice Belleville.

Slides:



Advertisements
Similar presentations
CPSC 121: Models of Computation Unit 6 Rewriting Predicate Logic Statements Based on slides by Patrice Belleville and Steve Wolfman.
Advertisements

Snick  snack CPSC 121: Models of Computation 2011 Winter Term 1 Proof Techniques (Part A) Steve Wolfman, based on notes by Patrice Belleville and others.
CS128 – Discrete Mathematics for Computer Science
22C:19 Discrete Structures Logic and Proof Spring 2014 Sukumar Ghosh.
Snick  snack CPSC 121: Models of Computation 2009 Winter Term 1 Functions Steve Wolfman, based on notes by Patrice Belleville and others 1.
Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1.
Snick  snack CPSC 121: Models of Computation 2009 Winter Term 1 Rewriting Predicate Logic Statements Steve Wolfman, based on notes by Patrice Belleville.
Snick  snack CPSC 121: Models of Computation 2009 Winter Term 1 Introduction to Induction Steve Wolfman 1.
Snick  snack CPSC 121: Models of Computation 2009 Winter Term 1 Proof (First Visit) Steve Wolfman, based on notes by Patrice Belleville, Meghan Allen.
Snick  snack CPSC 121: Models of Computation 2009 Winter Term 1 Propositional Logic: Conditionals and Logical Equivalence Steve Wolfman, based on notes.
Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Propositional Logic: Conditionals and Logical Equivalence Steve Wolfman, based on notes.
Discrete Mathematics Lecture 2 Alexander Bukharovich New York University.
Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
Snick  snack CPSC 121: Models of Computation 2010 Winter Term 2 Proof Techniques Steve Wolfman, based on notes by Patrice Belleville and others 1.
Snick  snack CPSC 121: Models of Computation 2010 Winter Term 2 Rewriting Predicate Logic Statements Steve Wolfman, based on notes by Patrice Belleville.
Snick  snack CPSC 121: Models of Computation 2010/11 Winter Term 2 Propositional Logic, Continued Steve Wolfman, based on notes by Patrice Belleville.
Snick  snack CPSC 121: Models of Computation 2011 Winter Term 1 Proof Techniques (Part B) Steve Wolfman, based on notes by Patrice Belleville and others.
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2.1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
CPSC 121: Models of Computation Unit 7: Proof Techniques Based on slides by Patrice Belleville and Steve Wolfman.
Copyright © Cengage Learning. All rights reserved.
Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Proof (First Visit) Steve Wolfman, based on notes by Patrice Belleville, Meghan Allen.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
Methods of Proof & Proof Strategies
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Introduction to Proofs
MATH 224 – Discrete Mathematics
CSE 311: Foundations of Computing Fall 2013 Lecture 8: More Proofs.
Week 3 - Monday.  What did we talk about last time?  Predicate logic  Multiple quantifiers  Negating multiple quantifiers  Arguments with quantified.
Snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Describing the World with Predicate Logic Steve Wolfman, based on notes by Patrice Belleville.
Snick  snack CPSC 121: Models of Computation 2012 Summer Term 2 Rewriting Predicate Logic Statements Steve Wolfman, based on notes by Patrice Belleville.
CSci 2011 Discrete Mathematics Lecture 6
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
1 Math/CSE 1019C: Discrete Mathematics for Computer Science Fall 2011 Suprakash Datta Office: CSEB 3043 Phone: ext
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
4.1 Proofs and Counterexamples. Even Odd Numbers Find a property that describes each of the following sets E={…, -4, -2, 0, 2, 4, 6, …} O={…, -3, -1,
Chapter 1: The Foundations: Logic and Proofs
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02: QUANTIFIERS Sections 1.3 and 1.4 Jarek Rossignac CS1050:
Lecture 1.3: Predicate Logic CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren.
22C:19 Discrete Structures Logic and Proof Fall 2014 Sukumar Ghosh.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Week 3 - Monday.  What did we talk about last time?  Predicate logic  Multiple quantifiers  Negating multiple quantifiers  Arguments with quantified.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Section 1.7. Definitions A theorem is a statement that can be shown to be true using: definitions other theorems axioms (statements which are given as.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2011 CSE 3111.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
Lecture 1.3: Predicate Logic, and Rules of Inference* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.
Lecture 1.5: Proof Techniques CS 250, Discrete Structures, Fall 2012 Nitesh Saxena Adopted from previous lectures by Cinda Heeren 1.
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
Chapter 1 Logic and proofs
3. The Logic of Quantified Statements Summary
CPSC 121: Models of Computation 2012 Summer Term 2
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
CPSC 121: Models of Computation 2016W2
CSE 311 Foundations of Computing I
CSE 311: Foundations of Computing
Lecture 1.3: Predicate Logic
Predicates and Quantifiers
Discrete Mathematics Lecture 4 Logic of Quantified Statements
CPSC 121: Models of Computation
Copyright © Cengage Learning. All rights reserved.
CPSC 121: Models of Computation
CPSC 121: Models of Computation
Lecture 1.3: Predicate Logic
Presentation transcript:

snick  snack CPSC 121: Models of Computation 2008/9 Winter Term 2 Rewriting Predicate Logic Statements Steve Wolfman, based on notes by Patrice Belleville and others

Lecture Prerequisites Reread Sections 2.1 and 2.3 (including the negation part that we skipped previously). Read Sections 2.2 and 2.4. Solve problems like Exercise Set 2.1 #25-28 and ; Set 2.2 #1-25 and 27-36; Set 2.3 #13-20, , 40-42, and 45-52; and Set 2.4 #2-19, and (You needn’t learn the “diagram” technique, but it may make more sense than other explanations!) Complete the open-book, untimed quiz on Vista that’s due before the next class.

Learning Goals: Pre-Class By the start of class, you should be able to: –Determine the negation of any quantified statement. –Given a quantified statement and an equivalence rule, apply the rule to create an equivalent statement (particularly the De Morgan’s and contrapositive rules). –Prove and disprove quantified statements using the “challenge” method (Epp, 3 d edition, page 99). –Apply universal instantiation, universal modus ponens, and universal modus tollens to predicate logic statements that correspond to the rules’ premises to infer statements implied by the premises.

Learning Goals: In-Class By the end of this unit, you should be able to: –Reinforce a couple of pre-class goals. –Explore alternate forms of predicate logic statements using the logical equivalences you have already learned plus negation of quantifiers (a generalized form of De Morgan’s Law).

Quiz 6 Notes Generally good. Where there were problems, there’s no particular pattern I can address. Please review the problems and post any questions on WebCT! Problems with lowest marks: Universal Instantiation (the “curiosity” question), Determining Negation 3 (the “pigeon” question), and Equivalence Rules and Predicate Logic (the “sock” question).

Reminder: Challenge Method A predicate logic statement is like a game with two players: you (trying to prove the statement true) your adversary (trying to prove it false). The two of you pick values for the quantified variables working from the outside (left) in. Your adversary picks the values of universally quantified variables. You pick the values of existentially quantified variables.

Challenge Method Continued If there’s a strategy for you such that no strategy of the adversary’s can beat you, the statement is true. If there’s a strategy for the adversary such that no strategy of yours can beat the adversary, the statement is false.

Problem: Bosses Top(x): x is the president Report(x, y): x reports to y P: the set of all people in the organization Imagine a hierarchical organization in which everyone has exactly one boss except the president. Let the domain of all variables be P. Which of these statements is true in every such organization?  x,  y, Top(x)  Report(x, y)  y,  x, Top(x)  Report(x, y) A.The first one. B.The second one. C.Both D.Neither E.Insufficient information

Reminder: Challenge Method Your adversary picks universally quantified variables. You pick existentially quantified variables. If you change the turn order (by switching an existential/universal), you may change the way the game works! If you swap two neighbouring existentials, you change what order you announce your choices in but don’t change the strategies. (And similarly for universals.)

De Morgan’s Law and Negating Quantifiers Consider the statement:  x  Z +, Odd(x)  Even(x) This is essentially an infinitely big AND: (Odd(1)  Even(1))  (Odd(2)  Even(2))  (Odd(3)  Even(3)) ... What happens if we negate it?

De Morgan’s Law and Negating Quantifiers Consider the statement:  x  Z +, x*x = x. This is essentially an infinitely big OR: (1*1 = 1)  (2*2 = 2)  (3*3 = 3) ... What happens if we negate it?

Generalized De Morgan’s (for Quantifiers) ~  x, P(x)=  x, ~P(x) ~  x, P(x) =  x, ~P(x) (The quantifier changes when a negation moves across it.)

Problem: Lists (aka Arrays) Let HasLength(a, len) be a predicate indicating that list a has the length len. Let A be the set of all arrays. Problem: show that these translations of “an array has exactly one length” are logically equivalent:  a  A,  len  Z 0, HasLength(a,len)  (  len 2  Z 0, HasLength(a, len 2 )  len = len 2 ).  a  A,  len  Z 0, HasLength(a,len)  (~  len 2  Z 0, HasLength(a, len 2 )  len  len 2 ).

Which Logical Equivalences Apply? Which propositional logic equivalences apply to predicate logic? (Answers taken from your quiz notes.) a.Modus ponens, modus tollens, and De Morgan's (not all equivalences!) b.~(P(x)  Q(x))  P(x)  ~Q(X) c.Commutative, Associative, and “definition of conditional” d.All propositional logic equivalences apply to predicate logic. e.Some other answer is correct.

Learning Goals: In-Class By the start of class, you should be able to: –Reinforce a couple of pre-class goals. –Explore alternate forms of predicate logic statements using the logical equivalences you have already learned plus negation of quantifiers (a generalized form of De Morgan’s Law).

Learning Goals: “Pre-Class” After the Ch 3 readings and lecture through slide “A New Proof Strategy ‘Antecedent Assumption’” of the next slide set, you should be able for each proof strategy below to: (1) identify the form of statement the strategy can prove and (2) sketch the structure of a proof that uses the strategy. Strategies: constructive/non-constructive proofs of existence (“witness”), disproof by counterexample, exhaustive proof, generalizing from the generic particular (“WLOG”), direct proof (“antecedent assumption”), proof by contradiction, and proof by cases. Note: most names listed are Epp’s, although I list my names for the same or closely related techniques in parentheses.

Lecture “Prerequisites” Reread Ch 2 and be able to solve any of the problems in that chapter. Read Sections 3.1, Theorem and pages (“Representations of Integers”), 3.6, and 3.7. Be able to solve (or at least outline the proof structure of) problems like: , (20-23 are particularly relevant!), 3.4 #24-27, 29-30, and 49-53, and 3.6 #1-27 (19-20 are particularly relevant!). Complete the open-book, untimed quiz on Vista that’s due after some lecture! Note: these are not exactly “prerequisites” this week. Please complete the readings after the first day of the nextlecture.