Delete_prop.thy
author chunhan
Fri, 03 May 2013 08:20:21 +0100
changeset 1 7d9c0ed02b56
child 4 e9c5594d5963
permissions -rw-r--r--
thy files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     1
theory Deleted_prop
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     2
imports Main Flask Flask_type Init_prop Alive_prop
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     3
begin
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     4
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     5
context flask begin
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     6
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     7
lemma deleted_cons_I: "deleted obj s \<Longrightarrow> deleted obj (e # s)"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     8
by (case_tac e, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
     9
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    10
lemma not_deleted_cons_D: "\<not> deleted obj (e # s) \<Longrightarrow> \<not> deleted obj s" 
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    11
by (auto dest:deleted_cons_I)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    12
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    13
lemma not_deleted_imp_exists:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    14
  "\<lbrakk>\<not> deleted obj s; valid s; init_alive obj\<rbrakk> \<Longrightarrow> alive s obj"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    15
apply (induct s, simp add:init_alive_prop)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    16
apply (frule vd_cons)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    17
apply (case_tac a, auto simp:alive_simps split:t_object.splits)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    18
pr 19
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    19
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    20
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    21
lemma cons_app_simp_aux:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    22
  "(a # b) @ c = a # (b @ c)" by auto
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    23
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    24
lemma not_deleted_imp_exists':
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    25
  "\<lbrakk>\<not> deleted obj (s'@s); exists s obj\<rbrakk> \<Longrightarrow> exists (s'@s) obj"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    26
apply (induct s', simp, simp only:cons_app_simp_aux)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    27
apply (frule not_deleted_cons_D)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    28
apply (case_tac a, case_tac [!] obj, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    29
done
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    30
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    31
(*
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    32
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    33
lemma nodel_imp_un_deleted:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    34
  "no_del_event s \<Longrightarrow> \<not> deleted obj s"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    35
by (induct s, simp, case_tac a,auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    36
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    37
lemma nodel_exists_remains:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    38
  "\<lbrakk>no_del_event (s'@s); exists s obj\<rbrakk> \<Longrightarrow> exists (s'@s) obj"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    39
apply (drule_tac obj = obj in nodel_imp_un_deleted)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    40
by (simp add:not_deleted_imp_exists')
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    41
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    42
lemma nodel_imp_exists:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    43
  "\<lbrakk>no_del_event s; exists [] obj\<rbrakk> \<Longrightarrow> exists s obj"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    44
apply (drule_tac obj = obj in nodel_imp_un_deleted)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    45
by (simp add:not_deleted_imp_exists)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    46
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    47
lemma no_del_event_cons_D:
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    48
  "no_del_event (e # s) \<Longrightarrow> no_del_event s"
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    49
by (case_tac e, auto)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    50
*)
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    51
end
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    52
7d9c0ed02b56 thy files
chunhan
parents:
diff changeset
    53
end