author | Christian Urban <urbanc@in.tum.de> |
Thu, 27 May 2010 18:37:52 +0200 | |
changeset 2302 | c6db12ddb60c |
parent 2299 | 09bbed4f21d6 |
child 2303 | c785fff02a8f |
permissions | -rw-r--r-- |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
1 |
theory SingleLet |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
2 |
imports "../NewParser" |
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
3 |
begin |
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
4 |
|
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
5 |
atom_decl name |
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
6 |
|
2288
3b83960f9544
new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents:
2146
diff
changeset
|
7 |
ML {* print_depth 50 *} |
2299 | 8 |
declare [[STEPS = 8]] |
2288
3b83960f9544
new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents:
2146
diff
changeset
|
9 |
|
2294
72ad4e766acf
properly exported bn_descr
Christian Urban <urbanc@in.tum.de>
parents:
2293
diff
changeset
|
10 |
|
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
11 |
nominal_datatype trm = |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
12 |
Var "name" |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
13 |
| App "trm" "trm" |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
14 |
| Lam x::"name" t::"trm" bind_set x in t |
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
15 |
| Let a::"assg" t::"trm" bind_set "bn a" in t |
2296 | 16 |
| Foo x::"name" y::"name" t::"trm" bind_set x in y t |
17 |
| Bar x::"name" y::"name" t::"trm" bind y x in t x y |
|
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
18 |
and assg = |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
19 |
As "name" "trm" |
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
20 |
binder |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
21 |
bn::"assg \<Rightarrow> atom set" |
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
22 |
where |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
23 |
"bn (As x t) = {atom x}" |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
24 |
|
2296 | 25 |
|
2302 | 26 |
thm permute_trm_raw_permute_assg_raw.simps[no_vars] |
2293
aecebd5ed424
hving a working fv-definition without the export
Christian Urban <urbanc@in.tum.de>
parents:
2292
diff
changeset
|
27 |
thm fv_trm_raw.simps[no_vars] fv_assg_raw.simps[no_vars] fv_bn_raw.simps[no_vars] bn_raw.simps[no_vars] |
2295
8aff3f3ce47f
started to work on alpha
Christian Urban <urbanc@in.tum.de>
parents:
2294
diff
changeset
|
28 |
thm alpha_trm_raw_alpha_assg_raw_alpha_bn_raw.intros[no_vars] |
8aff3f3ce47f
started to work on alpha
Christian Urban <urbanc@in.tum.de>
parents:
2294
diff
changeset
|
29 |
|
2302 | 30 |
ML {* val {inducts, ... } = Function.get_info @{context} @{term "fv_trm_raw"}*} |
31 |
ML {* Rule_Cases.strict_mutual_rule @{context} (the inducts) *} |
|
32 |
||
33 |
(* |
|
34 |
lemma empty_eqvt[eqvt]: |
|
35 |
shows "p \<bullet> {} = {}" |
|
36 |
unfolding empty_def |
|
37 |
by (perm_simp) (rule refl) |
|
38 |
*) |
|
39 |
lemma |
|
40 |
"(p \<bullet> {}) = {}" |
|
41 |
thm eqvts_raw |
|
42 |
thm eqvts |
|
43 |
apply(perm_strict_simp) |
|
44 |
||
45 |
||
46 |
lemma |
|
47 |
shows "p1 \<bullet> fv_trm_raw trm_raw = fv_trm_raw (p1 \<bullet> trm_raw)" |
|
48 |
and "p1 \<bullet> fv_assg_raw assg_raw = fv_assg_raw (p1 \<bullet> assg_raw)" |
|
49 |
and "p1 \<bullet> fv_bn_raw assg_raw = fv_bn_raw (p1 \<bullet> assg_raw)" |
|
50 |
apply(induct trm_raw and assg_raw and assg_raw rule: fv_trm_raw_fv_assg_raw_fv_bn_raw.induct) |
|
51 |
apply(simp_all) |
|
52 |
apply(perm_simp) |
|
53 |
apply(rule refl) |
|
54 |
apply(perm_simp) |
|
55 |
apply(rule refl) |
|
56 |
apply(perm_simp) |
|
57 |
apply(rule refl) |
|
58 |
apply(simp add: fv_trm_raw.simps) |
|
59 |
||
2288
3b83960f9544
new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents:
2146
diff
changeset
|
60 |
|
2296 | 61 |
|
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2106
diff
changeset
|
62 |
ML {* Inductive.the_inductive *} |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
63 |
thm trm_assg.fv |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
64 |
thm trm_assg.supp |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
65 |
thm trm_assg.eq_iff |
1911
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
66 |
thm trm_assg.bn |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
67 |
thm trm_assg.perm |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
68 |
thm trm_assg.induct |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
69 |
thm trm_assg.inducts |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
70 |
thm trm_assg.distinct |
60b5c61d3de2
renamed Ex1.thy to SingleLet.thy
Christian Urban <urbanc@in.tum.de>
parents:
1773
diff
changeset
|
71 |
ML {* Sign.of_sort @{theory} (@{typ trm}, @{sort fs}) *} |
2288
3b83960f9544
new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents:
2146
diff
changeset
|
72 |
|
3b83960f9544
new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents:
2146
diff
changeset
|
73 |
(* TEMPORARY |
2024
d974059827ad
Equivariance fails for single let?
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
1911
diff
changeset
|
74 |
thm trm_assg.fv[simplified trm_assg.supp(1-2)] |
2288
3b83960f9544
new fv/fv_bn function (supp breaks now); exported raw perms and raw funs into separate ML-files
Christian Urban <urbanc@in.tum.de>
parents:
2146
diff
changeset
|
75 |
*) |
2064
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
parents:
2028
diff
changeset
|
76 |
|
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
77 |
|
2146 | 78 |
|
1596
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
79 |
end |
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
80 |
|
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
81 |
|
c69d9fb16785
Move Ex1 and Ex2 out of Test
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
diff
changeset
|
82 |