author | paulson |
Wed, 15 Jul 1998 14:19:02 +0200 | |
changeset 5148 | 74919e8f221c |
parent 3842 | b55686a7b22c |
child 8874 | 3242637f668c |
permissions | -rw-r--r-- |
3268
012c43174664
Mostly cosmetic changes: updated headers, ID lines, etc.
paulson
parents:
3192
diff
changeset
|
1 |
(* Title: Subst/AList.thy |
012c43174664
Mostly cosmetic changes: updated headers, ID lines, etc.
paulson
parents:
3192
diff
changeset
|
2 |
ID: $Id$ |
1476 | 3 |
Author: Martin Coen, Cambridge University Computer Laboratory |
968 | 4 |
Copyright 1993 University of Cambridge |
5 |
||
6 |
Association lists. |
|
7 |
*) |
|
8 |
||
9 |
AList = List + |
|
10 |
||
11 |
consts |
|
12 |
||
13 |
alist_rec :: "[('a*'b)list, 'c, ['a, 'b, ('a*'b)list, 'c]=>'c] => 'c" |
|
14 |
assoc :: "['a,'b,('a*'b) list] => 'b" |
|
15 |
||
3192
a75558a4ed37
New version, modified by Konrad Slind and LCP for TFL
paulson
parents:
1476
diff
changeset
|
16 |
defs |
968 | 17 |
|
18 |
alist_rec_def "alist_rec al b c == list_rec b (split c) al" |
|
19 |
||
3842 | 20 |
assoc_def "assoc v d al == alist_rec al d (%x y xs g. if v=x then y else g)" |
968 | 21 |
|
22 |
end |