# HG changeset patch # User Manuel Eberl # Date 1575292923 -3600 # Node ID a8ccea88b7250a9b4624a8ea9e892448f1ce3c02 # Parent 6695aeae8ec99ca36776a4b1b4ea3ba56c2f028b Flattened dependency tree of HOL-Analysis diff -r 6695aeae8ec9 -r a8ccea88b725 src/HOL/Analysis/Change_Of_Vars.thy --- a/src/HOL/Analysis/Change_Of_Vars.thy Mon Dec 02 10:31:51 2019 +0100 +++ b/src/HOL/Analysis/Change_Of_Vars.thy Mon Dec 02 14:22:03 2019 +0100 @@ -504,11 +504,12 @@ have neg: "negligible (frontier (f' x ` ball 0 1))" using deriv has_derivative_linear \x \ S\ by (auto intro!: negligible_convex_frontier [OF convex_linear_image]) - have 0: "0 < e * unit_ball_vol (real CARD('n))" - using \e > 0\ by simp + let ?unit_vol = "content (ball (0 :: real ^ 'n :: {finite, wellorder}) 1)" + have 0: "0 < e * ?unit_vol" + using \e > 0\ by (simp add: content_ball_pos) obtain k where "k > 0" and k: "\U. \U \ lmeasurable; \y. y \ U \ \z. z \ f' x ` ball 0 1 \ dist z y < k\ - \ ?\ U < ?\ (f' x ` ball 0 1) + e * unit_ball_vol (CARD('n))" + \ ?\ U < ?\ (f' x ` ball 0 1) + e * ?unit_vol" using measure_semicontinuous_with_hausdist_explicit [OF bo neg 0] by blast obtain l where "l > 0" and l: "ball x l \ T" using \x \ S\ \open T\ \S \ T\ openE by blast @@ -577,17 +578,18 @@ have "?\ (f ` (S \ ball x r)) = ?\ (?rfs) * r ^ CARD('n)" using \r > 0\ fsb by (simp add: measure_linear_image measure_translation_subtract measurable_translation_subtract field_simps cong: image_cong_simp) - also have "\ \ (\det (matrix (f' x))\ * unit_ball_vol (CARD('n)) + e * unit_ball_vol (CARD('n))) * r ^ CARD('n)" + also have "\ \ (\det (matrix (f' x))\ * ?unit_vol + e * ?unit_vol) * r ^ CARD('n)" proof - - have "?\ (?rfs) < ?\ (f' x ` ball 0 1) + e * unit_ball_vol (CARD('n))" + have "?\ (?rfs) < ?\ (f' x ` ball 0 1) + e * ?unit_vol" using rfs_mble by (force intro: k dest!: ex_lessK) - then have "?\ (?rfs) < \det (matrix (f' x))\ * unit_ball_vol (CARD('n)) + e * unit_ball_vol (CARD('n))" - by (simp add: lin measure_linear_image [of "f' x"] content_ball) + then have "?\ (?rfs) < \det (matrix (f' x))\ * ?unit_vol + e * ?unit_vol" + by (simp add: lin measure_linear_image [of "f' x"]) with \r > 0\ show ?thesis by auto qed also have "\ \ (B + e) * ?\ (ball x r)" - using bounded [OF \x \ S\] \r > 0\ by (simp add: content_ball algebra_simps) + using bounded [OF \x \ S\] \r > 0\ + by (simp add: algebra_simps content_ball_conv_unit_ball[of r] content_ball_pos) finally show "?\ (f ` (S \ ball x r)) \ (B + e) * ?\ (ball x r)" . qed qed @@ -1453,9 +1455,11 @@ by (simp add: abs_diff_le_iff abs_minus_commute) qed (use \e > 0\ in auto) also have "\ < e * content (cball ?x' (min d r))" - using \r > 0\ \d > 0\ \e > 0\ by auto + using \r > 0\ \d > 0\ \e > 0\ by (auto intro: content_cball_pos) also have "\ = e * content (ball x (min d r))" - using \r > 0\ \d > 0\ by (simp add: content_cball content_ball) + using \r > 0\ \d > 0\ content_ball_conv_unit_ball[of "min d r" "inv T x"] + content_ball_conv_unit_ball[of "min d r" x] + by (simp add: content_cball_conv_ball) finally show "measure lebesgue ?W < e * content (ball x (min d r))" . qed qed diff -r 6695aeae8ec9 -r a8ccea88b725 src/HOL/Analysis/Elementary_Metric_Spaces.thy --- a/src/HOL/Analysis/Elementary_Metric_Spaces.thy Mon Dec 02 10:31:51 2019 +0100 +++ b/src/HOL/Analysis/Elementary_Metric_Spaces.thy Mon Dec 02 14:22:03 2019 +0100 @@ -230,6 +230,61 @@ lemma cball_divide_subset_numeral: "cball x (e / numeral w) \ cball x e" using cball_divide_subset one_le_numeral by blast +lemma cball_scale: + assumes "a \ 0" + shows "(\x. a *\<^sub>R x) ` cball c r = cball (a *\<^sub>R c :: 'a :: real_normed_vector) (\a\ * r)" +proof - + have 1: "(\x. a *\<^sub>R x) ` cball c r \ cball (a *\<^sub>R c) (\a\ * r)" if "a \ 0" for a r and c :: 'a + proof safe + fix x + assume x: "x \ cball c r" + have "dist (a *\<^sub>R c) (a *\<^sub>R x) = norm (a *\<^sub>R c - a *\<^sub>R x)" + by (auto simp: dist_norm) + also have "a *\<^sub>R c - a *\<^sub>R x = a *\<^sub>R (c - x)" + by (simp add: algebra_simps) + finally show "a *\<^sub>R x \ cball (a *\<^sub>R c) (\a\ * r)" + using that x by (auto simp: dist_norm) + qed + + have "cball (a *\<^sub>R c) (\a\ * r) = (\x. a *\<^sub>R x) ` (\x. inverse a *\<^sub>R x) ` cball (a *\<^sub>R c) (\a\ * r)" + unfolding image_image using assms by simp + also have "\ \ (\x. a *\<^sub>R x) ` cball (inverse a *\<^sub>R (a *\<^sub>R c)) (\inverse a\ * (\a\ * r))" + using assms by (intro image_mono 1) auto + also have "\ = (\x. a *\<^sub>R x) ` cball c r" + using assms by (simp add: algebra_simps) + finally have "cball (a *\<^sub>R c) (\a\ * r) \ (\x. a *\<^sub>R x) ` cball c r" . + moreover from assms have "(\x. a *\<^sub>R x) ` cball c r \ cball (a *\<^sub>R c) (\a\ * r)" + by (intro 1) auto + ultimately show ?thesis by blast +qed + +lemma ball_scale: + assumes "a \ 0" + shows "(\x. a *\<^sub>R x) ` ball c r = ball (a *\<^sub>R c :: 'a :: real_normed_vector) (\a\ * r)" +proof - + have 1: "(\x. a *\<^sub>R x) ` ball c r \ ball (a *\<^sub>R c) (\a\ * r)" if "a \ 0" for a r and c :: 'a + proof safe + fix x + assume x: "x \ ball c r" + have "dist (a *\<^sub>R c) (a *\<^sub>R x) = norm (a *\<^sub>R c - a *\<^sub>R x)" + by (auto simp: dist_norm) + also have "a *\<^sub>R c - a *\<^sub>R x = a *\<^sub>R (c - x)" + by (simp add: algebra_simps) + finally show "a *\<^sub>R x \ ball (a *\<^sub>R c) (\a\ * r)" + using that x by (auto simp: dist_norm) + qed + + have "ball (a *\<^sub>R c) (\a\ * r) = (\x. a *\<^sub>R x) ` (\x. inverse a *\<^sub>R x) ` ball (a *\<^sub>R c) (\a\ * r)" + unfolding image_image using assms by simp + also have "\ \ (\x. a *\<^sub>R x) ` ball (inverse a *\<^sub>R (a *\<^sub>R c)) (\inverse a\ * (\a\ * r))" + using assms by (intro image_mono 1) auto + also have "\ = (\x. a *\<^sub>R x) ` ball c r" + using assms by (simp add: algebra_simps) + finally have "ball (a *\<^sub>R c) (\a\ * r) \ (\x. a *\<^sub>R x) ` ball c r" . + moreover from assms have "(\x. a *\<^sub>R x) ` ball c r \ ball (a *\<^sub>R c) (\a\ * r)" + by (intro 1) auto + ultimately show ?thesis by blast +qed subsection \Limit Points\ diff -r 6695aeae8ec9 -r a8ccea88b725 src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy --- a/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Mon Dec 02 10:31:51 2019 +0100 +++ b/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Mon Dec 02 14:22:03 2019 +0100 @@ -1561,6 +1561,15 @@ lemma measurable_convex: "\convex S; bounded S\ \ S \ lmeasurable" by (simp add: measurable_Jordan negligible_convex_frontier) +lemma content_cball_conv_ball: "content (cball c r) = content (ball c r)" +proof - + have "ball c r - cball c r \ (cball c r - ball c r) = sphere c r" + by auto + hence "measure lebesgue (cball c r) = measure lebesgue (ball c r)" + using negligible_sphere[of c r] by (intro measure_negligible_symdiff) simp_all + thus ?thesis by simp +qed + subsection\Negligibility of image under non-injective linear map\ lemma negligible_Union_nat: @@ -2902,6 +2911,41 @@ subsection\Transformation of measure by linear maps\ +lemma emeasure_lebesgue_ball_conv_unit_ball: + fixes c :: "'a :: euclidean_space" + assumes "r \ 0" + shows "emeasure lebesgue (ball c r) = + ennreal (r ^ DIM('a)) * emeasure lebesgue (ball (0 :: 'a) 1)" +proof (cases "r = 0") + case False + with assms have r: "r > 0" by auto + have "emeasure lebesgue ((\x. c + x) ` (\x. r *\<^sub>R x) ` ball (0 :: 'a) 1) = + r ^ DIM('a) * emeasure lebesgue (ball (0 :: 'a) 1)" + unfolding image_image using emeasure_lebesgue_affine[of r c "ball 0 1"] assms + by (simp add: add_ac) + also have "(\x. r *\<^sub>R x) ` ball 0 1 = ball (0 :: 'a) r" + using r by (subst ball_scale) auto + also have "(\x. c + x) ` \ = ball c r" + by (subst image_add_ball) (simp_all add: algebra_simps) + finally show ?thesis by simp +qed auto + +lemma content_ball_conv_unit_ball: + fixes c :: "'a :: euclidean_space" + assumes "r \ 0" + shows "content (ball c r) = r ^ DIM('a) * content (ball (0 :: 'a) 1)" +proof - + have "ennreal (content (ball c r)) = emeasure lebesgue (ball c r)" + using emeasure_lborel_ball_finite[of c r] by (subst emeasure_eq_ennreal_measure) auto + also have "\ = ennreal (r ^ DIM('a)) * emeasure lebesgue (ball (0 :: 'a) 1)" + using assms by (intro emeasure_lebesgue_ball_conv_unit_ball) auto + also have "\ = ennreal (r ^ DIM('a) * content (ball (0::'a) 1))" + using emeasure_lborel_ball_finite[of "0::'a" 1] assms + by (subst emeasure_eq_ennreal_measure) (auto simp: ennreal_mult') + finally show ?thesis + using assms by (subst (asm) ennreal_inj) auto +qed + lemma measurable_linear_image_interval: "linear f \ f ` (cbox a b) \ lmeasurable" by (metis bounded_linear_image linear_linear bounded_cbox closure_bounded_linear_image closure_cbox compact_closure lmeasurable_compact) diff -r 6695aeae8ec9 -r a8ccea88b725 src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Mon Dec 02 10:31:51 2019 +0100 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Mon Dec 02 14:22:03 2019 +0100 @@ -128,6 +128,44 @@ using emeasure_mono[of s "cbox a b" lborel] by (auto simp: measure_def enn2real_eq_0_iff emeasure_lborel_cbox_eq) +lemma content_ball_pos: + assumes "r > 0" + shows "content (ball c r) > 0" +proof - + from rational_boxes[OF assms, of c] obtain a b where ab: "c \ box a b" "box a b \ ball c r" + by auto + from ab have "0 < content (box a b)" + by (subst measure_lborel_box_eq) (auto intro!: prod_pos simp: algebra_simps box_def) + have "emeasure lborel (box a b) \ emeasure lborel (ball c r)" + using ab by (intro emeasure_mono) auto + also have "emeasure lborel (box a b) = ennreal (content (box a b))" + using emeasure_lborel_box_finite[of a b] by (intro emeasure_eq_ennreal_measure) auto + also have "emeasure lborel (ball c r) = ennreal (content (ball c r))" + using emeasure_lborel_ball_finite[of c r] by (intro emeasure_eq_ennreal_measure) auto + finally show ?thesis + using \content (box a b) > 0\ by simp +qed + +lemma content_cball_pos: + assumes "r > 0" + shows "content (cball c r) > 0" +proof - + from rational_boxes[OF assms, of c] obtain a b where ab: "c \ box a b" "box a b \ ball c r" + by auto + from ab have "0 < content (box a b)" + by (subst measure_lborel_box_eq) (auto intro!: prod_pos simp: algebra_simps box_def) + have "emeasure lborel (box a b) \ emeasure lborel (ball c r)" + using ab by (intro emeasure_mono) auto + also have "\ \ emeasure lborel (cball c r)" + by (intro emeasure_mono) auto + also have "emeasure lborel (box a b) = ennreal (content (box a b))" + using emeasure_lborel_box_finite[of a b] by (intro emeasure_eq_ennreal_measure) auto + also have "emeasure lborel (cball c r) = ennreal (content (cball c r))" + using emeasure_lborel_cball_finite[of c r] by (intro emeasure_eq_ennreal_measure) auto + finally show ?thesis + using \content (box a b) > 0\ by simp +qed + lemma content_split: fixes a :: "'a::euclidean_space" assumes "k \ Basis" diff -r 6695aeae8ec9 -r a8ccea88b725 src/HOL/Analysis/Lebesgue_Measure.thy --- a/src/HOL/Analysis/Lebesgue_Measure.thy Mon Dec 02 10:31:51 2019 +0100 +++ b/src/HOL/Analysis/Lebesgue_Measure.thy Mon Dec 02 14:22:03 2019 +0100 @@ -823,6 +823,34 @@ using emeasure_lborel_cbox[of x x] nonempty_Basis by (auto simp del: emeasure_lborel_cbox nonempty_Basis) +lemma emeasure_lborel_cbox_finite: "emeasure lborel (cbox a b) < \" + by (auto simp: emeasure_lborel_cbox_eq) + +lemma emeasure_lborel_box_finite: "emeasure lborel (box a b) < \" + by (auto simp: emeasure_lborel_box_eq) + +lemma emeasure_lborel_ball_finite: "emeasure lborel (ball c r) < \" +proof - + have "bounded (ball c r)" by simp + from bounded_subset_cbox_symmetric[OF this] obtain a where a: "ball c r \ cbox (-a) a" + by auto + hence "emeasure lborel (ball c r) \ emeasure lborel (cbox (-a) a)" + by (intro emeasure_mono) auto + also have "\ < \" by (simp add: emeasure_lborel_cbox_eq) + finally show ?thesis . +qed + +lemma emeasure_lborel_cball_finite: "emeasure lborel (cball c r) < \" +proof - + have "bounded (cball c r)" by simp + from bounded_subset_cbox_symmetric[OF this] obtain a where a: "cball c r \ cbox (-a) a" + by auto + hence "emeasure lborel (cball c r) \ emeasure lborel (cbox (-a) a)" + by (intro emeasure_mono) auto + also have "\ < \" by (simp add: emeasure_lborel_cbox_eq) + finally show ?thesis . +qed + lemma fmeasurable_cbox [iff]: "cbox a b \ fmeasurable lborel" and fmeasurable_box [iff]: "box a b \ fmeasurable lborel" by (auto simp: fmeasurable_def emeasure_lborel_box_eq emeasure_lborel_cbox_eq) diff -r 6695aeae8ec9 -r a8ccea88b725 src/HOL/Analysis/Vitali_Covering_Theorem.thy --- a/src/HOL/Analysis/Vitali_Covering_Theorem.thy Mon Dec 02 10:31:51 2019 +0100 +++ b/src/HOL/Analysis/Vitali_Covering_Theorem.thy Mon Dec 02 14:22:03 2019 +0100 @@ -5,7 +5,7 @@ section \Vitali Covering Theorem and an Application to Negligibility\ theory Vitali_Covering_Theorem - imports Ball_Volume "HOL-Library.Permutations" + imports Equivalence_Lebesgue_Henstock_Integration "HOL-Library.Permutations" begin @@ -428,10 +428,10 @@ by (simp add: comm_monoid_add_class.sum.reindex [OF inj]) also have "\ = (\i\D2. 5 ^ DIM('n) * ?\ (ball (a i) (r i)))" proof (rule sum.cong [OF refl]) - fix i - assume "i \ D2" - show "?\ (ball (a i) (5 * r i)) = 5 ^ DIM('n) * ?\ (ball (a i) (r i))" - using rgt0 [OF \i \ D2\] by (simp add: content_ball) + fix i assume "i \ D2" + thus "?\ (ball (a i) (5 * r i)) = 5 ^ DIM('n) * ?\ (ball (a i) (r i))" + using content_ball_conv_unit_ball[of "5 * r i" "a i"] + content_ball_conv_unit_ball[of "r i" "a i"] rgt0[of i] by auto qed also have "\ = (\i\D2. ?\ (ball (a i) (r i))) * 5 ^ DIM('n)" by (simp add: sum_distrib_left mult.commute) @@ -450,7 +450,7 @@ have ds: "disjoint ((\i. cball (a i) (r i)) ` D2)" using D2 \D \ C\ by (auto intro: pairwiseI pairwiseD [OF pwC]) have "(\i\D2. ?\ (ball (a i) (r i))) = (\i\D2. ?\ (cball (a i) (r i)))" - using rgt0 by (simp add: content_ball content_cball less_eq_real_def) + by (simp add: content_cball_conv_ball) also have "\ = sum ?\ ((\i. cball (a i) (r i)) ` D2)" by (simp add: comm_monoid_add_class.sum.reindex [OF inj]) also have "\ = ?\ (\i\D2. cball (a i) (r i))" @@ -537,7 +537,8 @@ measure lebesgue U < e * measure lebesgue (ball x d)" apply (rule_tac x=e in exI) apply (rule_tac x="S \ ball x e" in exI) - apply (auto simp: negligible_imp_measurable negligible_Int negligible_imp_measure0 zero_less_measure_iff) + apply (auto simp: negligible_imp_measurable negligible_Int negligible_imp_measure0 zero_less_measure_iff + intro: mult_pos_pos content_ball_pos) done next assume R [rule_format]: "\x \ S. \e > 0. ?Q x e" @@ -567,7 +568,7 @@ let ?\ = "min (e / ?\ (ball z 1) / 2) (min (d / 2) k)" obtain r U where r: "r > 0" "r \ ?\" and U: "S \ ball x r \ U" "U \ lmeasurable" and mU: "?\ U < ?\ * ?\ (ball x r)" - using R [of x ?\] \d > 0\ \e > 0\ \k > 0\ x by auto + using R [of x ?\] \d > 0\ \e > 0\ \k > 0\ x by (auto simp: content_ball_pos) show "\i. i \ ?K \ x \ ball (fst i) (snd i) \ snd i < d" proof (rule exI [of _ "(x,r)"], simp, intro conjI exI) have "ball x r \ ball x k" @@ -576,7 +577,7 @@ using ball_subset_ball_iff k by auto finally show "ball x r \ ball z 1" . have "?\ * ?\ (ball x r) \ e * content (ball x r) / content (ball z 1)" - using r \e > 0\ by (simp add: ord_class.min_def field_split_simps) + using r \e > 0\ by (simp add: ord_class.min_def field_split_simps content_ball_pos) with mU show "?\ U < e * content (ball x r) / content (ball z 1)" by auto qed (use r U x in auto) @@ -603,7 +604,7 @@ apply (rule measure_mono_fmeasurable) using \I \ C\ \finite I\ Csub by (force simp: prod.case_eq_if sets.finite_UN)+ then have le1: "(?\ (\(x,d)\I. ball x d) / ?\ (ball z 1)) \ 1" - by simp + by (simp add: content_ball_pos) have "?\ (\i\I. U i) \ (\i\I. ?\ (U i))" using that U by (blast intro: measure_UNION_le) also have "\ \ (\(x,r)\I. e / ?\ (ball z 1) * ?\ (ball x r))" @@ -648,7 +649,7 @@ assume L [rule_format]: "\e>0. \d>0. d \ e \ ?Q x d e" and "r > 0" "e > 0" show "\d>0. d \ r \ ?Q x d e" using L [of "min r e"] apply (rule ex_forward) - using \r > 0\ \e > 0\ by (auto intro: less_le_trans elim!: ex_forward) + using \r > 0\ \e > 0\ by (auto intro: less_le_trans elim!: ex_forward simp: content_ball_pos) qed auto then show ?thesis by (force simp: negligible_eq_zero_density_alt)