equal
deleted
inserted
replaced
541 then have "dist (f' x ((y - x) /\<^sub>R r)) ((f y - f x) /\<^sub>R r) = norm (f' x (y - x) /\<^sub>R r - (f y - f x) /\<^sub>R r)" |
541 then have "dist (f' x ((y - x) /\<^sub>R r)) ((f y - f x) /\<^sub>R r) = norm (f' x (y - x) /\<^sub>R r - (f y - f x) /\<^sub>R r)" |
542 by (simp add: dist_norm) |
542 by (simp add: dist_norm) |
543 also have "\<dots> = norm (f' x (y - x) - (f y - f x)) / r" |
543 also have "\<dots> = norm (f' x (y - x) - (f y - f x)) / r" |
544 using \<open>r > 0\<close> by (simp add: divide_simps scale_right_diff_distrib [symmetric]) |
544 using \<open>r > 0\<close> by (simp add: divide_simps scale_right_diff_distrib [symmetric]) |
545 also have "\<dots> \<le> norm (f y - (f x + f' x (y - x))) / norm (y - x)" |
545 also have "\<dots> \<le> norm (f y - (f x + f' x (y - x))) / norm (y - x)" |
546 using that \<open>r > 0\<close> False by (simp add: algebra_simps field_split_simps dist_norm norm_minus_commute mult_right_mono) |
546 using that \<open>r > 0\<close> False by (simp add: field_split_simps dist_norm norm_minus_commute mult_right_mono) |
547 also have "\<dots> < k" |
547 also have "\<dots> < k" |
548 using that \<open>0 < \<zeta>\<close> by (simp add: dist_commute r_def \<zeta> [OF \<open>y \<in> S\<close> False]) |
548 using that \<open>0 < \<zeta>\<close> by (simp add: dist_commute r_def \<zeta> [OF \<open>y \<in> S\<close> False]) |
549 finally show "dist (f' x ((y - x) /\<^sub>R r)) ((f y - f x) /\<^sub>R r) < k" . |
549 finally show "dist (f' x ((y - x) /\<^sub>R r)) ((f y - f x) /\<^sub>R r) < k" . |
550 show "(y - x) /\<^sub>R r \<in> ball 0 1" |
550 show "(y - x) /\<^sub>R r \<in> ball 0 1" |
551 using that \<open>r > 0\<close> by (simp add: dist_norm divide_simps norm_minus_commute) |
551 using that \<open>r > 0\<close> by (simp add: dist_norm divide_simps norm_minus_commute) |
1654 have "(matrix (f' x) - B) *v w = 0" for w |
1654 have "(matrix (f' x) - B) *v w = 0" for w |
1655 proof (rule lemma_partial_derivatives [of "(*v) (matrix (f' x) - B)"]) |
1655 proof (rule lemma_partial_derivatives [of "(*v) (matrix (f' x) - B)"]) |
1656 show "linear ((*v) (matrix (f' x) - B))" |
1656 show "linear ((*v) (matrix (f' x) - B))" |
1657 by (rule matrix_vector_mul_linear) |
1657 by (rule matrix_vector_mul_linear) |
1658 have "((\<lambda>y. ((f x + f' x (y - x)) - f y) /\<^sub>R norm (y - x)) \<longlongrightarrow> 0) (at x within S)" |
1658 have "((\<lambda>y. ((f x + f' x (y - x)) - f y) /\<^sub>R norm (y - x)) \<longlongrightarrow> 0) (at x within S)" |
1659 using tendsto_minus [OF lim_df] by (simp add: algebra_simps field_split_simps) |
1659 using tendsto_minus [OF lim_df] by (simp add: field_split_simps) |
1660 then show "((\<lambda>y. (matrix (f' x) - B) *v (y - x) /\<^sub>R norm (y - x)) \<longlongrightarrow> 0) (at x within S)" |
1660 then show "((\<lambda>y. (matrix (f' x) - B) *v (y - x) /\<^sub>R norm (y - x)) \<longlongrightarrow> 0) (at x within S)" |
1661 proof (rule Lim_transform) |
1661 proof (rule Lim_transform) |
1662 have "((\<lambda>y. ((f y + B *v x - (f x + B *v y)) /\<^sub>R norm (y - x))) \<longlongrightarrow> 0) (at x within S)" |
1662 have "((\<lambda>y. ((f y + B *v x - (f x + B *v y)) /\<^sub>R norm (y - x))) \<longlongrightarrow> 0) (at x within S)" |
1663 proof (clarsimp simp add: Lim_within dist_norm) |
1663 proof (clarsimp simp add: Lim_within dist_norm) |
1664 fix e :: "real" |
1664 fix e :: "real" |
1722 qed |
1722 qed |
1723 qed |
1723 qed |
1724 then show "((\<lambda>y. (matrix (f' x) - B) *v (y - x) /\<^sub>R |
1724 then show "((\<lambda>y. (matrix (f' x) - B) *v (y - x) /\<^sub>R |
1725 norm (y - x) - (f x + f' x (y - x) - f y) /\<^sub>R norm (y - x)) \<longlongrightarrow> 0) |
1725 norm (y - x) - (f x + f' x (y - x) - f y) /\<^sub>R norm (y - x)) \<longlongrightarrow> 0) |
1726 (at x within S)" |
1726 (at x within S)" |
1727 by (simp add: algebra_simps diff lin_df matrix_vector_mul_linear scalar_mult_eq_scaleR) |
1727 by (simp add: algebra_simps diff lin_df scalar_mult_eq_scaleR) |
1728 qed |
1728 qed |
1729 qed (use x in \<open>simp; auto simp: not_less\<close>) |
1729 qed (use x in \<open>simp; auto simp: not_less\<close>) |
1730 ultimately have "f' x = (*v) B" |
1730 ultimately have "f' x = (*v) B" |
1731 by (force simp: algebra_simps scalar_mult_eq_scaleR) |
1731 by (force simp: algebra_simps scalar_mult_eq_scaleR) |
1732 show "matrix (f' x) $ m $ n \<le> b" |
1732 show "matrix (f' x) $ m $ n \<le> b" |
2166 with subT show "f ` (K \<inter> S) \<subseteq> T" by blast |
2166 with subT show "f ` (K \<inter> S) \<subseteq> T" by blast |
2167 show "?\<mu> T \<le> e / (2*c) ^ ?m * ?\<mu> K" |
2167 show "?\<mu> T \<le> e / (2*c) ^ ?m * ?\<mu> K" |
2168 proof (rule order_trans [OF measT]) |
2168 proof (rule order_trans [OF measT]) |
2169 have "?DVU = (d * 2 * (4 * B) ^ (?n - 1)) * norm (v - u)^?n" |
2169 have "?DVU = (d * 2 * (4 * B) ^ (?n - 1)) * norm (v - u)^?n" |
2170 using \<open>c > 0\<close> |
2170 using \<open>c > 0\<close> |
2171 apply (simp add: algebra_simps power_mult_distrib) |
2171 apply (simp add: algebra_simps) |
2172 by (metis Suc_pred power_Suc zero_less_card_finite) |
2172 by (metis Suc_pred power_Suc zero_less_card_finite) |
2173 also have "\<dots> \<le> (e / (2*c) ^ ?m / (?m ^ ?m)) * norm(v - u) ^ ?n" |
2173 also have "\<dots> \<le> (e / (2*c) ^ ?m / (?m ^ ?m)) * norm(v - u) ^ ?n" |
2174 by (rule mult_right_mono [OF d]) auto |
2174 by (rule mult_right_mono [OF d]) auto |
2175 also have "\<dots> \<le> e / (2*c) ^ ?m * ?\<mu> K" |
2175 also have "\<dots> \<le> e / (2*c) ^ ?m * ?\<mu> K" |
2176 proof - |
2176 proof - |
2237 by simp |
2237 by simp |
2238 also have "\<dots> \<le> (2 ^ ?m * c ^ ?m)" |
2238 also have "\<dots> \<le> (2 ^ ?m * c ^ ?m)" |
2239 using \<open>c > 0\<close> by (simp add: content_cbox_if_cart) |
2239 using \<open>c > 0\<close> by (simp add: content_cbox_if_cart) |
2240 finally have "sum ?\<mu> \<F> \<le> (2 ^ ?m * c ^ ?m)" . |
2240 finally have "sum ?\<mu> \<F> \<le> (2 ^ ?m * c ^ ?m)" . |
2241 then show ?thesis |
2241 then show ?thesis |
2242 using \<open>e > 0\<close> \<open>c > 0\<close> by (auto simp: field_split_simps mult_less_0_iff) |
2242 using \<open>e > 0\<close> \<open>c > 0\<close> by (auto simp: field_split_simps) |
2243 qed |
2243 qed |
2244 finally show ?thesis . |
2244 finally show ?thesis . |
2245 qed |
2245 qed |
2246 show "\<exists>T. f ` S \<subseteq> T \<and> T \<in> lmeasurable \<and> ?\<mu> T \<le> e" |
2246 show "\<exists>T. f ` S \<subseteq> T \<and> T \<in> lmeasurable \<and> ?\<mu> T \<le> e" |
2247 proof (intro exI conjI) |
2247 proof (intro exI conjI) |
2382 apply (rule measure_differentiable_image [OF h_lmeas _ int_det]) |
2382 apply (rule measure_differentiable_image [OF h_lmeas _ int_det]) |
2383 apply (blast intro: has_derivative_within_subset [OF der_g]) |
2383 apply (blast intro: has_derivative_within_subset [OF der_g]) |
2384 done |
2384 done |
2385 ultimately show ?thesis |
2385 ultimately show ?thesis |
2386 using \<open>y > 0\<close> integral_restrict_Int [of S "{t. h n (g t) = y}" "\<lambda>t. \<bar>det (matrix (g' t))\<bar> * y"] |
2386 using \<open>y > 0\<close> integral_restrict_Int [of S "{t. h n (g t) = y}" "\<lambda>t. \<bar>det (matrix (g' t))\<bar> * y"] |
2387 apply (simp add: integrable_on_indicator integrable_on_cmult_iff integral_indicator) |
2387 apply (simp add: integrable_on_indicator integral_indicator) |
2388 apply (simp add: indicator_def if_distrib cong: if_cong) |
2388 apply (simp add: indicator_def if_distrib cong: if_cong) |
2389 done |
2389 done |
2390 qed |
2390 qed |
2391 have hn_int: "h n integrable_on g ` S" |
2391 have hn_int: "h n integrable_on g ` S" |
2392 apply (subst hn_eq) |
2392 apply (subst hn_eq) |