author | lcp |
Thu, 06 Apr 1995 11:49:42 +0200 | |
changeset 246 | 0f9230a24164 |
parent 194 | b93cc55cb7ab |
permissions | -rw-r--r-- |
0 | 1 |
(* Title: Substitutions/alist.thy |
2 |
Author: Martin Coen, Cambridge University Computer Laboratory |
|
3 |
Copyright 1993 University of Cambridge |
|
4 |
||
5 |
Association lists. |
|
6 |
*) |
|
7 |
||
8 |
AList = List + |
|
9 |
||
10 |
consts |
|
11 |
||
106 | 12 |
alist_rec :: "[('a*'b)list, 'c, ['a, 'b, ('a*'b)list, 'c]=>'c] => 'c" |
0 | 13 |
assoc :: "['a,'b,('a*'b) list] => 'b" |
14 |
||
15 |
rules |
|
16 |
||
194
b93cc55cb7ab
small updates because datatype list is now used. In particular Nil -> []
nipkow
parents:
106
diff
changeset
|
17 |
alist_rec_def "alist_rec(al,b,c) == list_rec(b, split(c), al)" |
0 | 18 |
|
106 | 19 |
assoc_def "assoc(v,d,al) == alist_rec(al,d,%x y xs g.if(v=x,y,g))" |
0 | 20 |
|
21 |
end |