=========================================================================== CSC 236 Examples of Well Ordering Winter 2008 =========================================================================== Proof that \-/ n, \sum_{0<=i<=n} 2^i = 2^{n+1}-1, using well ordering. For a contradiction, suppose ! \-/ n, \sum_{0<=i<=n} 2^i = 2^{n+1}-1, i.e., -] n, \sum_{0<=i<=n} 2^i != 2^{n+1}-1. Consider the set S = { n (- N : \sum_{0<=i<=n} 2^i != 2^{n+1}-1 }. By assumption, S is not empty, so by the well ordering principle, S contains a smallest element -- call it k. At this point, we know that: (i) \sum_{0<=i<=k} 2^i != 2^{k+1}-1 (because k (- S), (ii) \sum_{0<=i<=j} 2^i = 2^{j+1}-1 \-/ j (- {0,...,k-1} (because k is the smallest element in S). However, \sum_{0<=i<=0} 2^i = 2^0 = 1 = 2-1 = 2^{0+1}-1, so k != 0. Then k > 0 so k-1 >= 0 and \sum_{0<=i<=k-1} 2^i = 2^{(k-1)+1}-1, by (ii), which means that \sum_{0<=i<=k} 2^i = \sum_{0<=i<=k-1} 2^i + 2^k = (2^k-1) + 2^k = 2*2^k - 1 = 2^{k+1} - 1. But this contradicts (i)! Hence, there is no value of n (- N for which \sum_{0<=i<=n} 2^i != 2^{n+1}-1, i.e., \-/ n (- N, \sum_{0<=i<=n} 2^i = 2^{n+1}-1. Note: Proof contains content of base case and inductive step from induction proof -- not surprising because we are proving same statement using equivalent principle. Only difference is in structure of proof. Template for proof of \-/ n, P(n) using well ordering: For a contradiction, suppose -] n, ! P(n). Then set S = { n (- N : ! P(n) } is not empty so by well ordering, S contains a smallest element k. At this point we know: (i) ! P(k) (because k (- S) (ii) P(i) \-/ i (- {0,...,k-1} (because k is smallest in S). Use both facts to derive a contradiction -- standard techniques: prove (\-/ i < k, P(i)) -> P(k) to contradict (i) (same as writing proof by complete induction) or prove ! P(k) -> -] i < k, ! P(i) to contradict (ii) (equivalent to first technique but sometimes easier to do). Hence, by contradiction, \-/ n, P(n). Comparison of induction and well ordering: Induction often more direct, but sometimes well ordering easier to use. For example, consider statement \-/ m, \-/ n > 0, -] r, -] q, r < n /\ m = q n + r. Read proof by induction in textbook (Example 1.5, pp.27-28), and compare with following proof by well ordering -- this is *direct* proof by well ordering, not just rewrite of induction proof. Notice how proof by well ordering is much shorter (and more direct). Suppose m (- N, n (- N and n > 0. Consider the set R = { r (- N : -] q, m = q n + r }. R is not empty because m (- R (m = 0 n + m), so by well ordering, R contains a smallest element r, i.e., (i) -] q, m = q n + r (ii) \-/ r' (- {0,...,r-1}, \-/ q, m != q n + r' Claim: r < n. Proof: For a contradiction, suppose r >= n and let q (- N such that m = q n + r, by (i). Then m = q n + n + r - n = (q+1) n + (r-n), so r-n (- R (because r-n >= 0) and r-n < r (because n > 0), contradicting (ii). Hence, -] r, -] q, r < n /\ m = q n + r. Therefore, \-/ m, \-/ n > 0, -] r, -] q, r < n /\ m = q n + r.