deleted_prop.thy
author chunhan
Fri, 12 Apr 2013 10:46:43 +0100
changeset 2 301f567e2a8e
parent 1 dcde836219bc
permissions -rw-r--r--
add document

theory deleted_prop
imports Main rc_theory os_rc
begin

context tainting begin

lemma deleted_cons_I: "deleted obj s \<Longrightarrow> deleted obj (e # s)"
by (case_tac e, auto)

lemma not_deleted_cons_D: "\<not> deleted obj (e # s) \<Longrightarrow> \<not> deleted obj s" 
by (auto dest:deleted_cons_I)

lemma not_deleted_imp_exists:
  "\<lbrakk>\<not> deleted obj s; exists [] obj\<rbrakk> \<Longrightarrow> exists s obj"
apply (induct s, simp)
apply (case_tac a, case_tac [!] obj, auto)
done

lemma cons_app_simp_aux:
  "(a # b) @ c = a # (b @ c)" by auto

lemma not_deleted_imp_exists':
  "\<lbrakk>\<not> deleted obj (s'@s); exists s obj\<rbrakk> \<Longrightarrow> exists (s'@s) obj"
apply (induct s', simp, simp only:cons_app_simp_aux)
apply (frule not_deleted_cons_D)
apply (case_tac a, case_tac [!] obj, auto)
done

lemma nodel_imp_un_deleted:
  "no_del_event s \<Longrightarrow> \<not> deleted obj s"
by (induct s, simp, case_tac a,auto)

lemma nodel_exists_remains:
  "\<lbrakk>no_del_event (s'@s); exists s obj\<rbrakk> \<Longrightarrow> exists (s'@s) obj"
apply (drule_tac obj = obj in nodel_imp_un_deleted)
by (simp add:not_deleted_imp_exists')

lemma nodel_imp_exists:
  "\<lbrakk>no_del_event s; exists [] obj\<rbrakk> \<Longrightarrow> exists s obj"
apply (drule_tac obj = obj in nodel_imp_un_deleted)
by (simp add:not_deleted_imp_exists)

lemma no_del_event_cons_D:
  "no_del_event (e # s) \<Longrightarrow> no_del_event s"
by (case_tac e, auto)

end

end