58627
|
1 |
(* Title: HOL/Library/Linear_Temporal_Logic_on_Streams.thy
|
|
2 |
Author: Andrei Popescu, TU Muenchen
|
|
3 |
Author: Dmitriy Traytel, TU Muenchen
|
|
4 |
*)
|
|
5 |
|
|
6 |
header {* Linear Temporal Logic on Streams *}
|
|
7 |
|
|
8 |
theory Linear_Temporal_Logic_on_Streams
|
|
9 |
imports Stream Sublist
|
|
10 |
begin
|
|
11 |
|
|
12 |
section{* Preliminaries *}
|
|
13 |
|
|
14 |
lemma shift_prefix:
|
|
15 |
assumes "xl @- xs = yl @- ys" and "length xl \<le> length yl"
|
|
16 |
shows "prefixeq xl yl"
|
|
17 |
using assms proof(induct xl arbitrary: yl xs ys)
|
|
18 |
case (Cons x xl yl xs ys)
|
|
19 |
thus ?case by (cases yl) auto
|
|
20 |
qed auto
|
|
21 |
|
|
22 |
lemma shift_prefix_cases:
|
|
23 |
assumes "xl @- xs = yl @- ys"
|
|
24 |
shows "prefixeq xl yl \<or> prefixeq yl xl"
|
|
25 |
using shift_prefix[OF assms] apply(cases "length xl \<le> length yl")
|
|
26 |
by (metis, metis assms nat_le_linear shift_prefix)
|
|
27 |
|
|
28 |
|
|
29 |
section{* Linear temporal logic *}
|
|
30 |
|
|
31 |
(* Propositional connectives: *)
|
|
32 |
abbreviation (input) IMPL (infix "impl" 60)
|
|
33 |
where "\<phi> impl \<psi> \<equiv> \<lambda> xs. \<phi> xs \<longrightarrow> \<psi> xs"
|
|
34 |
|
|
35 |
abbreviation (input) OR (infix "or" 60)
|
|
36 |
where "\<phi> or \<psi> \<equiv> \<lambda> xs. \<phi> xs \<or> \<psi> xs"
|
|
37 |
|
|
38 |
abbreviation (input) AND (infix "aand" 60)
|
|
39 |
where "\<phi> aand \<psi> \<equiv> \<lambda> xs. \<phi> xs \<and> \<psi> xs"
|
|
40 |
|
|
41 |
abbreviation (input) "not \<phi> \<equiv> \<lambda> xs. \<not> \<phi> xs"
|
|
42 |
|
|
43 |
abbreviation (input) "true \<equiv> \<lambda> xs. True"
|
|
44 |
|
|
45 |
abbreviation (input) "false \<equiv> \<lambda> xs. False"
|
|
46 |
|
|
47 |
lemma impl_not_or: "\<phi> impl \<psi> = (not \<phi>) or \<psi>"
|
|
48 |
by blast
|
|
49 |
|
|
50 |
lemma not_or: "not (\<phi> or \<psi>) = (not \<phi>) aand (not \<psi>)"
|
|
51 |
by blast
|
|
52 |
|
|
53 |
lemma not_aand: "not (\<phi> aand \<psi>) = (not \<phi>) or (not \<psi>)"
|
|
54 |
by blast
|
|
55 |
|
|
56 |
lemma non_not[simp]: "not (not \<phi>) = \<phi>" by simp
|
|
57 |
|
|
58 |
(* Temporal (LTL) connectives: *)
|
|
59 |
fun holds where "holds P xs \<longleftrightarrow> P (shd xs)"
|
|
60 |
fun nxt where "nxt \<phi> xs = \<phi> (stl xs)"
|
|
61 |
|
|
62 |
inductive ev for \<phi> where
|
|
63 |
base: "\<phi> xs \<Longrightarrow> ev \<phi> xs"
|
|
64 |
|
|
|
65 |
step: "ev \<phi> (stl xs) \<Longrightarrow> ev \<phi> xs"
|
|
66 |
|
|
67 |
coinductive alw for \<phi> where
|
|
68 |
alw: "\<lbrakk>\<phi> xs; alw \<phi> (stl xs)\<rbrakk> \<Longrightarrow> alw \<phi> xs"
|
|
69 |
|
|
70 |
(* weak until: *)
|
|
71 |
coinductive UNTIL (infix "until" 60) for \<phi> \<psi> where
|
|
72 |
base: "\<psi> xs \<Longrightarrow> (\<phi> until \<psi>) xs"
|
|
73 |
|
|
|
74 |
step: "\<lbrakk>\<phi> xs; (\<phi> until \<psi>) (stl xs)\<rbrakk> \<Longrightarrow> (\<phi> until \<psi>) xs"
|
|
75 |
|
|
76 |
lemma holds_mono:
|
|
77 |
assumes holds: "holds P xs" and 0: "\<And> x. P x \<Longrightarrow> Q x"
|
|
78 |
shows "holds Q xs"
|
|
79 |
using assms by auto
|
|
80 |
|
|
81 |
lemma holds_aand:
|
|
82 |
"(holds P aand holds Q) steps \<longleftrightarrow> holds (\<lambda> step. P step \<and> Q step) steps" by auto
|
|
83 |
|
|
84 |
lemma nxt_mono:
|
|
85 |
assumes nxt: "nxt \<phi> xs" and 0: "\<And> xs. \<phi> xs \<Longrightarrow> \<psi> xs"
|
|
86 |
shows "nxt \<psi> xs"
|
|
87 |
using assms by auto
|
|
88 |
|
|
89 |
lemma ev_mono:
|
|
90 |
assumes ev: "ev \<phi> xs" and 0: "\<And> xs. \<phi> xs \<Longrightarrow> \<psi> xs"
|
|
91 |
shows "ev \<psi> xs"
|
|
92 |
using ev by induct (auto intro: ev.intros simp: 0)
|
|
93 |
|
|
94 |
lemma alw_mono:
|
|
95 |
assumes alw: "alw \<phi> xs" and 0: "\<And> xs. \<phi> xs \<Longrightarrow> \<psi> xs"
|
|
96 |
shows "alw \<psi> xs"
|
|
97 |
using alw by coinduct (auto elim: alw.cases simp: 0)
|
|
98 |
|
|
99 |
lemma until_monoL:
|
|
100 |
assumes until: "(\<phi>1 until \<psi>) xs" and 0: "\<And> xs. \<phi>1 xs \<Longrightarrow> \<phi>2 xs"
|
|
101 |
shows "(\<phi>2 until \<psi>) xs"
|
|
102 |
using until by coinduct (auto elim: UNTIL.cases simp: 0)
|
|
103 |
|
|
104 |
lemma until_monoR:
|
|
105 |
assumes until: "(\<phi> until \<psi>1) xs" and 0: "\<And> xs. \<psi>1 xs \<Longrightarrow> \<psi>2 xs"
|
|
106 |
shows "(\<phi> until \<psi>2) xs"
|
|
107 |
using until by coinduct (auto elim: UNTIL.cases simp: 0)
|
|
108 |
|
|
109 |
lemma until_mono:
|
|
110 |
assumes until: "(\<phi>1 until \<psi>1) xs" and
|
|
111 |
0: "\<And> xs. \<phi>1 xs \<Longrightarrow> \<phi>2 xs" "\<And> xs. \<psi>1 xs \<Longrightarrow> \<psi>2 xs"
|
|
112 |
shows "(\<phi>2 until \<psi>2) xs"
|
|
113 |
using until by coinduct (auto elim: UNTIL.cases simp: 0)
|
|
114 |
|
|
115 |
lemma until_false: "\<phi> until false = alw \<phi>"
|
|
116 |
proof-
|
|
117 |
{fix xs assume "(\<phi> until false) xs" hence "alw \<phi> xs"
|
|
118 |
apply coinduct by (auto elim: UNTIL.cases)
|
|
119 |
}
|
|
120 |
moreover
|
|
121 |
{fix xs assume "alw \<phi> xs" hence "(\<phi> until false) xs"
|
|
122 |
apply coinduct by (auto elim: alw.cases)
|
|
123 |
}
|
|
124 |
ultimately show ?thesis by blast
|
|
125 |
qed
|
|
126 |
|
|
127 |
lemma ev_nxt: "ev \<phi> = (\<phi> or nxt (ev \<phi>))"
|
|
128 |
apply(rule ext) by (metis ev.simps nxt.simps)
|
|
129 |
|
|
130 |
lemma alw_nxt: "alw \<phi> = (\<phi> aand nxt (alw \<phi>))"
|
|
131 |
apply(rule ext) by (metis alw.simps nxt.simps)
|
|
132 |
|
|
133 |
lemma ev_ev[simp]: "ev (ev \<phi>) = ev \<phi>"
|
|
134 |
proof-
|
|
135 |
{fix xs
|
|
136 |
assume "ev (ev \<phi>) xs" hence "ev \<phi> xs"
|
|
137 |
by induct (auto intro: ev.intros)
|
|
138 |
}
|
|
139 |
thus ?thesis by (auto intro: ev.intros)
|
|
140 |
qed
|
|
141 |
|
|
142 |
lemma alw_alw[simp]: "alw (alw \<phi>) = alw \<phi>"
|
|
143 |
proof-
|
|
144 |
{fix xs
|
|
145 |
assume "alw \<phi> xs" hence "alw (alw \<phi>) xs"
|
|
146 |
by coinduct (auto elim: alw.cases)
|
|
147 |
}
|
|
148 |
thus ?thesis by (auto elim: alw.cases)
|
|
149 |
qed
|
|
150 |
|
|
151 |
lemma ev_shift:
|
|
152 |
assumes "ev \<phi> xs"
|
|
153 |
shows "ev \<phi> (xl @- xs)"
|
|
154 |
using assms by (induct xl) (auto intro: ev.intros)
|
|
155 |
|
|
156 |
lemma ev_imp_shift:
|
|
157 |
assumes "ev \<phi> xs" shows "\<exists> xl xs2. xs = xl @- xs2 \<and> \<phi> xs2"
|
|
158 |
using assms by induct (metis shift.simps(1), metis shift.simps(2) stream.collapse)+
|
|
159 |
|
|
160 |
lemma alw_ev_shift: "alw \<phi> xs1 \<Longrightarrow> ev (alw \<phi>) (xl @- xs1)"
|
|
161 |
by (auto intro: ev_shift ev.intros)
|
|
162 |
|
|
163 |
lemma alw_shift:
|
|
164 |
assumes "alw \<phi> (xl @- xs)"
|
|
165 |
shows "alw \<phi> xs"
|
|
166 |
using assms by (induct xl) (auto elim: alw.cases)
|
|
167 |
|
|
168 |
lemma ev_ex_nxt:
|
|
169 |
assumes "ev \<phi> xs"
|
|
170 |
shows "\<exists> n. (nxt ^^ n) \<phi> xs"
|
|
171 |
using assms proof induct
|
|
172 |
case (base xs) thus ?case by (intro exI[of _ 0]) auto
|
|
173 |
next
|
|
174 |
case (step xs)
|
|
175 |
then obtain n where "(nxt ^^ n) \<phi> (stl xs)" by blast
|
|
176 |
thus ?case by (intro exI[of _ "Suc n"]) (metis funpow.simps(2) nxt.simps o_def)
|
|
177 |
qed
|
|
178 |
|
|
179 |
lemma alw_sdrop:
|
|
180 |
assumes "alw \<phi> xs" shows "alw \<phi> (sdrop n xs)"
|
|
181 |
by (metis alw_shift assms stake_sdrop)
|
|
182 |
|
|
183 |
lemma nxt_sdrop: "(nxt ^^ n) \<phi> xs \<longleftrightarrow> \<phi> (sdrop n xs)"
|
|
184 |
by (induct n arbitrary: xs) auto
|
|
185 |
|
|
186 |
definition "wait \<phi> xs \<equiv> LEAST n. (nxt ^^ n) \<phi> xs"
|
|
187 |
|
|
188 |
lemma nxt_wait:
|
|
189 |
assumes "ev \<phi> xs" shows "(nxt ^^ (wait \<phi> xs)) \<phi> xs"
|
|
190 |
unfolding wait_def using ev_ex_nxt[OF assms] by(rule LeastI_ex)
|
|
191 |
|
|
192 |
lemma nxt_wait_least:
|
|
193 |
assumes ev: "ev \<phi> xs" and nxt: "(nxt ^^ n) \<phi> xs" shows "wait \<phi> xs \<le> n"
|
|
194 |
unfolding wait_def using ev_ex_nxt[OF ev] by (metis Least_le nxt)
|
|
195 |
|
|
196 |
lemma sdrop_wait:
|
|
197 |
assumes "ev \<phi> xs" shows "\<phi> (sdrop (wait \<phi> xs) xs)"
|
|
198 |
using nxt_wait[OF assms] unfolding nxt_sdrop .
|
|
199 |
|
|
200 |
lemma sdrop_wait_least:
|
|
201 |
assumes ev: "ev \<phi> xs" and nxt: "\<phi> (sdrop n xs)" shows "wait \<phi> xs \<le> n"
|
|
202 |
using assms nxt_wait_least unfolding nxt_sdrop by auto
|
|
203 |
|
|
204 |
lemma nxt_ev: "(nxt ^^ n) \<phi> xs \<Longrightarrow> ev \<phi> xs"
|
|
205 |
by (induct n arbitrary: xs) (auto intro: ev.intros)
|
|
206 |
|
|
207 |
lemma not_ev: "not (ev \<phi>) = alw (not \<phi>)"
|
|
208 |
proof(rule ext, safe)
|
|
209 |
fix xs assume "not (ev \<phi>) xs" thus "alw (not \<phi>) xs"
|
|
210 |
by (coinduct) (auto intro: ev.intros)
|
|
211 |
next
|
|
212 |
fix xs assume "ev \<phi> xs" and "alw (not \<phi>) xs" thus False
|
|
213 |
by (induct) (auto elim: alw.cases)
|
|
214 |
qed
|
|
215 |
|
|
216 |
lemma not_alw: "not (alw \<phi>) = ev (not \<phi>)"
|
|
217 |
proof-
|
|
218 |
have "not (alw \<phi>) = not (alw (not (not \<phi>)))" by simp
|
|
219 |
also have "... = ev (not \<phi>)" unfolding not_ev[symmetric] by simp
|
|
220 |
finally show ?thesis .
|
|
221 |
qed
|
|
222 |
|
|
223 |
lemma not_ev_not[simp]: "not (ev (not \<phi>)) = alw \<phi>"
|
|
224 |
unfolding not_ev by simp
|
|
225 |
|
|
226 |
lemma not_alw_not[simp]: "not (alw (not \<phi>)) = ev \<phi>"
|
|
227 |
unfolding not_alw by simp
|
|
228 |
|
|
229 |
lemma alw_ev_sdrop:
|
|
230 |
assumes "alw (ev \<phi>) (sdrop m xs)"
|
|
231 |
shows "alw (ev \<phi>) xs"
|
|
232 |
using assms
|
|
233 |
by coinduct (metis alw_nxt ev_shift funpow_swap1 nxt.simps nxt_sdrop stake_sdrop)
|
|
234 |
|
|
235 |
lemma ev_alw_imp_alw_ev:
|
|
236 |
assumes "ev (alw \<phi>) xs" shows "alw (ev \<phi>) xs"
|
|
237 |
using assms apply induct
|
|
238 |
apply (metis (full_types) alw_mono ev.base)
|
|
239 |
by (metis alw alw_nxt ev.step)
|
|
240 |
|
|
241 |
lemma alw_aand: "alw (\<phi> aand \<psi>) = alw \<phi> aand alw \<psi>"
|
|
242 |
proof-
|
|
243 |
{fix xs assume "alw (\<phi> aand \<psi>) xs" hence "(alw \<phi> aand alw \<psi>) xs"
|
|
244 |
by (auto elim: alw_mono)
|
|
245 |
}
|
|
246 |
moreover
|
|
247 |
{fix xs assume "(alw \<phi> aand alw \<psi>) xs" hence "alw (\<phi> aand \<psi>) xs"
|
|
248 |
by coinduct (auto elim: alw.cases)
|
|
249 |
}
|
|
250 |
ultimately show ?thesis by blast
|
|
251 |
qed
|
|
252 |
|
|
253 |
lemma ev_or: "ev (\<phi> or \<psi>) = ev \<phi> or ev \<psi>"
|
|
254 |
proof-
|
|
255 |
{fix xs assume "(ev \<phi> or ev \<psi>) xs" hence "ev (\<phi> or \<psi>) xs"
|
|
256 |
by (auto elim: ev_mono)
|
|
257 |
}
|
|
258 |
moreover
|
|
259 |
{fix xs assume "ev (\<phi> or \<psi>) xs" hence "(ev \<phi> or ev \<psi>) xs"
|
|
260 |
by induct (auto intro: ev.intros)
|
|
261 |
}
|
|
262 |
ultimately show ?thesis by blast
|
|
263 |
qed
|
|
264 |
|
|
265 |
lemma ev_alw_aand:
|
|
266 |
assumes \<phi>: "ev (alw \<phi>) xs" and \<psi>: "ev (alw \<psi>) xs"
|
|
267 |
shows "ev (alw (\<phi> aand \<psi>)) xs"
|
|
268 |
proof-
|
|
269 |
obtain xl xs1 where xs1: "xs = xl @- xs1" and \<phi>\<phi>: "alw \<phi> xs1"
|
|
270 |
using \<phi> by (metis ev_imp_shift)
|
|
271 |
moreover obtain yl ys1 where xs2: "xs = yl @- ys1" and \<psi>\<psi>: "alw \<psi> ys1"
|
|
272 |
using \<psi> by (metis ev_imp_shift)
|
|
273 |
ultimately have 0: "xl @- xs1 = yl @- ys1" by auto
|
|
274 |
hence "prefixeq xl yl \<or> prefixeq yl xl" using shift_prefix_cases by auto
|
|
275 |
thus ?thesis proof
|
|
276 |
assume "prefixeq xl yl"
|
|
277 |
then obtain yl1 where yl: "yl = xl @ yl1" by (elim prefixeqE)
|
|
278 |
have xs1': "xs1 = yl1 @- ys1" using 0 unfolding yl by simp
|
|
279 |
have "alw \<phi> ys1" using \<phi>\<phi> unfolding xs1' by (metis alw_shift)
|
|
280 |
hence "alw (\<phi> aand \<psi>) ys1" using \<psi>\<psi> unfolding alw_aand by auto
|
|
281 |
thus ?thesis unfolding xs2 by (auto intro: alw_ev_shift)
|
|
282 |
next
|
|
283 |
assume "prefixeq yl xl"
|
|
284 |
then obtain xl1 where xl: "xl = yl @ xl1" by (elim prefixeqE)
|
|
285 |
have ys1': "ys1 = xl1 @- xs1" using 0 unfolding xl by simp
|
|
286 |
have "alw \<psi> xs1" using \<psi>\<psi> unfolding ys1' by (metis alw_shift)
|
|
287 |
hence "alw (\<phi> aand \<psi>) xs1" using \<phi>\<phi> unfolding alw_aand by auto
|
|
288 |
thus ?thesis unfolding xs1 by (auto intro: alw_ev_shift)
|
|
289 |
qed
|
|
290 |
qed
|
|
291 |
|
|
292 |
lemma ev_alw_alw_impl:
|
|
293 |
assumes "ev (alw \<phi>) xs" and "alw (alw \<phi> impl ev \<psi>) xs"
|
|
294 |
shows "ev \<psi> xs"
|
|
295 |
using assms by induct (auto intro: ev.intros elim: alw.cases)
|
|
296 |
|
|
297 |
lemma ev_alw_stl[simp]: "ev (alw \<phi>) (stl x) \<longleftrightarrow> ev (alw \<phi>) x"
|
|
298 |
by (metis (full_types) alw_nxt ev_nxt nxt.simps)
|
|
299 |
|
|
300 |
lemma alw_alw_impl_ev:
|
|
301 |
"alw (alw \<phi> impl ev \<psi>) = (ev (alw \<phi>) impl alw (ev \<psi>))" (is "?A = ?B")
|
|
302 |
proof-
|
|
303 |
{fix xs assume "?A xs \<and> ev (alw \<phi>) xs" hence "alw (ev \<psi>) xs"
|
|
304 |
apply coinduct using ev_nxt by (auto elim: ev_alw_alw_impl alw.cases intro: ev.intros)
|
|
305 |
}
|
|
306 |
moreover
|
|
307 |
{fix xs assume "?B xs" hence "?A xs"
|
|
308 |
apply coinduct by (auto elim: alw.cases intro: ev.intros)
|
|
309 |
}
|
|
310 |
ultimately show ?thesis by blast
|
|
311 |
qed
|
|
312 |
|
|
313 |
lemma ev_alw_impl:
|
|
314 |
assumes "ev \<phi> xs" and "alw (\<phi> impl \<psi>) xs" shows "ev \<psi> xs"
|
|
315 |
using assms by induct (auto intro: ev.intros elim: alw.cases)
|
|
316 |
|
|
317 |
lemma ev_alw_impl_ev:
|
|
318 |
assumes "ev \<phi> xs" and "alw (\<phi> impl ev \<psi>) xs" shows "ev \<psi> xs"
|
|
319 |
using ev_alw_impl[OF assms] by simp
|
|
320 |
|
|
321 |
lemma alw_mp:
|
|
322 |
assumes "alw \<phi> xs" and "alw (\<phi> impl \<psi>) xs"
|
|
323 |
shows "alw \<psi> xs"
|
|
324 |
proof-
|
|
325 |
{assume "alw \<phi> xs \<and> alw (\<phi> impl \<psi>) xs" hence ?thesis
|
|
326 |
apply coinduct by (auto elim: alw.cases)
|
|
327 |
}
|
|
328 |
thus ?thesis using assms by auto
|
|
329 |
qed
|
|
330 |
|
|
331 |
lemma all_imp_alw:
|
|
332 |
assumes "\<And> xs. \<phi> xs" shows "alw \<phi> xs"
|
|
333 |
proof-
|
|
334 |
{assume "\<forall> xs. \<phi> xs"
|
|
335 |
hence ?thesis by coinduct auto
|
|
336 |
}
|
|
337 |
thus ?thesis using assms by auto
|
|
338 |
qed
|
|
339 |
|
|
340 |
lemma alw_impl_ev_alw:
|
|
341 |
assumes "alw (\<phi> impl ev \<psi>) xs"
|
|
342 |
shows "alw (ev \<phi> impl ev \<psi>) xs"
|
|
343 |
using assms by coinduct (auto elim: alw.cases dest: ev_alw_impl intro: ev.intros)
|
|
344 |
|
|
345 |
lemma ev_holds_sset:
|
|
346 |
"ev (holds P) xs \<longleftrightarrow> (\<exists> x \<in> sset xs. P x)" (is "?L \<longleftrightarrow> ?R")
|
|
347 |
proof safe
|
|
348 |
assume ?L thus ?R by induct (metis holds.simps stream.set_sel(1), metis stl_sset)
|
|
349 |
next
|
|
350 |
fix x assume "x \<in> sset xs" "P x"
|
|
351 |
thus ?L by (induct rule: sset_induct) (simp_all add: ev.base ev.step)
|
|
352 |
qed
|
|
353 |
|
|
354 |
(* LTL as a program logic: *)
|
|
355 |
lemma alw_invar:
|
|
356 |
assumes "\<phi> xs" and "alw (\<phi> impl nxt \<phi>) xs"
|
|
357 |
shows "alw \<phi> xs"
|
|
358 |
proof-
|
|
359 |
{assume "\<phi> xs \<and> alw (\<phi> impl nxt \<phi>) xs" hence ?thesis
|
|
360 |
apply coinduct by(auto elim: alw.cases)
|
|
361 |
}
|
|
362 |
thus ?thesis using assms by auto
|
|
363 |
qed
|
|
364 |
|
|
365 |
lemma variance:
|
|
366 |
assumes 1: "\<phi> xs" and 2: "alw (\<phi> impl (\<psi> or nxt \<phi>)) xs"
|
|
367 |
shows "(alw \<phi> or ev \<psi>) xs"
|
|
368 |
proof-
|
|
369 |
{assume "\<not> ev \<psi> xs" hence "alw (not \<psi>) xs" unfolding not_ev[symmetric] .
|
|
370 |
moreover have "alw (not \<psi> impl (\<phi> impl nxt \<phi>)) xs"
|
|
371 |
using 2 by coinduct (auto elim: alw.cases)
|
|
372 |
ultimately have "alw (\<phi> impl nxt \<phi>) xs" by(auto dest: alw_mp)
|
|
373 |
with 1 have "alw \<phi> xs" by(rule alw_invar)
|
|
374 |
}
|
|
375 |
thus ?thesis by blast
|
|
376 |
qed
|
|
377 |
|
|
378 |
lemma ev_alw_imp_nxt:
|
|
379 |
assumes e: "ev \<phi> xs" and a: "alw (\<phi> impl (nxt \<phi>)) xs"
|
|
380 |
shows "ev (alw \<phi>) xs"
|
|
381 |
proof-
|
|
382 |
obtain xl xs1 where xs: "xs = xl @- xs1" and \<phi>: "\<phi> xs1"
|
|
383 |
using e by (metis ev_imp_shift)
|
|
384 |
have "\<phi> xs1 \<and> alw (\<phi> impl (nxt \<phi>)) xs1" using a \<phi> unfolding xs by (metis alw_shift)
|
|
385 |
hence "alw \<phi> xs1" by(coinduct xs1 rule: alw.coinduct) (auto elim: alw.cases)
|
|
386 |
thus ?thesis unfolding xs by (auto intro: alw_ev_shift)
|
|
387 |
qed
|
|
388 |
|
|
389 |
|
|
390 |
|
|
391 |
end |