diff -r bb18eed53ed6 -r a1119cf551e8 src/HOL/IMP/Abs_Int3.thy --- a/src/HOL/IMP/Abs_Int3.thy Tue Aug 13 14:20:22 2013 +0200 +++ b/src/HOL/IMP/Abs_Int3.thy Tue Aug 13 16:25:47 2013 +0200 @@ -240,22 +240,22 @@ definition AI_wn :: "com \ 'av st option acom option" where "AI_wn c = pfp_wn (step' \) (bot c)" -lemma AI_wn_correct: "AI_wn c = Some C \ CS c \ \\<^isub>c C" +lemma AI_wn_correct: "AI_wn c = Some C \ CS c \ \\<^sub>c C" proof(simp add: CS_def AI_wn_def) assume 1: "pfp_wn (step' \) (bot c) = Some C" have 2: "strip C = c \ step' \ C \ C" by(rule pfp_wn_pfp[where x="bot c"]) (simp_all add: 1 mono_step'_top) - have pfp: "step (\\<^isub>o \) (\\<^isub>c C) \ \\<^isub>c C" + have pfp: "step (\\<^sub>o \) (\\<^sub>c C) \ \\<^sub>c C" proof(rule order_trans) - show "step (\\<^isub>o \) (\\<^isub>c C) \ \\<^isub>c (step' \ C)" + show "step (\\<^sub>o \) (\\<^sub>c C) \ \\<^sub>c (step' \ C)" by(rule step_step') - show "... \ \\<^isub>c C" + show "... \ \\<^sub>c C" by(rule mono_gamma_c[OF conjunct2[OF 2]]) qed - have 3: "strip (\\<^isub>c C) = c" by(simp add: strip_pfp_wn[OF _ 1]) - have "lfp c (step (\\<^isub>o \)) \ \\<^isub>c C" - by(rule lfp_lowerbound[simplified,where f="step (\\<^isub>o \)", OF 3 pfp]) - thus "lfp c (step UNIV) \ \\<^isub>c C" by simp + have 3: "strip (\\<^sub>c C) = c" by(simp add: strip_pfp_wn[OF _ 1]) + have "lfp c (step (\\<^sub>o \)) \ \\<^sub>c C" + by(rule lfp_lowerbound[simplified,where f="step (\\<^sub>o \)", OF 3 pfp]) + thus "lfp c (step UNIV) \ \\<^sub>c C" by simp qed end @@ -405,8 +405,8 @@ done -definition n_s :: "'av st \ vname set \ nat" ("n\<^isub>s") where -"n\<^isub>s S X = (\x\X. n(fun S x))" +definition n_s :: "'av st \ vname set \ nat" ("n\<^sub>s") where +"n\<^sub>s S X = (\x\X. n(fun S x))" lemma n_s_narrow_rep: assumes "finite X" "S1 = S2 on -X" "\x. S2 x \ S1 x" "\x. S1 x \ S2 x \ S1 x" @@ -423,25 +423,25 @@ qed lemma n_s_narrow: "finite X \ fun S1 = fun S2 on -X \ S2 \ S1 \ S1 \ S2 < S1 - \ n\<^isub>s (S1 \ S2) X < n\<^isub>s S1 X" + \ n\<^sub>s (S1 \ S2) X < n\<^sub>s S1 X" apply(auto simp add: less_st_def n_s_def) apply (transfer fixing: n) apply(auto simp add: less_eq_st_rep_iff eq_st_def fun_eq_iff n_s_narrow_rep) done -definition n_o :: "'av st option \ vname set \ nat" ("n\<^isub>o") where -"n\<^isub>o opt X = (case opt of None \ 0 | Some S \ n\<^isub>s S X + 1)" +definition n_o :: "'av st option \ vname set \ nat" ("n\<^sub>o") where +"n\<^sub>o opt X = (case opt of None \ 0 | Some S \ n\<^sub>s S X + 1)" lemma n_o_narrow: "top_on_opt S1 (-X) \ top_on_opt S2 (-X) \ finite X - \ S2 \ S1 \ S1 \ S2 < S1 \ n\<^isub>o (S1 \ S2) X < n\<^isub>o S1 X" + \ S2 \ S1 \ S1 \ S2 < S1 \ n\<^sub>o (S1 \ S2) X < n\<^sub>o S1 X" apply(induction S1 S2 rule: narrow_option.induct) apply(auto simp: n_o_def n_s_narrow) done -definition n_c :: "'av st option acom \ nat" ("n\<^isub>c") where -"n\<^isub>c C = listsum (map (\a. n\<^isub>o a (vars C)) (annos C))" +definition n_c :: "'av st option acom \ nat" ("n\<^sub>c") where +"n\<^sub>c C = listsum (map (\a. n\<^sub>o a (vars C)) (annos C))" lemma less_annos_iff: "(C1 < C2) = (C1 \ C2 \ (\i top_on_acom C1 (- vars C1) \ top_on_acom C2 (- vars C2) - \ C2 \ C1 \ C1 \ C2 < C1 \ n\<^isub>c (C1 \ C2) < n\<^isub>c C1" + \ C2 \ C1 \ C1 \ C2 < C1 \ n\<^sub>c (C1 \ C2) < n\<^sub>c C1" apply(auto simp: n_c_def narrow_acom_def listsum_setsum_nth) apply(subgoal_tac "length(annos C2) = length(annos C1)") prefer 2 apply (simp add: size_annos_same2)