deleted_prop.thy
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Fri, 06 Sep 2013 12:55:12 +0100
changeset 13 dd1499f296ea
parent 1 dcde836219bc
permissions -rw-r--r--
updated to new isabelle

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