132 |> snd o (Quotient_Def.quotient_lift_const ("Lt5", @{term rLt5})) |
131 |> snd o (Quotient_Def.quotient_lift_const ("Lt5", @{term rLt5})) |
133 |> snd o (Quotient_Def.quotient_lift_const ("Lnil", @{term rLnil})) |
132 |> snd o (Quotient_Def.quotient_lift_const ("Lnil", @{term rLnil})) |
134 |> snd o (Quotient_Def.quotient_lift_const ("Lcons", @{term rLcons})) |
133 |> snd o (Quotient_Def.quotient_lift_const ("Lcons", @{term rLcons})) |
135 |> snd o (Quotient_Def.quotient_lift_const ("fv_trm5", @{term fv_rtrm5})) |
134 |> snd o (Quotient_Def.quotient_lift_const ("fv_trm5", @{term fv_rtrm5})) |
136 |> snd o (Quotient_Def.quotient_lift_const ("fv_lts", @{term fv_rlts})) |
135 |> snd o (Quotient_Def.quotient_lift_const ("fv_lts", @{term fv_rlts})) |
137 |> snd o (Quotient_Def.quotient_lift_const ("fv_bv5", @{term fv_rbv5})) |
|
138 |> snd o (Quotient_Def.quotient_lift_const ("bv5", @{term rbv5})) |
136 |> snd o (Quotient_Def.quotient_lift_const ("bv5", @{term rbv5})) |
139 |> snd o (Quotient_Def.quotient_lift_const ("alpha_bv5", @{term alpha_rbv5}))) |
137 |> snd o (Quotient_Def.quotient_lift_const ("alpha_bv5", @{term alpha_rbv5}))) |
140 *} |
138 *} |
141 print_theorems |
139 print_theorems |
142 |
140 |
143 lemma alpha5_rfv: |
141 lemma alpha5_rfv: |
144 "(t \<approx>5 s \<Longrightarrow> fv_rtrm5 t = fv_rtrm5 s)" |
142 "(t \<approx>5 s \<Longrightarrow> fv_rtrm5 t = fv_rtrm5 s)" |
145 "(l \<approx>l m \<Longrightarrow> (fv_rlts l = fv_rlts m \<and> fv_rbv5 l = fv_rbv5 m))" |
143 "(l \<approx>l m \<Longrightarrow> fv_rlts l = fv_rlts m)" |
146 "(alpha_rbv5 b c \<Longrightarrow> fv_rbv5 b = fv_rbv5 c)" |
144 "(alpha_rbv5 b c \<Longrightarrow> True)" |
147 apply(induct rule: alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts) |
145 apply(induct rule: alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts) |
148 apply(simp_all add: eqvts) |
146 apply(simp_all add: eqvts) |
149 apply(simp add: alpha_gen) |
147 apply(simp add: alpha_gen) |
150 apply(clarify) |
148 apply(clarify) |
151 apply(simp) |
149 apply(simp) |
152 sorry |
150 done |
153 |
151 |
154 lemma bv_list_rsp: |
152 lemma bv_list_rsp: |
155 shows "x \<approx>l y \<Longrightarrow> rbv5 x = rbv5 y" |
153 shows "x \<approx>l y \<Longrightarrow> rbv5 x = rbv5 y" |
156 apply(induct rule: alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts(2)) |
154 apply(induct rule: alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts(2)) |
157 apply(simp_all) |
155 apply(simp_all) |
158 apply(clarify) |
156 apply(clarify) |
159 apply simp |
157 apply simp |
160 done |
158 done |
161 |
159 |
|
160 local_setup {* snd o Local_Theory.note ((@{binding alpha_dis}, []), (flat (map (distinct_rel @{context} @{thms alpha_rtrm5.cases alpha_rlts.cases alpha_rbv5.cases}) [(@{thms rtrm5.distinct}, @{term alpha_rtrm5}), (@{thms rlts.distinct}, @{term alpha_rlts}), (@{thms rlts.distinct}, @{term alpha_rbv5})]))) *} |
|
161 print_theorems |
|
162 |
|
163 |
|
164 lemma alpha_rbv_rsp_pre: |
|
165 "x \<approx>l y \<Longrightarrow> \<forall>z. alpha_rbv5 x z = alpha_rbv5 y z" |
|
166 apply (erule alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts(2)) |
|
167 apply (simp_all add: alpha_dis alpha5_inj) |
|
168 apply clarify |
|
169 apply (case_tac [!] z) |
|
170 apply (simp_all add: alpha_dis alpha5_inj) |
|
171 apply clarify |
|
172 apply auto |
|
173 apply (meson alpha5_symp alpha5_transp) |
|
174 apply (meson alpha5_symp alpha5_transp) |
|
175 done |
|
176 |
|
177 lemma alpha_rbv_rsp_pre2: |
|
178 "x \<approx>l y \<Longrightarrow> \<forall>z. alpha_rbv5 z x = alpha_rbv5 z y" |
|
179 apply (erule alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts(2)) |
|
180 apply (simp_all add: alpha_dis alpha5_inj) |
|
181 apply clarify |
|
182 apply (case_tac [!] z) |
|
183 apply (simp_all add: alpha_dis alpha5_inj) |
|
184 apply clarify |
|
185 apply auto |
|
186 apply (meson alpha5_symp alpha5_transp) |
|
187 apply (meson alpha5_symp alpha5_transp) |
|
188 done |
|
189 |
162 lemma [quot_respect]: |
190 lemma [quot_respect]: |
163 "(alpha_rlts ===> op =) fv_rlts fv_rlts" |
191 "(alpha_rlts ===> op =) fv_rlts fv_rlts" |
164 "(alpha_rlts ===> op =) fv_rbv5 fv_rbv5" |
|
165 "(alpha_rtrm5 ===> op =) fv_rtrm5 fv_rtrm5" |
192 "(alpha_rtrm5 ===> op =) fv_rtrm5 fv_rtrm5" |
166 "(alpha_rlts ===> op =) rbv5 rbv5" |
193 "(alpha_rlts ===> op =) rbv5 rbv5" |
167 "(op = ===> alpha_rtrm5) rVr5 rVr5" |
194 "(op = ===> alpha_rtrm5) rVr5 rVr5" |
168 "(alpha_rtrm5 ===> alpha_rtrm5 ===> alpha_rtrm5) rAp5 rAp5" |
195 "(alpha_rtrm5 ===> alpha_rtrm5 ===> alpha_rtrm5) rAp5 rAp5" |
169 "(alpha_rlts ===> alpha_rtrm5 ===> alpha_rtrm5) rLt5 rLt5" |
196 "(alpha_rlts ===> alpha_rtrm5 ===> alpha_rtrm5) rLt5 rLt5" |
174 apply (simp_all add: alpha5_inj alpha5_rfv alpha5_eqvt bv_list_rsp) |
201 apply (simp_all add: alpha5_inj alpha5_rfv alpha5_eqvt bv_list_rsp) |
175 apply (clarify) |
202 apply (clarify) |
176 apply (rule_tac x="0" in exI) |
203 apply (rule_tac x="0" in exI) |
177 apply (simp add: fresh_star_def fresh_zero_perm alpha_gen alpha5_rfv) |
204 apply (simp add: fresh_star_def fresh_zero_perm alpha_gen alpha5_rfv) |
178 apply clarify |
205 apply clarify |
179 apply (erule alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts(2)) |
206 apply (simp add: alpha_rbv_rsp_pre2) |
180 apply simp_all |
207 apply (simp add: alpha_rbv_rsp_pre) |
181 apply (erule_tac[!] alpha_rtrm5_alpha_rlts_alpha_rbv5.inducts(2)) |
208 done |
182 apply simp_all |
|
183 defer defer (* Both sides false, so equal when we have distinct *) |
|
184 apply (erule conjE)+ |
|
185 apply clarify |
|
186 apply (simp add: alpha5_inj) |
|
187 sorry (* may be true? *) |
|
188 |
209 |
189 lemma |
210 lemma |
190 shows "(alpha_rlts ===> op =) rbv5 rbv5" |
211 shows "(alpha_rlts ===> op =) rbv5 rbv5" |
191 by (simp add: bv_list_rsp) |
212 by (simp add: bv_list_rsp) |
192 |
213 |
210 |
231 |
211 end |
232 end |
212 |
233 |
213 lemmas permute_trm5_lts = permute_rtrm5_permute_rlts.simps[quot_lifted] |
234 lemmas permute_trm5_lts = permute_rtrm5_permute_rlts.simps[quot_lifted] |
214 lemmas bv5[simp] = rbv5.simps[quot_lifted] |
235 lemmas bv5[simp] = rbv5.simps[quot_lifted] |
215 lemmas fv_trm5_bv5[simp] = fv_rtrm5_fv_rbv5.simps[quot_lifted] |
236 lemmas fv_trm5_lts[simp] = fv_rtrm5_fv_rlts.simps[quot_lifted] |
216 lemmas fv_lts[simp] = fv_rlts.simps[quot_lifted] |
|
217 lemmas alpha5_INJ = alpha5_inj[unfolded alpha_gen, quot_lifted, folded alpha_gen] |
237 lemmas alpha5_INJ = alpha5_inj[unfolded alpha_gen, quot_lifted, folded alpha_gen] |
|
238 lemmas alpha5_DIS = alpha_dis[quot_lifted] |
218 |
239 |
219 lemma lets_bla: |
240 lemma lets_bla: |
220 "x \<noteq> z \<Longrightarrow> y \<noteq> z \<Longrightarrow> x \<noteq> y \<Longrightarrow>(Lt5 (Lcons x (Vr5 y) Lnil) (Vr5 x)) \<noteq> (Lt5 (Lcons x (Vr5 z) Lnil) (Vr5 x))" |
241 "x \<noteq> z \<Longrightarrow> y \<noteq> z \<Longrightarrow> x \<noteq> y \<Longrightarrow>(Lt5 (Lcons x (Vr5 y) Lnil) (Vr5 x)) \<noteq> (Lt5 (Lcons x (Vr5 z) Lnil) (Vr5 x))" |
221 apply (simp only: alpha5_INJ) |
242 apply (simp only: alpha5_INJ) |
222 apply (simp only: bv5) |
243 apply (simp only: bv5) |
250 "x \<noteq> y \<Longrightarrow> |
270 "x \<noteq> y \<Longrightarrow> |
251 (Lt5 (Lcons x (Vr5 x) (Lcons y (Vr5 y) Lnil)) (Ap5 (Vr5 x) (Vr5 y))) \<noteq> |
271 (Lt5 (Lcons x (Vr5 x) (Lcons y (Vr5 y) Lnil)) (Ap5 (Vr5 x) (Vr5 y))) \<noteq> |
252 (Lt5 (Lcons y (Vr5 x) (Lcons x (Vr5 y) Lnil)) (Ap5 (Vr5 x) (Vr5 y)))" |
272 (Lt5 (Lcons y (Vr5 x) (Lcons x (Vr5 y) Lnil)) (Ap5 (Vr5 x) (Vr5 y)))" |
253 apply (simp add: alpha5_INJ alpha_gen) |
273 apply (simp add: alpha5_INJ alpha_gen) |
254 apply (simp add: permute_trm5_lts eqvts) |
274 apply (simp add: permute_trm5_lts eqvts) |
255 apply (simp add: alpha5_INJ(5)) |
275 apply (simp add: alpha5_INJ) |
256 apply (simp add: alpha5_INJ(1)) |
276 done |
257 done |
|
258 |
|
259 lemma distinct_helper: |
|
260 shows "\<not>(rVr5 x \<approx>5 rAp5 y z)" |
|
261 apply auto |
|
262 apply (erule alpha_rtrm5.cases) |
|
263 apply (simp_all only: rtrm5.distinct) |
|
264 done |
|
265 |
|
266 lemma distinct_helper2: |
|
267 shows "(Vr5 x) \<noteq> (Ap5 y z)" |
|
268 by (lifting distinct_helper) |
|
269 |
277 |
270 lemma lets_nok: |
278 lemma lets_nok: |
271 "x \<noteq> y \<Longrightarrow> x \<noteq> z \<Longrightarrow> z \<noteq> y \<Longrightarrow> |
279 "x \<noteq> y \<Longrightarrow> x \<noteq> z \<Longrightarrow> z \<noteq> y \<Longrightarrow> |
272 (Lt5 (Lcons x (Ap5 (Vr5 z) (Vr5 z)) (Lcons y (Vr5 z) Lnil)) (Ap5 (Vr5 x) (Vr5 y))) \<noteq> |
280 (Lt5 (Lcons x (Ap5 (Vr5 z) (Vr5 z)) (Lcons y (Vr5 z) Lnil)) (Ap5 (Vr5 x) (Vr5 y))) \<noteq> |
273 (Lt5 (Lcons y (Vr5 z) (Lcons x (Ap5 (Vr5 z) (Vr5 z)) Lnil)) (Ap5 (Vr5 x) (Vr5 y)))" |
281 (Lt5 (Lcons y (Vr5 z) (Lcons x (Ap5 (Vr5 z) (Vr5 z)) Lnil)) (Ap5 (Vr5 x) (Vr5 y)))" |
274 apply (simp only: alpha5_INJ(3) alpha5_INJ(5) alpha_gen permute_trm5_lts fresh_star_def) |
282 apply (simp only: alpha5_INJ(3) alpha5_INJ(5) alpha_gen permute_trm5_lts fresh_star_def) |
275 apply (simp add: distinct_helper2 alpha5_INJ permute_trm5_lts) |
283 apply (simp add: alpha5_DIS alpha5_INJ permute_trm5_lts) |
276 done |
284 done |
277 |
285 |
278 end |
286 end |