Discrete Structures

Lecture Notes, 11 Oct 2010

Last Update: 11 October 2010

Note: NEW or UPDATED material is highlighted


Note: A username and password may be required to access certain documents. Please contact Bill Rapaport.


Index to all lecture notes
…Previous lecture


§§1.6: Proof Strategies (cont'd)

  1. The Example from Last Time, concluded:

    1. Prove: If n is odd, then n+1 is even.
      Hidden assumption: n is an integer
      Logical form (FOL transation):
        (*)   (∀ integer n)[Odd(n) → Even(n+1)]

      Strategy & Proof:

        Let c be an arbitrary integer.
        Show Odd(c) → Even(c+1) (and then use UG to show (*))
          Suppose Odd(c) & show Even(c+1):
            i.e., show ∃j[c+1=2j] (replace "Even" by its definition)
            But Odd(c)
            ∴ ∃k[c=2k+1] (by def of Odd)
            Call the k that works "k1" (by EI)
            Now show (2k1+1)+1 is even:
              Use algebra: (2k1+1)+1 = 2k1+2 = 2(k1+1)
            So, take j = k1+1
            i.e., ∃j[c+1=2j], by EG, namely: j = k1+1
            c+1 is even,
            i.e., Even(c+1).
          Now that we know Even(c+1) on the assumption that Odd(c),
          we also know Odd(c) → Even(c+1)
        ∴ we can infer (∀ integer n)[Odd(n) → Even(n+1)], by UG
        QED

    2. Here is a more formal version:

        Show: (∀ integer n)[Odd(n) → Even(n+1)]
        Let c be an arbitrary integer
        Show Odd(c) → Even(c+1):

        1. Odd(c) :  temporary assumption to show Even(c+1) by Direct Proof
        2. k[c=2k+1] :  1; def of Odd
        3. c=2k1+1 :  2; EI
        4. c+1=2k1+1+1 :  3; algebra
        5. c+1=2k1+2 :  4; algebra
        6. c+1=2(k1+1) :  5; algebra
        7. j[c+1=2j] :  6; EG
        8. Even(c+1) :  7; def of Even
        9. Odd(c) → Even(c+1) :  1–8; Direct Proof
        10. x[Odd(x) → Even(x+1)] :  9; UG

      • Only logicians and computer scientists write proofs like this,
        paying attention to every detail

      • mathematicians are sloppier :-)

    3. Simpler ("mathematical") version:

        Let c be an arbitrary integer.
        Suppose Odd(c) & show Even(c+1).
        Because Odd(c), we know c=2k+1, for some k.
        ∴ show (2k+1)+1 is even.
        But (2k+1)+1 = 2(k+1)
        ∴ Even(c+1). QED


  2. Proof by Contraposition (or: Indirect Proof):

    1. Another way to prove (AB):

      • try to show the logically equivalent (¬B → ¬A)

    2. How? By Direct Proof:

      • Suppose ¬B
        & try to show ¬A

    3. This is especially useful if B is "simpler" than A

    4. E.g., show: If 7n–5 is odd, then n is even.
      Let domain = Z

      Strategy & proof:

        Show (∀ int n)[Odd(7n–5) → Even(n)]

          Let c be an arb. int.
          & show Odd(7c–5) → Even(c):

            We could supp. Odd(7c–5) & show Even(c)

            • (Try it! Click on link to see what happens.)

            But might be easier to show the contrapositive: (¬Even(c) → ¬Odd(7c–5)):

            ∴ supp. ¬Even(c), & show ¬Odd(7c–5):

            But now we can use another strategy that I didn't mention:

            • Get rid of negations!

            i.e., instead of supposing ¬Even(c), let's supp. Odd(c),
            which is mathematically equivalent (you should know that!)

            and instead of trying to show ¬Odd(7c–5),
            let's try to show Even(7c–5)
            which is mathematically equivalent.

            • Note that we are not proving anything different!
              We're just restating—in a simpler form—what we're proving

            So: supp. ∃k[c=2k+1]
            & show ∃j[7c–5 = 2j]:

            i.e., find j such that 7c–5 = 2j:

              We know c=2k+1 (for some k)

              ∴ 7c–5 = 7(2k+1)–5
                           = 14k+7–5
                           = 14k+2
                           = 2(7k+1)

              ∴ take j = 7k+1.
              QED


  3. When should you use Direct Proof
    and when should you use Indirect Proof (i.e., Proof by Contrapositive)?

    1. In (AB), if B is simpler than A, then use Indirect Proof.

    2. Else, try one strategy, and, if it goes nowhere, then try the other!


  4. Proof by Contradiction:

    1. Another kind of indirect proof

    2. To show A:
      supp. ¬A & try to derive a contradiction;
      i.e., try to find B such that (B ∧ ¬B)

    3. Why should this work? Consider this truth-table analysis:

      • (let "FALSE" name any contradiction, i.e., any proposition that is always false)

        Supp. that the argument from ¬A to (B ∧ ¬ B) is valid;
        ∴ (¬A → (B ∧ ¬ B)) is a tautology.
        but it ≡ ¬A → FALSE
        ∴ tval(¬A) = F (else it wouldn't be a tautology)
        ∴ tval(A) = T

    4. E.g.: Show √2 is irrational:

      • Let Q(x) = "x is rational"

        • Remember: Q is the mathematical symbol for the set of rational numbers.

        So we need to show: ¬Q(√2)

        • Suppose, by way of contradiction, Q(√2)
          & try to find B such that (B ∧ ¬B):

          • Because we are assuming that Q(√2), it follows that (∃ int a,b)[(√2 = a/b) ∧ (a/b is in lowest terms)],

            • i.e., a,b have no common factors

              • Call this B

            ∴ 2 = a2/b2

            ∴ 2b2 = a2

            ∴ Even(a2)

            ∴ Even(a), by lemma (Rosen, p.85: 16)

            • (Hint: If Even(a2), could Odd(a)?)

    …to be continued…


Next lecture…


Text copyright © 2010 by William J. Rapaport (rapaport@buffalo.edu)
Cartoon links and screen-captures appear here for your enjoyment. They are not meant to infringe on any copyrights held by the creators. For more information on any cartoon, click on it, or contact me.
http://www.cse.buffalo.edu/~rapaport/191/F10/lecturenotes-20101011.html-20101011