equal
deleted
inserted
replaced
116 qed |
116 qed |
117 qed |
117 qed |
118 |
118 |
119 |
119 |
120 lemma app_mono: |
120 lemma app_mono: |
121 "[|G \<turnstile> s <=' s'; app i G m rT s'|] ==> app i G m rT s"; |
121 "[|G \<turnstile> s <=' s'; app i G m rT s'|] ==> app i G m rT s" |
122 proof - |
122 proof - |
123 |
123 |
124 { fix s1 s2 |
124 { fix s1 s2 |
125 assume G: "G \<turnstile> s2 <=s s1" |
125 assume G: "G \<turnstile> s2 <=s s1" |
126 assume app: "app i G m rT (Some s1)" |
126 assume app: "app i G m rT (Some s1)" |
127 |
127 |
|
128 (* |
128 from G |
129 from G |
129 have l: "length (fst s2) = length (fst s1)" |
130 have l: "length (fst s2) = length (fst s1)" |
130 by simp |
131 by simp |
|
132 *) |
131 |
133 |
132 have "app i G m rT (Some s2)" |
134 have "app i G m rT (Some s2)" |
133 proof (cases (open) i) |
135 proof (cases (open) i) |
134 case Load |
136 case Load |
135 |
137 |
136 from G |
|
137 have l: "length (snd s1) = length (snd s2)" by (simp add: sup_state_length) |
|
138 |
|
139 from G Load app |
138 from G Load app |
140 have "G \<turnstile> snd s2 <=l snd s1" by (auto simp add: sup_state_def) |
139 have "G \<turnstile> snd s2 <=l snd s1" by (auto simp add: sup_state_def) |
141 |
140 |
142 with G Load app l |
141 with G Load app |
143 show ?thesis by clarsimp (drule sup_loc_some, simp+) |
142 show ?thesis by clarsimp (drule sup_loc_some, simp+) |
144 next |
143 next |
145 case Store |
144 case Store |
146 with G app |
145 with G app |
147 show ?thesis |
146 show ?thesis |
148 by - (cases s2, |
147 by - (cases s2, auto simp add: map_eq_Cons sup_loc_Cons2 |
149 auto simp add: map_eq_Cons sup_loc_Cons2 sup_loc_length sup_state_def) |
148 sup_loc_length sup_state_def) |
150 next |
149 next |
151 case Bipush |
150 case Bipush |
152 with G app |
151 with G app |
153 show ?thesis by simp |
152 show ?thesis by simp |
154 next |
153 next |
260 s2: "s2 = (rev apTs' @ X' # ST', LT')" and |
259 s2: "s2 = (rev apTs' @ X' # ST', LT')" and |
261 l': "length apTs' = length list" |
260 l': "length apTs' = length list" |
262 proof - |
261 proof - |
263 from l s1 G |
262 from l s1 G |
264 have "length list < length (fst s2)" |
263 have "length list < length (fst s2)" |
265 by (simp add: sup_state_length) |
264 by simp |
266 hence "\<exists>a b c. (fst s2) = rev a @ b # c \<and> length a = length list" |
265 hence "\<exists>a b c. (fst s2) = rev a @ b # c \<and> length a = length list" |
267 by (rule rev_append_cons [rule_format]) |
266 by (rule rev_append_cons [rule_format]) |
268 thus ?thesis |
267 thus ?thesis |
269 by - (cases s2, elim exE conjE, simp, rule that) |
268 by - (cases s2, elim exE conjE, simp, rule that) |
270 qed |
269 qed |
298 |
297 |
299 from Invoke s2 l' w' C' m c |
298 from Invoke s2 l' w' C' m c |
300 show ?thesis |
299 show ?thesis |
301 by (simp del: split_paired_Ex) blast |
300 by (simp del: split_paired_Ex) blast |
302 qed |
301 qed |
303 } note mono_Some = this |
302 } note this [simp] |
304 |
303 |
305 assume "G \<turnstile> s <=' s'" "app i G m rT s'" |
304 assume "G \<turnstile> s <=' s'" "app i G m rT s'" |
306 |
305 |
307 thus ?thesis |
306 thus ?thesis |
308 by - (cases s, cases s', auto simp add: mono_Some) |
307 by - (cases s, cases s', auto) |
309 qed |
308 qed |
310 |
309 |
311 lemmas [simp del] = split_paired_Ex |
310 lemmas [simp del] = split_paired_Ex |
312 lemmas [simp] = step_def |
311 lemmas [simp] = step_def |
313 |
312 |