add Linear Temporal Logic on Streams
authorhoelzl
Wed Oct 08 10:22:00 2014 +0200 (2014-10-08)
changeset 586271329679abb2d
parent 58626 6c473ed0ac70
child 58636 9b33fe5b60f3
add Linear Temporal Logic on Streams
src/HOL/Library/Library.thy
src/HOL/Library/Linear_Temporal_Logic_on_Streams.thy
     1.1 --- a/src/HOL/Library/Library.thy	Wed Oct 08 09:09:12 2014 +0200
     1.2 +++ b/src/HOL/Library/Library.thy	Wed Oct 08 10:22:00 2014 +0200
     1.3 @@ -36,6 +36,7 @@
     1.4    Lattice_Algebras
     1.5    Lattice_Syntax
     1.6    Lattice_Constructions
     1.7 +  Linear_Temporal_Logic_on_Streams
     1.8    ListVector
     1.9    Lubs_Glbs
    1.10    Mapping
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/HOL/Library/Linear_Temporal_Logic_on_Streams.thy	Wed Oct 08 10:22:00 2014 +0200
     2.3 @@ -0,0 +1,391 @@
     2.4 +(*  Title:      HOL/Library/Linear_Temporal_Logic_on_Streams.thy
     2.5 +    Author:     Andrei Popescu, TU Muenchen
     2.6 +    Author:     Dmitriy Traytel, TU Muenchen
     2.7 +*)
     2.8 +
     2.9 +header {* Linear Temporal Logic on Streams *}
    2.10 +
    2.11 +theory Linear_Temporal_Logic_on_Streams
    2.12 +  imports Stream Sublist
    2.13 +begin
    2.14 +
    2.15 +section{* Preliminaries *}
    2.16 +
    2.17 +lemma shift_prefix:
    2.18 +assumes "xl @- xs = yl @- ys" and "length xl \<le> length yl"
    2.19 +shows "prefixeq xl yl"
    2.20 +using assms proof(induct xl arbitrary: yl xs ys)
    2.21 +  case (Cons x xl yl xs ys)
    2.22 +  thus ?case by (cases yl) auto
    2.23 +qed auto
    2.24 +
    2.25 +lemma shift_prefix_cases:
    2.26 +assumes "xl @- xs = yl @- ys"
    2.27 +shows "prefixeq xl yl \<or> prefixeq yl xl"
    2.28 +using shift_prefix[OF assms] apply(cases "length xl \<le> length yl")
    2.29 +by (metis, metis assms nat_le_linear shift_prefix)
    2.30 +
    2.31 +
    2.32 +section{* Linear temporal logic *}
    2.33 +
    2.34 +(* Propositional connectives: *)
    2.35 +abbreviation (input) IMPL (infix "impl" 60)
    2.36 +where "\<phi> impl \<psi> \<equiv> \<lambda> xs. \<phi> xs \<longrightarrow> \<psi> xs"
    2.37 +
    2.38 +abbreviation (input) OR (infix "or" 60)
    2.39 +where "\<phi> or \<psi> \<equiv> \<lambda> xs. \<phi> xs \<or> \<psi> xs"
    2.40 +
    2.41 +abbreviation (input) AND (infix "aand" 60)
    2.42 +where "\<phi> aand \<psi> \<equiv> \<lambda> xs. \<phi> xs \<and> \<psi> xs"
    2.43 +
    2.44 +abbreviation (input) "not \<phi> \<equiv> \<lambda> xs. \<not> \<phi> xs"
    2.45 +
    2.46 +abbreviation (input) "true \<equiv> \<lambda> xs. True"
    2.47 +
    2.48 +abbreviation (input) "false \<equiv> \<lambda> xs. False"
    2.49 +
    2.50 +lemma impl_not_or: "\<phi> impl \<psi> = (not \<phi>) or \<psi>"
    2.51 +by blast
    2.52 +
    2.53 +lemma not_or: "not (\<phi> or \<psi>) = (not \<phi>) aand (not \<psi>)"
    2.54 +by blast
    2.55 +
    2.56 +lemma not_aand: "not (\<phi> aand \<psi>) = (not \<phi>) or (not \<psi>)"
    2.57 +by blast
    2.58 +
    2.59 +lemma non_not[simp]: "not (not \<phi>) = \<phi>" by simp
    2.60 +
    2.61 +(* Temporal (LTL) connectives: *)
    2.62 +fun holds where "holds P xs \<longleftrightarrow> P (shd xs)"
    2.63 +fun nxt where "nxt \<phi> xs = \<phi> (stl xs)"
    2.64 +
    2.65 +inductive ev for \<phi> where
    2.66 +base: "\<phi> xs \<Longrightarrow> ev \<phi> xs"
    2.67 +|
    2.68 +step: "ev \<phi> (stl xs) \<Longrightarrow> ev \<phi> xs"
    2.69 +
    2.70 +coinductive alw for \<phi> where
    2.71 +alw: "\<lbrakk>\<phi> xs; alw \<phi> (stl xs)\<rbrakk> \<Longrightarrow> alw \<phi> xs"
    2.72 +
    2.73 +(* weak until: *)
    2.74 +coinductive UNTIL (infix "until" 60) for \<phi> \<psi> where
    2.75 +base: "\<psi> xs \<Longrightarrow> (\<phi> until \<psi>) xs"
    2.76 +|
    2.77 +step: "\<lbrakk>\<phi> xs; (\<phi> until \<psi>) (stl xs)\<rbrakk> \<Longrightarrow> (\<phi> until \<psi>) xs"
    2.78 +
    2.79 +lemma holds_mono:
    2.80 +assumes holds: "holds P xs" and 0: "\<And> x. P x \<Longrightarrow> Q x"
    2.81 +shows "holds Q xs"
    2.82 +using assms by auto
    2.83 +
    2.84 +lemma holds_aand:
    2.85 +"(holds P aand holds Q) steps \<longleftrightarrow> holds (\<lambda> step. P step \<and> Q step) steps" by auto
    2.86 +
    2.87 +lemma nxt_mono:
    2.88 +assumes nxt: "nxt \<phi> xs" and 0: "\<And> xs. \<phi> xs \<Longrightarrow> \<psi> xs"
    2.89 +shows "nxt \<psi> xs"
    2.90 +using assms by auto
    2.91 +
    2.92 +lemma ev_mono:
    2.93 +assumes ev: "ev \<phi> xs" and 0: "\<And> xs. \<phi> xs \<Longrightarrow> \<psi> xs"
    2.94 +shows "ev \<psi> xs"
    2.95 +using ev by induct (auto intro: ev.intros simp: 0)
    2.96 +
    2.97 +lemma alw_mono:
    2.98 +assumes alw: "alw \<phi> xs" and 0: "\<And> xs. \<phi> xs \<Longrightarrow> \<psi> xs"
    2.99 +shows "alw \<psi> xs"
   2.100 +using alw by coinduct (auto elim: alw.cases simp: 0)
   2.101 +
   2.102 +lemma until_monoL:
   2.103 +assumes until: "(\<phi>1 until \<psi>) xs" and 0: "\<And> xs. \<phi>1 xs \<Longrightarrow> \<phi>2 xs"
   2.104 +shows "(\<phi>2 until \<psi>) xs"
   2.105 +using until by coinduct (auto elim: UNTIL.cases simp: 0)
   2.106 +
   2.107 +lemma until_monoR:
   2.108 +assumes until: "(\<phi> until \<psi>1) xs" and 0: "\<And> xs. \<psi>1 xs \<Longrightarrow> \<psi>2 xs"
   2.109 +shows "(\<phi> until \<psi>2) xs"
   2.110 +using until by coinduct (auto elim: UNTIL.cases simp: 0)
   2.111 +
   2.112 +lemma until_mono:
   2.113 +assumes until: "(\<phi>1 until \<psi>1) xs" and
   2.114 +0: "\<And> xs. \<phi>1 xs \<Longrightarrow> \<phi>2 xs" "\<And> xs. \<psi>1 xs \<Longrightarrow> \<psi>2 xs"
   2.115 +shows "(\<phi>2 until \<psi>2) xs"
   2.116 +using until by coinduct (auto elim: UNTIL.cases simp: 0)
   2.117 +
   2.118 +lemma until_false: "\<phi> until false = alw \<phi>"
   2.119 +proof-
   2.120 +  {fix xs assume "(\<phi> until false) xs" hence "alw \<phi> xs"
   2.121 +   apply coinduct by (auto elim: UNTIL.cases)
   2.122 +  }
   2.123 +  moreover
   2.124 +  {fix xs assume "alw \<phi> xs" hence "(\<phi> until false) xs"
   2.125 +   apply coinduct by (auto elim: alw.cases)
   2.126 +  }
   2.127 +  ultimately show ?thesis by blast
   2.128 +qed
   2.129 +
   2.130 +lemma ev_nxt: "ev \<phi> = (\<phi> or nxt (ev \<phi>))"
   2.131 +apply(rule ext) by (metis ev.simps nxt.simps)
   2.132 +
   2.133 +lemma alw_nxt: "alw \<phi> = (\<phi> aand nxt (alw \<phi>))"
   2.134 +apply(rule ext) by (metis alw.simps nxt.simps)
   2.135 +
   2.136 +lemma ev_ev[simp]: "ev (ev \<phi>) = ev \<phi>"
   2.137 +proof-
   2.138 +  {fix xs
   2.139 +   assume "ev (ev \<phi>) xs" hence "ev \<phi> xs"
   2.140 +   by induct (auto intro: ev.intros)
   2.141 +  }
   2.142 +  thus ?thesis by (auto intro: ev.intros)
   2.143 +qed
   2.144 +
   2.145 +lemma alw_alw[simp]: "alw (alw \<phi>) = alw \<phi>"
   2.146 +proof-
   2.147 +  {fix xs
   2.148 +   assume "alw \<phi> xs" hence "alw (alw \<phi>) xs"
   2.149 +   by coinduct (auto elim: alw.cases)
   2.150 +  }
   2.151 +  thus ?thesis by (auto elim: alw.cases)
   2.152 +qed
   2.153 +
   2.154 +lemma ev_shift:
   2.155 +assumes "ev \<phi> xs"
   2.156 +shows "ev \<phi> (xl @- xs)"
   2.157 +using assms by (induct xl) (auto intro: ev.intros)
   2.158 +
   2.159 +lemma ev_imp_shift:
   2.160 +assumes "ev \<phi> xs"  shows "\<exists> xl xs2. xs = xl @- xs2 \<and> \<phi> xs2"
   2.161 +using assms by induct (metis shift.simps(1), metis shift.simps(2) stream.collapse)+
   2.162 +
   2.163 +lemma alw_ev_shift: "alw \<phi> xs1 \<Longrightarrow> ev (alw \<phi>) (xl @- xs1)"
   2.164 +by (auto intro: ev_shift ev.intros)
   2.165 +
   2.166 +lemma alw_shift:
   2.167 +assumes "alw \<phi> (xl @- xs)"
   2.168 +shows "alw \<phi> xs"
   2.169 +using assms by (induct xl) (auto elim: alw.cases)
   2.170 +
   2.171 +lemma ev_ex_nxt:
   2.172 +assumes "ev \<phi> xs"
   2.173 +shows "\<exists> n. (nxt ^^ n) \<phi> xs"
   2.174 +using assms proof induct
   2.175 +  case (base xs) thus ?case by (intro exI[of _ 0]) auto
   2.176 +next
   2.177 +  case (step xs)
   2.178 +  then obtain n where "(nxt ^^ n) \<phi> (stl xs)" by blast
   2.179 +  thus ?case by (intro exI[of _ "Suc n"]) (metis funpow.simps(2) nxt.simps o_def)
   2.180 +qed
   2.181 +
   2.182 +lemma alw_sdrop:
   2.183 +assumes "alw \<phi> xs"  shows "alw \<phi> (sdrop n xs)"
   2.184 +by (metis alw_shift assms stake_sdrop)
   2.185 +
   2.186 +lemma nxt_sdrop: "(nxt ^^ n) \<phi> xs \<longleftrightarrow> \<phi> (sdrop n xs)"
   2.187 +by (induct n arbitrary: xs) auto
   2.188 +
   2.189 +definition "wait \<phi> xs \<equiv> LEAST n. (nxt ^^ n) \<phi> xs"
   2.190 +
   2.191 +lemma nxt_wait:
   2.192 +assumes "ev \<phi> xs"  shows "(nxt ^^ (wait \<phi> xs)) \<phi> xs"
   2.193 +unfolding wait_def using ev_ex_nxt[OF assms] by(rule LeastI_ex)
   2.194 +
   2.195 +lemma nxt_wait_least:
   2.196 +assumes ev: "ev \<phi> xs" and nxt: "(nxt ^^ n) \<phi> xs"  shows "wait \<phi> xs \<le> n"
   2.197 +unfolding wait_def using ev_ex_nxt[OF ev] by (metis Least_le nxt)
   2.198 +
   2.199 +lemma sdrop_wait:
   2.200 +assumes "ev \<phi> xs"  shows "\<phi> (sdrop (wait \<phi> xs) xs)"
   2.201 +using nxt_wait[OF assms] unfolding nxt_sdrop .
   2.202 +
   2.203 +lemma sdrop_wait_least:
   2.204 +assumes ev: "ev \<phi> xs" and nxt: "\<phi> (sdrop n xs)"  shows "wait \<phi> xs \<le> n"
   2.205 +using assms nxt_wait_least unfolding nxt_sdrop by auto
   2.206 +
   2.207 +lemma nxt_ev: "(nxt ^^ n) \<phi> xs \<Longrightarrow> ev \<phi> xs"
   2.208 +by (induct n arbitrary: xs) (auto intro: ev.intros)
   2.209 +
   2.210 +lemma not_ev: "not (ev \<phi>) = alw (not \<phi>)"
   2.211 +proof(rule ext, safe)
   2.212 +  fix xs assume "not (ev \<phi>) xs" thus "alw (not \<phi>) xs"
   2.213 +  by (coinduct) (auto intro: ev.intros)
   2.214 +next
   2.215 +  fix xs assume "ev \<phi> xs" and "alw (not \<phi>) xs" thus False
   2.216 +  by (induct) (auto elim: alw.cases)
   2.217 +qed
   2.218 +
   2.219 +lemma not_alw: "not (alw \<phi>) = ev (not \<phi>)"
   2.220 +proof-
   2.221 +  have "not (alw \<phi>) = not (alw (not (not \<phi>)))" by simp
   2.222 +  also have "... = ev (not \<phi>)" unfolding not_ev[symmetric] by simp
   2.223 +  finally show ?thesis .
   2.224 +qed
   2.225 +
   2.226 +lemma not_ev_not[simp]: "not (ev (not \<phi>)) = alw \<phi>"
   2.227 +unfolding not_ev by simp
   2.228 +
   2.229 +lemma not_alw_not[simp]: "not (alw (not \<phi>)) = ev \<phi>"
   2.230 +unfolding not_alw by simp
   2.231 +
   2.232 +lemma alw_ev_sdrop:
   2.233 +assumes "alw (ev \<phi>) (sdrop m xs)"
   2.234 +shows "alw (ev \<phi>) xs"
   2.235 +using assms
   2.236 +by coinduct (metis alw_nxt ev_shift funpow_swap1 nxt.simps nxt_sdrop stake_sdrop)
   2.237 +
   2.238 +lemma ev_alw_imp_alw_ev:
   2.239 +assumes "ev (alw \<phi>) xs"  shows "alw (ev \<phi>) xs"
   2.240 +using assms apply induct
   2.241 +  apply (metis (full_types) alw_mono ev.base)
   2.242 +  by (metis alw alw_nxt ev.step)
   2.243 +
   2.244 +lemma alw_aand: "alw (\<phi> aand \<psi>) = alw \<phi> aand alw \<psi>"
   2.245 +proof-
   2.246 +  {fix xs assume "alw (\<phi> aand \<psi>) xs" hence "(alw \<phi> aand alw \<psi>) xs"
   2.247 +   by (auto elim: alw_mono)
   2.248 +  }
   2.249 +  moreover
   2.250 +  {fix xs assume "(alw \<phi> aand alw \<psi>) xs" hence "alw (\<phi> aand \<psi>) xs"
   2.251 +   by coinduct (auto elim: alw.cases)
   2.252 +  }
   2.253 +  ultimately show ?thesis by blast
   2.254 +qed
   2.255 +
   2.256 +lemma ev_or: "ev (\<phi> or \<psi>) = ev \<phi> or ev \<psi>"
   2.257 +proof-
   2.258 +  {fix xs assume "(ev \<phi> or ev \<psi>) xs" hence "ev (\<phi> or \<psi>) xs"
   2.259 +   by (auto elim: ev_mono)
   2.260 +  }
   2.261 +  moreover
   2.262 +  {fix xs assume "ev (\<phi> or \<psi>) xs" hence "(ev \<phi> or ev \<psi>) xs"
   2.263 +   by induct (auto intro: ev.intros)
   2.264 +  }
   2.265 +  ultimately show ?thesis by blast
   2.266 +qed
   2.267 +
   2.268 +lemma ev_alw_aand:
   2.269 +assumes \<phi>: "ev (alw \<phi>) xs" and \<psi>: "ev (alw \<psi>) xs"
   2.270 +shows "ev (alw (\<phi> aand \<psi>)) xs"
   2.271 +proof-
   2.272 +  obtain xl xs1 where xs1: "xs = xl @- xs1" and \<phi>\<phi>: "alw \<phi> xs1"
   2.273 +  using \<phi> by (metis ev_imp_shift)
   2.274 +  moreover obtain yl ys1 where xs2: "xs = yl @- ys1" and \<psi>\<psi>: "alw \<psi> ys1"
   2.275 +  using \<psi> by (metis ev_imp_shift)
   2.276 +  ultimately have 0: "xl @- xs1 = yl @- ys1" by auto
   2.277 +  hence "prefixeq xl yl \<or> prefixeq yl xl" using shift_prefix_cases by auto
   2.278 +  thus ?thesis proof
   2.279 +    assume "prefixeq xl yl"
   2.280 +    then obtain yl1 where yl: "yl = xl @ yl1" by (elim prefixeqE)
   2.281 +    have xs1': "xs1 = yl1 @- ys1" using 0 unfolding yl by simp
   2.282 +    have "alw \<phi> ys1" using \<phi>\<phi> unfolding xs1' by (metis alw_shift)
   2.283 +    hence "alw (\<phi> aand \<psi>) ys1" using \<psi>\<psi> unfolding alw_aand by auto
   2.284 +    thus ?thesis unfolding xs2 by (auto intro: alw_ev_shift)
   2.285 +  next
   2.286 +    assume "prefixeq yl xl"
   2.287 +    then obtain xl1 where xl: "xl = yl @ xl1" by (elim prefixeqE)
   2.288 +    have ys1': "ys1 = xl1 @- xs1" using 0 unfolding xl by simp
   2.289 +    have "alw \<psi> xs1" using \<psi>\<psi> unfolding ys1' by (metis alw_shift)
   2.290 +    hence "alw (\<phi> aand \<psi>) xs1" using \<phi>\<phi> unfolding alw_aand by auto
   2.291 +    thus ?thesis unfolding xs1 by (auto intro: alw_ev_shift)
   2.292 +  qed
   2.293 +qed
   2.294 +
   2.295 +lemma ev_alw_alw_impl:
   2.296 +assumes "ev (alw \<phi>) xs" and "alw (alw \<phi> impl ev \<psi>) xs"
   2.297 +shows "ev \<psi> xs"
   2.298 +using assms by induct (auto intro: ev.intros elim: alw.cases)
   2.299 +
   2.300 +lemma ev_alw_stl[simp]: "ev (alw \<phi>) (stl x) \<longleftrightarrow> ev (alw \<phi>) x"
   2.301 +by (metis (full_types) alw_nxt ev_nxt nxt.simps)
   2.302 +
   2.303 +lemma alw_alw_impl_ev:
   2.304 +"alw (alw \<phi> impl ev \<psi>) = (ev (alw \<phi>) impl alw (ev \<psi>))" (is "?A = ?B")
   2.305 +proof-
   2.306 +  {fix xs assume "?A xs \<and> ev (alw \<phi>) xs" hence "alw (ev \<psi>) xs"
   2.307 +   apply coinduct using ev_nxt by (auto elim: ev_alw_alw_impl alw.cases intro: ev.intros)
   2.308 +  }
   2.309 +  moreover
   2.310 +  {fix xs assume "?B xs" hence "?A xs"
   2.311 +   apply coinduct by (auto elim: alw.cases intro: ev.intros)
   2.312 +  }
   2.313 +  ultimately show ?thesis by blast
   2.314 +qed
   2.315 +
   2.316 +lemma ev_alw_impl:
   2.317 +assumes "ev \<phi> xs" and "alw (\<phi> impl \<psi>) xs"  shows "ev \<psi> xs"
   2.318 +using assms by induct (auto intro: ev.intros elim: alw.cases)
   2.319 +
   2.320 +lemma ev_alw_impl_ev:
   2.321 +assumes "ev \<phi> xs" and "alw (\<phi> impl ev \<psi>) xs"  shows "ev \<psi> xs"
   2.322 +using ev_alw_impl[OF assms] by simp
   2.323 +
   2.324 +lemma alw_mp:
   2.325 +assumes "alw \<phi> xs" and "alw (\<phi> impl \<psi>) xs"
   2.326 +shows "alw \<psi> xs"
   2.327 +proof-
   2.328 +  {assume "alw \<phi> xs \<and> alw (\<phi> impl \<psi>) xs" hence ?thesis
   2.329 +   apply coinduct by (auto elim: alw.cases)
   2.330 +  }
   2.331 +  thus ?thesis using assms by auto
   2.332 +qed
   2.333 +
   2.334 +lemma all_imp_alw:
   2.335 +assumes "\<And> xs. \<phi> xs"  shows "alw \<phi> xs"
   2.336 +proof-
   2.337 +  {assume "\<forall> xs. \<phi> xs"
   2.338 +   hence ?thesis by coinduct auto
   2.339 +  }
   2.340 +  thus ?thesis using assms by auto
   2.341 +qed
   2.342 +
   2.343 +lemma alw_impl_ev_alw:
   2.344 +assumes "alw (\<phi> impl ev \<psi>) xs"
   2.345 +shows "alw (ev \<phi> impl ev \<psi>) xs"
   2.346 +using assms by coinduct (auto elim: alw.cases dest: ev_alw_impl intro: ev.intros)
   2.347 +
   2.348 +lemma ev_holds_sset:
   2.349 +"ev (holds P) xs \<longleftrightarrow> (\<exists> x \<in> sset xs. P x)" (is "?L \<longleftrightarrow> ?R")
   2.350 +proof safe
   2.351 +  assume ?L thus ?R by induct (metis holds.simps stream.set_sel(1), metis stl_sset)
   2.352 +next
   2.353 +  fix x assume "x \<in> sset xs" "P x"
   2.354 +  thus ?L by (induct rule: sset_induct) (simp_all add: ev.base ev.step)
   2.355 +qed
   2.356 +
   2.357 +(* LTL as a program logic: *)
   2.358 +lemma alw_invar:
   2.359 +assumes "\<phi> xs" and "alw (\<phi> impl nxt \<phi>) xs"
   2.360 +shows "alw \<phi> xs"
   2.361 +proof-
   2.362 +  {assume "\<phi> xs \<and> alw (\<phi> impl nxt \<phi>) xs" hence ?thesis
   2.363 +   apply coinduct by(auto elim: alw.cases)
   2.364 +  }
   2.365 +  thus ?thesis using assms by auto
   2.366 +qed
   2.367 +
   2.368 +lemma variance:
   2.369 +assumes 1: "\<phi> xs" and 2: "alw (\<phi> impl (\<psi> or nxt \<phi>)) xs"
   2.370 +shows "(alw \<phi> or ev \<psi>) xs"
   2.371 +proof-
   2.372 +  {assume "\<not> ev \<psi> xs" hence "alw (not \<psi>) xs" unfolding not_ev[symmetric] .
   2.373 +   moreover have "alw (not \<psi> impl (\<phi> impl nxt \<phi>)) xs"
   2.374 +   using 2 by coinduct (auto elim: alw.cases)
   2.375 +   ultimately have "alw (\<phi> impl nxt \<phi>) xs" by(auto dest: alw_mp)
   2.376 +   with 1 have "alw \<phi> xs" by(rule alw_invar)
   2.377 +  }
   2.378 +  thus ?thesis by blast
   2.379 +qed
   2.380 +
   2.381 +lemma ev_alw_imp_nxt:
   2.382 +assumes e: "ev \<phi> xs" and a: "alw (\<phi> impl (nxt \<phi>)) xs"
   2.383 +shows "ev (alw \<phi>) xs"
   2.384 +proof-
   2.385 +  obtain xl xs1 where xs: "xs = xl @- xs1" and \<phi>: "\<phi> xs1"
   2.386 +  using e by (metis ev_imp_shift)
   2.387 +  have "\<phi> xs1 \<and> alw (\<phi> impl (nxt \<phi>)) xs1" using a \<phi> unfolding xs by (metis alw_shift)
   2.388 +  hence "alw \<phi> xs1" by(coinduct xs1 rule: alw.coinduct) (auto elim: alw.cases)
   2.389 +  thus ?thesis unfolding xs by (auto intro: alw_ev_shift)
   2.390 +qed
   2.391 +
   2.392 +
   2.393 +
   2.394 +end
   2.395 \ No newline at end of file