Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Class 2: Proof Methods

Class 2: Proof Methods

cs2102: Discrete Mathematics
University of Virginia, Fall 2017

See course site for notes:
https://uvacs2102.github.io

David Evans

August 24, 2017
Tweet

More Decks by David Evans

Other Decks in How-to & DIY

Transcript

  1. cs2102:  Discrete  Mathematics   Class  2:  Proof  Methods David  Evans

    University  of  Virginia If  you  have  any  questions  about   syllabus,  course  organization,   etc.  ask  them  in  #inclass now
  2. Plan Inference  Rules  and  Soundness Implies Aside:  “Electronic  Signatures” Proof

     Methods: Contrapositive What  makes  a  “good”  proof? No  paper  notes  today, will  be  posted  on  web   shortly  after  class
  3. Soundness An  inference  rule  is  sound,  if  it  can  only

     be  used  to   conclude  true things. antecedents conclusion
  4. Soundness An  inference  rule  is  sound,  if  it  can  never

     be  used  to   conclude  false. antecedents conclusion
  5. Precise  Meaning  of  Implies P IMPLIES Q:  if  P is

     true,  Q must be  true. Variables  are  propositions:  either  true or  false.
  6. Precise  Meaning  of  Implies P IMPLIES Q:  if  P is

     true,  Q must  be  true. P Q P IMPLIES Q true true true false false true false false
  7. Precise  Meaning  of  Implies P IMPLIES Q:  if  P is

     true,  Q must  be  true. P Q P IMPLIES Q true true true true false false false true true false false true This  truth  table  defines  implies:  there  is  no  implied  causality  or   connection  with  what  implies  implies  in  English!
  8. Valid  Proof? Thinking  implies  disagreement;  and  disagreement   implies  nonconformity;

     and  nonconformity   implies  heresy;  and  heresy  implies  disloyalty—so,   obviously,  thinking  must  be  stopped. Adlai  Stevenson, A  Call  to  Greatness (1954)
  9. Contrapositive  Rule P Q NOT(P) NOT(Q) NOT(P) IMPLIES NOT(Q) Q

    IMPLIES P true true false false true true true false false true true true false true true false false false false false true true true true NOT(P) IMPLIES NOT(Q) Q IMPLIES P
  10. Ritualistic  Signatures • Intended  to  make  signer think  seriously  and

     impact   signer’s  behavior • Varying  impact  (?): – Quill  on  parchment – Pen  on  paper – Scribbling  on  tablet – Typing
  11. Ritualistic  Signatures • Intended  to  make  signer think  seriously  and

     impact   signer’s  behavior • Varying  impact  (?): – Quill  on  parchment – Pen  on  paper – Scribbling  on  tablet – Typing – Clicking  a  web  form Purposeful  Signatures • Verifiable • Non-­‐repudiable • Bound  to  content
  12. Purposeful  Signatures Verifiable Not  forgeable Non-­‐repudiable Bound  to  content Real

     electronic  signatures: One-­‐way  hard  problem Easy  to  raise  to  powers, hard  to  find  discrete  logs Signature  combines  message and  private  key   Can  be  verified  by  obtaining public  key from  trusted  source and  checking  signature  is  valid
  13. Proposition If  the  product  of  x and  y is  even,

     at  least  one  of  x or  y must  be  even.
  14. If  the  product  of  x and  y is  even,  at

     least  one  of  x or  y must  be  even. P =  “the  product  of  x and  y is  even” Q =  “at  least  one  of  x or  y must  be  even” What  definitions do  we  need? Goal:  prove  P implies  Q
  15. If  the  product  of  x and  y is  even,  at

     least  one  of  x or  y must  be  even. P =  “the  product  of  x and  y is  even” Q =  “at  least  one  of  x or  y must  be  even” Goal:  prove  P implies  Q Definition:  even.  An  integer,  z,  is  even if  there   exists  an  integer  k such  that  z = 2k.
  16. If  the  product  of  x and  y is  even,  at

     least  one  of  x or  y must  be  even. P =  “the  product  of  x and  y is  even” Q =  “at  least  one  of  x or  y must  be  even” Goal:  prove  P implies  Q Definition:  even.  An  integer,  z,  is  even if  there   exists  an  integer  k such  that  z = 2k.
  17. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” To  prove,  P implies  Q,  we  use  contrapositive  inference  rule:   NOT(Q) IMPLIES NOT(P) P IMPLIES Q Observe:  this  is  starting  backwards!     We  are  starting  the  proof  from  the  conclusion  we  want.
  18. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” To  prove,  P implies  Q,  we  prove  the  contrapositive:   NOT(Q) implies NOT(P) To  prove  an  implication,  assume  left  side,  show  right: Assume NOT(at  least  one  of x and  y must  be  even)
  19. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” To  prove,  P implies  Q,  we  prove  the  contrapositive:   NOT(Q) implies NOT(P) To  prove  an  implication,  assume  left  side,  show  right: Assume NOT(at  least  one  of x and  y must  be  even) By  the  meaning  of  NOT: both  x and  y are  not  even
  20. Definition:  even.  An  integer,  z,  is  even  if  and  only

      if  there  exists  an  integer  k such  that  z = 2k. Definition:  odd.  An  integer,  z,  is  odd  if  and  only  if   there  exists  an  integer  k such  that  z = 2k + 1. Odd-­‐Even  Lemma:  If  an  integer  is  not  even,  it  is  odd.
  21. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” To  prove,  P implies  Q,  we  prove  the  contrapositive:   NOT(Q) implies NOT(P) To  prove  an  implication,  assume  left  side,  show  right: Assume NOT(at  least  one  of x and  y must  be  even) By  the  meaning  of  NOT: both  x and  y are  not  even By  the  Odd-­‐Even  Lemma: both  x and  y are  odd
  22. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” To  prove,  P implies  Q,  we  prove  the  contrapositive:   NOT(Q) implies NOT(P) To  prove  an  implication,  assume  left  side,  show  right: Assume NOT(at  least  one  of x and  y must  be  even) By  the  meaning  of  NOT: both  x and  y are  not  even By  the  Odd-­‐Even  Lemma: both  x and  y are  odd By  the  definition  of  odd: there  exists  integers  k,  m,  such  that  x = 2k + 1 and  y = 2m + 1
  23. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” We  prove  the  contrapositive:   Assume NOT(at  least  one  of x and  y must  be  even) By  the  meaning  of  NOT:  both  x and  y are  not  even. By  the  Odd-­‐Even  Lemma:  both  x and  y are  odd. By  the  definition  of  odd: there  exists  integers  k,  m,  such  that  x = 2k + 1 and  y = 2m + 1 By  algebra: xy = (2k + 1)(2m + 1) = 4mk + 2m + 2k + 1 = 2(2mk + m + k) + 1
  24. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” We  prove  the  contrapositive:   Assume NOT(at  least  one  of x and  y must  be  even) … Since  the  integers  closed  under  multiplication  and  addition: there  exists  some  integer  r where  r = 2mk + m + k By  definition  of  odd: So  xy = 2r + 1 which  means  the  product  of  x and  y is  odd. By  the  Odd-­‐Even  Lemma: the  product  of  x and  y is  not  even.
  25. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” We  prove  the  contrapositive:   Assume NOT(at  least  one  of x and  y must  be  even) … By  integers  closed  under  multiplication  and  addition: there  exists  some  integer  r where  r = 2mk + m + k By  definition  of  odd: So  xy = 2r + 1 which  means  the  product  of  x and  y is  odd. By  the  Odd-­‐Even  Lemma: the  product  of  x and  y is  not  even. Odd-­‐Even  Lemma:  If  an  integer  is  not  even,  it  is  odd.
  26. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” We  prove  the  contrapositive:   Assume NOT(at  least  one  of x and  y must  be  even) … By  the  Even-­‐Odd*  Lemma: the  product  of  x and  y is  not  even. So,  NOT(product  of  x and  y is  not  even) Thus,  we  have  proven  the  implication: NOT(at  least  one  of x and  y must  be  even)   implies  NOT(at  least  one  of x and  y must  be  even)
  27. P =  “the  product  of  x and  y is  even”

        Q =  “at  least  one  of  x or  y must  be  even” We  prove  the  contrapositive:   Assume NOT(at  least  one  of x and  y must  be  even) … So,  NOT(product  of  x and  y is  not  even) Thus,  we  have  proven  the  implication: NOT(at  least  one  of x and  y must  be  even)   implies  NOT(at  least  one  of x and  y must  be  even) By  the  contrapositive  inference  rule,  this  proves: at  least  one  of x and  y must  be  even implies  at  least  one  of x and  y must  be  even.
  28. In  physics,  your  solution   should  convince  a   reasonable

     person.  In   math,  you  have  to   convince  a  person  who's   trying  to  make  trouble. Frank  Wilczek (2004  Nobel  Prize  Physics)
  29. “Correct  ”  Rigorous  Proof  of  P Axioms used  are  clear

     and  accepted Each  step  uses  a  sound  inference  rule correctly: – Shows  antecedents  are  satisfied – Concludes  the  conclusion Results  in  concluding  goal  proposition:  P Do  the  proofs  we  do  in  cs2102  actually  do  this?
  30. “Good”  Proofs  in  cs2102 • Well  written  and  clearly  organized:

    – Should  be  obvious  what  you  are  proving  and how • Convincing  to  a  skeptical reader • State  assumptions  clearly:  careful  about  not   assuming  non-­‐obvious  things • Focus  on  important  steps,  not  gory  details
  31. Charge • Next  week:  we’ll  start  proving  non-­‐obvious things! •

    Before  Friday  (6:29pm):  course  pledge,   registration  survey  (read  “Habits  of  Highly   Mathematical  People”) • Read  MCS  Ch 2,  3;  PS1  is  due  next  Friday • TA’s  office  hours  will  start  next  week  (and  be   posted  soon)