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


Take the set List(T) defined inductively as

nil in List(T),
forall e in T, l in List(T): cons(e, l) in List(T).
We define
append: List(T) x List(T) -> List(T)
append(nil, y) := y
append(cons(e, x), y) := cons(e, append(x, y))
and claim that the following holds:
forall x in List(T), y in List(T):
   length(append(x, y)) = length(x)+length(y).

Author: Wolfgang Schreiner
Last Modification: November 24, 1999

previous up next