src/HOL/MicroJava/DFA/Err.thy
changeset 61952 546958347e05
parent 61361 8b5f00202e1a
child 63170 eae6549dbea2
equal deleted inserted replaced
61951:cbd310584cff 61952:546958347e05
   281   apply (erule subst)
   281   apply (erule subst)
   282   apply (blast intro: Semilat.closedI [OF Semilat.intro] closedD)
   282   apply (blast intro: Semilat.closedI [OF Semilat.intro] closedD)
   283   done 
   283   done 
   284 qed
   284 qed
   285 
   285 
   286 subsection \<open>semilat (err(Union AS))\<close>
   286 subsection \<open>semilat (err (Union AS))\<close>
   287 
   287 
   288 (* FIXME? *)
   288 (* FIXME? *)
   289 lemma all_bex_swap_lemma [iff]:
   289 lemma all_bex_swap_lemma [iff]:
   290   "(!x. (? y:A. x = f y) \<longrightarrow> P x) = (!y:A. P(f y))"
   290   "(!x. (? y:A. x = f y) \<longrightarrow> P x) = (!y:A. P(f y))"
   291   by blast
   291   by blast
   292 
   292 
   293 lemma closed_err_Union_lift2I: 
   293 lemma closed_err_Union_lift2I: 
   294   "\<lbrakk> !A:AS. closed (err A) (lift2 f); AS ~= {}; 
   294   "\<lbrakk> !A:AS. closed (err A) (lift2 f); AS ~= {}; 
   295       !A:AS.!B:AS. A~=B \<longrightarrow> (!a:A.!b:B. a +_f b = Err) \<rbrakk> 
   295       !A:AS.!B:AS. A~=B \<longrightarrow> (!a:A.!b:B. a +_f b = Err) \<rbrakk> 
   296   \<Longrightarrow> closed (err(Union AS)) (lift2 f)"
   296   \<Longrightarrow> closed (err (\<Union>AS)) (lift2 f)"
   297 apply (unfold closed_def err_def)
   297 apply (unfold closed_def err_def)
   298 apply simp
   298 apply simp
   299 apply clarify
   299 apply clarify
   300 apply simp
   300 apply simp
   301 apply fast
   301 apply fast
   307   which may not hold 
   307   which may not hold 
   308 \<close>
   308 \<close>
   309 lemma err_semilat_UnionI:
   309 lemma err_semilat_UnionI:
   310   "\<lbrakk> !A:AS. err_semilat(A, r, f); AS ~= {}; 
   310   "\<lbrakk> !A:AS. err_semilat(A, r, f); AS ~= {}; 
   311       !A:AS.!B:AS. A~=B \<longrightarrow> (!a:A.!b:B. ~ a <=_r b & a +_f b = Err) \<rbrakk> 
   311       !A:AS.!B:AS. A~=B \<longrightarrow> (!a:A.!b:B. ~ a <=_r b & a +_f b = Err) \<rbrakk> 
   312   \<Longrightarrow> err_semilat(Union AS, r, f)"
   312   \<Longrightarrow> err_semilat (\<Union>AS, r, f)"
   313 apply (unfold semilat_def sl_def)
   313 apply (unfold semilat_def sl_def)
   314 apply (simp add: closed_err_Union_lift2I)
   314 apply (simp add: closed_err_Union_lift2I)
   315 apply (rule conjI)
   315 apply (rule conjI)
   316  apply blast
   316  apply blast
   317 apply (simp add: err_def)
   317 apply (simp add: err_def)