# HG changeset patch # User wenzelm # Date 1347549644 -7200 # Node ID 207c333f61af475f8c1133abe67c1479ef6b6251 # Parent ea3fa2e0f960541a390bc0c9c7481f8fb8c06234# Parent 0dd3449640b4921dfe8e806bac17cce29c8936fa merged diff -r ea3fa2e0f960 -r 207c333f61af src/HOL/Decision_Procs/Approximation.thy --- a/src/HOL/Decision_Procs/Approximation.thy Thu Sep 13 17:15:04 2012 +0200 +++ b/src/HOL/Decision_Procs/Approximation.thy Thu Sep 13 17:20:44 2012 +0200 @@ -23,15 +23,20 @@ "horner F G 0 i k x = 0" | "horner F G (Suc n) i k x = 1 / k - x * horner F G n (F i) (G i k) x" -lemma horner_schema': fixes x :: real and a :: "nat \ real" +lemma horner_schema': + fixes x :: real and a :: "nat \ real" shows "a 0 - x * (\ i=0.. i=0..i. - (x * ((-1)^i * a (Suc i) * x ^ i)) = (-1)^(Suc i) * a (Suc i) * x ^ (Suc i)" by auto - show ?thesis unfolding setsum_right_distrib shift_pow diff_minus setsum_negf[symmetric] setsum_head_upt_Suc[OF zero_less_Suc] + have shift_pow: "\i. - (x * ((-1)^i * a (Suc i) * x ^ i)) = (-1)^(Suc i) * a (Suc i) * x ^ (Suc i)" + by auto + show ?thesis + unfolding setsum_right_distrib shift_pow diff_minus setsum_negf[symmetric] + setsum_head_upt_Suc[OF zero_less_Suc] setsum_reindex[OF inj_Suc, unfolded comp_def, symmetric, of "\ n. (-1)^n *a n * x^n"] by auto qed -lemma horner_schema: fixes f :: "nat \ nat" and G :: "nat \ nat \ nat" and F :: "nat \ nat" +lemma horner_schema: + fixes f :: "nat \ nat" and G :: "nat \ nat \ nat" and F :: "nat \ nat" assumes f_Suc: "\n. f (Suc n) = G ((F ^^ n) s) (f n)" shows "horner F G n ((F ^^ j') s) (f j') x = (\ j = 0..< n. -1 ^ j * (1 / (f (j' + j))) * x ^ j)" proof (induct n arbitrary: j') @@ -46,15 +51,16 @@ lemma horner_bounds': fixes lb :: "nat \ nat \ nat \ float \ float" and ub :: "nat \ nat \ nat \ float \ float" assumes "0 \ real x" and f_Suc: "\n. f (Suc n) = G ((F ^^ n) s) (f n)" - and lb_0: "\ i k x. lb 0 i k x = 0" - and lb_Suc: "\ n i k x. lb (Suc n) i k x = lapprox_rat prec 1 k - x * (ub n (F i) (G i k) x)" - and ub_0: "\ i k x. ub 0 i k x = 0" - and ub_Suc: "\ n i k x. ub (Suc n) i k x = rapprox_rat prec 1 k - x * (lb n (F i) (G i k) x)" + and lb_0: "\ i k x. lb 0 i k x = 0" + and lb_Suc: "\ n i k x. lb (Suc n) i k x = lapprox_rat prec 1 k - x * (ub n (F i) (G i k) x)" + and ub_0: "\ i k x. ub 0 i k x = 0" + and ub_Suc: "\ n i k x. ub (Suc n) i k x = rapprox_rat prec 1 k - x * (lb n (F i) (G i k) x)" shows "(lb n ((F ^^ j') s) (f j') x) \ horner F G n ((F ^^ j') s) (f j') x \ horner F G n ((F ^^ j') s) (f j') x \ (ub n ((F ^^ j') s) (f j') x)" (is "?lb n j' \ ?horner n j' \ ?horner n j' \ ?ub n j'") proof (induct n arbitrary: j') - case 0 thus ?case unfolding lb_0 ub_0 horner.simps by auto + case 0 + thus ?case unfolding lb_0 ub_0 horner.simps by auto next case (Suc n) thus ?case using lapprox_rat[of prec 1 "f j'"] using rapprox_rat[of 1 "f j'" prec] @@ -71,12 +77,13 @@ *} -lemma horner_bounds: fixes F :: "nat \ nat" and G :: "nat \ nat \ nat" +lemma horner_bounds: + fixes F :: "nat \ nat" and G :: "nat \ nat \ nat" assumes "0 \ real x" and f_Suc: "\n. f (Suc n) = G ((F ^^ n) s) (f n)" - and lb_0: "\ i k x. lb 0 i k x = 0" - and lb_Suc: "\ n i k x. lb (Suc n) i k x = lapprox_rat prec 1 k - x * (ub n (F i) (G i k) x)" - and ub_0: "\ i k x. ub 0 i k x = 0" - and ub_Suc: "\ n i k x. ub (Suc n) i k x = rapprox_rat prec 1 k - x * (lb n (F i) (G i k) x)" + and lb_0: "\ i k x. lb 0 i k x = 0" + and lb_Suc: "\ n i k x. lb (Suc n) i k x = lapprox_rat prec 1 k - x * (ub n (F i) (G i k) x)" + and ub_0: "\ i k x. ub 0 i k x = 0" + and ub_Suc: "\ n i k x. ub (Suc n) i k x = rapprox_rat prec 1 k - x * (lb n (F i) (G i k) x)" shows "(lb n ((F ^^ j') s) (f j') x) \ (\j=0..j=0.. (ub n ((F ^^ j') s) (f j') x)" (is "?ub") proof - @@ -86,12 +93,13 @@ thus "?lb" and "?ub" by auto qed -lemma horner_bounds_nonpos: fixes F :: "nat \ nat" and G :: "nat \ nat \ nat" +lemma horner_bounds_nonpos: + fixes F :: "nat \ nat" and G :: "nat \ nat \ nat" assumes "real x \ 0" and f_Suc: "\n. f (Suc n) = G ((F ^^ n) s) (f n)" - and lb_0: "\ i k x. lb 0 i k x = 0" - and lb_Suc: "\ n i k x. lb (Suc n) i k x = lapprox_rat prec 1 k + x * (ub n (F i) (G i k) x)" - and ub_0: "\ i k x. ub 0 i k x = 0" - and ub_Suc: "\ n i k x. ub (Suc n) i k x = rapprox_rat prec 1 k + x * (lb n (F i) (G i k) x)" + and lb_0: "\ i k x. lb 0 i k x = 0" + and lb_Suc: "\ n i k x. lb (Suc n) i k x = lapprox_rat prec 1 k + x * (ub n (F i) (G i k) x)" + and ub_0: "\ i k x. ub 0 i k x = 0" + and ub_Suc: "\ n i k x. ub (Suc n) i k x = rapprox_rat prec 1 k + x * (lb n (F i) (G i k) x)" shows "(lb n ((F ^^ j') s) (f j') x) \ (\j=0..j=0.. (ub n ((F ^^ j') s) (f j') x)" (is "?ub") proof - @@ -320,8 +328,7 @@ thus ?thesis unfolding lb_sqrt.simps by auto qed -lemma bnds_sqrt': - shows "sqrt x \ {(lb_sqrt prec x) .. (ub_sqrt prec x) }" +lemma bnds_sqrt': "sqrt x \ {(lb_sqrt prec x) .. (ub_sqrt prec x)}" proof - { fix x :: float assume "0 < x" hence "0 < real x" and "0 \ real x" by auto @@ -402,7 +409,8 @@ | "lb_arctan_horner prec (Suc n) k x = (lapprox_rat prec 1 k) - x * (ub_arctan_horner prec n (k + 2) x)" -lemma arctan_0_1_bounds': assumes "0 \ real x" "real x \ 1" and "even n" +lemma arctan_0_1_bounds': + assumes "0 \ real x" "real x \ 1" and "even n" shows "arctan x \ {(x * lb_arctan_horner prec n 1 (x * x)) .. (x * ub_arctan_horner prec (Suc n) 1 (x * x))}" proof - let "?c i" = "-1^i * (1 / (i * 2 + (1::nat)) * real x ^ (i * 2 + 1))" @@ -2031,7 +2039,8 @@ qed qed -lemma ub_ln_lb_ln_bounds: assumes "0 < x" +lemma ub_ln_lb_ln_bounds: + assumes "0 < x" shows "the (lb_ln prec x) \ ln x \ ln x \ the (ub_ln prec x)" (is "?lb \ ?ln \ ?ln \ ?ub") proof (cases "x < 1") @@ -2067,7 +2076,8 @@ unfolding if_not_P[OF `\ x \ 0`] if_P[OF True] by auto qed -lemma lb_ln: assumes "Some y = lb_ln prec x" +lemma lb_ln: + assumes "Some y = lb_ln prec x" shows "y \ ln x" and "0 < real x" proof - have "0 < x" @@ -2080,7 +2090,8 @@ thus "y \ ln x" unfolding assms[symmetric] by auto qed -lemma ub_ln: assumes "Some y = ub_ln prec x" +lemma ub_ln: + assumes "Some y = ub_ln prec x" shows "ln x \ y" and "0 < real x" proof - have "0 < x" @@ -2577,7 +2588,7 @@ lemma approx_form_approx_form': assumes "approx_form' prec f s n l u bs ss" and "(x::real) \ { l .. u }" obtains l' u' where "x \ { l' .. u' }" - and "approx_form prec f (bs[n := Some (l', u')]) ss" + and "approx_form prec f (bs[n := Some (l', u')]) ss" using assms proof (induct s arbitrary: l u) case 0 from this(1)[of l u] this(2,3) @@ -2605,7 +2616,7 @@ lemma approx_form_aux: assumes "approx_form prec f vs ss" - and "bounded_by xs vs" + and "bounded_by xs vs" shows "interpret_form f xs" using assms proof (induct f arbitrary: vs) case (Bound x a b f) @@ -2658,8 +2669,8 @@ case (Less a b) then obtain l u l' u' where l_eq: "Some (l, u) = approx prec a vs" - and u_eq: "Some (l', u') = approx prec b vs" - and inequality: "u < l'" + and u_eq: "Some (l', u') = approx prec b vs" + and inequality: "u < l'" by (cases "approx prec a vs", auto, cases "approx prec b vs", auto) from inequality approx[OF Less.prems(2) l_eq] approx[OF Less.prems(2) u_eq] @@ -2668,8 +2679,8 @@ case (LessEqual a b) then obtain l u l' u' where l_eq: "Some (l, u) = approx prec a vs" - and u_eq: "Some (l', u') = approx prec b vs" - and inequality: "u \ l'" + and u_eq: "Some (l', u') = approx prec b vs" + and inequality: "u \ l'" by (cases "approx prec a vs", auto, cases "approx prec b vs", auto) from inequality approx[OF LessEqual.prems(2) l_eq] approx[OF LessEqual.prems(2) u_eq] @@ -2740,21 +2751,27 @@ shows "DERIV (\ x'. interpret_floatarith f (vs[n := x'])) x :> interpret_floatarith (DERIV_floatarith n f) (vs[n := x])" (is "DERIV (?i f) x :> _") -using isDERIV proof (induct f arbitrary: x) - case (Inverse a) thus ?case +using isDERIV +proof (induct f arbitrary: x) + case (Inverse a) + thus ?case + by (auto intro!: DERIV_intros simp add: algebra_simps power2_eq_square) +next + case (Cos a) + thus ?case by (auto intro!: DERIV_intros - simp add: algebra_simps power2_eq_square) -next case (Cos a) thus ?case - apply (auto intro!: DERIV_intros simp del: interpret_floatarith.simps(5) simp add: interpret_floatarith_sin interpret_floatarith.simps(5)[of a]) - done -next case (Power a n) thus ?case - by (cases n, auto intro!: DERIV_intros - simp del: power_Suc) -next case (Ln a) thus ?case - by (auto intro!: DERIV_intros simp add: divide_inverse) -next case (Var i) thus ?case using `n < length vs` by auto +next + case (Power a n) + thus ?case + by (cases n) (auto intro!: DERIV_intros simp del: power_Suc) +next + case (Ln a) + thus ?case by (auto intro!: DERIV_intros simp add: divide_inverse) +next + case (Var i) + thus ?case using `n < length vs` by auto qed (auto intro!: DERIV_intros) declare approx.simps[simp del] @@ -2783,13 +2800,14 @@ lemma isDERIV_approx: assumes "bounded_by xs vs" - and isDERIV_approx: "isDERIV_approx prec x f vs" + and isDERIV_approx: "isDERIV_approx prec x f vs" shows "isDERIV x f xs" -using isDERIV_approx proof (induct f) + using isDERIV_approx +proof (induct f) case (Inverse a) then obtain l u where approx_Some: "Some (l, u) = approx prec a vs" and *: "0 < l \ u < 0" - by (cases "approx prec a vs", auto) + by (cases "approx prec a vs") auto with approx[OF `bounded_by xs vs` approx_Some] have "interpret_floatarith a xs \ 0" by auto thus ?case using Inverse by auto @@ -2797,7 +2815,7 @@ case (Ln a) then obtain l u where approx_Some: "Some (l, u) = approx prec a vs" and *: "0 < l" - by (cases "approx prec a vs", auto) + by (cases "approx prec a vs") auto with approx[OF `bounded_by xs vs` approx_Some] have "0 < interpret_floatarith a xs" by auto thus ?case using Ln by auto @@ -2805,46 +2823,49 @@ case (Sqrt a) then obtain l u where approx_Some: "Some (l, u) = approx prec a vs" and *: "0 < l" - by (cases "approx prec a vs", auto) + by (cases "approx prec a vs") auto with approx[OF `bounded_by xs vs` approx_Some] have "0 < interpret_floatarith a xs" by auto thus ?case using Sqrt by auto next - case (Power a n) thus ?case by (cases n, auto) + case (Power a n) thus ?case by (cases n) auto qed auto lemma bounded_by_update_var: assumes "bounded_by xs vs" and "vs ! i = Some (l, u)" - and bnd: "x \ { real l .. real u }" + and bnd: "x \ { real l .. real u }" shows "bounded_by (xs[i := x]) vs" proof (cases "i < length xs") - case False thus ?thesis using `bounded_by xs vs` by auto + case False + thus ?thesis using `bounded_by xs vs` by auto next let ?xs = "xs[i := x]" case True hence "i < length ?xs" by auto -{ fix j - assume "j < length vs" - have "case vs ! j of None \ True | Some (l, u) \ ?xs ! j \ { real l .. real u }" - proof (cases "vs ! j") - case (Some b) - thus ?thesis - proof (cases "i = j") - case True - thus ?thesis using `vs ! i = Some (l, u)` Some and bnd `i < length ?xs` - by auto - next - case False - thus ?thesis using `bounded_by xs vs`[THEN bounded_byE, OF `j < length vs`] Some - by auto - qed - qed auto } + { + fix j + assume "j < length vs" + have "case vs ! j of None \ True | Some (l, u) \ ?xs ! j \ { real l .. real u }" + proof (cases "vs ! j") + case (Some b) + thus ?thesis + proof (cases "i = j") + case True + thus ?thesis using `vs ! i = Some (l, u)` Some and bnd `i < length ?xs` + by auto + next + case False + thus ?thesis + using `bounded_by xs vs`[THEN bounded_byE, OF `j < length vs`] Some by auto + qed + qed auto + } thus ?thesis unfolding bounded_by_def by auto qed lemma isDERIV_approx': assumes "bounded_by xs vs" - and vs_x: "vs ! x = Some (l, u)" and X_in: "X \ { real l .. real u }" - and approx: "isDERIV_approx prec x f vs" + and vs_x: "vs ! x = Some (l, u)" and X_in: "X \ { real l .. real u }" + and approx: "isDERIV_approx prec x f vs" shows "isDERIV x f (xs[x := X])" proof - note bounded_by_update_var[OF `bounded_by xs vs` vs_x X_in] approx @@ -2853,8 +2874,8 @@ lemma DERIV_approx: assumes "n < length xs" and bnd: "bounded_by xs vs" - and isD: "isDERIV_approx prec n f vs" - and app: "Some (l, u) = approx prec (DERIV_floatarith n f) vs" (is "_ = approx _ ?D _") + and isD: "isDERIV_approx prec n f vs" + and app: "Some (l, u) = approx prec (DERIV_floatarith n f) vs" (is "_ = approx _ ?D _") shows "\(x::real). l \ x \ x \ u \ DERIV (\ x. interpret_floatarith f (xs[n := x])) (xs!n) :> x" (is "\ x. _ \ _ \ DERIV (?i f) _ :> _") @@ -2867,17 +2888,19 @@ show "DERIV (?i f) (xs!n) :> (?i ?D (xs!n))" by simp qed -fun lift_bin :: "(float * float) option \ (float * float) option \ (float \ float \ float \ float \ (float * float) option) \ (float * float) option" where -"lift_bin (Some (l1, u1)) (Some (l2, u2)) f = f l1 u1 l2 u2" | -"lift_bin a b f = None" +fun lift_bin :: "(float * float) option \ + (float * float) option \ (float \ float \ float \ float \ (float * float) option) \ + (float * float) option" where + "lift_bin (Some (l1, u1)) (Some (l2, u2)) f = f l1 u1 l2 u2" +| "lift_bin a b f = None" lemma lift_bin: assumes lift_bin_Some: "Some (l, u) = lift_bin a b f" obtains l1 u1 l2 u2 where "a = Some (l1, u1)" - and "b = Some (l2, u2)" - and "f l1 u1 l2 u2 = Some (l, u)" -using assms by (cases a, simp, cases b, simp, auto) + and "b = Some (l2, u2)" + and "f l1 u1 l2 u2 = Some (l, u)" + using assms by (cases a, simp, cases b, simp, auto) fun approx_tse where "approx_tse prec n 0 c k f bs = approx prec f bs" | @@ -2894,10 +2917,11 @@ lemma bounded_by_Cons: assumes bnd: "bounded_by xs vs" - and x: "x \ { real l .. real u }" + and x: "x \ { real l .. real u }" shows "bounded_by (x#xs) ((Some (l, u))#vs)" proof - - { fix i assume *: "i < length ((Some (l, u))#vs)" + { + fix i assume *: "i < length ((Some (l, u))#vs)" have "case ((Some (l,u))#vs) ! i of Some (l, u) \ (x#xs)!i \ { real l .. real u } | None \ True" proof (cases i) case 0 with x show ?thesis by auto @@ -2905,15 +2929,16 @@ case (Suc i) with * have "i < length vs" by auto from bnd[THEN bounded_byE, OF this] show ?thesis unfolding Suc nth_Cons_Suc . - qed } + qed + } thus ?thesis by (auto simp add: bounded_by_def) qed lemma approx_tse_generic: assumes "bounded_by xs vs" - and bnd_c: "bounded_by (xs[x := c]) vs" and "x < length vs" and "x < length xs" - and bnd_x: "vs ! x = Some (lx, ux)" - and ate: "Some (l, u) = approx_tse prec x s c k f vs" + and bnd_c: "bounded_by (xs[x := c]) vs" and "x < length vs" and "x < length xs" + and bnd_x: "vs ! x = Some (lx, ux)" + and ate: "Some (l, u) = approx_tse prec x s c k f vs" shows "\ n. (\ m < n. \ (z::real) \ {lx .. ux}. DERIV (\ y. interpret_floatarith ((DERIV_floatarith x ^^ m) f) (xs[x := y])) z :> (interpret_floatarith ((DERIV_floatarith x ^^ (Suc m)) f) (xs[x := z]))) @@ -2925,36 +2950,39 @@ (xs!x - c)^n \ {l .. u})" (is "\ n. ?taylor f k l u n") using ate proof (induct s arbitrary: k f l u) case 0 - { fix t::real assume "t \ {lx .. ux}" + { + fix t::real assume "t \ {lx .. ux}" note bounded_by_update_var[OF `bounded_by xs vs` bnd_x this] from approx[OF this 0[unfolded approx_tse.simps]] have "(interpret_floatarith f (xs[x := t])) \ {l .. u}" by (auto simp add: algebra_simps) - } thus ?case by (auto intro!: exI[of _ 0]) + } + thus ?case by (auto intro!: exI[of _ 0]) next case (Suc s) show ?case proof (cases "isDERIV_approx prec x f vs") case False note ap = Suc.prems[unfolded approx_tse.simps if_not_P[OF False]] - - { fix t::real assume "t \ {lx .. ux}" + { + fix t::real assume "t \ {lx .. ux}" note bounded_by_update_var[OF `bounded_by xs vs` bnd_x this] from approx[OF this ap] have "(interpret_floatarith f (xs[x := t])) \ {l .. u}" by (auto simp add: algebra_simps) - } thus ?thesis by (auto intro!: exI[of _ 0]) + } + thus ?thesis by (auto intro!: exI[of _ 0]) next case True with Suc.prems obtain l1 u1 l2 u2 where a: "Some (l1, u1) = approx prec f (vs[x := Some (c,c)])" - and ate: "Some (l2, u2) = approx_tse prec x s c (Suc k) (DERIV_floatarith x f) vs" - and final: "Some (l, u) = approx prec - (Add (Var 0) - (Mult (Inverse (Num (Float (int k) 0))) - (Mult (Add (Var (Suc (Suc 0))) (Minus (Num c))) - (Var (Suc 0))))) [Some (l1, u1), Some (l2, u2), vs!x]" + and ate: "Some (l2, u2) = approx_tse prec x s c (Suc k) (DERIV_floatarith x f) vs" + and final: "Some (l, u) = approx prec + (Add (Var 0) + (Mult (Inverse (Num (Float (int k) 0))) + (Mult (Add (Var (Suc (Suc 0))) (Minus (Num c))) + (Var (Suc 0))))) [Some (l1, u1), Some (l2, u2), vs!x]" by (auto elim!: lift_bin) blast from bnd_c `x < length xs` @@ -2966,9 +2994,11 @@ (is "?f 0 (real c) \ _") by auto - { fix f :: "'a \ 'a" fix n :: nat fix x :: 'a + { + fix f :: "'a \ 'a" fix n :: nat fix x :: 'a have "(f ^^ Suc n) x = (f ^^ n) (f x)" - by (induct n, auto) } + by (induct n) auto + } note funpow_Suc = this[symmetric] from Suc.hyps[OF ate, unfolded this] obtain n @@ -2978,7 +3008,8 @@ (is "\ t \ _. ?X (Suc k) f n t \ _") by blast - { fix m and z::real + { + fix m and z::real assume "m < Suc n" and bnd_z: "z \ { lx .. ux }" have "DERIV (?f m) z :> ?f (Suc m) z" proof (cases m) @@ -2990,7 +3021,8 @@ hence "m' < n" using `m < Suc n` by auto from DERIV_hyp[OF this bnd_z] show ?thesis using Suc by simp - qed } note DERIV = this + qed + } note DERIV = this have "\ k i. k < i \ {k ..< i} = insert k {Suc k ..< i}" by auto hence setprod_head_Suc: "\ k i. \ {k ..< k + Suc i} = k * \ {Suc k ..< Suc k + i}" by auto @@ -2999,7 +3031,8 @@ unfolding setsum_head_upt_Suc[OF zero_less_Suc] .. def C \ "xs!x - c" - { fix t::real assume t: "t \ {lx .. ux}" + { + fix t::real assume t: "t \ {lx .. ux}" hence "bounded_by [xs!x] [vs!x]" using `bounded_by xs vs`[THEN bounded_byE, OF `x < length vs`] by (cases "vs!x", auto simp add: bounded_by_def) @@ -3016,24 +3049,28 @@ unfolding funpow_Suc C_def[symmetric] setsum_move0 setprod_head_Suc by (auto simp add: algebra_simps) (simp only: mult_left_commute [of _ "inverse (real k)"] setsum_right_distrib [symmetric]) - finally have "?T \ {l .. u}" . } + finally have "?T \ {l .. u}" . + } thus ?thesis using DERIV by blast qed qed lemma setprod_fact: "\ {1..<1 + k} = fact (k :: nat)" proof (induct k) + case 0 + show ?case by simp +next case (Suc k) have "{ 1 ..< Suc (Suc k) } = insert (Suc k) { 1 ..< Suc k }" by auto hence "\ { 1 ..< Suc (Suc k) } = (Suc k) * \ { 1 ..< Suc k }" by auto thus ?case using Suc by auto -qed simp +qed lemma approx_tse: assumes "bounded_by xs vs" - and bnd_x: "vs ! x = Some (lx, ux)" and bnd_c: "real c \ {lx .. ux}" - and "x < length vs" and "x < length xs" - and ate: "Some (l, u) = approx_tse prec x s c 1 f vs" + and bnd_x: "vs ! x = Some (lx, ux)" and bnd_c: "real c \ {lx .. ux}" + and "x < length vs" and "x < length xs" + and ate: "Some (l, u) = approx_tse prec x s c 1 f vs" shows "interpret_floatarith f xs \ { l .. u }" proof - def F \ "\ n z. interpret_floatarith ((DERIV_floatarith x ^^ n) f) (xs[x := z])" @@ -3247,10 +3284,18 @@ case (Assign x a f') with assms show ?thesis by (auto elim!: option_caseE simp add: f_def approx_tse_form_def) qed } thus ?thesis unfolding f_def by auto -next case Assign with assms show ?thesis by (auto simp add: approx_tse_form_def) -next case LessEqual with assms show ?thesis by (auto simp add: approx_tse_form_def) -next case Less with assms show ?thesis by (auto simp add: approx_tse_form_def) -next case AtLeastAtMost with assms show ?thesis by (auto simp add: approx_tse_form_def) +next + case Assign + with assms show ?thesis by (auto simp add: approx_tse_form_def) +next + case LessEqual + with assms show ?thesis by (auto simp add: approx_tse_form_def) +next + case Less + with assms show ?thesis by (auto simp add: approx_tse_form_def) +next + case AtLeastAtMost + with assms show ?thesis by (auto simp add: approx_tse_form_def) qed text {* @{term approx_form_eval} is only used for the {\tt value}-command. *}