1911
|
1 |
theory SingleLet
|
2024
|
2 |
imports "../NewParser"
|
1596
|
3 |
begin
|
|
4 |
|
|
5 |
atom_decl name
|
|
6 |
|
2400
|
7 |
declare [[STEPS = 20]]
|
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 |
|
2397
|
24 |
(* can lift *)
|
2401
7645e18e8b19
modified the code for class instantiations (with help from Florian)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
25 |
|
2397
|
26 |
thm distinct
|
|
27 |
thm trm_raw_assg_raw.inducts
|
|
28 |
thm fv_defs
|
2384
|
29 |
thm perm_simps
|
|
30 |
thm perm_laws
|
2397
|
31 |
thm trm_raw_assg_raw.size(9 - 16)
|
|
32 |
|
2398
|
33 |
(* cannot lift yet *)
|
|
34 |
thm eq_iff
|
|
35 |
thm eq_iff_simps
|
2403
a92d2c915004
cezary made the eq_iff lemmas to lift (still needs some infrastructure in quotient)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
36 |
(* bn / eqvt lemmas for fv / fv_bn / bn *)
|
2361
|
37 |
|
2398
|
38 |
ML {*
|
|
39 |
val thms_d = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms distinct}
|
|
40 |
*}
|
2397
|
41 |
|
2398
|
42 |
ML {*
|
|
43 |
val thms_i = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw_assg_raw.inducts}
|
|
44 |
*}
|
|
45 |
|
|
46 |
ML {*
|
|
47 |
val thms_f = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms fv_defs}
|
|
48 |
*}
|
|
49 |
|
|
50 |
ML {*
|
|
51 |
val thms_i = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms trm_raw_assg_raw.size(9 - 16)}
|
|
52 |
*}
|
|
53 |
|
|
54 |
ML {*
|
|
55 |
val thms_p = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_simps}
|
|
56 |
*}
|
|
57 |
|
|
58 |
ML {*
|
|
59 |
val thms_f = map (lift_thm [@{typ trm}, @{typ assg}] @{context}) @{thms perm_laws}
|
|
60 |
*}
|
|
61 |
|
|
62 |
|
|
63 |
section {* NOT *}
|
|
64 |
|
2402
|
65 |
lemma [quot_respect]:
|
|
66 |
"(alpha_assg_raw ===> alpha_assg_raw ===> op =) alpha_bn_raw alpha_bn_raw"
|
|
67 |
sorry
|
|
68 |
|
2403
a92d2c915004
cezary made the eq_iff lemmas to lift (still needs some infrastructure in quotient)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
69 |
|
2402
|
70 |
ML {*
|
2403
a92d2c915004
cezary made the eq_iff lemmas to lift (still needs some infrastructure in quotient)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
71 |
val thms_e = map (lift_thm [@{typ trm}, @{typ assg}] @{context})
|
a92d2c915004
cezary made the eq_iff lemmas to lift (still needs some infrastructure in quotient)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
72 |
@{thms eq_iff[unfolded alphas permute_prod.simps prod_fv.simps prod_alpha_def prod_rel.simps
|
a92d2c915004
cezary made the eq_iff lemmas to lift (still needs some infrastructure in quotient)
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
73 |
prod.cases]}
|
2402
|
74 |
*}
|
2397
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
2361
|
79 |
|
|
80 |
thm perm_defs
|
|
81 |
thm perm_simps
|
|
82 |
|
|
83 |
lemma supp_fv:
|
|
84 |
"supp t = fv_trm t"
|
|
85 |
"supp b = fv_bn b"
|
|
86 |
apply(induct t and b rule: i1)
|
|
87 |
apply(simp_all add: f1)
|
|
88 |
apply(simp_all add: supp_def)
|
2365
|
89 |
apply(simp_all add: b1)
|
|
90 |
sorry
|
|
91 |
|
|
92 |
consts perm_bn_trm :: "perm \<Rightarrow> trm \<Rightarrow> trm"
|
|
93 |
consts perm_bn_assg :: "perm \<Rightarrow> assg \<Rightarrow> assg"
|
|
94 |
|
|
95 |
lemma y:
|
|
96 |
"perm_bn_trm p (Var x) = (Var x)"
|
|
97 |
"perm_bn_trm p (App t1 t2) = (App t1 t2)"
|
|
98 |
"perm_bn_trm p ("
|
|
99 |
|
|
100 |
|
2361
|
101 |
|
2336
|
102 |
typ trm
|
|
103 |
typ assg
|
|
104 |
|
1911
|
105 |
thm trm_assg.fv
|
|
106 |
thm trm_assg.supp
|
2024
|
107 |
thm trm_assg.eq_iff
|
1911
|
108 |
thm trm_assg.bn
|
|
109 |
thm trm_assg.perm
|
|
110 |
thm trm_assg.induct
|
|
111 |
thm trm_assg.inducts
|
|
112 |
thm trm_assg.distinct
|
|
113 |
ML {* Sign.of_sort @{theory} (@{typ trm}, @{sort fs}) *}
|
2024
|
114 |
|
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
|
115 |
(* TEMPORARY
|
2024
|
116 |
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
|
117 |
*)
|
2064
2725853f43b9
solved the problem with equivariance by first eta-normalising the goal
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
118 |
|
1596
|
119 |
end
|
|
120 |
|
|
121 |
|
|
122 |
|