finite_static.thy
author chunhan
Thu, 13 Jun 2013 22:53:49 +0800
changeset 9 91fb17bb6229
parent 1 dcde836219bc
permissions -rw-r--r--
add paper pdf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
dcde836219bc add thy files
chunhan
parents:
diff changeset
     1
theory finite_static
dcde836219bc add thy files
chunhan
parents:
diff changeset
     2
imports Main rc_theory all_sobj_prop
dcde836219bc add thy files
chunhan
parents:
diff changeset
     3
begin
dcde836219bc add thy files
chunhan
parents:
diff changeset
     4
dcde836219bc add thy files
chunhan
parents:
diff changeset
     5
context tainting_s_complete begin
dcde836219bc add thy files
chunhan
parents:
diff changeset
     6
dcde836219bc add thy files
chunhan
parents:
diff changeset
     7
lemma tainted_s_subset_all_sobjs:
dcde836219bc add thy files
chunhan
parents:
diff changeset
     8
  "tainted_s \<subseteq> all_sobjs"
dcde836219bc add thy files
chunhan
parents:
diff changeset
     9
apply (rule subsetI, erule tainted_s.induct)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    10
apply (auto intro:all_sobjs.intros)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    11
apply (drule seeds_in_init)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    12
apply (subgoal_tac "exists [] obj")
dcde836219bc add thy files
chunhan
parents:
diff changeset
    13
apply (frule obj2sobj_nil_init)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    14
apply (drule all_sobjs_I)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    15
apply (rule vs_nil, simp) 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    16
apply (case_tac obj, simp+)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    17
done
dcde836219bc add thy files
chunhan
parents:
diff changeset
    18
dcde836219bc add thy files
chunhan
parents:
diff changeset
    19
definition 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    20
  "init_proc_opt \<equiv> {Some p | p. p \<in> init_processes} \<union> {None}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    21
dcde836219bc add thy files
chunhan
parents:
diff changeset
    22
lemma finite_init_proc_opt:
dcde836219bc add thy files
chunhan
parents:
diff changeset
    23
  "finite init_proc_opt"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    24
unfolding init_proc_opt_def
dcde836219bc add thy files
chunhan
parents:
diff changeset
    25
apply (simp add: finite_Un)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    26
apply (rule finite_imageI)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    27
by (simp add:init_finite)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    28
dcde836219bc add thy files
chunhan
parents:
diff changeset
    29
definition 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    30
  "init_file_opt \<equiv> {Some f | f. f \<in> init_files} \<union> {None}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    31
dcde836219bc add thy files
chunhan
parents:
diff changeset
    32
lemma finite_init_file_opt:
dcde836219bc add thy files
chunhan
parents:
diff changeset
    33
  "finite init_file_opt"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    34
unfolding init_file_opt_def
dcde836219bc add thy files
chunhan
parents:
diff changeset
    35
apply (simp add: finite_Un)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    36
apply (rule finite_imageI)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    37
by (simp add:init_finite)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    38
dcde836219bc add thy files
chunhan
parents:
diff changeset
    39
definition 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    40
  "init_ipc_opt \<equiv> {Some i | i. i \<in> init_processes} \<union> {None}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    41
dcde836219bc add thy files
chunhan
parents:
diff changeset
    42
lemma finite_init_ipc_opt:
dcde836219bc add thy files
chunhan
parents:
diff changeset
    43
  "finite init_ipc_opt"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    44
unfolding init_ipc_opt_def
dcde836219bc add thy files
chunhan
parents:
diff changeset
    45
apply (simp add: finite_Un)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    46
apply (rule finite_imageI)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    47
by (simp add:init_finite)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    48
dcde836219bc add thy files
chunhan
parents:
diff changeset
    49
lemma finite_t_client:
dcde836219bc add thy files
chunhan
parents:
diff changeset
    50
  "finite (UNIV :: t_client set)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    51
apply (subgoal_tac "UNIV = {Client1, Client2}")
dcde836219bc add thy files
chunhan
parents:
diff changeset
    52
apply (metis (full_types) finite.emptyI finite_insert)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    53
apply auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    54
apply (case_tac x, simp+)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    55
done
dcde836219bc add thy files
chunhan
parents:
diff changeset
    56
dcde836219bc add thy files
chunhan
parents:
diff changeset
    57
lemma finite_t_normal_role:
dcde836219bc add thy files
chunhan
parents:
diff changeset
    58
  "finite (UNIV :: t_normal_role set)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    59
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
    60
  have p1: "finite {WebServer}" by simp
dcde836219bc add thy files
chunhan
parents:
diff changeset
    61
  have p2: "finite {WS c | c. c \<in> UNIV}" using finite_t_client by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    62
  have p3: "finite {UpLoad c| c. c \<in> UNIV}" using finite_t_client by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    63
  have p4: "finite {CGI c| c. c \<in> UNIV}" using finite_t_client by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    64
  from p1 p2 p3 p4
dcde836219bc add thy files
chunhan
parents:
diff changeset
    65
  have p5: "finite ({WebServer} \<union> {WS c | c. c \<in> UNIV} \<union> {UpLoad c | c. c \<in> UNIV} \<union> {CGI c | c. c \<in> UNIV})" 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    66
    by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    67
  have p6: "(UNIV :: t_normal_role set) = ({WebServer} \<union> {WS c | c. c \<in> UNIV} \<union> 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    68
     {UpLoad c | c. c \<in> UNIV} \<union> {CGI c | c. c \<in> UNIV})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    69
    apply (rule set_eqI, auto split:t_normal_role.splits)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    70
    by (case_tac x, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    71
  show ?thesis by (simp only:p6 p5)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    72
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
    73
dcde836219bc add thy files
chunhan
parents:
diff changeset
    74
lemma finite_t_role: "finite (UNIV :: t_role set)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    75
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
    76
  have p1: "finite {NormalRole r | r. r \<in> UNIV}" using finite_t_normal_role by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    77
  have p2: "finite {InheritParentRole, UseForcedRole, InheritUpMixed, InheritUserRole, InheritProcessRole}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    78
    by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    79
  have p3: "UNIV = {InheritParentRole, UseForcedRole, InheritUpMixed, InheritUserRole, InheritProcessRole} \<union> 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    80
    {NormalRole r | r. r \<in> UNIV}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    81
    apply (rule set_eqI, auto split:t_role.splits)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    82
    by (case_tac x, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    83
  have p4: "finite ({InheritParentRole, UseForcedRole, InheritUpMixed, InheritUserRole, InheritProcessRole} \<union> 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    84
    {NormalRole r | r. r \<in> UNIV})" using p1 p2 by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    85
  show ?thesis by (simp only:p3 p4)
dcde836219bc add thy files
chunhan
parents:
diff changeset
    86
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
    87
dcde836219bc add thy files
chunhan
parents:
diff changeset
    88
lemma finite_t_normal_file_type: "finite (UNIV :: t_normal_file_type set)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    89
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
    90
  have p1: "finite {WebData_file c | c. c \<in> UNIV}" using finite_t_client by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    91
  have p2: "finite {CGI_P_file c | c. c \<in> UNIV}"  using finite_t_client by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    92
  have p3: "finite {PrivateD_file c | c. c \<in> UNIV}" using finite_t_client by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    93
  have p4: "finite {Executable_file, Root_file_type, WebServerLog_file}" by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    94
  have p5: "finite ({WebData_file c | c. c \<in> UNIV} \<union> {CGI_P_file c | c. c \<in> UNIV} \<union> 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    95
    {PrivateD_file c | c. c \<in> UNIV} \<union> {Executable_file, Root_file_type, WebServerLog_file})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    96
    using p1 p2 p3 p4 by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
    97
  have p6: "UNIV = ({WebData_file c | c. c \<in> UNIV} \<union> {CGI_P_file c | c. c \<in> UNIV} \<union> 
dcde836219bc add thy files
chunhan
parents:
diff changeset
    98
    {PrivateD_file c | c. c \<in> UNIV} \<union> {Executable_file, Root_file_type, WebServerLog_file})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
    99
    apply (rule set_eqI, auto split:t_normal_file_type.splits)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   100
    by (case_tac x, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   101
  show ?thesis by (simp only:p6 p5)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   102
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   103
dcde836219bc add thy files
chunhan
parents:
diff changeset
   104
lemma finite_t_rc_file_type: "finite (UNIV :: t_rc_file_type set)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   105
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   106
  have p1: "finite {NormalFile_type t | t. t \<in> UNIV}" using finite_t_normal_file_type by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   107
  have p2: "finite ({InheritParent_file_type} \<union> {NormalFile_type t | t. t \<in> UNIV})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   108
    using p1 by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   109
  have p3: "UNIV = ({InheritParent_file_type} \<union> {NormalFile_type t | t. t \<in> UNIV})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   110
    apply (rule set_eqI, auto split:t_rc_file_type.splits)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   111
    by (case_tac x, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   112
  show ?thesis by (simp only:p3 p2)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   113
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   114
dcde836219bc add thy files
chunhan
parents:
diff changeset
   115
lemma finite_t_normal_proc_type: "finite (UNIV :: t_normal_proc_type set)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   116
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   117
  have p1: "finite {CGI_P_proc c | c. c \<in> UNIV}" using finite_t_client by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   118
  have p2: "finite ({CGI_P_proc c | c. c \<in> UNIV} \<union> {WebServer_proc})" using p1 by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   119
  have p3: "UNIV = ({CGI_P_proc c | c. c \<in> UNIV} \<union> {WebServer_proc})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   120
    apply (rule set_eqI, auto split:t_normal_proc_type.splits)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   121
    by (case_tac x, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   122
  show ?thesis by (simp only:p3 p2)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   123
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   124
dcde836219bc add thy files
chunhan
parents:
diff changeset
   125
lemma finite_t_rc_proc_type: "finite (UNIV :: t_rc_proc_type set)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   126
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   127
  have p1: "finite {NormalProc_type t | t. t \<in> UNIV}" using finite_t_normal_proc_type by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   128
  have p2: "finite ({NormalProc_type t | t. t \<in> UNIV} \<union> {InheritParent_proc_type, UseNewRoleType})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   129
    using p1 by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   130
  have p3: "UNIV = ({NormalProc_type t | t. t \<in> UNIV} \<union> {InheritParent_proc_type, UseNewRoleType})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   131
    apply (rule set_eqI, auto split:t_rc_proc_type.splits)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   132
    by (case_tac x, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   133
  show ?thesis by (simp only:p3 p2)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   134
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   135
  
dcde836219bc add thy files
chunhan
parents:
diff changeset
   136
lemma finite_t_normal_ipc_type : "finite (UNIV :: t_normal_ipc_type set)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   137
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   138
  have p1: "finite {WebIPC}" by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   139
  have p2: "UNIV = {WebIPC}" apply auto by (case_tac x, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   140
  show ?thesis by (simp only:p1 p2)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   141
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   142
dcde836219bc add thy files
chunhan
parents:
diff changeset
   143
definition 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   144
  "all_sps \<equiv> (UNIV ::t_normal_role set) \<times> (UNIV :: t_role set) \<times> (UNIV :: t_normal_proc_type set) \<times> init_users"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   145
dcde836219bc add thy files
chunhan
parents:
diff changeset
   146
lemma finite_all_sps: "finite all_sps"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   147
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   148
  have "finite ((UNIV :: t_normal_proc_type set) \<times> init_users)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   149
    using finite_t_normal_proc_type init_finite
dcde836219bc add thy files
chunhan
parents:
diff changeset
   150
    by (rule_tac finite_cartesian_product, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   151
  hence "finite ((UNIV :: t_role set) \<times> (UNIV :: t_normal_proc_type set) \<times> init_users)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   152
    using finite_t_role by (rule_tac finite_cartesian_product, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   153
  hence "finite ((UNIV::t_normal_role set) \<times> (UNIV::t_role set) \<times> (UNIV::t_normal_proc_type set) \<times> init_users)" 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   154
    using finite_t_normal_role by (rule_tac finite_cartesian_product, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   155
  thus ?thesis by (simp only:all_sps_def)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   156
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   157
dcde836219bc add thy files
chunhan
parents:
diff changeset
   158
definition
dcde836219bc add thy files
chunhan
parents:
diff changeset
   159
   "all_SPs \<equiv> {SProc sp (Some p) | sp p. sp \<in> all_sps \<and> p \<in> init_processes} \<union> {SProc sp None | sp. sp \<in> all_sps}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   160
dcde836219bc add thy files
chunhan
parents:
diff changeset
   161
lemma finite_all_SPs: "finite all_SPs"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   162
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   163
  have p1: "finite {SProc sp (Some p) | sp p. sp \<in> all_sps \<and> p \<in> init_processes}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   164
    using finite_all_sps init_finite by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   165
  have p2: "finite {SProc sp None | sp. sp \<in> all_sps}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   166
    using finite_all_sps by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   167
  have "finite ({SProc sp (Some p) | sp p. sp \<in> all_sps \<and> p \<in> init_processes} \<union> 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   168
    {SProc sp None | sp. sp \<in> all_sps})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   169
    using p1 p2 by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   170
  thus ?thesis by (simp only:all_SPs_def)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   171
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   172
dcde836219bc add thy files
chunhan
parents:
diff changeset
   173
definition
dcde836219bc add thy files
chunhan
parents:
diff changeset
   174
  "all_sfs \<equiv> (UNIV :: t_normal_file_type set) \<times> init_files"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   175
dcde836219bc add thy files
chunhan
parents:
diff changeset
   176
lemma finite_all_sfs: "finite all_sfs"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   177
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   178
  have "finite ((UNIV :: t_normal_file_type set) \<times> init_files)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   179
    using finite_t_normal_file_type init_finite
dcde836219bc add thy files
chunhan
parents:
diff changeset
   180
    by (rule_tac finite_cartesian_product, auto)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   181
  thus ?thesis by (simp add:all_sfs_def)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   182
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   183
dcde836219bc add thy files
chunhan
parents:
diff changeset
   184
definition 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   185
  "all_SFs \<equiv> {SFile sf (Some f) | sf f. sf \<in> all_sfs \<and> f \<in> init_files} \<union> {SFile sf None| sf. sf \<in> all_sfs}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   186
dcde836219bc add thy files
chunhan
parents:
diff changeset
   187
lemma finite_all_SFs: "finite all_SFs"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   188
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   189
  have p1: "finite ({SFile sf (Some f) | sf f. sf \<in> all_sfs \<and> f \<in> init_files} \<union>
dcde836219bc add thy files
chunhan
parents:
diff changeset
   190
    {SFile sf None| sf. sf \<in> all_sfs})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   191
    using finite_all_sfs init_finite by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   192
  thus ?thesis by (simp only:all_SFs_def)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   193
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   194
dcde836219bc add thy files
chunhan
parents:
diff changeset
   195
definition 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   196
  "all_SIs \<equiv> {SIPC si (Some i)| si i. si \<in> UNIV \<and> i \<in> init_ipcs} \<union> {SIPC si None| si. si \<in> UNIV}"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   197
dcde836219bc add thy files
chunhan
parents:
diff changeset
   198
lemma finite_all_SIs: "finite all_SIs"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   199
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   200
  have "finite ({SIPC si (Some i)| si i. si \<in> UNIV \<and> i \<in> init_ipcs} \<union> {SIPC si None| si. si \<in> UNIV})"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   201
    using finite_t_normal_ipc_type init_finite by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   202
  thus ?thesis by (simp only:all_SIs_def)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   203
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   204
dcde836219bc add thy files
chunhan
parents:
diff changeset
   205
lemma all_sobjs_srf_init':
dcde836219bc add thy files
chunhan
parents:
diff changeset
   206
  "sobj \<in> all_sobjs \<Longrightarrow> \<forall> sf srf. sobj = SFile sf (Some srf) \<longrightarrow> srf \<in> init_files"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   207
by (erule all_sobjs.induct, auto) 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   208
dcde836219bc add thy files
chunhan
parents:
diff changeset
   209
lemma all_sobjs_srf_init:
dcde836219bc add thy files
chunhan
parents:
diff changeset
   210
  "SFile sf (Some srf) \<in> all_sobjs \<Longrightarrow> srf \<in> init_files"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   211
by (auto dest!:all_sobjs_srf_init')
dcde836219bc add thy files
chunhan
parents:
diff changeset
   212
dcde836219bc add thy files
chunhan
parents:
diff changeset
   213
lemma all_sobjs_sd_init':
dcde836219bc add thy files
chunhan
parents:
diff changeset
   214
  "sobj \<in> all_sobjs \<Longrightarrow> \<forall> tf sd srf. sobj = SFile (tf, sd) srf \<longrightarrow> sd \<in> init_files"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   215
by (erule all_sobjs.induct, auto) 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   216
dcde836219bc add thy files
chunhan
parents:
diff changeset
   217
lemma all_sobjs_sd_init:
dcde836219bc add thy files
chunhan
parents:
diff changeset
   218
  "SFile (tf, sd) srf \<in> all_sobjs \<Longrightarrow> sd \<in> init_files"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   219
by (auto dest!:all_sobjs_sd_init')
dcde836219bc add thy files
chunhan
parents:
diff changeset
   220
dcde836219bc add thy files
chunhan
parents:
diff changeset
   221
lemma all_sobjs_sri_init':
dcde836219bc add thy files
chunhan
parents:
diff changeset
   222
  "sobj \<in> all_sobjs \<Longrightarrow> \<forall> si sri. sobj = SIPC si (Some sri) \<longrightarrow> sri \<in> init_ipcs"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   223
apply (erule all_sobjs.induct, auto) using init_ipc_has_type 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   224
by (simp add:bidirect_in_init_def)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   225
dcde836219bc add thy files
chunhan
parents:
diff changeset
   226
lemma all_sobjs_sri_init:
dcde836219bc add thy files
chunhan
parents:
diff changeset
   227
  "SIPC si (Some sri) \<in> all_sobjs \<Longrightarrow> sri \<in> init_ipcs"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   228
by (auto dest!:all_sobjs_sri_init')
dcde836219bc add thy files
chunhan
parents:
diff changeset
   229
dcde836219bc add thy files
chunhan
parents:
diff changeset
   230
lemma all_sobjs_sru_init'[rule_format]:
dcde836219bc add thy files
chunhan
parents:
diff changeset
   231
  "sobj \<in> all_sobjs \<Longrightarrow> \<forall> r fr pt u srp. sobj = SProc (r,fr,pt,u) srp \<longrightarrow> u \<in> init_users"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   232
using init_owner_valid
dcde836219bc add thy files
chunhan
parents:
diff changeset
   233
by (erule_tac all_sobjs.induct, auto) 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   234
dcde836219bc add thy files
chunhan
parents:
diff changeset
   235
lemma all_sobjs_sru_init:
dcde836219bc add thy files
chunhan
parents:
diff changeset
   236
  "SProc (r,fr,pt,u) srp \<in> all_sobjs \<Longrightarrow> u \<in> init_users"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   237
by (auto dest!:all_sobjs_sru_init')
dcde836219bc add thy files
chunhan
parents:
diff changeset
   238
dcde836219bc add thy files
chunhan
parents:
diff changeset
   239
lemma unknown_not_in_all_sobjs':
dcde836219bc add thy files
chunhan
parents:
diff changeset
   240
  "sobj \<in> all_sobjs \<Longrightarrow> sobj \<noteq> Unknown"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   241
by (erule_tac all_sobjs.induct, auto) 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   242
dcde836219bc add thy files
chunhan
parents:
diff changeset
   243
lemma unknown_not_in_all_sobjs:
dcde836219bc add thy files
chunhan
parents:
diff changeset
   244
  "Unknown \<in> all_sobjs \<Longrightarrow> False"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   245
using unknown_not_in_all_sobjs' by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   246
dcde836219bc add thy files
chunhan
parents:
diff changeset
   247
lemma finite_all_sobjs: "finite all_sobjs"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   248
proof-
dcde836219bc add thy files
chunhan
parents:
diff changeset
   249
  have p1: "finite (all_SPs \<union> all_SFs \<union> all_SIs)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   250
    using finite_all_SPs finite_all_SFs finite_all_SIs by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   251
  have p2: "all_sobjs \<subseteq> (all_SPs \<union> all_SFs \<union> all_SIs)"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   252
    apply (rule subsetI)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   253
    using all_sobjs_sd_init all_sobjs_sri_init all_sobjs_srf_init all_sobjs_srp_init 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   254
      all_sobjs_sru_init unknown_not_in_all_sobjs
dcde836219bc add thy files
chunhan
parents:
diff changeset
   255
    by (case_tac x, auto simp:all_SPs_def all_SFs_def all_SIs_def all_sps_def all_sfs_def)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   256
  show ?thesis 
dcde836219bc add thy files
chunhan
parents:
diff changeset
   257
    apply (rule_tac B = "(all_SPs \<union> all_SFs \<union> all_SIs)" in finite_subset)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   258
    using p1 p2 by auto
dcde836219bc add thy files
chunhan
parents:
diff changeset
   259
qed
dcde836219bc add thy files
chunhan
parents:
diff changeset
   260
dcde836219bc add thy files
chunhan
parents:
diff changeset
   261
lemma finite_tainted_s:
dcde836219bc add thy files
chunhan
parents:
diff changeset
   262
  "finite tainted_s"
dcde836219bc add thy files
chunhan
parents:
diff changeset
   263
apply (rule_tac B = "all_sobjs" in finite_subset)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   264
apply (rule tainted_s_subset_all_sobjs)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   265
apply (rule finite_all_sobjs)
dcde836219bc add thy files
chunhan
parents:
diff changeset
   266
done
dcde836219bc add thy files
chunhan
parents:
diff changeset
   267
dcde836219bc add thy files
chunhan
parents:
diff changeset
   268
end
dcde836219bc add thy files
chunhan
parents:
diff changeset
   269
dcde836219bc add thy files
chunhan
parents:
diff changeset
   270
end