src/HOL/IMP/Small_Step.thy
changeset 67613 ce654b0e6d69
parent 67406 23307fd33906
child 69505 cc2d676d5395
equal deleted inserted replaced
67610:4939494ed791 67613:ce654b0e6d69
   171 by(metis big_to_small small_to_big)
   171 by(metis big_to_small small_to_big)
   172 
   172 
   173 
   173 
   174 subsection "Final configurations and infinite reductions"
   174 subsection "Final configurations and infinite reductions"
   175 
   175 
   176 definition "final cs \<longleftrightarrow> \<not>(EX cs'. cs \<rightarrow> cs')"
   176 definition "final cs \<longleftrightarrow> \<not>(\<exists>cs'. cs \<rightarrow> cs')"
   177 
   177 
   178 lemma finalD: "final (c,s) \<Longrightarrow> c = SKIP"
   178 lemma finalD: "final (c,s) \<Longrightarrow> c = SKIP"
   179 apply(simp add: final_def)
   179 apply(simp add: final_def)
   180 apply(induction c)
   180 apply(induction c)
   181 apply blast+
   181 apply blast+
   186 
   186 
   187 text\<open>Now we can show that @{text"\<Rightarrow>"} yields a final state iff @{text"\<rightarrow>"}
   187 text\<open>Now we can show that @{text"\<Rightarrow>"} yields a final state iff @{text"\<rightarrow>"}
   188 terminates:\<close>
   188 terminates:\<close>
   189 
   189 
   190 lemma big_iff_small_termination:
   190 lemma big_iff_small_termination:
   191   "(EX t. cs \<Rightarrow> t) \<longleftrightarrow> (EX cs'. cs \<rightarrow>* cs' \<and> final cs')"
   191   "(\<exists>t. cs \<Rightarrow> t) \<longleftrightarrow> (\<exists>cs'. cs \<rightarrow>* cs' \<and> final cs')"
   192 by(simp add: big_iff_small final_iff_SKIP)
   192 by(simp add: big_iff_small final_iff_SKIP)
   193 
   193 
   194 text\<open>This is the same as saying that the absence of a big step result is
   194 text\<open>This is the same as saying that the absence of a big step result is
   195 equivalent with absence of a terminating small step sequence, i.e.\ with
   195 equivalent with absence of a terminating small step sequence, i.e.\ with
   196 nontermination.  Since @{text"\<rightarrow>"} is determininistic, there is no difference
   196 nontermination.  Since @{text"\<rightarrow>"} is determininistic, there is no difference