Go backward to Example (Continued) Go up to Top Go forward to Example (Continued) |
We prove by induction on n
forall n in N: (sum1 <= i <= n i) = (n+1)n/2
The induction base holds because
(sum1 <= i <= 0 i) = 0 = (0+1)*0/2.
We take arbitrary n in N and assume
(1) (sum1 <= i <= n i) = (n+1)n/2.
We have to show
(2) (sum1 <= i <= n+1 i) = ((n+1)+1)(n+1)/2.