RU beehive logo ITEC dept promo banner
ITEC 380
2008fall
ibarland

most recent semester

lect04b
hw review; proofs

==== Direct proof:
for every real number,
there's another number that's even closer to zero.

- How to write as a formula?
- How to prove it (direct proof)?
  Any glitches?





In lecture:
  If n is odd, then n^2 is odd.
Note that we need a def'n of odd.



==== Another proof, in gory detail (notes only):
What is the definition of a number being even?  Odd?

Show: if n is even, then n+1 is odd.

1.  n is even      premise  (NB: n is arbitrary)
2.  ∃k.(n=2k)      def'n even
3.  n=2k            existential instantiation (NB k is not arbitrary)

...

15.  ¬∃z.(n+1=2z) ...
   Proof by contradition: 
     suppose n+1=2z, for some integer z.
     Then 2k+1=2z
     z=k+1/2
     z-k=1/2
      Contradiction. (since no integers differ by less than 1 -- Th'm)
      Thus 
16.  ¬(n+1 is even)     by line15 + def'n of even
17.  n+1 is odd       by line16 + def'n of odd


We can re-write this as a direct proof:



Show: if n is even, then n+1 is odd.

1.  n is even      premise  (NB: n is arbitrary)
2.  ∃k.(n=2k)      def'n even
3.  n=2k            existential instantiation (NB k is not arbitrary)
4.  ∀z.∀y.(z+1/2 &neq; y)  th'm: no integers differ by less than 1.
5.  ∀y.(k+1/2 &neq; y)    universal instantiaion[z/k], line 4, 
4.  ¬∃m.(k+1/2 = m)   by def'n of integer; (m arbitrary)
5.  ¬∃m.(2k+1 = 2m)   line4 + multiply equals by equals
6.  ¬∃m.( n+1 = 2m)   line 3 + subst equals for equals.
7.  ¬(n+1 is even)     by line15 + def'n of even
8.  n+1 is odd       by line16 + def'n of odd




Strategies
- Use your definitions, to go a step or two forwards.
- Write down your goal.  Use def'ns, to go a step or two backwards.
  (This often helps you solidifies the meaning of the definitions for you.)

- Try a direct proof, if you can come up with a constructive algorithm;
  try an indirect proof if you are trying to show how you think *any*
  constructive algorithm must fail.
  (This is the same thought process used in designing an algorithm,
   and in debugging: 
   Figure out how your algorithm will (eg) search through *any* list-of-names.
   To debug, come up with the smallest example which the algorithm won't work for.
  
- Another strategy: see if you can show the contrapositive.
  Example:  If m^2 is even, then m is even.



To show  "a iff b":
  - show "if a, then b"
  - show "if b, then a"

Example:
A number is rational iff its decimal expression repeats.




Also, "TFAE":
  - x is irrational
  - the decimal expansion of x never repeats
  - 3x is irrational.


most recent semester


©2008, Ian Barland, Radford University
Last modified 2008.Sep.26 (Fri)
Please mail any suggestions
(incl. typos, broken links)
to iba�rlandrad�ford.edu
Powered by PLT Scheme