# HG changeset patch # User nipkow # Date 1363774591 -3600 # Node ID 6cd801fabb34bf5934fa0e115830c52aec726621 # Parent fa84494bf3a0219408c489e45504de31b53437ef tuned diff -r fa84494bf3a0 -r 6cd801fabb34 src/HOL/IMP/Live_True.thy --- a/src/HOL/IMP/Live_True.thy Tue Mar 19 21:35:15 2013 +0100 +++ b/src/HOL/IMP/Live_True.thy Wed Mar 20 11:16:31 2013 +0100 @@ -133,8 +133,8 @@ and is thus executable. *} lemma L_While: fixes b c X -assumes "finite X" defines "f == \A. vars b \ X \ L c A" -shows "L (WHILE b DO c) X = while (\A. f A \ A) f {}" (is "_ = ?r") +assumes "finite X" defines "f == \Y. vars b \ X \ L c Y" +shows "L (WHILE b DO c) X = while (\Y. f Y \ Y) f {}" (is "_ = ?r") proof - let ?V = "vars b \ vars c \ X" have "lfp f = ?r" @@ -149,10 +149,15 @@ thus ?thesis by (simp add: f_def) qed +lemma L_While_let: "finite X \ L (WHILE b DO c) X = + (let f = (\Y. vars b \ X \ L c Y) + in while (\Y. f Y \ Y) f {})" +by(simp add: L_While del: L.simps(5)) + lemma L_While_set: "L (WHILE b DO c) (set xs) = - (let f = (\A. vars b \ set xs \ L c A) - in while (\A. f A \ A) f {})" -by(simp add: L_While del: L.simps(5)) + (let f = (\Y. vars b \ set xs \ L c Y) + in while (\Y. f Y \ Y) f {})" +by(rule L_While_let, simp) text{* Replace the equation for @{text "L (WHILE \)"} by the executable @{thm[source] L_While_set}: *} lemmas [code] = L.simps(1-4) L_While_set