4 Copyright 1991 University of Cambridge
6 Examples of simplification and induction on lists
12 arities list :: (term)term
16 tl :: "'a list => 'a list"
17 forall :: "['a list, 'a => o] => o"
18 len :: "'a list => nat"
19 at :: "['a list, nat] => 'a"
20 "[]" :: "'a list" ("[]")
21 "." :: "['a, 'a list] => 'a list" (infixr 80)
22 "++" :: "['a list, 'a list] => 'a list" (infixr 70)
25 list_ind "[| P([]); ALL x l. P(l)-->P(x.l) |] ==> All(P)"
28 "[| l = l'; !!x. P(x)<->P'(x) |] ==> forall(l,P) <-> forall(l',P')"
30 list_distinct1 "~[] = x.l"
31 list_distinct2 "~x.l = []"
33 list_free "x.l = x'.l' <-> x=x' & l=l'"
36 app_cons "(x.l)++l' = x.(l++l')"
40 forall_nil "forall([],P)"
41 forall_cons "forall(x.l,P) <-> P(x) & forall(l,P)"
44 len_cons "len(m.q) = succ(len(q))"
47 at_succ "at(m.q,succ(n)) = at(q,n)"