1911
|
1 |
theory SingleLet
|
2024
|
2 |
imports "../NewParser"
|
1596
|
3 |
begin
|
|
4 |
|
|
5 |
atom_decl name
|
|
6 |
|
2338
|
7 |
declare [[STEPS = 16]]
|
2294
|
8 |
|
2336
|
9 |
nominal_datatype trm =
|
1911
|
10 |
Var "name"
|
|
11 |
| App "trm" "trm"
|
2024
|
12 |
| Lam x::"name" t::"trm" bind_set x in t
|
|
13 |
| Let a::"assg" t::"trm" bind_set "bn a" in t
|
2311
|
14 |
| Foo x::"name" y::"name" t::"trm" t1::"trm" t2::"trm" bind_set x in y t t1 t2
|
2296
|
15 |
| Bar x::"name" y::"name" t::"trm" bind y x in t x y
|
2316
|
16 |
| Baz x::"name" t1::"trm" t2::"trm" bind x in t1, bind x in t2
|
1911
|
17 |
and assg =
|
2320
|
18 |
As "name" x::"name" t::"trm" bind x in t
|
1596
|
19 |
binder
|
1911
|
20 |
bn::"assg \<Rightarrow> atom set"
|
1596
|
21 |
where
|
2320
|
22 |
"bn (As x y t) = {atom x}"
|
1911
|
23 |
|
2359
|
24 |
typ trm
|
|
25 |
typ assg
|
2338
|
26 |
term Var
|
|
27 |
term App
|
|
28 |
term Baz
|
2339
|
29 |
term bn
|
|
30 |
term fv_trm
|
2338
|
31 |
|
2359
|
32 |
lemma [quot_respect]:
|
|
33 |
"(op = ===> alpha_trm_raw) Var_raw Var_raw"
|
|
34 |
"(alpha_trm_raw ===> alpha_trm_raw ===> alpha_trm_raw) App_raw App_raw"
|
|
35 |
apply(auto)
|
|
36 |
apply(rule alpha_trm_raw_alpha_assg_raw_alpha_bn_raw.intros)
|
|
37 |
apply(rule refl)
|
|
38 |
apply(rule alpha_trm_raw_alpha_assg_raw_alpha_bn_raw.intros)
|
|
39 |
apply(assumption)
|
|
40 |
apply(assumption)
|
|
41 |
done
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
lemma "Var x \<noteq> App y1 y2"
|
|
46 |
apply(descending)
|
|
47 |
apply(simp add: trm_raw.distinct)
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
ML {*
|
|
52 |
map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw.distinct(1)}
|
|
53 |
*}
|
|
54 |
|
|
55 |
|
|
56 |
|
2338
|
57 |
|
2336
|
58 |
typ trm
|
|
59 |
typ assg
|
|
60 |
|
1911
|
61 |
thm trm_assg.fv
|
|
62 |
thm trm_assg.supp
|
2024
|
63 |
thm trm_assg.eq_iff
|
1911
|
64 |
thm trm_assg.bn
|
|
65 |
thm trm_assg.perm
|
|
66 |
thm trm_assg.induct
|
|
67 |
thm trm_assg.inducts
|
|
68 |
thm trm_assg.distinct
|
|
69 |
ML {* Sign.of_sort @{theory} (@{typ trm}, @{sort fs}) *}
|
2024
|
70 |
|
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>
diff
changeset
|
71 |
(* TEMPORARY
|
2024
|
72 |
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>
diff
changeset
|
73 |
*)
|
2064
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
74 |
|
1596
|
75 |
end
|
|
76 |
|
|
77 |
|
|
78 |
|