previous up next
Go backward to Example (Continued)
Go up to Top
Go forward to Summary
RISC-Linz logo

Example (Continued)

Take arbitrary y in List(T). We have

length(append(cons(e, l), y)) = (definition append)
length(cons(e, append(l, y))) = (definition length)
1 + length(append(l, y)) = (induction hypothesis)
1 + (length(l) + length(y)) =
(1 + length(l)) + length(y) = (definition length)
length(cons(e, l)) + length(y).

Author: Wolfgang Schreiner
Last Modification: November 24, 1999

previous up next