Subst/AList.thy
author lcp
Wed, 25 May 1994 13:03:19 +0200
changeset 77 d64593bb95d3
parent 0 7949f97df77a
child 106 d27056ec0a5a
permissions -rw-r--r--
HOL/Arith: definition of diff now uses pred, not nat_rec

(*  Title: 	Substitutions/alist.thy
    Author: 	Martin Coen, Cambridge University Computer Laboratory
    Copyright   1993  University of Cambridge

Association lists.
*)

AList = List + 

consts

  alist_rec  :: "[('a*'b) list,'c,['a,'b,('a*'b) list,'c]=>'c]=>'c"
  assoc      :: "['a,'b,('a*'b) list] => 'b"

rules

  alist_rec_def 
    "alist_rec(al,b,c) == list_rec(al,b,%p xs g.split(p,%x y.c(x,y,xs,g)))"

  assoc_def    "assoc(v,d,al) == alist_rec(al,d,%x y xs g.if(v=x,y,g))"

end