author | clasohm |
Wed, 02 Nov 1994 11:50:09 +0100 | |
changeset 156 | fd1be45b64bf |
parent 106 | d27056ec0a5a |
child 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 |
||
106 | 17 |
alist_rec_def "alist_rec(al,b,c) == list_rec(al, b, split(c))" |
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 |