Nominal/Ex/Ex2.thy
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Mon, 10 May 2010 18:29:45 +0200
changeset 2095 ae94bae5bb93
parent 2082 0854af516f14
child 2104 2205b572bc9b
permissions -rw-r--r--
Restore set bindings in CoreHaskell

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)]

declare permute_trm_raw_permute_pat_raw.simps[eqvt]
declare alpha_gen_eqvt[eqvt]

equivariance alpha_trm_raw


end