201
|
1 |
theory LamEx
|
|
2 |
imports Nominal QuotMain
|
|
3 |
begin
|
|
4 |
|
|
5 |
atom_decl name
|
|
6 |
|
243
|
7 |
thm abs_fresh(1)
|
|
8 |
|
201
|
9 |
nominal_datatype rlam =
|
|
10 |
rVar "name"
|
|
11 |
| rApp "rlam" "rlam"
|
|
12 |
| rLam "name" "rlam"
|
|
13 |
|
|
14 |
inductive
|
|
15 |
alpha :: "rlam \<Rightarrow> rlam \<Rightarrow> bool" ("_ \<approx> _" [100, 100] 100)
|
|
16 |
where
|
|
17 |
a1: "a = b \<Longrightarrow> (rVar a) \<approx> (rVar b)"
|
|
18 |
| a2: "\<lbrakk>t1 \<approx> t2; s1 \<approx> s2\<rbrakk> \<Longrightarrow> rApp t1 s1 \<approx> rApp t2 s2"
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
19 |
| a3: "\<lbrakk>t \<approx> ([(a,b)]\<bullet>s); a\<sharp>[b].s\<rbrakk> \<Longrightarrow> rLam a t \<approx> rLam b s"
|
201
|
20 |
|
243
|
21 |
function
|
|
22 |
rfv :: "rlam \<Rightarrow> name set"
|
|
23 |
where
|
|
24 |
rfv_var: "rfv (rVar a) = {a}"
|
|
25 |
| rfv_app: "rfv (rApp t1 t2) = (rfv t1) \<union> (rfv t2)"
|
|
26 |
| rfv_lam: "rfv (rLam a t) = (rfv t) - {a}"
|
|
27 |
sorry
|
|
28 |
|
|
29 |
termination rfv sorry
|
|
30 |
|
201
|
31 |
quotient lam = rlam / alpha
|
|
32 |
sorry
|
|
33 |
|
203
|
34 |
print_quotients
|
|
35 |
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
36 |
quotient_def (for lam)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
37 |
Var :: "name \<Rightarrow> lam"
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
38 |
where
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
39 |
"Var \<equiv> rVar"
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
40 |
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
41 |
quotient_def (for lam)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
42 |
App :: "lam \<Rightarrow> lam \<Rightarrow> lam"
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
43 |
where
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
44 |
"App \<equiv> rApp"
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
45 |
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
46 |
quotient_def (for lam)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
47 |
Lam :: "name \<Rightarrow> lam \<Rightarrow> lam"
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
48 |
where
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
49 |
"Lam \<equiv> rLam"
|
201
|
50 |
|
218
|
51 |
thm Var_def
|
|
52 |
thm App_def
|
|
53 |
thm Lam_def
|
|
54 |
|
243
|
55 |
quotient_def (for lam)
|
|
56 |
fv :: "lam \<Rightarrow> name set"
|
|
57 |
where
|
|
58 |
"fv \<equiv> rfv"
|
|
59 |
|
|
60 |
thm fv_def
|
|
61 |
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
62 |
(* definition of overloaded permutation function *)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
63 |
(* for the lifted type lam *)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
64 |
overloading
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
65 |
perm_lam \<equiv> "perm :: 'x prm \<Rightarrow> lam \<Rightarrow> lam" (unchecked)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
66 |
begin
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
67 |
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
68 |
quotient_def (for lam)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
69 |
perm_lam :: "'x prm \<Rightarrow> lam \<Rightarrow> lam"
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
70 |
where
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
71 |
"perm_lam \<equiv> (perm::'x prm \<Rightarrow> rlam \<Rightarrow> rlam)"
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
72 |
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
73 |
end
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
74 |
|
238
|
75 |
(*quotient_def (for lam)
|
|
76 |
abs_fun_lam :: "'x prm \<Rightarrow> lam \<Rightarrow> lam"
|
|
77 |
where
|
|
78 |
"perm_lam \<equiv> (perm::'x prm \<Rightarrow> rlam \<Rightarrow> rlam)"*)
|
|
79 |
|
|
80 |
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
81 |
thm perm_lam_def
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
82 |
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
83 |
(* lemmas that need to lift *)
|
234
|
84 |
lemma pi_var_com:
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
85 |
fixes pi::"'x prm"
|
234
|
86 |
shows "(pi\<bullet>rVar a) \<approx> rVar (pi\<bullet>a)"
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
87 |
sorry
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
88 |
|
234
|
89 |
lemma pi_app_com:
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
90 |
fixes pi::"'x prm"
|
234
|
91 |
shows "(pi\<bullet>rApp t1 t2) \<approx> rApp (pi\<bullet>t1) (pi\<bullet>t2)"
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
92 |
sorry
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
93 |
|
234
|
94 |
lemma pi_lam_com:
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
95 |
fixes pi::"'x prm"
|
234
|
96 |
shows "(pi\<bullet>rLam a t) \<approx> rLam (pi\<bullet>a) (pi\<bullet>t)"
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
97 |
sorry
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
98 |
|
243
|
99 |
lemma fv_var:
|
|
100 |
shows "fv (Var a) = {a}"
|
|
101 |
sorry
|
|
102 |
|
|
103 |
lemma fv_app:
|
|
104 |
shows "fv (App t1 t2) = (fv t1) \<union> (fv t2)"
|
|
105 |
sorry
|
|
106 |
|
|
107 |
lemma fv_lam:
|
|
108 |
shows "fv (Lam a t) = (fv t) - {a}"
|
|
109 |
sorry
|
|
110 |
|
201
|
111 |
lemma real_alpha:
|
242
|
112 |
assumes "t = [(a,b)]\<bullet>s" "a\<sharp>[b].s"
|
201
|
113 |
shows "Lam a t = Lam b s"
|
217
|
114 |
sorry
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
|
120 |
(* Construction Site code *)
|
|
121 |
|
234
|
122 |
lemma perm_rsp: "(op = ===> alpha ===> alpha) op \<bullet> op \<bullet>"
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
123 |
apply(auto)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
124 |
(* this is propably true if some type conditions are imposed ;o) *)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
125 |
sorry
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
126 |
|
234
|
127 |
lemma fresh_rsp: "(op = ===> alpha ===> op =) fresh fresh"
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
128 |
apply(auto)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
129 |
(* this is probably only true if some type conditions are imposed *)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
130 |
sorry
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
131 |
|
234
|
132 |
lemma rVar_rsp: "(op = ===> alpha) rVar rVar"
|
|
133 |
apply(auto)
|
|
134 |
apply(rule a1)
|
|
135 |
apply(simp)
|
|
136 |
done
|
|
137 |
|
|
138 |
lemma rApp_rsp: "(alpha ===> alpha ===> alpha) rApp rApp"
|
|
139 |
apply(auto)
|
|
140 |
apply(rule a2)
|
|
141 |
apply (assumption)
|
|
142 |
apply (assumption)
|
|
143 |
done
|
|
144 |
|
|
145 |
lemma rLam_rsp: "(op = ===> alpha ===> alpha) rLam rLam"
|
229
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
146 |
apply(auto)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
147 |
apply(rule a3)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
148 |
apply(rule_tac t="[(x,x)]\<bullet>y" and s="y" in subst)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
149 |
apply(rule sym)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
150 |
apply(rule trans)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
151 |
apply(rule pt_name3)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
152 |
apply(rule at_ds1[OF at_name_inst])
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
153 |
apply(simp add: pt_name1)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
154 |
apply(assumption)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
155 |
apply(simp add: abs_fresh)
|
13f985a93dbc
fixed the definition of alpha; this *breaks* some of the experiments
Christian Urban <urbanc@in.tum.de>
diff
changeset
|
156 |
done
|
217
|
157 |
|
|
158 |
|
|
159 |
ML {* val qty = @{typ "lam"} *}
|
240
|
160 |
ML {* val (rty, rel, rel_refl, rel_eqv) = lookup_quot_data @{context} qty *}
|
|
161 |
ML {* val defs = @{thms Var_def App_def Lam_def perm_lam_def} *}
|
|
162 |
ML {* val consts = lookup_quot_consts defs *}
|
|
163 |
ML {* val (trans2, reps_same, quot) = lookup_quot_thms @{context} "lam" *}
|
234
|
164 |
ML {* val rsp_thms = @{thms perm_rsp fresh_rsp rVar_rsp rApp_rsp rLam_rsp} @ @{thms ho_all_prs ho_ex_prs} *}
|
240
|
165 |
ML {* fun lift_thm_lam lthy t = lift_thm lthy qty "lam" rsp_thms defs t *}
|
237
|
166 |
|
|
167 |
ML {* lift_thm_lam @{context} @{thm pi_var_com} *}
|
|
168 |
ML {* lift_thm_lam @{context} @{thm pi_app_com} *}
|
|
169 |
ML {* lift_thm_lam @{context} @{thm pi_lam_com} *}
|
|
170 |
|
|
171 |
fun
|
|
172 |
option_map::"('a \<Rightarrow> 'b) \<Rightarrow> ('a noption) \<Rightarrow> ('b noption)"
|
|
173 |
where
|
|
174 |
"option_map f (nSome x) = nSome (f x)"
|
|
175 |
| "option_map f nNone = nNone"
|
|
176 |
|
|
177 |
fun
|
|
178 |
option_rel
|
|
179 |
where
|
|
180 |
"option_rel r (nSome x) (nSome y) = r x y"
|
|
181 |
| "option_rel r _ _ = False"
|
|
182 |
|
|
183 |
declare [[map noption = (option_map, option_rel)]]
|
|
184 |
|
|
185 |
lemma OPT_QUOTIENT:
|
|
186 |
assumes q: "QUOTIENT R Abs Rep"
|
|
187 |
shows "QUOTIENT (option_rel R) (option_map Abs) (option_map Rep)"
|
|
188 |
apply (unfold QUOTIENT_def)
|
|
189 |
apply (auto)
|
|
190 |
using q
|
|
191 |
apply (unfold QUOTIENT_def)
|
|
192 |
apply (case_tac "a :: 'b noption")
|
|
193 |
apply (simp)
|
|
194 |
apply (simp)
|
|
195 |
apply (case_tac "a :: 'b noption")
|
|
196 |
apply (simp only: option_map.simps)
|
|
197 |
apply (subst option_rel.simps)
|
|
198 |
(* Simp starts hanging so don't know how to continue *)
|
|
199 |
sorry
|
|
200 |
|
240
|
201 |
(* Not sure if it make sense or if it will be needed *)
|
237
|
202 |
lemma abs_fun_rsp: "(op = ===> alpha ===> op = ===> op =) abs_fun abs_fun"
|
|
203 |
sorry
|
|
204 |
|
|
205 |
(* Should not be needed *)
|
|
206 |
lemma eq_rsp2: "((op = ===> op =) ===> (op = ===> op =) ===> op =) op = op ="
|
|
207 |
apply auto
|
|
208 |
apply (rule ext)
|
|
209 |
apply auto
|
|
210 |
apply (rule ext)
|
|
211 |
apply auto
|
|
212 |
done
|
217
|
213 |
|
237
|
214 |
(* Should not be needed *)
|
|
215 |
lemma perm_rsp_eq: "(op = ===> (op = ===> op =) ===> op = ===> op =) op \<bullet> op \<bullet>"
|
|
216 |
apply auto
|
|
217 |
thm arg_cong2
|
|
218 |
apply (rule_tac f="perm x" in arg_cong2)
|
|
219 |
apply (auto)
|
|
220 |
apply (rule ext)
|
|
221 |
apply (auto)
|
|
222 |
done
|
|
223 |
|
|
224 |
(* Should not be needed *)
|
|
225 |
lemma fresh_rsp_eq: "(op = ===> (op = ===> op =) ===> op =) fresh fresh"
|
|
226 |
apply (simp add: FUN_REL.simps)
|
|
227 |
apply (metis ext)
|
|
228 |
done
|
|
229 |
|
|
230 |
(* It is just a test, it doesn't seem true... *)
|
|
231 |
lemma quotient_cheat: "QUOTIENT op = (option_map ABS_lam) (option_map REP_lam)"
|
|
232 |
sorry
|
|
233 |
|
|
234 |
ML {* val rsp_thms = @{thms abs_fun_rsp OPT_QUOTIENT eq_rsp2 quotient_cheat perm_rsp_eq fresh_rsp_eq} @ rsp_thms *}
|
240
|
235 |
ML {* fun lift_thm_lam lthy t = lift_thm lthy qty "lam" rsp_thms defs t *}
|
237
|
236 |
|
|
237 |
thm a3
|
|
238 |
ML {* Toplevel.program (fn () => lift_thm_lam @{context} @{thm a3}) *}
|
238
|
239 |
thm a3
|
|
240 |
ML {* val t_u1 = eqsubst_thm @{context} @{thms abs_fresh(1)} (atomize_thm @{thm a3}) *}
|
|
241 |
ML {* val t_u = MetaSimplifier.rewrite_rule @{thms fresh_def supp_def} t_u1 *}
|
237
|
242 |
|
|
243 |
ML {* val t_a = atomize_thm t_u *}
|
|
244 |
ML {* val t_r = regularize t_a rty rel rel_eqv @{context} *}
|
238
|
245 |
ML {* fun r_mk_comb_tac_lam ctxt =
|
|
246 |
r_mk_comb_tac ctxt rty quot rel_refl trans2 rsp_thms
|
|
247 |
*}
|
|
248 |
|
|
249 |
instance lam :: fs_name
|
|
250 |
apply(intro_classes)
|
|
251 |
sorry
|
237
|
252 |
|
238
|
253 |
prove asdf: {* Logic.mk_implies (concl_of t_r, (@{term "Trueprop (\<forall>t\<Colon>rlam\<in>Respects
|
|
254 |
alpha.
|
|
255 |
\<forall>(a\<Colon>name) b\<Colon>name.
|
|
256 |
\<forall>s\<Colon>rlam\<in>Respects
|
|
257 |
alpha.
|
|
258 |
t \<approx> ([(a,
|
|
259 |
b)] \<bullet> s) \<longrightarrow>
|
|
260 |
a = b \<or>
|
|
261 |
a
|
|
262 |
\<notin> {a\<Colon>name.
|
|
263 |
infinite
|
|
264 |
{b\<Colon>name. Not
|
|
265 |
(([(a, b)] \<bullet>
|
|
266 |
s) \<approx>
|
|
267 |
s)}} \<longrightarrow>
|
|
268 |
rLam a
|
|
269 |
t \<approx> rLam
|
|
270 |
b s)"})) *}
|
|
271 |
apply (tactic {* full_simp_tac ((Simplifier.context @{context} HOL_ss) addsimps
|
|
272 |
[(@{thm equiv_res_forall} OF [rel_eqv]),
|
|
273 |
(@{thm equiv_res_exists} OF [rel_eqv])]) 1 *})
|
|
274 |
apply (rule allI)
|
|
275 |
apply (drule_tac x="t" in spec)
|
|
276 |
apply (rule allI)
|
|
277 |
apply (drule_tac x="a" in spec)
|
|
278 |
apply (rule allI)
|
|
279 |
apply (drule_tac x="b" in spec)
|
|
280 |
apply (rule allI)
|
|
281 |
apply (drule_tac x="s" in spec)
|
|
282 |
apply (rule impI)
|
|
283 |
apply (drule_tac mp)
|
|
284 |
apply (simp)
|
|
285 |
apply (simp)
|
|
286 |
apply (rule impI)
|
|
287 |
apply (rule a3)
|
|
288 |
apply (simp)
|
|
289 |
apply (simp add: abs_fresh(1))
|
|
290 |
apply (case_tac "a = b")
|
|
291 |
apply (simp)
|
|
292 |
apply (simp)
|
|
293 |
apply (auto)
|
|
294 |
apply (unfold fresh_def)
|
|
295 |
apply (unfold supp_def)
|
|
296 |
apply (simp)
|
|
297 |
prefer 2
|
|
298 |
apply (simp)
|
|
299 |
sorry
|
|
300 |
|
|
301 |
ML {* val abs = findabs rty (prop_of t_a) *}
|
|
302 |
ML {* val simp_lam_prs_thms = map (make_simp_lam_prs_thm @{context} quot) abs *}
|
|
303 |
ML {* val t_defs_sym = add_lower_defs @{context} defs *}
|
|
304 |
|
|
305 |
ML {* val t_r' = @{thm asdf} OF [t_r] *}
|
|
306 |
ML {* val t_t = repabs @{context} t_r' consts rty qty quot rel_refl trans2 rsp_thms *}
|
|
307 |
ML {* val t_l = repeat_eqsubst_thm @{context} simp_lam_prs_thms t_t *}
|
|
308 |
ML {* val t_a = simp_allex_prs @{context} quot t_l *}
|
|
309 |
ML {* val t_d = repeat_eqsubst_thm @{context} t_defs_sym t_a *}
|
|
310 |
ML {* val t_r = MetaSimplifier.rewrite_rule [reps_same] t_d *}
|
|
311 |
ML {* val tt = MetaSimplifier.rewrite_rule [symmetric @{thm supp_def}, symmetric @{thm fresh_def}] t_r *}
|
|
312 |
ML {* val rr = @{thm sym} OF @{thms abs_fresh(1)} *}
|
|
313 |
ML {* val ttt = eqsubst_thm @{context} [rr] tt *}
|
|
314 |
ML {* ObjectLogic.rulify ttt *}
|
|
315 |
|
|
316 |
lemma
|
|
317 |
assumes a: "a \<notin> {a\<Colon>name. infinite {b\<Colon>name. \<not> ([(a, b)] \<bullet> s) \<approx> s}}"
|
|
318 |
shows "a \<notin> {a\<Colon>name. infinite {b\<Colon>name. [(a, b)] \<bullet> s \<noteq> s}}"
|
|
319 |
using a apply simp
|
|
320 |
sorry (* Not true... *)
|