Nominal/Ex/Ex2.thy
author Christian Urban <urbanc@in.tum.de>
Mon, 17 May 2010 12:00:54 +0100
changeset 2143 871d8a5e0c67
parent 2120 2786ff1df475
child 2177 9b566c5dc1f5
child 2300 9fb315392493
permissions -rw-r--r--
somewhat simplified the main parsing function; failed to move a Note-statement to define_raw_perms

theory Ex2
imports "../NewParser"
begin

text {* example 2 *}

atom_decl name

nominal_datatype trm =
  Var "name"
| App "trm" "trm"
| Lam x::"name" t::"trm"          bind_set x in t
| Let p::"pat" "trm" t::"trm"   bind_set "f p" in t
and pat =
  PN
| PS "name"
| PD "name" "name"
binder
  f::"pat \<Rightarrow> atom set"
where
  "f PN = {}"
| "f (PD x y) = {atom x, atom y}"
| "f (PS x) = {atom x}"
thm trm_pat.bn
thm trm_pat.perm
thm trm_pat.induct
thm trm_pat.distinct
thm trm_pat.fv[simplified trm_pat.supp(1-2)]


end