equal
deleted
inserted
replaced
8 imports |
8 imports |
9 Lebesgue_Measure Tagged_Division |
9 Lebesgue_Measure Tagged_Division |
10 begin |
10 begin |
11 |
11 |
12 (* BEGIN MOVE *) |
12 (* BEGIN MOVE *) |
13 lemma swap_continuous: |
|
14 assumes "continuous_on (cbox (a,c) (b,d)) (\<lambda>(x,y). f x y)" |
|
15 shows "continuous_on (cbox (c,a) (d,b)) (\<lambda>(x, y). f y x)" |
|
16 proof - |
|
17 have "(\<lambda>(x, y). f y x) = (\<lambda>(x, y). f x y) \<circ> prod.swap" |
|
18 by auto |
|
19 then show ?thesis |
|
20 apply (rule ssubst) |
|
21 apply (rule continuous_on_compose) |
|
22 apply (simp add: split_def) |
|
23 apply (rule continuous_intros | simp add: assms)+ |
|
24 done |
|
25 qed |
|
26 |
|
27 |
|
28 lemma norm_minus2: "norm (x1-x2, y1-y2) = norm (x2-x1, y2-y1)" |
13 lemma norm_minus2: "norm (x1-x2, y1-y2) = norm (x2-x1, y2-y1)" |
29 by (simp add: norm_minus_eqI) |
14 by (simp add: norm_minus_eqI) |
30 |
15 |
31 lemma norm_diff2: "\<lbrakk>y = y1 + y2; x = x1 + x2; e = e1 + e2; norm(y1 - x1) \<le> e1; norm(y2 - x2) \<le> e2\<rbrakk> |
16 lemma norm_diff2: "\<lbrakk>y = y1 + y2; x = x1 + x2; e = e1 + e2; norm(y1 - x1) \<le> e1; norm(y2 - x2) \<le> e2\<rbrakk> |
32 \<Longrightarrow> norm(y - x) \<le> e" |
17 \<Longrightarrow> norm(y - x) \<le> e" |
42 lemma Sigma_Int_Paircomp1: "(Sigma A B) \<inter> {(x, y). P x} = Sigma (A \<inter> {x. P x}) B" |
27 lemma Sigma_Int_Paircomp1: "(Sigma A B) \<inter> {(x, y). P x} = Sigma (A \<inter> {x. P x}) B" |
43 by blast |
28 by blast |
44 |
29 |
45 lemma Sigma_Int_Paircomp2: "(Sigma A B) \<inter> {(x, y). P y} = Sigma A (\<lambda>z. B z \<inter> {y. P y})" |
30 lemma Sigma_Int_Paircomp2: "(Sigma A B) \<inter> {(x, y). P y} = Sigma A (\<lambda>z. B z \<inter> {y. P y})" |
46 by blast |
31 by blast |
47 |
|
48 lemma empty_as_interval: "{} = cbox One (0::'a::euclidean_space)" |
|
49 using nonempty_Basis |
|
50 by (fastforce simp add: set_eq_iff mem_box) |
|
51 (* END MOVE *) |
32 (* END MOVE *) |
52 |
33 |
53 subsection \<open>Content (length, area, volume...) of an interval.\<close> |
34 subsection \<open>Content (length, area, volume...) of an interval.\<close> |
54 |
35 |
55 abbreviation content :: "'a::euclidean_space set \<Rightarrow> real" |
36 abbreviation content :: "'a::euclidean_space set \<Rightarrow> real" |
6189 using k by (auto simp add: field_simps) |
6170 using k by (auto simp add: field_simps) |
6190 show ?case |
6171 show ?case |
6191 apply (rule le_less_trans[of _ "sum (\<lambda>x. k / (real (card r) + 1)) r"]) |
6172 apply (rule le_less_trans[of _ "sum (\<lambda>x. k / (real (card r) + 1)) r"]) |
6192 unfolding sum_subtractf[symmetric] |
6173 unfolding sum_subtractf[symmetric] |
6193 apply (rule sum_norm_le) |
6174 apply (rule sum_norm_le) |
6194 apply rule |
|
6195 apply (drule qq) |
6175 apply (drule qq) |
6196 defer |
6176 defer |
6197 unfolding divide_inverse sum_distrib_right[symmetric] |
6177 unfolding divide_inverse sum_distrib_right[symmetric] |
6198 unfolding divide_inverse[symmetric] |
6178 unfolding divide_inverse[symmetric] |
6199 using * apply (auto simp add: field_simps) |
6179 using * apply (auto simp add: field_simps) |
6534 proof - |
6514 proof - |
6535 show "norm (\<Sum>j = 0..s. \<Sum>(x, k)\<in>{xk \<in> p. |
6515 show "norm (\<Sum>j = 0..s. \<Sum>(x, k)\<in>{xk \<in> p. |
6536 m (fst xk) = j}. content k *\<^sub>R f (m x) x - integral k (f (m x))) < e / 2" |
6516 m (fst xk) = j}. content k *\<^sub>R f (m x) x - integral k (f (m x))) < e / 2" |
6537 apply (rule le_less_trans[of _ "sum (\<lambda>i. e / 2^(i+2)) {0..s}"]) |
6517 apply (rule le_less_trans[of _ "sum (\<lambda>i. e / 2^(i+2)) {0..s}"]) |
6538 apply (rule sum_norm_le) |
6518 apply (rule sum_norm_le) |
6539 proof |
6519 proof - |
6540 show "(\<Sum>i = 0..s. e / 2 ^ (i + 2)) < e / 2" |
6520 show "(\<Sum>i = 0..s. e / 2 ^ (i + 2)) < e / 2" |
6541 unfolding power_add divide_inverse inverse_mult_distrib |
6521 unfolding power_add divide_inverse inverse_mult_distrib |
6542 unfolding sum_distrib_left[symmetric] sum_distrib_right[symmetric] |
6522 unfolding sum_distrib_left[symmetric] sum_distrib_right[symmetric] |
6543 unfolding power_inverse [symmetric] sum_gp |
6523 unfolding power_inverse [symmetric] sum_gp |
6544 apply(rule mult_strict_left_mono[OF _ e]) |
6524 apply(rule mult_strict_left_mono[OF _ e]) |