SingleLet and Ex3 work with NewParser.
authorCezary Kaliszyk <kaliszyk@in.tum.de>
Mon, 03 May 2010 15:36:47 +0200
changeset 2028 15c5a2926622
parent 2027 68b2d2d7b4ed
child 2029 e72121ea134b
SingleLet and Ex3 work with NewParser.
Nominal/Ex/Ex3.thy
Nominal/Ex/SingleLet.thy
--- a/Nominal/Ex/Ex3.thy	Mon May 03 15:13:15 2010 +0200
+++ b/Nominal/Ex/Ex3.thy	Mon May 03 15:36:47 2010 +0200
@@ -1,35 +1,34 @@
 theory Ex3
-imports "../Parser"
+imports "../NewParser"
 begin
 
 (* Example 3, identical to example 1 from Terms.thy *)
 
 atom_decl name
 
-ML {* val _ = recursive := false  *}
-nominal_datatype trm0 =
-  Var0 "name"
-| App0 "trm0" "trm0"
-| Lam0 x::"name" t::"trm0"          bind x in t
-| Let0 p::"pat0" "trm0" t::"trm0"   bind "f0 p" in t
-and pat0 =
-  PN0
-| PS0 "name"
-| PD0 "pat0" "pat0"
+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 "pat" "pat"
 binder
-  f0::"pat0 \<Rightarrow> atom set"
+  f::"pat \<Rightarrow> atom set"
 where
-  "f0 PN0 = {}"
-| "f0 (PS0 x) = {atom x}"
-| "f0 (PD0 p1 p2) = (f0 p1) \<union> (f0 p2)"
+  "f PN = {}"
+| "f (PS x) = {atom x}"
+| "f (PD p1 p2) = (f p1) \<union> (f p2)"
 
-thm trm0_pat0.fv
-thm trm0_pat0.eq_iff
-thm trm0_pat0.bn
-thm trm0_pat0.perm
-thm trm0_pat0.induct
-thm trm0_pat0.distinct
-thm trm0_pat0.fv[simplified trm0_pat0.supp,no_vars]
+thm trm_pat.fv
+thm trm_pat.eq_iff
+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
 
--- a/Nominal/Ex/SingleLet.thy	Mon May 03 15:13:15 2010 +0200
+++ b/Nominal/Ex/SingleLet.thy	Mon May 03 15:36:47 2010 +0200
@@ -4,8 +4,6 @@
 
 atom_decl name
 
-ML {* val _ = cheat_alpha_eqvt := true *}
-
 nominal_datatype trm =
   Var "name"
 | App "trm" "trm"
@@ -18,7 +16,6 @@
 where
   "bn (As x t) = {atom x}"
 
-thm alpha_trm_raw_alpha_assg_raw_alpha_bn_raw.intros[no_vars]
 thm trm_assg.fv
 thm trm_assg.supp
 thm trm_assg.eq_iff
@@ -30,11 +27,12 @@
 ML {* Sign.of_sort @{theory} (@{typ trm}, @{sort fs}) *}
 thm trm_assg.fv[simplified trm_assg.supp(1-2)]
 
+(*
 setup {* Context.theory_map (Nominal_ThmDecls.add_thm @{thm "permute_pure"}) *}
 declare permute_trm_raw_permute_assg_raw.simps[eqvt]
 declare alpha_gen_eqvt[eqvt]
 equivariance alpha_trm_raw
-
+*)
 
 end