Go backward to ConsequenceGo up to TopGo forward to Example |

Take the set List(`T`) defined in the previous example
and assume that it is a term algebra.
We define the length of a list as

length: List( T) ->Nlength(nil) := 0 length(cons( e,l)) := 1+length(l).

Then we have length(cons(1, cons(2, nil))) = 2.

Author: Wolfgang Schreiner

Last Modification: November 24, 1999