Subst/AList.thy
author lcp
Tue, 06 Sep 1994 10:54:46 +0200
changeset 134 4b7da5a895e7
parent 106 d27056ec0a5a
child 194 b93cc55cb7ab
permissions -rw-r--r--
HOL/ind_syntax/factors: now returns only factors in the product type that associate to the right. Previously the proof of the induction rule crashed on types such as (bool*bool)*bool.

(*  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, split(c))"

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

end