SLIDE 1
Proving Properties of power2
- Recall the recursive program power2 presented last time
power2 0 = 1 power2 (n+1) = 2 * (power2 n)
- Claim: For all nonnegative integers n, the value of the power2 function
applied to n is 2n
- While this claim may seem relatively obvious, how can we formally
prove it?
Theory in Programming Practice, Plaxton, Spring 2005