src/HOL/Hoare_Parallel/OG_Tactics.thy
changeset 52597 a8a81453833d
parent 51717 9e7d1c139569
child 58884 be4d203d35b3
equal deleted inserted replaced
52596:40298d383463 52597:a8a81453833d
   256 tactics to control which theorems are used to simplify at each moment,
   256 tactics to control which theorems are used to simplify at each moment,
   257 so that the original input does not suffer any unexpected
   257 so that the original input does not suffer any unexpected
   258 transformation. *}
   258 transformation. *}
   259 
   259 
   260 lemma Compl_Collect: "-(Collect b) = {x. \<not>(b x)}"
   260 lemma Compl_Collect: "-(Collect b) = {x. \<not>(b x)}"
   261 by fast
   261   by fast
   262 lemma list_length: "length []=0 \<and> length (x#xs) = Suc(length xs)"
   262 
   263 by simp
   263 lemma list_length: "length []=0" "length (x#xs) = Suc(length xs)"
   264 lemma list_lemmas: "length []=0 \<and> length (x#xs) = Suc(length xs) 
   264   by simp_all
   265 \<and> (x#xs) ! 0=x \<and> (x#xs) ! Suc n = xs ! n"
   265 lemma list_lemmas: "length []=0" "length (x#xs) = Suc(length xs)"
   266 by simp
   266     "(x#xs) ! 0 = x" "(x#xs) ! Suc n = xs ! n"
       
   267   by simp_all
   267 lemma le_Suc_eq_insert: "{i. i <Suc n} = insert n {i. i< n}"
   268 lemma le_Suc_eq_insert: "{i. i <Suc n} = insert n {i. i< n}"
   268 by auto
   269   by auto
   269 lemmas primrecdef_list = "pre.simps" "assertions.simps" "atomics.simps" "atom_com.simps"
   270 lemmas primrecdef_list = "pre.simps" "assertions.simps" "atomics.simps" "atom_com.simps"
   270 lemmas my_simp_list = list_lemmas fst_conv snd_conv
   271 lemmas my_simp_list = list_lemmas fst_conv snd_conv
   271 not_less0 refl le_Suc_eq_insert Suc_not_Zero Zero_not_Suc nat.inject
   272 not_less0 refl le_Suc_eq_insert Suc_not_Zero Zero_not_Suc nat.inject
   272 Collect_mem_eq ball_simps option.simps primrecdef_list
   273 Collect_mem_eq ball_simps option.simps primrecdef_list
   273 lemmas ParallelConseq_list = INTER_eq Collect_conj_eq length_map length_upt length_append list_length
   274 lemmas ParallelConseq_list = INTER_eq Collect_conj_eq length_map length_upt length_append
   274 
   275 
   275 ML {*
   276 ML {*
   276 fun before_interfree_simp_tac ctxt =
   277 fun before_interfree_simp_tac ctxt =
   277   simp_tac (put_simpset HOL_basic_ss ctxt addsimps [@{thm com.simps}, @{thm post.simps}])
   278   simp_tac (put_simpset HOL_basic_ss ctxt addsimps [@{thm com.simps}, @{thm post.simps}])
   278 
   279