# HG changeset patch # User paulson # Date 1434484200 -3600 # Node ID db0f4f4c17c732cbf43bbc7fcd09b997a0a60ea2 # Parent 2803bc16742c43cf34592ca380ecd7293e3963f8 another messy proof fixed diff -r 2803bc16742c -r db0f4f4c17c7 src/HOL/Multivariate_Analysis/Integration.thy --- a/src/HOL/Multivariate_Analysis/Integration.thy Mon Jun 15 23:56:40 2015 +0200 +++ b/src/HOL/Multivariate_Analysis/Integration.thy Tue Jun 16 20:50:00 2015 +0100 @@ -4578,7 +4578,8 @@ fixes a :: "'a::euclidean_space" assumes "p division_of (cbox a b)" and k: "k \ Basis" - shows "{l \ {x. abs(x\k - c) \ e} |l. l \ p \ l \ {x. abs(x\k - c) \ e} \ {}} division_of (cbox a b \ {x. abs(x\k - c) \ e})" + shows "{l \ {x. abs(x\k - c) \ e} |l. l \ p \ l \ {x. abs(x\k - c) \ e} \ {}} + division_of (cbox a b \ {x. abs(x\k - c) \ e})" proof - have *: "\x c. abs (x - c) \ e \ x \ c - e \ x \ c + e" by auto @@ -4588,18 +4589,11 @@ note division_split(2)[OF this, where c="c-e" and k=k,OF k] then show ?thesis apply (rule **) + unfolding interval_doublesplit [OF k] using k - apply - - unfolding interval_doublesplit - unfolding * - unfolding interval_split interval_doublesplit - apply (rule set_eqI) - unfolding mem_Collect_eq - apply rule - apply (erule conjE exE)+ - apply (rule_tac x=la in exI) - defer - apply (erule conjE exE)+ + apply (simp_all add: * interval_split) + apply (rule equalityI, blast) + apply clarsimp apply (rule_tac x="l \ {x. c + e \ x \ k}" in exI) apply auto done @@ -4612,16 +4606,14 @@ obtains d where "0 < d" and "content (cbox a b \ {x. abs(x\k - c) \ d}) < e" proof (cases "content (cbox a b) = 0") case True + then have ce: "content (cbox a b) < e" + by (metis `0 < e`) show ?thesis apply (rule that[of 1]) - defer + apply simp unfolding interval_doublesplit[OF k] - apply (rule le_less_trans[OF content_subset]) - defer - apply (subst True) - unfolding interval_doublesplit[symmetric,OF k] - using assms - apply auto + apply (rule le_less_trans[OF content_subset ce]) + apply (auto simp: interval_doublesplit[symmetric] k) done next case False @@ -4630,47 +4622,15 @@ then have "\x. x \ Basis \ b\x > a\x" by (auto simp add:not_le) then have prod0: "0 < setprod (\i. b\i - a\i) (Basis - {k})" - apply - - apply (rule setprod_pos) - apply (auto simp add: field_simps) - done + by (force simp add: setprod_pos field_simps) then have "d > 0" - unfolding d_def using assms - by (auto simp add:field_simps) + by (auto simp add: d_def field_simps) then show ?thesis proof (rule that[of d]) have *: "Basis = insert k (Basis - {k})" using k by auto - have **: "cbox a b \ {x. \x \ k - c\ \ d} \ {} \ - (\i\Basis - {k}. interval_upperbound (cbox a b \ {x. \x \ k - c\ \ d}) \ i - - interval_lowerbound (cbox a b \ {x. \x \ k - c\ \ d}) \ i) = - (\i\Basis - {k}. b\i - a\i)" - apply (rule setprod.cong) - apply (rule refl) - unfolding interval_doublesplit[OF k] - apply (subst interval_bounds) - defer - apply (subst interval_bounds) - unfolding box_eq_empty not_ex not_less - apply auto - done - show "content (cbox a b \ {x. \x \ k - c\ \ d}) < e" - apply cases - unfolding content_def - apply (subst if_P) - apply assumption - apply (rule assms) - unfolding if_not_P - apply (subst *) - apply (subst setprod.insert) - unfolding ** - unfolding interval_doublesplit[OF k] box_eq_empty not_ex not_less - prefer 3 - apply (subst interval_bounds) - defer - apply (subst interval_bounds) - apply (simp_all only: k inner_setsum_left_Basis simp_thms if_P cong: bex_cong ball_cong) + have less_e: "(min (b \ k) (c + d) - max (a \ k) (c - d)) * (\i\Basis - {k}. b \ i - a \ i) < e" proof - have "(min (b \ k) (c + d) - max (a \ k) (c - d)) \ 2 * d" by auto @@ -4680,7 +4640,27 @@ by (auto simp add: field_simps) finally show "(min (b \ k) (c + d) - max (a \ k) (c - d)) * (\i\Basis - {k}. b \ i - a \ i) < e" unfolding pos_less_divide_eq[OF prod0] . - qed auto + qed + show "content (cbox a b \ {x. \x \ k - c\ \ d}) < e" + proof (cases "cbox a b \ {x. \x \ k - c\ \ d} = {}") + case True + then show ?thesis + using assms by simp + next + case False + then have + "(\i\Basis - {k}. interval_upperbound (cbox a b \ {x. \x \ k - c\ \ d}) \ i - + interval_lowerbound (cbox a b \ {x. \x \ k - c\ \ d}) \ i) + = (\i\Basis - {k}. b\i - a\i)" + by (simp add: box_eq_empty interval_doublesplit[OF k]) + then show "content (cbox a b \ {x. \x \ k - c\ \ d}) < e" + unfolding content_def + using assms False + apply (subst *) + apply (subst setprod.insert) + apply (simp_all add: interval_doublesplit[OF k] box_eq_empty not_less less_e) + done + qed qed qed @@ -4689,8 +4669,7 @@ assumes k: "k \ Basis" shows "negligible {x. x\k = c}" unfolding negligible_def has_integral - apply (rule, rule, rule, rule) -proof - +proof clarify case goal1 from content_doublesplit[OF this k,of a b c] guess d . note d=this let ?i = "indicator {x::'a. x\k = c} :: 'a\real"