Nominal/Ex/ExPS7.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Mon, 30 Aug 2010 15:55:08 +0900
changeset 2456 5e76af0a51f9
parent 2454 9ffee4eb1ae1
child 2480 ac7dff1194e8
permissions -rw-r--r--
No need to unfold mem_def with rsp/prs (requires new isabelle).

theory ExPS7
imports "../Nominal2"
begin

(* example 7 from Peter Sewell's bestiary *)

atom_decl name

nominal_datatype exp =
  Var name
| Unit
| Pair exp exp
| LetRec l::"lrbs" e::"exp"  bind (set) "bs l" in l e
and lrb =
  Assign name exp
and lrbs =
  Single lrb
| More lrb lrbs
binder
  b :: "lrb \<Rightarrow> atom set" and
  bs :: "lrbs \<Rightarrow> atom set"
where
  "b (Assign x e) = {atom x}"
| "bs (Single a) = b a"
| "bs (More a as) = (b a) \<union> (bs as)"



end