predefined list
[] is Nil
x # xs is Cons x xs
[x1,...xn ] is x1#....#xn#[]
xs@ys is app xs ys
fun length::" 'a list =>nat" where
"length Nil = 0"|"length (Cons x xs) =Suc(length xs)"
fun map::" ('a => 'b) => 'a list => 'b list" where
"map f Nil = Nil"|"map f(Cons x xs) = Cons(f x)(map f xs)"
fun hd::"'a list ⇒'a" where
"hd (x # xs) = x"
fun tl::"'a list ⇒ 'a list" where
"tl [] = []"|"tl (x#xs) = xs"