author | paulson <lp15@cam.ac.uk> |
Sun, 27 Aug 2017 13:50:23 +0100 | |
changeset 66523 | 5a1a2ac950c2 |
parent 66519 | b757c1cc8868 |
child 66524 | 0d8dab1f6903 |
permissions | -rw-r--r-- |
53399 | 1 |
(* Author: John Harrison |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
2 |
Author: Robert Himmelmann, TU Muenchen (Translation from HOL light) |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
3 |
Huge cleanup by LCP |
53399 | 4 |
*) |
5 |
||
63594
bd218a9320b5
HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents:
63593
diff
changeset
|
6 |
section \<open>Henstock-Kurzweil gauge integration in many dimensions.\<close> |
bd218a9320b5
HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents:
63593
diff
changeset
|
7 |
|
bd218a9320b5
HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents:
63593
diff
changeset
|
8 |
theory Henstock_Kurzweil_Integration |
41413
64cd30d6b0b8
explicit file specifications -- avoid secondary load path;
wenzelm
parents:
40513
diff
changeset
|
9 |
imports |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
10 |
Lebesgue_Measure Tagged_Division |
35172 | 11 |
begin |
12 |
||
66193 | 13 |
(*FIXME DELETE*) |
14 |
lemma conjunctD2: assumes "a \<and> b" shows a b using assms by auto |
|
65036
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
15 |
(* try instead structured proofs below *) |
66504 | 16 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
17 |
lemma norm_diff2: "\<lbrakk>y = y1 + y2; x = x1 + x2; e = e1 + e2; norm(y1 - x1) \<le> e1; norm(y2 - x2) \<le> e2\<rbrakk> |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
18 |
\<Longrightarrow> norm(y-x) \<le> e" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
19 |
using norm_triangle_mono [of "y1 - x1" "e1" "y2 - x2" "e2"] |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
20 |
by (simp add: add_diff_add) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
21 |
|
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
22 |
lemma setcomp_dot1: "{z. P (z \<bullet> (i,0))} = {(x,y). P(x \<bullet> i)}" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
23 |
by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
24 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
25 |
lemma setcomp_dot2: "{z. P (z \<bullet> (0,i))} = {(x,y). P(y \<bullet> i)}" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
26 |
by auto |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
27 |
|
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
28 |
lemma Sigma_Int_Paircomp1: "(Sigma A B) \<inter> {(x, y). P x} = Sigma (A \<inter> {x. P x}) B" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
29 |
by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
30 |
|
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
31 |
lemma Sigma_Int_Paircomp2: "(Sigma A B) \<inter> {(x, y). P y} = Sigma A (\<lambda>z. B z \<inter> {y. P y})" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
32 |
by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
33 |
(* END MOVE *) |
59425 | 34 |
|
60420 | 35 |
subsection \<open>Content (length, area, volume...) of an interval.\<close> |
35172 | 36 |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
37 |
abbreviation content :: "'a::euclidean_space set \<Rightarrow> real" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
38 |
where "content s \<equiv> measure lborel s" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
39 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
40 |
lemma content_cbox_cases: |
64272 | 41 |
"content (cbox a b) = (if \<forall>i\<in>Basis. a\<bullet>i \<le> b\<bullet>i then prod (\<lambda>i. b\<bullet>i - a\<bullet>i) Basis else 0)" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
42 |
by (simp add: measure_lborel_cbox_eq inner_diff) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
43 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
44 |
lemma content_cbox: "\<forall>i\<in>Basis. a\<bullet>i \<le> b\<bullet>i \<Longrightarrow> content (cbox a b) = (\<Prod>i\<in>Basis. b\<bullet>i - a\<bullet>i)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
45 |
unfolding content_cbox_cases by simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
46 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
47 |
lemma content_cbox': "cbox a b \<noteq> {} \<Longrightarrow> content (cbox a b) = (\<Prod>i\<in>Basis. b\<bullet>i - a\<bullet>i)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
48 |
by (simp add: box_ne_empty inner_diff) |
49970 | 49 |
|
66296
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
50 |
lemma content_cbox_if: "content (cbox a b) = (if cbox a b = {} then 0 else \<Prod>i\<in>Basis. b\<bullet>i - a\<bullet>i)" |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
51 |
by (simp add: content_cbox') |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
52 |
|
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
53 |
lemma content_division_of: |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
54 |
assumes "K \<in> \<D>" "\<D> division_of S" |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
55 |
shows "content K = (\<Prod>i \<in> Basis. interval_upperbound K \<bullet> i - interval_lowerbound K \<bullet> i)" |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
56 |
proof - |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
57 |
obtain a b where "K = cbox a b" |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
58 |
using cbox_division_memE assms by metis |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
59 |
then show ?thesis |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
60 |
using assms by (force simp: division_of_def content_cbox') |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
61 |
qed |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
62 |
|
53408 | 63 |
lemma content_real: "a \<le> b \<Longrightarrow> content {a..b} = b - a" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
64 |
by simp |
56188 | 65 |
|
66402 | 66 |
lemma abs_eq_content: "\<bar>y - x\<bar> = (if x\<le>y then content {x..y} else content {y..x})" |
61204 | 67 |
by (auto simp: content_real) |
68 |
||
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
69 |
lemma content_singleton: "content {a} = 0" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
70 |
by simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
71 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
72 |
lemma content_unit[iff]: "content (cbox 0 (One::'a::euclidean_space)) = 1" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
73 |
by simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
74 |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
75 |
lemma content_pos_le [iff]: "0 \<le> content X" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
76 |
by simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
77 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
78 |
corollary content_nonneg [simp]: "~ content (cbox a b) < 0" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
79 |
using not_le by blast |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
80 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
81 |
lemma content_pos_lt: "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i \<Longrightarrow> 0 < content (cbox a b)" |
64272 | 82 |
by (auto simp: less_imp_le inner_diff box_eq_empty intro!: prod_pos) |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
83 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
84 |
lemma content_eq_0: "content (cbox a b) = 0 \<longleftrightarrow> (\<exists>i\<in>Basis. b\<bullet>i \<le> a\<bullet>i)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
85 |
by (auto simp: content_cbox_cases not_le intro: less_imp_le antisym eq_refl) |
56188 | 86 |
|
87 |
lemma content_eq_0_interior: "content (cbox a b) = 0 \<longleftrightarrow> interior(cbox a b) = {}" |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
88 |
unfolding content_eq_0 interior_cbox box_eq_empty by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
89 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
90 |
lemma content_pos_lt_eq: "0 < content (cbox a (b::'a::euclidean_space)) \<longleftrightarrow> (\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i)" |
64272 | 91 |
by (auto simp add: content_cbox_cases less_le prod_nonneg) |
49970 | 92 |
|
53399 | 93 |
lemma content_empty [simp]: "content {} = 0" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
94 |
by simp |
35172 | 95 |
|
60762 | 96 |
lemma content_real_if [simp]: "content {a..b} = (if a \<le> b then b - a else 0)" |
97 |
by (simp add: content_real) |
|
98 |
||
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
99 |
lemma content_subset: "cbox a b \<subseteq> cbox c d \<Longrightarrow> content (cbox a b) \<le> content (cbox c d)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
100 |
unfolding measure_def |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
101 |
by (intro enn2real_mono emeasure_mono) (auto simp: emeasure_lborel_cbox_eq) |
56188 | 102 |
|
103 |
lemma content_lt_nz: "0 < content (cbox a b) \<longleftrightarrow> content (cbox a b) \<noteq> 0" |
|
44890
22f665a2e91c
new fastforce replacing fastsimp - less confusing name
nipkow
parents:
44522
diff
changeset
|
104 |
unfolding content_pos_lt_eq content_eq_0 unfolding not_ex not_le by fastforce |
35172 | 105 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
106 |
lemma content_Pair: "content (cbox (a,c) (b,d)) = content (cbox a b) * content (cbox c d)" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
107 |
unfolding measure_lborel_cbox_eq Basis_prod_def |
64272 | 108 |
apply (subst prod.union_disjoint) |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
109 |
apply (auto simp: bex_Un ball_Un) |
64272 | 110 |
apply (subst (1 2) prod.reindex_nontrivial) |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
111 |
apply auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
112 |
done |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
113 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
114 |
lemma content_cbox_pair_eq0_D: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
115 |
"content (cbox (a,c) (b,d)) = 0 \<Longrightarrow> content (cbox a b) = 0 \<or> content (cbox c d) = 0" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
116 |
by (simp add: content_Pair) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
117 |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
118 |
lemma content_0_subset: "content(cbox a b) = 0 \<Longrightarrow> s \<subseteq> cbox a b \<Longrightarrow> content s = 0" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
119 |
using emeasure_mono[of s "cbox a b" lborel] |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
120 |
by (auto simp: measure_def enn2real_eq_0_iff emeasure_lborel_cbox_eq) |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
121 |
|
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
122 |
lemma content_split: |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
123 |
fixes a :: "'a::euclidean_space" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
124 |
assumes "k \<in> Basis" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
125 |
shows "content (cbox a b) = content(cbox a b \<inter> {x. x\<bullet>k \<le> c}) + content(cbox a b \<inter> {x. x\<bullet>k \<ge> c})" |
64911 | 126 |
\<comment> \<open>Prove using measure theory\<close> |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
127 |
proof cases |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
128 |
note simps = interval_split[OF assms] content_cbox_cases |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
129 |
have *: "Basis = insert k (Basis - {k})" "\<And>x. finite (Basis-{x})" "\<And>x. x\<notin>Basis-{x}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
130 |
using assms by auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
131 |
have *: "\<And>X Y Z. (\<Prod>i\<in>Basis. Z i (if i = k then X else Y i)) = Z k X * (\<Prod>i\<in>Basis-{k}. Z i (Y i))" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
132 |
"(\<Prod>i\<in>Basis. b\<bullet>i - a\<bullet>i) = (\<Prod>i\<in>Basis-{k}. b\<bullet>i - a\<bullet>i) * (b\<bullet>k - a\<bullet>k)" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
133 |
apply (subst *(1)) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
134 |
defer |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
135 |
apply (subst *(1)) |
64272 | 136 |
unfolding prod.insert[OF *(2-)] |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
137 |
apply auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
138 |
done |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
139 |
assume as: "\<forall>i\<in>Basis. a \<bullet> i \<le> b \<bullet> i" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
140 |
moreover |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
141 |
have "\<And>x. min (b \<bullet> k) c = max (a \<bullet> k) c \<Longrightarrow> |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
142 |
x * (b\<bullet>k - a\<bullet>k) = x * (max (a \<bullet> k) c - a \<bullet> k) + x * (b \<bullet> k - max (a \<bullet> k) c)" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
143 |
by (auto simp add: field_simps) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
144 |
moreover |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
145 |
have **: "(\<Prod>i\<in>Basis. ((\<Sum>i\<in>Basis. (if i = k then min (b \<bullet> k) c else b \<bullet> i) *\<^sub>R i) \<bullet> i - a \<bullet> i)) = |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
146 |
(\<Prod>i\<in>Basis. (if i = k then min (b \<bullet> k) c else b \<bullet> i) - a \<bullet> i)" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
147 |
"(\<Prod>i\<in>Basis. b \<bullet> i - ((\<Sum>i\<in>Basis. (if i = k then max (a \<bullet> k) c else a \<bullet> i) *\<^sub>R i) \<bullet> i)) = |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
148 |
(\<Prod>i\<in>Basis. b \<bullet> i - (if i = k then max (a \<bullet> k) c else a \<bullet> i))" |
64272 | 149 |
by (auto intro!: prod.cong) |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
150 |
have "\<not> a \<bullet> k \<le> c \<Longrightarrow> \<not> c \<le> b \<bullet> k \<Longrightarrow> False" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
151 |
unfolding not_le |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
152 |
using as[unfolded ,rule_format,of k] assms |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
153 |
by auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
154 |
ultimately show ?thesis |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
155 |
using assms |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
156 |
unfolding simps ** |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
157 |
unfolding *(1)[of "\<lambda>i x. b\<bullet>i - x"] *(1)[of "\<lambda>i x. x - a\<bullet>i"] |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
158 |
unfolding *(2) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
159 |
by auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
160 |
next |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
161 |
assume "\<not> (\<forall>i\<in>Basis. a \<bullet> i \<le> b \<bullet> i)" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
162 |
then have "cbox a b = {}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
163 |
unfolding box_eq_empty by (auto simp: not_le) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
164 |
then show ?thesis |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
165 |
by (auto simp: not_le) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
166 |
qed |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
167 |
|
49970 | 168 |
lemma division_of_content_0: |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
169 |
assumes "content (cbox a b) = 0" "d division_of (cbox a b)" "K \<in> d" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
170 |
shows "content K = 0" |
49970 | 171 |
unfolding forall_in_division[OF assms(2)] |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
172 |
by (meson assms content_0_subset division_of_def) |
49970 | 173 |
|
64267 | 174 |
lemma sum_content_null: |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
175 |
assumes "content (cbox a b) = 0" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
176 |
and "p tagged_division_of (cbox a b)" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
177 |
shows "(\<Sum>(x,K)\<in>p. content K *\<^sub>R f x) = (0::'a::real_normed_vector)" |
64267 | 178 |
proof (rule sum.neutral, rule) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
179 |
fix y |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
180 |
assume y: "y \<in> p" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
181 |
obtain x K where xk: "y = (x, K)" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
182 |
using surj_pair[of y] by blast |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
183 |
then obtain c d where k: "K = cbox c d" "K \<subseteq> cbox a b" |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
184 |
by (metis assms(2) tagged_division_ofD(3) tagged_division_ofD(4) y) |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
185 |
have "(\<lambda>(x',K'). content K' *\<^sub>R f x') y = content K *\<^sub>R f x" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
186 |
unfolding xk by auto |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
187 |
also have "\<dots> = 0" |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
188 |
using assms(1) content_0_subset k(2) by auto |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
189 |
finally show "(\<lambda>(x, k). content k *\<^sub>R f x) y = 0" . |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
190 |
qed |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
191 |
|
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
192 |
global_interpretation sum_content: operative plus 0 content |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
193 |
rewrites "comm_monoid_set.F plus 0 = sum" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
194 |
proof - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
195 |
interpret operative plus 0 content |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
196 |
by standard (auto simp add: content_split [symmetric] content_eq_0_interior) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
197 |
show "operative plus 0 content" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
198 |
by standard |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
199 |
show "comm_monoid_set.F plus 0 = sum" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
200 |
by (simp add: sum_def) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
201 |
qed |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
202 |
|
64267 | 203 |
lemma additive_content_division: "d division_of (cbox a b) \<Longrightarrow> sum content d = content (cbox a b)" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
204 |
by (fact sum_content.division) |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
205 |
|
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
206 |
lemma additive_content_tagged_division: |
64267 | 207 |
"d tagged_division_of (cbox a b) \<Longrightarrow> sum (\<lambda>(x,l). content l) d = content (cbox a b)" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
208 |
by (fact sum_content.tagged_division) |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
209 |
|
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
210 |
lemma subadditive_content_division: |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
211 |
assumes "\<D> division_of S" "S \<subseteq> cbox a b" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
212 |
shows "sum content \<D> \<le> content(cbox a b)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
213 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
214 |
have "\<D> division_of \<Union>\<D>" "\<Union>\<D> \<subseteq> cbox a b" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
215 |
using assms by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
216 |
then obtain \<D>' where "\<D> \<subseteq> \<D>'" "\<D>' division_of cbox a b" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
217 |
using partial_division_extend_interval by metis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
218 |
then have "sum content \<D> \<le> sum content \<D>'" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
219 |
using sum_mono2 by blast |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
220 |
also have "... \<le> content(cbox a b)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
221 |
by (simp add: \<open>\<D>' division_of cbox a b\<close> additive_content_division less_eq_real_def) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
222 |
finally show ?thesis . |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
223 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
224 |
|
66402 | 225 |
lemma content_real_eq_0: "content {a..b::real} = 0 \<longleftrightarrow> a \<ge> b" |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
226 |
by (metis atLeastatMost_empty_iff2 content_empty content_real diff_self eq_iff le_cases le_iff_diff_le_0) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
227 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
228 |
lemma property_empty_interval: "\<forall>a b. content (cbox a b) = 0 \<longrightarrow> P (cbox a b) \<Longrightarrow> P {}" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
229 |
using content_empty unfolding empty_as_interval by auto |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
230 |
|
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
231 |
lemma interval_bounds_nz_content [simp]: |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
232 |
assumes "content (cbox a b) \<noteq> 0" |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
233 |
shows "interval_upperbound (cbox a b) = b" |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
234 |
and "interval_lowerbound (cbox a b) = a" |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
235 |
by (metis assms content_empty interval_bounds')+ |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
236 |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
237 |
subsection \<open>Gauge integral\<close> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
238 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
239 |
text \<open>Case distinction to define it first on compact intervals first, then use a limit. This is only |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
240 |
much later unified. In Fremlin: Measure Theory, Volume 4I this is generalized using residual sets.\<close> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
241 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
242 |
definition has_integral :: "('n::euclidean_space \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> 'b \<Rightarrow> 'n set \<Rightarrow> bool" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
243 |
(infixr "has'_integral" 46) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
244 |
where "(f has_integral I) s \<longleftrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
245 |
(if \<exists>a b. s = cbox a b |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
246 |
then ((\<lambda>p. \<Sum>(x,k)\<in>p. content k *\<^sub>R f x) \<longlongrightarrow> I) (division_filter s) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
247 |
else (\<forall>e>0. \<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
248 |
(\<exists>z. ((\<lambda>p. \<Sum>(x,k)\<in>p. content k *\<^sub>R (if x \<in> s then f x else 0)) \<longlongrightarrow> z) (division_filter (cbox a b)) \<and> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
249 |
norm (z - I) < e)))" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
250 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
251 |
lemma has_integral_cbox: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
252 |
"(f has_integral I) (cbox a b) \<longleftrightarrow> ((\<lambda>p. \<Sum>(x,k)\<in>p. content k *\<^sub>R f x) \<longlongrightarrow> I) (division_filter (cbox a b))" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
253 |
by (auto simp add: has_integral_def) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
254 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
255 |
lemma has_integral: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
256 |
"(f has_integral y) (cbox a b) \<longleftrightarrow> |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
257 |
(\<forall>e>0. \<exists>\<gamma>. gauge \<gamma> \<and> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
258 |
(\<forall>\<D>. \<D> tagged_division_of (cbox a b) \<and> \<gamma> fine \<D> \<longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
259 |
norm (sum (\<lambda>(x,k). content(k) *\<^sub>R f x) \<D> - y) < e))" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
260 |
by (auto simp: dist_norm eventually_division_filter has_integral_def tendsto_iff) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
261 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
262 |
lemma has_integral_real: |
66402 | 263 |
"(f has_integral y) {a..b::real} \<longleftrightarrow> |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
264 |
(\<forall>e>0. \<exists>\<gamma>. gauge \<gamma> \<and> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
265 |
(\<forall>\<D>. \<D> tagged_division_of {a..b} \<and> \<gamma> fine \<D> \<longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
266 |
norm (sum (\<lambda>(x,k). content(k) *\<^sub>R f x) \<D> - y) < e))" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
267 |
unfolding box_real[symmetric] by (rule has_integral) |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
268 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
269 |
lemma has_integralD[dest]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
270 |
assumes "(f has_integral y) (cbox a b)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
271 |
and "e > 0" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
272 |
obtains \<gamma> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
273 |
where "gauge \<gamma>" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
274 |
and "\<And>\<D>. \<D> tagged_division_of (cbox a b) \<Longrightarrow> \<gamma> fine \<D> \<Longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
275 |
norm ((\<Sum>(x,k)\<in>\<D>. content k *\<^sub>R f x) - y) < e" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
276 |
using assms unfolding has_integral by auto |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
277 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
278 |
lemma has_integral_alt: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
279 |
"(f has_integral y) i \<longleftrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
280 |
(if \<exists>a b. i = cbox a b |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
281 |
then (f has_integral y) i |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
282 |
else (\<forall>e>0. \<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
283 |
(\<exists>z. ((\<lambda>x. if x \<in> i then f x else 0) has_integral z) (cbox a b) \<and> norm (z - y) < e)))" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
284 |
by (subst has_integral_def) (auto simp add: has_integral_cbox) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
285 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
286 |
lemma has_integral_altD: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
287 |
assumes "(f has_integral y) i" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
288 |
and "\<not> (\<exists>a b. i = cbox a b)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
289 |
and "e>0" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
290 |
obtains B where "B > 0" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
291 |
and "\<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
292 |
(\<exists>z. ((\<lambda>x. if x \<in> i then f(x) else 0) has_integral z) (cbox a b) \<and> norm(z - y) < e)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
293 |
using assms has_integral_alt[of f y i] by auto |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
294 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
295 |
definition integrable_on (infixr "integrable'_on" 46) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
296 |
where "f integrable_on i \<longleftrightarrow> (\<exists>y. (f has_integral y) i)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
297 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
298 |
definition "integral i f = (SOME y. (f has_integral y) i \<or> ~ f integrable_on i \<and> y=0)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
299 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
300 |
lemma integrable_integral[intro]: "f integrable_on i \<Longrightarrow> (f has_integral (integral i f)) i" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
301 |
unfolding integrable_on_def integral_def by (metis (mono_tags, lifting) someI_ex) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
302 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
303 |
lemma not_integrable_integral: "~ f integrable_on i \<Longrightarrow> integral i f = 0" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
304 |
unfolding integrable_on_def integral_def by blast |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
305 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
306 |
lemma has_integral_integrable[dest]: "(f has_integral i) s \<Longrightarrow> f integrable_on s" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
307 |
unfolding integrable_on_def by auto |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
308 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
309 |
lemma has_integral_integral: "f integrable_on s \<longleftrightarrow> (f has_integral (integral s f)) s" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
310 |
by auto |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
311 |
|
60420 | 312 |
subsection \<open>Basic theorems about integrals.\<close> |
35172 | 313 |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
314 |
lemma has_integral_eq_rhs: "(f has_integral j) S \<Longrightarrow> i = j \<Longrightarrow> (f has_integral i) S" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
315 |
by (rule forw_subst) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
316 |
|
66519 | 317 |
lemma has_integral_unique_cbox: |
318 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
|
319 |
shows "(f has_integral k1) (cbox a b) \<Longrightarrow> (f has_integral k2) (cbox a b) \<Longrightarrow> k1 = k2" |
|
320 |
by (auto simp: has_integral_cbox intro: tendsto_unique[OF division_filter_not_empty]) |
|
321 |
||
53409 | 322 |
lemma has_integral_unique: |
56188 | 323 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
66519 | 324 |
assumes "(f has_integral k1) i" "(f has_integral k2) i" |
53409 | 325 |
shows "k1 = k2" |
53410 | 326 |
proof (rule ccontr) |
53842 | 327 |
let ?e = "norm (k1 - k2) / 2" |
66519 | 328 |
let ?F = "(\<lambda>x. if x \<in> i then f x else 0)" |
329 |
assume "k1 \<noteq> k2" |
|
53410 | 330 |
then have e: "?e > 0" |
331 |
by auto |
|
66519 | 332 |
have nonbox: "\<not> (\<exists>a b. i = cbox a b)" |
333 |
using \<open>k1 \<noteq> k2\<close> assms has_integral_unique_cbox by blast |
|
55751 | 334 |
obtain B1 where B1: |
335 |
"0 < B1" |
|
56188 | 336 |
"\<And>a b. ball 0 B1 \<subseteq> cbox a b \<Longrightarrow> |
66519 | 337 |
\<exists>z. (?F has_integral z) (cbox a b) \<and> norm (z - k1) < norm (k1 - k2) / 2" |
338 |
by (rule has_integral_altD[OF assms(1) nonbox,OF e]) blast |
|
55751 | 339 |
obtain B2 where B2: |
340 |
"0 < B2" |
|
56188 | 341 |
"\<And>a b. ball 0 B2 \<subseteq> cbox a b \<Longrightarrow> |
66519 | 342 |
\<exists>z. (?F has_integral z) (cbox a b) \<and> norm (z - k2) < norm (k1 - k2) / 2" |
343 |
by (rule has_integral_altD[OF assms(2) nonbox,OF e]) blast |
|
344 |
obtain a b :: 'n where ab: "ball 0 B1 \<subseteq> cbox a b" "ball 0 B2 \<subseteq> cbox a b" |
|
345 |
by (metis Un_subset_iff bounded_Un bounded_ball bounded_subset_cbox) |
|
346 |
obtain w where w: "(?F has_integral w) (cbox a b)" "norm (w - k1) < norm (k1 - k2) / 2" |
|
53410 | 347 |
using B1(2)[OF ab(1)] by blast |
66519 | 348 |
obtain z where z: "(?F has_integral z) (cbox a b)" "norm (z - k2) < norm (k1 - k2) / 2" |
53410 | 349 |
using B2(2)[OF ab(2)] by blast |
350 |
have "z = w" |
|
66519 | 351 |
using has_integral_unique_cbox[OF w(1) z(1)] by auto |
53410 | 352 |
then have "norm (k1 - k2) \<le> norm (z - k2) + norm (w - k1)" |
353 |
using norm_triangle_ineq4 [of "k1 - w" "k2 - z"] |
|
354 |
by (auto simp add: norm_minus_commute) |
|
355 |
also have "\<dots> < norm (k1 - k2) / 2 + norm (k1 - k2) / 2" |
|
66519 | 356 |
by (metis add_strict_mono z(2) w(2)) |
53410 | 357 |
finally show False by auto |
358 |
qed |
|
359 |
||
360 |
lemma integral_unique [intro]: "(f has_integral y) k \<Longrightarrow> integral k f = y" |
|
361 |
unfolding integral_def |
|
362 |
by (rule some_equality) (auto intro: has_integral_unique) |
|
363 |
||
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
364 |
lemma eq_integralD: "integral k f = y \<Longrightarrow> (f has_integral y) k \<or> ~ f integrable_on k \<and> y=0" |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
365 |
unfolding integral_def integrable_on_def |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
366 |
apply (erule subst) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
367 |
apply (rule someI_ex) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
368 |
by blast |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
369 |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
370 |
lemma has_integral_const [intro]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
371 |
fixes a b :: "'a::euclidean_space" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
372 |
shows "((\<lambda>x. c) has_integral (content (cbox a b) *\<^sub>R c)) (cbox a b)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
373 |
using eventually_division_filter_tagged_division[of "cbox a b"] |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
374 |
additive_content_tagged_division[of _ a b] |
64267 | 375 |
by (auto simp: has_integral_cbox split_beta' scaleR_sum_left[symmetric] |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
376 |
elim!: eventually_mono intro!: tendsto_cong[THEN iffD1, OF _ tendsto_const]) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
377 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
378 |
lemma has_integral_const_real [intro]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
379 |
fixes a b :: real |
66402 | 380 |
shows "((\<lambda>x. c) has_integral (content {a..b} *\<^sub>R c)) {a..b}" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
381 |
by (metis box_real(2) has_integral_const) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
382 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
383 |
lemma has_integral_integrable_integral: "(f has_integral i) s \<longleftrightarrow> f integrable_on s \<and> integral s f = i" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
384 |
by blast |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
385 |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
386 |
lemma integral_const [simp]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
387 |
fixes a b :: "'a::euclidean_space" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
388 |
shows "integral (cbox a b) (\<lambda>x. c) = content (cbox a b) *\<^sub>R c" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
389 |
by (rule integral_unique) (rule has_integral_const) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
390 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
391 |
lemma integral_const_real [simp]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
392 |
fixes a b :: real |
66402 | 393 |
shows "integral {a..b} (\<lambda>x. c) = content {a..b} *\<^sub>R c" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
394 |
by (metis box_real(2) integral_const) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
395 |
|
66519 | 396 |
lemma has_integral_is_0_cbox: |
56188 | 397 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
66519 | 398 |
assumes "\<And>x. x \<in> cbox a b \<Longrightarrow> f x = 0" |
399 |
shows "(f has_integral 0) (cbox a b)" |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
400 |
unfolding has_integral_cbox |
66519 | 401 |
using eventually_division_filter_tagged_division[of "cbox a b"] assms |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
402 |
by (subst tendsto_cong[where g="\<lambda>_. 0"]) |
64267 | 403 |
(auto elim!: eventually_mono intro!: sum.neutral simp: tag_in_interval) |
66519 | 404 |
|
405 |
lemma has_integral_is_0: |
|
406 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
|
407 |
assumes "\<And>x. x \<in> S \<Longrightarrow> f x = 0" |
|
408 |
shows "(f has_integral 0) S" |
|
409 |
proof (cases "(\<exists>a b. S = cbox a b)") |
|
410 |
case True with assms has_integral_is_0_cbox show ?thesis |
|
411 |
by blast |
|
412 |
next |
|
413 |
case False |
|
414 |
have *: "(\<lambda>x. if x \<in> S then f x else 0) = (\<lambda>x. 0)" |
|
415 |
by (auto simp add: assms) |
|
416 |
show ?thesis |
|
417 |
using has_integral_is_0_cbox False |
|
60396 | 418 |
by (subst has_integral_alt) (force simp add: *) |
53410 | 419 |
qed |
35172 | 420 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
421 |
lemma has_integral_0[simp]: "((\<lambda>x::'n::euclidean_space. 0) has_integral 0) S" |
53410 | 422 |
by (rule has_integral_is_0) auto |
35172 | 423 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
424 |
lemma has_integral_0_eq[simp]: "((\<lambda>x. 0) has_integral i) S \<longleftrightarrow> i = 0" |
35172 | 425 |
using has_integral_unique[OF has_integral_0] by auto |
426 |
||
66519 | 427 |
lemma has_integral_linear_cbox: |
428 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
|
429 |
assumes f: "(f has_integral y) (cbox a b)" |
|
430 |
and h: "bounded_linear h" |
|
431 |
shows "((h \<circ> f) has_integral (h y)) (cbox a b)" |
|
432 |
proof - |
|
433 |
interpret bounded_linear h using h . |
|
434 |
show ?thesis |
|
435 |
unfolding has_integral_cbox using tendsto [OF f [unfolded has_integral_cbox]] |
|
436 |
by (simp add: sum scaleR split_beta') |
|
437 |
qed |
|
438 |
||
53410 | 439 |
lemma has_integral_linear: |
56188 | 440 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
66519 | 441 |
assumes f: "(f has_integral y) S" |
442 |
and h: "bounded_linear h" |
|
443 |
shows "((h \<circ> f) has_integral (h y)) S" |
|
444 |
proof (cases "(\<exists>a b. S = cbox a b)") |
|
445 |
case True with f h has_integral_linear_cbox show ?thesis |
|
446 |
by blast |
|
447 |
next |
|
448 |
case False |
|
449 |
interpret bounded_linear h using h . |
|
53410 | 450 |
from pos_bounded obtain B where B: "0 < B" "\<And>x. norm (h x) \<le> norm x * B" |
451 |
by blast |
|
66519 | 452 |
let ?S = "\<lambda>f x. if x \<in> S then f x else 0" |
453 |
show ?thesis |
|
454 |
proof (subst has_integral_alt, clarsimp simp: False) |
|
53410 | 455 |
fix e :: real |
456 |
assume e: "e > 0" |
|
56541 | 457 |
have *: "0 < e/B" using e B(1) by simp |
53410 | 458 |
obtain M where M: |
459 |
"M > 0" |
|
56188 | 460 |
"\<And>a b. ball 0 M \<subseteq> cbox a b \<Longrightarrow> |
66519 | 461 |
\<exists>z. (?S f has_integral z) (cbox a b) \<and> norm (z - y) < e/B" |
462 |
using has_integral_altD[OF f False *] by blast |
|
56188 | 463 |
show "\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
66519 | 464 |
(\<exists>z. (?S(h \<circ> f) has_integral z) (cbox a b) \<and> norm (z - h y) < e)" |
465 |
proof (rule exI, intro allI conjI impI) |
|
466 |
show "M > 0" using M by metis |
|
467 |
next |
|
468 |
fix a b::'n |
|
469 |
assume sb: "ball 0 M \<subseteq> cbox a b" |
|
470 |
obtain z where z: "(?S f has_integral z) (cbox a b)" "norm (z - y) < e/B" |
|
471 |
using M(2)[OF sb] by blast |
|
472 |
have *: "?S(h \<circ> f) = h \<circ> ?S f" |
|
60396 | 473 |
using zero by auto |
66519 | 474 |
show "\<exists>z. (?S(h \<circ> f) has_integral z) (cbox a b) \<and> norm (z - h y) < e" |
53410 | 475 |
apply (rule_tac x="h z" in exI) |
66519 | 476 |
apply (simp add: * has_integral_linear_cbox[OF z(1) h]) |
61165 | 477 |
apply (metis B diff le_less_trans pos_less_divide_eq z(2)) |
478 |
done |
|
53410 | 479 |
qed |
480 |
qed |
|
481 |
qed |
|
482 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
483 |
lemma has_integral_scaleR_left: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
484 |
"(f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x *\<^sub>R c) has_integral (y *\<^sub>R c)) S" |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
485 |
using has_integral_linear[OF _ bounded_linear_scaleR_left] by (simp add: comp_def) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
486 |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
487 |
lemma integrable_on_scaleR_left: |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
488 |
assumes "f integrable_on A" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
489 |
shows "(\<lambda>x. f x *\<^sub>R y) integrable_on A" |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
490 |
using assms has_integral_scaleR_left unfolding integrable_on_def by blast |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
491 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
492 |
lemma has_integral_mult_left: |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
493 |
fixes c :: "_ :: real_normed_algebra" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
494 |
shows "(f has_integral y) S \<Longrightarrow> ((\<lambda>x. f x * c) has_integral (y * c)) S" |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
495 |
using has_integral_linear[OF _ bounded_linear_mult_left] by (simp add: comp_def) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
496 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
497 |
text\<open>The case analysis eliminates the condition @{term "f integrable_on S"} at the cost |
62837 | 498 |
of the type class constraint \<open>division_ring\<close>\<close> |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
499 |
corollary integral_mult_left [simp]: |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
500 |
fixes c:: "'a::{real_normed_algebra,division_ring}" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
501 |
shows "integral S (\<lambda>x. f x * c) = integral S f * c" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
502 |
proof (cases "f integrable_on S \<or> c = 0") |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
503 |
case True then show ?thesis |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
504 |
by (force intro: has_integral_mult_left) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
505 |
next |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
506 |
case False then have "~ (\<lambda>x. f x * c) integrable_on S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
507 |
using has_integral_mult_left [of "(\<lambda>x. f x * c)" _ S "inverse c"] |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
508 |
by (auto simp add: mult.assoc) |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
509 |
with False show ?thesis by (simp add: not_integrable_integral) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
510 |
qed |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
511 |
|
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
512 |
corollary integral_mult_right [simp]: |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
513 |
fixes c:: "'a::{real_normed_field}" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
514 |
shows "integral S (\<lambda>x. c * f x) = c * integral S f" |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
515 |
by (simp add: mult.commute [of c]) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
516 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
517 |
corollary integral_divide [simp]: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
518 |
fixes z :: "'a::real_normed_field" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
519 |
shows "integral S (\<lambda>x. f x / z) = integral S (\<lambda>x. f x) / z" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
520 |
using integral_mult_left [of S f "inverse z"] |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
521 |
by (simp add: divide_inverse_commute) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
522 |
|
60762 | 523 |
lemma has_integral_mult_right: |
524 |
fixes c :: "'a :: real_normed_algebra" |
|
525 |
shows "(f has_integral y) i \<Longrightarrow> ((\<lambda>x. c * f x) has_integral (c * y)) i" |
|
526 |
using has_integral_linear[OF _ bounded_linear_mult_right] by (simp add: comp_def) |
|
61165 | 527 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
528 |
lemma has_integral_cmul: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. c *\<^sub>R f x) has_integral (c *\<^sub>R k)) S" |
53410 | 529 |
unfolding o_def[symmetric] |
60396 | 530 |
by (metis has_integral_linear bounded_linear_scaleR_right) |
35172 | 531 |
|
50104 | 532 |
lemma has_integral_cmult_real: |
533 |
fixes c :: real |
|
534 |
assumes "c \<noteq> 0 \<Longrightarrow> (f has_integral x) A" |
|
535 |
shows "((\<lambda>x. c * f x) has_integral c * x) A" |
|
53410 | 536 |
proof (cases "c = 0") |
537 |
case True |
|
538 |
then show ?thesis by simp |
|
539 |
next |
|
540 |
case False |
|
50104 | 541 |
from has_integral_cmul[OF assms[OF this], of c] show ?thesis |
542 |
unfolding real_scaleR_def . |
|
53410 | 543 |
qed |
544 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
545 |
lemma has_integral_neg: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. -(f x)) has_integral -k) S" |
60396 | 546 |
by (drule_tac c="-1" in has_integral_cmul) auto |
53410 | 547 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
548 |
lemma has_integral_neg_iff: "((\<lambda>x. - f x) has_integral k) S \<longleftrightarrow> (f has_integral - k) S" |
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
549 |
using has_integral_neg[of f "- k"] has_integral_neg[of "\<lambda>x. - f x" k] by auto |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
550 |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
551 |
lemma has_integral_add_cbox: |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
552 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
553 |
assumes "(f has_integral k) (cbox a b)" "(g has_integral l) (cbox a b)" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
554 |
shows "((\<lambda>x. f x + g x) has_integral (k + l)) (cbox a b)" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
555 |
using assms |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
556 |
unfolding has_integral_cbox |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
557 |
by (simp add: split_beta' scaleR_add_right sum.distrib[abs_def] tendsto_add) |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
558 |
|
53410 | 559 |
lemma has_integral_add: |
56188 | 560 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
561 |
assumes f: "(f has_integral k) S" and g: "(g has_integral l) S" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
562 |
shows "((\<lambda>x. f x + g x) has_integral (k + l)) S" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
563 |
proof (cases "\<exists>a b. S = cbox a b") |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
564 |
case True with has_integral_add_cbox assms show ?thesis |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
565 |
by blast |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
566 |
next |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
567 |
let ?S = "\<lambda>f x. if x \<in> S then f x else 0" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
568 |
case False |
53410 | 569 |
then show ?thesis |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
570 |
proof (subst has_integral_alt, clarsimp, goal_cases) |
61165 | 571 |
case (1 e) |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
572 |
then have e2: "e/2 > 0" |
53410 | 573 |
by auto |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
574 |
obtain Bf where "0 < Bf" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
575 |
and Bf: "\<And>a b. ball 0 Bf \<subseteq> cbox a b \<Longrightarrow> |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
576 |
\<exists>z. (?S f has_integral z) (cbox a b) \<and> norm (z - k) < e/2" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
577 |
using has_integral_altD[OF f False e2] by blast |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
578 |
obtain Bg where "0 < Bg" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
579 |
and Bg: "\<And>a b. ball 0 Bg \<subseteq> (cbox a b) \<Longrightarrow> |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
580 |
\<exists>z. (?S g has_integral z) (cbox a b) \<and> norm (z - l) < e/2" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
581 |
using has_integral_altD[OF g False e2] by blast |
53410 | 582 |
show ?case |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
583 |
proof (rule_tac x="max Bf Bg" in exI, clarsimp simp add: max.strict_coboundedI1 \<open>0 < Bf\<close>) |
53410 | 584 |
fix a b |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
585 |
assume "ball 0 (max Bf Bg) \<subseteq> cbox a (b::'n)" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
586 |
then have fs: "ball 0 Bf \<subseteq> cbox a (b::'n)" and gs: "ball 0 Bg \<subseteq> cbox a (b::'n)" |
53410 | 587 |
by auto |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
588 |
obtain w where w: "(?S f has_integral w) (cbox a b)" "norm (w - k) < e/2" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
589 |
using Bf[OF fs] by blast |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
590 |
obtain z where z: "(?S g has_integral z) (cbox a b)" "norm (z - l) < e/2" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
591 |
using Bg[OF gs] by blast |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
592 |
have *: "\<And>x. (if x \<in> S then f x + g x else 0) = (?S f x) + (?S g x)" |
53410 | 593 |
by auto |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
594 |
show "\<exists>z. (?S(\<lambda>x. f x + g x) has_integral z) (cbox a b) \<and> norm (z - (k + l)) < e" |
53410 | 595 |
apply (rule_tac x="w + z" in exI) |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
596 |
apply (simp add: has_integral_add_cbox[OF w(1) z(1), unfolded *[symmetric]]) |
53410 | 597 |
using norm_triangle_ineq[of "w - k" "z - l"] w(2) z(2) |
598 |
apply (auto simp add: field_simps) |
|
599 |
done |
|
600 |
qed |
|
601 |
qed |
|
602 |
qed |
|
35172 | 603 |
|
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
604 |
lemma has_integral_diff: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
605 |
"(f has_integral k) S \<Longrightarrow> (g has_integral l) S \<Longrightarrow> |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
606 |
((\<lambda>x. f x - g x) has_integral (k - l)) S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
607 |
using has_integral_add[OF _ has_integral_neg, of f k S g l] |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
608 |
by (auto simp: algebra_simps) |
53410 | 609 |
|
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
610 |
lemma integral_0 [simp]: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
611 |
"integral S (\<lambda>x::'n::euclidean_space. 0::'m::real_normed_vector) = 0" |
53410 | 612 |
by (rule integral_unique has_integral_0)+ |
613 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
614 |
lemma integral_add: "f integrable_on S \<Longrightarrow> g integrable_on S \<Longrightarrow> |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
615 |
integral S (\<lambda>x. f x + g x) = integral S f + integral S g" |
60396 | 616 |
by (rule integral_unique) (metis integrable_integral has_integral_add) |
53410 | 617 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
618 |
lemma integral_cmul [simp]: "integral S (\<lambda>x. c *\<^sub>R f x) = c *\<^sub>R integral S f" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
619 |
proof (cases "f integrable_on S \<or> c = 0") |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
620 |
case True with has_integral_cmul integrable_integral show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
621 |
by fastforce |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
622 |
next |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
623 |
case False then have "~ (\<lambda>x. c *\<^sub>R f x) integrable_on S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
624 |
using has_integral_cmul [of "(\<lambda>x. c *\<^sub>R f x)" _ S "inverse c"] by auto |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
625 |
with False show ?thesis by (simp add: not_integrable_integral) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
626 |
qed |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
627 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
628 |
lemma integral_neg [simp]: "integral S (\<lambda>x. - f x) = - integral S f" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
629 |
proof (cases "f integrable_on S") |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
630 |
case True then show ?thesis |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
631 |
by (simp add: has_integral_neg integrable_integral integral_unique) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
632 |
next |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
633 |
case False then have "~ (\<lambda>x. - f x) integrable_on S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
634 |
using has_integral_neg [of "(\<lambda>x. - f x)" _ S ] by auto |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
635 |
with False show ?thesis by (simp add: not_integrable_integral) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
636 |
qed |
53410 | 637 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
638 |
lemma integral_diff: "f integrable_on S \<Longrightarrow> g integrable_on S \<Longrightarrow> |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
639 |
integral S (\<lambda>x. f x - g x) = integral S f - integral S g" |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
640 |
by (rule integral_unique) (metis integrable_integral has_integral_diff) |
35172 | 641 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
642 |
lemma integrable_0: "(\<lambda>x. 0) integrable_on S" |
35172 | 643 |
unfolding integrable_on_def using has_integral_0 by auto |
644 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
645 |
lemma integrable_add: "f integrable_on S \<Longrightarrow> g integrable_on S \<Longrightarrow> (\<lambda>x. f x + g x) integrable_on S" |
35172 | 646 |
unfolding integrable_on_def by(auto intro: has_integral_add) |
647 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
648 |
lemma integrable_cmul: "f integrable_on S \<Longrightarrow> (\<lambda>x. c *\<^sub>R f(x)) integrable_on S" |
35172 | 649 |
unfolding integrable_on_def by(auto intro: has_integral_cmul) |
650 |
||
50104 | 651 |
lemma integrable_on_cmult_iff: |
53410 | 652 |
fixes c :: real |
653 |
assumes "c \<noteq> 0" |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
654 |
shows "(\<lambda>x. c * f x) integrable_on S \<longleftrightarrow> f integrable_on S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
655 |
using integrable_cmul[of "\<lambda>x. c * f x" S "1 / c"] integrable_cmul[of f S c] \<open>c \<noteq> 0\<close> |
50104 | 656 |
by auto |
657 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
658 |
lemma integrable_on_cmult_left: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
659 |
assumes "f integrable_on S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
660 |
shows "(\<lambda>x. of_real c * f x) integrable_on S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
661 |
using integrable_cmul[of f S "of_real c"] assms |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
662 |
by (simp add: scaleR_conv_of_real) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
663 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
664 |
lemma integrable_neg: "f integrable_on S \<Longrightarrow> (\<lambda>x. -f(x)) integrable_on S" |
35172 | 665 |
unfolding integrable_on_def by(auto intro: has_integral_neg) |
666 |
||
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
667 |
lemma integrable_diff: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
668 |
"f integrable_on S \<Longrightarrow> g integrable_on S \<Longrightarrow> (\<lambda>x. f x - g x) integrable_on S" |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
669 |
unfolding integrable_on_def by(auto intro: has_integral_diff) |
35172 | 670 |
|
671 |
lemma integrable_linear: |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
672 |
"f integrable_on S \<Longrightarrow> bounded_linear h \<Longrightarrow> (h \<circ> f) integrable_on S" |
35172 | 673 |
unfolding integrable_on_def by(auto intro: has_integral_linear) |
674 |
||
675 |
lemma integral_linear: |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
676 |
"f integrable_on S \<Longrightarrow> bounded_linear h \<Longrightarrow> integral S (h \<circ> f) = h (integral S f)" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
677 |
apply (rule has_integral_unique [where i=S and f = "h \<circ> f"]) |
60396 | 678 |
apply (simp_all add: integrable_integral integrable_linear has_integral_linear ) |
53410 | 679 |
done |
680 |
||
681 |
lemma integral_component_eq[simp]: |
|
56188 | 682 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'm::euclidean_space" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
683 |
assumes "f integrable_on S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
684 |
shows "integral S (\<lambda>x. f x \<bullet> k) = integral S f \<bullet> k" |
63938 | 685 |
unfolding integral_linear[OF assms(1) bounded_linear_inner_left,unfolded o_def] .. |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
686 |
|
64267 | 687 |
lemma has_integral_sum: |
53410 | 688 |
assumes "finite t" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
689 |
and "\<forall>a\<in>t. ((f a) has_integral (i a)) S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
690 |
shows "((\<lambda>x. sum (\<lambda>a. f a x) t) has_integral (sum i t)) S" |
53410 | 691 |
using assms(1) subset_refl[of t] |
692 |
proof (induct rule: finite_subset_induct) |
|
693 |
case empty |
|
694 |
then show ?case by auto |
|
695 |
next |
|
696 |
case (insert x F) |
|
60396 | 697 |
with assms show ?case |
698 |
by (simp add: has_integral_add) |
|
699 |
qed |
|
700 |
||
64267 | 701 |
lemma integral_sum: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
702 |
"\<lbrakk>finite I; \<And>a. a \<in> I \<Longrightarrow> f a integrable_on S\<rbrakk> \<Longrightarrow> |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
703 |
integral S (\<lambda>x. \<Sum>a\<in>I. f a x) = (\<Sum>a\<in>I. integral S (f a))" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
704 |
by (simp add: has_integral_sum integrable_integral integral_unique) |
64267 | 705 |
|
706 |
lemma integrable_sum: |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
707 |
"\<lbrakk>finite I; \<And>a. a \<in> I \<Longrightarrow> f a integrable_on S\<rbrakk> \<Longrightarrow> (\<lambda>x. \<Sum>a\<in>I. f a x) integrable_on S" |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
708 |
unfolding integrable_on_def using has_integral_sum[of I] by metis |
35172 | 709 |
|
710 |
lemma has_integral_eq: |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
711 |
assumes "\<And>x. x \<in> s \<Longrightarrow> f x = g x" |
53410 | 712 |
and "(f has_integral k) s" |
713 |
shows "(g has_integral k) s" |
|
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
714 |
using has_integral_diff[OF assms(2), of "\<lambda>x. f x - g x" 0] |
53410 | 715 |
using has_integral_is_0[of s "\<lambda>x. f x - g x"] |
716 |
using assms(1) |
|
717 |
by auto |
|
718 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
719 |
lemma integrable_eq: "(\<And>x. x \<in> s \<Longrightarrow> f x = g x) \<Longrightarrow> f integrable_on s \<Longrightarrow> g integrable_on s" |
53410 | 720 |
unfolding integrable_on_def |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
721 |
using has_integral_eq[of s f g] has_integral_eq by blast |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
722 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
723 |
lemma has_integral_cong: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
724 |
assumes "\<And>x. x \<in> s \<Longrightarrow> f x = g x" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
725 |
shows "(f has_integral i) s = (g has_integral i) s" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
726 |
using has_integral_eq[of s f g] has_integral_eq[of s g f] assms |
53410 | 727 |
by auto |
728 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
729 |
lemma integral_cong: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
730 |
assumes "\<And>x. x \<in> s \<Longrightarrow> f x = g x" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
731 |
shows "integral s f = integral s g" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
732 |
unfolding integral_def |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
733 |
by (metis (full_types, hide_lams) assms has_integral_cong integrable_eq) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
734 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
735 |
lemma integrable_on_cmult_left_iff [simp]: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
736 |
assumes "c \<noteq> 0" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
737 |
shows "(\<lambda>x. of_real c * f x) integrable_on s \<longleftrightarrow> f integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
738 |
(is "?lhs = ?rhs") |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
739 |
proof |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
740 |
assume ?lhs |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
741 |
then have "(\<lambda>x. of_real (1 / c) * (of_real c * f x)) integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
742 |
using integrable_cmul[of "\<lambda>x. of_real c * f x" s "1 / of_real c"] |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
743 |
by (simp add: scaleR_conv_of_real) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
744 |
then have "(\<lambda>x. (of_real (1 / c) * of_real c * f x)) integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
745 |
by (simp add: algebra_simps) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
746 |
with \<open>c \<noteq> 0\<close> show ?rhs |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
747 |
by (metis (no_types, lifting) integrable_eq mult.left_neutral nonzero_divide_eq_eq of_real_1 of_real_mult) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
748 |
qed (blast intro: integrable_on_cmult_left) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
749 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
750 |
lemma integrable_on_cmult_right: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
751 |
fixes f :: "_ \<Rightarrow> 'b :: {comm_ring,real_algebra_1,real_normed_vector}" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
752 |
assumes "f integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
753 |
shows "(\<lambda>x. f x * of_real c) integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
754 |
using integrable_on_cmult_left [OF assms] by (simp add: mult.commute) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
755 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
756 |
lemma integrable_on_cmult_right_iff [simp]: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
757 |
fixes f :: "_ \<Rightarrow> 'b :: {comm_ring,real_algebra_1,real_normed_vector}" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
758 |
assumes "c \<noteq> 0" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
759 |
shows "(\<lambda>x. f x * of_real c) integrable_on s \<longleftrightarrow> f integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
760 |
using integrable_on_cmult_left_iff [OF assms] by (simp add: mult.commute) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
761 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
762 |
lemma integrable_on_cdivide: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
763 |
fixes f :: "_ \<Rightarrow> 'b :: real_normed_field" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
764 |
assumes "f integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
765 |
shows "(\<lambda>x. f x / of_real c) integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
766 |
by (simp add: integrable_on_cmult_right divide_inverse assms of_real_inverse [symmetric] del: of_real_inverse) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
767 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
768 |
lemma integrable_on_cdivide_iff [simp]: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
769 |
fixes f :: "_ \<Rightarrow> 'b :: real_normed_field" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
770 |
assumes "c \<noteq> 0" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
771 |
shows "(\<lambda>x. f x / of_real c) integrable_on s \<longleftrightarrow> f integrable_on s" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
772 |
by (simp add: divide_inverse assms of_real_inverse [symmetric] del: of_real_inverse) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
773 |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
774 |
lemma has_integral_null [intro]: "content(cbox a b) = 0 \<Longrightarrow> (f has_integral 0) (cbox a b)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
775 |
unfolding has_integral_cbox |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
776 |
using eventually_division_filter_tagged_division[of "cbox a b"] |
64267 | 777 |
by (subst tendsto_cong[where g="\<lambda>_. 0"]) (auto elim: eventually_mono intro: sum_content_null) |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
778 |
|
66402 | 779 |
lemma has_integral_null_real [intro]: "content {a..b::real} = 0 \<Longrightarrow> (f has_integral 0) {a..b}" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
780 |
by (metis box_real(2) has_integral_null) |
56188 | 781 |
|
782 |
lemma has_integral_null_eq[simp]: "content (cbox a b) = 0 \<Longrightarrow> (f has_integral i) (cbox a b) \<longleftrightarrow> i = 0" |
|
60396 | 783 |
by (auto simp add: has_integral_null dest!: integral_unique) |
53410 | 784 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
785 |
lemma integral_null [simp]: "content (cbox a b) = 0 \<Longrightarrow> integral (cbox a b) f = 0" |
60396 | 786 |
by (metis has_integral_null integral_unique) |
53410 | 787 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
788 |
lemma integrable_on_null [intro]: "content (cbox a b) = 0 \<Longrightarrow> f integrable_on (cbox a b)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
789 |
by (simp add: has_integral_integrable) |
53410 | 790 |
|
791 |
lemma has_integral_empty[intro]: "(f has_integral 0) {}" |
|
66519 | 792 |
by (meson ex_in_conv has_integral_is_0) |
53410 | 793 |
|
794 |
lemma has_integral_empty_eq[simp]: "(f has_integral i) {} \<longleftrightarrow> i = 0" |
|
60396 | 795 |
by (auto simp add: has_integral_empty has_integral_unique) |
53410 | 796 |
|
797 |
lemma integrable_on_empty[intro]: "f integrable_on {}" |
|
798 |
unfolding integrable_on_def by auto |
|
799 |
||
800 |
lemma integral_empty[simp]: "integral {} f = 0" |
|
801 |
by (rule integral_unique) (rule has_integral_empty) |
|
802 |
||
803 |
lemma has_integral_refl[intro]: |
|
56188 | 804 |
fixes a :: "'a::euclidean_space" |
805 |
shows "(f has_integral 0) (cbox a a)" |
|
53410 | 806 |
and "(f has_integral 0) {a}" |
807 |
proof - |
|
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
808 |
show "(f has_integral 0) (cbox a a)" |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
809 |
by (rule has_integral_null) simp |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
810 |
then show "(f has_integral 0) {a}" |
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
811 |
by simp |
56188 | 812 |
qed |
813 |
||
814 |
lemma integrable_on_refl[intro]: "f integrable_on cbox a a" |
|
53410 | 815 |
unfolding integrable_on_def by auto |
816 |
||
60762 | 817 |
lemma integral_refl [simp]: "integral (cbox a a) f = 0" |
53410 | 818 |
by (rule integral_unique) auto |
819 |
||
60762 | 820 |
lemma integral_singleton [simp]: "integral {a} f = 0" |
821 |
by auto |
|
822 |
||
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
823 |
lemma integral_blinfun_apply: |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
824 |
assumes "f integrable_on s" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
825 |
shows "integral s (\<lambda>x. blinfun_apply h (f x)) = blinfun_apply h (integral s f)" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
826 |
by (subst integral_linear[symmetric, OF assms blinfun.bounded_linear_right]) (simp add: o_def) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
827 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
828 |
lemma blinfun_apply_integral: |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
829 |
assumes "f integrable_on s" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
830 |
shows "blinfun_apply (integral s f) x = integral s (\<lambda>y. blinfun_apply (f y) x)" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
831 |
by (metis (no_types, lifting) assms blinfun.prod_left.rep_eq integral_blinfun_apply integral_cong) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
832 |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
833 |
lemma has_integral_componentwise_iff: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
834 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
835 |
shows "(f has_integral y) A \<longleftrightarrow> (\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral (y \<bullet> b)) A)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
836 |
proof safe |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
837 |
fix b :: 'b assume "(f has_integral y) A" |
63938 | 838 |
from has_integral_linear[OF this(1) bounded_linear_inner_left, of b] |
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
839 |
show "((\<lambda>x. f x \<bullet> b) has_integral (y \<bullet> b)) A" by (simp add: o_def) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
840 |
next |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
841 |
assume "(\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral (y \<bullet> b)) A)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
842 |
hence "\<forall>b\<in>Basis. (((\<lambda>x. x *\<^sub>R b) \<circ> (\<lambda>x. f x \<bullet> b)) has_integral ((y \<bullet> b) *\<^sub>R b)) A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
843 |
by (intro ballI has_integral_linear) (simp_all add: bounded_linear_scaleR_left) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
844 |
hence "((\<lambda>x. \<Sum>b\<in>Basis. (f x \<bullet> b) *\<^sub>R b) has_integral (\<Sum>b\<in>Basis. (y \<bullet> b) *\<^sub>R b)) A" |
64267 | 845 |
by (intro has_integral_sum) (simp_all add: o_def) |
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
846 |
thus "(f has_integral y) A" by (simp add: euclidean_representation) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
847 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
848 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
849 |
lemma has_integral_componentwise: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
850 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
851 |
shows "(\<And>b. b \<in> Basis \<Longrightarrow> ((\<lambda>x. f x \<bullet> b) has_integral (y \<bullet> b)) A) \<Longrightarrow> (f has_integral y) A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
852 |
by (subst has_integral_componentwise_iff) blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
853 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
854 |
lemma integrable_componentwise_iff: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
855 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
856 |
shows "f integrable_on A \<longleftrightarrow> (\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
857 |
proof |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
858 |
assume "f integrable_on A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
859 |
then obtain y where "(f has_integral y) A" by (auto simp: integrable_on_def) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
860 |
hence "(\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral (y \<bullet> b)) A)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
861 |
by (subst (asm) has_integral_componentwise_iff) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
862 |
thus "(\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A)" by (auto simp: integrable_on_def) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
863 |
next |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
864 |
assume "(\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
865 |
then obtain y where "\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y b) A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
866 |
unfolding integrable_on_def by (subst (asm) bchoice_iff) blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
867 |
hence "\<forall>b\<in>Basis. (((\<lambda>x. x *\<^sub>R b) \<circ> (\<lambda>x. f x \<bullet> b)) has_integral (y b *\<^sub>R b)) A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
868 |
by (intro ballI has_integral_linear) (simp_all add: bounded_linear_scaleR_left) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
869 |
hence "((\<lambda>x. \<Sum>b\<in>Basis. (f x \<bullet> b) *\<^sub>R b) has_integral (\<Sum>b\<in>Basis. y b *\<^sub>R b)) A" |
64267 | 870 |
by (intro has_integral_sum) (simp_all add: o_def) |
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
871 |
thus "f integrable_on A" by (auto simp: integrable_on_def o_def euclidean_representation) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
872 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
873 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
874 |
lemma integrable_componentwise: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
875 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
876 |
shows "(\<And>b. b \<in> Basis \<Longrightarrow> (\<lambda>x. f x \<bullet> b) integrable_on A) \<Longrightarrow> f integrable_on A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
877 |
by (subst integrable_componentwise_iff) blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
878 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
879 |
lemma integral_componentwise: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
880 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
881 |
assumes "f integrable_on A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
882 |
shows "integral A f = (\<Sum>b\<in>Basis. integral A (\<lambda>x. (f x \<bullet> b) *\<^sub>R b))" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
883 |
proof - |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
884 |
from assms have integrable: "\<forall>b\<in>Basis. (\<lambda>x. x *\<^sub>R b) \<circ> (\<lambda>x. (f x \<bullet> b)) integrable_on A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
885 |
by (subst (asm) integrable_componentwise_iff, intro integrable_linear ballI) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
886 |
(simp_all add: bounded_linear_scaleR_left) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
887 |
have "integral A f = integral A (\<lambda>x. \<Sum>b\<in>Basis. (f x \<bullet> b) *\<^sub>R b)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
888 |
by (simp add: euclidean_representation) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
889 |
also from integrable have "\<dots> = (\<Sum>a\<in>Basis. integral A (\<lambda>x. (f x \<bullet> a) *\<^sub>R a))" |
64267 | 890 |
by (subst integral_sum) (simp_all add: o_def) |
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
891 |
finally show ?thesis . |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
892 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
893 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
894 |
lemma integrable_component: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
895 |
"f integrable_on A \<Longrightarrow> (\<lambda>x. f x \<bullet> (y :: 'b :: euclidean_space)) integrable_on A" |
63938 | 896 |
by (drule integrable_linear[OF _ bounded_linear_inner_left[of y]]) (simp add: o_def) |
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
897 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
898 |
|
35172 | 899 |
|
60420 | 900 |
subsection \<open>Cauchy-type criterion for integrability.\<close> |
35172 | 901 |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
902 |
proposition integrable_Cauchy: |
56188 | 903 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::{real_normed_vector,complete_space}" |
904 |
shows "f integrable_on cbox a b \<longleftrightarrow> |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
905 |
(\<forall>e>0. \<exists>\<gamma>. gauge \<gamma> \<and> |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
906 |
(\<forall>\<D>1 \<D>2. \<D>1 tagged_division_of (cbox a b) \<and> \<gamma> fine \<D>1 \<and> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
907 |
\<D>2 tagged_division_of (cbox a b) \<and> \<gamma> fine \<D>2 \<longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
908 |
norm ((\<Sum>(x,K)\<in>\<D>1. content K *\<^sub>R f x) - (\<Sum>(x,K)\<in>\<D>2. content K *\<^sub>R f x)) < e))" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
909 |
(is "?l = (\<forall>e>0. \<exists>\<gamma>. ?P e \<gamma>)") |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
910 |
proof (intro iffI allI impI) |
53442 | 911 |
assume ?l |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
912 |
then obtain y |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
913 |
where y: "\<And>e. e > 0 \<Longrightarrow> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
914 |
\<exists>\<gamma>. gauge \<gamma> \<and> |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
915 |
(\<forall>\<D>. \<D> tagged_division_of cbox a b \<and> \<gamma> fine \<D> \<longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
916 |
norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) - y) < e)" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
917 |
by (auto simp: integrable_on_def has_integral) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
918 |
show "\<exists>\<gamma>. ?P e \<gamma>" if "e > 0" for e |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
919 |
proof - |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
920 |
have "e/2 > 0" using that by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
921 |
with y obtain \<gamma> where "gauge \<gamma>" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
922 |
and \<gamma>: "\<And>\<D>. \<D> tagged_division_of cbox a b \<and> \<gamma> fine \<D> \<Longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
923 |
norm ((\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R f x) - y) < e/2" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
924 |
by meson |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
925 |
show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
926 |
apply (rule_tac x=\<gamma> in exI, clarsimp simp: \<open>gauge \<gamma>\<close>) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
927 |
by (blast intro!: \<gamma> dist_triangle_half_l[where y=y,unfolded dist_norm]) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
928 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
929 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
930 |
assume "\<forall>e>0. \<exists>\<gamma>. ?P e \<gamma>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
931 |
then have "\<forall>n::nat. \<exists>\<gamma>. ?P (1 / (n + 1)) \<gamma>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
932 |
by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
933 |
then obtain \<gamma> :: "nat \<Rightarrow> 'n \<Rightarrow> 'n set" where \<gamma>: |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
934 |
"\<And>m. gauge (\<gamma> m)" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
935 |
"\<And>m \<D>1 \<D>2. \<lbrakk>\<D>1 tagged_division_of cbox a b; |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
936 |
\<gamma> m fine \<D>1; \<D>2 tagged_division_of cbox a b; \<gamma> m fine \<D>2\<rbrakk> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
937 |
\<Longrightarrow> norm ((\<Sum>(x,K) \<in> \<D>1. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> \<D>2. content K *\<^sub>R f x)) |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
938 |
< 1 / (m + 1)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
939 |
by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
940 |
have "\<And>n. gauge (\<lambda>x. \<Inter>{\<gamma> i x |i. i \<in> {0..n}})" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
941 |
apply (rule gauge_Inter) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
942 |
using \<gamma> by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
943 |
then have "\<forall>n. \<exists>p. p tagged_division_of (cbox a b) \<and> (\<lambda>x. \<Inter>{\<gamma> i x |i. i \<in> {0..n}}) fine p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
944 |
by (meson fine_division_exists) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
945 |
then obtain p where p: "\<And>z. p z tagged_division_of cbox a b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
946 |
"\<And>z. (\<lambda>x. \<Inter>{\<gamma> i x |i. i \<in> {0..z}}) fine p z" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
947 |
by meson |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
948 |
have dp: "\<And>i n. i\<le>n \<Longrightarrow> \<gamma> i fine p n" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
949 |
using p unfolding fine_Inter |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
950 |
using atLeastAtMost_iff by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
951 |
have "Cauchy (\<lambda>n. sum (\<lambda>(x,K). content K *\<^sub>R (f x)) (p n))" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
952 |
proof (rule CauchyI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
953 |
fix e::real |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
954 |
assume "0 < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
955 |
then obtain N where "N \<noteq> 0" and N: "inverse (real N) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
956 |
using real_arch_inverse[of e] by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
957 |
show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. norm ((\<Sum>(x,K) \<in> p m. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> p n. content K *\<^sub>R f x)) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
958 |
proof (intro exI allI impI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
959 |
fix m n |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
960 |
assume mn: "N \<le> m" "N \<le> n" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
961 |
have "norm ((\<Sum>(x,K) \<in> p m. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> p n. content K *\<^sub>R f x)) < 1 / (real N + 1)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
962 |
by (simp add: p(1) dp mn \<gamma>) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
963 |
also have "... < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
964 |
using N \<open>N \<noteq> 0\<close> \<open>0 < e\<close> by (auto simp: field_simps) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
965 |
finally show "norm ((\<Sum>(x,K) \<in> p m. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> p n. content K *\<^sub>R f x)) < e" . |
53442 | 966 |
qed |
967 |
qed |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
968 |
then obtain y where y: "\<exists>no. \<forall>n\<ge>no. norm ((\<Sum>(x,K) \<in> p n. content K *\<^sub>R f x) - y) < r" if "r > 0" for r |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
969 |
by (auto simp: convergent_eq_Cauchy[symmetric] dest: LIMSEQ_D) |
53442 | 970 |
show ?l |
971 |
unfolding integrable_on_def has_integral |
|
60425 | 972 |
proof (rule_tac x=y in exI, clarify) |
53442 | 973 |
fix e :: real |
974 |
assume "e>0" |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
975 |
then have e2: "e/2 > 0" by auto |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
976 |
then obtain N1::nat where N1: "N1 \<noteq> 0" "inverse (real N1) < e/2" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
977 |
using real_arch_inverse by blast |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
978 |
obtain N2::nat where N2: "\<And>n. n \<ge> N2 \<Longrightarrow> norm ((\<Sum>(x,K) \<in> p n. content K *\<^sub>R f x) - y) < e/2" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
979 |
using y[OF e2] by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
980 |
show "\<exists>\<gamma>. gauge \<gamma> \<and> |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
981 |
(\<forall>\<D>. \<D> tagged_division_of (cbox a b) \<and> \<gamma> fine \<D> \<longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
982 |
norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) - y) < e)" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
983 |
proof (intro exI conjI allI impI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
984 |
show "gauge (\<gamma> (N1+N2))" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
985 |
using \<gamma> by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
986 |
show "norm ((\<Sum>(x,K) \<in> q. content K *\<^sub>R f x) - y) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
987 |
if "q tagged_division_of cbox a b \<and> \<gamma> (N1+N2) fine q" for q |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
988 |
proof (rule norm_triangle_half_r) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
989 |
have "norm ((\<Sum>(x,K) \<in> p (N1+N2). content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> q. content K *\<^sub>R f x)) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
990 |
< 1 / (real (N1+N2) + 1)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
991 |
by (rule \<gamma>; simp add: dp p that) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
992 |
also have "... < e/2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
993 |
using N1 \<open>0 < e\<close> by (auto simp: field_simps intro: less_le_trans) |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
994 |
finally show "norm ((\<Sum>(x,K) \<in> p (N1+N2). content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> q. content K *\<^sub>R f x)) < e/2" . |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
995 |
show "norm ((\<Sum>(x,K) \<in> p (N1+N2). content K *\<^sub>R f x) - y) < e/2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
996 |
using N2 le_add_same_cancel2 by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
997 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
998 |
qed |
53442 | 999 |
qed |
1000 |
qed |
|
1001 |
||
35172 | 1002 |
|
60420 | 1003 |
subsection \<open>Additivity of integral on abutting intervals.\<close> |
35172 | 1004 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1005 |
lemma tagged_division_split_left_inj_content: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1006 |
assumes \<D>: "\<D> tagged_division_of S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1007 |
and "(x1, K1) \<in> \<D>" "(x2, K2) \<in> \<D>" "K1 \<noteq> K2" "K1 \<inter> {x. x\<bullet>k \<le> c} = K2 \<inter> {x. x\<bullet>k \<le> c}" "k \<in> Basis" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1008 |
shows "content (K1 \<inter> {x. x\<bullet>k \<le> c}) = 0" |
53443 | 1009 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1010 |
from tagged_division_ofD(4)[OF \<D> \<open>(x1, K1) \<in> \<D>\<close>] obtain a b where K1: "K1 = cbox a b" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1011 |
by auto |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1012 |
then have "interior (K1 \<inter> {x. x \<bullet> k \<le> c}) = {}" |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
1013 |
by (metis tagged_division_split_left_inj assms) |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1014 |
then show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1015 |
unfolding K1 interval_split[OF \<open>k \<in> Basis\<close>] by (auto simp: content_eq_0_interior) |
53443 | 1016 |
qed |
1017 |
||
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1018 |
lemma tagged_division_split_right_inj_content: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1019 |
assumes \<D>: "\<D> tagged_division_of S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1020 |
and "(x1, K1) \<in> \<D>" "(x2, K2) \<in> \<D>" "K1 \<noteq> K2" "K1 \<inter> {x. x\<bullet>k \<ge> c} = K2 \<inter> {x. x\<bullet>k \<ge> c}" "k \<in> Basis" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1021 |
shows "content (K1 \<inter> {x. x\<bullet>k \<ge> c}) = 0" |
53443 | 1022 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1023 |
from tagged_division_ofD(4)[OF \<D> \<open>(x1, K1) \<in> \<D>\<close>] obtain a b where K1: "K1 = cbox a b" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1024 |
by auto |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1025 |
then have "interior (K1 \<inter> {x. c \<le> x \<bullet> k}) = {}" |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
1026 |
by (metis tagged_division_split_right_inj assms) |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1027 |
then show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1028 |
unfolding K1 interval_split[OF \<open>k \<in> Basis\<close>] |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1029 |
by (auto simp: content_eq_0_interior) |
53443 | 1030 |
qed |
35172 | 1031 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1032 |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1033 |
proposition has_integral_split: |
56188 | 1034 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
60435 | 1035 |
assumes fi: "(f has_integral i) (cbox a b \<inter> {x. x\<bullet>k \<le> c})" |
1036 |
and fj: "(f has_integral j) (cbox a b \<inter> {x. x\<bullet>k \<ge> c})" |
|
1037 |
and k: "k \<in> Basis" |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1038 |
shows "(f has_integral (i + j)) (cbox a b)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1039 |
unfolding has_integral |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1040 |
proof clarify |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1041 |
fix e::real |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1042 |
assume "0 < e" |
53468 | 1043 |
then have e: "e/2 > 0" |
1044 |
by auto |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1045 |
obtain \<gamma>1 where \<gamma>1: "gauge \<gamma>1" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1046 |
and \<gamma>1norm: |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
1047 |
"\<And>\<D>. \<lbrakk>\<D> tagged_division_of cbox a b \<inter> {x. x \<bullet> k \<le> c}; \<gamma>1 fine \<D>\<rbrakk> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
1048 |
\<Longrightarrow> norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) - i) < e/2" |
60435 | 1049 |
apply (rule has_integralD[OF fi[unfolded interval_split[OF k]] e]) |
1050 |
apply (simp add: interval_split[symmetric] k) |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1051 |
done |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1052 |
obtain \<gamma>2 where \<gamma>2: "gauge \<gamma>2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1053 |
and \<gamma>2norm: |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
1054 |
"\<And>\<D>. \<lbrakk>\<D> tagged_division_of cbox a b \<inter> {x. c \<le> x \<bullet> k}; \<gamma>2 fine \<D>\<rbrakk> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
1055 |
\<Longrightarrow> norm ((\<Sum>(x, k) \<in> \<D>. content k *\<^sub>R f x) - j) < e/2" |
60435 | 1056 |
apply (rule has_integralD[OF fj[unfolded interval_split[OF k]] e]) |
1057 |
apply (simp add: interval_split[symmetric] k) |
|
1058 |
done |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1059 |
let ?\<gamma> = "\<lambda>x. if x\<bullet>k = c then (\<gamma>1 x \<inter> \<gamma>2 x) else ball x \<bar>x\<bullet>k - c\<bar> \<inter> \<gamma>1 x \<inter> \<gamma>2 x" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1060 |
have "gauge ?\<gamma>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1061 |
using \<gamma>1 \<gamma>2 unfolding gauge_def by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1062 |
then show "\<exists>\<gamma>. gauge \<gamma> \<and> |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
1063 |
(\<forall>\<D>. \<D> tagged_division_of cbox a b \<and> \<gamma> fine \<D> \<longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
1064 |
norm ((\<Sum>(x, k)\<in>\<D>. content k *\<^sub>R f x) - (i + j)) < e)" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1065 |
proof (rule_tac x="?\<gamma>" in exI, safe) |
53468 | 1066 |
fix p |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1067 |
assume p: "p tagged_division_of (cbox a b)" and "?\<gamma> fine p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1068 |
have ab_eqp: "cbox a b = \<Union>{K. \<exists>x. (x, K) \<in> p}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1069 |
using p by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1070 |
have xk_le_c: "x\<bullet>k \<le> c" if as: "(x,K) \<in> p" and K: "K \<inter> {x. x\<bullet>k \<le> c} \<noteq> {}" for x K |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1071 |
proof (rule ccontr) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1072 |
assume **: "\<not> x \<bullet> k \<le> c" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1073 |
then have "K \<subseteq> ball x \<bar>x \<bullet> k - c\<bar>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1074 |
using \<open>?\<gamma> fine p\<close> as by (fastforce simp: not_le algebra_simps) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1075 |
with K obtain y where y: "y \<in> ball x \<bar>x \<bullet> k - c\<bar>" "y\<bullet>k \<le> c" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1076 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1077 |
then have "\<bar>x \<bullet> k - y \<bullet> k\<bar> < \<bar>x \<bullet> k - c\<bar>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1078 |
using Basis_le_norm[OF k, of "x - y"] |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1079 |
by (auto simp add: dist_norm inner_diff_left intro: le_less_trans) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1080 |
with y show False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1081 |
using ** by (auto simp add: field_simps) |
60435 | 1082 |
qed |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1083 |
have xk_ge_c: "x\<bullet>k \<ge> c" if as: "(x,K) \<in> p" and K: "K \<inter> {x. x\<bullet>k \<ge> c} \<noteq> {}" for x K |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1084 |
proof (rule ccontr) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1085 |
assume **: "\<not> x \<bullet> k \<ge> c" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1086 |
then have "K \<subseteq> ball x \<bar>x \<bullet> k - c\<bar>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1087 |
using \<open>?\<gamma> fine p\<close> as by (fastforce simp: not_le algebra_simps) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1088 |
with K obtain y where y: "y \<in> ball x \<bar>x \<bullet> k - c\<bar>" "y\<bullet>k \<ge> c" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1089 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1090 |
then have "\<bar>x \<bullet> k - y \<bullet> k\<bar> < \<bar>x \<bullet> k - c\<bar>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1091 |
using Basis_le_norm[OF k, of "x - y"] |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1092 |
by (auto simp add: dist_norm inner_diff_left intro: le_less_trans) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1093 |
with y show False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1094 |
using ** by (auto simp add: field_simps) |
53468 | 1095 |
qed |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1096 |
have fin_finite: "finite {(x,f K) | x K. (x,K) \<in> s \<and> P x K}" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1097 |
if "finite s" for s and f :: "'a set \<Rightarrow> 'a set" and P :: "'a \<Rightarrow> 'a set \<Rightarrow> bool" |
53468 | 1098 |
proof - |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1099 |
from that have "finite ((\<lambda>(x,K). (x, f K)) ` s)" |
60425 | 1100 |
by auto |
61165 | 1101 |
then show ?thesis |
60425 | 1102 |
by (rule rev_finite_subset) auto |
53468 | 1103 |
qed |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1104 |
{ fix \<G> :: "'a set \<Rightarrow> 'a set" |
53468 | 1105 |
fix i :: "'a \<times> 'a set" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1106 |
assume "i \<in> (\<lambda>(x, k). (x, \<G> k)) ` p - {(x, \<G> k) |x k. (x, k) \<in> p \<and> \<G> k \<noteq> {}}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1107 |
then obtain x K where xk: "i = (x, \<G> K)" "(x,K) \<in> p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1108 |
"(x, \<G> K) \<notin> {(x, \<G> K) |x K. (x,K) \<in> p \<and> \<G> K \<noteq> {}}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1109 |
by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1110 |
have "content (\<G> K) = 0" |
53468 | 1111 |
using xk using content_empty by auto |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1112 |
then have "(\<lambda>(x,K). content K *\<^sub>R f x) i = 0" |
53468 | 1113 |
unfolding xk split_conv by auto |
60435 | 1114 |
} note [simp] = this |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1115 |
have "finite p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1116 |
using p by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1117 |
let ?M1 = "{(x, K \<inter> {x. x\<bullet>k \<le> c}) |x K. (x,K) \<in> p \<and> K \<inter> {x. x\<bullet>k \<le> c} \<noteq> {}}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1118 |
have \<gamma>1_fine: "\<gamma>1 fine ?M1" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1119 |
using \<open>?\<gamma> fine p\<close> by (fastforce simp: fine_def split: if_split_asm) |
53468 | 1120 |
have "norm ((\<Sum>(x, k)\<in>?M1. content k *\<^sub>R f x) - i) < e/2" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1121 |
proof (rule \<gamma>1norm [OF tagged_division_ofI \<gamma>1_fine]) |
60435 | 1122 |
show "finite ?M1" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1123 |
by (rule fin_finite) (use p in blast) |
56188 | 1124 |
show "\<Union>{k. \<exists>x. (x, k) \<in> ?M1} = cbox a b \<inter> {x. x\<bullet>k \<le> c}" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1125 |
by (auto simp: ab_eqp) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1126 |
|
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1127 |
fix x L |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1128 |
assume xL: "(x, L) \<in> ?M1" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1129 |
then obtain x' L' where xL': "x = x'" "L = L' \<inter> {x. x \<bullet> k \<le> c}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1130 |
"(x', L') \<in> p" "L' \<inter> {x. x \<bullet> k \<le> c} \<noteq> {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1131 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1132 |
then obtain a' b' where ab': "L' = cbox a' b'" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1133 |
using p by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1134 |
show "x \<in> L" "L \<subseteq> cbox a b \<inter> {x. x \<bullet> k \<le> c}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1135 |
using p xk_le_c xL' by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1136 |
show "\<exists>a b. L = cbox a b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1137 |
using p xL' ab' by (auto simp add: interval_split[OF k,where c=c]) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1138 |
|
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1139 |
fix y R |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1140 |
assume yR: "(y, R) \<in> ?M1" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1141 |
then obtain y' R' where yR': "y = y'" "R = R' \<inter> {x. x \<bullet> k \<le> c}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1142 |
"(y', R') \<in> p" "R' \<inter> {x. x \<bullet> k \<le> c} \<noteq> {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1143 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1144 |
assume as: "(x, L) \<noteq> (y, R)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1145 |
show "interior L \<inter> interior R = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1146 |
proof (cases "L' = R' \<longrightarrow> x' = y'") |
53468 | 1147 |
case False |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1148 |
have "interior R' = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1149 |
by (metis (no_types) False Pair_inject inf.idem tagged_division_ofD(5) [OF p] xL'(3) yR'(3)) |
53468 | 1150 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1151 |
using yR' by simp |
53468 | 1152 |
next |
1153 |
case True |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1154 |
then have "L' \<noteq> R'" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1155 |
using as unfolding xL' yR' by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1156 |
have "interior L' \<inter> interior R' = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1157 |
by (metis (no_types) Pair_inject \<open>L' \<noteq> R'\<close> p tagged_division_ofD(5) xL'(3) yR'(3)) |
53468 | 1158 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1159 |
using xL'(2) yR'(2) by auto |
35172 | 1160 |
qed |
1161 |
qed |
|
53468 | 1162 |
moreover |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1163 |
let ?M2 = "{(x,K \<inter> {x. x\<bullet>k \<ge> c}) |x K. (x,K) \<in> p \<and> K \<inter> {x. x\<bullet>k \<ge> c} \<noteq> {}}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1164 |
have \<gamma>2_fine: "\<gamma>2 fine ?M2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1165 |
using \<open>?\<gamma> fine p\<close> by (fastforce simp: fine_def split: if_split_asm) |
53468 | 1166 |
have "norm ((\<Sum>(x, k)\<in>?M2. content k *\<^sub>R f x) - j) < e/2" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1167 |
proof (rule \<gamma>2norm [OF tagged_division_ofI \<gamma>2_fine]) |
60435 | 1168 |
show "finite ?M2" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1169 |
by (rule fin_finite) (use p in blast) |
56188 | 1170 |
show "\<Union>{k. \<exists>x. (x, k) \<in> ?M2} = cbox a b \<inter> {x. x\<bullet>k \<ge> c}" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1171 |
by (auto simp: ab_eqp) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1172 |
|
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1173 |
fix x L |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1174 |
assume xL: "(x, L) \<in> ?M2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1175 |
then obtain x' L' where xL': "x = x'" "L = L' \<inter> {x. x \<bullet> k \<ge> c}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1176 |
"(x', L') \<in> p" "L' \<inter> {x. x \<bullet> k \<ge> c} \<noteq> {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1177 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1178 |
then obtain a' b' where ab': "L' = cbox a' b'" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1179 |
using p by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1180 |
show "x \<in> L" "L \<subseteq> cbox a b \<inter> {x. x \<bullet> k \<ge> c}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1181 |
using p xk_ge_c xL' by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1182 |
show "\<exists>a b. L = cbox a b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1183 |
using p xL' ab' by (auto simp add: interval_split[OF k,where c=c]) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1184 |
|
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1185 |
fix y R |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1186 |
assume yR: "(y, R) \<in> ?M2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1187 |
then obtain y' R' where yR': "y = y'" "R = R' \<inter> {x. x \<bullet> k \<ge> c}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1188 |
"(y', R') \<in> p" "R' \<inter> {x. x \<bullet> k \<ge> c} \<noteq> {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1189 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1190 |
assume as: "(x, L) \<noteq> (y, R)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1191 |
show "interior L \<inter> interior R = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1192 |
proof (cases "L' = R' \<longrightarrow> x' = y'") |
53468 | 1193 |
case False |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1194 |
have "interior R' = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1195 |
by (metis (no_types) False Pair_inject inf.idem tagged_division_ofD(5) [OF p] xL'(3) yR'(3)) |
53468 | 1196 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1197 |
using yR' by simp |
53468 | 1198 |
next |
1199 |
case True |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1200 |
then have "L' \<noteq> R'" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1201 |
using as unfolding xL' yR' by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1202 |
have "interior L' \<inter> interior R' = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1203 |
by (metis (no_types) Pair_inject \<open>L' \<noteq> R'\<close> p tagged_division_ofD(5) xL'(3) yR'(3)) |
53468 | 1204 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1205 |
using xL'(2) yR'(2) by auto |
53468 | 1206 |
qed |
1207 |
qed |
|
1208 |
ultimately |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1209 |
have "norm (((\<Sum>(x,K) \<in> ?M1. content K *\<^sub>R f x) - i) + ((\<Sum>(x,K) \<in> ?M2. content K *\<^sub>R f x) - j)) < e/2 + e/2" |
60425 | 1210 |
using norm_add_less by blast |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1211 |
moreover have "((\<Sum>(x,K) \<in> ?M1. content K *\<^sub>R f x) - i) + |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1212 |
((\<Sum>(x,K) \<in> ?M2. content K *\<^sub>R f x) - j) = |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1213 |
(\<Sum>(x, ka)\<in>p. content ka *\<^sub>R f x) - (i + j)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1214 |
proof - |
60435 | 1215 |
have eq0: "\<And>x y. x = (0::real) \<Longrightarrow> x *\<^sub>R (y::'b) = 0" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1216 |
by auto |
60435 | 1217 |
have cont_eq: "\<And>g. (\<lambda>(x,l). content l *\<^sub>R f x) \<circ> (\<lambda>(x,l). (x,g l)) = (\<lambda>(x,l). content (g l) *\<^sub>R f x)" |
1218 |
by auto |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1219 |
have *: "\<And>\<G> :: 'a set \<Rightarrow> 'a set. |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1220 |
(\<Sum>(x,K)\<in>{(x, \<G> K) |x K. (x,K) \<in> p \<and> \<G> K \<noteq> {}}. content K *\<^sub>R f x) = |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1221 |
(\<Sum>(x,K)\<in>(\<lambda>(x,K). (x, \<G> K)) ` p. content K *\<^sub>R f x)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1222 |
by (rule sum.mono_neutral_left) (auto simp: \<open>finite p\<close>) |
53468 | 1223 |
have "((\<Sum>(x, k)\<in>?M1. content k *\<^sub>R f x) - i) + ((\<Sum>(x, k)\<in>?M2. content k *\<^sub>R f x) - j) = |
1224 |
(\<Sum>(x, k)\<in>?M1. content k *\<^sub>R f x) + (\<Sum>(x, k)\<in>?M2. content k *\<^sub>R f x) - (i + j)" |
|
1225 |
by auto |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1226 |
moreover have "\<dots> = (\<Sum>(x,K) \<in> p. content (K \<inter> {x. x \<bullet> k \<le> c}) *\<^sub>R f x) + |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1227 |
(\<Sum>(x,K) \<in> p. content (K \<inter> {x. c \<le> x \<bullet> k}) *\<^sub>R f x) - (i + j)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1228 |
unfolding * |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1229 |
apply (subst (1 2) sum.reindex_nontrivial) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1230 |
apply (auto intro!: k p eq0 tagged_division_split_left_inj_content tagged_division_split_right_inj_content |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1231 |
simp: cont_eq \<open>finite p\<close>) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1232 |
done |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1233 |
moreover have "\<And>x. x \<in> p \<Longrightarrow> (\<lambda>(a,B). content (B \<inter> {a. a \<bullet> k \<le> c}) *\<^sub>R f a) x + |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1234 |
(\<lambda>(a,B). content (B \<inter> {a. c \<le> a \<bullet> k}) *\<^sub>R f a) x = |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1235 |
(\<lambda>(a,B). content B *\<^sub>R f a) x" |
60435 | 1236 |
proof clarify |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1237 |
fix a B |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1238 |
assume "(a, B) \<in> p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1239 |
with p obtain u v where uv: "B = cbox u v" by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1240 |
then show "content (B \<inter> {x. x \<bullet> k \<le> c}) *\<^sub>R f a + content (B \<inter> {x. c \<le> x \<bullet> k}) *\<^sub>R f a = content B *\<^sub>R f a" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1241 |
by (auto simp: scaleR_left_distrib uv content_split[OF k,of u v c]) |
53468 | 1242 |
qed |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1243 |
ultimately show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1244 |
by (auto simp: sum.distrib[symmetric]) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1245 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1246 |
ultimately show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - (i + j)) < e" |
53468 | 1247 |
by auto |
1248 |
qed |
|
1249 |
qed |
|
1250 |
||
35172 | 1251 |
|
60420 | 1252 |
subsection \<open>A sort of converse, integrability on subintervals.\<close> |
35172 | 1253 |
|
53494 | 1254 |
lemma has_integral_separate_sides: |
56188 | 1255 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
66359 | 1256 |
assumes f: "(f has_integral i) (cbox a b)" |
53494 | 1257 |
and "e > 0" |
1258 |
and k: "k \<in> Basis" |
|
1259 |
obtains d where "gauge d" |
|
56188 | 1260 |
"\<forall>p1 p2. p1 tagged_division_of (cbox a b \<inter> {x. x\<bullet>k \<le> c}) \<and> d fine p1 \<and> |
1261 |
p2 tagged_division_of (cbox a b \<inter> {x. x\<bullet>k \<ge> c}) \<and> d fine p2 \<longrightarrow> |
|
64267 | 1262 |
norm ((sum (\<lambda>(x,k). content k *\<^sub>R f x) p1 + sum (\<lambda>(x,k). content k *\<^sub>R f x) p2) - i) < e" |
53494 | 1263 |
proof - |
66359 | 1264 |
obtain \<gamma> where d: "gauge \<gamma>" |
1265 |
"\<And>p. \<lbrakk>p tagged_division_of cbox a b; \<gamma> fine p\<rbrakk> |
|
1266 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - i) < e" |
|
1267 |
using has_integralD[OF f \<open>e > 0\<close>] by metis |
|
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1268 |
{ fix p1 p2 |
66359 | 1269 |
assume tdiv1: "p1 tagged_division_of (cbox a b) \<inter> {x. x \<bullet> k \<le> c}" and "\<gamma> fine p1" |
1270 |
note p1=tagged_division_ofD[OF this(1)] |
|
1271 |
assume tdiv2: "p2 tagged_division_of (cbox a b) \<inter> {x. c \<le> x \<bullet> k}" and "\<gamma> fine p2" |
|
1272 |
note p2=tagged_division_ofD[OF this(1)] |
|
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
1273 |
note tagged_division_Un_interval[OF tdiv1 tdiv2] |
66359 | 1274 |
note p12 = tagged_division_ofD[OF this] this |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1275 |
{ fix a b |
53494 | 1276 |
assume ab: "(a, b) \<in> p1 \<inter> p2" |
1277 |
have "(a, b) \<in> p1" |
|
1278 |
using ab by auto |
|
66359 | 1279 |
obtain u v where uv: "b = cbox u v" |
1280 |
using \<open>(a, b) \<in> p1\<close> p1(4) by moura |
|
53494 | 1281 |
have "b \<subseteq> {x. x\<bullet>k = c}" |
1282 |
using ab p1(3)[of a b] p2(3)[of a b] by fastforce |
|
1283 |
moreover |
|
1284 |
have "interior {x::'a. x \<bullet> k = c} = {}" |
|
1285 |
proof (rule ccontr) |
|
1286 |
assume "\<not> ?thesis" |
|
1287 |
then obtain x where x: "x \<in> interior {x::'a. x\<bullet>k = c}" |
|
1288 |
by auto |
|
66359 | 1289 |
then obtain \<epsilon> where "0 < \<epsilon>" and \<epsilon>: "ball x \<epsilon> \<subseteq> {x. x \<bullet> k = c}" |
1290 |
using mem_interior by metis |
|
53494 | 1291 |
have x: "x\<bullet>k = c" |
1292 |
using x interior_subset by fastforce |
|
66359 | 1293 |
have *: "\<And>i. i \<in> Basis \<Longrightarrow> \<bar>(x - (x + (\<epsilon> / 2) *\<^sub>R k)) \<bullet> i\<bar> = (if i = k then \<epsilon>/2 else 0)" |
1294 |
using \<open>0 < \<epsilon>\<close> k by (auto simp: inner_simps inner_not_same_Basis) |
|
1295 |
have "(\<Sum>i\<in>Basis. \<bar>(x - (x + (\<epsilon> / 2 ) *\<^sub>R k)) \<bullet> i\<bar>) = |
|
1296 |
(\<Sum>i\<in>Basis. (if i = k then \<epsilon> / 2 else 0))" |
|
64267 | 1297 |
using "*" by (blast intro: sum.cong) |
66359 | 1298 |
also have "\<dots> < \<epsilon>" |
1299 |
by (subst sum.delta) (use \<open>0 < \<epsilon>\<close> in auto) |
|
1300 |
finally have "x + (\<epsilon>/2) *\<^sub>R k \<in> ball x \<epsilon>" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1301 |
unfolding mem_ball dist_norm by(rule le_less_trans[OF norm_le_l1]) |
66359 | 1302 |
then have "x + (\<epsilon>/2) *\<^sub>R k \<in> {x. x\<bullet>k = c}" |
1303 |
using \<epsilon> by auto |
|
53494 | 1304 |
then show False |
66359 | 1305 |
using \<open>0 < \<epsilon>\<close> x k by (auto simp: inner_simps) |
53494 | 1306 |
qed |
1307 |
ultimately have "content b = 0" |
|
1308 |
unfolding uv content_eq_0_interior |
|
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1309 |
using interior_mono by blast |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1310 |
then have "content b *\<^sub>R f a = 0" |
53494 | 1311 |
by auto |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1312 |
} |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1313 |
then have "norm ((\<Sum>(x, k)\<in>p1. content k *\<^sub>R f x) + (\<Sum>(x, k)\<in>p2. content k *\<^sub>R f x) - i) = |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1314 |
norm ((\<Sum>(x, k)\<in>p1 \<union> p2. content k *\<^sub>R f x) - i)" |
64267 | 1315 |
by (subst sum.union_inter_neutral) (auto simp: p1 p2) |
53494 | 1316 |
also have "\<dots> < e" |
66359 | 1317 |
using d(2) p12 by (simp add: fine_Un k \<open>\<gamma> fine p1\<close> \<open>\<gamma> fine p2\<close>) |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1318 |
finally have "norm ((\<Sum>(x, k)\<in>p1. content k *\<^sub>R f x) + (\<Sum>(x, k)\<in>p2. content k *\<^sub>R f x) - i) < e" . |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1319 |
} |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1320 |
then show ?thesis |
66359 | 1321 |
using d(1) that by auto |
53494 | 1322 |
qed |
35172 | 1323 |
|
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1324 |
lemma integrable_split [intro]: |
56188 | 1325 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::{real_normed_vector,complete_space}" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1326 |
assumes f: "f integrable_on cbox a b" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1327 |
and k: "k \<in> Basis" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1328 |
shows "f integrable_on (cbox a b \<inter> {x. x\<bullet>k \<le> c})" (is ?thesis1) |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1329 |
and "f integrable_on (cbox a b \<inter> {x. x\<bullet>k \<ge> c})" (is ?thesis2) |
53494 | 1330 |
proof - |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1331 |
obtain y where y: "(f has_integral y) (cbox a b)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1332 |
using f by blast |
63040 | 1333 |
define a' where "a' = (\<Sum>i\<in>Basis. (if i = k then max (a\<bullet>k) c else a\<bullet>i)*\<^sub>R i)" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1334 |
define b' where "b' = (\<Sum>i\<in>Basis. (if i = k then min (b\<bullet>k) c else b\<bullet>i)*\<^sub>R i)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1335 |
have "\<exists>d. gauge d \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1336 |
(\<forall>p1 p2. p1 tagged_division_of cbox a b \<inter> {x. x \<bullet> k \<le> c} \<and> d fine p1 \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1337 |
p2 tagged_division_of cbox a b \<inter> {x. x \<bullet> k \<le> c} \<and> d fine p2 \<longrightarrow> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1338 |
norm ((\<Sum>(x,K) \<in> p1. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> p2. content K *\<^sub>R f x)) < e)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1339 |
if "e > 0" for e |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1340 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1341 |
have "e/2 > 0" using that by auto |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1342 |
with has_integral_separate_sides[OF y this k, of c] |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1343 |
obtain d |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1344 |
where "gauge d" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1345 |
and d: "\<And>p1 p2. \<lbrakk>p1 tagged_division_of cbox a b \<inter> {x. x \<bullet> k \<le> c}; d fine p1; |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1346 |
p2 tagged_division_of cbox a b \<inter> {x. c \<le> x \<bullet> k}; d fine p2\<rbrakk> |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1347 |
\<Longrightarrow> norm ((\<Sum>(x,K)\<in>p1. content K *\<^sub>R f x) + (\<Sum>(x,K)\<in>p2. content K *\<^sub>R f x) - y) < e/2" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1348 |
by metis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1349 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1350 |
proof (rule_tac x=d in exI, clarsimp simp add: \<open>gauge d\<close>) |
53494 | 1351 |
fix p1 p2 |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1352 |
assume as: "p1 tagged_division_of (cbox a b) \<inter> {x. x \<bullet> k \<le> c}" "d fine p1" |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1353 |
"p2 tagged_division_of (cbox a b) \<inter> {x. x \<bullet> k \<le> c}" "d fine p2" |
35172 | 1354 |
show "norm ((\<Sum>(x, k)\<in>p1. content k *\<^sub>R f x) - (\<Sum>(x, k)\<in>p2. content k *\<^sub>R f x)) < e" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1355 |
proof (rule fine_division_exists[OF \<open>gauge d\<close>, of a' b]) |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1356 |
fix p |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1357 |
assume "p tagged_division_of cbox a' b" "d fine p" |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1358 |
then show ?thesis |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1359 |
using as norm_triangle_half_l[OF d[of p1 p] d[of p2 p]] |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1360 |
unfolding interval_split[OF k] b'_def[symmetric] a'_def[symmetric] |
53494 | 1361 |
by (auto simp add: algebra_simps) |
1362 |
qed |
|
1363 |
qed |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1364 |
qed |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1365 |
with f show ?thesis1 |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1366 |
by (simp add: interval_split[OF k] integrable_Cauchy) |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1367 |
have "\<exists>d. gauge d \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1368 |
(\<forall>p1 p2. p1 tagged_division_of cbox a b \<inter> {x. x \<bullet> k \<ge> c} \<and> d fine p1 \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1369 |
p2 tagged_division_of cbox a b \<inter> {x. x \<bullet> k \<ge> c} \<and> d fine p2 \<longrightarrow> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1370 |
norm ((\<Sum>(x,K) \<in> p1. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> p2. content K *\<^sub>R f x)) < e)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1371 |
if "e > 0" for e |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1372 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1373 |
have "e/2 > 0" using that by auto |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1374 |
with has_integral_separate_sides[OF y this k, of c] |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1375 |
obtain d |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1376 |
where "gauge d" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1377 |
and d: "\<And>p1 p2. \<lbrakk>p1 tagged_division_of cbox a b \<inter> {x. x \<bullet> k \<le> c}; d fine p1; |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1378 |
p2 tagged_division_of cbox a b \<inter> {x. c \<le> x \<bullet> k}; d fine p2\<rbrakk> |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1379 |
\<Longrightarrow> norm ((\<Sum>(x,K)\<in>p1. content K *\<^sub>R f x) + (\<Sum>(x,K)\<in>p2. content K *\<^sub>R f x) - y) < e/2" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1380 |
by metis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1381 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1382 |
proof (rule_tac x=d in exI, clarsimp simp add: \<open>gauge d\<close>) |
53494 | 1383 |
fix p1 p2 |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1384 |
assume as: "p1 tagged_division_of (cbox a b) \<inter> {x. x \<bullet> k \<ge> c}" "d fine p1" |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1385 |
"p2 tagged_division_of (cbox a b) \<inter> {x. x \<bullet> k \<ge> c}" "d fine p2" |
35172 | 1386 |
show "norm ((\<Sum>(x, k)\<in>p1. content k *\<^sub>R f x) - (\<Sum>(x, k)\<in>p2. content k *\<^sub>R f x)) < e" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1387 |
proof (rule fine_division_exists[OF \<open>gauge d\<close>, of a b']) |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1388 |
fix p |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1389 |
assume "p tagged_division_of cbox a b'" "d fine p" |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1390 |
then show ?thesis |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1391 |
using as norm_triangle_half_l[OF d[of p p1] d[of p p2]] |
53494 | 1392 |
unfolding interval_split[OF k] b'_def[symmetric] a'_def[symmetric] |
53520 | 1393 |
by (auto simp add: algebra_simps) |
53494 | 1394 |
qed |
1395 |
qed |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1396 |
qed |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1397 |
with f show ?thesis2 |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1398 |
by (simp add: interval_split[OF k] integrable_Cauchy) |
53494 | 1399 |
qed |
1400 |
||
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
1401 |
lemma operative_integralI: |
56188 | 1402 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
1403 |
shows "operative (lift_option op +) (Some 0) |
63659 | 1404 |
(\<lambda>i. if f integrable_on i then Some (integral i f) else None)" |
1405 |
proof - |
|
1406 |
interpret comm_monoid "lift_option plus" "Some (0::'b)" |
|
1407 |
by (rule comm_monoid_lift_option) |
|
1408 |
(rule add.comm_monoid_axioms) |
|
1409 |
show ?thesis |
|
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
1410 |
proof |
63659 | 1411 |
fix a b c |
1412 |
fix k :: 'a |
|
1413 |
assume k: "k \<in> Basis" |
|
1414 |
show "(if f integrable_on cbox a b then Some (integral (cbox a b) f) else None) = |
|
1415 |
lift_option op + (if f integrable_on cbox a b \<inter> {x. x \<bullet> k \<le> c} then Some (integral (cbox a b \<inter> {x. x \<bullet> k \<le> c}) f) else None) |
|
1416 |
(if f integrable_on cbox a b \<inter> {x. c \<le> x \<bullet> k} then Some (integral (cbox a b \<inter> {x. c \<le> x \<bullet> k}) f) else None)" |
|
1417 |
proof (cases "f integrable_on cbox a b") |
|
1418 |
case True |
|
1419 |
with k show ?thesis |
|
1420 |
apply (simp add: integrable_split) |
|
1421 |
apply (rule integral_unique [OF has_integral_split[OF _ _ k]]) |
|
60440 | 1422 |
apply (auto intro: integrable_integral) |
53494 | 1423 |
done |
63659 | 1424 |
next |
1425 |
case False |
|
1426 |
have "\<not> (f integrable_on cbox a b \<inter> {x. x \<bullet> k \<le> c}) \<or> \<not> ( f integrable_on cbox a b \<inter> {x. c \<le> x \<bullet> k})" |
|
1427 |
proof (rule ccontr) |
|
1428 |
assume "\<not> ?thesis" |
|
1429 |
then have "f integrable_on cbox a b" |
|
1430 |
unfolding integrable_on_def |
|
1431 |
apply (rule_tac x="integral (cbox a b \<inter> {x. x \<bullet> k \<le> c}) f + integral (cbox a b \<inter> {x. x \<bullet> k \<ge> c}) f" in exI) |
|
1432 |
apply (rule has_integral_split[OF _ _ k]) |
|
1433 |
apply (auto intro: integrable_integral) |
|
1434 |
done |
|
1435 |
then show False |
|
1436 |
using False by auto |
|
1437 |
qed |
|
1438 |
then show ?thesis |
|
53494 | 1439 |
using False by auto |
1440 |
qed |
|
63659 | 1441 |
next |
1442 |
fix a b :: 'a |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1443 |
assume "box a b = {}" |
63659 | 1444 |
then show "(if f integrable_on cbox a b then Some (integral (cbox a b) f) else None) = Some 0" |
1445 |
using has_integral_null_eq |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1446 |
by (auto simp: integrable_on_null content_eq_0_interior) |
63659 | 1447 |
qed |
53494 | 1448 |
qed |
1449 |
||
60420 | 1450 |
subsection \<open>Bounds on the norm of Riemann sums and the integral itself.\<close> |
35172 | 1451 |
|
53494 | 1452 |
lemma dsum_bound: |
56188 | 1453 |
assumes "p division_of (cbox a b)" |
53494 | 1454 |
and "norm c \<le> e" |
64267 | 1455 |
shows "norm (sum (\<lambda>l. content l *\<^sub>R c) p) \<le> e * content(cbox a b)" |
60467 | 1456 |
proof - |
64267 | 1457 |
have sumeq: "(\<Sum>i\<in>p. \<bar>content i\<bar>) = sum content p" |
1458 |
apply (rule sum.cong) |
|
60467 | 1459 |
using assms |
1460 |
apply simp |
|
1461 |
apply (metis abs_of_nonneg assms(1) content_pos_le division_ofD(4)) |
|
1462 |
done |
|
1463 |
have e: "0 \<le> e" |
|
1464 |
using assms(2) norm_ge_zero order_trans by blast |
|
64267 | 1465 |
have "norm (sum (\<lambda>l. content l *\<^sub>R c) p) \<le> (\<Sum>i\<in>p. norm (content i *\<^sub>R c))" |
1466 |
using norm_sum by blast |
|
60467 | 1467 |
also have "... \<le> e * (\<Sum>i\<in>p. \<bar>content i\<bar>)" |
64267 | 1468 |
by (simp add: sum_distrib_left[symmetric] mult.commute assms(2) mult_right_mono sum_nonneg) |
60467 | 1469 |
also have "... \<le> e * content (cbox a b)" |
1470 |
apply (rule mult_left_mono [OF _ e]) |
|
1471 |
apply (simp add: sumeq) |
|
1472 |
using additive_content_division assms(1) eq_iff apply blast |
|
1473 |
done |
|
1474 |
finally show ?thesis . |
|
1475 |
qed |
|
53494 | 1476 |
|
1477 |
lemma rsum_bound: |
|
60472 | 1478 |
assumes p: "p tagged_division_of (cbox a b)" |
1479 |
and "\<forall>x\<in>cbox a b. norm (f x) \<le> e" |
|
64267 | 1480 |
shows "norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p) \<le> e * content (cbox a b)" |
56188 | 1481 |
proof (cases "cbox a b = {}") |
60472 | 1482 |
case True show ?thesis |
1483 |
using p unfolding True tagged_division_of_trivial by auto |
|
53494 | 1484 |
next |
1485 |
case False |
|
60472 | 1486 |
then have e: "e \<ge> 0" |
63018
ae2ec7d86ad4
tidying some proofs; getting rid of "nonempty_witness"
paulson <lp15@cam.ac.uk>
parents:
63007
diff
changeset
|
1487 |
by (meson ex_in_conv assms(2) norm_ge_zero order_trans) |
64267 | 1488 |
have sum_le: "sum (content \<circ> snd) p \<le> content (cbox a b)" |
60472 | 1489 |
unfolding additive_content_tagged_division[OF p, symmetric] split_def |
1490 |
by (auto intro: eq_refl) |
|
1491 |
have con: "\<And>xk. xk \<in> p \<Longrightarrow> 0 \<le> content (snd xk)" |
|
1492 |
using tagged_division_ofD(4) [OF p] content_pos_le |
|
1493 |
by force |
|
1494 |
have norm: "\<And>xk. xk \<in> p \<Longrightarrow> norm (f (fst xk)) \<le> e" |
|
1495 |
unfolding fst_conv using tagged_division_ofD(2,3)[OF p] assms |
|
1496 |
by (metis prod.collapse subset_eq) |
|
64267 | 1497 |
have "norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p) \<le> (\<Sum>i\<in>p. norm (case i of (x, k) \<Rightarrow> content k *\<^sub>R f x))" |
1498 |
by (rule norm_sum) |
|
60472 | 1499 |
also have "... \<le> e * content (cbox a b)" |
53494 | 1500 |
unfolding split_def norm_scaleR |
64267 | 1501 |
apply (rule order_trans[OF sum_mono]) |
53494 | 1502 |
apply (rule mult_left_mono[OF _ abs_ge_zero, of _ e]) |
60472 | 1503 |
apply (metis norm) |
64267 | 1504 |
unfolding sum_distrib_right[symmetric] |
1505 |
using con sum_le |
|
60472 | 1506 |
apply (auto simp: mult.commute intro: mult_left_mono [OF _ e]) |
1507 |
done |
|
1508 |
finally show ?thesis . |
|
53494 | 1509 |
qed |
35172 | 1510 |
|
1511 |
lemma rsum_diff_bound: |
|
56188 | 1512 |
assumes "p tagged_division_of (cbox a b)" |
1513 |
and "\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e" |
|
64267 | 1514 |
shows "norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p - sum (\<lambda>(x,k). content k *\<^sub>R g x) p) \<le> |
60472 | 1515 |
e * content (cbox a b)" |
53494 | 1516 |
apply (rule order_trans[OF _ rsum_bound[OF assms]]) |
64267 | 1517 |
apply (simp add: split_def scaleR_diff_right sum_subtractf eq_refl) |
53494 | 1518 |
done |
1519 |
||
1520 |
lemma has_integral_bound: |
|
56188 | 1521 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
53494 | 1522 |
assumes "0 \<le> B" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1523 |
and f: "(f has_integral i) (cbox a b)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1524 |
and "\<And>x. x\<in>cbox a b \<Longrightarrow> norm (f x) \<le> B" |
60472 | 1525 |
shows "norm i \<le> B * content (cbox a b)" |
1526 |
proof (rule ccontr) |
|
53494 | 1527 |
assume "\<not> ?thesis" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1528 |
then have "norm i - B * content (cbox a b) > 0" |
53494 | 1529 |
by auto |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1530 |
with f[unfolded has_integral] |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1531 |
obtain \<gamma> where "gauge \<gamma>" and \<gamma>: |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1532 |
"\<And>p. \<lbrakk>p tagged_division_of cbox a b; \<gamma> fine p\<rbrakk> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1533 |
\<Longrightarrow> norm ((\<Sum>(x, K)\<in>p. content K *\<^sub>R f x) - i) < norm i - B * content (cbox a b)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1534 |
by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1535 |
then obtain p where p: "p tagged_division_of cbox a b" and "\<gamma> fine p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1536 |
using fine_division_exists by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1537 |
have "\<And>s B. norm s \<le> B \<Longrightarrow> \<not> norm (s - i) < norm i - B" |
60472 | 1538 |
unfolding not_less |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1539 |
by (metis diff_left_mono dist_commute dist_norm norm_triangle_ineq2 order_trans) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1540 |
then show False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1541 |
using \<gamma> [OF p \<open>\<gamma> fine p\<close>] rsum_bound[OF p] assms by metis |
53494 | 1542 |
qed |
1543 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1544 |
corollary has_integral_bound_real: |
56188 | 1545 |
fixes f :: "real \<Rightarrow> 'b::real_normed_vector" |
1546 |
assumes "0 \<le> B" |
|
66402 | 1547 |
and "(f has_integral i) {a..b}" |
1548 |
and "\<forall>x\<in>{a..b}. norm (f x) \<le> B" |
|
1549 |
shows "norm i \<le> B * content {a..b}" |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1550 |
by (metis assms box_real(2) has_integral_bound) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1551 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1552 |
corollary integrable_bound: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1553 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1554 |
assumes "0 \<le> B" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1555 |
and "f integrable_on (cbox a b)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1556 |
and "\<And>x. x\<in>cbox a b \<Longrightarrow> norm (f x) \<le> B" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1557 |
shows "norm (integral (cbox a b) f) \<le> B * content (cbox a b)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1558 |
by (metis integrable_integral has_integral_bound assms) |
56188 | 1559 |
|
35172 | 1560 |
|
60420 | 1561 |
subsection \<open>Similar theorems about relationship among components.\<close> |
35172 | 1562 |
|
53494 | 1563 |
lemma rsum_component_le: |
56188 | 1564 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1565 |
assumes p: "p tagged_division_of (cbox a b)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1566 |
and "\<And>x. x \<in> cbox a b \<Longrightarrow> (f x)\<bullet>i \<le> (g x)\<bullet>i" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1567 |
shows "(\<Sum>(x, K)\<in>p. content K *\<^sub>R f x) \<bullet> i \<le> (\<Sum>(x, K)\<in>p. content K *\<^sub>R g x) \<bullet> i" |
64267 | 1568 |
unfolding inner_sum_left |
1569 |
proof (rule sum_mono, clarify) |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1570 |
fix x K |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1571 |
assume ab: "(x, K) \<in> p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1572 |
with p obtain u v where K: "K = cbox u v" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1573 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1574 |
then show "(content K *\<^sub>R f x) \<bullet> i \<le> (content K *\<^sub>R g x) \<bullet> i" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1575 |
by (metis ab assms inner_scaleR_left measure_nonneg mult_left_mono tag_in_interval) |
53494 | 1576 |
qed |
35172 | 1577 |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1578 |
lemma has_integral_component_le: |
56188 | 1579 |
fixes f g :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1580 |
assumes k: "k \<in> Basis" |
66199 | 1581 |
assumes "(f has_integral i) S" "(g has_integral j) S" |
1582 |
and f_le_g: "\<And>x. x \<in> S \<Longrightarrow> (f x)\<bullet>k \<le> (g x)\<bullet>k" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1583 |
shows "i\<bullet>k \<le> j\<bullet>k" |
50348 | 1584 |
proof - |
66199 | 1585 |
have ik_le_jk: "i\<bullet>k \<le> j\<bullet>k" |
61165 | 1586 |
if f_i: "(f has_integral i) (cbox a b)" |
1587 |
and g_j: "(g has_integral j) (cbox a b)" |
|
1588 |
and le: "\<forall>x\<in>cbox a b. (f x)\<bullet>k \<le> (g x)\<bullet>k" |
|
1589 |
for a b i and j :: 'b and f g :: "'a \<Rightarrow> 'b" |
|
50348 | 1590 |
proof (rule ccontr) |
61165 | 1591 |
assume "\<not> ?thesis" |
53494 | 1592 |
then have *: "0 < (i\<bullet>k - j\<bullet>k) / 3" |
1593 |
by auto |
|
66199 | 1594 |
obtain \<gamma>1 where "gauge \<gamma>1" |
1595 |
and \<gamma>1: "\<And>p. \<lbrakk>p tagged_division_of cbox a b; \<gamma>1 fine p\<rbrakk> |
|
1596 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - i) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1597 |
using f_i[unfolded has_integral,rule_format,OF *] by fastforce |
|
1598 |
obtain \<gamma>2 where "gauge \<gamma>2" |
|
1599 |
and \<gamma>2: "\<And>p. \<lbrakk>p tagged_division_of cbox a b; \<gamma>2 fine p\<rbrakk> |
|
1600 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R g x) - j) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1601 |
using g_j[unfolded has_integral,rule_format,OF *] by fastforce |
|
1602 |
obtain p where p: "p tagged_division_of cbox a b" and "\<gamma>1 fine p" "\<gamma>2 fine p" |
|
1603 |
using fine_division_exists[OF gauge_Int[OF \<open>gauge \<gamma>1\<close> \<open>gauge \<gamma>2\<close>], of a b] unfolding fine_Int |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1604 |
by metis |
60474 | 1605 |
then have "\<bar>((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - i) \<bullet> k\<bar> < (i \<bullet> k - j \<bullet> k) / 3" |
66199 | 1606 |
"\<bar>((\<Sum>(x, k)\<in>p. content k *\<^sub>R g x) - j) \<bullet> k\<bar> < (i \<bullet> k - j \<bullet> k) / 3" |
1607 |
using le_less_trans[OF Basis_le_norm[OF k]] k \<gamma>1 \<gamma>2 by metis+ |
|
53494 | 1608 |
then show False |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1609 |
unfolding inner_simps |
66199 | 1610 |
using rsum_component_le[OF p] le |
1611 |
by (fastforce simp add: abs_real_def split: if_split_asm) |
|
53494 | 1612 |
qed |
60474 | 1613 |
show ?thesis |
66199 | 1614 |
proof (cases "\<exists>a b. S = cbox a b") |
60474 | 1615 |
case True |
66199 | 1616 |
with ik_le_jk assms show ?thesis |
60474 | 1617 |
by auto |
1618 |
next |
|
1619 |
case False |
|
1620 |
show ?thesis |
|
1621 |
proof (rule ccontr) |
|
1622 |
assume "\<not> i\<bullet>k \<le> j\<bullet>k" |
|
1623 |
then have ij: "(i\<bullet>k - j\<bullet>k) / 3 > 0" |
|
1624 |
by auto |
|
66199 | 1625 |
obtain B1 where "0 < B1" |
1626 |
and B1: "\<And>a b. ball 0 B1 \<subseteq> cbox a b \<Longrightarrow> |
|
1627 |
\<exists>z. ((\<lambda>x. if x \<in> S then f x else 0) has_integral z) (cbox a b) \<and> |
|
1628 |
norm (z - i) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1629 |
using has_integral_altD[OF _ False ij] assms by blast |
|
1630 |
obtain B2 where "0 < B2" |
|
1631 |
and B2: "\<And>a b. ball 0 B2 \<subseteq> cbox a b \<Longrightarrow> |
|
1632 |
\<exists>z. ((\<lambda>x. if x \<in> S then g x else 0) has_integral z) (cbox a b) \<and> |
|
1633 |
norm (z - j) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1634 |
using has_integral_altD[OF _ False ij] assms by blast |
|
60474 | 1635 |
have "bounded (ball 0 B1 \<union> ball (0::'a) B2)" |
1636 |
unfolding bounded_Un by(rule conjI bounded_ball)+ |
|
66199 | 1637 |
from bounded_subset_cbox[OF this] |
1638 |
obtain a b::'a where ab: "ball 0 B1 \<subseteq> cbox a b" "ball 0 B2 \<subseteq> cbox a b" |
|
66193 | 1639 |
by blast+ |
66199 | 1640 |
then obtain w1 w2 where int_w1: "((\<lambda>x. if x \<in> S then f x else 0) has_integral w1) (cbox a b)" |
1641 |
and norm_w1: "norm (w1 - i) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1642 |
and int_w2: "((\<lambda>x. if x \<in> S then g x else 0) has_integral w2) (cbox a b)" |
|
1643 |
and norm_w2: "norm (w2 - j) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1644 |
using B1 B2 by blast |
|
60474 | 1645 |
have *: "\<And>w1 w2 j i::real .\<bar>w1 - i\<bar> < (i - j) / 3 \<Longrightarrow> \<bar>w2 - j\<bar> < (i - j) / 3 \<Longrightarrow> w1 \<le> w2 \<Longrightarrow> False" |
62390 | 1646 |
by (simp add: abs_real_def split: if_split_asm) |
66199 | 1647 |
have "\<bar>(w1 - i) \<bullet> k\<bar> < (i \<bullet> k - j \<bullet> k) / 3" |
1648 |
"\<bar>(w2 - j) \<bullet> k\<bar> < (i \<bullet> k - j \<bullet> k) / 3" |
|
1649 |
using Basis_le_norm k le_less_trans norm_w1 norm_w2 by blast+ |
|
60474 | 1650 |
moreover |
1651 |
have "w1\<bullet>k \<le> w2\<bullet>k" |
|
66199 | 1652 |
using ik_le_jk int_w1 int_w2 f_le_g by auto |
60474 | 1653 |
ultimately show False |
1654 |
unfolding inner_simps by(rule *) |
|
1655 |
qed |
|
1656 |
qed |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1657 |
qed |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36899
diff
changeset
|
1658 |
|
53494 | 1659 |
lemma integral_component_le: |
56188 | 1660 |
fixes g f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53494 | 1661 |
assumes "k \<in> Basis" |
66199 | 1662 |
and "f integrable_on S" "g integrable_on S" |
1663 |
and "\<And>x. x \<in> S \<Longrightarrow> (f x)\<bullet>k \<le> (g x)\<bullet>k" |
|
1664 |
shows "(integral S f)\<bullet>k \<le> (integral S g)\<bullet>k" |
|
53494 | 1665 |
apply (rule has_integral_component_le) |
1666 |
using integrable_integral assms |
|
1667 |
apply auto |
|
1668 |
done |
|
1669 |
||
1670 |
lemma has_integral_component_nonneg: |
|
56188 | 1671 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53494 | 1672 |
assumes "k \<in> Basis" |
66199 | 1673 |
and "(f has_integral i) S" |
1674 |
and "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> (f x)\<bullet>k" |
|
53494 | 1675 |
shows "0 \<le> i\<bullet>k" |
1676 |
using has_integral_component_le[OF assms(1) has_integral_0 assms(2)] |
|
1677 |
using assms(3-) |
|
1678 |
by auto |
|
1679 |
||
1680 |
lemma integral_component_nonneg: |
|
56188 | 1681 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53494 | 1682 |
assumes "k \<in> Basis" |
66199 | 1683 |
and "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> (f x)\<bullet>k" |
1684 |
shows "0 \<le> (integral S f)\<bullet>k" |
|
1685 |
proof (cases "f integrable_on S") |
|
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
1686 |
case True show ?thesis |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
1687 |
apply (rule has_integral_component_nonneg) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
1688 |
using assms True |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
1689 |
apply auto |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
1690 |
done |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
1691 |
next |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
1692 |
case False then show ?thesis by (simp add: not_integrable_integral) |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
1693 |
qed |
53494 | 1694 |
|
1695 |
lemma has_integral_component_neg: |
|
56188 | 1696 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53494 | 1697 |
assumes "k \<in> Basis" |
66199 | 1698 |
and "(f has_integral i) S" |
1699 |
and "\<And>x. x \<in> S \<Longrightarrow> (f x)\<bullet>k \<le> 0" |
|
53494 | 1700 |
shows "i\<bullet>k \<le> 0" |
1701 |
using has_integral_component_le[OF assms(1,2) has_integral_0] assms(2-) |
|
1702 |
by auto |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1703 |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1704 |
lemma has_integral_component_lbound: |
56188 | 1705 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
1706 |
assumes "(f has_integral i) (cbox a b)" |
|
1707 |
and "\<forall>x\<in>cbox a b. B \<le> f(x)\<bullet>k" |
|
53494 | 1708 |
and "k \<in> Basis" |
56188 | 1709 |
shows "B * content (cbox a b) \<le> i\<bullet>k" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1710 |
using has_integral_component_le[OF assms(3) has_integral_const assms(1),of "(\<Sum>i\<in>Basis. B *\<^sub>R i)::'b"] assms(2-) |
53494 | 1711 |
by (auto simp add: field_simps) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1712 |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1713 |
lemma has_integral_component_ubound: |
56188 | 1714 |
fixes f::"'a::euclidean_space => 'b::euclidean_space" |
1715 |
assumes "(f has_integral i) (cbox a b)" |
|
1716 |
and "\<forall>x\<in>cbox a b. f x\<bullet>k \<le> B" |
|
53494 | 1717 |
and "k \<in> Basis" |
56188 | 1718 |
shows "i\<bullet>k \<le> B * content (cbox a b)" |
53494 | 1719 |
using has_integral_component_le[OF assms(3,1) has_integral_const, of "\<Sum>i\<in>Basis. B *\<^sub>R i"] assms(2-) |
1720 |
by (auto simp add: field_simps) |
|
1721 |
||
1722 |
lemma integral_component_lbound: |
|
56188 | 1723 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
1724 |
assumes "f integrable_on cbox a b" |
|
1725 |
and "\<forall>x\<in>cbox a b. B \<le> f(x)\<bullet>k" |
|
53494 | 1726 |
and "k \<in> Basis" |
56188 | 1727 |
shows "B * content (cbox a b) \<le> (integral(cbox a b) f)\<bullet>k" |
53494 | 1728 |
apply (rule has_integral_component_lbound) |
1729 |
using assms |
|
1730 |
unfolding has_integral_integral |
|
1731 |
apply auto |
|
1732 |
done |
|
1733 |
||
56190 | 1734 |
lemma integral_component_lbound_real: |
66402 | 1735 |
assumes "f integrable_on {a ::real..b}" |
1736 |
and "\<forall>x\<in>{a..b}. B \<le> f(x)\<bullet>k" |
|
56190 | 1737 |
and "k \<in> Basis" |
66402 | 1738 |
shows "B * content {a..b} \<le> (integral {a..b} f)\<bullet>k" |
56190 | 1739 |
using assms |
1740 |
by (metis box_real(2) integral_component_lbound) |
|
1741 |
||
53494 | 1742 |
lemma integral_component_ubound: |
56188 | 1743 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
1744 |
assumes "f integrable_on cbox a b" |
|
1745 |
and "\<forall>x\<in>cbox a b. f x\<bullet>k \<le> B" |
|
53494 | 1746 |
and "k \<in> Basis" |
56188 | 1747 |
shows "(integral (cbox a b) f)\<bullet>k \<le> B * content (cbox a b)" |
53494 | 1748 |
apply (rule has_integral_component_ubound) |
1749 |
using assms |
|
1750 |
unfolding has_integral_integral |
|
1751 |
apply auto |
|
1752 |
done |
|
1753 |
||
56190 | 1754 |
lemma integral_component_ubound_real: |
1755 |
fixes f :: "real \<Rightarrow> 'a::euclidean_space" |
|
66402 | 1756 |
assumes "f integrable_on {a..b}" |
1757 |
and "\<forall>x\<in>{a..b}. f x\<bullet>k \<le> B" |
|
56190 | 1758 |
and "k \<in> Basis" |
66402 | 1759 |
shows "(integral {a..b} f)\<bullet>k \<le> B * content {a..b}" |
56190 | 1760 |
using assms |
1761 |
by (metis box_real(2) integral_component_ubound) |
|
35172 | 1762 |
|
60420 | 1763 |
subsection \<open>Uniform limit of integrable functions is integrable.\<close> |
35172 | 1764 |
|
62626
de25474ce728
Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1765 |
lemma real_arch_invD: |
de25474ce728
Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1766 |
"0 < (e::real) \<Longrightarrow> (\<exists>n::nat. n \<noteq> 0 \<and> 0 < inverse (real n) \<and> inverse (real n) < e)" |
de25474ce728
Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1767 |
by (subst(asm) real_arch_inverse) |
de25474ce728
Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1768 |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1769 |
|
53494 | 1770 |
lemma integrable_uniform_limit: |
56188 | 1771 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1772 |
assumes "\<And>e. e > 0 \<Longrightarrow> \<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b" |
56188 | 1773 |
shows "f integrable_on cbox a b" |
60487 | 1774 |
proof (cases "content (cbox a b) > 0") |
1775 |
case False then show ?thesis |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1776 |
using has_integral_null by (simp add: content_lt_nz integrable_on_def) |
60487 | 1777 |
next |
1778 |
case True |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1779 |
have "1 / (real n + 1) > 0" for n |
53494 | 1780 |
by auto |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1781 |
then have "\<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> 1 / (real n + 1)) \<and> g integrable_on cbox a b" for n |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1782 |
using assms by blast |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1783 |
then obtain g where g_near_f: "\<And>n x. x \<in> cbox a b \<Longrightarrow> norm (f x - g n x) \<le> 1 / (real n + 1)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1784 |
and int_g: "\<And>n. g n integrable_on cbox a b" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1785 |
by metis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1786 |
then obtain h where h: "\<And>n. (g n has_integral h n) (cbox a b)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1787 |
unfolding integrable_on_def by metis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1788 |
have "Cauchy h" |
53494 | 1789 |
unfolding Cauchy_def |
60487 | 1790 |
proof clarify |
53494 | 1791 |
fix e :: real |
1792 |
assume "e>0" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1793 |
then have "e/4 / content (cbox a b) > 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1794 |
using True by (auto simp: field_simps) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1795 |
then obtain M where "M \<noteq> 0" and M: "1 / (real M) < e/4 / content (cbox a b)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1796 |
by (metis inverse_eq_divide real_arch_inverse) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1797 |
show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (h m) (h n) < e" |
60487 | 1798 |
proof (rule exI [where x=M], clarify) |
1799 |
fix m n |
|
1800 |
assume m: "M \<le> m" and n: "M \<le> n" |
|
60420 | 1801 |
have "e/4>0" using \<open>e>0\<close> by auto |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1802 |
then obtain gm gn where "gauge gm" "gauge gn" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1803 |
and gm: "\<And>\<D>. \<D> tagged_division_of cbox a b \<and> gm fine \<D> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1804 |
\<Longrightarrow> norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g m x) - h m) < e/4" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1805 |
and gn: "\<And>\<D>. \<D> tagged_division_of cbox a b \<and> gn fine \<D> \<Longrightarrow> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1806 |
norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g n x) - h n) < e/4" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1807 |
using h[unfolded has_integral] by meson |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1808 |
then obtain \<D> where \<D>: "\<D> tagged_division_of cbox a b" "(\<lambda>x. gm x \<inter> gn x) fine \<D>" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1809 |
by (metis (full_types) fine_division_exists gauge_Int) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1810 |
have triangle3: "norm (i1 - i2) < e" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1811 |
if no: "norm(s2 - s1) \<le> e/2" "norm (s1 - i1) < e/4" "norm (s2 - i2) < e/4" for s1 s2 i1 and i2::'b |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1812 |
proof - |
53494 | 1813 |
have "norm (i1 - i2) \<le> norm (i1 - s1) + norm (s1 - s2) + norm (s2 - i2)" |
35172 | 1814 |
using norm_triangle_ineq[of "i1 - s1" "s1 - i2"] |
53494 | 1815 |
using norm_triangle_ineq[of "s1 - s2" "s2 - i2"] |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1816 |
by (auto simp: algebra_simps) |
53494 | 1817 |
also have "\<dots> < e" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1818 |
using no by (auto simp: algebra_simps norm_minus_commute) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1819 |
finally show ?thesis . |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1820 |
qed |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1821 |
have finep: "gm fine \<D>" "gn fine \<D>" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1822 |
using fine_Int \<D> by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1823 |
have norm_le: "norm (g n x - g m x) \<le> 2 / real M" if x: "x \<in> cbox a b" for x |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1824 |
proof - |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1825 |
have "norm (f x - g n x) + norm (f x - g m x) \<le> 1 / (real n + 1) + 1 / (real m + 1)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1826 |
using g_near_f[OF x, of n] g_near_f[OF x, of m] by simp |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1827 |
also have "\<dots> \<le> 1 / (real M) + 1 / (real M)" |
53494 | 1828 |
apply (rule add_mono) |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1829 |
using \<open>M \<noteq> 0\<close> m n by (auto simp: divide_simps) |
53494 | 1830 |
also have "\<dots> = 2 / real M" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1831 |
by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1832 |
finally show "norm (g n x - g m x) \<le> 2 / real M" |
35172 | 1833 |
using norm_triangle_le[of "g n x - f x" "f x - g m x" "2 / real M"] |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1834 |
by (auto simp: algebra_simps simp add: norm_minus_commute) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1835 |
qed |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1836 |
have "norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g n x) - (\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g m x)) \<le> 2 / real M * content (cbox a b)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1837 |
by (blast intro: norm_le rsum_diff_bound[OF \<D>(1), where e="2 / real M"]) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1838 |
also have "... \<le> e/2" |
60487 | 1839 |
using M True |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1840 |
by (auto simp: field_simps) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1841 |
finally have le_e2: "norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g n x) - (\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g m x)) \<le> e/2" . |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1842 |
then show "dist (h m) (h n) < e" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1843 |
unfolding dist_norm using gm gn \<D> finep by (auto intro!: triangle3) |
60487 | 1844 |
qed |
1845 |
qed |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1846 |
then obtain s where s: "h \<longlonglongrightarrow> s" |
64287 | 1847 |
using convergent_eq_Cauchy[symmetric] by blast |
53494 | 1848 |
show ?thesis |
60487 | 1849 |
unfolding integrable_on_def has_integral |
1850 |
proof (rule_tac x=s in exI, clarify) |
|
1851 |
fix e::real |
|
1852 |
assume e: "0 < e" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1853 |
then have "e/3 > 0" by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1854 |
then obtain N1 where N1: "\<forall>n\<ge>N1. norm (h n - s) < e/3" |
60487 | 1855 |
using LIMSEQ_D [OF s] by metis |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1856 |
from e True have "e/3 / content (cbox a b) > 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1857 |
by (auto simp: field_simps) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1858 |
then obtain N2 :: nat |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1859 |
where "N2 \<noteq> 0" and N2: "1 / (real N2) < e/3 / content (cbox a b)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1860 |
by (metis inverse_eq_divide real_arch_inverse) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1861 |
obtain g' where "gauge g'" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1862 |
and g': "\<And>\<D>. \<D> tagged_division_of cbox a b \<and> g' fine \<D> \<Longrightarrow> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1863 |
norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g (N1 + N2) x) - h (N1 + N2)) < e/3" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1864 |
by (metis h has_integral \<open>e/3 > 0\<close>) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1865 |
have *: "norm (sf - s) < e" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1866 |
if no: "norm (sf - sg) \<le> e/3" "norm(h - s) < e/3" "norm (sg - h) < e/3" for sf sg h |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1867 |
proof - |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1868 |
have "norm (sf - s) \<le> norm (sf - sg) + norm (sg - h) + norm (h - s)" |
35172 | 1869 |
using norm_triangle_ineq[of "sf - sg" "sg - s"] |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1870 |
using norm_triangle_ineq[of "sg - h" " h - s"] |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1871 |
by (auto simp: algebra_simps) |
53494 | 1872 |
also have "\<dots> < e" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1873 |
using no by (auto simp: algebra_simps norm_minus_commute) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1874 |
finally show ?thesis . |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1875 |
qed |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1876 |
{ fix \<D> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1877 |
assume ptag: "\<D> tagged_division_of (cbox a b)" and "g' fine \<D>" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1878 |
then have norm_less: "norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g (N1 + N2) x) - h (N1 + N2)) < e/3" |
60487 | 1879 |
using g' by blast |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1880 |
have "content (cbox a b) < e/3 * (of_nat N2)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1881 |
using \<open>N2 \<noteq> 0\<close> N2 using True by (auto simp: divide_simps) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1882 |
moreover have "e/3 * of_nat N2 \<le> e/3 * (of_nat (N1 + N2) + 1)" |
60487 | 1883 |
using \<open>e>0\<close> by auto |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1884 |
ultimately have "content (cbox a b) < e/3 * (of_nat (N1 + N2) + 1)" |
60487 | 1885 |
by linarith |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1886 |
then have le_e3: "1 / (real (N1 + N2) + 1) * content (cbox a b) \<le> e/3" |
60487 | 1887 |
unfolding inverse_eq_divide |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1888 |
by (auto simp: field_simps) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1889 |
have ne3: "norm (h (N1 + N2) - s) < e/3" |
60487 | 1890 |
using N1 by auto |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1891 |
have "norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g (N1 + N2) x)) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1892 |
\<le> 1 / (real (N1 + N2) + 1) * content (cbox a b)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1893 |
by (blast intro: g_near_f rsum_diff_bound[OF ptag]) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1894 |
then have "norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) - s) < e" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1895 |
by (rule *[OF order_trans [OF _ le_e3] ne3 norm_less]) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1896 |
} |
60487 | 1897 |
then show "\<exists>d. gauge d \<and> |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1898 |
(\<forall>\<D>. \<D> tagged_division_of cbox a b \<and> d fine \<D> \<longrightarrow> norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) - s) < e)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1899 |
by (blast intro: g' \<open>gauge g'\<close>) |
53494 | 1900 |
qed |
1901 |
qed |
|
1902 |
||
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
1903 |
lemmas integrable_uniform_limit_real = integrable_uniform_limit [where 'a=real, simplified] |
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
1904 |
|
35172 | 1905 |
|
60420 | 1906 |
subsection \<open>Negligible sets.\<close> |
35172 | 1907 |
|
56188 | 1908 |
definition "negligible (s:: 'a::euclidean_space set) \<longleftrightarrow> |
1909 |
(\<forall>a b. ((indicator s :: 'a\<Rightarrow>real) has_integral 0) (cbox a b))" |
|
53494 | 1910 |
|
35172 | 1911 |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1912 |
subsubsection \<open>Negligibility of hyperplane.\<close> |
35172 | 1913 |
|
53495 | 1914 |
lemma content_doublesplit: |
56188 | 1915 |
fixes a :: "'a::euclidean_space" |
53495 | 1916 |
assumes "0 < e" |
1917 |
and k: "k \<in> Basis" |
|
61945 | 1918 |
obtains d where "0 < d" and "content (cbox a b \<inter> {x. \<bar>x\<bullet>k - c\<bar> \<le> d}) < e" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1919 |
proof cases |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1920 |
assume *: "a \<bullet> k \<le> c \<and> c \<le> b \<bullet> k \<and> (\<forall>j\<in>Basis. a \<bullet> j \<le> b \<bullet> j)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1921 |
define a' where "a' d = (\<Sum>j\<in>Basis. (if j = k then max (a\<bullet>j) (c - d) else a\<bullet>j) *\<^sub>R j)" for d |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1922 |
define b' where "b' d = (\<Sum>j\<in>Basis. (if j = k then min (b\<bullet>j) (c + d) else b\<bullet>j) *\<^sub>R j)" for d |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1923 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1924 |
have "((\<lambda>d. \<Prod>j\<in>Basis. (b' d - a' d) \<bullet> j) \<longlongrightarrow> (\<Prod>j\<in>Basis. (b' 0 - a' 0) \<bullet> j)) (at_right 0)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1925 |
by (auto simp: b'_def a'_def intro!: tendsto_min tendsto_max tendsto_eq_intros) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1926 |
also have "(\<Prod>j\<in>Basis. (b' 0 - a' 0) \<bullet> j) = 0" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1927 |
using k * |
64272 | 1928 |
by (intro prod_zero bexI[OF _ k]) |
64267 | 1929 |
(auto simp: b'_def a'_def inner_diff inner_sum_left inner_not_same_Basis intro!: sum.cong) |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1930 |
also have "((\<lambda>d. \<Prod>j\<in>Basis. (b' d - a' d) \<bullet> j) \<longlongrightarrow> 0) (at_right 0) = |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1931 |
((\<lambda>d. content (cbox a b \<inter> {x. \<bar>x\<bullet>k - c\<bar> \<le> d})) \<longlongrightarrow> 0) (at_right 0)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1932 |
proof (intro tendsto_cong eventually_at_rightI) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1933 |
fix d :: real assume d: "d \<in> {0<..<1}" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1934 |
have "cbox a b \<inter> {x. \<bar>x\<bullet>k - c\<bar> \<le> d} = cbox (a' d) (b' d)" for d |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1935 |
using * d k by (auto simp add: cbox_def set_eq_iff Int_def ball_conj_distrib abs_diff_le_iff a'_def b'_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1936 |
moreover have "j \<in> Basis \<Longrightarrow> a' d \<bullet> j \<le> b' d \<bullet> j" for j |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1937 |
using * d k by (auto simp: a'_def b'_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1938 |
ultimately show "(\<Prod>j\<in>Basis. (b' d - a' d) \<bullet> j) = content (cbox a b \<inter> {x. \<bar>x\<bullet>k - c\<bar> \<le> d})" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1939 |
by simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1940 |
qed simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1941 |
finally have "((\<lambda>d. content (cbox a b \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})) \<longlongrightarrow> 0) (at_right 0)" . |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1942 |
from order_tendstoD(2)[OF this \<open>0<e\<close>] |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1943 |
obtain d' where "0 < d'" and d': "\<And>y. y > 0 \<Longrightarrow> y < d' \<Longrightarrow> content (cbox a b \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> y}) < e" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1944 |
by (subst (asm) eventually_at_right[of _ 1]) auto |
53495 | 1945 |
show ?thesis |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1946 |
by (rule that[of "d'/2"], insert \<open>0<d'\<close> d'[of "d'/2"], auto) |
53495 | 1947 |
next |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1948 |
assume *: "\<not> (a \<bullet> k \<le> c \<and> c \<le> b \<bullet> k \<and> (\<forall>j\<in>Basis. a \<bullet> j \<le> b \<bullet> j))" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1949 |
then have "(\<exists>j\<in>Basis. b \<bullet> j < a \<bullet> j) \<or> (c < a \<bullet> k \<or> b \<bullet> k < c)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1950 |
by (auto simp: not_le) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1951 |
show thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1952 |
proof cases |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1953 |
assume "\<exists>j\<in>Basis. b \<bullet> j < a \<bullet> j" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1954 |
then have [simp]: "cbox a b = {}" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1955 |
using box_ne_empty(1)[of a b] by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1956 |
show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1957 |
by (rule that[of 1]) (simp_all add: \<open>0<e\<close>) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1958 |
next |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1959 |
assume "\<not> (\<exists>j\<in>Basis. b \<bullet> j < a \<bullet> j)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1960 |
with * have "c < a \<bullet> k \<or> b \<bullet> k < c" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1961 |
by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1962 |
then show thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1963 |
proof |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1964 |
assume c: "c < a \<bullet> k" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1965 |
moreover have "x \<in> cbox a b \<Longrightarrow> c \<le> x \<bullet> k" for x |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1966 |
using k c by (auto simp: cbox_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1967 |
ultimately have "cbox a b \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> (a \<bullet> k - c) / 2} = {}" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1968 |
using k by (auto simp: cbox_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1969 |
with \<open>0<e\<close> c that[of "(a \<bullet> k - c) / 2"] show ?thesis |
53495 | 1970 |
by auto |
60492 | 1971 |
next |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1972 |
assume c: "b \<bullet> k < c" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1973 |
moreover have "x \<in> cbox a b \<Longrightarrow> x \<bullet> k \<le> c" for x |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1974 |
using k c by (auto simp: cbox_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1975 |
ultimately have "cbox a b \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> (c - b \<bullet> k) / 2} = {}" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1976 |
using k by (auto simp: cbox_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1977 |
with \<open>0<e\<close> c that[of "(c - b \<bullet> k) / 2"] show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1978 |
by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1979 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1980 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1981 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1982 |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1983 |
|
53399 | 1984 |
lemma negligible_standard_hyperplane[intro]: |
56188 | 1985 |
fixes k :: "'a::euclidean_space" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1986 |
assumes k: "k \<in> Basis" |
53399 | 1987 |
shows "negligible {x. x\<bullet>k = c}" |
53495 | 1988 |
unfolding negligible_def has_integral |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
1989 |
proof (clarify, goal_cases) |
61165 | 1990 |
case (1 a b e) |
1991 |
from this and k obtain d where d: "0 < d" "content (cbox a b \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) < e" |
|
1992 |
by (rule content_doublesplit) |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1993 |
let ?i = "indicator {x::'a. x\<bullet>k = c} :: 'a\<Rightarrow>real" |
53495 | 1994 |
show ?case |
1995 |
apply (rule_tac x="\<lambda>x. ball x d" in exI) |
|
1996 |
apply rule |
|
1997 |
apply (rule gauge_ball) |
|
1998 |
apply (rule d) |
|
1999 |
proof (rule, rule) |
|
2000 |
fix p |
|
56188 | 2001 |
assume p: "p tagged_division_of (cbox a b) \<and> (\<lambda>x. ball x d) fine p" |
53495 | 2002 |
have *: "(\<Sum>(x, ka)\<in>p. content ka *\<^sub>R ?i x) = |
61945 | 2003 |
(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x\<bullet>k - c\<bar> \<le> d}) *\<^sub>R ?i x)" |
64267 | 2004 |
apply (rule sum.cong) |
57418 | 2005 |
apply (rule refl) |
53495 | 2006 |
unfolding split_paired_all real_scaleR_def mult_cancel_right split_conv |
2007 |
apply cases |
|
2008 |
apply (rule disjI1) |
|
2009 |
apply assumption |
|
2010 |
apply (rule disjI2) |
|
2011 |
proof - |
|
2012 |
fix x l |
|
2013 |
assume as: "(x, l) \<in> p" "?i x \<noteq> 0" |
|
2014 |
then have xk: "x\<bullet>k = c" |
|
2015 |
unfolding indicator_def |
|
2016 |
apply - |
|
2017 |
apply (rule ccontr) |
|
2018 |
apply auto |
|
2019 |
done |
|
2020 |
show "content l = content (l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})" |
|
2021 |
apply (rule arg_cong[where f=content]) |
|
2022 |
apply (rule set_eqI) |
|
2023 |
apply rule |
|
2024 |
apply rule |
|
2025 |
unfolding mem_Collect_eq |
|
2026 |
proof - |
|
2027 |
fix y |
|
2028 |
assume y: "y \<in> l" |
|
2029 |
note p[THEN conjunct2,unfolded fine_def,rule_format,OF as(1),unfolded split_conv] |
|
2030 |
note this[unfolded subset_eq mem_ball dist_norm,rule_format,OF y] |
|
2031 |
note le_less_trans[OF Basis_le_norm[OF k] this] |
|
2032 |
then show "\<bar>y \<bullet> k - c\<bar> \<le> d" |
|
2033 |
unfolding inner_simps xk by auto |
|
2034 |
qed auto |
|
2035 |
qed |
|
35172 | 2036 |
note p'= tagged_division_ofD[OF p[THEN conjunct1]] and p''=division_of_tagged_division[OF p[THEN conjunct1]] |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
2037 |
have "(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) * indicator {x. x \<bullet> k = c} x) < e" |
53495 | 2038 |
proof - |
2039 |
have "(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) * ?i x) \<le> |
|
2040 |
(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}))" |
|
64267 | 2041 |
apply (rule sum_mono) |
53495 | 2042 |
unfolding split_paired_all split_conv |
2043 |
apply (rule mult_right_le_one_le) |
|
2044 |
apply (drule p'(4)) |
|
2045 |
apply (auto simp add:interval_doublesplit[OF k]) |
|
2046 |
done |
|
2047 |
also have "\<dots> < e" |
|
64267 | 2048 |
proof (subst sum.over_tagged_division_lemma[OF p[THEN conjunct1]], goal_cases) |
61167 | 2049 |
case prems: (1 u v) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
2050 |
then have *: "content (cbox u v) = 0" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
2051 |
unfolding content_eq_0_interior by simp |
56188 | 2052 |
have "content (cbox u v \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) \<le> content (cbox u v)" |
53495 | 2053 |
unfolding interval_doublesplit[OF k] |
2054 |
apply (rule content_subset) |
|
2055 |
unfolding interval_doublesplit[symmetric,OF k] |
|
2056 |
apply auto |
|
2057 |
done |
|
2058 |
then show ?case |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
2059 |
unfolding * interval_doublesplit[OF k] |
50348 | 2060 |
by (blast intro: antisym) |
53495 | 2061 |
next |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2062 |
have "(\<Sum>l\<in>snd ` p. content (l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})) = |
64267 | 2063 |
sum content ((\<lambda>l. l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})`{l\<in>snd ` p. l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d} \<noteq> {}})" |
2064 |
proof (subst (2) sum.reindex_nontrivial) |
|
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2065 |
fix x y assume "x \<in> {l \<in> snd ` p. l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d} \<noteq> {}}" "y \<in> {l \<in> snd ` p. l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d} \<noteq> {}}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2066 |
"x \<noteq> y" and eq: "x \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d} = y \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2067 |
then obtain x' y' where "(x', x) \<in> p" "x \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d} \<noteq> {}" "(y', y) \<in> p" "y \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d} \<noteq> {}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2068 |
by (auto) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2069 |
from p'(5)[OF \<open>(x', x) \<in> p\<close> \<open>(y', y) \<in> p\<close>] \<open>x \<noteq> y\<close> have "interior (x \<inter> y) = {}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2070 |
by auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2071 |
moreover have "interior ((x \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) \<inter> (y \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})) \<subseteq> interior (x \<inter> y)" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2072 |
by (auto intro: interior_mono) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2073 |
ultimately have "interior (x \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) = {}" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2074 |
by (auto simp: eq) |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2075 |
then show "content (x \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) = 0" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2076 |
using p'(4)[OF \<open>(x', x) \<in> p\<close>] by (auto simp: interval_doublesplit[OF k] content_eq_0_interior simp del: interior_Int) |
64267 | 2077 |
qed (insert p'(1), auto intro!: sum.mono_neutral_right) |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2078 |
also have "\<dots> \<le> norm (\<Sum>l\<in>(\<lambda>l. l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})`{l\<in>snd ` p. l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d} \<noteq> {}}. content l *\<^sub>R 1::real)" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2079 |
by simp |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2080 |
also have "\<dots> \<le> 1 * content (cbox a b \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2081 |
using division_doublesplit[OF p'' k, unfolded interval_doublesplit[OF k]] |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2082 |
unfolding interval_doublesplit[OF k] by (intro dsum_bound) auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2083 |
also have "\<dots> < e" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2084 |
using d(2) by simp |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2085 |
finally show "(\<Sum>ka\<in>snd ` p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})) < e" . |
53495 | 2086 |
qed |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2087 |
finally show "(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) * ?i x) < e" . |
53495 | 2088 |
qed |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
2089 |
then show "norm ((\<Sum>(x, ka)\<in>p. content ka *\<^sub>R ?i x) - 0) < e" |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
2090 |
unfolding * real_norm_def |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
2091 |
apply (subst abs_of_nonneg) |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
2092 |
using measure_nonneg by (force simp add: indicator_def intro: sum_nonneg)+ |
53495 | 2093 |
qed |
2094 |
qed |
|
2095 |
||
35172 | 2096 |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2097 |
subsubsection \<open>Hence the main theorem about negligible sets.\<close> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2098 |
|
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2099 |
|
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2100 |
lemma has_integral_negligible_cbox: |
56188 | 2101 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2102 |
assumes negs: "negligible S" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2103 |
and 0: "\<And>x. x \<notin> S \<Longrightarrow> f x = 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2104 |
shows "(f has_integral 0) (cbox a b)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2105 |
unfolding has_integral |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2106 |
proof clarify |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2107 |
fix e::real |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2108 |
assume "e > 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2109 |
then have nn_gt0: "e/2 / ((real n+1) * (2 ^ n)) > 0" for n |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2110 |
by simp |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2111 |
then have "\<exists>\<gamma>. gauge \<gamma> \<and> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2112 |
(\<forall>\<D>. \<D> tagged_division_of cbox a b \<and> \<gamma> fine \<D> \<longrightarrow> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2113 |
\<bar>\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R indicator S x\<bar> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2114 |
< e/2 / ((real n + 1) * 2 ^ n))" for n |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2115 |
using negs [unfolded negligible_def has_integral] by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2116 |
then obtain \<gamma> where |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2117 |
gd: "\<And>n. gauge (\<gamma> n)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2118 |
and \<gamma>: "\<And>n \<D>. \<lbrakk>\<D> tagged_division_of cbox a b; \<gamma> n fine \<D>\<rbrakk> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2119 |
\<Longrightarrow> \<bar>\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R indicator S x\<bar> < e/2 / ((real n + 1) * 2 ^ n)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2120 |
by metis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2121 |
show "\<exists>\<gamma>. gauge \<gamma> \<and> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2122 |
(\<forall>\<D>. \<D> tagged_division_of cbox a b \<and> \<gamma> fine \<D> \<longrightarrow> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2123 |
norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) - 0) < e)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2124 |
proof (intro exI, safe) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2125 |
show "gauge (\<lambda>x. \<gamma> (nat \<lfloor>norm (f x)\<rfloor>) x)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2126 |
using gd by (auto simp: gauge_def) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2127 |
|
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2128 |
show "norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) - 0) < e" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2129 |
if "\<D> tagged_division_of (cbox a b)" "(\<lambda>x. \<gamma> (nat \<lfloor>norm (f x)\<rfloor>) x) fine \<D>" for \<D> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2130 |
proof (cases "\<D> = {}") |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2131 |
case True with \<open>0 < e\<close> show ?thesis by simp |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2132 |
next |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2133 |
case False |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2134 |
obtain N where "Max ((\<lambda>(x, K). norm (f x)) ` \<D>) \<le> real N" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2135 |
using real_arch_simple by blast |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2136 |
then have N: "\<And>x. x \<in> (\<lambda>(x, K). norm (f x)) ` \<D> \<Longrightarrow> x \<le> real N" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2137 |
by (meson Max_ge that(1) dual_order.trans finite_imageI tagged_division_of_finite) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2138 |
have "\<forall>i. \<exists>q. q tagged_division_of (cbox a b) \<and> (\<gamma> i) fine q \<and> (\<forall>(x,K) \<in> \<D>. K \<subseteq> (\<gamma> i) x \<longrightarrow> (x, K) \<in> q)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2139 |
by (auto intro: tagged_division_finer[OF that(1) gd]) |
66199 | 2140 |
from choice[OF this] |
2141 |
obtain q where q: "\<And>n. q n tagged_division_of cbox a b" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2142 |
"\<And>n. \<gamma> n fine q n" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2143 |
"\<And>n x K. \<lbrakk>(x, K) \<in> \<D>; K \<subseteq> \<gamma> n x\<rbrakk> \<Longrightarrow> (x, K) \<in> q n" |
66199 | 2144 |
by fastforce |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2145 |
have "finite \<D>" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2146 |
using that(1) by blast |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2147 |
then have sum_le_inc: "\<lbrakk>finite T; \<And>x y. (x,y) \<in> T \<Longrightarrow> (0::real) \<le> g(x,y); |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2148 |
\<And>y. y\<in>\<D> \<Longrightarrow> \<exists>x. (x,y) \<in> T \<and> f(y) \<le> g(x,y)\<rbrakk> \<Longrightarrow> sum f \<D> \<le> sum g T" for f g T |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2149 |
by (rule sum_le_included[of \<D> T g snd f]; force) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2150 |
have "norm (\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R f x) \<le> (\<Sum>(x,K) \<in> \<D>. norm (content K *\<^sub>R f x))" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2151 |
unfolding split_def by (rule norm_sum) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2152 |
also have "... \<le> (\<Sum>(i, j) \<in> Sigma {..N + 1} q. |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2153 |
(real i + 1) * (case j of (x, K) \<Rightarrow> content K *\<^sub>R indicator S x))" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2154 |
proof (rule sum_le_inc, safe) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2155 |
show "finite (Sigma {..N+1} q)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2156 |
by (meson finite_SigmaI finite_atMost tagged_division_of_finite q(1)) |
53495 | 2157 |
next |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2158 |
fix x K |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2159 |
assume xk: "(x, K) \<in> \<D>" |
63040 | 2160 |
define n where "n = nat \<lfloor>norm (f x)\<rfloor>" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2161 |
have *: "norm (f x) \<in> (\<lambda>(x, K). norm (f x)) ` \<D>" |
53495 | 2162 |
using xk by auto |
2163 |
have nfx: "real n \<le> norm (f x)" "norm (f x) \<le> real n + 1" |
|
2164 |
unfolding n_def by auto |
|
2165 |
then have "n \<in> {0..N + 1}" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2166 |
using N[OF *] by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2167 |
moreover have "K \<subseteq> \<gamma> (nat \<lfloor>norm (f x)\<rfloor>) x" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2168 |
using that(2) xk by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2169 |
moreover then have "(x, K) \<in> q (nat \<lfloor>norm (f x)\<rfloor>)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2170 |
by (simp add: q(3) xk) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2171 |
moreover then have "(x, K) \<in> q n" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2172 |
using n_def by blast |
53495 | 2173 |
moreover |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2174 |
have "norm (content K *\<^sub>R f x) \<le> (real n + 1) * (content K * indicator S x)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2175 |
proof (cases "x \<in> S") |
53495 | 2176 |
case False |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2177 |
then show ?thesis by (simp add: 0) |
53495 | 2178 |
next |
2179 |
case True |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2180 |
have *: "content K \<ge> 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2181 |
using tagged_division_ofD(4)[OF that(1) xk] by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2182 |
moreover have "content K * norm (f x) \<le> content K * (real n + 1)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2183 |
by (simp add: mult_left_mono nfx(2)) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2184 |
ultimately show ?thesis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2185 |
using nfx True by (auto simp: field_simps) |
53495 | 2186 |
qed |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2187 |
ultimately show "\<exists>y. (y, x, K) \<in> (Sigma {..N + 1} q) \<and> norm (content K *\<^sub>R f x) \<le> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2188 |
(real y + 1) * (content K *\<^sub>R indicator S x)" |
66199 | 2189 |
by force |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2190 |
qed auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2191 |
also have "... = (\<Sum>i\<le>N + 1. \<Sum>j\<in>q i. (real i + 1) * (case j of (x, K) \<Rightarrow> content K *\<^sub>R indicator S x))" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2192 |
apply (rule sum_Sigma_product [symmetric]) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2193 |
using q(1) apply auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2194 |
done |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2195 |
also have "... \<le> (\<Sum>i\<le>N + 1. (real i + 1) * \<bar>\<Sum>(x,K) \<in> q i. content K *\<^sub>R indicator S x\<bar>)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2196 |
by (rule sum_mono) (simp add: sum_distrib_left [symmetric]) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2197 |
also have "... \<le> (\<Sum>i\<le>N + 1. e/2 / 2 ^ i)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2198 |
proof (rule sum_mono) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2199 |
show "(real i + 1) * \<bar>\<Sum>(x,K) \<in> q i. content K *\<^sub>R indicator S x\<bar> \<le> e/2 / 2 ^ i" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2200 |
if "i \<in> {..N + 1}" for i |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2201 |
using \<gamma>[of "q i" i] q by (simp add: divide_simps mult.left_commute) |
53495 | 2202 |
qed |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2203 |
also have "... = e/2 * (\<Sum>i\<le>N + 1. (1 / 2) ^ i)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2204 |
unfolding sum_distrib_left by (metis divide_inverse inverse_eq_divide power_one_over) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2205 |
also have "\<dots> < e/2 * 2" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2206 |
proof (rule mult_strict_left_mono) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2207 |
have "sum (op ^ (1 / 2)) {..N + 1} = sum (op ^ (1 / 2::real)) {..<N + 2}" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2208 |
using lessThan_Suc_atMost by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2209 |
also have "... < 2" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2210 |
by (auto simp: geometric_sum) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2211 |
finally show "sum (op ^ (1 / 2::real)) {..N + 1} < 2" . |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2212 |
qed (use \<open>0 < e\<close> in auto) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2213 |
finally show ?thesis by auto |
53495 | 2214 |
qed |
2215 |
qed |
|
2216 |
qed |
|
2217 |
||
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2218 |
|
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2219 |
proposition has_integral_negligible: |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2220 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2221 |
assumes negs: "negligible S" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2222 |
and "\<And>x. x \<in> (T - S) \<Longrightarrow> f x = 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2223 |
shows "(f has_integral 0) T" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2224 |
proof (cases "\<exists>a b. T = cbox a b") |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2225 |
case True |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2226 |
then have "((\<lambda>x. if x \<in> T then f x else 0) has_integral 0) T" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2227 |
using assms by (auto intro!: has_integral_negligible_cbox) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2228 |
then show ?thesis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2229 |
by (rule has_integral_eq [rotated]) auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2230 |
next |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2231 |
case False |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2232 |
let ?f = "(\<lambda>x. if x \<in> T then f x else 0)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2233 |
have "((\<lambda>x. if x \<in> T then f x else 0) has_integral 0) T" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2234 |
apply (auto simp: False has_integral_alt [of ?f]) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2235 |
apply (rule_tac x=1 in exI, auto) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2236 |
apply (rule_tac x=0 in exI, simp add: has_integral_negligible_cbox [OF negs] assms) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2237 |
done |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2238 |
then show ?thesis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2239 |
by (rule_tac f="?f" in has_integral_eq) auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2240 |
qed |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2241 |
|
53495 | 2242 |
lemma has_integral_spike: |
56188 | 2243 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2244 |
assumes "negligible S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2245 |
and gf: "\<And>x. x \<in> T - S \<Longrightarrow> g x = f x" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2246 |
and fint: "(f has_integral y) T" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2247 |
shows "(g has_integral y) T" |
53495 | 2248 |
proof - |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2249 |
have *: "(g has_integral y) (cbox a b)" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2250 |
if "(f has_integral y) (cbox a b)" "\<forall>x \<in> cbox a b - S. g x = f x" for a b f and g:: "'b \<Rightarrow> 'a" and y |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2251 |
proof - |
56188 | 2252 |
have "((\<lambda>x. f x + (g x - f x)) has_integral (y + 0)) (cbox a b)" |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2253 |
using that by (intro has_integral_add has_integral_negligible) (auto intro!: \<open>negligible S\<close>) |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2254 |
then show ?thesis |
53495 | 2255 |
by auto |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2256 |
qed |
53495 | 2257 |
show ?thesis |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2258 |
using fint gf |
53495 | 2259 |
apply (subst has_integral_alt) |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2260 |
apply (subst (asm) has_integral_alt) |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2261 |
apply (simp split: if_split_asm) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2262 |
apply (blast dest: *) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2263 |
apply (erule_tac V = "\<forall>a b. T \<noteq> cbox a b" in thin_rl) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2264 |
apply (elim all_forward imp_forward ex_forward all_forward conj_forward asm_rl) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2265 |
apply (auto dest!: *[where f="\<lambda>x. if x\<in>T then f x else 0" and g="\<lambda>x. if x \<in> T then g x else 0"]) |
53495 | 2266 |
done |
2267 |
qed |
|
35172 | 2268 |
|
2269 |
lemma has_integral_spike_eq: |
|
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2270 |
assumes "negligible S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2271 |
and gf: "\<And>x. x \<in> T - S \<Longrightarrow> g x = f x" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2272 |
shows "(f has_integral y) T \<longleftrightarrow> (g has_integral y) T" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2273 |
using has_integral_spike [OF \<open>negligible S\<close>] gf |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2274 |
by metis |
53495 | 2275 |
|
2276 |
lemma integrable_spike: |
|
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2277 |
assumes "negligible S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2278 |
and "\<And>x. x \<in> T - S \<Longrightarrow> g x = f x" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2279 |
and "f integrable_on T" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2280 |
shows "g integrable_on T" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2281 |
using assms unfolding integrable_on_def by (blast intro: has_integral_spike) |
53495 | 2282 |
|
2283 |
lemma integral_spike: |
|
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2284 |
assumes "negligible S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2285 |
and "\<And>x. x \<in> T - S \<Longrightarrow> g x = f x" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2286 |
shows "integral T f = integral T g" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2287 |
using has_integral_spike_eq[OF assms] |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2288 |
by (auto simp: integral_def integrable_on_def) |
53495 | 2289 |
|
35172 | 2290 |
|
60420 | 2291 |
subsection \<open>Some other trivialities about negligible sets.\<close> |
35172 | 2292 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2293 |
lemma negligible_subset: |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2294 |
assumes "negligible s" "t \<subseteq> s" |
53495 | 2295 |
shows "negligible t" |
2296 |
unfolding negligible_def |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2297 |
by (metis (no_types) Diff_iff assms contra_subsetD has_integral_negligible indicator_simps(2)) |
53495 | 2298 |
|
2299 |
lemma negligible_diff[intro?]: |
|
2300 |
assumes "negligible s" |
|
2301 |
shows "negligible (s - t)" |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2302 |
using assms by (meson Diff_subset negligible_subset) |
53495 | 2303 |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2304 |
lemma negligible_Int: |
53495 | 2305 |
assumes "negligible s \<or> negligible t" |
2306 |
shows "negligible (s \<inter> t)" |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2307 |
using assms negligible_subset by force |
53495 | 2308 |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2309 |
lemma negligible_Un: |
53495 | 2310 |
assumes "negligible s" |
2311 |
and "negligible t" |
|
2312 |
shows "negligible (s \<union> t)" |
|
2313 |
unfolding negligible_def |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
2314 |
proof (safe, goal_cases) |
61165 | 2315 |
case (1 a b) |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2316 |
note assms[unfolded negligible_def,rule_format,of a b] |
53495 | 2317 |
then show ?case |
2318 |
apply (subst has_integral_spike_eq[OF assms(2)]) |
|
2319 |
defer |
|
2320 |
apply assumption |
|
2321 |
unfolding indicator_def |
|
2322 |
apply auto |
|
2323 |
done |
|
2324 |
qed |
|
2325 |
||
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2326 |
lemma negligible_Un_eq[simp]: "negligible (s \<union> t) \<longleftrightarrow> negligible s \<and> negligible t" |
63956
b235e845c8e8
HOL-Analysis: add cover lemma ported by L. C. Paulson
hoelzl
parents:
63945
diff
changeset
|
2327 |
using negligible_Un negligible_subset by blast |
35172 | 2328 |
|
56188 | 2329 |
lemma negligible_sing[intro]: "negligible {a::'a::euclidean_space}" |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2330 |
using negligible_standard_hyperplane[OF SOME_Basis, of "a \<bullet> (SOME i. i \<in> Basis)"] negligible_subset by blast |
35172 | 2331 |
|
53495 | 2332 |
lemma negligible_insert[simp]: "negligible (insert a s) \<longleftrightarrow> negligible s" |
2333 |
apply (subst insert_is_Un) |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2334 |
unfolding negligible_Un_eq |
53495 | 2335 |
apply auto |
2336 |
done |
|
2337 |
||
60762 | 2338 |
lemma negligible_empty[iff]: "negligible {}" |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2339 |
using negligible_insert by blast |
53495 | 2340 |
|
2341 |
lemma negligible_finite[intro]: |
|
2342 |
assumes "finite s" |
|
2343 |
shows "negligible s" |
|
2344 |
using assms by (induct s) auto |
|
2345 |
||
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
2346 |
lemma negligible_Union[intro]: |
53495 | 2347 |
assumes "finite s" |
2348 |
and "\<forall>t\<in>s. negligible t" |
|
2349 |
shows "negligible(\<Union>s)" |
|
2350 |
using assms by induct auto |
|
2351 |
||
2352 |
lemma negligible: |
|
56188 | 2353 |
"negligible s \<longleftrightarrow> (\<forall>t::('a::euclidean_space) set. ((indicator s::'a\<Rightarrow>real) has_integral 0) t)" |
53495 | 2354 |
apply safe |
2355 |
defer |
|
2356 |
apply (subst negligible_def) |
|
46905 | 2357 |
proof - |
53495 | 2358 |
fix t :: "'a set" |
2359 |
assume as: "negligible s" |
|
2360 |
have *: "(\<lambda>x. if x \<in> s \<inter> t then 1 else 0) = (\<lambda>x. if x\<in>t then if x\<in>s then 1 else 0 else 0)" |
|
46905 | 2361 |
by auto |
2362 |
show "((indicator s::'a\<Rightarrow>real) has_integral 0) t" |
|
53495 | 2363 |
apply (subst has_integral_alt) |
2364 |
apply cases |
|
2365 |
apply (subst if_P,assumption) |
|
46905 | 2366 |
unfolding if_not_P |
53495 | 2367 |
apply safe |
2368 |
apply (rule as[unfolded negligible_def,rule_format]) |
|
2369 |
apply (rule_tac x=1 in exI) |
|
2370 |
apply safe |
|
2371 |
apply (rule zero_less_one) |
|
2372 |
apply (rule_tac x=0 in exI) |
|
46905 | 2373 |
using negligible_subset[OF as,of "s \<inter> t"] |
2374 |
unfolding negligible_def indicator_def [abs_def] |
|
2375 |
unfolding * |
|
2376 |
apply auto |
|
2377 |
done |
|
2378 |
qed auto |
|
35172 | 2379 |
|
53495 | 2380 |
|
60420 | 2381 |
subsection \<open>Finite case of the spike theorem is quite commonly needed.\<close> |
35172 | 2382 |
|
53495 | 2383 |
lemma has_integral_spike_finite: |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2384 |
assumes "finite S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2385 |
and "\<And>x. x \<in> T - S \<Longrightarrow> g x = f x" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2386 |
and "(f has_integral y) T" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2387 |
shows "(g has_integral y) T" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2388 |
using assms has_integral_spike negligible_finite by blast |
53495 | 2389 |
|
2390 |
lemma has_integral_spike_finite_eq: |
|
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2391 |
assumes "finite S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2392 |
and "\<And>x. x \<in> T - S \<Longrightarrow> g x = f x" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2393 |
shows "((f has_integral y) T \<longleftrightarrow> (g has_integral y) T)" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2394 |
by (metis assms has_integral_spike_finite) |
35172 | 2395 |
|
2396 |
lemma integrable_spike_finite: |
|
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2397 |
assumes "finite S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2398 |
and "\<And>x. x \<in> T - S \<Longrightarrow> g x = f x" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2399 |
and "f integrable_on T" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2400 |
shows "g integrable_on T" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2401 |
using assms has_integral_spike_finite by blast |
53495 | 2402 |
|
35172 | 2403 |
|
60420 | 2404 |
subsection \<open>In particular, the boundary of an interval is negligible.\<close> |
35172 | 2405 |
|
56188 | 2406 |
lemma negligible_frontier_interval: "negligible(cbox (a::'a::euclidean_space) b - box a b)" |
53495 | 2407 |
proof - |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2408 |
let ?A = "\<Union>((\<lambda>k. {x. x\<bullet>k = a\<bullet>k} \<union> {x::'a. x\<bullet>k = b\<bullet>k}) ` Basis)" |
56188 | 2409 |
have "cbox a b - box a b \<subseteq> ?A" |
2410 |
apply rule unfolding Diff_iff mem_box |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2411 |
apply simp |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2412 |
apply(erule conjE bexE)+ |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2413 |
apply(rule_tac x=i in bexI) |
53495 | 2414 |
apply auto |
2415 |
done |
|
2416 |
then show ?thesis |
|
2417 |
apply - |
|
2418 |
apply (rule negligible_subset[of ?A]) |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
2419 |
apply (rule negligible_Union[OF finite_imageI]) |
53495 | 2420 |
apply auto |
2421 |
done |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2422 |
qed |
35172 | 2423 |
|
2424 |
lemma has_integral_spike_interior: |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
2425 |
assumes "\<forall>x\<in>box a b. g x = f x" |
56188 | 2426 |
and "(f has_integral y) (cbox a b)" |
2427 |
shows "(g has_integral y) (cbox a b)" |
|
53495 | 2428 |
apply (rule has_integral_spike[OF negligible_frontier_interval _ assms(2)]) |
2429 |
using assms(1) |
|
2430 |
apply auto |
|
2431 |
done |
|
35172 | 2432 |
|
2433 |
lemma has_integral_spike_interior_eq: |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
2434 |
assumes "\<forall>x\<in>box a b. g x = f x" |
56188 | 2435 |
shows "(f has_integral y) (cbox a b) \<longleftrightarrow> (g has_integral y) (cbox a b)" |
53495 | 2436 |
apply rule |
2437 |
apply (rule_tac[!] has_integral_spike_interior) |
|
2438 |
using assms |
|
2439 |
apply auto |
|
2440 |
done |
|
2441 |
||
2442 |
lemma integrable_spike_interior: |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
2443 |
assumes "\<forall>x\<in>box a b. g x = f x" |
56188 | 2444 |
and "f integrable_on cbox a b" |
2445 |
shows "g integrable_on cbox a b" |
|
53495 | 2446 |
using assms |
2447 |
unfolding integrable_on_def |
|
2448 |
using has_integral_spike_interior[OF assms(1)] |
|
2449 |
by auto |
|
2450 |
||
35172 | 2451 |
|
60420 | 2452 |
subsection \<open>Integrability of continuous functions.\<close> |
35172 | 2453 |
|
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2454 |
lemma operative_approximableI: |
61165 | 2455 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
53520 | 2456 |
assumes "0 \<le> e" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2457 |
shows "operative conj True (\<lambda>i. \<exists>g. (\<forall>x\<in>i. norm (f x - g (x::'b)) \<le> e) \<and> g integrable_on i)" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2458 |
proof - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2459 |
interpret comm_monoid conj True |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2460 |
by standard auto |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2461 |
show ?thesis |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2462 |
proof (standard, safe) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2463 |
fix a b :: 'b |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2464 |
show "\<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2465 |
if "box a b = {}" for a b |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2466 |
apply (rule_tac x=f in exI) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2467 |
using assms that by (auto simp: content_eq_0_interior) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2468 |
{ |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2469 |
fix c g and k :: 'b |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2470 |
assume fg: "\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e" and g: "g integrable_on cbox a b" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2471 |
assume k: "k \<in> Basis" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2472 |
show "\<exists>g. (\<forall>x\<in>cbox a b \<inter> {x. x \<bullet> k \<le> c}. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b \<inter> {x. x \<bullet> k \<le> c}" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2473 |
"\<exists>g. (\<forall>x\<in>cbox a b \<inter> {x. c \<le> x \<bullet> k}. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b \<inter> {x. c \<le> x \<bullet> k}" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2474 |
apply (rule_tac[!] x=g in exI) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2475 |
using fg integrable_split[OF g k] by auto |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2476 |
} |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2477 |
show "\<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2478 |
if fg1: "\<forall>x\<in>cbox a b \<inter> {x. x \<bullet> k \<le> c}. norm (f x - g1 x) \<le> e" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2479 |
and g1: "g1 integrable_on cbox a b \<inter> {x. x \<bullet> k \<le> c}" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2480 |
and fg2: "\<forall>x\<in>cbox a b \<inter> {x. c \<le> x \<bullet> k}. norm (f x - g2 x) \<le> e" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2481 |
and g2: "g2 integrable_on cbox a b \<inter> {x. c \<le> x \<bullet> k}" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2482 |
and k: "k \<in> Basis" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2483 |
for c k g1 g2 |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2484 |
proof - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2485 |
let ?g = "\<lambda>x. if x\<bullet>k = c then f x else if x\<bullet>k \<le> c then g1 x else g2 x" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2486 |
show "\<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2487 |
proof (intro exI conjI ballI) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2488 |
show "norm (f x - ?g x) \<le> e" if "x \<in> cbox a b" for x |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2489 |
by (auto simp: that assms fg1 fg2) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2490 |
show "?g integrable_on cbox a b" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2491 |
proof - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2492 |
have "?g integrable_on cbox a b \<inter> {x. x \<bullet> k \<le> c}" "?g integrable_on cbox a b \<inter> {x. x \<bullet> k \<ge> c}" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2493 |
by(rule integrable_spike[OF negligible_standard_hyperplane[of k c]], use k g1 g2 in auto)+ |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2494 |
with has_integral_split[OF _ _ k] show ?thesis |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2495 |
unfolding integrable_on_def by blast |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2496 |
qed |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2497 |
qed |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2498 |
qed |
53520 | 2499 |
qed |
2500 |
qed |
|
2501 |
||
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2502 |
lemma comm_monoid_set_F_and: "comm_monoid_set.F op \<and> True f s \<longleftrightarrow> (finite s \<longrightarrow> (\<forall>x\<in>s. f x))" |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2503 |
proof - |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2504 |
interpret bool: comm_monoid_set "op \<and>" True |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2505 |
proof qed auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2506 |
show ?thesis |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2507 |
by (induction s rule: infinite_finite_induct) auto |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2508 |
qed |
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
2509 |
|
53520 | 2510 |
lemma approximable_on_division: |
56188 | 2511 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
53520 | 2512 |
assumes "0 \<le> e" |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2513 |
and d: "d division_of (cbox a b)" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2514 |
and f: "\<forall>i\<in>d. \<exists>g. (\<forall>x\<in>i. norm (f x - g x) \<le> e) \<and> g integrable_on i" |
56188 | 2515 |
obtains g where "\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e" "g integrable_on cbox a b" |
53520 | 2516 |
proof - |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2517 |
interpret operative conj True "\<lambda>i. \<exists>g. (\<forall>x\<in>i. norm (f x - g (x::'b)) \<le> e) \<and> g integrable_on i" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2518 |
using \<open>0 \<le> e\<close> by (rule operative_approximableI) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2519 |
from f local.division [OF d] that show thesis |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2520 |
by auto |
53520 | 2521 |
qed |
2522 |
||
2523 |
lemma integrable_continuous: |
|
56188 | 2524 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
2525 |
assumes "continuous_on (cbox a b) f" |
|
2526 |
shows "f integrable_on cbox a b" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2527 |
proof (rule integrable_uniform_limit) |
53520 | 2528 |
fix e :: real |
2529 |
assume e: "e > 0" |
|
65578
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2530 |
then obtain d where "0 < d" and d: "\<And>x x'. \<lbrakk>x \<in> cbox a b; x' \<in> cbox a b; dist x' x < d\<rbrakk> \<Longrightarrow> dist (f x') (f x) < e" |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2531 |
using compact_uniformly_continuous[OF assms compact_cbox] unfolding uniformly_continuous_on_def by metis |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2532 |
obtain p where ptag: "p tagged_division_of cbox a b" and finep: "(\<lambda>x. ball x d) fine p" |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2533 |
using fine_division_exists[OF gauge_ball[OF \<open>0 < d\<close>], of a b] . |
53520 | 2534 |
have *: "\<forall>i\<in>snd ` p. \<exists>g. (\<forall>x\<in>i. norm (f x - g x) \<le> e) \<and> g integrable_on i" |
2535 |
proof (safe, unfold snd_conv) |
|
2536 |
fix x l |
|
2537 |
assume as: "(x, l) \<in> p" |
|
65578
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2538 |
obtain a b where l: "l = cbox a b" |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2539 |
using as ptag by blast |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2540 |
then have x: "x \<in> cbox a b" |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2541 |
using as ptag by auto |
53520 | 2542 |
show "\<exists>g. (\<forall>x\<in>l. norm (f x - g x) \<le> e) \<and> g integrable_on l" |
2543 |
apply (rule_tac x="\<lambda>y. f x" in exI) |
|
2544 |
proof safe |
|
2545 |
show "(\<lambda>y. f x) integrable_on l" |
|
65578
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2546 |
unfolding integrable_on_def l by blast |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2547 |
next |
53520 | 2548 |
fix y |
2549 |
assume y: "y \<in> l" |
|
65578
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2550 |
then have "y \<in> ball x d" |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2551 |
using as finep by fastforce |
53520 | 2552 |
then show "norm (f y - f x) \<le> e" |
65578
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2553 |
using d x y as l |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2554 |
by (metis dist_commute dist_norm less_imp_le mem_ball ptag subsetCE tagged_division_ofD(3)) |
53520 | 2555 |
qed |
2556 |
qed |
|
2557 |
from e have "e \<ge> 0" |
|
2558 |
by auto |
|
65578
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2559 |
from approximable_on_division[OF this division_of_tagged_division[OF ptag] *] |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2560 |
show "\<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b" |
e4997c181cce
New material from PNT proof, as well as more default [simp] declarations. Also removed duplicate theorems about geometric series
paulson <lp15@cam.ac.uk>
parents:
65204
diff
changeset
|
2561 |
by metis |
53520 | 2562 |
qed |
2563 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
2564 |
lemma integrable_continuous_interval: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
2565 |
fixes f :: "'b::ordered_euclidean_space \<Rightarrow> 'a::banach" |
66402 | 2566 |
assumes "continuous_on {a..b} f" |
2567 |
shows "f integrable_on {a..b}" |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
2568 |
by (metis assms integrable_continuous interval_cbox) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
2569 |
|
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
2570 |
lemmas integrable_continuous_real = integrable_continuous_interval[where 'b=real] |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
2571 |
|
56188 | 2572 |
|
60420 | 2573 |
subsection \<open>Specialization of additivity to one dimension.\<close> |
35172 | 2574 |
|
2575 |
||
60420 | 2576 |
subsection \<open>A useful lemma allowing us to factor out the content size.\<close> |
35172 | 2577 |
|
2578 |
lemma has_integral_factor_content: |
|
56188 | 2579 |
"(f has_integral i) (cbox a b) \<longleftrightarrow> |
2580 |
(\<forall>e>0. \<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
|
64267 | 2581 |
norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p - i) \<le> e * content (cbox a b)))" |
56188 | 2582 |
proof (cases "content (cbox a b) = 0") |
53520 | 2583 |
case True |
2584 |
show ?thesis |
|
2585 |
unfolding has_integral_null_eq[OF True] |
|
2586 |
apply safe |
|
2587 |
apply (rule, rule, rule gauge_trivial, safe) |
|
64267 | 2588 |
unfolding sum_content_null[OF True] True |
53520 | 2589 |
defer |
2590 |
apply (erule_tac x=1 in allE) |
|
2591 |
apply safe |
|
2592 |
defer |
|
2593 |
apply (rule fine_division_exists[of _ a b]) |
|
2594 |
apply assumption |
|
2595 |
apply (erule_tac x=p in allE) |
|
64267 | 2596 |
unfolding sum_content_null[OF True] |
53520 | 2597 |
apply auto |
2598 |
done |
|
2599 |
next |
|
2600 |
case False |
|
2601 |
note F = this[unfolded content_lt_nz[symmetric]] |
|
2602 |
let ?P = "\<lambda>e opp. \<exists>d. gauge d \<and> |
|
56188 | 2603 |
(\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> opp (norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - i)) e)" |
53520 | 2604 |
show ?thesis |
2605 |
apply (subst has_integral) |
|
2606 |
proof safe |
|
2607 |
fix e :: real |
|
2608 |
assume e: "e > 0" |
|
2609 |
{ |
|
2610 |
assume "\<forall>e>0. ?P e op <" |
|
56188 | 2611 |
then show "?P (e * content (cbox a b)) op \<le>" |
2612 |
apply (erule_tac x="e * content (cbox a b)" in allE) |
|
53520 | 2613 |
apply (erule impE) |
2614 |
defer |
|
2615 |
apply (erule exE,rule_tac x=d in exI) |
|
2616 |
using F e |
|
56544 | 2617 |
apply (auto simp add:field_simps) |
53520 | 2618 |
done |
2619 |
} |
|
2620 |
{ |
|
56188 | 2621 |
assume "\<forall>e>0. ?P (e * content (cbox a b)) op \<le>" |
53520 | 2622 |
then show "?P e op <" |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
2623 |
apply (erule_tac x="e/2 / content (cbox a b)" in allE) |
53520 | 2624 |
apply (erule impE) |
2625 |
defer |
|
2626 |
apply (erule exE,rule_tac x=d in exI) |
|
2627 |
using F e |
|
56544 | 2628 |
apply (auto simp add: field_simps) |
53520 | 2629 |
done |
2630 |
} |
|
2631 |
qed |
|
2632 |
qed |
|
2633 |
||
56188 | 2634 |
lemma has_integral_factor_content_real: |
66402 | 2635 |
"(f has_integral i) {a..b::real} \<longleftrightarrow> |
2636 |
(\<forall>e>0. \<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of {a..b} \<and> d fine p \<longrightarrow> |
|
2637 |
norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p - i) \<le> e * content {a..b} ))" |
|
56188 | 2638 |
unfolding box_real[symmetric] |
2639 |
by (rule has_integral_factor_content) |
|
2640 |
||
35172 | 2641 |
|
60420 | 2642 |
subsection \<open>Fundamental theorem of calculus.\<close> |
35172 | 2643 |
|
53520 | 2644 |
lemma interval_bounds_real: |
2645 |
fixes q b :: real |
|
2646 |
assumes "a \<le> b" |
|
54777 | 2647 |
shows "Sup {a..b} = b" |
2648 |
and "Inf {a..b} = a" |
|
56188 | 2649 |
using assms by auto |
53520 | 2650 |
|
2651 |
lemma fundamental_theorem_of_calculus: |
|
2652 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
2653 |
assumes "a \<le> b" |
|
66402 | 2654 |
and vecd: "\<forall>x\<in>{a..b}. (f has_vector_derivative f' x) (at x within {a..b})" |
2655 |
shows "(f' has_integral (f b - f a)) {a..b}" |
|
56188 | 2656 |
unfolding has_integral_factor_content box_real[symmetric] |
53520 | 2657 |
proof safe |
2658 |
fix e :: real |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2659 |
assume "e > 0" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2660 |
then have "\<forall>x. \<exists>d>0. |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2661 |
x \<in> {a..b} \<longrightarrow> |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2662 |
(\<forall>y\<in>{a..b}. |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
2663 |
norm (y-x) < d \<longrightarrow> norm (f y - f x - (y-x) *\<^sub>R f' x) \<le> e * norm (y-x))" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2664 |
using vecd[unfolded has_vector_derivative_def has_derivative_within_alt] by blast |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2665 |
then obtain d where d: "\<And>x. 0 < d x" |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
2666 |
"\<And>x y. \<lbrakk>x \<in> {a..b}; y \<in> {a..b}; norm (y-x) < d x\<rbrakk> |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
2667 |
\<Longrightarrow> norm (f y - f x - (y-x) *\<^sub>R f' x) \<le> e * norm (y-x)" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2668 |
by metis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2669 |
|
56188 | 2670 |
show "\<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
2671 |
norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f' x) - (f b - f a)) \<le> e * content (cbox a b))" |
|
53520 | 2672 |
apply (rule_tac x="\<lambda>x. ball x (d x)" in exI) |
2673 |
apply safe |
|
2674 |
apply (rule gauge_ball_dependent) |
|
2675 |
apply rule |
|
2676 |
apply (rule d(1)) |
|
2677 |
proof - |
|
2678 |
fix p |
|
56188 | 2679 |
assume as: "p tagged_division_of cbox a b" "(\<lambda>x. ball x (d x)) fine p" |
2680 |
show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f' x) - (f b - f a)) \<le> e * content (cbox a b)" |
|
2681 |
unfolding content_real[OF assms(1), simplified box_real[symmetric]] additive_tagged_division_1[OF assms(1) as(1)[simplified box_real],of f,symmetric] |
|
2682 |
unfolding additive_tagged_division_1[OF assms(1) as(1)[simplified box_real],of "\<lambda>x. x",symmetric] |
|
64267 | 2683 |
unfolding sum_distrib_left |
53520 | 2684 |
defer |
64267 | 2685 |
unfolding sum_subtractf[symmetric] |
2686 |
proof (rule sum_norm_le,safe) |
|
53520 | 2687 |
fix x k |
2688 |
assume "(x, k) \<in> p" |
|
2689 |
note xk = tagged_division_ofD(2-4)[OF as(1) this] |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2690 |
then obtain u v where k: "k = cbox u v" by blast |
53520 | 2691 |
have *: "u \<le> v" |
2692 |
using xk unfolding k by auto |
|
2693 |
have ball: "\<forall>xa\<in>k. xa \<in> ball x (d x)" |
|
60420 | 2694 |
using as(2)[unfolded fine_def,rule_format,OF \<open>(x,k)\<in>p\<close>,unfolded split_conv subset_eq] . |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36899
diff
changeset
|
2695 |
have "norm ((v - u) *\<^sub>R f' x - (f v - f u)) \<le> |
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36899
diff
changeset
|
2696 |
norm (f u - f x - (u - x) *\<^sub>R f' x) + norm (f v - f x - (v - x) *\<^sub>R f' x)" |
53520 | 2697 |
apply (rule order_trans[OF _ norm_triangle_ineq4]) |
2698 |
apply (rule eq_refl) |
|
2699 |
apply (rule arg_cong[where f=norm]) |
|
2700 |
unfolding scaleR_diff_left |
|
2701 |
apply (auto simp add:algebra_simps) |
|
2702 |
done |
|
2703 |
also have "\<dots> \<le> e * norm (u - x) + e * norm (v - x)" |
|
2704 |
apply (rule add_mono) |
|
2705 |
apply (rule d(2)[of "x" "u",unfolded o_def]) |
|
2706 |
prefer 4 |
|
2707 |
apply (rule d(2)[of "x" "v",unfolded o_def]) |
|
53399 | 2708 |
using ball[rule_format,of u] ball[rule_format,of v] |
53520 | 2709 |
using xk(1-2) |
2710 |
unfolding k subset_eq |
|
2711 |
apply (auto simp add:dist_real_def) |
|
2712 |
done |
|
54777 | 2713 |
also have "\<dots> \<le> e * (Sup k - Inf k)" |
53520 | 2714 |
unfolding k interval_bounds_real[OF *] |
2715 |
using xk(1) |
|
2716 |
unfolding k |
|
2717 |
by (auto simp add: dist_real_def field_simps) |
|
54777 | 2718 |
finally show "norm (content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) \<le> |
2719 |
e * (Sup k - Inf k)" |
|
56188 | 2720 |
unfolding box_real k interval_bounds_real[OF *] content_real[OF *] |
2721 |
interval_upperbound_real interval_lowerbound_real |
|
2722 |
. |
|
53520 | 2723 |
qed |
2724 |
qed |
|
2725 |
qed |
|
2726 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2727 |
lemma ident_has_integral: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2728 |
fixes a::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2729 |
assumes "a \<le> b" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2730 |
shows "((\<lambda>x. x) has_integral (b\<^sup>2 - a\<^sup>2) / 2) {a..b}" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2731 |
proof - |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2732 |
have "((\<lambda>x. x) has_integral inverse 2 * b\<^sup>2 - inverse 2 * a\<^sup>2) {a..b}" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2733 |
apply (rule fundamental_theorem_of_calculus [OF assms], clarify) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2734 |
unfolding power2_eq_square |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2735 |
by (rule derivative_eq_intros | simp)+ |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2736 |
then show ?thesis |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2737 |
by (simp add: field_simps) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2738 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2739 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2740 |
lemma integral_ident [simp]: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2741 |
fixes a::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2742 |
assumes "a \<le> b" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2743 |
shows "integral {a..b} (\<lambda>x. x) = (if a \<le> b then (b\<^sup>2 - a\<^sup>2) / 2 else 0)" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2744 |
by (metis assms ident_has_integral integral_unique) |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2745 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2746 |
lemma ident_integrable_on: |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2747 |
fixes a::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2748 |
shows "(\<lambda>x. x) integrable_on {a..b}" |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2749 |
by (metis atLeastatMost_empty_iff integrable_on_def has_integral_empty ident_has_integral) |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2750 |
|
35172 | 2751 |
|
60420 | 2752 |
subsection \<open>Taylor series expansion\<close> |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2753 |
|
64267 | 2754 |
lemma (in bounded_bilinear) sum_prod_derivatives_has_vector_derivative: |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2755 |
assumes "p>0" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2756 |
and f0: "Df 0 = f" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2757 |
and Df: "\<And>m t. m < p \<Longrightarrow> a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
66402 | 2758 |
(Df m has_vector_derivative Df (Suc m) t) (at t within {a..b})" |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2759 |
and g0: "Dg 0 = g" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2760 |
and Dg: "\<And>m t. m < p \<Longrightarrow> a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
66402 | 2761 |
(Dg m has_vector_derivative Dg (Suc m) t) (at t within {a..b})" |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2762 |
and ivl: "a \<le> t" "t \<le> b" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2763 |
shows "((\<lambda>t. \<Sum>i<p. (-1)^i *\<^sub>R prod (Df i t) (Dg (p - Suc i) t)) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2764 |
has_vector_derivative |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2765 |
prod (f t) (Dg p t) - (-1)^p *\<^sub>R prod (Df p t) (g t)) |
66402 | 2766 |
(at t within {a..b})" |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2767 |
using assms |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2768 |
proof cases |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2769 |
assume p: "p \<noteq> 1" |
63040 | 2770 |
define p' where "p' = p - 2" |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2771 |
from assms p have p': "{..<p} = {..Suc p'}" "p = Suc (Suc p')" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2772 |
by (auto simp: p'_def) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2773 |
have *: "\<And>i. i \<le> p' \<Longrightarrow> Suc (Suc p' - i) = (Suc (Suc p') - i)" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2774 |
by auto |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2775 |
let ?f = "\<lambda>i. (-1) ^ i *\<^sub>R (prod (Df i t) (Dg ((p - i)) t))" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2776 |
have "(\<Sum>i<p. (-1) ^ i *\<^sub>R (prod (Df i t) (Dg (Suc (p - Suc i)) t) + |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2777 |
prod (Df (Suc i) t) (Dg (p - Suc i) t))) = |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2778 |
(\<Sum>i\<le>(Suc p'). ?f i - ?f (Suc i))" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2779 |
by (auto simp: algebra_simps p'(2) numeral_2_eq_2 * lessThan_Suc_atMost) |
64267 | 2780 |
also note sum_telescope |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2781 |
finally |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2782 |
have "(\<Sum>i<p. (-1) ^ i *\<^sub>R (prod (Df i t) (Dg (Suc (p - Suc i)) t) + |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2783 |
prod (Df (Suc i) t) (Dg (p - Suc i) t))) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2784 |
= prod (f t) (Dg p t) - (- 1) ^ p *\<^sub>R prod (Df p t) (g t)" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2785 |
unfolding p'[symmetric] |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2786 |
by (simp add: assms) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2787 |
thus ?thesis |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2788 |
using assms |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2789 |
by (auto intro!: derivative_eq_intros has_vector_derivative) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2790 |
qed (auto intro!: derivative_eq_intros has_vector_derivative) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2791 |
|
60621 | 2792 |
lemma |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2793 |
fixes f::"real\<Rightarrow>'a::banach" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2794 |
assumes "p>0" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2795 |
and f0: "Df 0 = f" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2796 |
and Df: "\<And>m t. m < p \<Longrightarrow> a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
66402 | 2797 |
(Df m has_vector_derivative Df (Suc m) t) (at t within {a..b})" |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2798 |
and ivl: "a \<le> b" |
60621 | 2799 |
defines "i \<equiv> \<lambda>x. ((b - x) ^ (p - 1) / fact (p - 1)) *\<^sub>R Df p x" |
2800 |
shows taylor_has_integral: |
|
2801 |
"(i has_integral f b - (\<Sum>i<p. ((b - a) ^ i / fact i) *\<^sub>R Df i a)) {a..b}" |
|
2802 |
and taylor_integral: |
|
2803 |
"f b = (\<Sum>i<p. ((b - a) ^ i / fact i) *\<^sub>R Df i a) + integral {a..b} i" |
|
2804 |
and taylor_integrable: |
|
66402 | 2805 |
"i integrable_on {a..b}" |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
2806 |
proof goal_cases |
60621 | 2807 |
case 1 |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2808 |
interpret bounded_bilinear "scaleR::real\<Rightarrow>'a\<Rightarrow>'a" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2809 |
by (rule bounded_bilinear_scaleR) |
63040 | 2810 |
define g where "g s = (b - s)^(p - 1)/fact (p - 1)" for s |
2811 |
define Dg where [abs_def]: |
|
2812 |
"Dg n s = (if n < p then (-1)^n * (b - s)^(p - 1 - n) / fact (p - 1 - n) else 0)" for n s |
|
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2813 |
have g0: "Dg 0 = g" |
60420 | 2814 |
using \<open>p > 0\<close> |
62390 | 2815 |
by (auto simp add: Dg_def divide_simps g_def split: if_split_asm) |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2816 |
{ |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2817 |
fix m |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2818 |
assume "p > Suc m" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2819 |
hence "p - Suc m = Suc (p - Suc (Suc m))" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2820 |
by auto |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2821 |
hence "real (p - Suc m) * fact (p - Suc (Suc m)) = fact (p - Suc m)" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2822 |
by auto |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2823 |
} note fact_eq = this |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2824 |
have Dg: "\<And>m t. m < p \<Longrightarrow> a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
66402 | 2825 |
(Dg m has_vector_derivative Dg (Suc m) t) (at t within {a..b})" |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2826 |
unfolding Dg_def |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61524
diff
changeset
|
2827 |
by (auto intro!: derivative_eq_intros simp: has_vector_derivative_def fact_eq divide_simps) |
60621 | 2828 |
let ?sum = "\<lambda>t. \<Sum>i<p. (- 1) ^ i *\<^sub>R Dg i t *\<^sub>R Df (p - Suc i) t" |
64267 | 2829 |
from sum_prod_derivatives_has_vector_derivative[of _ Dg _ _ _ Df, |
60420 | 2830 |
OF \<open>p > 0\<close> g0 Dg f0 Df] |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2831 |
have deriv: "\<And>t. a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
60621 | 2832 |
(?sum has_vector_derivative |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2833 |
g t *\<^sub>R Df p t - (- 1) ^ p *\<^sub>R Dg p t *\<^sub>R f t) (at t within {a..b})" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2834 |
by auto |
60420 | 2835 |
from fundamental_theorem_of_calculus[rule_format, OF \<open>a \<le> b\<close> deriv] |
66402 | 2836 |
have "(i has_integral ?sum b - ?sum a) {a..b}" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
2837 |
using atLeastatMost_empty'[simp del] |
60621 | 2838 |
by (simp add: i_def g_def Dg_def) |
2839 |
also |
|
2840 |
have one: "(- 1) ^ p' * (- 1) ^ p' = (1::real)" |
|
2841 |
and "{..<p} \<inter> {i. p = Suc i} = {p - 1}" |
|
2842 |
for p' |
|
61222 | 2843 |
using \<open>p > 0\<close> |
60621 | 2844 |
by (auto simp: power_mult_distrib[symmetric]) |
2845 |
then have "?sum b = f b" |
|
61222 | 2846 |
using Suc_pred'[OF \<open>p > 0\<close>] |
60621 | 2847 |
by (simp add: diff_eq_eq Dg_def power_0_left le_Suc_eq if_distrib |
64267 | 2848 |
cond_application_beta sum.If_cases f0) |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2849 |
also |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2850 |
have "{..<p} = (\<lambda>x. p - x - 1) ` {..<p}" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2851 |
proof safe |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2852 |
fix x |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2853 |
assume "x < p" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2854 |
thus "x \<in> (\<lambda>x. p - x - 1) ` {..<p}" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2855 |
by (auto intro!: image_eqI[where x = "p - x - 1"]) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2856 |
qed simp |
60621 | 2857 |
from _ this |
2858 |
have "?sum a = (\<Sum>i<p. ((b - a) ^ i / fact i) *\<^sub>R Df i a)" |
|
64267 | 2859 |
by (rule sum.reindex_cong) (auto simp add: inj_on_def Dg_def one) |
60621 | 2860 |
finally show c: ?case . |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2861 |
case 2 show ?case using c integral_unique |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2862 |
by (metis (lifting) add.commute diff_eq_eq integral_unique) |
60621 | 2863 |
case 3 show ?case using c by force |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2864 |
qed |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2865 |
|
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2866 |
|
35172 | 2867 |
|
60420 | 2868 |
subsection \<open>Only need trivial subintervals if the interval itself is trivial.\<close> |
35172 | 2869 |
|
53520 | 2870 |
lemma division_of_nontrivial: |
56188 | 2871 |
fixes s :: "'a::euclidean_space set set" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2872 |
assumes s: "s division_of (cbox a b)" |
56188 | 2873 |
and "content (cbox a b) \<noteq> 0" |
2874 |
shows "{k. k \<in> s \<and> content k \<noteq> 0} division_of (cbox a b)" |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2875 |
using s |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2876 |
proof (induction "card s" arbitrary: s rule: less_induct) |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2877 |
case less |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2878 |
note s = division_ofD[OF less.prems] |
53520 | 2879 |
{ |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2880 |
presume *: "{k \<in> s. content k \<noteq> 0} \<noteq> s \<Longrightarrow> ?case" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2881 |
then show ?case |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2882 |
using less.prems by fastforce |
53520 | 2883 |
} |
2884 |
assume noteq: "{k \<in> s. content k \<noteq> 0} \<noteq> s" |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2885 |
then obtain k c d where "k \<in> s" and contk: "content k = 0" and keq: "k = cbox c d" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2886 |
using s(4) by blast |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2887 |
then have "card s > 0" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2888 |
unfolding card_gt_0_iff using less by auto |
53520 | 2889 |
then have card: "card (s - {k}) < card s" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2890 |
using less \<open>k \<in> s\<close> by (simp add: s(1)) |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2891 |
have closed: "closed (\<Union>(s - {k}))" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2892 |
using less.prems by auto |
53520 | 2893 |
have "k \<subseteq> \<Union>(s - {k})" |
2894 |
apply safe |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2895 |
apply (rule closed[unfolded closed_limpt,rule_format]) |
53520 | 2896 |
unfolding islimpt_approachable |
2897 |
proof safe |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2898 |
fix x and e :: real |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2899 |
assume "x \<in> k" "e > 0" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2900 |
obtain i where i: "c\<bullet>i = d\<bullet>i" "i\<in>Basis" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2901 |
using contk s(3) [OF \<open>k \<in> s\<close>] unfolding box_ne_empty keq |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2902 |
by (meson content_eq_0 dual_order.antisym) |
53520 | 2903 |
then have xi: "x\<bullet>i = d\<bullet>i" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2904 |
using \<open>x \<in> k\<close> unfolding keq mem_box by (metis antisym) |
63040 | 2905 |
define y where "y = (\<Sum>j\<in>Basis. (if j = i then if c\<bullet>i \<le> (a\<bullet>i + b\<bullet>i) / 2 then c\<bullet>i + |
2906 |
min e (b\<bullet>i - c\<bullet>i) / 2 else c\<bullet>i - min e (c\<bullet>i - a\<bullet>i) / 2 else x\<bullet>j) *\<^sub>R j)" |
|
53520 | 2907 |
show "\<exists>x'\<in>\<Union>(s - {k}). x' \<noteq> x \<and> dist x' x < e" |
2908 |
apply (rule_tac x=y in bexI) |
|
2909 |
proof |
|
56188 | 2910 |
have "d \<in> cbox c d" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2911 |
using s(3)[OF \<open>k \<in> s\<close>] by (simp add: box_ne_empty(1) keq mem_box(2)) |
56188 | 2912 |
then have "d \<in> cbox a b" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2913 |
using s(2)[OF \<open>k \<in> s\<close>] |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2914 |
unfolding keq |
53520 | 2915 |
by auto |
56188 | 2916 |
note di = this[unfolded mem_box,THEN bspec[where x=i]] |
53520 | 2917 |
then have xyi: "y\<bullet>i \<noteq> x\<bullet>i" |
2918 |
unfolding y_def i xi |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2919 |
using \<open>e > 0\<close> assms(2)[unfolded content_eq_0] i(2) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2920 |
by (auto elim!: ballE[of _ _ i]) |
53520 | 2921 |
then show "y \<noteq> x" |
2922 |
unfolding euclidean_eq_iff[where 'a='a] using i by auto |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2923 |
have "norm (y-x) \<le> (\<Sum>b\<in>Basis. \<bar>(y - x) \<bullet> b\<bar>)" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2924 |
by (rule norm_le_l1) |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2925 |
also have "... = \<bar>(y - x) \<bullet> i\<bar> + (\<Sum>b \<in> Basis - {i}. \<bar>(y - x) \<bullet> b\<bar>)" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2926 |
by (meson finite_Basis i(2) sum.remove) |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2927 |
also have "... < e + sum (\<lambda>i. 0) Basis" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2928 |
proof (rule add_less_le_mono) |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
2929 |
show "\<bar>(y-x) \<bullet> i\<bar> < e" |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2930 |
using di \<open>e > 0\<close> y_def i xi by (auto simp: inner_simps) |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
2931 |
show "(\<Sum>i\<in>Basis - {i}. \<bar>(y-x) \<bullet> i\<bar>) \<le> (\<Sum>i\<in>Basis. 0)" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2932 |
unfolding y_def by (auto simp: inner_simps) |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2933 |
qed |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2934 |
finally have "norm (y-x) < e + sum (\<lambda>i. 0) Basis" . |
53520 | 2935 |
then show "dist y x < e" |
2936 |
unfolding dist_norm by auto |
|
2937 |
have "y \<notin> k" |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2938 |
unfolding keq mem_box using i(1) i(2) xi xyi by fastforce |
53520 | 2939 |
moreover |
2940 |
have "y \<in> \<Union>s" |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2941 |
using subsetD[OF s(2)[OF \<open>k \<in> s\<close>] \<open>x \<in> k\<close>] \<open>e > 0\<close> di i |
56188 | 2942 |
unfolding s mem_box y_def |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
2943 |
by (auto simp: field_simps elim!: ballE[of _ _ i]) |
53520 | 2944 |
ultimately |
2945 |
show "y \<in> \<Union>(s - {k})" by auto |
|
2946 |
qed |
|
2947 |
qed |
|
56188 | 2948 |
then have "\<Union>(s - {k}) = cbox a b" |
53520 | 2949 |
unfolding s(6)[symmetric] by auto |
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2950 |
then have "s - {k} division_of cbox a b" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2951 |
by (metis Diff_subset less.prems division_of_subset s(6)) |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2952 |
then have "{ka \<in> s - {k}. content ka \<noteq> 0} division_of (cbox a b)" |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2953 |
using card less.hyps by blast |
53520 | 2954 |
moreover |
2955 |
have "{ka \<in> s - {k}. content ka \<noteq> 0} = {k \<in> s. content k \<noteq> 0}" |
|
66523
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2956 |
using contk by auto |
5a1a2ac950c2
division_of_nontrivial partial cleanup
paulson <lp15@cam.ac.uk>
parents:
66519
diff
changeset
|
2957 |
ultimately show ?case by auto |
53520 | 2958 |
qed |
2959 |
||
35172 | 2960 |
|
60420 | 2961 |
subsection \<open>Integrability on subintervals.\<close> |
35172 | 2962 |
|
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2963 |
lemma operative_integrableI: |
56188 | 2964 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2965 |
assumes "0 \<le> e" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2966 |
shows "operative conj True (\<lambda>i. f integrable_on i)" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2967 |
proof - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2968 |
interpret comm_monoid conj True |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2969 |
by standard auto |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2970 |
show ?thesis |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2971 |
apply standard |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2972 |
apply safe |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2973 |
apply (subst integrable_on_def) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2974 |
apply rule |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2975 |
apply (rule has_integral_null_eq[where i=0, THEN iffD2]) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2976 |
apply (simp add: content_eq_0_interior) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2977 |
apply rule |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2978 |
apply (rule, assumption, assumption)+ |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2979 |
unfolding integrable_on_def |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2980 |
apply (auto intro!: has_integral_split) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2981 |
done |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2982 |
qed |
53520 | 2983 |
|
2984 |
lemma integrable_subinterval: |
|
56188 | 2985 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
2986 |
assumes "f integrable_on cbox a b" |
|
2987 |
and "cbox c d \<subseteq> cbox a b" |
|
2988 |
shows "f integrable_on cbox c d" |
|
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2989 |
proof - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2990 |
interpret operative conj True "\<lambda>i. f integrable_on i" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2991 |
using order_refl by (rule operative_integrableI) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2992 |
show ?thesis |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2993 |
apply (cases "cbox c d = {}") |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2994 |
defer |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2995 |
apply (rule partial_division_extend_1[OF assms(2)],assumption) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2996 |
using division [symmetric] assms(1) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2997 |
apply (auto simp: comm_monoid_set_F_and) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2998 |
done |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
2999 |
qed |
53520 | 3000 |
|
56188 | 3001 |
lemma integrable_subinterval_real: |
3002 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
66402 | 3003 |
assumes "f integrable_on {a..b}" |
3004 |
and "{c..d} \<subseteq> {a..b}" |
|
3005 |
shows "f integrable_on {c..d}" |
|
56188 | 3006 |
by (metis assms(1) assms(2) box_real(2) integrable_subinterval) |
3007 |
||
35172 | 3008 |
|
60420 | 3009 |
subsection \<open>Combining adjacent intervals in 1 dimension.\<close> |
35172 | 3010 |
|
53520 | 3011 |
lemma has_integral_combine: |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3012 |
fixes a b c :: real and j :: "'a::banach" |
53520 | 3013 |
assumes "a \<le> c" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3014 |
and "c \<le> b" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3015 |
and ac: "(f has_integral i) {a..c}" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3016 |
and cb: "(f has_integral j) {c..b}" |
66402 | 3017 |
shows "(f has_integral (i + j)) {a..b}" |
53520 | 3018 |
proof - |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
3019 |
interpret operative_real "lift_option plus" "Some 0" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
3020 |
"\<lambda>i. if f integrable_on i then Some (integral i f) else None" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
3021 |
using operative_integralI by (rule operative_realI) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
3022 |
from \<open>a \<le> c\<close> \<open>c \<le> b\<close> ac cb coalesce_less_eq |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3023 |
have *: "lift_option op + |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3024 |
(if f integrable_on {a..c} then Some (integral {a..c} f) else None) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3025 |
(if f integrable_on {c..b} then Some (integral {c..b} f) else None) = |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3026 |
(if f integrable_on {a..b} then Some (integral {a..b} f) else None)" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3027 |
by (auto simp: split: if_split_asm) |
56188 | 3028 |
then have "f integrable_on cbox a b" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3029 |
using ac cb by (auto split: if_split_asm) |
53520 | 3030 |
with * |
3031 |
show ?thesis |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3032 |
using ac cb by (auto simp add: integrable_on_def integral_unique split: if_split_asm) |
53520 | 3033 |
qed |
3034 |
||
3035 |
lemma integral_combine: |
|
3036 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
3037 |
assumes "a \<le> c" |
|
3038 |
and "c \<le> b" |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3039 |
and ab: "f integrable_on {a..b}" |
66402 | 3040 |
shows "integral {a..c} f + integral {c..b} f = integral {a..b} f" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3041 |
proof - |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3042 |
have "(f has_integral integral {a..c} f) {a..c}" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3043 |
using ab \<open>c \<le> b\<close> integrable_subinterval_real by fastforce |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3044 |
moreover |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3045 |
have "(f has_integral integral {c..b} f) {c..b}" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3046 |
using ab \<open>a \<le> c\<close> integrable_subinterval_real by fastforce |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3047 |
ultimately have "(f has_integral integral {a..c} f + integral {c..b} f) {a..b}" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3048 |
using \<open>a \<le> c\<close> \<open>c \<le> b\<close> has_integral_combine by blast |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3049 |
then show ?thesis |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3050 |
by (simp add: has_integral_integrable_integral) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3051 |
qed |
53520 | 3052 |
|
3053 |
lemma integrable_combine: |
|
3054 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
3055 |
assumes "a \<le> c" |
|
3056 |
and "c \<le> b" |
|
66402 | 3057 |
and "f integrable_on {a..c}" |
3058 |
and "f integrable_on {c..b}" |
|
3059 |
shows "f integrable_on {a..b}" |
|
53520 | 3060 |
using assms |
3061 |
unfolding integrable_on_def |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
3062 |
by (auto intro!: has_integral_combine) |
53520 | 3063 |
|
35172 | 3064 |
|
60420 | 3065 |
subsection \<open>Reduce integrability to "local" integrability.\<close> |
35172 | 3066 |
|
53520 | 3067 |
lemma integrable_on_little_subintervals: |
56188 | 3068 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
3069 |
assumes "\<forall>x\<in>cbox a b. \<exists>d>0. \<forall>u v. x \<in> cbox u v \<and> cbox u v \<subseteq> ball x d \<and> cbox u v \<subseteq> cbox a b \<longrightarrow> |
|
3070 |
f integrable_on cbox u v" |
|
3071 |
shows "f integrable_on cbox a b" |
|
3072 |
proof - |
|
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
3073 |
interpret operative conj True "\<lambda>i. f integrable_on i" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
3074 |
using order_refl by (rule operative_integrableI) |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3075 |
have "\<forall>x. \<exists>d>0. x\<in>cbox a b \<longrightarrow> (\<forall>u v. x \<in> cbox u v \<and> cbox u v \<subseteq> ball x d \<and> cbox u v \<subseteq> cbox a b \<longrightarrow> |
56188 | 3076 |
f integrable_on cbox u v)" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3077 |
using assms by (metis zero_less_one) |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3078 |
then obtain d where d: "\<And>x. 0 < d x" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3079 |
"\<And>x u v. \<lbrakk>x \<in> cbox a b; x \<in> cbox u v; cbox u v \<subseteq> ball x (d x); cbox u v \<subseteq> cbox a b\<rbrakk> |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3080 |
\<Longrightarrow> f integrable_on cbox u v" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3081 |
by metis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3082 |
obtain p where p: "p tagged_division_of cbox a b" "(\<lambda>x. ball x (d x)) fine p" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3083 |
using fine_division_exists[OF gauge_ball_dependent,of d a b] d(1) by blast |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3084 |
then have sndp: "snd ` p division_of cbox a b" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3085 |
by (metis division_of_tagged_division) |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3086 |
have "f integrable_on k" if "(x, k) \<in> p" for x k |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3087 |
using tagged_division_ofD(2-4)[OF p(1) that] fineD[OF p(2) that] d[of x] by auto |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3088 |
then show ?thesis |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
3089 |
unfolding division [symmetric, OF sndp] comm_monoid_set_F_and |
53520 | 3090 |
by auto |
3091 |
qed |
|
3092 |
||
35172 | 3093 |
|
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
3094 |
subsection \<open>Second FTC or existence of antiderivative.\<close> |
35172 | 3095 |
|
56188 | 3096 |
lemma integrable_const[intro]: "(\<lambda>x. c) integrable_on cbox a b" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3097 |
unfolding integrable_on_def by blast |
53520 | 3098 |
|
61204 | 3099 |
lemma integral_has_vector_derivative_continuous_at: |
3100 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
3101 |
assumes f: "f integrable_on {a..b}" |
|
3102 |
and x: "x \<in> {a..b}" |
|
3103 |
and fx: "continuous (at x within {a..b}) f" |
|
3104 |
shows "((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})" |
|
3105 |
proof - |
|
3106 |
let ?I = "\<lambda>a b. integral {a..b} f" |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61524
diff
changeset
|
3107 |
{ fix e::real |
61204 | 3108 |
assume "e > 0" |
3109 |
obtain d where "d>0" and d: "\<And>x'. \<lbrakk>x' \<in> {a..b}; \<bar>x' - x\<bar> < d\<rbrakk> \<Longrightarrow> norm(f x' - f x) \<le> e" |
|
61222 | 3110 |
using \<open>e>0\<close> fx by (auto simp: continuous_within_eps_delta dist_norm less_imp_le) |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3111 |
have "norm (integral {a..y} f - integral {a..x} f - (y-x) *\<^sub>R f x) \<le> e * \<bar>y - x\<bar>" |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61524
diff
changeset
|
3112 |
if y: "y \<in> {a..b}" and yx: "\<bar>y - x\<bar> < d" for y |
61204 | 3113 |
proof (cases "y < x") |
3114 |
case False |
|
3115 |
have "f integrable_on {a..y}" |
|
3116 |
using f y by (simp add: integrable_subinterval_real) |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61524
diff
changeset
|
3117 |
then have Idiff: "?I a y - ?I a x = ?I x y" |
61204 | 3118 |
using False x by (simp add: algebra_simps integral_combine) |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3119 |
have fux_int: "((\<lambda>u. f u - f x) has_integral integral {x..y} f - (y-x) *\<^sub>R f x) {x..y}" |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
3120 |
apply (rule has_integral_diff) |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
3121 |
using x y apply (auto intro: integrable_integral [OF integrable_subinterval_real [OF f]]) |
61204 | 3122 |
using has_integral_const_real [of "f x" x y] False |
3123 |
apply (simp add: ) |
|
3124 |
done |
|
3125 |
show ?thesis |
|
3126 |
using False |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3127 |
apply (simp add: abs_eq_content del: content_real_if measure_lborel_Icc) |
61204 | 3128 |
apply (rule has_integral_bound_real[where f="(\<lambda>u. f u - f x)"]) |
61222 | 3129 |
using yx False d x y \<open>e>0\<close> apply (auto simp add: Idiff fux_int) |
61204 | 3130 |
done |
3131 |
next |
|
3132 |
case True |
|
3133 |
have "f integrable_on {a..x}" |
|
3134 |
using f x by (simp add: integrable_subinterval_real) |
|
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61524
diff
changeset
|
3135 |
then have Idiff: "?I a x - ?I a y = ?I y x" |
61204 | 3136 |
using True x y by (simp add: algebra_simps integral_combine) |
3137 |
have fux_int: "((\<lambda>u. f u - f x) has_integral integral {y..x} f - (x - y) *\<^sub>R f x) {y..x}" |
|
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
3138 |
apply (rule has_integral_diff) |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
3139 |
using x y apply (auto intro: integrable_integral [OF integrable_subinterval_real [OF f]]) |
61204 | 3140 |
using has_integral_const_real [of "f x" y x] True |
3141 |
apply (simp add: ) |
|
3142 |
done |
|
3143 |
have "norm (integral {a..x} f - integral {a..y} f - (x - y) *\<^sub>R f x) \<le> e * \<bar>y - x\<bar>" |
|
3144 |
using True |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3145 |
apply (simp add: abs_eq_content del: content_real_if measure_lborel_Icc) |
61204 | 3146 |
apply (rule has_integral_bound_real[where f="(\<lambda>u. f u - f x)"]) |
61222 | 3147 |
using yx True d x y \<open>e>0\<close> apply (auto simp add: Idiff fux_int) |
61204 | 3148 |
done |
3149 |
then show ?thesis |
|
3150 |
by (simp add: algebra_simps norm_minus_commute) |
|
3151 |
qed |
|
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3152 |
then have "\<exists>d>0. \<forall>y\<in>{a..b}. \<bar>y - x\<bar> < d \<longrightarrow> norm (integral {a..y} f - integral {a..x} f - (y-x) *\<^sub>R f x) \<le> e * \<bar>y - x\<bar>" |
61609
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61524
diff
changeset
|
3153 |
using \<open>d>0\<close> by blast |
77b453bd616f
Coercion "real" now has type nat => real only and is no longer overloaded. Type class "real_of" is gone. Many duplicate theorems removed.
paulson <lp15@cam.ac.uk>
parents:
61524
diff
changeset
|
3154 |
} |
61204 | 3155 |
then show ?thesis |
3156 |
by (simp add: has_vector_derivative_def has_derivative_within_alt bounded_linear_scaleR_left) |
|
3157 |
qed |
|
3158 |
||
53520 | 3159 |
lemma integral_has_vector_derivative: |
3160 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
66402 | 3161 |
assumes "continuous_on {a..b} f" |
3162 |
and "x \<in> {a..b}" |
|
3163 |
shows "((\<lambda>u. integral {a..u} f) has_vector_derivative f(x)) (at x within {a..b})" |
|
61204 | 3164 |
apply (rule integral_has_vector_derivative_continuous_at [OF integrable_continuous_real]) |
3165 |
using assms |
|
3166 |
apply (auto simp: continuous_on_eq_continuous_within) |
|
3167 |
done |
|
53520 | 3168 |
|
3169 |
lemma antiderivative_continuous: |
|
3170 |
fixes q b :: real |
|
66402 | 3171 |
assumes "continuous_on {a..b} f" |
3172 |
obtains g where "\<forall>x\<in>{a..b}. (g has_vector_derivative (f x::_::banach)) (at x within {a..b})" |
|
53520 | 3173 |
apply (rule that) |
3174 |
apply rule |
|
3175 |
using integral_has_vector_derivative[OF assms] |
|
3176 |
apply auto |
|
3177 |
done |
|
3178 |
||
35172 | 3179 |
|
60420 | 3180 |
subsection \<open>Combined fundamental theorem of calculus.\<close> |
35172 | 3181 |
|
53520 | 3182 |
lemma antiderivative_integral_continuous: |
3183 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
66402 | 3184 |
assumes "continuous_on {a..b} f" |
3185 |
obtains g where "\<forall>u\<in>{a..b}. \<forall>v \<in> {a..b}. u \<le> v \<longrightarrow> (f has_integral (g v - g u)) {u..v}" |
|
53520 | 3186 |
proof - |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3187 |
obtain g |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3188 |
where g: "\<And>x. x \<in> {a..b} \<Longrightarrow> (g has_vector_derivative f x) (at x within {a..b})" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3189 |
using antiderivative_continuous[OF assms] by metis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3190 |
have "(f has_integral g v - g u) {u..v}" if "u \<in> {a..b}" "v \<in> {a..b}" "u \<le> v" for u v |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3191 |
proof - |
56188 | 3192 |
have "\<forall>x\<in>cbox u v. (g has_vector_derivative f x) (at x within cbox u v)" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3193 |
by (meson g has_vector_derivative_within_subset interval_subset_is_interval is_interval_closed_interval subsetCE that(1) that(2)) |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3194 |
then show ?thesis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3195 |
by (simp add: fundamental_theorem_of_calculus that(3)) |
53520 | 3196 |
qed |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3197 |
then show ?thesis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3198 |
using that by blast |
53520 | 3199 |
qed |
3200 |
||
35172 | 3201 |
|
60420 | 3202 |
subsection \<open>General "twiddling" for interval-to-interval function image.\<close> |
35172 | 3203 |
|
3204 |
lemma has_integral_twiddle: |
|
53520 | 3205 |
assumes "0 < r" |
3206 |
and "\<forall>x. h(g x) = x" |
|
3207 |
and "\<forall>x. g(h x) = x" |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3208 |
and contg: "\<And>x. continuous (at x) g" |
56188 | 3209 |
and "\<forall>u v. \<exists>w z. g ` cbox u v = cbox w z" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
3210 |
and h: "\<forall>u v. \<exists>w z. h ` cbox u v = cbox w z" |
56188 | 3211 |
and "\<forall>u v. content(g ` cbox u v) = r * content (cbox u v)" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3212 |
and intfi: "(f has_integral i) (cbox a b)" |
56188 | 3213 |
shows "((\<lambda>x. f(g x)) has_integral (1 / r) *\<^sub>R i) (h ` cbox a b)" |
53520 | 3214 |
proof - |
61165 | 3215 |
show ?thesis when *: "cbox a b \<noteq> {} \<Longrightarrow> ?thesis" |
3216 |
apply cases |
|
3217 |
defer |
|
3218 |
apply (rule *) |
|
3219 |
apply assumption |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
3220 |
proof goal_cases |
61167 | 3221 |
case prems: 1 |
61165 | 3222 |
then show ?thesis |
61167 | 3223 |
unfolding prems assms(8)[unfolded prems has_integral_empty_eq] by auto |
61165 | 3224 |
qed |
56188 | 3225 |
assume "cbox a b \<noteq> {}" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3226 |
obtain w z where wz: "h ` cbox a b = cbox w z" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3227 |
using h by blast |
53520 | 3228 |
have inj: "inj g" "inj h" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3229 |
apply (metis assms(2) injI) |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3230 |
by (metis assms(3) injI) |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
3231 |
from h obtain ha hb where h_eq: "h ` cbox a b = cbox ha hb" by blast |
53520 | 3232 |
show ?thesis |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
3233 |
unfolding h_eq has_integral |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
3234 |
unfolding h_eq[symmetric] |
53520 | 3235 |
proof safe |
3236 |
fix e :: real |
|
3237 |
assume e: "e > 0" |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3238 |
with \<open>0 < r\<close> have "e * r > 0" by simp |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3239 |
with intfi[unfolded has_integral] |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3240 |
obtain d where d: "gauge d" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3241 |
"\<And>p. p tagged_division_of cbox a b \<and> d fine p |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3242 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - i) < e * r" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3243 |
by metis |
63040 | 3244 |
define d' where "d' x = {y. g y \<in> d (g x)}" for x |
53520 | 3245 |
have d': "\<And>x. d' x = {y. g y \<in> (d (g x))}" |
3246 |
unfolding d'_def .. |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3247 |
show "\<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of h ` cbox a b \<and> d fine p |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3248 |
\<longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - (1 / r) *\<^sub>R i) < e)" |
53520 | 3249 |
proof (rule_tac x=d' in exI, safe) |
3250 |
show "gauge d'" |
|
3251 |
using d(1) |
|
3252 |
unfolding gauge_def d' |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3253 |
using continuous_open_preimage_univ[OF _ contg] |
53520 | 3254 |
by auto |
3255 |
fix p |
|
56188 | 3256 |
assume as: "p tagged_division_of h ` cbox a b" "d' fine p" |
53520 | 3257 |
note p = tagged_division_ofD[OF as(1)] |
56188 | 3258 |
have "(\<lambda>(x, k). (g x, g ` k)) ` p tagged_division_of (cbox a b) \<and> d fine (\<lambda>(x, k). (g x, g ` k)) ` p" |
53520 | 3259 |
unfolding tagged_division_of |
3260 |
proof safe |
|
3261 |
show "finite ((\<lambda>(x, k). (g x, g ` k)) ` p)" |
|
3262 |
using as by auto |
|
3263 |
show "d fine (\<lambda>(x, k). (g x, g ` k)) ` p" |
|
3264 |
using as(2) unfolding fine_def d' by auto |
|
3265 |
fix x k |
|
3266 |
assume xk[intro]: "(x, k) \<in> p" |
|
3267 |
show "g x \<in> g ` k" |
|
3268 |
using p(2)[OF xk] by auto |
|
56188 | 3269 |
show "\<exists>u v. g ` k = cbox u v" |
53520 | 3270 |
using p(4)[OF xk] using assms(5-6) by auto |
3271 |
{ |
|
3272 |
fix y |
|
3273 |
assume "y \<in> k" |
|
56188 | 3274 |
then show "g y \<in> cbox a b" "g y \<in> cbox a b" |
53520 | 3275 |
using p(3)[OF xk,unfolded subset_eq,rule_format,of "h (g y)"] |
3276 |
using assms(2)[rule_format,of y] |
|
3277 |
unfolding inj_image_mem_iff[OF inj(2)] |
|
3278 |
by auto |
|
3279 |
} |
|
3280 |
fix x' k' |
|
3281 |
assume xk': "(x', k') \<in> p" |
|
3282 |
fix z |
|
63018
ae2ec7d86ad4
tidying some proofs; getting rid of "nonempty_witness"
paulson <lp15@cam.ac.uk>
parents:
63007
diff
changeset
|
3283 |
assume z: "z \<in> interior (g ` k)" "z \<in> interior (g ` k')" |
53520 | 3284 |
have same: "(x, k) = (x', k')" |
3285 |
apply - |
|
53842 | 3286 |
apply (rule ccontr) |
3287 |
apply (drule p(5)[OF xk xk']) |
|
53520 | 3288 |
proof - |
3289 |
assume as: "interior k \<inter> interior k' = {}" |
|
63018
ae2ec7d86ad4
tidying some proofs; getting rid of "nonempty_witness"
paulson <lp15@cam.ac.uk>
parents:
63007
diff
changeset
|
3290 |
have "z \<in> g ` (interior k \<inter> interior k')" |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3291 |
using interior_image_subset[OF \<open>inj g\<close> contg] z |
63018
ae2ec7d86ad4
tidying some proofs; getting rid of "nonempty_witness"
paulson <lp15@cam.ac.uk>
parents:
63007
diff
changeset
|
3292 |
unfolding image_Int[OF inj(1)] by blast |
53520 | 3293 |
then show False |
3294 |
using as by blast |
|
3295 |
qed |
|
3296 |
then show "g x = g x'" |
|
3297 |
by auto |
|
3298 |
{ |
|
3299 |
fix z |
|
3300 |
assume "z \<in> k" |
|
3301 |
then show "g z \<in> g ` k'" |
|
3302 |
using same by auto |
|
3303 |
} |
|
3304 |
{ |
|
3305 |
fix z |
|
3306 |
assume "z \<in> k'" |
|
3307 |
then show "g z \<in> g ` k" |
|
3308 |
using same by auto |
|
3309 |
} |
|
3310 |
next |
|
3311 |
fix x |
|
56188 | 3312 |
assume "x \<in> cbox a b" |
53520 | 3313 |
then have "h x \<in> \<Union>{k. \<exists>x. (x, k) \<in> p}" |
3314 |
using p(6) by auto |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3315 |
then obtain X y where "h x \<in> X" "(y, X) \<in> p" by blast |
53520 | 3316 |
then show "x \<in> \<Union>{k. \<exists>x. (x, k) \<in> (\<lambda>(x, k). (g x, g ` k)) ` p}" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3317 |
apply (clarsimp simp: ) |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3318 |
by (metis (no_types, lifting) assms(3) image_eqI pair_imageI) |
53520 | 3319 |
qed |
3320 |
note ** = d(2)[OF this] |
|
3321 |
have *: "inj_on (\<lambda>(x, k). (g x, g ` k)) p" |
|
3322 |
using inj(1) unfolding inj_on_def by fastforce |
|
3323 |
have "(\<Sum>(x, k)\<in>(\<lambda>(x, k). (g x, g ` k)) ` p. content k *\<^sub>R f x) - i = r *\<^sub>R (\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - i" (is "?l = _") |
|
57129
7edb7550663e
introduce more powerful reindexing rules for big operators
hoelzl
parents:
56544
diff
changeset
|
3324 |
using assms(7) |
64267 | 3325 |
apply (simp only: algebra_simps add_left_cancel scaleR_right.sum) |
3326 |
apply (subst sum.reindex_bij_betw[symmetric, where h="\<lambda>(x, k). (g x, g ` k)" and S=p]) |
|
3327 |
apply (auto intro!: * sum.cong simp: bij_betw_def dest!: p(4)) |
|
63170 | 3328 |
done |
53520 | 3329 |
also have "\<dots> = r *\<^sub>R ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - (1 / r) *\<^sub>R i)" (is "_ = ?r") |
3330 |
unfolding scaleR_diff_right scaleR_scaleR |
|
3331 |
using assms(1) |
|
3332 |
by auto |
|
3333 |
finally have *: "?l = ?r" . |
|
3334 |
show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - (1 / r) *\<^sub>R i) < e" |
|
3335 |
using ** |
|
3336 |
unfolding * |
|
3337 |
unfolding norm_scaleR |
|
3338 |
using assms(1) |
|
3339 |
by (auto simp add:field_simps) |
|
3340 |
qed |
|
3341 |
qed |
|
3342 |
qed |
|
3343 |
||
35172 | 3344 |
|
60420 | 3345 |
subsection \<open>Special case of a basic affine transformation.\<close> |
35172 | 3346 |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3347 |
lemma AE_lborel_inner_neq: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3348 |
assumes k: "k \<in> Basis" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3349 |
shows "AE x in lborel. x \<bullet> k \<noteq> c" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3350 |
proof - |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3351 |
interpret finite_product_sigma_finite "\<lambda>_. lborel" Basis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3352 |
proof qed simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3353 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3354 |
have "emeasure lborel {x\<in>space lborel. x \<bullet> k = c} = emeasure (\<Pi>\<^sub>M j::'a\<in>Basis. lborel) (\<Pi>\<^sub>E j\<in>Basis. if j = k then {c} else UNIV)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3355 |
using k |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3356 |
by (auto simp add: lborel_eq[where 'a='a] emeasure_distr intro!: arg_cong2[where f=emeasure]) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3357 |
(auto simp: space_PiM PiE_iff extensional_def split: if_split_asm) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3358 |
also have "\<dots> = (\<Prod>j\<in>Basis. emeasure lborel (if j = k then {c} else UNIV))" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3359 |
by (intro measure_times) auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3360 |
also have "\<dots> = 0" |
64272 | 3361 |
by (intro prod_zero bexI[OF _ k]) auto |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3362 |
finally show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3363 |
by (subst AE_iff_measurable[OF _ refl]) auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3364 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3365 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3366 |
lemma content_image_stretch_interval: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3367 |
fixes m :: "'a::euclidean_space \<Rightarrow> real" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3368 |
defines "s f x \<equiv> (\<Sum>k::'a\<in>Basis. (f k * (x\<bullet>k)) *\<^sub>R k)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3369 |
shows "content (s m ` cbox a b) = \<bar>\<Prod>k\<in>Basis. m k\<bar> * content (cbox a b)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3370 |
proof cases |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3371 |
have s[measurable]: "s f \<in> borel \<rightarrow>\<^sub>M borel" for f |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3372 |
by (auto simp: s_def[abs_def]) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3373 |
assume m: "\<forall>k\<in>Basis. m k \<noteq> 0" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3374 |
then have s_comp_s: "s (\<lambda>k. 1 / m k) \<circ> s m = id" "s m \<circ> s (\<lambda>k. 1 / m k) = id" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3375 |
by (auto simp: s_def[abs_def] fun_eq_iff euclidean_representation) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3376 |
then have "inv (s (\<lambda>k. 1 / m k)) = s m" "bij (s (\<lambda>k. 1 / m k))" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3377 |
by (auto intro: inv_unique_comp o_bij) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3378 |
then have eq: "s m ` cbox a b = s (\<lambda>k. 1 / m k) -` cbox a b" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3379 |
using bij_vimage_eq_inv_image[OF \<open>bij (s (\<lambda>k. 1 / m k))\<close>, of "cbox a b"] by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3380 |
show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3381 |
using m unfolding eq measure_def |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3382 |
by (subst lborel_affine_euclidean[where c=m and t=0]) |
64272 | 3383 |
(simp_all add: emeasure_density measurable_sets_borel[OF s] abs_prod nn_integral_cmult |
3384 |
s_def[symmetric] emeasure_distr vimage_comp s_comp_s enn2real_mult prod_nonneg) |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3385 |
next |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3386 |
assume "\<not> (\<forall>k\<in>Basis. m k \<noteq> 0)" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3387 |
then obtain k where k: "k \<in> Basis" "m k = 0" by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3388 |
then have [simp]: "(\<Prod>k\<in>Basis. m k) = 0" |
64272 | 3389 |
by (intro prod_zero) auto |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3390 |
have "emeasure lborel {x\<in>space lborel. x \<in> s m ` cbox a b} = 0" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3391 |
proof (rule emeasure_eq_0_AE) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3392 |
show "AE x in lborel. x \<notin> s m ` cbox a b" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3393 |
using AE_lborel_inner_neq[OF \<open>k\<in>Basis\<close>] |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3394 |
proof eventually_elim |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3395 |
show "x \<bullet> k \<noteq> 0 \<Longrightarrow> x \<notin> s m ` cbox a b " for x |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3396 |
using k by (auto simp: s_def[abs_def] cbox_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3397 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3398 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3399 |
then show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3400 |
by (simp add: measure_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3401 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3402 |
|
53520 | 3403 |
lemma interval_image_affinity_interval: |
56188 | 3404 |
"\<exists>u v. (\<lambda>x. m *\<^sub>R (x::'a::euclidean_space) + c) ` cbox a b = cbox u v" |
3405 |
unfolding image_affinity_cbox |
|
53520 | 3406 |
by auto |
3407 |
||
56188 | 3408 |
lemma content_image_affinity_cbox: |
3409 |
"content((\<lambda>x::'a::euclidean_space. m *\<^sub>R x + c) ` cbox a b) = |
|
61945 | 3410 |
\<bar>m\<bar> ^ DIM('a) * content (cbox a b)" (is "?l = ?r") |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3411 |
proof (cases "cbox a b = {}") |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3412 |
case True then show ?thesis by simp |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3413 |
next |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3414 |
case False |
53399 | 3415 |
show ?thesis |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3416 |
proof (cases "m \<ge> 0") |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3417 |
case True |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3418 |
with \<open>cbox a b \<noteq> {}\<close> have "cbox (m *\<^sub>R a + c) (m *\<^sub>R b + c) \<noteq> {}" |
56188 | 3419 |
unfolding box_ne_empty |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3420 |
apply (intro ballI) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3421 |
apply (erule_tac x=i in ballE) |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3422 |
apply (auto simp: inner_simps mult_left_mono) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3423 |
done |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3424 |
moreover from True have *: "\<And>i. (m *\<^sub>R b + c) \<bullet> i - (m *\<^sub>R a + c) \<bullet> i = m *\<^sub>R (b - a) \<bullet> i" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3425 |
by (simp add: inner_simps field_simps) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3426 |
ultimately show ?thesis |
56188 | 3427 |
by (simp add: image_affinity_cbox True content_cbox' |
64272 | 3428 |
prod.distrib prod_constant inner_diff_left) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3429 |
next |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3430 |
case False |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3431 |
with \<open>cbox a b \<noteq> {}\<close> have "cbox (m *\<^sub>R b + c) (m *\<^sub>R a + c) \<noteq> {}" |
56188 | 3432 |
unfolding box_ne_empty |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3433 |
apply (intro ballI) |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3434 |
apply (erule_tac x=i in ballE) |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3435 |
apply (auto simp: inner_simps mult_left_mono) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3436 |
done |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3437 |
moreover from False have *: "\<And>i. (m *\<^sub>R a + c) \<bullet> i - (m *\<^sub>R b + c) \<bullet> i = (-m) *\<^sub>R (b - a) \<bullet> i" |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3438 |
by (simp add: inner_simps field_simps) |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53015
diff
changeset
|
3439 |
ultimately show ?thesis using False |
56188 | 3440 |
by (simp add: image_affinity_cbox content_cbox' |
64272 | 3441 |
prod.distrib[symmetric] prod_constant[symmetric] inner_diff_left) |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3442 |
qed |
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3443 |
qed |
35172 | 3444 |
|
53520 | 3445 |
lemma has_integral_affinity: |
56188 | 3446 |
fixes a :: "'a::euclidean_space" |
3447 |
assumes "(f has_integral i) (cbox a b)" |
|
60800
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3448 |
and "m \<noteq> 0" |
61945 | 3449 |
shows "((\<lambda>x. f(m *\<^sub>R x + c)) has_integral ((1 / (\<bar>m\<bar> ^ DIM('a))) *\<^sub>R i)) ((\<lambda>x. (1 / m) *\<^sub>R x + -((1 / m) *\<^sub>R c)) ` cbox a b)" |
53520 | 3450 |
apply (rule has_integral_twiddle) |
60800
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3451 |
using assms |
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3452 |
apply (safe intro!: interval_image_affinity_interval content_image_affinity_cbox) |
53520 | 3453 |
apply (rule zero_less_power) |
61165 | 3454 |
unfolding scaleR_right_distrib |
53520 | 3455 |
apply auto |
3456 |
done |
|
3457 |
||
3458 |
lemma integrable_affinity: |
|
56188 | 3459 |
assumes "f integrable_on cbox a b" |
53520 | 3460 |
and "m \<noteq> 0" |
56188 | 3461 |
shows "(\<lambda>x. f(m *\<^sub>R x + c)) integrable_on ((\<lambda>x. (1 / m) *\<^sub>R x + -((1/m) *\<^sub>R c)) ` cbox a b)" |
53520 | 3462 |
using assms |
3463 |
unfolding integrable_on_def |
|
3464 |
apply safe |
|
3465 |
apply (drule has_integral_affinity) |
|
3466 |
apply auto |
|
3467 |
done |
|
3468 |
||
60800
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3469 |
lemmas has_integral_affinity01 = has_integral_affinity [of _ _ 0 "1::real", simplified] |
35172 | 3470 |
|
60420 | 3471 |
subsection \<open>Special case of stretching coordinate axes separately.\<close> |
35172 | 3472 |
|
53523 | 3473 |
lemma has_integral_stretch: |
56188 | 3474 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
3475 |
assumes "(f has_integral i) (cbox a b)" |
|
53523 | 3476 |
and "\<forall>k\<in>Basis. m k \<noteq> 0" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
3477 |
shows "((\<lambda>x. f (\<Sum>k\<in>Basis. (m k * (x\<bullet>k))*\<^sub>R k)) has_integral |
64272 | 3478 |
((1/ \<bar>prod m Basis\<bar>) *\<^sub>R i)) ((\<lambda>x. (\<Sum>k\<in>Basis. (1 / m k * (x\<bullet>k))*\<^sub>R k)) ` cbox a b)" |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3479 |
apply (rule has_integral_twiddle[where f=f]) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3480 |
unfolding zero_less_abs_iff content_image_stretch_interval |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3481 |
unfolding image_stretch_interval empty_as_interval euclidean_eq_iff[where 'a='a] |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3482 |
using assms |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3483 |
by auto |
63941
f353674c2528
move absolutely_integrable_on to Equivalence_Lebesgue_Henstock_Integration, now based on the Lebesgue integral
hoelzl
parents:
63940
diff
changeset
|
3484 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36899
diff
changeset
|
3485 |
|
53523 | 3486 |
lemma integrable_stretch: |
56188 | 3487 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
3488 |
assumes "f integrable_on cbox a b" |
|
53523 | 3489 |
and "\<forall>k\<in>Basis. m k \<noteq> 0" |
3490 |
shows "(\<lambda>x::'a. f (\<Sum>k\<in>Basis. (m k * (x\<bullet>k))*\<^sub>R k)) integrable_on |
|
56188 | 3491 |
((\<lambda>x. \<Sum>k\<in>Basis. (1 / m k * (x\<bullet>k))*\<^sub>R k) ` cbox a b)" |
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3492 |
using assms unfolding integrable_on_def |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3493 |
by (force dest: has_integral_stretch) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3494 |
|
53523 | 3495 |
|
60420 | 3496 |
subsection \<open>even more special cases.\<close> |
35172 | 3497 |
|
53523 | 3498 |
lemma uminus_interval_vector[simp]: |
56188 | 3499 |
fixes a b :: "'a::euclidean_space" |
3500 |
shows "uminus ` cbox a b = cbox (-b) (-a)" |
|
53523 | 3501 |
apply (rule set_eqI) |
3502 |
apply rule |
|
3503 |
defer |
|
3504 |
unfolding image_iff |
|
3505 |
apply (rule_tac x="-x" in bexI) |
|
56188 | 3506 |
apply (auto simp add:minus_le_iff le_minus_iff mem_box) |
53523 | 3507 |
done |
3508 |
||
3509 |
lemma has_integral_reflect_lemma[intro]: |
|
56188 | 3510 |
assumes "(f has_integral i) (cbox a b)" |
3511 |
shows "((\<lambda>x. f(-x)) has_integral i) (cbox (-b) (-a))" |
|
53523 | 3512 |
using has_integral_affinity[OF assms, of "-1" 0] |
3513 |
by auto |
|
3514 |
||
56188 | 3515 |
lemma has_integral_reflect_lemma_real[intro]: |
66402 | 3516 |
assumes "(f has_integral i) {a..b::real}" |
56188 | 3517 |
shows "((\<lambda>x. f(-x)) has_integral i) {-b .. -a}" |
3518 |
using assms |
|
3519 |
unfolding box_real[symmetric] |
|
3520 |
by (rule has_integral_reflect_lemma) |
|
3521 |
||
53523 | 3522 |
lemma has_integral_reflect[simp]: |
56188 | 3523 |
"((\<lambda>x. f (-x)) has_integral i) (cbox (-b) (-a)) \<longleftrightarrow> (f has_integral i) (cbox a b)" |
53523 | 3524 |
apply rule |
3525 |
apply (drule_tac[!] has_integral_reflect_lemma) |
|
3526 |
apply auto |
|
3527 |
done |
|
35172 | 3528 |
|
56188 | 3529 |
lemma integrable_reflect[simp]: "(\<lambda>x. f(-x)) integrable_on cbox (-b) (-a) \<longleftrightarrow> f integrable_on cbox a b" |
35172 | 3530 |
unfolding integrable_on_def by auto |
3531 |
||
66402 | 3532 |
lemma integrable_reflect_real[simp]: "(\<lambda>x. f(-x)) integrable_on {-b .. -a} \<longleftrightarrow> f integrable_on {a..b::real}" |
56188 | 3533 |
unfolding box_real[symmetric] |
3534 |
by (rule integrable_reflect) |
|
3535 |
||
3536 |
lemma integral_reflect[simp]: "integral (cbox (-b) (-a)) (\<lambda>x. f (-x)) = integral (cbox a b) f" |
|
35172 | 3537 |
unfolding integral_def by auto |
3538 |
||
66402 | 3539 |
lemma integral_reflect_real[simp]: "integral {-b .. -a} (\<lambda>x. f (-x)) = integral {a..b::real} f" |
56188 | 3540 |
unfolding box_real[symmetric] |
3541 |
by (rule integral_reflect) |
|
3542 |
||
53523 | 3543 |
|
60420 | 3544 |
subsection \<open>Stronger form of FCT; quite a tedious proof.\<close> |
35172 | 3545 |
|
53523 | 3546 |
lemma split_minus[simp]: "(\<lambda>(x, k). f x k) x - (\<lambda>(x, k). g x k) x = (\<lambda>(x, k). f x k - g x k) x" |
3547 |
by (simp add: split_def) |
|
35172 | 3548 |
|
66382 | 3549 |
theorem fundamental_theorem_of_calculus_interior: |
53523 | 3550 |
fixes f :: "real \<Rightarrow> 'a::real_normed_vector" |
3551 |
assumes "a \<le> b" |
|
66402 | 3552 |
and contf: "continuous_on {a..b} f" |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3553 |
and derf: "\<And>x. x \<in> {a <..< b} \<Longrightarrow> (f has_vector_derivative f'(x)) (at x)" |
66402 | 3554 |
shows "(f' has_integral (f b - f a)) {a..b}" |
66382 | 3555 |
proof (cases "a = b") |
3556 |
case True |
|
3557 |
then have *: "cbox a b = {b}" "f b - f a = 0" |
|
3558 |
by (auto simp add: order_antisym) |
|
3559 |
with True show ?thesis by auto |
|
3560 |
next |
|
3561 |
case False |
|
3562 |
with \<open>a \<le> b\<close> have ab: "a < b" by arith |
|
66402 | 3563 |
let ?P = "\<lambda>e. \<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of {a..b} \<longrightarrow> d fine p \<longrightarrow> |
3564 |
norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f' x) - (f b - f a)) \<le> e * content {a..b})" |
|
66382 | 3565 |
{ presume "\<And>e. e > 0 \<Longrightarrow> ?P e" then show ?thesis unfolding has_integral_factor_content_real by force } |
53523 | 3566 |
fix e :: real |
3567 |
assume e: "e > 0" |
|
66382 | 3568 |
then have eba8: "(e * (b - a)) / 8 > 0" |
66402 | 3569 |
using ab by (auto simp add: field_simps) |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3570 |
note derf_exp = derf[unfolded has_vector_derivative_def has_derivative_at_alt] |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3571 |
have bounded: "\<And>x. x \<in> {a<..<b} \<Longrightarrow> bounded_linear (\<lambda>u. u *\<^sub>R f' x)" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3572 |
using derf_exp by simp |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3573 |
have "\<forall>x \<in> box a b. \<exists>d>0. \<forall>y. norm (y-x) < d \<longrightarrow> norm (f y - f x - (y-x) *\<^sub>R f' x) \<le> e/2 * norm (y-x)" |
66402 | 3574 |
(is "\<forall>x \<in> box a b. ?Q x") |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3575 |
proof |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3576 |
fix x assume x: "x \<in> box a b" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3577 |
show "?Q x" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3578 |
apply (rule allE [where x="e/2", OF derf_exp [THEN conjunct2, of x]]) |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3579 |
using x e by auto |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3580 |
qed |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3581 |
from this [unfolded bgauge_existence_lemma] |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3582 |
obtain d where d: "\<And>x. 0 < d x" |
66402 | 3583 |
"\<And>x y. \<lbrakk>x \<in> box a b; norm (y-x) < d x\<rbrakk> |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
3584 |
\<Longrightarrow> norm (f y - f x - (y-x) *\<^sub>R f' x) \<le> e/2 * norm (y-x)" |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3585 |
by metis |
56188 | 3586 |
have "bounded (f ` cbox a b)" |
53523 | 3587 |
apply (rule compact_imp_bounded compact_continuous_image)+ |
66382 | 3588 |
using compact_cbox assms by auto |
3589 |
then obtain B |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3590 |
where "0 < B" and B: "\<And>x. x \<in> f ` cbox a b \<Longrightarrow> norm x \<le> B" |
66382 | 3591 |
unfolding bounded_pos by metis |
3592 |
obtain da where "0 < da" |
|
66402 | 3593 |
and da: "\<And>c. \<lbrakk>a \<le> c; {a..c} \<subseteq> {a..b}; {a..c} \<subseteq> ball a da\<rbrakk> |
3594 |
\<Longrightarrow> norm (content {a..c} *\<^sub>R f' a - (f c - f a)) \<le> (e * (b - a)) / 4" |
|
53523 | 3595 |
proof - |
66382 | 3596 |
have "continuous (at a within {a..b}) f" |
3597 |
using contf continuous_on_eq_continuous_within by force |
|
3598 |
with eba8 obtain k where "0 < k" |
|
66402 | 3599 |
and k: "\<And>x. \<lbrakk>x \<in> {a..b}; 0 < norm (x-a); norm (x-a) < k\<rbrakk> |
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3600 |
\<Longrightarrow> norm (f x - f a) < e * (b - a) / 8" |
66382 | 3601 |
unfolding continuous_within Lim_within dist_norm by metis |
3602 |
obtain l where l: "0 < l" "norm (l *\<^sub>R f' a) \<le> e * (b - a) / 8" |
|
53523 | 3603 |
proof (cases "f' a = 0") |
66402 | 3604 |
case True with ab e that show ?thesis by auto |
53523 | 3605 |
next |
3606 |
case False |
|
3607 |
then show ?thesis |
|
66382 | 3608 |
apply (rule_tac l="(e * (b - a)) / 8 / norm (f' a)" in that) |
3609 |
using ab e apply (auto simp add: field_simps) |
|
53523 | 3610 |
done |
3611 |
qed |
|
66402 | 3612 |
have "norm (content {a..c} *\<^sub>R f' a - (f c - f a)) \<le> e * (b - a) / 4" |
3613 |
if "a \<le> c" "{a..c} \<subseteq> {a..b}" and bmin: "{a..c} \<subseteq> ball a (min k l)" for c |
|
53523 | 3614 |
proof - |
66382 | 3615 |
have minkl: "\<bar>a - x\<bar> < min k l" if "x \<in> {a..c}" for x |
3616 |
using bmin dist_real_def that by auto |
|
3617 |
then have lel: "\<bar>c - a\<bar> \<le> \<bar>l\<bar>" |
|
3618 |
using that by force |
|
53523 | 3619 |
have "norm ((c - a) *\<^sub>R f' a - (f c - f a)) \<le> norm ((c - a) *\<^sub>R f' a) + norm (f c - f a)" |
3620 |
by (rule norm_triangle_ineq4) |
|
3621 |
also have "\<dots> \<le> e * (b - a) / 8 + e * (b - a) / 8" |
|
3622 |
proof (rule add_mono) |
|
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3623 |
have "norm ((c - a) *\<^sub>R f' a) \<le> norm (l *\<^sub>R f' a)" |
66382 | 3624 |
by (auto intro: mult_right_mono [OF lel]) |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3625 |
also have "... \<le> e * (b - a) / 8" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3626 |
by (rule l) |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3627 |
finally show "norm ((c - a) *\<^sub>R f' a) \<le> e * (b - a) / 8" . |
53523 | 3628 |
next |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3629 |
have "norm (f c - f a) < e * (b - a) / 8" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3630 |
proof (cases "a = c") |
66382 | 3631 |
case True then show ?thesis |
3632 |
using eba8 by auto |
|
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3633 |
next |
66382 | 3634 |
case False show ?thesis |
3635 |
by (rule k) (use minkl \<open>a \<le> c\<close> that False in auto) |
|
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3636 |
qed |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3637 |
then show "norm (f c - f a) \<le> e * (b - a) / 8" by simp |
53523 | 3638 |
qed |
66402 | 3639 |
finally show "norm (content {a..c} *\<^sub>R f' a - (f c - f a)) \<le> e * (b - a) / 4" |
66382 | 3640 |
unfolding content_real[OF \<open>a \<le> c\<close>] by auto |
53523 | 3641 |
qed |
66382 | 3642 |
then show ?thesis |
3643 |
by (rule_tac da="min k l" in that) (auto simp: l \<open>0 < k\<close>) |
|
53523 | 3644 |
qed |
66382 | 3645 |
obtain db where "0 < db" |
66402 | 3646 |
and db: "\<And>c. \<lbrakk>c \<le> b; {c..b} \<subseteq> {a..b}; {c..b} \<subseteq> ball b db\<rbrakk> |
3647 |
\<Longrightarrow> norm (content {c..b} *\<^sub>R f' b - (f b - f c)) \<le> (e * (b - a)) / 4" |
|
53523 | 3648 |
proof - |
66382 | 3649 |
have "continuous (at b within {a..b}) f" |
3650 |
using contf continuous_on_eq_continuous_within by force |
|
3651 |
with eba8 obtain k |
|
3652 |
where "0 < k" |
|
3653 |
and k: "\<And>x. \<lbrakk>x \<in> {a..b}; 0 < norm(x-b); norm(x-b) < k\<rbrakk> |
|
3654 |
\<Longrightarrow> norm (f b - f x) < e * (b - a) / 8" |
|
3655 |
unfolding continuous_within Lim_within dist_norm norm_minus_commute by metis |
|
66356 | 3656 |
obtain l where l: "0 < l" "norm (l *\<^sub>R f' b) \<le> (e * (b - a)) / 8" |
53523 | 3657 |
proof (cases "f' b = 0") |
66382 | 3658 |
case True thus ?thesis |
3659 |
using ab e that by auto |
|
53523 | 3660 |
next |
66382 | 3661 |
case False then show ?thesis |
66356 | 3662 |
apply (rule_tac l="(e * (b - a)) / 8 / norm (f' b)" in that) |
66382 | 3663 |
using ab e by (auto simp add: field_simps) |
53523 | 3664 |
qed |
66382 | 3665 |
have "norm (content {c..b} *\<^sub>R f' b - (f b - f c)) \<le> e * (b - a) / 4" |
3666 |
if "c \<le> b" "{c..b} \<subseteq> {a..b}" and bmin: "{c..b} \<subseteq> ball b (min k l)" for c |
|
53523 | 3667 |
proof - |
66382 | 3668 |
have minkl: "\<bar>b - x\<bar> < min k l" if "x \<in> {c..b}" for x |
3669 |
using bmin dist_real_def that by auto |
|
3670 |
then have lel: "\<bar>b - c\<bar> \<le> \<bar>l\<bar>" |
|
3671 |
using that by force |
|
53523 | 3672 |
have "norm ((b - c) *\<^sub>R f' b - (f b - f c)) \<le> norm ((b - c) *\<^sub>R f' b) + norm (f b - f c)" |
3673 |
by (rule norm_triangle_ineq4) |
|
3674 |
also have "\<dots> \<le> e * (b - a) / 8 + e * (b - a) / 8" |
|
3675 |
proof (rule add_mono) |
|
66382 | 3676 |
have "norm ((b - c) *\<^sub>R f' b) \<le> norm (l *\<^sub>R f' b)" |
3677 |
by (auto intro: mult_right_mono [OF lel]) |
|
3678 |
also have "... \<le> e * (b - a) / 8" |
|
3679 |
by (rule l) |
|
3680 |
finally show "norm ((b - c) *\<^sub>R f' b) \<le> e * (b - a) / 8" . |
|
53523 | 3681 |
next |
66382 | 3682 |
have "norm (f b - f c) < e * (b - a) / 8" |
3683 |
proof (cases "b = c") |
|
66402 | 3684 |
case True with eba8 show ?thesis |
3685 |
by auto |
|
66382 | 3686 |
next |
3687 |
case False show ?thesis |
|
3688 |
by (rule k) (use minkl \<open>c \<le> b\<close> that False in auto) |
|
3689 |
qed |
|
3690 |
then show "norm (f b - f c) \<le> e * (b - a) / 8" by simp |
|
53523 | 3691 |
qed |
66402 | 3692 |
finally show "norm (content {c..b} *\<^sub>R f' b - (f b - f c)) \<le> e * (b - a) / 4" |
66382 | 3693 |
unfolding content_real[OF \<open>c \<le> b\<close>] by auto |
53523 | 3694 |
qed |
66382 | 3695 |
then show ?thesis |
3696 |
by (rule_tac db="min k l" in that) (auto simp: l \<open>0 < k\<close>) |
|
53523 | 3697 |
qed |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36899
diff
changeset
|
3698 |
let ?d = "(\<lambda>x. ball x (if x=a then da else if x=b then db else d x))" |
53523 | 3699 |
show "?P e" |
66382 | 3700 |
proof (intro exI conjI allI impI) |
3701 |
show "gauge ?d" |
|
3702 |
using ab \<open>db > 0\<close> \<open>da > 0\<close> d(1) by (auto intro: gauge_ball_dependent) |
|
53523 | 3703 |
next |
66382 | 3704 |
fix p |
66400 | 3705 |
assume ptag: "p tagged_division_of {a..b}" and fine: "?d fine p" |
53523 | 3706 |
let ?A = "{t. fst t \<in> {a, b}}" |
66400 | 3707 |
note p = tagged_division_ofD[OF ptag] |
53523 | 3708 |
have pA: "p = (p \<inter> ?A) \<union> (p - ?A)" "finite (p \<inter> ?A)" "finite (p - ?A)" "(p \<inter> ?A) \<inter> (p - ?A) = {}" |
66400 | 3709 |
using ptag fine by auto |
3710 |
note * = additive_tagged_division_1[OF assms(1) ptag, symmetric] |
|
53523 | 3711 |
have **: "\<And>n1 s1 n2 s2::real. n2 \<le> s2 / 2 \<Longrightarrow> n1 - s1 \<le> s2 / 2 \<Longrightarrow> n1 + n2 \<le> s1 + s2" |
3712 |
by arith |
|
66402 | 3713 |
have non: False if xk: "(x,K) \<in> p" and "x \<noteq> a" "x \<noteq> b" |
66400 | 3714 |
and less: "e * (Sup K - Inf K) / 2 < norm (content K *\<^sub>R f' x - (f (Sup K) - f (Inf K)))" |
3715 |
for x K |
|
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3716 |
proof - |
66400 | 3717 |
obtain u v where k: "K = cbox u v" |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3718 |
using p(4) xk by blast |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3719 |
then have "u \<le> v" and uv: "{u, v} \<subseteq> cbox u v" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3720 |
using p(2)[OF xk] by auto |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3721 |
then have result: "e * (v - u) / 2 < norm ((v - u) *\<^sub>R f' x - (f v - f u))" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3722 |
using less[unfolded k box_real interval_bounds_real content_real] by auto |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3723 |
then have "x \<in> box a b" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3724 |
using p(2) p(3) \<open>x \<noteq> a\<close> \<open>x \<noteq> b\<close> xk by fastforce |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3725 |
with d have *: "\<And>y. norm (y-x) < d x |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
3726 |
\<Longrightarrow> norm (f y - f x - (y-x) *\<^sub>R f' x) \<le> e/2 * norm (y-x)" |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3727 |
by metis |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3728 |
have xd: "norm (u - x) < d x" "norm (v - x) < d x" |
66400 | 3729 |
using fineD[OF fine xk] \<open>x \<noteq> a\<close> \<open>x \<noteq> b\<close> uv |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3730 |
by (auto simp add: k subset_eq dist_commute dist_real_def) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3731 |
have "norm ((v - u) *\<^sub>R f' (x) - (f (v) - f (u))) = |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3732 |
norm ((f (u) - f (x) - (u - x) *\<^sub>R f' (x)) - (f (v) - f (x) - (v - x) *\<^sub>R f' (x)))" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3733 |
by (rule arg_cong[where f=norm]) (auto simp: scaleR_left.diff) |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
3734 |
also have "\<dots> \<le> e/2 * norm (u - x) + e/2 * norm (v - x)" |
66420 | 3735 |
by (metis norm_triangle_le_diff add_mono * xd) |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
3736 |
also have "\<dots> \<le> e/2 * norm (v - u)" |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3737 |
using p(2)[OF xk] by (auto simp add: field_simps k) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3738 |
also have "\<dots> < norm ((v - u) *\<^sub>R f' x - (f v - f u))" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3739 |
using result by (simp add: \<open>u \<le> v\<close>) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3740 |
finally have "e * (v - u) / 2 < e * (v - u) / 2" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3741 |
using uv by auto |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3742 |
then show False by auto |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3743 |
qed |
66400 | 3744 |
have "norm (\<Sum>(x, K)\<in>p - ?A. content K *\<^sub>R f' x - (f (Sup K) - f (Inf K))) |
3745 |
\<le> (\<Sum>(x, K)\<in>p - ?A. norm (content K *\<^sub>R f' x - (f (Sup K) - f (Inf K))))" |
|
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3746 |
by (auto intro: sum_norm_le) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3747 |
also have "... \<le> (\<Sum>n\<in>p - ?A. e * (case n of (x, k) \<Rightarrow> Sup k - Inf k) / 2)" |
66402 | 3748 |
using non by (force intro: sum_mono) |
3749 |
finally have I: "norm (\<Sum>(x, k)\<in>p - ?A. |
|
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3750 |
content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3751 |
\<le> (\<Sum>n\<in>p - ?A. e * (case n of (x, k) \<Rightarrow> Sup k - Inf k)) / 2" |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3752 |
by (simp add: sum_divide_distrib) |
66402 | 3753 |
have II: "norm (\<Sum>(x, k)\<in>p \<inter> ?A. content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) - |
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3754 |
(\<Sum>n\<in>p \<inter> ?A. e * (case n of (x, k) \<Rightarrow> Sup k - Inf k)) |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3755 |
\<le> (\<Sum>n\<in>p - ?A. e * (case n of (x, k) \<Rightarrow> Sup k - Inf k)) / 2" |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3756 |
proof - |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3757 |
have ge0: "0 \<le> e * (Sup k - Inf k)" if xkp: "(x, k) \<in> p \<inter> ?A" for x k |
53523 | 3758 |
proof - |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3759 |
obtain u v where uv: "k = cbox u v" |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3760 |
by (meson Int_iff xkp p(4)) |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3761 |
with p(2) that uv have "cbox u v \<noteq> {}" |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3762 |
by blast |
54777 | 3763 |
then show "0 \<le> e * ((Sup k) - (Inf k))" |
53523 | 3764 |
unfolding uv using e by (auto simp add: field_simps) |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3765 |
qed |
66400 | 3766 |
let ?B = "\<lambda>x. {t \<in> p. fst t = x \<and> content (snd t) \<noteq> 0}" |
3767 |
let ?C = "{t \<in> p. fst t \<in> {a, b} \<and> content (snd t) \<noteq> 0}" |
|
3768 |
have "norm (\<Sum>(x, k)\<in>p \<inter> {t. fst t \<in> {a, b}}. content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) \<le> e * (b-a) / 2" |
|
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3769 |
proof - |
66400 | 3770 |
have *: "\<And>s f e. sum f s = sum f (p \<inter> ?C) \<Longrightarrow> norm (sum f (p \<inter> ?C)) \<le> e \<Longrightarrow> norm (sum f s) \<le> e" |
53523 | 3771 |
by auto |
66400 | 3772 |
have 1: "content K *\<^sub>R (f' (x)) - (f ((Sup K)) - f ((Inf K))) = 0" |
3773 |
if "(x,K) \<in> p \<inter> {t. fst t \<in> {a, b}} - p \<inter> ?C" for x K |
|
3774 |
proof - |
|
3775 |
have xk: "(x, K) \<in> p" and k0: "content K = 0" |
|
3776 |
using that by auto |
|
3777 |
then obtain u v where uv: "K = cbox u v" |
|
66356 | 3778 |
using p(4) by blast |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3779 |
then have "u = v" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3780 |
using xk k0 p(2) by force |
66400 | 3781 |
then show "content K *\<^sub>R (f' (x)) - (f ((Sup K)) - f ((Inf K))) = 0" |
53523 | 3782 |
using xk unfolding uv by auto |
66400 | 3783 |
qed |
3784 |
have 2: "norm(\<Sum>(x,k)\<in>p \<inter> ?C. content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) |
|
3785 |
\<le> e * (b - a) / 2" |
|
3786 |
proof - |
|
3787 |
have *: "p \<inter> ?C = ?B a \<union> ?B b" |
|
3788 |
by blast |
|
64267 | 3789 |
have **: "norm (sum f s) \<le> e" |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3790 |
if "\<forall>x y. x \<in> s \<and> y \<in> s \<longrightarrow> x = y" "\<forall>x. x \<in> s \<longrightarrow> norm (f x) \<le> e" "e > 0" |
61165 | 3791 |
for s f and e :: real |
3792 |
proof (cases "s = {}") |
|
3793 |
case True |
|
3794 |
with that show ?thesis by auto |
|
3795 |
next |
|
3796 |
case False |
|
53523 | 3797 |
then obtain x where "x \<in> s" |
3798 |
by auto |
|
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3799 |
then have "s = {x}" |
61165 | 3800 |
using that(1) by auto |
3801 |
then show ?thesis |
|
3802 |
using \<open>x \<in> s\<close> that(2) by auto |
|
3803 |
qed |
|
66400 | 3804 |
show "norm (\<Sum>(x,k)\<in>p \<inter> ?C. |
3805 |
content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) \<le> e * (b - a) / 2" |
|
53523 | 3806 |
apply (subst *) |
64267 | 3807 |
apply (subst sum.union_disjoint) |
66400 | 3808 |
prefer 4 |
3809 |
apply (rule order_trans[of _ "e * (b - a)/4 + e * (b - a)/4"]) |
|
3810 |
apply (rule norm_triangle_le,rule add_mono) |
|
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3811 |
apply (rule_tac[1-2] **) |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3812 |
|
53523 | 3813 |
proof - |
61165 | 3814 |
have pa: "\<exists>v. k = cbox a v \<and> a \<le> v" if "(a, k) \<in> p" for k |
53523 | 3815 |
proof - |
66356 | 3816 |
obtain u v where uv: "k = cbox u v" |
3817 |
using \<open>(a, k) \<in> p\<close> p(4) by blast |
|
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3818 |
moreover have "u \<le> v" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3819 |
using uv p(2)[OF that] by auto |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3820 |
moreover have "u = a" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3821 |
using p(2) p(3) that uv by force |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3822 |
ultimately show ?thesis |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3823 |
by blast |
35172 | 3824 |
qed |
61165 | 3825 |
have pb: "\<exists>v. k = cbox v b \<and> b \<ge> v" if "(b, k) \<in> p" for k |
53523 | 3826 |
proof - |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3827 |
obtain u v where uv: "k = cbox u v" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3828 |
using \<open>(b, k) \<in> p\<close> p(4) by blast |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3829 |
moreover have "u \<le> v" |
61165 | 3830 |
using p(2)[OF that] unfolding uv by auto |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3831 |
moreover have "v = b" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3832 |
using p(2) p(3) that uv by force |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3833 |
ultimately show ?thesis |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3834 |
by blast |
35172 | 3835 |
qed |
53523 | 3836 |
show "\<forall>x y. x \<in> ?B a \<and> y \<in> ?B a \<longrightarrow> x = y" |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3837 |
proof (safe; clarsimp) |
53523 | 3838 |
fix x k k' |
3839 |
assume k: "(a, k) \<in> p" "(a, k') \<in> p" "content k \<noteq> 0" "content k' \<noteq> 0" |
|
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3840 |
obtain v where v: "k = cbox a v" "a \<le> v" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3841 |
using pa[OF k(1)] by blast |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3842 |
obtain v' where v': "k' = cbox a v'" "a \<le> v'" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3843 |
using pa[OF k(2)] by blast |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3844 |
let ?v = "min v v'" |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
3845 |
have "box a ?v \<subseteq> k \<inter> k'" |
56188 | 3846 |
unfolding v v' by (auto simp add: mem_box) |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3847 |
then have "interior (box a (min v v')) \<subseteq> interior k \<inter> interior k'" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3848 |
using interior_Int interior_mono by blast |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
3849 |
moreover have "(a + ?v)/2 \<in> box a ?v" |
53523 | 3850 |
using k(3-) |
3851 |
unfolding v v' content_eq_0 not_le |
|
56188 | 3852 |
by (auto simp add: mem_box) |
53523 | 3853 |
ultimately have "(a + ?v)/2 \<in> interior k \<inter> interior k'" |
56188 | 3854 |
unfolding interior_open[OF open_box] by auto |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3855 |
then have eq: "k = k'" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3856 |
using p(5)[OF k(1-2)] by auto |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3857 |
{ assume "x \<in> k" then show "x \<in> k'" unfolding eq . } |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3858 |
{ assume "x \<in> k'" then show "x \<in> k" unfolding eq . } |
53399 | 3859 |
qed |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3860 |
|
53523 | 3861 |
show "\<forall>x y. x \<in> ?B b \<and> y \<in> ?B b \<longrightarrow> x = y" |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3862 |
proof (safe; clarsimp) |
66400 | 3863 |
fix x K K' |
3864 |
assume k: "(b, K) \<in> p" "(b, K') \<in> p" "content K \<noteq> 0" "content K' \<noteq> 0" |
|
3865 |
obtain v where v: "K = cbox v b" "v \<le> b" |
|
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3866 |
using pb[OF k(1)] by blast |
66400 | 3867 |
obtain v' where v': "K' = cbox v' b" "v' \<le> b" |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3868 |
using pb[OF k(2)] by blast |
53523 | 3869 |
let ?v = "max v v'" |
66400 | 3870 |
have "box ?v b \<subseteq> K \<inter> K'" |
56188 | 3871 |
unfolding v v' by (auto simp: mem_box) |
66400 | 3872 |
then have "interior (box (max v v') b) \<subseteq> interior K \<inter> interior K'" |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3873 |
using interior_Int interior_mono by blast |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
3874 |
moreover have " ((b + ?v)/2) \<in> box ?v b" |
56188 | 3875 |
using k(3-) unfolding v v' content_eq_0 not_le by (auto simp: mem_box) |
66400 | 3876 |
ultimately have " ((b + ?v)/2) \<in> interior K \<inter> interior K'" |
56188 | 3877 |
unfolding interior_open[OF open_box] by auto |
66400 | 3878 |
then have eq: "K = K'" |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3879 |
using p(5)[OF k(1-2)] by auto |
66400 | 3880 |
{ assume "x \<in> K" then show "x \<in> K'" unfolding eq . } |
3881 |
{ assume "x \<in> K'" then show "x \<in> K" unfolding eq . } |
|
35172 | 3882 |
qed |
3883 |
||
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3884 |
have "norm (content c *\<^sub>R f' a - (f (Sup c) - f (Inf c))) \<le> e * (b - a) / 4" |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3885 |
if "(a, c) \<in> p" and ne0: "content c \<noteq> 0" for c |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3886 |
proof - |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3887 |
obtain v where v: "c = cbox a v" and "a \<le> v" |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3888 |
using pa[OF \<open>(a, c) \<in> p\<close>] by metis |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3889 |
then have "a \<in> {a..v}" "v \<le> b" |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3890 |
using p(3)[OF \<open>(a, c) \<in> p\<close>] by auto |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3891 |
moreover have "{a..v} \<subseteq> ball a da" |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3892 |
using fineD[OF \<open>?d fine p\<close> \<open>(a, c) \<in> p\<close>] by (simp add: v split: if_split_asm) |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3893 |
ultimately show ?thesis |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3894 |
unfolding v interval_bounds_real[OF \<open>a \<le> v\<close>] box_real |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3895 |
using da \<open>a \<le> v\<close> by auto |
35172 | 3896 |
qed |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3897 |
then show "\<forall>x. x \<in> ?B a \<longrightarrow> norm ((\<lambda>(x, k). content k *\<^sub>R f' x - (f (Sup k) - |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3898 |
f (Inf k))) x) \<le> e * (b - a) / 4" |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3899 |
by auto |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3900 |
|
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3901 |
have "norm (content c *\<^sub>R f' b - (f (Sup c) - f (Inf c))) \<le> e * (b - a) / 4" |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3902 |
if "(b, c) \<in> p" and ne0: "content c \<noteq> 0" for c |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3903 |
proof - |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3904 |
obtain v where v: "c = cbox v b" and "v \<le> b" |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3905 |
using \<open>(b, c) \<in> p\<close> pb by blast |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3906 |
then have "v \<ge> a""b \<in> {v.. b}" |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3907 |
using p(3)[OF \<open>(b, c) \<in> p\<close>] by auto |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3908 |
moreover have "{v..b} \<subseteq> ball b db" |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3909 |
using fineD[OF \<open>?d fine p\<close> \<open>(b, c) \<in> p\<close>] box_real(2) v False by force |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3910 |
ultimately show ?thesis |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3911 |
using db v by auto |
35172 | 3912 |
qed |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3913 |
then show "\<forall>x. x \<in> ?B b \<longrightarrow> |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3914 |
norm ((\<lambda>(x, k). content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) x) |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3915 |
\<le> e * (b - a) / 4" |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3916 |
by auto |
53523 | 3917 |
qed (insert p(1) ab e, auto simp add: field_simps) |
66400 | 3918 |
qed |
3919 |
show "norm (\<Sum>(x, k)\<in>p \<inter> ?A. content k *\<^sub>R f' x - (f ((Sup k)) - f ((Inf k)))) \<le> e * (b - a) / 2" |
|
3920 |
apply (rule * [OF sum.mono_neutral_right[OF pA(2)]]) |
|
66402 | 3921 |
using 1 2 by (auto simp: split_paired_all) |
53523 | 3922 |
qed |
66400 | 3923 |
also have "... = (\<Sum>n\<in>p. e * (case n of (x, k) \<Rightarrow> Sup k - Inf k)) / 2" |
3924 |
unfolding sum_distrib_left[symmetric] |
|
3925 |
apply (subst additive_tagged_division_1[OF \<open>a \<le> b\<close> ptag]) |
|
3926 |
by auto |
|
3927 |
finally have norm_le: "norm (\<Sum>(x, k)\<in>p \<inter> {t. fst t \<in> {a, b}}. content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) |
|
3928 |
\<le> (\<Sum>n\<in>p. e * (case n of (x, k) \<Rightarrow> Sup k - Inf k)) / 2" . |
|
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3929 |
have *: "\<And>x s1 s2::real. 0 \<le> s1 \<Longrightarrow> x \<le> (s1 + s2) / 2 \<Longrightarrow> x - s1 \<le> s2 / 2" |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3930 |
by auto |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3931 |
show ?thesis |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3932 |
apply (rule * [OF sum_nonneg]) |
66382 | 3933 |
using ge0 apply force |
66400 | 3934 |
unfolding sum.union_disjoint[OF pA(2-), symmetric] pA(1)[symmetric] |
3935 |
by (metis norm_le) |
|
53523 | 3936 |
qed |
66402 | 3937 |
have "norm (\<Sum>(x,K)\<in>p \<inter> ?A \<union> (p - ?A). content K *\<^sub>R f' x - (f (Sup K) - f (Inf K))) |
3938 |
\<le> e * (\<Sum>(x,K)\<in>p \<inter> ?A \<union> (p - ?A). Sup K - Inf K)" |
|
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3939 |
unfolding sum_distrib_left |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3940 |
unfolding sum.union_disjoint[OF pA(2-)] |
66402 | 3941 |
using ** norm_triangle_le I II by blast |
3942 |
then |
|
3943 |
show "norm ((\<Sum>(x,K)\<in>p. content K *\<^sub>R f' x) - (f b - f a)) \<le> e * content {a..b}" |
|
3944 |
by (simp only: content_real[OF \<open>a \<le> b\<close>] *[of "\<lambda>x. x"] *[of f] sum_subtractf[symmetric] split_minus pA(1) [symmetric]) |
|
53523 | 3945 |
qed |
3946 |
qed |
|
3947 |
||
35172 | 3948 |
|
60420 | 3949 |
subsection \<open>Stronger form with finite number of exceptional points.\<close> |
35172 | 3950 |
|
53524 | 3951 |
lemma fundamental_theorem_of_calculus_interior_strong: |
3952 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
3953 |
assumes "finite s" |
|
3954 |
and "a \<le> b" |
|
66402 | 3955 |
and "continuous_on {a..b} f" |
56188 | 3956 |
and "\<forall>x\<in>{a <..< b} - s. (f has_vector_derivative f'(x)) (at x)" |
66402 | 3957 |
shows "(f' has_integral (f b - f a)) {a..b}" |
53524 | 3958 |
using assms |
3959 |
proof (induct "card s" arbitrary: s a b) |
|
3960 |
case 0 |
|
66402 | 3961 |
then show ?case |
3962 |
by (force simp add: intro: fundamental_theorem_of_calculus_interior) |
|
53524 | 3963 |
next |
3964 |
case (Suc n) |
|
66402 | 3965 |
then obtain c s' where cs: "s = insert c s'" and n: "n = card s'" |
3966 |
by (metis card_eq_SucD) |
|
3967 |
then have "finite s'" |
|
3968 |
using \<open>finite s\<close> by force |
|
53524 | 3969 |
show ?case |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
3970 |
proof (cases "c \<in> box a b") |
53524 | 3971 |
case False |
66402 | 3972 |
with \<open>finite s'\<close> show ?thesis |
3973 |
using cs n Suc |
|
3974 |
by (metis Diff_iff box_real(1) insert_iff) |
|
53524 | 3975 |
next |
66402 | 3976 |
let ?P = "\<lambda>i j. \<forall>x\<in>{i <..< j} - s'. (f has_vector_derivative f' x) (at x)" |
53524 | 3977 |
case True |
3978 |
then have "a \<le> c" "c \<le> b" |
|
56188 | 3979 |
by (auto simp: mem_box) |
66402 | 3980 |
moreover have "?P a c" "?P c b" |
3981 |
using Suc.prems(4) True \<open>a \<le> c\<close> cs(1) by auto |
|
3982 |
moreover have "continuous_on {a..c} f" "continuous_on {c..b} f" |
|
3983 |
using \<open>continuous_on {a..b} f\<close> \<open>a \<le> c\<close> \<open>c \<le> b\<close> continuous_on_subset by fastforce+ |
|
3984 |
ultimately have "(f' has_integral f c - f a + (f b - f c)) {a..b}" |
|
3985 |
using Suc.hyps(1) \<open>finite s'\<close> \<open>n = card s'\<close> by (blast intro: has_integral_combine) |
|
3986 |
then show ?thesis |
|
3987 |
by auto |
|
53524 | 3988 |
qed |
3989 |
qed |
|
3990 |
||
66402 | 3991 |
corollary fundamental_theorem_of_calculus_strong: |
53524 | 3992 |
fixes f :: "real \<Rightarrow> 'a::banach" |
3993 |
assumes "finite s" |
|
3994 |
and "a \<le> b" |
|
66402 | 3995 |
and "continuous_on {a..b} f" |
3996 |
and vec: "\<forall>x\<in>{a..b} - s. (f has_vector_derivative f'(x)) (at x)" |
|
3997 |
shows "(f' has_integral (f b - f a)) {a..b}" |
|
53524 | 3998 |
apply (rule fundamental_theorem_of_calculus_interior_strong[OF assms(1-3), of f']) |
66402 | 3999 |
using vec apply (auto simp: mem_box) |
53524 | 4000 |
done |
4001 |
||
4002 |
lemma indefinite_integral_continuous_left: |
|
53634 | 4003 |
fixes f:: "real \<Rightarrow> 'a::banach" |
66402 | 4004 |
assumes intf: "f integrable_on {a..b}" |
53634 | 4005 |
and "a < c" |
4006 |
and "c \<le> b" |
|
4007 |
and "e > 0" |
|
4008 |
obtains d where "d > 0" |
|
66402 | 4009 |
and "\<forall>t. c - d < t \<and> t \<le> c \<longrightarrow> norm (integral {a..c} f - integral {a..t} f) < e" |
53634 | 4010 |
proof - |
66402 | 4011 |
obtain w where "w > 0" and w: "\<And>t. \<lbrakk>c - w < t; t < c\<rbrakk> \<Longrightarrow> norm (f c) * norm(c - t) < e/3" |
53634 | 4012 |
proof (cases "f c = 0") |
4013 |
case False |
|
66402 | 4014 |
hence e3: "0 < e/3 / norm (f c)" using \<open>e>0\<close> by simp |
4015 |
moreover have "norm (f c) * norm (c - t) < e/3" |
|
4016 |
if "t < c" and "c - e/3 / norm (f c) < t" for t |
|
53634 | 4017 |
proof - |
66402 | 4018 |
have "norm (c - t) < e/3 / norm (f c)" |
4019 |
using that by auto |
|
4020 |
then show "norm (f c) * norm (c - t) < e/3" |
|
4021 |
by (metis e3 mult.commute norm_not_less_zero pos_less_divide_eq zero_less_divide_iff) |
|
53634 | 4022 |
qed |
66402 | 4023 |
ultimately show ?thesis |
4024 |
using that by auto |
|
53634 | 4025 |
next |
66402 | 4026 |
case True then show ?thesis |
4027 |
using \<open>e > 0\<close> that by auto |
|
53634 | 4028 |
qed |
66402 | 4029 |
|
4030 |
have e3: "e/3 > 0" |
|
4031 |
using \<open>e > 0\<close> by auto |
|
4032 |
have "f integrable_on {a..c}" |
|
4033 |
apply (rule integrable_subinterval_real[OF intf]) |
|
4034 |
using \<open>a < c\<close> \<open>c \<le> b\<close> by auto |
|
4035 |
then obtain d1 where "gauge d1" and d1: |
|
4036 |
"\<And>p. \<lbrakk>p tagged_division_of {a..c}; d1 fine p\<rbrakk> \<Longrightarrow> |
|
4037 |
norm ((\<Sum>(x,K)\<in>p. content K *\<^sub>R f x) - integral {a..c} f) < e/3" |
|
4038 |
using integrable_integral has_integral_real e3 by metis |
|
63040 | 4039 |
define d where [abs_def]: "d x = ball x w \<inter> d1 x" for x |
53634 | 4040 |
have "gauge d" |
66402 | 4041 |
unfolding d_def using \<open>w > 0\<close> \<open>gauge d1\<close> by auto |
4042 |
then obtain k where "0 < k" and k: "ball c k \<subseteq> d c" |
|
4043 |
by (meson gauge_def open_contains_ball) |
|
53634 | 4044 |
|
4045 |
let ?d = "min k (c - a) / 2" |
|
4046 |
show ?thesis |
|
4047 |
apply (rule that[of ?d]) |
|
4048 |
apply safe |
|
4049 |
proof - |
|
4050 |
show "?d > 0" |
|
66402 | 4051 |
using \<open>0 < k\<close> using assms(2) by auto |
53634 | 4052 |
fix t |
4053 |
assume as: "c - ?d < t" "t \<le> c" |
|
66402 | 4054 |
let ?thesis = "norm (integral ({a..c}) f - integral ({a..t}) f) < e" |
53634 | 4055 |
{ |
4056 |
presume *: "t < c \<Longrightarrow> ?thesis" |
|
4057 |
show ?thesis |
|
66402 | 4058 |
proof (cases "t = c") |
4059 |
case True |
|
4060 |
then show ?thesis |
|
4061 |
by (simp add: \<open>e > 0\<close>) |
|
4062 |
next |
|
4063 |
case False |
|
4064 |
then show ?thesis |
|
4065 |
using "*" \<open>t \<le> c\<close> by linarith |
|
4066 |
qed |
|
53634 | 4067 |
} |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
4068 |
assume "t < c" |
35751 | 4069 |
|
66402 | 4070 |
have "f integrable_on {a..t}" |
4071 |
apply (rule integrable_subinterval_real[OF intf]) |
|
4072 |
using \<open>t < c\<close> \<open>c \<le> b\<close> by auto |
|
4073 |
then obtain d2 where d2: "gauge d2" |
|
4074 |
"\<And>p. p tagged_division_of {a..t} \<and> d2 fine p \<Longrightarrow> |
|
4075 |
norm ((\<Sum>(x,K)\<in>p. content K *\<^sub>R f x) - integral {a..t} f) < e/3" |
|
4076 |
using integrable_integral has_integral_real e3 by metis |
|
63040 | 4077 |
define d3 where "d3 x = (if x \<le> t then d1 x \<inter> d2 x else d1 x)" for x |
53634 | 4078 |
have "gauge d3" |
66402 | 4079 |
using \<open>gauge d1\<close> \<open>gauge d2\<close> unfolding d3_def gauge_def by auto |
4080 |
then obtain p where ptag: "p tagged_division_of {a..t}" and pfine: "d3 fine p" |
|
4081 |
by (metis box_real(2) fine_division_exists) |
|
4082 |
note p'=tagged_division_ofD[OF ptag] |
|
4083 |
have pt: "(x,k)\<in>p \<Longrightarrow> x \<le> t" for x k |
|
4084 |
by (meson atLeastAtMost_iff p'(2) p'(3) subsetCE) |
|
4085 |
with pfine have "d2 fine p" |
|
4086 |
unfolding fine_def d3_def by fastforce |
|
4087 |
then have d2_fin: "norm ((\<Sum>(x, K)\<in>p. content K *\<^sub>R f x) - integral {a..t} f) < e/3" |
|
4088 |
using d2(2) ptag by auto |
|
4089 |
have *: "{a..c} \<inter> {x. x \<le> t} = {a..t}" "{a..c} \<inter> {x. x \<ge> t} = {t..c}" |
|
4090 |
using as by (auto simp add: field_simps) |
|
4091 |
||
4092 |
have "p \<union> {(c, {t..c})} tagged_division_of {a..c}" |
|
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
4093 |
apply (rule tagged_division_Un_interval_real[of _ _ _ 1 "t"]) |
66402 | 4094 |
using \<open>t \<le> c\<close> by (auto simp: * ptag tagged_division_of_self_real) |
4095 |
moreover |
|
4096 |
have "d1 fine p \<union> {(c, {t..c})}" |
|
53634 | 4097 |
unfolding fine_def |
66402 | 4098 |
proof safe |
4099 |
fix x K y |
|
4100 |
assume "(x,K) \<in> p" and "y \<in> K" then show "y \<in> d1 x" |
|
4101 |
by (metis Int_iff d3_def subsetD fineD pfine) |
|
53634 | 4102 |
next |
4103 |
fix x assume "x \<in> {t..c}" |
|
4104 |
then have "dist c x < k" |
|
4105 |
using as(1) |
|
66402 | 4106 |
by (auto simp add: field_simps dist_real_def) |
4107 |
with k show "x \<in> d1 c" |
|
4108 |
unfolding d_def by auto |
|
4109 |
qed |
|
4110 |
ultimately have d1_fin: "norm ((\<Sum>(x,K) \<in> p \<union> {(c, {t..c})}. content K *\<^sub>R f x) - integral {a..c} f) < e/3" |
|
4111 |
using d1 by metis |
|
4112 |
||
4113 |
have *: "integral {a..c} f - integral {a..t} f = -(((c - t) *\<^sub>R f c + (\<Sum>(x, k)\<in>p. content k *\<^sub>R f x)) - |
|
4114 |
integral {a..c} f) + ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - integral {a..t} f) + (c - t) *\<^sub>R f c" |
|
53634 | 4115 |
"e = (e/3 + e/3) + e/3" |
4116 |
by auto |
|
66402 | 4117 |
have **: "(\<Sum>(x, k)\<in>p \<union> {(c, {t..c})}. content k *\<^sub>R f x) = |
53634 | 4118 |
(c - t) *\<^sub>R f c + (\<Sum>(x, k)\<in>p. content k *\<^sub>R f x)" |
4119 |
proof - |
|
4120 |
have **: "\<And>x F. F \<union> {x} = insert x F" |
|
4121 |
by auto |
|
56188 | 4122 |
have "(c, cbox t c) \<notin> p" |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
4123 |
proof (safe, goal_cases) |
61167 | 4124 |
case prems: 1 |
4125 |
from p'(2-3)[OF prems] have "c \<in> cbox a t" |
|
53634 | 4126 |
by auto |
60420 | 4127 |
then show False using \<open>t < c\<close> |
53634 | 4128 |
by auto |
4129 |
qed |
|
4130 |
then show ?thesis |
|
56188 | 4131 |
unfolding ** box_real |
53634 | 4132 |
apply - |
64267 | 4133 |
apply (subst sum.insert) |
53634 | 4134 |
apply (rule p') |
4135 |
unfolding split_conv |
|
4136 |
defer |
|
4137 |
apply (subst content_real) |
|
4138 |
using as(2) |
|
4139 |
apply auto |
|
4140 |
done |
|
4141 |
qed |
|
4142 |
have ***: "c - w < t \<and> t < c" |
|
4143 |
proof - |
|
4144 |
have "c - k < t" |
|
60420 | 4145 |
using \<open>k>0\<close> as(1) by (auto simp add: field_simps) |
53634 | 4146 |
moreover have "k \<le> w" |
4147 |
apply (rule ccontr) |
|
66402 | 4148 |
using k |
53634 | 4149 |
unfolding subset_eq |
4150 |
apply (erule_tac x="c + ((k + w)/2)" in ballE) |
|
4151 |
unfolding d_def |
|
60420 | 4152 |
using \<open>k > 0\<close> \<open>w > 0\<close> |
53634 | 4153 |
apply (auto simp add: field_simps not_le not_less dist_real_def) |
4154 |
done |
|
60420 | 4155 |
ultimately show ?thesis using \<open>t < c\<close> |
53634 | 4156 |
by (auto simp add: field_simps) |
4157 |
qed |
|
4158 |
show ?thesis |
|
4159 |
unfolding *(1) |
|
4160 |
apply (subst *(2)) |
|
4161 |
apply (rule norm_triangle_lt add_strict_mono)+ |
|
4162 |
unfolding norm_minus_cancel |
|
4163 |
apply (rule d1_fin[unfolded **]) |
|
4164 |
apply (rule d2_fin) |
|
66402 | 4165 |
using w *** |
53634 | 4166 |
unfolding norm_scaleR |
4167 |
apply (auto simp add: field_simps) |
|
4168 |
done |
|
4169 |
qed |
|
4170 |
qed |
|
4171 |
||
66402 | 4172 |
|
53634 | 4173 |
lemma indefinite_integral_continuous_right: |
4174 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
66402 | 4175 |
assumes "f integrable_on {a..b}" |
53634 | 4176 |
and "a \<le> c" |
4177 |
and "c < b" |
|
4178 |
and "e > 0" |
|
4179 |
obtains d where "0 < d" |
|
66402 | 4180 |
and "\<forall>t. c \<le> t \<and> t < c + d \<longrightarrow> norm (integral {a..c} f - integral {a..t} f) < e" |
56188 | 4181 |
proof - |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4182 |
have intm: "(\<lambda>x. f (- x)) integrable_on {-b .. -a}" "- b < - c" "- c \<le> - a" |
53634 | 4183 |
using assms by auto |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4184 |
from indefinite_integral_continuous_left[OF intm \<open>e>0\<close>] |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4185 |
obtain d where "0 < d" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4186 |
and d: "\<And>t. \<lbrakk>- c - d < t; t \<le> -c\<rbrakk> |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4187 |
\<Longrightarrow> norm (integral {- b..- c} (\<lambda>x. f (-x)) - integral {- b..t} (\<lambda>x. f (-x))) < e" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4188 |
by metis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4189 |
let ?d = "min d (b - c)" |
53634 | 4190 |
show ?thesis |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4191 |
proof (intro that[of "?d"] allI impI) |
53634 | 4192 |
show "0 < ?d" |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4193 |
using \<open>0 < d\<close> \<open>c < b\<close> by auto |
53634 | 4194 |
fix t :: real |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4195 |
assume t: "c \<le> t \<and> t < c + ?d" |
66402 | 4196 |
have *: "integral {a..c} f = integral {a..b} f - integral {c..b} f" |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4197 |
"integral {a..t} f = integral {a..b} f - integral {t..b} f" |
63170 | 4198 |
apply (simp_all only: algebra_simps) |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4199 |
using assms t by (auto simp: integral_combine) |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4200 |
have "(- c) - d < (- t)" "- t \<le> - c" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4201 |
using t by auto |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4202 |
from d[OF this] show "norm (integral {a..c} f - integral {a..t} f) < e" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4203 |
by (auto simp add: algebra_simps norm_minus_commute *) |
53634 | 4204 |
qed |
4205 |
qed |
|
4206 |
||
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4207 |
lemma indefinite_integral_continuous_1: |
53634 | 4208 |
fixes f :: "real \<Rightarrow> 'a::banach" |
66402 | 4209 |
assumes "f integrable_on {a..b}" |
4210 |
shows "continuous_on {a..b} (\<lambda>x. integral {a..x} f)" |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4211 |
proof - |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4212 |
have "\<exists>d>0. \<forall>x'\<in>{a..b}. dist x' x < d \<longrightarrow> dist (integral {a..x'} f) (integral {a..x} f) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4213 |
if x: "x \<in> {a..b}" and "e > 0" for x e :: real |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4214 |
proof (cases "a = b") |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4215 |
case True |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4216 |
with that show ?thesis by force |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4217 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4218 |
case False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4219 |
with x have "a < b" by force |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4220 |
with x consider "x = a" | "x = b" | "a < x" "x < b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4221 |
by force |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4222 |
then show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4223 |
proof cases |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4224 |
case 1 show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4225 |
apply (rule indefinite_integral_continuous_right [OF assms _ \<open>a < b\<close> \<open>e > 0\<close>], force) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4226 |
using \<open>x = a\<close> apply (force simp: dist_norm algebra_simps) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4227 |
done |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4228 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4229 |
case 2 show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4230 |
apply (rule indefinite_integral_continuous_left [OF assms \<open>a < b\<close> _ \<open>e > 0\<close>], force) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4231 |
using \<open>x = b\<close> apply (force simp: dist_norm norm_minus_commute algebra_simps) |
53634 | 4232 |
done |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4233 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4234 |
case 3 |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4235 |
obtain d1 where "0 < d1" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4236 |
and d1: "\<And>t. \<lbrakk>x - d1 < t; t \<le> x\<rbrakk> \<Longrightarrow> norm (integral {a..x} f - integral {a..t} f) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4237 |
using 3 by (auto intro: indefinite_integral_continuous_left [OF assms \<open>a < x\<close> _ \<open>e > 0\<close>]) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4238 |
obtain d2 where "0 < d2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4239 |
and d2: "\<And>t. \<lbrakk>x \<le> t; t < x + d2\<rbrakk> \<Longrightarrow> norm (integral {a..x} f - integral {a..t} f) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4240 |
using 3 by (auto intro: indefinite_integral_continuous_right [OF assms _ \<open>x < b\<close> \<open>e > 0\<close>]) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4241 |
show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4242 |
proof (intro exI ballI conjI impI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4243 |
show "0 < min d1 d2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4244 |
using \<open>0 < d1\<close> \<open>0 < d2\<close> by simp |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4245 |
show "dist (integral {a..y} f) (integral {a..x} f) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4246 |
if "y \<in> {a..b}" "dist y x < min d1 d2" for y |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4247 |
proof (cases "y < x") |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4248 |
case True |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4249 |
with that d1 show ?thesis by (auto simp: dist_commute dist_norm) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4250 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4251 |
case False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4252 |
with that d2 show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4253 |
by (auto simp: dist_commute dist_norm) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4254 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4255 |
qed |
53634 | 4256 |
qed |
4257 |
qed |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4258 |
then show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4259 |
by (auto simp: continuous_on_iff) |
53634 | 4260 |
qed |
4261 |
||
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4262 |
lemma indefinite_integral_continuous_1': |
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4263 |
fixes f::"real \<Rightarrow> 'a::banach" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4264 |
assumes "f integrable_on {a..b}" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4265 |
shows "continuous_on {a..b} (\<lambda>x. integral {x..b} f)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4266 |
proof - |
66402 | 4267 |
have "integral {a..b} f - integral {a..x} f = integral {x..b} f" if "x \<in> {a..b}" for x |
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4268 |
using integral_combine[OF _ _ assms, of x] that |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4269 |
by (auto simp: algebra_simps) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4270 |
with _ show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4271 |
by (rule continuous_on_eq) (auto intro!: continuous_intros indefinite_integral_continuous_1 assms) |
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4272 |
qed |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4273 |
|
35751 | 4274 |
|
60420 | 4275 |
subsection \<open>This doesn't directly involve integration, but that gives an easy proof.\<close> |
35751 | 4276 |
|
53634 | 4277 |
lemma has_derivative_zero_unique_strong_interval: |
4278 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
4279 |
assumes "finite k" |
|
66402 | 4280 |
and "continuous_on {a..b} f" |
53634 | 4281 |
and "f a = y" |
66402 | 4282 |
and "\<forall>x\<in>({a..b} - k). (f has_derivative (\<lambda>h. 0)) (at x within {a..b})" "x \<in> {a..b}" |
35751 | 4283 |
shows "f x = y" |
53634 | 4284 |
proof - |
4285 |
have ab: "a \<le> b" |
|
4286 |
using assms by auto |
|
4287 |
have *: "a \<le> x" |
|
4288 |
using assms(5) by auto |
|
66402 | 4289 |
have "((\<lambda>x. 0::'a) has_integral f x - f a) {a..x}" |
53634 | 4290 |
apply (rule fundamental_theorem_of_calculus_interior_strong[OF assms(1) *]) |
4291 |
apply (rule continuous_on_subset[OF assms(2)]) |
|
4292 |
defer |
|
4293 |
apply safe |
|
4294 |
unfolding has_vector_derivative_def |
|
4295 |
apply (subst has_derivative_within_open[symmetric]) |
|
4296 |
apply assumption |
|
56188 | 4297 |
apply (rule open_greaterThanLessThan) |
66402 | 4298 |
apply (rule has_derivative_within_subset[where s="{a..b}"]) |
53634 | 4299 |
using assms(4) assms(5) |
56188 | 4300 |
apply (auto simp: mem_box) |
53634 | 4301 |
done |
4302 |
note this[unfolded *] |
|
35751 | 4303 |
note has_integral_unique[OF has_integral_0 this] |
53634 | 4304 |
then show ?thesis |
4305 |
unfolding assms by auto |
|
4306 |
qed |
|
4307 |
||
35751 | 4308 |
|
60420 | 4309 |
subsection \<open>Generalize a bit to any convex set.\<close> |
35751 | 4310 |
|
53634 | 4311 |
lemma has_derivative_zero_unique_strong_convex: |
56188 | 4312 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4313 |
assumes "convex S" "finite K" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4314 |
and contf: "continuous_on S f" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4315 |
and "c \<in> S" "f c = y" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4316 |
and derf: "\<And>x. x \<in> (S - K) \<Longrightarrow> (f has_derivative (\<lambda>h. 0)) (at x within S)" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4317 |
and "x \<in> S" |
35751 | 4318 |
shows "f x = y" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4319 |
proof (cases "x = c") |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4320 |
case True with \<open>f c = y\<close> show ?thesis |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4321 |
by blast |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4322 |
next |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4323 |
case False |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4324 |
let ?\<phi> = "\<lambda>u. (1 - u) *\<^sub>R c + u *\<^sub>R x" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4325 |
have contf': "continuous_on {0 ..1} (f \<circ> ?\<phi>)" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4326 |
apply (rule continuous_intros continuous_on_subset[OF contf])+ |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4327 |
using \<open>convex S\<close> \<open>x \<in> S\<close> \<open>c \<in> S\<close> by (auto simp add: convex_alt algebra_simps) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4328 |
have "t = u" if "?\<phi> t = ?\<phi> u" for t u |
53634 | 4329 |
proof - |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4330 |
from that have "(t - u) *\<^sub>R x = (t - u) *\<^sub>R c" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4331 |
by (auto simp add: algebra_simps) |
61165 | 4332 |
then show ?thesis |
60420 | 4333 |
using \<open>x \<noteq> c\<close> by auto |
53634 | 4334 |
qed |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4335 |
then have eq: "(SOME t. ?\<phi> t = ?\<phi> u) = u" for u |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4336 |
by blast |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4337 |
then have "(?\<phi> -` K) \<subseteq> (\<lambda>z. SOME t. ?\<phi> t = z) ` K" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4338 |
by (clarsimp simp: image_iff) (metis (no_types) eq) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4339 |
then have fin: "finite (?\<phi> -` K)" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4340 |
by (rule finite_surj[OF \<open>finite K\<close>]) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4341 |
|
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4342 |
have derf': "((\<lambda>u. f (?\<phi> u)) has_derivative (\<lambda>h. 0)) (at t within {0..1})" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4343 |
if "t \<in> {0..1} - {t. ?\<phi> t \<in> K}" for t |
53634 | 4344 |
proof - |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4345 |
have df: "(f has_derivative (\<lambda>h. 0)) (at (?\<phi> t) within ?\<phi> ` {0..1})" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4346 |
apply (rule has_derivative_within_subset [OF derf]) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4347 |
using \<open>convex S\<close> \<open>x \<in> S\<close> \<open>c \<in> S\<close> that by (auto simp add: convex_alt algebra_simps) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4348 |
have "(f \<circ> ?\<phi> has_derivative (\<lambda>x. 0) \<circ> (\<lambda>z. (0 - z *\<^sub>R c) + z *\<^sub>R x)) (at t within {0..1})" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4349 |
by (rule derivative_eq_intros df | simp)+ |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4350 |
then show ?thesis |
53634 | 4351 |
unfolding o_def . |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4352 |
qed |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4353 |
have "(f \<circ> ?\<phi>) 1 = y" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4354 |
apply (rule has_derivative_zero_unique_strong_interval[OF fin contf']) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4355 |
unfolding o_def using \<open>f c = y\<close> derf' by auto |
53634 | 4356 |
then show ?thesis |
4357 |
by auto |
|
4358 |
qed |
|
4359 |
||
4360 |
||
60420 | 4361 |
text \<open>Also to any open connected set with finite set of exceptions. Could |
4362 |
generalize to locally convex set with limpt-free set of exceptions.\<close> |
|
35751 | 4363 |
|
53634 | 4364 |
lemma has_derivative_zero_unique_strong_connected: |
56188 | 4365 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4366 |
assumes "connected S" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4367 |
and "open S" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4368 |
and "finite K" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4369 |
and contf: "continuous_on S f" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4370 |
and "c \<in> S" |
53634 | 4371 |
and "f c = y" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4372 |
and derf: "\<And>x. x \<in> (S - K) \<Longrightarrow> (f has_derivative (\<lambda>h. 0)) (at x within S)" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4373 |
and "x \<in> S" |
35751 | 4374 |
shows "f x = y" |
53634 | 4375 |
proof - |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4376 |
have xx: "\<exists>e>0. ball x e \<subseteq> {xa \<in> S. f xa \<in> {f x}}" if "x \<in> S" for x |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4377 |
proof - |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4378 |
obtain e where "0 < e" and e: "ball x e \<subseteq> S" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4379 |
using \<open>x \<in> S\<close> \<open>open S\<close> open_contains_ball by blast |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4380 |
have "ball x e \<subseteq> {u \<in> S. f u \<in> {f x}}" |
53634 | 4381 |
proof safe |
4382 |
fix y |
|
4383 |
assume y: "y \<in> ball x e" |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4384 |
then show "y \<in> S" |
53634 | 4385 |
using e by auto |
4386 |
show "f y = f x" |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4387 |
proof (rule has_derivative_zero_unique_strong_convex[OF convex_ball \<open>finite K\<close>]) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4388 |
show "continuous_on (ball x e) f" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4389 |
using contf continuous_on_subset e by blast |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4390 |
show "(f has_derivative (\<lambda>h. 0)) (at u within ball x e)" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4391 |
if "u \<in> ball x e - K" for u |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4392 |
by (metis Diff_iff contra_subsetD derf e has_derivative_within_subset that) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4393 |
qed (use y e \<open>0 < e\<close> in auto) |
53634 | 4394 |
qed |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4395 |
then show "\<exists>e>0. ball x e \<subseteq> {xa \<in> S. f xa \<in> {f x}}" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4396 |
using \<open>0 < e\<close> by blast |
53634 | 4397 |
qed |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4398 |
then have "openin (subtopology euclidean S) {x \<in> S. f x \<in> {y}}" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4399 |
by (auto intro!: open_openin_trans[OF \<open>open S\<close>] simp: open_contains_ball) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4400 |
moreover have "closedin (subtopology euclidean S) {x \<in> S. f x \<in> {y}}" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4401 |
by (force intro!: continuous_closedin_preimage [OF contf]) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4402 |
ultimately have "{x \<in> S. f x \<in> {y}} = {} \<or> {x \<in> S. f x \<in> {y}} = S" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4403 |
using \<open>connected S\<close> connected_clopen by blast |
53634 | 4404 |
then show ?thesis |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4405 |
using \<open>x \<in> S\<close> \<open>f c = y\<close> \<open>c \<in> S\<close> by auto |
53634 | 4406 |
qed |
4407 |
||
56332 | 4408 |
lemma has_derivative_zero_connected_constant: |
4409 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4410 |
assumes "connected S" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4411 |
and "open S" |
56332 | 4412 |
and "finite k" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4413 |
and "continuous_on S f" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4414 |
and "\<forall>x\<in>(S - k). (f has_derivative (\<lambda>h. 0)) (at x within S)" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4415 |
obtains c where "\<And>x. x \<in> S \<Longrightarrow> f(x) = c" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4416 |
proof (cases "S = {}") |
56332 | 4417 |
case True |
4418 |
then show ?thesis |
|
4419 |
by (metis empty_iff that) |
|
4420 |
next |
|
4421 |
case False |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
4422 |
then obtain c where "c \<in> S" |
56332 | 4423 |
by (metis equals0I) |
4424 |
then show ?thesis |
|
4425 |
by (metis has_derivative_zero_unique_strong_connected assms that) |
|
4426 |
qed |
|
4427 |
||
53634 | 4428 |
|
60420 | 4429 |
subsection \<open>Integrating characteristic function of an interval\<close> |
53634 | 4430 |
|
4431 |
lemma has_integral_restrict_open_subinterval: |
|
56188 | 4432 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4433 |
assumes intf: "(f has_integral i) (cbox c d)" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4434 |
and cb: "cbox c d \<subseteq> cbox a b" |
56188 | 4435 |
shows "((\<lambda>x. if x \<in> box c d then f x else 0) has_integral i) (cbox a b)" |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
4436 |
proof - |
63040 | 4437 |
define g where [abs_def]: "g x = (if x \<in>box c d then f x else 0)" for x |
53634 | 4438 |
{ |
56188 | 4439 |
presume *: "cbox c d \<noteq> {} \<Longrightarrow> ?thesis" |
53634 | 4440 |
show ?thesis |
4441 |
apply cases |
|
4442 |
apply (rule *) |
|
4443 |
apply assumption |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
4444 |
proof goal_cases |
61167 | 4445 |
case prems: 1 |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
4446 |
then have *: "box c d = {}" |
56188 | 4447 |
by (metis bot.extremum_uniqueI box_subset_cbox) |
53634 | 4448 |
show ?thesis |
4449 |
using assms(1) |
|
4450 |
unfolding * |
|
61167 | 4451 |
using prems |
53634 | 4452 |
by auto |
4453 |
qed |
|
4454 |
} |
|
56188 | 4455 |
assume "cbox c d \<noteq> {}" |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4456 |
then obtain p where p: "p division_of cbox a b" "cbox c d \<in> p" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4457 |
using cb partial_division_extend_1 by blast |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
4458 |
interpret operative "lift_option plus" "Some (0 :: 'b)" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
4459 |
"\<lambda>i. if g integrable_on i then Some (integral i g) else None" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
4460 |
by (fact operative_integralI) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
4461 |
note operat = division |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
4462 |
[OF p(1), symmetric] |
56188 | 4463 |
let ?P = "(if g integrable_on cbox a b then Some (integral (cbox a b) g) else None) = Some i" |
53634 | 4464 |
{ |
4465 |
presume "?P" |
|
56188 | 4466 |
then have "g integrable_on cbox a b \<and> integral (cbox a b) g = i" |
53634 | 4467 |
apply - |
4468 |
apply cases |
|
4469 |
apply (subst(asm) if_P) |
|
4470 |
apply assumption |
|
4471 |
apply auto |
|
4472 |
done |
|
4473 |
then show ?thesis |
|
4474 |
using integrable_integral |
|
4475 |
unfolding g_def |
|
4476 |
by auto |
|
4477 |
} |
|
63659 | 4478 |
let ?F = F |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
4479 |
have iterate:"?F (\<lambda>i. if g integrable_on i then Some (integral i g) else None) (p - {cbox c d}) = Some 0" |
63659 | 4480 |
proof (intro neutral ballI) |
61165 | 4481 |
fix x |
4482 |
assume x: "x \<in> p - {cbox c d}" |
|
53634 | 4483 |
then have "x \<in> p" |
4484 |
by auto |
|
4485 |
note div = division_ofD(2-5)[OF p(1) this] |
|
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4486 |
then obtain u v where uv: "x = cbox u v" by blast |
56188 | 4487 |
have "interior x \<inter> interior (cbox c d) = {}" |
61165 | 4488 |
using div(4)[OF p(2)] x by auto |
53634 | 4489 |
then have "(g has_integral 0) x" |
4490 |
unfolding uv |
|
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4491 |
using has_integral_spike_interior[where f="\<lambda>x. 0"] |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4492 |
by (metis (no_types, lifting) disjoint_iff_not_equal g_def has_integral_0_eq interior_cbox) |
61165 | 4493 |
then show "(if g integrable_on x then Some (integral x g) else None) = Some 0" |
53634 | 4494 |
by auto |
35751 | 4495 |
qed |
4496 |
||
56188 | 4497 |
have *: "p = insert (cbox c d) (p - {cbox c d})" |
53634 | 4498 |
using p by auto |
63659 | 4499 |
interpret comm_monoid_set "lift_option plus" "Some (0 :: 'b)" |
4500 |
apply (rule comm_monoid_set.intro) |
|
4501 |
apply (rule comm_monoid_lift_option) |
|
4502 |
apply (rule add.comm_monoid_axioms) |
|
4503 |
done |
|
56188 | 4504 |
have **: "g integrable_on cbox c d" |
53634 | 4505 |
apply (rule integrable_spike_interior[where f=f]) |
62463
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
4506 |
unfolding g_def using assms(1) |
53634 | 4507 |
apply auto |
4508 |
done |
|
4509 |
moreover |
|
56188 | 4510 |
have "integral (cbox c d) g = i" |
53634 | 4511 |
apply (rule has_integral_unique[OF _ assms(1)]) |
4512 |
apply (rule has_integral_spike_interior[where f=g]) |
|
4513 |
defer |
|
4514 |
apply (rule integrable_integral[OF **]) |
|
4515 |
unfolding g_def |
|
4516 |
apply auto |
|
4517 |
done |
|
4518 |
ultimately show ?P |
|
4519 |
unfolding operat |
|
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
4520 |
using p |
53634 | 4521 |
apply (subst *) |
63659 | 4522 |
apply (subst insert) |
63593
bbcb05504fdc
HOL-Multivariate_Analysis: replace neutral, monoidal, and iterate by the comm_monoid_set versions. Changed operative to comm_monoid_set. Renamed support_on to support and changed to comm_monoid_add.
hoelzl
parents:
63540
diff
changeset
|
4523 |
apply (simp_all add: division_of_finite iterate) |
53634 | 4524 |
done |
4525 |
qed |
|
4526 |
||
4527 |
lemma has_integral_restrict_closed_subinterval: |
|
56188 | 4528 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
4529 |
assumes "(f has_integral i) (cbox c d)" |
|
4530 |
and "cbox c d \<subseteq> cbox a b" |
|
4531 |
shows "((\<lambda>x. if x \<in> cbox c d then f x else 0) has_integral i) (cbox a b)" |
|
53634 | 4532 |
proof - |
4533 |
note has_integral_restrict_open_subinterval[OF assms] |
|
35751 | 4534 |
note * = has_integral_spike[OF negligible_frontier_interval _ this] |
53634 | 4535 |
show ?thesis |
4536 |
apply (rule *[of c d]) |
|
56188 | 4537 |
using box_subset_cbox[of c d] |
53634 | 4538 |
apply auto |
4539 |
done |
|
4540 |
qed |
|
4541 |
||
4542 |
lemma has_integral_restrict_closed_subintervals_eq: |
|
56188 | 4543 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
4544 |
assumes "cbox c d \<subseteq> cbox a b" |
|
4545 |
shows "((\<lambda>x. if x \<in> cbox c d then f x else 0) has_integral i) (cbox a b) \<longleftrightarrow> (f has_integral i) (cbox c d)" |
|
53634 | 4546 |
(is "?l = ?r") |
56188 | 4547 |
proof (cases "cbox c d = {}") |
53634 | 4548 |
case False |
56188 | 4549 |
let ?g = "\<lambda>x. if x \<in> cbox c d then f x else 0" |
53634 | 4550 |
show ?thesis |
4551 |
apply rule |
|
4552 |
defer |
|
4553 |
apply (rule has_integral_restrict_closed_subinterval[OF _ assms]) |
|
4554 |
apply assumption |
|
4555 |
proof - |
|
4556 |
assume ?l |
|
56188 | 4557 |
then have "?g integrable_on cbox c d" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
4558 |
using assms has_integral_integrable integrable_subinterval by blast |
56188 | 4559 |
then have *: "f integrable_on cbox c d" |
53634 | 4560 |
apply - |
4561 |
apply (rule integrable_eq) |
|
4562 |
apply auto |
|
4563 |
done |
|
56188 | 4564 |
then have "i = integral (cbox c d) f" |
53634 | 4565 |
apply - |
4566 |
apply (rule has_integral_unique) |
|
60420 | 4567 |
apply (rule \<open>?l\<close>) |
53634 | 4568 |
apply (rule has_integral_restrict_closed_subinterval[OF _ assms]) |
4569 |
apply auto |
|
4570 |
done |
|
4571 |
then show ?r |
|
4572 |
using * by auto |
|
4573 |
qed |
|
4574 |
qed auto |
|
4575 |
||
4576 |
||
60420 | 4577 |
text \<open>Hence we can apply the limit process uniformly to all integrals.\<close> |
53634 | 4578 |
|
4579 |
lemma has_integral': |
|
56188 | 4580 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66504 | 4581 |
shows "(f has_integral i) S \<longleftrightarrow> |
56188 | 4582 |
(\<forall>e>0. \<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
66504 | 4583 |
(\<exists>z. ((\<lambda>x. if x \<in> S then f(x) else 0) has_integral z) (cbox a b) \<and> norm(z - i) < e))" |
53634 | 4584 |
(is "?l \<longleftrightarrow> (\<forall>e>0. ?r e)") |
66504 | 4585 |
proof (cases "\<exists>a b. S = cbox a b") |
4586 |
case False then show ?thesis |
|
4587 |
by (simp add: has_integral_alt) |
|
4588 |
next |
|
4589 |
case True |
|
4590 |
then obtain a b where S: "S = cbox a b" |
|
4591 |
by blast |
|
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4592 |
obtain B where " 0 < B" and B: "\<And>x. x \<in> cbox a b \<Longrightarrow> norm x \<le> B" |
66504 | 4593 |
using bounded_cbox[unfolded bounded_pos] by blast |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4594 |
show ?thesis |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4595 |
proof safe |
53634 | 4596 |
fix e :: real |
4597 |
assume ?l and "e > 0" |
|
66504 | 4598 |
have "((\<lambda>x. if x \<in> S then f x else 0) has_integral i) (cbox c d)" |
4599 |
if "ball 0 (B+1) \<subseteq> cbox c d" for c d |
|
4600 |
unfolding S using B that |
|
4601 |
by (force intro: \<open>?l\<close>[unfolded S] has_integral_restrict_closed_subinterval) |
|
4602 |
then show "?r e" |
|
53634 | 4603 |
apply (rule_tac x="B+1" in exI) |
66504 | 4604 |
using \<open>B>0\<close> \<open>e>0\<close> by force |
53634 | 4605 |
next |
4606 |
assume as: "\<forall>e>0. ?r e" |
|
66504 | 4607 |
then obtain C |
4608 |
where C: "\<And>a b. ball 0 C \<subseteq> cbox a b \<Longrightarrow> |
|
4609 |
\<exists>z. ((\<lambda>x. if x \<in> S then f x else 0) has_integral z) (cbox a b)" |
|
4610 |
by (meson zero_less_one) |
|
63040 | 4611 |
define c :: 'n where "c = (\<Sum>i\<in>Basis. (- max B C) *\<^sub>R i)" |
4612 |
define d :: 'n where "d = (\<Sum>i\<in>Basis. max B C *\<^sub>R i)" |
|
66504 | 4613 |
have "c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" if "norm x \<le> B" "i \<in> Basis" for x i |
4614 |
using that and Basis_le_norm[OF \<open>i\<in>Basis\<close>, of x] |
|
4615 |
by (auto simp add: field_simps sum_negf c_def d_def) |
|
4616 |
then have c_d: "cbox a b \<subseteq> cbox c d" |
|
4617 |
by (meson B mem_box(2) subsetI) |
|
4618 |
have "c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" |
|
4619 |
if x: "norm (0 - x) < C" and i: "i \<in> Basis" for x i |
|
4620 |
using Basis_le_norm[OF i, of x] x i by (auto simp: sum_negf c_def d_def) |
|
4621 |
then have "ball 0 C \<subseteq> cbox c d" |
|
4622 |
by (auto simp: mem_box dist_norm) |
|
4623 |
with C obtain y where y: "(f has_integral y) (cbox a b)" |
|
4624 |
using c_d has_integral_restrict_closed_subintervals_eq S by blast |
|
53634 | 4625 |
have "y = i" |
4626 |
proof (rule ccontr) |
|
66504 | 4627 |
assume "y \<noteq> i" |
53634 | 4628 |
then have "0 < norm (y - i)" |
4629 |
by auto |
|
66504 | 4630 |
from as[rule_format,OF this] |
4631 |
obtain C where C: "\<And>a b. ball 0 C \<subseteq> cbox a b \<Longrightarrow> |
|
4632 |
\<exists>z. ((\<lambda>x. if x \<in> S then f x else 0) has_integral z) (cbox a b) \<and> norm (z-i) < norm (y-i)" |
|
4633 |
by auto |
|
63040 | 4634 |
define c :: 'n where "c = (\<Sum>i\<in>Basis. (- max B C) *\<^sub>R i)" |
4635 |
define d :: 'n where "d = (\<Sum>i\<in>Basis. max B C *\<^sub>R i)" |
|
66504 | 4636 |
have "c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" |
4637 |
if "norm x \<le> B" and "i \<in> Basis" for x i |
|
4638 |
using that Basis_le_norm[of i x] by (auto simp add: field_simps sum_negf c_def d_def) |
|
4639 |
then have c_d: "cbox a b \<subseteq> cbox c d" |
|
4640 |
by (simp add: B mem_box(2) subset_eq) |
|
4641 |
have "c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" if "norm (0 - x) < C" and "i \<in> Basis" for x i |
|
4642 |
using Basis_le_norm[of i x] that by (auto simp: sum_negf c_def d_def) |
|
4643 |
then have "ball 0 C \<subseteq> cbox c d" |
|
4644 |
by (auto simp: mem_box dist_norm) |
|
4645 |
with C obtain z where z: "(f has_integral z) (cbox a b)" "norm (z-i) < norm (y-i)" |
|
4646 |
using has_integral_restrict_closed_subintervals_eq[OF c_d] S by blast |
|
4647 |
moreover then have "z = y" |
|
4648 |
by (blast intro: has_integral_unique[OF _ y]) |
|
4649 |
ultimately show False |
|
53634 | 4650 |
by auto |
4651 |
qed |
|
4652 |
then show ?l |
|
66504 | 4653 |
using y by (auto simp: S) |
53634 | 4654 |
qed |
4655 |
qed |
|
4656 |
||
4657 |
lemma has_integral_le: |
|
56188 | 4658 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
66504 | 4659 |
assumes fg: "(f has_integral i) S" "(g has_integral j) S" |
4660 |
and le: "\<And>x. x \<in> S \<Longrightarrow> f x \<le> g x" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
4661 |
shows "i \<le> j" |
66504 | 4662 |
using has_integral_component_le[OF _ fg, of 1] le by auto |
53634 | 4663 |
|
4664 |
lemma integral_le: |
|
56188 | 4665 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4666 |
assumes "f integrable_on S" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4667 |
and "g integrable_on S" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4668 |
and "\<And>x. x \<in> S \<Longrightarrow> f x \<le> g x" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4669 |
shows "integral S f \<le> integral S g" |
53634 | 4670 |
by (rule has_integral_le[OF assms(1,2)[unfolded has_integral_integral] assms(3)]) |
4671 |
||
4672 |
lemma has_integral_nonneg: |
|
56188 | 4673 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4674 |
assumes "(f has_integral i) S" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4675 |
and "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f x" |
53634 | 4676 |
shows "0 \<le> i" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4677 |
using has_integral_component_nonneg[of 1 f i S] |
53634 | 4678 |
unfolding o_def |
4679 |
using assms |
|
4680 |
by auto |
|
4681 |
||
4682 |
lemma integral_nonneg: |
|
56188 | 4683 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4684 |
assumes "f integrable_on S" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4685 |
and "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f x" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
4686 |
shows "0 \<le> integral S f" |
53634 | 4687 |
by (rule has_integral_nonneg[OF assms(1)[unfolded has_integral_integral] assms(2)]) |
4688 |
||
4689 |
||
60420 | 4690 |
text \<open>Hence a general restriction property.\<close> |
53634 | 4691 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4692 |
lemma has_integral_restrict [simp]: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4693 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4694 |
assumes "S \<subseteq> T" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4695 |
shows "((\<lambda>x. if x \<in> S then f x else 0) has_integral i) T \<longleftrightarrow> (f has_integral i) S" |
53634 | 4696 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4697 |
have *: "\<And>x. (if x \<in> T then if x \<in> S then f x else 0 else 0) = (if x\<in>S then f x else 0)" |
53634 | 4698 |
using assms by auto |
4699 |
show ?thesis |
|
4700 |
apply (subst(2) has_integral') |
|
4701 |
apply (subst has_integral') |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4702 |
apply (simp add: *) |
53634 | 4703 |
done |
4704 |
qed |
|
4705 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4706 |
corollary has_integral_restrict_UNIV: |
56188 | 4707 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 4708 |
shows "((\<lambda>x. if x \<in> s then f x else 0) has_integral i) UNIV \<longleftrightarrow> (f has_integral i) s" |
4709 |
by auto |
|
4710 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4711 |
lemma has_integral_restrict_Int: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4712 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4713 |
shows "((\<lambda>x. if x \<in> S then f x else 0) has_integral i) T \<longleftrightarrow> (f has_integral i) (S \<inter> T)" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4714 |
proof - |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4715 |
have "((\<lambda>x. if x \<in> T then if x \<in> S then f x else 0 else 0) has_integral i) UNIV = |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4716 |
((\<lambda>x. if x \<in> S \<inter> T then f x else 0) has_integral i) UNIV" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4717 |
by (rule has_integral_cong) auto |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4718 |
then show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4719 |
using has_integral_restrict_UNIV by fastforce |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4720 |
qed |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4721 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4722 |
lemma integral_restrict_Int: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4723 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4724 |
shows "integral T (\<lambda>x. if x \<in> S then f x else 0) = integral (S \<inter> T) f" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4725 |
by (metis (no_types, lifting) has_integral_cong has_integral_restrict_Int integrable_integral integral_unique not_integrable_integral) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4726 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4727 |
lemma integrable_restrict_Int: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4728 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4729 |
shows "(\<lambda>x. if x \<in> S then f x else 0) integrable_on T \<longleftrightarrow> f integrable_on (S \<inter> T)" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4730 |
using has_integral_restrict_Int by fastforce |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4731 |
|
53634 | 4732 |
lemma has_integral_on_superset: |
56188 | 4733 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4734 |
assumes f: "(f has_integral i) S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4735 |
and "\<And>x. x \<notin> S \<Longrightarrow> f x = 0" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4736 |
and "S \<subseteq> T" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4737 |
shows "(f has_integral i) T" |
53634 | 4738 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4739 |
have "(\<lambda>x. if x \<in> S then f x else 0) = (\<lambda>x. if x \<in> T then f x else 0)" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4740 |
using assms by fastforce |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4741 |
with f show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4742 |
by (simp only: has_integral_restrict_UNIV [symmetric, of f]) |
53634 | 4743 |
qed |
4744 |
||
4745 |
lemma integrable_on_superset: |
|
56188 | 4746 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 4747 |
assumes "\<forall>x. x \<notin> s \<longrightarrow> f x = 0" |
4748 |
and "s \<subseteq> t" |
|
4749 |
and "f integrable_on s" |
|
35751 | 4750 |
shows "f integrable_on t" |
53634 | 4751 |
using assms |
4752 |
unfolding integrable_on_def |
|
4753 |
by (auto intro:has_integral_on_superset) |
|
4754 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4755 |
lemma integral_restrict_UNIV [intro]: |
56188 | 4756 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
35751 | 4757 |
shows "f integrable_on s \<Longrightarrow> integral UNIV (\<lambda>x. if x \<in> s then f x else 0) = integral s f" |
53634 | 4758 |
apply (rule integral_unique) |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
4759 |
unfolding has_integral_restrict_UNIV |
53634 | 4760 |
apply auto |
4761 |
done |
|
4762 |
||
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
4763 |
lemma integrable_restrict_UNIV: |
56188 | 4764 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 4765 |
shows "(\<lambda>x. if x \<in> s then f x else 0) integrable_on UNIV \<longleftrightarrow> f integrable_on s" |
4766 |
unfolding integrable_on_def |
|
4767 |
by auto |
|
4768 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4769 |
lemma has_integral_subset_component_le: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4770 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'm::euclidean_space" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4771 |
assumes k: "k \<in> Basis" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4772 |
and as: "S \<subseteq> T" "(f has_integral i) S" "(f has_integral j) T" "\<And>x. x\<in>T \<Longrightarrow> 0 \<le> f(x)\<bullet>k" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4773 |
shows "i\<bullet>k \<le> j\<bullet>k" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4774 |
proof - |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4775 |
have "((\<lambda>x. if x \<in> S then f x else 0) has_integral i) UNIV" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4776 |
"((\<lambda>x. if x \<in> T then f x else 0) has_integral j) UNIV" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4777 |
by (simp_all add: assms) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4778 |
then show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4779 |
apply (rule has_integral_component_le[OF k]) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4780 |
using as by auto |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4781 |
qed |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4782 |
|
56188 | 4783 |
lemma negligible_on_intervals: "negligible s \<longleftrightarrow> (\<forall>a b. negligible(s \<inter> cbox a b))" (is "?l \<longleftrightarrow> ?r") |
53634 | 4784 |
proof |
4785 |
assume ?r |
|
4786 |
show ?l |
|
4787 |
unfolding negligible_def |
|
4788 |
proof safe |
|
61165 | 4789 |
fix a b |
4790 |
show "(indicator s has_integral 0) (cbox a b)" |
|
60420 | 4791 |
apply (rule has_integral_negligible[OF \<open>?r\<close>[rule_format,of a b]]) |
53634 | 4792 |
unfolding indicator_def |
4793 |
apply auto |
|
4794 |
done |
|
4795 |
qed |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
4796 |
qed (simp add: negligible_Int) |
53634 | 4797 |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4798 |
lemma negligible_translation: |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4799 |
assumes "negligible S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4800 |
shows "negligible (op + c ` S)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4801 |
proof - |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4802 |
have inj: "inj (op + c)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4803 |
by simp |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4804 |
show ?thesis |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4805 |
using assms |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4806 |
proof (clarsimp simp: negligible_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4807 |
fix a b |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4808 |
assume "\<forall>x y. (indicator S has_integral 0) (cbox x y)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4809 |
then have *: "(indicator S has_integral 0) (cbox (a-c) (b-c))" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4810 |
by (meson Diff_iff assms has_integral_negligible indicator_simps(2)) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4811 |
have eq: "indicator (op + c ` S) = (\<lambda>x. indicator S (x - c))" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4812 |
by (force simp add: indicator_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4813 |
show "(indicator (op + c ` S) has_integral 0) (cbox a b)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4814 |
using has_integral_affinity [OF *, of 1 "-c"] |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4815 |
cbox_translation [of "c" "-c+a" "-c+b"] |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4816 |
by (simp add: eq add.commute) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4817 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4818 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4819 |
|
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4820 |
lemma negligible_translation_rev: |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4821 |
assumes "negligible (op + c ` S)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4822 |
shows "negligible S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4823 |
by (metis negligible_translation [OF assms, of "-c"] translation_galois) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
4824 |
|
53634 | 4825 |
lemma has_integral_spike_set_eq: |
56188 | 4826 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4827 |
assumes "negligible ((S - T) \<union> (T - S))" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4828 |
shows "(f has_integral y) S \<longleftrightarrow> (f has_integral y) T" |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
4829 |
unfolding has_integral_restrict_UNIV[symmetric,of f] |
53634 | 4830 |
apply (rule has_integral_spike_eq[OF assms]) |
62390 | 4831 |
by (auto split: if_split_asm) |
53634 | 4832 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
4833 |
lemma has_integral_spike_set: |
56188 | 4834 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4835 |
assumes "(f has_integral y) S" "negligible ((S - T) \<union> (T - S))" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4836 |
shows "(f has_integral y) T" |
53634 | 4837 |
using assms has_integral_spike_set_eq |
4838 |
by auto |
|
4839 |
||
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
4840 |
lemma integrable_spike_set: |
56188 | 4841 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4842 |
assumes "f integrable_on S" and "negligible ((S - T) \<union> (T - S))" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4843 |
shows "f integrable_on T" |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
4844 |
using assms by (simp add: integrable_on_def has_integral_spike_set_eq) |
35751 | 4845 |
|
53634 | 4846 |
lemma integrable_spike_set_eq: |
56188 | 4847 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4848 |
assumes "negligible ((S - T) \<union> (T - S))" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4849 |
shows "f integrable_on S \<longleftrightarrow> f integrable_on T" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4850 |
by (blast intro: integrable_spike_set assms negligible_subset) |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4851 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4852 |
lemma has_integral_interior: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4853 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4854 |
shows "negligible(frontier S) \<Longrightarrow> (f has_integral y) (interior S) \<longleftrightarrow> (f has_integral y) S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4855 |
apply (rule has_integral_spike_set_eq) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4856 |
apply (auto simp: frontier_def Un_Diff closure_def) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4857 |
apply (metis Diff_eq_empty_iff interior_subset negligible_empty) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4858 |
done |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4859 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4860 |
lemma has_integral_closure: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4861 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4862 |
shows "negligible(frontier S) \<Longrightarrow> (f has_integral y) (closure S) \<longleftrightarrow> (f has_integral y) S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4863 |
apply (rule has_integral_spike_set_eq) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4864 |
apply (auto simp: Un_Diff closure_Un_frontier negligible_diff) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4865 |
by (simp add: Diff_eq closure_Un_frontier) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4866 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4867 |
lemma has_integral_open_interval: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4868 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4869 |
shows "(f has_integral y) (box a b) \<longleftrightarrow> (f has_integral y) (cbox a b)" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4870 |
unfolding interior_cbox [symmetric] |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4871 |
by (metis frontier_cbox has_integral_interior negligible_frontier_interval) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4872 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4873 |
lemma integrable_on_open_interval: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4874 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4875 |
shows "f integrable_on box a b \<longleftrightarrow> f integrable_on cbox a b" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4876 |
by (simp add: has_integral_open_interval integrable_on_def) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4877 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4878 |
lemma integral_open_interval: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4879 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4880 |
shows "integral(box a b) f = integral(cbox a b) f" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4881 |
by (metis has_integral_integrable_integral has_integral_open_interval not_integrable_integral) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4882 |
|
35751 | 4883 |
|
60420 | 4884 |
subsection \<open>More lemmas that are useful later\<close> |
53634 | 4885 |
|
4886 |
lemma has_integral_subset_le: |
|
56188 | 4887 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
53634 | 4888 |
assumes "s \<subseteq> t" |
4889 |
and "(f has_integral i) s" |
|
4890 |
and "(f has_integral j) t" |
|
4891 |
and "\<forall>x\<in>t. 0 \<le> f x" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
4892 |
shows "i \<le> j" |
53634 | 4893 |
using has_integral_subset_component_le[OF _ assms(1), of 1 f i j] |
4894 |
using assms |
|
4895 |
by auto |
|
4896 |
||
4897 |
lemma integral_subset_component_le: |
|
56188 | 4898 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'm::euclidean_space" |
53634 | 4899 |
assumes "k \<in> Basis" |
4900 |
and "s \<subseteq> t" |
|
4901 |
and "f integrable_on s" |
|
4902 |
and "f integrable_on t" |
|
4903 |
and "\<forall>x \<in> t. 0 \<le> f x \<bullet> k" |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
4904 |
shows "(integral s f)\<bullet>k \<le> (integral t f)\<bullet>k" |
53634 | 4905 |
apply (rule has_integral_subset_component_le) |
4906 |
using assms |
|
4907 |
apply auto |
|
4908 |
done |
|
4909 |
||
4910 |
lemma integral_subset_le: |
|
56188 | 4911 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
53634 | 4912 |
assumes "s \<subseteq> t" |
4913 |
and "f integrable_on s" |
|
4914 |
and "f integrable_on t" |
|
4915 |
and "\<forall>x \<in> t. 0 \<le> f x" |
|
4916 |
shows "integral s f \<le> integral t f" |
|
4917 |
apply (rule has_integral_subset_le) |
|
4918 |
using assms |
|
4919 |
apply auto |
|
4920 |
done |
|
4921 |
||
4922 |
lemma has_integral_alt': |
|
56188 | 4923 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4924 |
shows "(f has_integral i) s \<longleftrightarrow> |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4925 |
(\<forall>a b. (\<lambda>x. if x \<in> s then f x else 0) integrable_on cbox a b) \<and> |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4926 |
(\<forall>e>0. \<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4927 |
norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - i) < e)" |
53634 | 4928 |
(is "?l = ?r") |
4929 |
proof |
|
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4930 |
assume rhs: ?r |
53634 | 4931 |
show ?l |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4932 |
proof (subst has_integral', intro allI impI) |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4933 |
fix e::real |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4934 |
assume "e > 0" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4935 |
from rhs[THEN conjunct2,rule_format,OF this] |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4936 |
show "\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4937 |
(\<exists>z. ((\<lambda>x. if x \<in> s then f x else 0) has_integral z) |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4938 |
(cbox a b) \<and> norm (z - i) < e)" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4939 |
apply (rule ex_forward) |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4940 |
using rhs by blast |
53634 | 4941 |
qed |
4942 |
next |
|
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4943 |
let ?\<Phi> = "\<lambda>e a b. \<exists>z. ((\<lambda>x. if x \<in> s then f x else 0) has_integral z) (cbox a b) \<and> norm (z - i) < e" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4944 |
assume ?l |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4945 |
then have lhs: "\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> ?\<Phi> e a b" if "e > 0" for e |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4946 |
using that has_integral'[of f] by auto |
35751 | 4947 |
let ?f = "\<lambda>x. if x \<in> s then f x else 0" |
53634 | 4948 |
show ?r |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4949 |
proof (intro conjI allI impI) |
53634 | 4950 |
fix a b :: 'n |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4951 |
from lhs[OF zero_less_one] |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4952 |
obtain B where "0 < B" and B: "\<And>a b. ball 0 B \<subseteq> cbox a b \<Longrightarrow> ?\<Phi> 1 a b" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4953 |
by blast |
53634 | 4954 |
let ?a = "\<Sum>i\<in>Basis. min (a\<bullet>i) (-B) *\<^sub>R i::'n" |
4955 |
let ?b = "\<Sum>i\<in>Basis. max (b\<bullet>i) B *\<^sub>R i::'n" |
|
56188 | 4956 |
show "?f integrable_on cbox a b" |
53634 | 4957 |
proof (rule integrable_subinterval[of _ ?a ?b]) |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4958 |
have "?a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> ?b \<bullet> i" if "norm (0 - x) < B" "i \<in> Basis" for x i |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4959 |
using Basis_le_norm[of i x] that by (auto simp add:field_simps) |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4960 |
then have "ball 0 B \<subseteq> cbox ?a ?b" |
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4961 |
by (auto simp: mem_box dist_norm) |
56188 | 4962 |
then show "?f integrable_on cbox ?a ?b" |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4963 |
unfolding integrable_on_def using B by blast |
56188 | 4964 |
show "cbox a b \<subseteq> cbox ?a ?b" |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4965 |
by (force simp: mem_box) |
53634 | 4966 |
qed |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4967 |
|
53634 | 4968 |
fix e :: real |
4969 |
assume "e > 0" |
|
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4970 |
with lhs show "\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
56188 | 4971 |
norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - i) < e" |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
4972 |
by (metis (no_types, lifting) has_integral_integrable_integral) |
53634 | 4973 |
qed |
4974 |
qed |
|
35751 | 4975 |
|
35752 | 4976 |
|
60420 | 4977 |
subsection \<open>Continuity of the integral (for a 1-dimensional interval).\<close> |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
4978 |
|
53634 | 4979 |
lemma integrable_alt: |
56188 | 4980 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 4981 |
shows "f integrable_on s \<longleftrightarrow> |
56188 | 4982 |
(\<forall>a b. (\<lambda>x. if x \<in> s then f x else 0) integrable_on cbox a b) \<and> |
4983 |
(\<forall>e>0. \<exists>B>0. \<forall>a b c d. ball 0 B \<subseteq> cbox a b \<and> ball 0 B \<subseteq> cbox c d \<longrightarrow> |
|
4984 |
norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - |
|
4985 |
integral (cbox c d) (\<lambda>x. if x \<in> s then f x else 0)) < e)" |
|
53634 | 4986 |
(is "?l = ?r") |
4987 |
proof |
|
66505 | 4988 |
let ?F = "\<lambda>x. if x \<in> s then f x else 0" |
53634 | 4989 |
assume ?l |
66505 | 4990 |
then obtain y where intF: "\<And>a b. ?F integrable_on cbox a b" |
4991 |
and y: "\<And>e. 0 < e \<Longrightarrow> |
|
4992 |
\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> norm (integral (cbox a b) ?F - y) < e" |
|
4993 |
unfolding integrable_on_def has_integral_alt'[of f] by auto |
|
53634 | 4994 |
show ?r |
66505 | 4995 |
proof (intro conjI allI impI intF) |
4996 |
fix e::real |
|
4997 |
assume "e > 0" |
|
53634 | 4998 |
then have "e/2 > 0" |
4999 |
by auto |
|
66505 | 5000 |
obtain B where "0 < B" |
5001 |
and B: "\<And>a b. ball 0 B \<subseteq> cbox a b \<Longrightarrow> norm (integral (cbox a b) ?F - y) < e/2" |
|
5002 |
using \<open>0 < e/2\<close> y by blast |
|
5003 |
show "\<exists>B>0. \<forall>a b c d. ball 0 B \<subseteq> cbox a b \<and> ball 0 B \<subseteq> cbox c d \<longrightarrow> |
|
5004 |
norm (integral (cbox a b) ?F - integral (cbox c d) ?F) < e" |
|
5005 |
proof (intro conjI exI impI allI, rule \<open>0 < B\<close>) |
|
5006 |
fix a b c d::'n |
|
5007 |
assume sub: "ball 0 B \<subseteq> cbox a b \<and> ball 0 B \<subseteq> cbox c d" |
|
5008 |
show "norm (integral (cbox a b) ?F - integral (cbox c d) ?F) < e" |
|
5009 |
using sub by (auto intro: norm_triangle_half_l dest: B) |
|
53634 | 5010 |
qed |
5011 |
qed |
|
5012 |
next |
|
66505 | 5013 |
let ?F = "\<lambda>x. if x \<in> s then f x else 0" |
5014 |
assume rhs: ?r |
|
56188 | 5015 |
let ?cube = "\<lambda>n. cbox (\<Sum>i\<in>Basis. - real n *\<^sub>R i::'n) (\<Sum>i\<in>Basis. real n *\<^sub>R i)" |
66508 | 5016 |
have "Cauchy (\<lambda>n. integral (?cube n) ?F)" |
5017 |
unfolding Cauchy_def |
|
5018 |
proof (intro allI impI) |
|
5019 |
fix e::real |
|
5020 |
assume "e > 0" |
|
66505 | 5021 |
with rhs obtain B where "0 < B" |
5022 |
and B: "\<And>a b c d. ball 0 B \<subseteq> cbox a b \<and> ball 0 B \<subseteq> cbox c d |
|
5023 |
\<Longrightarrow> norm (integral (cbox a b) ?F - integral (cbox c d) ?F) < e" |
|
5024 |
by blast |
|
5025 |
obtain N where N: "B \<le> real N" |
|
5026 |
using real_arch_simple by blast |
|
66508 | 5027 |
have "ball 0 B \<subseteq> ?cube n" if n: "n \<ge> N" for n |
5028 |
proof - |
|
66505 | 5029 |
have "sum (op *\<^sub>R (- real n)) Basis \<bullet> i \<le> x \<bullet> i \<and> |
5030 |
x \<bullet> i \<le> sum (op *\<^sub>R (real n)) Basis \<bullet> i" |
|
5031 |
if "norm x < B" "i \<in> Basis" for x i::'n |
|
5032 |
using Basis_le_norm[of i x] n N that by (auto simp add: field_simps sum_negf) |
|
66508 | 5033 |
then show ?thesis |
66505 | 5034 |
by (auto simp: mem_box dist_norm) |
66508 | 5035 |
qed |
5036 |
then show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (integral (?cube m) ?F) (integral (?cube n) ?F) < e" |
|
66505 | 5037 |
by (fastforce simp add: dist_norm intro!: B) |
53634 | 5038 |
qed |
66508 | 5039 |
then obtain i where i: "(\<lambda>n. integral (?cube n) ?F) \<longlonglongrightarrow> i" |
5040 |
using convergent_eq_Cauchy by blast |
|
5041 |
have "\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> norm (integral (cbox a b) ?F - i) < e" |
|
5042 |
if "e > 0" for e |
|
5043 |
proof - |
|
5044 |
have *: "e/2 > 0" using that by auto |
|
5045 |
then obtain N where N: "\<And>n. N \<le> n \<Longrightarrow> norm (i - integral (?cube n) ?F) < e / 2" |
|
5046 |
using i[THEN LIMSEQ_D, simplified norm_minus_commute] by meson |
|
5047 |
obtain B where "0 < B" |
|
5048 |
and B: "\<And>a b c d. \<lbrakk>ball 0 B \<subseteq> cbox a b; ball 0 B \<subseteq> cbox c d\<rbrakk> \<Longrightarrow> |
|
5049 |
norm (integral (cbox a b) ?F - integral (cbox c d) ?F) < e / 2" |
|
5050 |
using rhs * by meson |
|
53634 | 5051 |
let ?B = "max (real N) B" |
66508 | 5052 |
show ?thesis |
5053 |
proof (intro exI conjI allI impI) |
|
53634 | 5054 |
show "0 < ?B" |
66508 | 5055 |
using \<open>B > 0\<close> by auto |
53634 | 5056 |
fix a b :: 'n |
66508 | 5057 |
assume "ball 0 ?B \<subseteq> cbox a b" |
5058 |
moreover obtain n where n: "max (real N) B \<le> real n" |
|
5059 |
using real_arch_simple by blast |
|
5060 |
moreover have "ball 0 B \<subseteq> ?cube n" |
|
5061 |
proof |
|
53634 | 5062 |
fix x :: 'n |
5063 |
assume x: "x \<in> ball 0 B" |
|
66508 | 5064 |
have "\<lbrakk>norm (0 - x) < B; i \<in> Basis\<rbrakk> |
5065 |
\<Longrightarrow> sum (op *\<^sub>R (-n)) Basis \<bullet> i\<le> x \<bullet> i \<and> x \<bullet> i \<le> sum (op *\<^sub>R n) Basis \<bullet> i" for i |
|
5066 |
using Basis_le_norm[of i x] n by (auto simp add: field_simps sum_negf) |
|
5067 |
then show "x \<in> ?cube n" |
|
5068 |
using x by (auto simp: mem_box dist_norm) |
|
5069 |
qed |
|
5070 |
ultimately show "norm (integral (cbox a b) ?F - i) < e" |
|
5071 |
using norm_triangle_half_l [OF B N] by force |
|
53634 | 5072 |
qed |
5073 |
qed |
|
66508 | 5074 |
then show ?l unfolding integrable_on_def has_integral_alt'[of f] |
5075 |
using rhs by blast |
|
53634 | 5076 |
qed |
5077 |
||
5078 |
lemma integrable_altD: |
|
56188 | 5079 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5080 |
assumes "f integrable_on s" |
56188 | 5081 |
shows "\<And>a b. (\<lambda>x. if x \<in> s then f x else 0) integrable_on cbox a b" |
5082 |
and "\<And>e. e > 0 \<Longrightarrow> \<exists>B>0. \<forall>a b c d. ball 0 B \<subseteq> cbox a b \<and> ball 0 B \<subseteq> cbox c d \<longrightarrow> |
|
5083 |
norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - integral (cbox c d) (\<lambda>x. if x \<in> s then f x else 0)) < e" |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5084 |
using assms[unfolded integrable_alt[of f]] by auto |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5085 |
|
56188 | 5086 |
lemma integrable_on_subcbox: |
5087 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
|
66505 | 5088 |
assumes intf: "f integrable_on S" |
5089 |
and sub: "cbox a b \<subseteq> S" |
|
56188 | 5090 |
shows "f integrable_on cbox a b" |
66505 | 5091 |
proof - |
5092 |
have "(\<lambda>x. if x \<in> S then f x else 0) integrable_on cbox a b" |
|
5093 |
by (simp add: intf integrable_altD(1)) |
|
5094 |
then show ?thesis |
|
5095 |
by (metis (mono_tags) sub integrable_restrict_Int le_inf_iff order_refl subset_antisym) |
|
5096 |
qed |
|
53634 | 5097 |
|
5098 |
||
60420 | 5099 |
subsection \<open>A straddling criterion for integrability\<close> |
53634 | 5100 |
|
5101 |
lemma integrable_straddle_interval: |
|
56188 | 5102 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5103 |
assumes "\<And>e. e>0 \<Longrightarrow> \<exists>g h i j. (g has_integral i) (cbox a b) \<and> (h has_integral j) (cbox a b) \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5104 |
\<bar>i - j\<bar> < e \<and> (\<forall>x\<in>cbox a b. (g x) \<le> f x \<and> f x \<le> h x)" |
56188 | 5105 |
shows "f integrable_on cbox a b" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5106 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5107 |
have "\<exists>d. gauge d \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5108 |
(\<forall>p1 p2. p1 tagged_division_of cbox a b \<and> d fine p1 \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5109 |
p2 tagged_division_of cbox a b \<and> d fine p2 \<longrightarrow> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5110 |
\<bar>(\<Sum>(x,K)\<in>p1. content K *\<^sub>R f x) - (\<Sum>(x,K)\<in>p2. content K *\<^sub>R f x)\<bar> < e)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5111 |
if "e > 0" for e |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5112 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5113 |
have e: "e/3 > 0" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5114 |
using that by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5115 |
then obtain g h i j where ij: "\<bar>i - j\<bar> < e/3" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5116 |
and "(g has_integral i) (cbox a b)" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5117 |
and "(h has_integral j) (cbox a b)" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5118 |
and fgh: "\<And>x. x \<in> cbox a b \<Longrightarrow> g x \<le> f x \<and> f x \<le> h x" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5119 |
using assms real_norm_def by metis |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5120 |
then obtain d1 d2 where "gauge d1" "gauge d2" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5121 |
and d1: "\<And>p. \<lbrakk>p tagged_division_of cbox a b; d1 fine p\<rbrakk> \<Longrightarrow> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5122 |
\<bar>(\<Sum>(x,K)\<in>p. content K *\<^sub>R g x) - i\<bar> < e/3" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5123 |
and d2: "\<And>p. \<lbrakk>p tagged_division_of cbox a b; d2 fine p\<rbrakk> \<Longrightarrow> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5124 |
\<bar>(\<Sum>(x,K) \<in> p. content K *\<^sub>R h x) - j\<bar> < e/3" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5125 |
by (metis e has_integral real_norm_def) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5126 |
have "\<bar>(\<Sum>(x,K) \<in> p1. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> p2. content K *\<^sub>R f x)\<bar> < e" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5127 |
if p1: "p1 tagged_division_of cbox a b" and 11: "d1 fine p1" and 21: "d2 fine p1" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5128 |
and p2: "p2 tagged_division_of cbox a b" and 12: "d1 fine p2" and 22: "d2 fine p2" for p1 p2 |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5129 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5130 |
have *: "\<And>g1 g2 h1 h2 f1 f2. |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5131 |
\<lbrakk>\<bar>g2 - i\<bar> < e/3; \<bar>g1 - i\<bar> < e/3; \<bar>h2 - j\<bar> < e/3; \<bar>h1 - j\<bar> < e/3; |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5132 |
g1 - h2 \<le> f1 - f2; f1 - f2 \<le> h1 - g2\<rbrakk> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5133 |
\<Longrightarrow> \<bar>f1 - f2\<bar> < e" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5134 |
using \<open>e > 0\<close> ij by arith |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5135 |
have 0: "(\<Sum>(x, k)\<in>p1. content k *\<^sub>R f x) - (\<Sum>(x, k)\<in>p1. content k *\<^sub>R g x) \<ge> 0" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5136 |
"0 \<le> (\<Sum>(x, k)\<in>p2. content k *\<^sub>R h x) - (\<Sum>(x, k)\<in>p2. content k *\<^sub>R f x)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5137 |
"(\<Sum>(x, k)\<in>p2. content k *\<^sub>R f x) - (\<Sum>(x, k)\<in>p2. content k *\<^sub>R g x) \<ge> 0" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5138 |
"0 \<le> (\<Sum>(x, k)\<in>p1. content k *\<^sub>R h x) - (\<Sum>(x, k)\<in>p1. content k *\<^sub>R f x)" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5139 |
unfolding sum_subtractf[symmetric] |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5140 |
apply (auto intro!: sum_nonneg) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5141 |
apply (meson fgh measure_nonneg mult_left_mono tag_in_interval that sum_nonneg)+ |
53634 | 5142 |
done |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5143 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5144 |
proof (rule *) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5145 |
show "\<bar>(\<Sum>(x,K) \<in> p2. content K *\<^sub>R g x) - i\<bar> < e/3" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5146 |
by (rule d1[OF p2 12]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5147 |
show "\<bar>(\<Sum>(x,K) \<in> p1. content K *\<^sub>R g x) - i\<bar> < e/3" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5148 |
by (rule d1[OF p1 11]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5149 |
show "\<bar>(\<Sum>(x,K) \<in> p2. content K *\<^sub>R h x) - j\<bar> < e/3" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5150 |
by (rule d2[OF p2 22]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5151 |
show "\<bar>(\<Sum>(x,K) \<in> p1. content K *\<^sub>R h x) - j\<bar> < e/3" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5152 |
by (rule d2[OF p1 21]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5153 |
qed (use 0 in auto) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5154 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5155 |
then show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5156 |
by (rule_tac x="\<lambda>x. d1 x \<inter> d2 x" in exI) |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5157 |
(auto simp: fine_Int intro: \<open>gauge d1\<close> \<open>gauge d2\<close> d1 d2) |
53634 | 5158 |
qed |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5159 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5160 |
by (simp add: integrable_Cauchy) |
53634 | 5161 |
qed |
53399 | 5162 |
|
53638 | 5163 |
lemma integrable_straddle: |
56188 | 5164 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5165 |
assumes "\<And>e. e>0 \<Longrightarrow> \<exists>g h i j. (g has_integral i) s \<and> (h has_integral j) s \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5166 |
\<bar>i - j\<bar> < e \<and> (\<forall>x\<in>s. g x \<le> f x \<and> f x \<le> h x)" |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5167 |
shows "f integrable_on s" |
53638 | 5168 |
proof - |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5169 |
let ?fs = "(\<lambda>x. if x \<in> s then f x else 0)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5170 |
have "?fs integrable_on cbox a b" for a b |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5171 |
proof (rule integrable_straddle_interval) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5172 |
fix e::real |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5173 |
assume "e > 0" |
53638 | 5174 |
then have *: "e/4 > 0" |
5175 |
by auto |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5176 |
with assms obtain g h i j where g: "(g has_integral i) s" and h: "(h has_integral j) s" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5177 |
and ij: "\<bar>i - j\<bar> < e/4" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5178 |
and fgh: "\<And>x. x \<in> s \<Longrightarrow> g x \<le> f x \<and> f x \<le> h x" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5179 |
by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5180 |
let ?gs = "(\<lambda>x. if x \<in> s then g x else 0)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5181 |
let ?hs = "(\<lambda>x. if x \<in> s then h x else 0)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5182 |
obtain Bg where Bg: "\<And>a b. ball 0 Bg \<subseteq> cbox a b \<Longrightarrow> \<bar>integral (cbox a b) ?gs - i\<bar> < e/4" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5183 |
and int_g: "\<And>a b. ?gs integrable_on cbox a b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5184 |
using g * unfolding has_integral_alt' real_norm_def by meson |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5185 |
obtain Bh where |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5186 |
Bh: "\<And>a b. ball 0 Bh \<subseteq> cbox a b \<Longrightarrow> \<bar>integral (cbox a b) ?hs - j\<bar> < e/4" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5187 |
and int_h: "\<And>a b. ?hs integrable_on cbox a b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5188 |
using h * unfolding has_integral_alt' real_norm_def by meson |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5189 |
define c where "c = (\<Sum>i\<in>Basis. min (a\<bullet>i) (- (max Bg Bh)) *\<^sub>R i)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5190 |
define d where "d = (\<Sum>i\<in>Basis. max (b\<bullet>i) (max Bg Bh) *\<^sub>R i)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5191 |
have "\<lbrakk>norm (0 - x) < Bg; i \<in> Basis\<rbrakk> \<Longrightarrow> c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" for x i |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5192 |
using Basis_le_norm[of i x] unfolding c_def d_def by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5193 |
then have ballBg: "ball 0 Bg \<subseteq> cbox c d" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5194 |
by (auto simp: mem_box dist_norm) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5195 |
have "\<lbrakk>norm (0 - x) < Bh; i \<in> Basis\<rbrakk> \<Longrightarrow> c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" for x i |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5196 |
using Basis_le_norm[of i x] unfolding c_def d_def by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5197 |
then have ballBh: "ball 0 Bh \<subseteq> cbox c d" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5198 |
by (auto simp: mem_box dist_norm) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5199 |
have ab_cd: "cbox a b \<subseteq> cbox c d" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5200 |
by (auto simp: c_def d_def subset_box_imp) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5201 |
have **: "\<And>ch cg ag ah::real. \<lbrakk>\<bar>ah - ag\<bar> \<le> \<bar>ch - cg\<bar>; \<bar>cg - i\<bar> < e/4; \<bar>ch - j\<bar> < e/4\<rbrakk> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5202 |
\<Longrightarrow> \<bar>ag - ah\<bar> < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5203 |
using ij by arith |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5204 |
show "\<exists>g h i j. (g has_integral i) (cbox a b) \<and> (h has_integral j) (cbox a b) \<and> \<bar>i - j\<bar> < e \<and> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5205 |
(\<forall>x\<in>cbox a b. g x \<le> (if x \<in> s then f x else 0) \<and> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5206 |
(if x \<in> s then f x else 0) \<le> h x)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5207 |
proof (intro exI ballI conjI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5208 |
have eq: "\<And>x f g. (if x \<in> s then f x else 0) - (if x \<in> s then g x else 0) = |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5209 |
(if x \<in> s then f x - g x else (0::real))" |
53638 | 5210 |
by auto |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5211 |
have int_hg: "(\<lambda>x. if x \<in> s then h x - g x else 0) integrable_on cbox a b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5212 |
"(\<lambda>x. if x \<in> s then h x - g x else 0) integrable_on cbox c d" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5213 |
by (metis (no_types) integrable_diff g h has_integral_integrable integrable_altD(1))+ |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5214 |
show "(?gs has_integral integral (cbox a b) ?gs) (cbox a b)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5215 |
"(?hs has_integral integral (cbox a b) ?hs) (cbox a b)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5216 |
by (intro integrable_integral int_g int_h)+ |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5217 |
then have "integral (cbox a b) ?gs \<le> integral (cbox a b) ?hs" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5218 |
apply (rule has_integral_le) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5219 |
using fgh by force |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5220 |
then have "0 \<le> integral (cbox a b) ?hs - integral (cbox a b) ?gs" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5221 |
by simp |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5222 |
then have "\<bar>integral (cbox a b) ?hs - integral (cbox a b) ?gs\<bar> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5223 |
\<le> \<bar>integral (cbox c d) ?hs - integral (cbox c d) ?gs\<bar>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5224 |
apply (simp add: integral_diff [symmetric] int_g int_h) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5225 |
apply (subst abs_of_nonneg[OF integral_nonneg[OF integrable_diff, OF int_h int_g]]) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5226 |
using fgh apply (force simp: eq intro!: integral_subset_le [OF ab_cd int_hg])+ |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5227 |
done |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5228 |
then show "\<bar>integral (cbox a b) ?gs - integral (cbox a b) ?hs\<bar> < e" |
53638 | 5229 |
apply (rule **) |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5230 |
apply (rule Bg ballBg Bh ballBh)+ |
53638 | 5231 |
done |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5232 |
show "\<And>x. x \<in> cbox a b \<Longrightarrow> ?gs x \<le> ?fs x" "\<And>x. x \<in> cbox a b \<Longrightarrow> ?fs x \<le> ?hs x" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5233 |
using fgh by auto |
53638 | 5234 |
qed |
5235 |
qed |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5236 |
then have int_f: "?fs integrable_on cbox a b" for a b |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5237 |
by simp |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5238 |
have "\<exists>B>0. \<forall>a b c d. |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5239 |
ball 0 B \<subseteq> cbox a b \<and> ball 0 B \<subseteq> cbox c d \<longrightarrow> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5240 |
abs (integral (cbox a b) ?fs - integral (cbox c d) ?fs) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5241 |
if "0 < e" for e |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5242 |
proof - |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5243 |
have *: "e/3 > 0" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5244 |
using that by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5245 |
with assms obtain g h i j where g: "(g has_integral i) s" and h: "(h has_integral j) s" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5246 |
and ij: "\<bar>i - j\<bar> < e/3" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5247 |
and fgh: "\<And>x. x \<in> s \<Longrightarrow> g x \<le> f x \<and> f x \<le> h x" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5248 |
by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5249 |
let ?gs = "(\<lambda>x. if x \<in> s then g x else 0)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5250 |
let ?hs = "(\<lambda>x. if x \<in> s then h x else 0)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5251 |
obtain Bg where "Bg > 0" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5252 |
and Bg: "\<And>a b. ball 0 Bg \<subseteq> cbox a b \<Longrightarrow> \<bar>integral (cbox a b) ?gs - i\<bar> < e/3" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5253 |
and int_g: "\<And>a b. ?gs integrable_on cbox a b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5254 |
using g * unfolding has_integral_alt' real_norm_def by meson |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5255 |
obtain Bh where "Bh > 0" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5256 |
and Bh: "\<And>a b. ball 0 Bh \<subseteq> cbox a b \<Longrightarrow> \<bar>integral (cbox a b) ?hs - j\<bar> < e/3" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5257 |
and int_h: "\<And>a b. ?hs integrable_on cbox a b" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5258 |
using h * unfolding has_integral_alt' real_norm_def by meson |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5259 |
{ fix a b c d :: 'n |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5260 |
assume as: "ball 0 (max Bg Bh) \<subseteq> cbox a b" "ball 0 (max Bg Bh) \<subseteq> cbox c d" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5261 |
have **: "ball 0 Bg \<subseteq> ball (0::'n) (max Bg Bh)" "ball 0 Bh \<subseteq> ball (0::'n) (max Bg Bh)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5262 |
by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5263 |
have *: "\<And>ga gc ha hc fa fc. \<lbrakk>\<bar>ga - i\<bar> < e/3; \<bar>gc - i\<bar> < e/3; \<bar>ha - j\<bar> < e/3; |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5264 |
\<bar>hc - j\<bar> < e/3; ga \<le> fa; fa \<le> ha; gc \<le> fc; fc \<le> hc\<rbrakk> \<Longrightarrow> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5265 |
\<bar>fa - fc\<bar> < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5266 |
using ij by arith |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5267 |
have "abs (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - integral (cbox c d) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5268 |
(\<lambda>x. if x \<in> s then f x else 0)) < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5269 |
proof (rule *) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5270 |
show "\<bar>integral (cbox a b) ?gs - i\<bar> < e/3" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5271 |
using "**" Bg as by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5272 |
show "\<bar>integral (cbox c d) ?gs - i\<bar> < e/3" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5273 |
using "**" Bg as by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5274 |
show "\<bar>integral (cbox a b) ?hs - j\<bar> < e/3" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5275 |
using "**" Bh as by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5276 |
show "\<bar>integral (cbox c d) ?hs - j\<bar> < e/3" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5277 |
using "**" Bh as by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5278 |
qed (use int_f int_g int_h fgh in \<open>simp_all add: integral_le\<close>) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5279 |
} |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5280 |
then show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5281 |
apply (rule_tac x="max Bg Bh" in exI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5282 |
using \<open>Bg > 0\<close> by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5283 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5284 |
then show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5285 |
unfolding integrable_alt[of f] real_norm_def by (blast intro: int_f) |
53638 | 5286 |
qed |
5287 |
||
5288 |
||
60420 | 5289 |
subsection \<open>Adding integrals over several sets\<close> |
53638 | 5290 |
|
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5291 |
lemma has_integral_Un: |
56188 | 5292 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5293 |
assumes f: "(f has_integral i) s" "(f has_integral j) t" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5294 |
and neg: "negligible (s \<inter> t)" |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5295 |
shows "(f has_integral (i + j)) (s \<union> t)" |
53638 | 5296 |
proof - |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
5297 |
note * = has_integral_restrict_UNIV[symmetric, of f] |
53638 | 5298 |
show ?thesis |
5299 |
unfolding * |
|
5300 |
apply (rule has_integral_spike[OF assms(3)]) |
|
5301 |
defer |
|
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5302 |
apply (rule has_integral_add[OF f[unfolded *]]) |
53638 | 5303 |
apply auto |
5304 |
done |
|
5305 |
qed |
|
5306 |
||
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5307 |
lemma integrable_Un: |
63296 | 5308 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b :: banach" |
5309 |
assumes "negligible (A \<inter> B)" "f integrable_on A" "f integrable_on B" |
|
5310 |
shows "f integrable_on (A \<union> B)" |
|
5311 |
proof - |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
5312 |
from assms obtain y z where "(f has_integral y) A" "(f has_integral z) B" |
63296 | 5313 |
by (auto simp: integrable_on_def) |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5314 |
from has_integral_Un[OF this assms(1)] show ?thesis by (auto simp: integrable_on_def) |
63296 | 5315 |
qed |
5316 |
||
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5317 |
lemma integrable_Un': |
63296 | 5318 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b :: banach" |
5319 |
assumes "f integrable_on A" "f integrable_on B" "negligible (A \<inter> B)" "C = A \<union> B" |
|
5320 |
shows "f integrable_on C" |
|
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5321 |
using integrable_Un[of A B f] assms by simp |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5322 |
|
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5323 |
lemma has_integral_Union: |
56188 | 5324 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5325 |
assumes "finite t" |
5326 |
and "\<forall>s\<in>t. (f has_integral (i s)) s" |
|
5327 |
and "\<forall>s\<in>t. \<forall>s'\<in>t. s \<noteq> s' \<longrightarrow> negligible (s \<inter> s')" |
|
64267 | 5328 |
shows "(f has_integral (sum i t)) (\<Union>t)" |
53638 | 5329 |
proof - |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
5330 |
note * = has_integral_restrict_UNIV[symmetric, of f] |
53638 | 5331 |
have **: "negligible (\<Union>((\<lambda>(a,b). a \<inter> b) ` {(a,b). a \<in> t \<and> b \<in> {y. y \<in> t \<and> a \<noteq> y}}))" |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
5332 |
apply (rule negligible_Union) |
53638 | 5333 |
apply (rule finite_imageI) |
5334 |
apply (rule finite_subset[of _ "t \<times> t"]) |
|
5335 |
defer |
|
5336 |
apply (rule finite_cartesian_product[OF assms(1,1)]) |
|
5337 |
using assms(3) |
|
5338 |
apply auto |
|
5339 |
done |
|
5340 |
note assms(2)[unfolded *] |
|
64267 | 5341 |
note has_integral_sum[OF assms(1) this] |
61165 | 5342 |
then show ?thesis |
5343 |
unfolding * |
|
5344 |
apply - |
|
5345 |
apply (rule has_integral_spike[OF **]) |
|
5346 |
defer |
|
5347 |
apply assumption |
|
5348 |
apply safe |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5349 |
proof goal_cases |
61167 | 5350 |
case prems: (1 x) |
53638 | 5351 |
then show ?case |
5352 |
proof (cases "x \<in> \<Union>t") |
|
5353 |
case True |
|
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5354 |
then obtain s where "s \<in> t" "x \<in> s" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5355 |
by blast |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5356 |
moreover then have "\<forall>b\<in>t. x \<in> b \<longleftrightarrow> b = s" |
61167 | 5357 |
using prems(3) by blast |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5358 |
ultimately show ?thesis |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5359 |
by (simp add: sum.delta[OF assms(1)]) |
53638 | 5360 |
qed auto |
5361 |
qed |
|
5362 |
qed |
|
5363 |
||
5364 |
||
60420 | 5365 |
text \<open>In particular adding integrals over a division, maybe not of an interval.\<close> |
53638 | 5366 |
|
5367 |
lemma has_integral_combine_division: |
|
56188 | 5368 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5369 |
assumes "d division_of S" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5370 |
and "\<And>k. k \<in> d \<Longrightarrow> (f has_integral (i k)) k" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5371 |
shows "(f has_integral (sum i d)) S" |
53638 | 5372 |
proof - |
5373 |
note d = division_ofD[OF assms(1)] |
|
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5374 |
have neg: "negligible (S \<inter> s')" if "S \<in> d" "s' \<in> d" "S \<noteq> s'" for S s' |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5375 |
proof - |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5376 |
obtain a c b d where obt: "S = cbox a b" "s' = cbox c d" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5377 |
by (meson \<open>S \<in> d\<close> \<open>s' \<in> d\<close> d(4)) |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5378 |
from d(5)[OF that] show ?thesis |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5379 |
unfolding obt interior_cbox |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5380 |
by (metis (no_types, lifting) Diff_empty Int_interval box_Int_box negligible_frontier_interval) |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5381 |
qed |
53638 | 5382 |
show ?thesis |
5383 |
unfolding d(6)[symmetric] |
|
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5384 |
by (auto intro: d neg assms has_integral_Union) |
53638 | 5385 |
qed |
5386 |
||
5387 |
lemma integral_combine_division_bottomup: |
|
56188 | 5388 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5389 |
assumes "d division_of S" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5390 |
and "\<And>k. k \<in> d \<Longrightarrow> f integrable_on k" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5391 |
shows "integral S f = sum (\<lambda>i. integral i f) d" |
53638 | 5392 |
apply (rule integral_unique) |
5393 |
apply (rule has_integral_combine_division[OF assms(1)]) |
|
5394 |
using assms(2) |
|
5395 |
unfolding has_integral_integral |
|
5396 |
apply assumption |
|
5397 |
done |
|
5398 |
||
5399 |
lemma has_integral_combine_division_topdown: |
|
56188 | 5400 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5401 |
assumes "f integrable_on S" |
53638 | 5402 |
and "d division_of k" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5403 |
and "k \<subseteq> S" |
64267 | 5404 |
shows "(f has_integral (sum (\<lambda>i. integral i f) d)) k" |
53638 | 5405 |
apply (rule has_integral_combine_division[OF assms(2)]) |
5406 |
unfolding has_integral_integral[symmetric] |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5407 |
proof goal_cases |
61165 | 5408 |
case (1 k) |
53638 | 5409 |
from division_ofD(2,4)[OF assms(2) this] |
5410 |
show ?case |
|
5411 |
apply safe |
|
56188 | 5412 |
apply (rule integrable_on_subcbox) |
53638 | 5413 |
apply (rule assms) |
5414 |
using assms(3) |
|
5415 |
apply auto |
|
5416 |
done |
|
5417 |
qed |
|
5418 |
||
5419 |
lemma integral_combine_division_topdown: |
|
56188 | 5420 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5421 |
assumes "f integrable_on S" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5422 |
and "d division_of S" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5423 |
shows "integral S f = sum (\<lambda>i. integral i f) d" |
53638 | 5424 |
apply (rule integral_unique) |
5425 |
apply (rule has_integral_combine_division_topdown) |
|
5426 |
using assms |
|
5427 |
apply auto |
|
5428 |
done |
|
5429 |
||
5430 |
lemma integrable_combine_division: |
|
56188 | 5431 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5432 |
assumes "d division_of S" |
53638 | 5433 |
and "\<forall>i\<in>d. f integrable_on i" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5434 |
shows "f integrable_on S" |
53638 | 5435 |
using assms(2) |
5436 |
unfolding integrable_on_def |
|
5437 |
by (metis has_integral_combine_division[OF assms(1)]) |
|
5438 |
||
5439 |
lemma integrable_on_subdivision: |
|
56188 | 5440 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5441 |
assumes "d division_of i" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5442 |
and "f integrable_on S" |
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5443 |
and "i \<subseteq> S" |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5444 |
shows "f integrable_on i" |
53638 | 5445 |
apply (rule integrable_combine_division assms)+ |
61165 | 5446 |
apply safe |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5447 |
proof goal_cases |
61165 | 5448 |
case 1 |
53638 | 5449 |
note division_ofD(2,4)[OF assms(1) this] |
5450 |
then show ?case |
|
5451 |
apply safe |
|
56188 | 5452 |
apply (rule integrable_on_subcbox[OF assms(2)]) |
53638 | 5453 |
using assms(3) |
5454 |
apply auto |
|
5455 |
done |
|
5456 |
qed |
|
5457 |
||
5458 |
||
60420 | 5459 |
subsection \<open>Also tagged divisions\<close> |
53638 | 5460 |
|
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5461 |
lemma has_integral_iff: "(f has_integral i) S \<longleftrightarrow> (f integrable_on S \<and> integral S f = i)" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5462 |
by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5463 |
|
53638 | 5464 |
lemma has_integral_combine_tagged_division: |
56188 | 5465 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5466 |
assumes "p tagged_division_of S" |
53638 | 5467 |
and "\<forall>(x,k) \<in> p. (f has_integral (i k)) k" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5468 |
shows "(f has_integral (\<Sum>(x,k)\<in>p. i k)) S" |
53638 | 5469 |
proof - |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5470 |
have *: "(f has_integral (\<Sum>k\<in>snd`p. integral k f)) S" |
53638 | 5471 |
using assms(2) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5472 |
apply (intro has_integral_combine_division) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5473 |
apply (auto simp: has_integral_integral[symmetric] intro: division_of_tagged_division[OF assms(1)]) |
53638 | 5474 |
apply auto |
5475 |
done |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5476 |
also have "(\<Sum>k\<in>snd`p. integral k f) = (\<Sum>(x, k)\<in>p. integral k f)" |
64267 | 5477 |
by (intro sum.over_tagged_division_lemma[OF assms(1), symmetric] integral_null) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5478 |
(simp add: content_eq_0_interior) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5479 |
finally show ?thesis |
64267 | 5480 |
using assms by (auto simp add: has_integral_iff intro!: sum.cong) |
53638 | 5481 |
qed |
5482 |
||
5483 |
lemma integral_combine_tagged_division_bottomup: |
|
56188 | 5484 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
5485 |
assumes "p tagged_division_of (cbox a b)" |
|
53638 | 5486 |
and "\<forall>(x,k)\<in>p. f integrable_on k" |
64267 | 5487 |
shows "integral (cbox a b) f = sum (\<lambda>(x,k). integral k f) p" |
53638 | 5488 |
apply (rule integral_unique) |
5489 |
apply (rule has_integral_combine_tagged_division[OF assms(1)]) |
|
5490 |
using assms(2) |
|
5491 |
apply auto |
|
5492 |
done |
|
5493 |
||
5494 |
lemma has_integral_combine_tagged_division_topdown: |
|
56188 | 5495 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
5496 |
assumes "f integrable_on cbox a b" |
|
5497 |
and "p tagged_division_of (cbox a b)" |
|
64267 | 5498 |
shows "(f has_integral (sum (\<lambda>(x,k). integral k f) p)) (cbox a b)" |
53638 | 5499 |
apply (rule has_integral_combine_tagged_division[OF assms(2)]) |
61165 | 5500 |
apply safe |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5501 |
proof goal_cases |
61165 | 5502 |
case 1 |
53638 | 5503 |
note tagged_division_ofD(3-4)[OF assms(2) this] |
5504 |
then show ?case |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
5505 |
using integrable_subinterval[OF assms(1)] by blast |
53638 | 5506 |
qed |
5507 |
||
5508 |
lemma integral_combine_tagged_division_topdown: |
|
56188 | 5509 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
5510 |
assumes "f integrable_on cbox a b" |
|
5511 |
and "p tagged_division_of (cbox a b)" |
|
64267 | 5512 |
shows "integral (cbox a b) f = sum (\<lambda>(x,k). integral k f) p" |
53638 | 5513 |
apply (rule integral_unique) |
5514 |
apply (rule has_integral_combine_tagged_division_topdown) |
|
5515 |
using assms |
|
5516 |
apply auto |
|
5517 |
done |
|
5518 |
||
5519 |
||
60420 | 5520 |
subsection \<open>Henstock's lemma\<close> |
53638 | 5521 |
|
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5522 |
lemma Henstock_lemma_part1: |
56188 | 5523 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5524 |
assumes intf: "f integrable_on cbox a b" |
53638 | 5525 |
and "e > 0" |
5526 |
and "gauge d" |
|
66437 | 5527 |
and less_e: "\<And>p. \<lbrakk>p tagged_division_of (cbox a b); d fine p\<rbrakk> \<Longrightarrow> |
5528 |
norm (sum (\<lambda>(x,K). content K *\<^sub>R f x) p - integral(cbox a b) f) < e" |
|
56188 | 5529 |
and p: "p tagged_partial_division_of (cbox a b)" "d fine p" |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5530 |
shows "norm (sum (\<lambda>(x,K). content K *\<^sub>R f x - integral K f) p) \<le> e" (is "?lhs \<le> e") |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
5531 |
proof (rule field_le_epsilon) |
53638 | 5532 |
fix k :: real |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5533 |
assume "k > 0" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5534 |
let ?SUM = "\<lambda>p. (\<Sum>(x,K) \<in> p. content K *\<^sub>R f x)" |
53638 | 5535 |
note p' = tagged_partial_division_ofD[OF p(1)] |
56188 | 5536 |
have "\<Union>(snd ` p) \<subseteq> cbox a b" |
53638 | 5537 |
using p'(3) by fastforce |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5538 |
then obtain q where q: "snd ` p \<subseteq> q" and qdiv: "q division_of cbox a b" |
66512
89b6455b63b6
starting to unscramble bounded_variation_absolutely_integrable_interval
paulson <lp15@cam.ac.uk>
parents:
66508
diff
changeset
|
5539 |
by (meson p(1) partial_division_extend_interval partial_division_of_tagged_division) |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5540 |
note q' = division_ofD[OF qdiv] |
63040 | 5541 |
define r where "r = q - snd ` p" |
53638 | 5542 |
have "snd ` p \<inter> r = {}" |
5543 |
unfolding r_def by auto |
|
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5544 |
have "finite r" |
53638 | 5545 |
using q' unfolding r_def by auto |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5546 |
have "\<exists>p. p tagged_division_of i \<and> d fine p \<and> |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5547 |
norm (?SUM p - integral i f) < k / (real (card r) + 1)" |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5548 |
if "i\<in>r" for i |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5549 |
proof - |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5550 |
have gt0: "k / (real (card r) + 1) > 0" using \<open>k > 0\<close> by simp |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5551 |
have i: "i \<in> q" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5552 |
using that unfolding r_def by auto |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5553 |
then obtain u v where uv: "i = cbox u v" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5554 |
using q'(4) by blast |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5555 |
then have "cbox u v \<subseteq> cbox a b" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5556 |
using i q'(2) by auto |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5557 |
then have "f integrable_on cbox u v" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5558 |
by (rule integrable_subinterval[OF intf]) |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5559 |
with integrable_integral[OF this, unfolded has_integral[of f]] |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5560 |
obtain dd where "gauge dd" and dd: |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5561 |
"\<And>\<D>. \<lbrakk>\<D> tagged_division_of cbox u v; dd fine \<D>\<rbrakk> \<Longrightarrow> |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5562 |
norm (?SUM \<D> - integral (cbox u v) f) < k / (real (card r) + 1)" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5563 |
using gt0 by auto |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5564 |
with gauge_Int[OF \<open>gauge d\<close> \<open>gauge dd\<close>] |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5565 |
obtain qq where qq: "qq tagged_division_of cbox u v" "(\<lambda>x. d x \<inter> dd x) fine qq" |
66513
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5566 |
using fine_division_exists by blast |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5567 |
with dd[of qq] show ?thesis |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5568 |
by (auto simp: fine_Int uv) |
53638 | 5569 |
qed |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5570 |
then obtain qq where qq: "\<And>i. i \<in> r \<Longrightarrow> qq i tagged_division_of i \<and> |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5571 |
d fine qq i \<and> norm (?SUM (qq i) - integral i f) < k / (real (card r) + 1)" |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5572 |
by metis |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5573 |
|
53638 | 5574 |
let ?p = "p \<union> \<Union>(qq ` r)" |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5575 |
have "norm (?SUM ?p - integral (cbox a b) f) < e" |
66437 | 5576 |
proof (rule less_e) |
53638 | 5577 |
show "d fine ?p" |
66437 | 5578 |
by (metis (mono_tags, hide_lams) qq fine_Un fine_Union imageE p(2)) |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5579 |
note ptag = tagged_partial_division_of_Union_self[OF p(1)] |
52141
eff000cab70f
weaker precendence of syntax for big intersection and union on sets
haftmann
parents:
51642
diff
changeset
|
5580 |
have "p \<union> \<Union>(qq ` r) tagged_division_of \<Union>(snd ` p) \<union> \<Union>r" |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5581 |
proof (rule tagged_division_Un[OF ptag tagged_division_Union [OF \<open>finite r\<close>]]) |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5582 |
show "\<And>i. i \<in> r \<Longrightarrow> qq i tagged_division_of i" |
53638 | 5583 |
using qq by auto |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5584 |
show "\<And>i1 i2. \<lbrakk>i1 \<in> r; i2 \<in> r; i1 \<noteq> i2\<rbrakk> \<Longrightarrow> interior i1 \<inter> interior i2 = {}" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5585 |
by (simp add: q'(5) r_def) |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5586 |
show "interior (UNION p snd) \<inter> interior (\<Union>r) = {}" |
66299
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5587 |
proof (rule Int_interior_Union_intervals [OF \<open>finite r\<close>]) |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5588 |
show "open (interior (UNION p snd))" |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5589 |
by blast |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5590 |
show "\<And>T. T \<in> r \<Longrightarrow> \<exists>a b. T = cbox a b" |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5591 |
by (simp add: q'(4) r_def) |
66299
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5592 |
have "finite (snd ` p)" |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5593 |
by (simp add: p'(1)) |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5594 |
then show "\<And>T. T \<in> r \<Longrightarrow> interior (UNION p snd) \<inter> interior T = {}" |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5595 |
apply (subst Int_commute) |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5596 |
apply (rule Int_interior_Union_intervals) |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5597 |
using r_def q'(5) q(1) apply auto |
66299
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5598 |
by (simp add: p'(4)) |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5599 |
qed |
53638 | 5600 |
qed |
56188 | 5601 |
moreover have "\<Union>(snd ` p) \<union> \<Union>r = cbox a b" and "{qq i |i. i \<in> r} = qq ` r" |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5602 |
using qdiv q unfolding Union_Un_distrib[symmetric] r_def by auto |
56188 | 5603 |
ultimately show "?p tagged_division_of (cbox a b)" |
53638 | 5604 |
by fastforce |
5605 |
qed |
|
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5606 |
then have "norm (?SUM p + (?SUM (\<Union>(qq ` r))) - integral (cbox a b) f) < e" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5607 |
proof (subst sum.union_inter_neutral[symmetric, OF \<open>finite p\<close>], safe) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5608 |
show "content L *\<^sub>R f x = 0" if "(x, L) \<in> p" "(x, L) \<in> qq K" "K \<in> r" for x K L |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5609 |
proof - |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5610 |
obtain u v where uv: "L = cbox u v" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5611 |
using \<open>(x,L) \<in> p\<close> p'(4) by blast |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5612 |
have "L \<subseteq> K" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5613 |
using qq[OF that(3)] tagged_division_ofD(3) \<open>(x,L) \<in> qq K\<close> by metis |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5614 |
have "L \<in> snd ` p" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5615 |
using \<open>(x,L) \<in> p\<close> image_iff by fastforce |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5616 |
then have "L \<in> q" "K \<in> q" "L \<noteq> K" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5617 |
using that(1,3) q(1) unfolding r_def by auto |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5618 |
with q'(5) have "interior L = {}" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5619 |
using interior_mono[OF \<open>L \<subseteq> K\<close>] by blast |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5620 |
then show "content L *\<^sub>R f x = 0" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5621 |
unfolding uv content_eq_0_interior[symmetric] by auto |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5622 |
qed |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5623 |
show "finite (UNION r qq)" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5624 |
by (meson finite_UN qq \<open>finite r\<close> tagged_division_of_finite) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5625 |
qed |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5626 |
moreover have "content M *\<^sub>R f x = 0" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5627 |
if x: "(x,M) \<in> qq K" "(x,M) \<in> qq L" and KL: "qq K \<noteq> qq L" and r: "K \<in> r" "L \<in> r" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5628 |
for x M K L |
53638 | 5629 |
proof - |
5630 |
note kl = tagged_division_ofD(3,4)[OF qq[THEN conjunct1]] |
|
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5631 |
obtain u v where uv: "M = cbox u v" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5632 |
using \<open>(x, M) \<in> qq L\<close> \<open>L \<in> r\<close> kl(2) by blast |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5633 |
have empty: "interior (K \<inter> L) = {}" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5634 |
by (metis DiffD1 interior_Int q'(5) r_def KL r) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5635 |
have "interior M = {}" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5636 |
by (metis (no_types, lifting) Int_assoc empty inf.absorb_iff2 interior_Int kl(1) subset_empty x r) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5637 |
then show "content M *\<^sub>R f x = 0" |
53638 | 5638 |
unfolding uv content_eq_0_interior[symmetric] |
5639 |
by auto |
|
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5640 |
qed |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5641 |
ultimately have "norm (?SUM p + sum ?SUM (qq ` r) - integral (cbox a b) f) < e" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5642 |
apply (subst (asm) sum.Union_comp) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5643 |
using qq by (force simp: split_paired_all)+ |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5644 |
moreover have "content M *\<^sub>R f x = 0" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5645 |
if "K \<in> r" "L \<in> r" "K \<noteq> L" "qq K = qq L" "(x, M) \<in> qq K" for K L x M |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5646 |
using tagged_division_ofD(6) qq that by (metis (no_types, lifting)) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5647 |
ultimately have less_e: "norm (?SUM p + sum (?SUM \<circ> qq) r - integral (cbox a b) f) < e" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5648 |
apply (subst (asm) sum.reindex_nontrivial [OF \<open>finite r\<close>]) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5649 |
apply (auto simp: split_paired_all sum.neutral) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5650 |
done |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5651 |
have norm_le: "norm (cp - ip) \<le> e + k" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5652 |
if "norm ((cp + cr) - i) < e" "norm (cr - ir) < k" "ip + ir = i" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5653 |
for ir ip i cr cp::'a |
53638 | 5654 |
proof - |
61165 | 5655 |
from that show ?thesis |
53638 | 5656 |
using norm_triangle_le[of "cp + cr - i" "- (cr - ir)"] |
61165 | 5657 |
unfolding that(3)[symmetric] norm_minus_cancel |
53638 | 5658 |
by (auto simp add: algebra_simps) |
5659 |
qed |
|
53399 | 5660 |
|
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5661 |
have "?lhs = norm (?SUM p - (\<Sum>(x, k)\<in>p. integral k f))" |
64267 | 5662 |
unfolding split_def sum_subtractf .. |
53638 | 5663 |
also have "\<dots> \<le> e + k" |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5664 |
proof (rule norm_le[OF less_e]) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5665 |
have lessk: "k * real (card r) / (1 + real (card r)) < k" |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5666 |
using \<open>k>0\<close> by (auto simp add: field_simps) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5667 |
have "norm (sum (?SUM \<circ> qq) r - (\<Sum>k\<in>r. integral k f)) \<le> (\<Sum>x\<in>r. k / (real (card r) + 1))" |
66513
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5668 |
unfolding sum_subtractf[symmetric] by (force dest: qq intro!: sum_norm_le) |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5669 |
also have "... < k" |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5670 |
by (simp add: lessk add.commute mult.commute) |
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5671 |
finally show "norm (sum (?SUM \<circ> qq) r - (\<Sum>k\<in>r. integral k f)) < k" . |
61167 | 5672 |
next |
66513
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5673 |
from q(1) have [simp]: "snd ` p \<union> q = q" by auto |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5674 |
have "integral l f = 0" |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5675 |
if inp: "(x, l) \<in> p" "(y, m) \<in> p" and ne: "(x, l) \<noteq> (y, m)" and "l = m" for x l y m |
53638 | 5676 |
proof - |
66513
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5677 |
obtain u v where uv: "l = cbox u v" |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5678 |
using inp p'(4) by blast |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5679 |
have "content (cbox u v) = 0" |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5680 |
unfolding content_eq_0_interior using that p(1) uv by auto |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5681 |
then show ?thesis |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5682 |
using uv by blast |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5683 |
qed |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5684 |
then have "(\<Sum>(x, k)\<in>p. integral k f) = (\<Sum>k\<in>snd ` p. integral k f)" |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5685 |
apply (subst sum.reindex_nontrivial [OF \<open>finite p\<close>]) |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5686 |
unfolding split_paired_all split_def by auto |
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5687 |
then show "(\<Sum>(x, k)\<in>p. integral k f) + (\<Sum>k\<in>r. integral k f) = integral (cbox a b) f" |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5688 |
unfolding integral_combine_division_topdown[OF intf qdiv] r_def |
66513
ca8b18baf0e0
unscrambling esp of Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66512
diff
changeset
|
5689 |
using q'(1) p'(1) sum.union_disjoint [of "snd ` p" "q - snd ` p", symmetric] |
57418 | 5690 |
by simp |
53638 | 5691 |
qed |
66518
5e65236e95aa
unscrambled Henstock_lemma_part1
paulson <lp15@cam.ac.uk>
parents:
66513
diff
changeset
|
5692 |
finally show "?lhs \<le> e + k" . |
53638 | 5693 |
qed |
5694 |
||
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5695 |
lemma Henstock_lemma_part2: |
56188 | 5696 |
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space" |
66437 | 5697 |
assumes fed: "f integrable_on cbox a b" "e > 0" "gauge d" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5698 |
and less_e: "\<And>\<D>. \<lbrakk>\<D> tagged_division_of (cbox a b); d fine \<D>\<rbrakk> \<Longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5699 |
norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) \<D> - integral (cbox a b) f) < e" |
66437 | 5700 |
and tag: "p tagged_partial_division_of (cbox a b)" |
53638 | 5701 |
and "d fine p" |
64267 | 5702 |
shows "sum (\<lambda>(x,k). norm (content k *\<^sub>R f x - integral k f)) p \<le> 2 * real (DIM('n)) * e" |
66437 | 5703 |
proof - |
5704 |
have "finite p" |
|
5705 |
using tag by blast |
|
5706 |
then show ?thesis |
|
5707 |
unfolding split_def |
|
5708 |
proof (rule sum_norm_allsubsets_bound) |
|
5709 |
fix Q |
|
5710 |
assume Q: "Q \<subseteq> p" |
|
5711 |
then have fine: "d fine Q" |
|
5712 |
by (simp add: \<open>d fine p\<close> fine_subset) |
|
5713 |
show "norm (\<Sum>x\<in>Q. content (snd x) *\<^sub>R f (fst x) - integral (snd x) f) \<le> e" |
|
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5714 |
apply (rule Henstock_lemma_part1[OF fed less_e, unfolded split_def]) |
66437 | 5715 |
using Q tag tagged_partial_division_subset apply (force simp add: fine)+ |
5716 |
done |
|
5717 |
qed |
|
5718 |
qed |
|
53638 | 5719 |
|
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5720 |
lemma Henstock_lemma: |
56188 | 5721 |
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space" |
66437 | 5722 |
assumes intf: "f integrable_on cbox a b" |
53638 | 5723 |
and "e > 0" |
66437 | 5724 |
obtains \<gamma> where "gauge \<gamma>" |
5725 |
and "\<And>p. \<lbrakk>p tagged_partial_division_of (cbox a b); \<gamma> fine p\<rbrakk> \<Longrightarrow> |
|
5726 |
sum (\<lambda>(x,k). norm(content k *\<^sub>R f x - integral k f)) p < e" |
|
53638 | 5727 |
proof - |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5728 |
have *: "e/(2 * (real DIM('n) + 1)) > 0" using \<open>e > 0\<close> by simp |
66437 | 5729 |
with integrable_integral[OF intf, unfolded has_integral] |
5730 |
obtain \<gamma> where "gauge \<gamma>" |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5731 |
and \<gamma>: "\<And>\<D>. \<lbrakk>\<D> tagged_division_of cbox a b; \<gamma> fine \<D>\<rbrakk> \<Longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5732 |
norm ((\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R f x) - integral (cbox a b) f) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5733 |
< e/(2 * (real DIM('n) + 1))" |
66437 | 5734 |
by metis |
53638 | 5735 |
show thesis |
66437 | 5736 |
proof (rule that [OF \<open>gauge \<gamma>\<close>]) |
5737 |
fix p |
|
5738 |
assume p: "p tagged_partial_division_of cbox a b" "\<gamma> fine p" |
|
5739 |
have "(\<Sum>(x,K)\<in>p. norm (content K *\<^sub>R f x - integral K f)) |
|
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5740 |
\<le> 2 * real DIM('n) * (e/(2 * (real DIM('n) + 1)))" |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5741 |
using Henstock_lemma_part2[OF intf * \<open>gauge \<gamma>\<close> \<gamma> p] by metis |
66437 | 5742 |
also have "... < e" |
5743 |
using \<open>e > 0\<close> by (auto simp add: field_simps) |
|
5744 |
finally |
|
5745 |
show "(\<Sum>(x,K)\<in>p. norm (content K *\<^sub>R f x - integral K f)) < e" . |
|
53638 | 5746 |
qed |
5747 |
qed |
|
5748 |
||
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5749 |
|
60420 | 5750 |
subsection \<open>Monotone convergence (bounded interval first)\<close> |
53638 | 5751 |
|
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5752 |
lemma bounded_increasing_convergent: |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5753 |
fixes f :: "nat \<Rightarrow> real" |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5754 |
shows "\<lbrakk>bounded (range f); \<And>n. f n \<le> f (Suc n)\<rbrakk> \<Longrightarrow> \<exists>l. f \<longlonglongrightarrow> l" |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5755 |
using Bseq_mono_convergent[of f] incseq_Suc_iff[of f] |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5756 |
by (auto simp: image_def Bseq_eq_bounded convergent_def incseq_def) |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5757 |
|
53638 | 5758 |
lemma monotone_convergence_interval: |
56188 | 5759 |
fixes f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5760 |
assumes intf: "\<And>k. (f k) integrable_on cbox a b" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5761 |
and le: "\<And>k x. x \<in> cbox a b \<Longrightarrow> (f k x) \<le> f (Suc k) x" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5762 |
and fg: "\<And>x. x \<in> cbox a b \<Longrightarrow> ((\<lambda>k. f k x) \<longlongrightarrow> g x) sequentially" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5763 |
and bou: "bounded (range (\<lambda>k. integral (cbox a b) (f k)))" |
61973 | 5764 |
shows "g integrable_on cbox a b \<and> ((\<lambda>k. integral (cbox a b) (f k)) \<longlongrightarrow> integral (cbox a b) g) sequentially" |
56188 | 5765 |
proof (cases "content (cbox a b) = 0") |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5766 |
case True then show ?thesis |
53638 | 5767 |
by auto |
5768 |
next |
|
5769 |
case False |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5770 |
have fg1: "(f k x) \<le> (g x)" if x: "x \<in> cbox a b" for x k |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5771 |
proof - |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5772 |
have "\<forall>\<^sub>F j in sequentially. f k x \<le> f j x" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5773 |
apply (rule eventually_sequentiallyI [of k]) |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5774 |
using le x apply (force intro: transitive_stepwise_le) |
53638 | 5775 |
done |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5776 |
then show "f k x \<le> g x" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5777 |
using tendsto_lowerbound [OF fg] x trivial_limit_sequentially by blast |
53638 | 5778 |
qed |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5779 |
have int_inc: "\<And>n. integral (cbox a b) (f n) \<le> integral (cbox a b) (f (Suc n))" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5780 |
by (metis integral_le intf le) |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5781 |
then obtain i where i: "(\<lambda>k. integral (cbox a b) (f k)) \<longlonglongrightarrow> i" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5782 |
using bounded_increasing_convergent bou by blast |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5783 |
have "\<And>k. \<forall>\<^sub>F x in sequentially. integral (cbox a b) (f k) \<le> integral (cbox a b) (f x)" |
53638 | 5784 |
unfolding eventually_sequentially |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5785 |
by (force intro: transitive_stepwise_le int_inc) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5786 |
then have i': "\<And>k. (integral(cbox a b) (f k)) \<le> i" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5787 |
using tendsto_le [OF trivial_limit_sequentially i] by blast |
56188 | 5788 |
have "(g has_integral i) (cbox a b)" |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5789 |
unfolding has_integral real_norm_def |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5790 |
proof clarify |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5791 |
fix e::real |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5792 |
assume e: "e > 0" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5793 |
have "\<And>k. (\<exists>\<gamma>. gauge \<gamma> \<and> (\<forall>\<D>. \<D> tagged_division_of (cbox a b) \<and> \<gamma> fine \<D> \<longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5794 |
abs ((\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R f k x) - integral (cbox a b) (f k)) < e/2 ^ (k + 2)))" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5795 |
using intf e by (auto simp: has_integral_integral has_integral) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5796 |
then obtain c where c: "\<And>x. gauge (c x)" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5797 |
"\<And>x \<D>. \<lbrakk>\<D> tagged_division_of cbox a b; c x fine \<D>\<rbrakk> \<Longrightarrow> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5798 |
abs ((\<Sum>(u,K)\<in>\<D>. content K *\<^sub>R f x u) - integral (cbox a b) (f x)) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5799 |
< e/2 ^ (x + 2)" |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5800 |
by metis |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5801 |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5802 |
have "\<exists>r. \<forall>k\<ge>r. 0 \<le> i - (integral (cbox a b) (f k)) \<and> i - (integral (cbox a b) (f k)) < e/4" |
53638 | 5803 |
proof - |
5804 |
have "e/4 > 0" |
|
5805 |
using e by auto |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5806 |
show ?thesis |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5807 |
using LIMSEQ_D [OF i \<open>e/4 > 0\<close>] i' by auto |
53638 | 5808 |
qed |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5809 |
then obtain r where r: "\<And>k. r \<le> k \<Longrightarrow> 0 \<le> i - integral (cbox a b) (f k)" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5810 |
"\<And>k. r \<le> k \<Longrightarrow> i - integral (cbox a b) (f k) < e/4" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5811 |
by metis |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5812 |
have "\<exists>n\<ge>r. \<forall>k\<ge>n. 0 \<le> (g x) - (f k x) \<and> (g x) - (f k x) < e/(4 * content(cbox a b))" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5813 |
if "x \<in> cbox a b" for x |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5814 |
proof - |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5815 |
have "e/(4 * content (cbox a b)) > 0" |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
5816 |
by (simp add: False content_lt_nz e) |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5817 |
with fg that LIMSEQ_D |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5818 |
obtain N where "\<forall>n\<ge>N. norm (f n x - g x) < e/(4 * content (cbox a b))" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5819 |
by metis |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5820 |
then show "\<exists>n\<ge>r. |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5821 |
\<forall>k\<ge>n. |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5822 |
0 \<le> g x - f k x \<and> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5823 |
g x - f k x |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5824 |
< e/(4 * content (cbox a b))" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5825 |
apply (rule_tac x="N + r" in exI) |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5826 |
using fg1[OF that] apply (auto simp add: field_simps) |
53638 | 5827 |
done |
5828 |
qed |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5829 |
then obtain m where r_le_m: "\<And>x. x \<in> cbox a b \<Longrightarrow> r \<le> m x" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5830 |
and m: "\<And>x k. \<lbrakk>x \<in> cbox a b; m x \<le> k\<rbrakk> |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5831 |
\<Longrightarrow> 0 \<le> g x - f k x \<and> g x - f k x < e/(4 * content (cbox a b))" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5832 |
by metis |
63040 | 5833 |
define d where "d x = c (m x) x" for x |
66409 | 5834 |
show "\<exists>\<gamma>. gauge \<gamma> \<and> |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5835 |
(\<forall>\<D>. \<D> tagged_division_of cbox a b \<and> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5836 |
\<gamma> fine \<D> \<longrightarrow> abs ((\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R g x) - i) < e)" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5837 |
proof (rule exI, safe) |
53638 | 5838 |
show "gauge d" |
5839 |
using c(1) unfolding gauge_def d_def by auto |
|
5840 |
next |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5841 |
fix \<D> |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5842 |
assume ptag: "\<D> tagged_division_of (cbox a b)" and "d fine \<D>" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5843 |
note p'=tagged_division_ofD[OF ptag] |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5844 |
obtain s where s: "\<And>x. x \<in> \<D> \<Longrightarrow> m (fst x) \<le> s" |
41851 | 5845 |
by (metis finite_imageI finite_nat_set_iff_bounded_le p'(1) rev_image_eqI) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5846 |
have *: "\<bar>a - d\<bar> < e" if "\<bar>a - b\<bar> \<le> e/4" "\<bar>b - c\<bar> < e/2" "\<bar>c - d\<bar> < e/4" for a b c d |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5847 |
using that norm_triangle_lt[of "a - b" "b - c" "3* e/4"] |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5848 |
norm_triangle_lt[of "a - b + (b - c)" "c - d" e] |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5849 |
by (auto simp add: algebra_simps) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5850 |
show "\<bar>(\<Sum>(x, k)\<in>\<D>. content k *\<^sub>R g x) - i\<bar> < e" |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5851 |
proof (rule *) |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5852 |
have "\<bar>(\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R g x) - (\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R f (m x) x)\<bar> |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5853 |
\<le> (\<Sum>i\<in>\<D>. \<bar>(case i of (x, K) \<Rightarrow> content K *\<^sub>R g x) - (case i of (x, K) \<Rightarrow> content K *\<^sub>R f (m x) x)\<bar>)" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5854 |
by (metis (mono_tags) sum_subtractf sum_abs) |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5855 |
also have "... \<le> (\<Sum>(x, k)\<in>\<D>. content k * (e/(4 * content (cbox a b))))" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5856 |
proof (rule sum_mono, simp add: split_paired_all) |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5857 |
fix x K |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5858 |
assume xk: "(x,K) \<in> \<D>" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5859 |
with ptag have x: "x \<in> cbox a b" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5860 |
by blast |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5861 |
then have "abs (content K * (g x - f (m x) x)) \<le> content K * (e/(4 * content (cbox a b)))" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5862 |
by (metis m[OF x] mult_nonneg_nonneg abs_of_nonneg less_eq_real_def measure_nonneg mult_left_mono order_refl) |
66505 | 5863 |
then show "\<bar>content K * g x - content K * f (m x) x\<bar> \<le> content K * e/(4 * content (cbox a b))" |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5864 |
by (simp add: algebra_simps) |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5865 |
qed |
66505 | 5866 |
also have "... = (e/(4 * content (cbox a b))) * (\<Sum>(x, k)\<in>\<D>. content k)" |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5867 |
by (simp add: sum_distrib_left sum_divide_distrib split_def mult.commute) |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5868 |
also have "... \<le> e/4" |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5869 |
by (metis False additive_content_tagged_division [OF ptag] nonzero_mult_divide_mult_cancel_right order_refl times_divide_eq_left) |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5870 |
finally show "\<bar>(\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R g x) - (\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R f (m x) x)\<bar> \<le> e/4" . |
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5871 |
|
53638 | 5872 |
next |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5873 |
have "norm ((\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R f (m x) x) - (\<Sum>(x,K)\<in>\<D>. integral K (f (m x)))) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5874 |
\<le> norm (\<Sum>j = 0..s. \<Sum>(x,K)\<in>{xk \<in> \<D>. m (fst xk) = j}. content K *\<^sub>R f (m x) x - integral K (f (m x)))" |
64267 | 5875 |
apply (subst sum_group) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5876 |
using s by (auto simp: sum_subtractf split_def p'(1)) |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5877 |
also have "\<dots> < e/2" |
53638 | 5878 |
proof - |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5879 |
have "norm (\<Sum>j = 0..s. \<Sum>(x, k)\<in>{xk \<in> \<D>. m (fst xk) = j}. content k *\<^sub>R f (m x) x - integral k (f (m x))) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5880 |
\<le> (\<Sum>i = 0..s. e/2 ^ (i + 2))" |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5881 |
proof (rule sum_norm_le) |
53638 | 5882 |
fix t |
5883 |
assume "t \<in> {0..s}" |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5884 |
have "norm (\<Sum>(x,k)\<in>{xk \<in> \<D>. m (fst xk) = t}. content k *\<^sub>R f (m x) x - integral k (f (m x))) = |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5885 |
norm (\<Sum>(x,k)\<in>{xk \<in> \<D>. m (fst xk) = t}. content k *\<^sub>R f t x - integral k (f t))" |
66437 | 5886 |
by (force intro!: sum.cong arg_cong[where f=norm]) |
5887 |
also have "... \<le> e/2 ^ (t + 2)" |
|
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5888 |
proof (rule Henstock_lemma_part1 [OF intf]) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5889 |
show "{xk \<in> \<D>. m (fst xk) = t} tagged_partial_division_of cbox a b" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5890 |
apply (rule tagged_partial_division_subset[of \<D>]) |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5891 |
using ptag by (auto simp: tagged_division_of_def) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5892 |
show "c t fine {xk \<in> \<D>. m (fst xk) = t}" |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5893 |
using \<open>d fine \<D>\<close> by (auto simp: fine_def d_def) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5894 |
qed (use c e in auto) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5895 |
finally show "norm (\<Sum>(x,K)\<in>{xk \<in> \<D>. m (fst xk) = t}. content K *\<^sub>R f (m x) x - |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5896 |
integral K (f (m x))) \<le> e/2 ^ (t + 2)" . |
53638 | 5897 |
qed |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5898 |
also have "... = (e/2/2) * (\<Sum>i = 0..s. (1/2) ^ i)" |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5899 |
by (simp add: sum_distrib_left field_simps) |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5900 |
also have "\<dots> < e/2" |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5901 |
by (simp add: sum_gp mult_strict_left_mono[OF _ e]) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5902 |
finally show "norm (\<Sum>j = 0..s. \<Sum>(x, k)\<in>{xk \<in> \<D>. |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5903 |
m (fst xk) = j}. content k *\<^sub>R f (m x) x - integral k (f (m x))) < e/2" . |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5904 |
qed |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5905 |
finally show "\<bar>(\<Sum>(x,K)\<in>\<D>. content K *\<^sub>R f (m x) x) - (\<Sum>(x,K)\<in>\<D>. integral K (f (m x)))\<bar> < e/2" |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5906 |
by simp |
53638 | 5907 |
next |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5908 |
have comb: "integral (cbox a b) (f y) = (\<Sum>(x, k)\<in>\<D>. integral k (f y))" for y |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5909 |
using integral_combine_tagged_division_topdown[OF intf ptag] by metis |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5910 |
have f_le: "\<And>y m n. \<lbrakk>y \<in> cbox a b; n\<ge>m\<rbrakk> \<Longrightarrow> f m y \<le> f n y" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5911 |
using le by (auto intro: transitive_stepwise_le) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5912 |
have "(\<Sum>(x, k)\<in>\<D>. integral k (f r)) \<le> (\<Sum>(x, K)\<in>\<D>. integral K (f (m x)))" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5913 |
proof (rule sum_mono, simp add: split_paired_all) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
5914 |
fix x K |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5915 |
assume xK: "(x, K) \<in> \<D>" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5916 |
show "integral K (f r) \<le> integral K (f (m x))" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5917 |
proof (rule integral_le) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5918 |
show "f r integrable_on K" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5919 |
by (metis integrable_on_subcbox intf p'(3) p'(4) xK) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5920 |
show "f (m x) integrable_on K" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5921 |
by (metis elementary_interval integrable_on_subdivision intf p'(3) p'(4) xK) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5922 |
show "f r y \<le> f (m x) y" if "y \<in> K" for y |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5923 |
using that r_le_m[of x] p'(2-3)[OF xK] f_le by auto |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5924 |
qed |
53638 | 5925 |
qed |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5926 |
moreover have "(\<Sum>(x, K)\<in>\<D>. integral K (f (m x))) \<le> (\<Sum>(x, k)\<in>\<D>. integral k (f s))" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5927 |
proof (rule sum_mono, simp add: split_paired_all) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5928 |
fix x K |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5929 |
assume xK: "(x, K) \<in> \<D>" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5930 |
show "integral K (f (m x)) \<le> integral K (f s)" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5931 |
proof (rule integral_le) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5932 |
show "f (m x) integrable_on K" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5933 |
by (metis elementary_interval integrable_on_subdivision intf p'(3) p'(4) xK) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5934 |
show "f s integrable_on K" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5935 |
by (metis integrable_on_subcbox intf p'(3) p'(4) xK) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5936 |
show "f (m x) y \<le> f s y" if "y \<in> K" for y |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5937 |
using that s xK f_le p'(3) by fastforce |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5938 |
qed |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5939 |
qed |
66505 | 5940 |
moreover have "0 \<le> i - integral (cbox a b) (f r)" "i - integral (cbox a b) (f r) < e/4" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5941 |
using r by auto |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5942 |
ultimately show "\<bar>(\<Sum>(x,K)\<in>\<D>. integral K (f (m x))) - i\<bar> < e/4" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5943 |
using comb i'[of s] by auto |
53638 | 5944 |
qed |
5945 |
qed |
|
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5946 |
qed |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5947 |
with i integral_unique show ?thesis |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
5948 |
by blast |
53638 | 5949 |
qed |
5950 |
||
5951 |
lemma monotone_convergence_increasing: |
|
56188 | 5952 |
fixes f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" |
66420 | 5953 |
assumes int_f: "\<And>k. (f k) integrable_on S" |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5954 |
and "\<And>k x. x \<in> S \<Longrightarrow> (f k x) \<le> (f (Suc k) x)" |
66420 | 5955 |
and fg: "\<And>x. x \<in> S \<Longrightarrow> ((\<lambda>k. f k x) \<longlongrightarrow> g x) sequentially" |
5956 |
and bou: "bounded (range (\<lambda>k. integral S (f k)))" |
|
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5957 |
shows "g integrable_on S \<and> ((\<lambda>k. integral S (f k)) \<longlongrightarrow> integral S g) sequentially" |
61973 | 5958 |
proof - |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5959 |
have lem: "g integrable_on S \<and> ((\<lambda>k. integral S (f k)) \<longlongrightarrow> integral S g) sequentially" |
66409 | 5960 |
if f0: "\<And>k x. x \<in> S \<Longrightarrow> 0 \<le> f k x" |
5961 |
and int_f: "\<And>k. (f k) integrable_on S" |
|
66420 | 5962 |
and le: "\<And>k x. x \<in> S \<Longrightarrow> f k x \<le> f (Suc k) x" |
66409 | 5963 |
and lim: "\<And>x. x \<in> S \<Longrightarrow> ((\<lambda>k. f k x) \<longlongrightarrow> g x) sequentially" |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5964 |
and bou: "bounded (range(\<lambda>k. integral S (f k)))" |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5965 |
for f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" and g S |
53638 | 5966 |
proof - |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5967 |
have fg: "(f k x) \<le> (g x)" if "x \<in> S" for x k |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5968 |
apply (rule tendsto_lowerbound [OF lim [OF that]]) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5969 |
apply (rule eventually_sequentiallyI [of k]) |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5970 |
using le by (force intro: transitive_stepwise_le that)+ |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5971 |
obtain i where i: "(\<lambda>k. integral S (f k)) \<longlonglongrightarrow> i" |
66420 | 5972 |
using bounded_increasing_convergent [OF bou] le int_f integral_le by blast |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5973 |
have i': "(integral S (f k)) \<le> i" for k |
66409 | 5974 |
proof - |
66519 | 5975 |
have "\<And>k. \<And>x. x \<in> S \<Longrightarrow> \<forall>n\<ge>k. f k x \<le> f n x" |
66409 | 5976 |
using le by (force intro: transitive_stepwise_le) |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5977 |
then show ?thesis |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
5978 |
using tendsto_lowerbound [OF i eventually_sequentiallyI trivial_limit_sequentially] |
66497
18a6478a574c
More tidying, and renaming of theorems
paulson <lp15@cam.ac.uk>
parents:
66495
diff
changeset
|
5979 |
by (meson int_f integral_le) |
66409 | 5980 |
qed |
5981 |
||
66420 | 5982 |
let ?f = "(\<lambda>k x. if x \<in> S then f k x else 0)" |
5983 |
let ?g = "(\<lambda>x. if x \<in> S then g x else 0)" |
|
5984 |
have int: "?f k integrable_on cbox a b" for a b k |
|
66409 | 5985 |
by (simp add: int_f integrable_altD(1)) |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
5986 |
have int': "\<And>k a b. f k integrable_on cbox a b \<inter> S" |
66409 | 5987 |
using int by (simp add: Int_commute integrable_restrict_Int) |
66420 | 5988 |
have g: "?g integrable_on cbox a b \<and> |
5989 |
(\<lambda>k. integral (cbox a b) (?f k)) \<longlonglongrightarrow> integral (cbox a b) ?g" for a b |
|
5990 |
proof (rule monotone_convergence_interval) |
|
5991 |
have "norm (integral (cbox a b) (?f k)) \<le> norm (integral S (f k))" for k |
|
66409 | 5992 |
proof - |
66420 | 5993 |
have "0 \<le> integral (cbox a b) (?f k)" |
66409 | 5994 |
by (metis (no_types) integral_nonneg Int_iff f0 inf_commute integral_restrict_Int int') |
5995 |
moreover have "0 \<le> integral S (f k)" |
|
5996 |
by (simp add: integral_nonneg f0 int_f) |
|
5997 |
moreover have "integral (S \<inter> cbox a b) (f k) \<le> integral S (f k)" |
|
5998 |
by (metis f0 inf_commute int' int_f integral_subset_le le_inf_iff order_refl) |
|
5999 |
ultimately show ?thesis |
|
6000 |
by (simp add: integral_restrict_Int) |
|
6001 |
qed |
|
6002 |
moreover obtain B where "\<And>x. x \<in> range (\<lambda>k. integral S (f k)) \<Longrightarrow> norm x \<le> B" |
|
6003 |
using bou unfolding bounded_iff by blast |
|
66420 | 6004 |
ultimately show "bounded (range (\<lambda>k. integral (cbox a b) (?f k)))" |
66409 | 6005 |
unfolding bounded_iff by (blast intro: order_trans) |
66420 | 6006 |
qed (use int le lim in auto) |
6007 |
moreover have "\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> norm (integral (cbox a b) ?g - i) < e" |
|
6008 |
if "0 < e" for e |
|
6009 |
proof - |
|
6010 |
have "e/4>0" |
|
6011 |
using that by auto |
|
6012 |
with LIMSEQ_D [OF i] obtain N where N: "\<And>n. n \<ge> N \<Longrightarrow> norm (integral S (f n) - i) < e/4" |
|
6013 |
by metis |
|
6014 |
with int_f[of N, unfolded has_integral_integral has_integral_alt'[of "f N"]] |
|
6015 |
obtain B where "0 < B" and B: |
|
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6016 |
"\<And>a b. ball 0 B \<subseteq> cbox a b \<Longrightarrow> norm (integral (cbox a b) (?f N) - integral S (f N)) < e/4" |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6017 |
by (meson \<open>0 < e/4\<close>) |
66420 | 6018 |
have "norm (integral (cbox a b) ?g - i) < e" if ab: "ball 0 B \<subseteq> cbox a b" for a b |
53638 | 6019 |
proof - |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6020 |
obtain M where M: "\<And>n. n \<ge> M \<Longrightarrow> abs (integral (cbox a b) (?f n) - integral (cbox a b) ?g) < e/2" |
66420 | 6021 |
using \<open>e > 0\<close> g by (fastforce simp add: dest!: LIMSEQ_D [where r = "e/2"]) |
6022 |
have *: "\<And>\<alpha> \<beta> g. \<lbrakk>\<bar>\<alpha> - i\<bar> < e/2; \<bar>\<beta> - g\<bar> < e/2; \<alpha> \<le> \<beta>; \<beta> \<le> i\<rbrakk> \<Longrightarrow> \<bar>g - i\<bar> < e" |
|
53638 | 6023 |
unfolding real_inner_1_right by arith |
66420 | 6024 |
show "norm (integral (cbox a b) ?g - i) < e" |
53638 | 6025 |
unfolding real_norm_def |
66420 | 6026 |
proof (rule *) |
6027 |
show "\<bar>integral (cbox a b) (?f N) - i\<bar> < e/2" |
|
6028 |
proof (rule abs_triangle_half_l) |
|
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6029 |
show "\<bar>integral (cbox a b) (?f N) - integral S (f N)\<bar> < e/2 / 2" |
66420 | 6030 |
using B[OF ab] by simp |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6031 |
show "abs (i - integral S (f N)) < e/2 / 2" |
66420 | 6032 |
using N by (simp add: abs_minus_commute) |
6033 |
qed |
|
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6034 |
show "\<bar>integral (cbox a b) (?f (M + N)) - integral (cbox a b) ?g\<bar> < e/2" |
66420 | 6035 |
by (metis le_add1 M[of "M + N"]) |
6036 |
show "integral (cbox a b) (?f N) \<le> integral (cbox a b) (?f (M + N))" |
|
6037 |
proof (intro ballI integral_le[OF int int]) |
|
6038 |
fix x assume "x \<in> cbox a b" |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6039 |
have "(f m x) \<le> (f n x)" if "x \<in> S" "n \<ge> m" for m n |
66420 | 6040 |
apply (rule transitive_stepwise_le [OF \<open>n \<ge> m\<close> order_refl]) |
6041 |
using dual_order.trans apply blast |
|
6042 |
by (simp add: le \<open>x \<in> S\<close>) |
|
6043 |
then show "(?f N)x \<le> (?f (M+N))x" |
|
6044 |
by auto |
|
6045 |
qed |
|
66409 | 6046 |
have "integral (cbox a b \<inter> S) (f (M + N)) \<le> integral S (f (M + N))" |
6047 |
by (metis Int_lower1 f0 inf_commute int' int_f integral_subset_le) |
|
66420 | 6048 |
then have "integral (cbox a b) (?f (M + N)) \<le> integral S (f (M + N))" |
6049 |
by (metis (no_types) inf_commute integral_restrict_Int) |
|
6050 |
also have "... \<le> i" |
|
6051 |
using i'[of "M + N"] by auto |
|
6052 |
finally show "integral (cbox a b) (?f (M + N)) \<le> i" . |
|
53638 | 6053 |
qed |
6054 |
qed |
|
66420 | 6055 |
then show ?thesis |
6056 |
using \<open>0 < B\<close> by blast |
|
53638 | 6057 |
qed |
66420 | 6058 |
ultimately have "(g has_integral i) S" |
6059 |
unfolding has_integral_alt' by auto |
|
61165 | 6060 |
then show ?thesis |
66409 | 6061 |
using has_integral_integrable_integral i integral_unique by metis |
53638 | 6062 |
qed |
6063 |
||
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6064 |
have sub: "\<And>k. integral S (\<lambda>x. f k x - f 0 x) = integral S (f k) - integral S (f 0)" |
66420 | 6065 |
by (simp add: integral_diff int_f) |
66409 | 6066 |
have *: "\<And>x m n. x \<in> S \<Longrightarrow> n\<ge>m \<Longrightarrow> f m x \<le> f n x" |
66193 | 6067 |
using assms(2) by (force intro: transitive_stepwise_le) |
66420 | 6068 |
have gf: "(\<lambda>x. g x - f 0 x) integrable_on S \<and> ((\<lambda>k. integral S (\<lambda>x. f (Suc k) x - f 0 x)) \<longlongrightarrow> |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6069 |
integral S (\<lambda>x. g x - f 0 x)) sequentially" |
66420 | 6070 |
proof (rule lem) |
6071 |
show "\<And>k. (\<lambda>x. f (Suc k) x - f 0 x) integrable_on S" |
|
6072 |
by (simp add: integrable_diff int_f) |
|
6073 |
show "(\<lambda>k. f (Suc k) x - f 0 x) \<longlonglongrightarrow> g x - f 0 x" if "x \<in> S" for x |
|
6074 |
proof - |
|
6075 |
have "(\<lambda>n. f (Suc n) x) \<longlonglongrightarrow> g x" |
|
6076 |
using LIMSEQ_ignore_initial_segment[OF fg[OF \<open>x \<in> S\<close>], of 1] by simp |
|
6077 |
then show ?thesis |
|
6078 |
by (simp add: tendsto_diff) |
|
6079 |
qed |
|
6080 |
show "bounded (range (\<lambda>k. integral S (\<lambda>x. f (Suc k) x - f 0 x)))" |
|
6081 |
proof - |
|
6082 |
obtain B where B: "\<And>k. norm (integral S (f k)) \<le> B" |
|
6083 |
using bou by (auto simp: bounded_iff) |
|
6084 |
then have "norm (integral S (\<lambda>x. f (Suc k) x - f 0 x)) |
|
6085 |
\<le> B + norm (integral S (f 0))" for k |
|
6086 |
unfolding sub by (meson add_le_cancel_right norm_triangle_le_diff) |
|
6087 |
then show ?thesis |
|
6088 |
unfolding bounded_iff by blast |
|
6089 |
qed |
|
6090 |
qed (use * in auto) |
|
6091 |
then have "(\<lambda>x. integral S (\<lambda>xa. f (Suc x) xa - f 0 xa) + integral S (f 0)) |
|
6092 |
\<longlonglongrightarrow> integral S (\<lambda>x. g x - f 0 x) + integral S (f 0)" |
|
6093 |
by (auto simp add: tendsto_add) |
|
6094 |
moreover have "(\<lambda>x. g x - f 0 x + f 0 x) integrable_on S" |
|
6095 |
using gf integrable_add int_f [of 0] by metis |
|
6096 |
ultimately show ?thesis |
|
6097 |
by (simp add: integral_diff int_f LIMSEQ_imp_Suc sub) |
|
53638 | 6098 |
qed |
6099 |
||
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6100 |
lemma has_integral_monotone_convergence_increasing: |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6101 |
fixes f :: "nat \<Rightarrow> 'a::euclidean_space \<Rightarrow> real" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6102 |
assumes f: "\<And>k. (f k has_integral x k) s" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6103 |
assumes "\<And>k x. x \<in> s \<Longrightarrow> f k x \<le> f (Suc k) x" |
61969 | 6104 |
assumes "\<And>x. x \<in> s \<Longrightarrow> (\<lambda>k. f k x) \<longlonglongrightarrow> g x" |
6105 |
assumes "x \<longlonglongrightarrow> x'" |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6106 |
shows "(g has_integral x') s" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6107 |
proof - |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6108 |
have x_eq: "x = (\<lambda>i. integral s (f i))" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6109 |
by (simp add: integral_unique[OF f]) |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6110 |
then have x: "range(\<lambda>k. integral s (f k)) = range x" |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6111 |
by auto |
63540 | 6112 |
have *: "g integrable_on s \<and> (\<lambda>k. integral s (f k)) \<longlonglongrightarrow> integral s g" |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6113 |
proof (intro monotone_convergence_increasing allI ballI assms) |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6114 |
show "bounded (range(\<lambda>k. integral s (f k)))" |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6115 |
using x convergent_imp_bounded assms by metis |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
6116 |
qed (use f in auto) |
63540 | 6117 |
then have "integral s g = x'" |
61969 | 6118 |
by (intro LIMSEQ_unique[OF _ \<open>x \<longlonglongrightarrow> x'\<close>]) (simp add: x_eq) |
63540 | 6119 |
with * show ?thesis |
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6120 |
by (simp add: has_integral_integral) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6121 |
qed |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6122 |
|
53638 | 6123 |
lemma monotone_convergence_decreasing: |
56188 | 6124 |
fixes f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6125 |
assumes intf: "\<And>k. (f k) integrable_on S" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6126 |
and le: "\<And>k x. x \<in> S \<Longrightarrow> f (Suc k) x \<le> f k x" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6127 |
and fg: "\<And>x. x \<in> S \<Longrightarrow> ((\<lambda>k. f k x) \<longlongrightarrow> g x) sequentially" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6128 |
and bou: "bounded (range(\<lambda>k. integral S (f k)))" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6129 |
shows "g integrable_on S \<and> (\<lambda>k. integral S (f k)) \<longlonglongrightarrow> integral S g" |
53638 | 6130 |
proof - |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6131 |
have *: "range(\<lambda>k. integral S (\<lambda>x. - f k x)) = op *\<^sub>R (- 1) ` (range(\<lambda>k. integral S (f k)))" |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6132 |
by force |
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6133 |
have "(\<lambda>x. - g x) integrable_on S \<and> (\<lambda>k. integral S (\<lambda>x. - f k x)) \<longlonglongrightarrow> integral S (\<lambda>x. - g x)" |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6134 |
proof (rule monotone_convergence_increasing) |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6135 |
show "\<And>k. (\<lambda>x. - f k x) integrable_on S" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6136 |
by (blast intro: integrable_neg intf) |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6137 |
show "\<And>k x. x \<in> S \<Longrightarrow> - f k x \<le> - f (Suc k) x" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6138 |
by (simp add: le) |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6139 |
show "\<And>x. x \<in> S \<Longrightarrow> (\<lambda>k. - f k x) \<longlonglongrightarrow> - g x" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6140 |
by (simp add: fg tendsto_minus) |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6141 |
show "bounded (range(\<lambda>k. integral S (\<lambda>x. - f k x)))" |
66429
beaeb40a1217
tackling another nightmare proof
paulson <lp15@cam.ac.uk>
parents:
66422
diff
changeset
|
6142 |
using "*" bou bounded_scaling by auto |
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6143 |
qed |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6144 |
then show ?thesis |
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
6145 |
by (force dest: integrable_neg tendsto_minus) |
53638 | 6146 |
qed |
6147 |
||
6148 |
lemma integral_norm_bound_integral: |
|
56188 | 6149 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6150 |
assumes int_f: "f integrable_on S" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6151 |
and int_g: "g integrable_on S" |
66519 | 6152 |
and le_g: "\<And>x. x \<in> S \<Longrightarrow> norm (f x) \<le> g x" |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6153 |
shows "norm (integral S f) \<le> integral S g" |
53638 | 6154 |
proof - |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
6155 |
have norm: "norm \<eta> \<le> y + e" |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6156 |
if "norm \<zeta> \<le> x" and "\<bar>x - y\<bar> < e/2" and "norm (\<zeta> - \<eta>) < e/2" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6157 |
for e x y and \<zeta> \<eta> :: 'a |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6158 |
proof - |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6159 |
have "norm (\<eta> - \<zeta>) < e/2" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6160 |
by (metis norm_minus_commute that(3)) |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6161 |
moreover have "x \<le> y + e/2" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6162 |
using that(2) by linarith |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6163 |
ultimately show ?thesis |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
6164 |
using that(1) le_less_trans[OF norm_triangle_sub[of \<eta> \<zeta>]] by (auto simp: less_imp_le) |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6165 |
qed |
61165 | 6166 |
have lem: "norm (integral(cbox a b) f) \<le> integral (cbox a b) g" |
66359 | 6167 |
if f: "f integrable_on cbox a b" |
6168 |
and g: "g integrable_on cbox a b" |
|
6169 |
and nle: "\<And>x. x \<in> cbox a b \<Longrightarrow> norm (f x) \<le> g x" |
|
61165 | 6170 |
for f :: "'n \<Rightarrow> 'a" and g a b |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
6171 |
proof (rule field_le_epsilon) |
61165 | 6172 |
fix e :: real |
6173 |
assume "e > 0" |
|
66359 | 6174 |
then have e: "e/2 > 0" |
53638 | 6175 |
by auto |
66359 | 6176 |
with integrable_integral[OF f,unfolded has_integral[of f]] |
6177 |
obtain \<gamma> where \<gamma>: "gauge \<gamma>" |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6178 |
"\<And>\<D>. \<D> tagged_division_of cbox a b \<and> \<gamma> fine \<D> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6179 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>\<D>. content k *\<^sub>R f x) - integral (cbox a b) f) < e/2" |
66359 | 6180 |
by meson |
6181 |
moreover |
|
6182 |
from integrable_integral[OF g,unfolded has_integral[of g]] e |
|
6183 |
obtain \<delta> where \<delta>: "gauge \<delta>" |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6184 |
"\<And>\<D>. \<D> tagged_division_of cbox a b \<and> \<delta> fine \<D> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6185 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>\<D>. content k *\<^sub>R g x) - integral (cbox a b) g) < e/2" |
66359 | 6186 |
by meson |
6187 |
ultimately have "gauge (\<lambda>x. \<gamma> x \<inter> \<delta> x)" |
|
6188 |
using gauge_Int by blast |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6189 |
with fine_division_exists obtain \<D> |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6190 |
where p: "\<D> tagged_division_of cbox a b" "(\<lambda>x. \<gamma> x \<inter> \<delta> x) fine \<D>" |
66359 | 6191 |
by metis |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6192 |
have "\<gamma> fine \<D>" "\<delta> fine \<D>" |
66359 | 6193 |
using fine_Int p(2) by blast+ |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
6194 |
show "norm (integral (cbox a b) f) \<le> integral (cbox a b) g + e" |
66359 | 6195 |
proof (rule norm) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6196 |
have "norm (content K *\<^sub>R f x) \<le> content K *\<^sub>R g x" if "(x, K) \<in> \<D>" for x K |
66359 | 6197 |
proof- |
6198 |
have K: "x \<in> K" "K \<subseteq> cbox a b" |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6199 |
using \<open>(x, K) \<in> \<D>\<close> p(1) by blast+ |
66359 | 6200 |
obtain u v where "K = cbox u v" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6201 |
using \<open>(x, K) \<in> \<D>\<close> p(1) by blast |
66359 | 6202 |
moreover have "content K * norm (f x) \<le> content K * g x" |
6203 |
by (metis K subsetD dual_order.antisym measure_nonneg mult_zero_left nle not_le real_mult_le_cancel_iff2) |
|
6204 |
then show ?thesis |
|
6205 |
by simp |
|
6206 |
qed |
|
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6207 |
then show "norm (\<Sum>(x, k)\<in>\<D>. content k *\<^sub>R f x) \<le> (\<Sum>(x, k)\<in>\<D>. content k *\<^sub>R g x)" |
66359 | 6208 |
by (simp add: sum_norm_le split_def) |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6209 |
show "norm ((\<Sum>(x, k)\<in>\<D>. content k *\<^sub>R f x) - integral (cbox a b) f) < e/2" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6210 |
using \<open>\<gamma> fine \<D>\<close> \<gamma> p(1) by simp |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6211 |
show "\<bar>(\<Sum>(x, k)\<in>\<D>. content k *\<^sub>R g x) - integral (cbox a b) g\<bar> < e/2" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6212 |
using \<open>\<delta> fine \<D>\<close> \<delta> p(1) by simp |
66359 | 6213 |
qed |
53638 | 6214 |
qed |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6215 |
show ?thesis |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
6216 |
proof (rule field_le_epsilon) |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6217 |
fix e :: real |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6218 |
assume "e > 0" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6219 |
then have e: "e/2 > 0" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6220 |
by auto |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6221 |
let ?f = "(\<lambda>x. if x \<in> S then f x else 0)" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6222 |
let ?g = "(\<lambda>x. if x \<in> S then g x else 0)" |
66420 | 6223 |
have f: "?f integrable_on cbox a b" and g: "?g integrable_on cbox a b" for a b |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6224 |
using int_f int_g integrable_altD by auto |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6225 |
obtain Bf where "0 < Bf" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6226 |
and Bf: "\<And>a b. ball 0 Bf \<subseteq> cbox a b \<Longrightarrow> |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6227 |
\<exists>z. (?f has_integral z) (cbox a b) \<and> norm (z - integral S f) < e/2" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6228 |
using integrable_integral [OF int_f,unfolded has_integral'[of f]] e that by blast |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6229 |
obtain Bg where "0 < Bg" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6230 |
and Bg: "\<And>a b. ball 0 Bg \<subseteq> cbox a b \<Longrightarrow> |
66420 | 6231 |
\<exists>z. (?g has_integral z) (cbox a b) \<and> norm (z - integral S g) < e/2" |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6232 |
using integrable_integral [OF int_g,unfolded has_integral'[of g]] e that by blast |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6233 |
obtain a b::'n where ab: "ball 0 Bf \<union> ball 0 Bg \<subseteq> cbox a b" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6234 |
using ball_max_Un bounded_subset_cbox[OF bounded_ball, of _ "max Bf Bg"] by blast |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6235 |
have "ball 0 Bf \<subseteq> cbox a b" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6236 |
using ab by auto |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6237 |
with Bf obtain z where int_fz: "(?f has_integral z) (cbox a b)" and z: "norm (z - integral S f) < e/2" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6238 |
by meson |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6239 |
have "ball 0 Bg \<subseteq> cbox a b" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6240 |
using ab by auto |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6241 |
with Bg obtain w where int_gw: "(?g has_integral w) (cbox a b)" and w: "norm (w - integral S g) < e/2" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6242 |
by meson |
66503
7685861f337d
more elimination of "guess", etc.
paulson <lp15@cam.ac.uk>
parents:
66498
diff
changeset
|
6243 |
show "norm (integral S f) \<le> integral S g + e" |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6244 |
proof (rule norm) |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6245 |
show "norm (integral (cbox a b) ?f) \<le> integral (cbox a b) ?g" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6246 |
by (simp add: le_g lem[OF f g, of a b]) |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6247 |
show "\<bar>integral (cbox a b) ?g - integral S g\<bar> < e/2" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6248 |
using int_gw integral_unique w by auto |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6249 |
show "norm (integral (cbox a b) ?f - integral S f) < e/2" |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6250 |
using int_fz integral_unique z by blast |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6251 |
qed |
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6252 |
qed |
53638 | 6253 |
qed |
6254 |
||
66359 | 6255 |
|
53638 | 6256 |
lemma integral_norm_bound_integral_component: |
56188 | 6257 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
6258 |
fixes g :: "'n \<Rightarrow> 'b::euclidean_space" |
|
66519 | 6259 |
assumes f: "f integrable_on S" and g: "g integrable_on S" |
6260 |
and fg: "\<And>x. x \<in> S \<Longrightarrow> norm(f x) \<le> (g x)\<bullet>k" |
|
6261 |
shows "norm (integral S f) \<le> (integral S g)\<bullet>k" |
|
53638 | 6262 |
proof - |
66519 | 6263 |
have "norm (integral S f) \<le> integral S ((\<lambda>x. x \<bullet> k) \<circ> g)" |
6264 |
apply (rule integral_norm_bound_integral[OF f integrable_linear[OF g]]) |
|
6265 |
apply (simp add: bounded_linear_inner_left) |
|
53638 | 6266 |
unfolding o_def |
66519 | 6267 |
apply (metis fg) |
53638 | 6268 |
done |
6269 |
then show ?thesis |
|
66519 | 6270 |
unfolding o_def integral_component_eq[OF g] . |
53638 | 6271 |
qed |
6272 |
||
6273 |
lemma has_integral_norm_bound_integral_component: |
|
56188 | 6274 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
6275 |
fixes g :: "'n \<Rightarrow> 'b::euclidean_space" |
|
66519 | 6276 |
assumes f: "(f has_integral i) S" |
6277 |
and g: "(g has_integral j) S" |
|
6278 |
and "\<And>x. x \<in> S \<Longrightarrow> norm (f x) \<le> (g x)\<bullet>k" |
|
53638 | 6279 |
shows "norm i \<le> j\<bullet>k" |
66519 | 6280 |
using integral_norm_bound_integral_component[of f S g k] |
6281 |
unfolding integral_unique[OF f] integral_unique[OF g] |
|
53638 | 6282 |
using assms |
6283 |
by auto |
|
6284 |
||
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6285 |
subsection \<open>differentiation under the integral sign\<close> |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6286 |
|
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6287 |
lemma integral_continuous_on_param: |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6288 |
fixes f::"'a::topological_space \<Rightarrow> 'b::euclidean_space \<Rightarrow> 'c::banach" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6289 |
assumes cont_fx: "continuous_on (U \<times> cbox a b) (\<lambda>(x, t). f x t)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6290 |
shows "continuous_on U (\<lambda>x. integral (cbox a b) (f x))" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6291 |
proof cases |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6292 |
assume "content (cbox a b) \<noteq> 0" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6293 |
then have ne: "cbox a b \<noteq> {}" by auto |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6294 |
|
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6295 |
note [continuous_intros] = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6296 |
continuous_on_compose2[OF cont_fx, where f="\<lambda>y. Pair x y" for x, |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6297 |
unfolded split_beta fst_conv snd_conv] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6298 |
|
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6299 |
show ?thesis |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6300 |
unfolding continuous_on_def |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6301 |
proof (safe intro!: tendstoI) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6302 |
fix e'::real and x |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6303 |
assume "e' > 0" |
63040 | 6304 |
define e where "e = e' / (content (cbox a b) + 1)" |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6305 |
have "e > 0" using \<open>e' > 0\<close> by (auto simp: e_def intro!: divide_pos_pos add_nonneg_pos) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6306 |
assume "x \<in> U" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6307 |
from continuous_on_prod_compactE[OF cont_fx compact_cbox \<open>x \<in> U\<close> \<open>0 < e\<close>] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6308 |
obtain X0 where X0: "x \<in> X0" "open X0" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6309 |
and fx_bound: "\<And>y t. y \<in> X0 \<inter> U \<Longrightarrow> t \<in> cbox a b \<Longrightarrow> norm (f y t - f x t) \<le> e" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6310 |
unfolding split_beta fst_conv snd_conv dist_norm |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6311 |
by metis |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6312 |
have "\<forall>\<^sub>F y in at x within U. y \<in> X0 \<inter> U" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6313 |
using X0(1) X0(2) eventually_at_topological by auto |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6314 |
then show "\<forall>\<^sub>F y in at x within U. dist (integral (cbox a b) (f y)) (integral (cbox a b) (f x)) < e'" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6315 |
proof eventually_elim |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6316 |
case (elim y) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6317 |
have "dist (integral (cbox a b) (f y)) (integral (cbox a b) (f x)) = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6318 |
norm (integral (cbox a b) (\<lambda>t. f y t - f x t))" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6319 |
using elim \<open>x \<in> U\<close> |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6320 |
unfolding dist_norm |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6321 |
by (subst integral_diff) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6322 |
(auto intro!: integrable_continuous continuous_intros) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6323 |
also have "\<dots> \<le> e * content (cbox a b)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6324 |
using elim \<open>x \<in> U\<close> |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6325 |
by (intro integrable_bound) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6326 |
(auto intro!: fx_bound \<open>x \<in> U \<close> less_imp_le[OF \<open>0 < e\<close>] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6327 |
integrable_continuous continuous_intros) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6328 |
also have "\<dots> < e'" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6329 |
using \<open>0 < e'\<close> \<open>e > 0\<close> |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6330 |
by (auto simp: e_def divide_simps) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6331 |
finally show "dist (integral (cbox a b) (f y)) (integral (cbox a b) (f x)) < e'" . |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6332 |
qed |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6333 |
qed |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6334 |
qed (auto intro!: continuous_on_const) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6335 |
|
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6336 |
lemma leibniz_rule: |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6337 |
fixes f::"'a::banach \<Rightarrow> 'b::euclidean_space \<Rightarrow> 'c::banach" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6338 |
assumes fx: "\<And>x t. x \<in> U \<Longrightarrow> t \<in> cbox a b \<Longrightarrow> |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6339 |
((\<lambda>x. f x t) has_derivative blinfun_apply (fx x t)) (at x within U)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6340 |
assumes integrable_f2: "\<And>x. x \<in> U \<Longrightarrow> f x integrable_on cbox a b" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6341 |
assumes cont_fx: "continuous_on (U \<times> (cbox a b)) (\<lambda>(x, t). fx x t)" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6342 |
assumes [intro]: "x0 \<in> U" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6343 |
assumes "convex U" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6344 |
shows |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6345 |
"((\<lambda>x. integral (cbox a b) (f x)) has_derivative integral (cbox a b) (fx x0)) (at x0 within U)" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6346 |
(is "(?F has_derivative ?dF) _") |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6347 |
proof cases |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6348 |
assume "content (cbox a b) \<noteq> 0" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6349 |
then have ne: "cbox a b \<noteq> {}" by auto |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6350 |
note [continuous_intros] = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6351 |
continuous_on_compose2[OF cont_fx, where f="\<lambda>y. Pair x y" for x, |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6352 |
unfolded split_beta fst_conv snd_conv] |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6353 |
show ?thesis |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6354 |
proof (intro has_derivativeI bounded_linear_scaleR_left tendstoI, fold norm_conv_dist) |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6355 |
have cont_f1: "\<And>t. t \<in> cbox a b \<Longrightarrow> continuous_on U (\<lambda>x. f x t)" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6356 |
by (auto simp: continuous_on_eq_continuous_within intro!: has_derivative_continuous fx) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6357 |
note [continuous_intros] = continuous_on_compose2[OF cont_f1] |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6358 |
fix e'::real |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6359 |
assume "e' > 0" |
63040 | 6360 |
define e where "e = e' / (content (cbox a b) + 1)" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6361 |
have "e > 0" using \<open>e' > 0\<close> by (auto simp: e_def intro!: divide_pos_pos add_nonneg_pos) |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6362 |
from continuous_on_prod_compactE[OF cont_fx compact_cbox \<open>x0 \<in> U\<close> \<open>e > 0\<close>] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6363 |
obtain X0 where X0: "x0 \<in> X0" "open X0" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6364 |
and fx_bound: "\<And>x t. x \<in> X0 \<inter> U \<Longrightarrow> t \<in> cbox a b \<Longrightarrow> norm (fx x t - fx x0 t) \<le> e" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6365 |
unfolding split_beta fst_conv snd_conv |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6366 |
by (metis dist_norm) |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6367 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6368 |
note eventually_closed_segment[OF \<open>open X0\<close> \<open>x0 \<in> X0\<close>, of U] |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6369 |
moreover |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6370 |
have "\<forall>\<^sub>F x in at x0 within U. x \<in> X0" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6371 |
using \<open>open X0\<close> \<open>x0 \<in> X0\<close> eventually_at_topological by blast |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6372 |
moreover have "\<forall>\<^sub>F x in at x0 within U. x \<noteq> x0" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6373 |
by (auto simp: eventually_at_filter) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6374 |
moreover have "\<forall>\<^sub>F x in at x0 within U. x \<in> U" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6375 |
by (auto simp: eventually_at_filter) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6376 |
ultimately |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6377 |
show "\<forall>\<^sub>F x in at x0 within U. norm ((?F x - ?F x0 - ?dF (x - x0)) /\<^sub>R norm (x - x0)) < e'" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6378 |
proof eventually_elim |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6379 |
case (elim x) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6380 |
from elim have "0 < norm (x - x0)" by simp |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6381 |
have "closed_segment x0 x \<subseteq> U" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6382 |
by (rule \<open>convex U\<close>[unfolded convex_contains_segment, rule_format, OF \<open>x0 \<in> U\<close> \<open>x \<in> U\<close>]) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6383 |
from elim have [intro]: "x \<in> U" by auto |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6384 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6385 |
have "?F x - ?F x0 - ?dF (x - x0) = |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6386 |
integral (cbox a b) (\<lambda>y. f x y - f x0 y - fx x0 y (x - x0))" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6387 |
(is "_ = ?id") |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6388 |
using \<open>x \<noteq> x0\<close> |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6389 |
by (subst blinfun_apply_integral integral_diff, |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6390 |
auto intro!: integrable_diff integrable_f2 continuous_intros |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6391 |
intro: integrable_continuous)+ |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6392 |
also |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6393 |
{ |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6394 |
fix t assume t: "t \<in> (cbox a b)" |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6395 |
have seg: "\<And>t. t \<in> {0..1} \<Longrightarrow> x0 + t *\<^sub>R (x - x0) \<in> X0 \<inter> U" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6396 |
using \<open>closed_segment x0 x \<subseteq> U\<close> |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6397 |
\<open>closed_segment x0 x \<subseteq> X0\<close> |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6398 |
by (force simp: closed_segment_def algebra_simps) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6399 |
from t have deriv: |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6400 |
"((\<lambda>x. f x t) has_derivative (fx y t)) (at y within X0 \<inter> U)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6401 |
if "y \<in> X0 \<inter> U" for y |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6402 |
unfolding has_vector_derivative_def[symmetric] |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6403 |
using that \<open>x \<in> X0\<close> |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6404 |
by (intro has_derivative_within_subset[OF fx]) auto |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6405 |
have "\<forall>x \<in> X0 \<inter> U. onorm (blinfun_apply (fx x t) - (fx x0 t)) \<le> e" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6406 |
using fx_bound t |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6407 |
by (auto simp add: norm_blinfun_def fun_diff_def blinfun.bilinear_simps[symmetric]) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6408 |
from differentiable_bound_linearization[OF seg deriv this] X0 |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6409 |
have "norm (f x t - f x0 t - fx x0 t (x - x0)) \<le> e * norm (x - x0)" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6410 |
by (auto simp add: ac_simps) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6411 |
} |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6412 |
then have "norm ?id \<le> integral (cbox a b) (\<lambda>_. e * norm (x - x0))" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6413 |
by (intro integral_norm_bound_integral) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6414 |
(auto intro!: continuous_intros integrable_diff integrable_f2 |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6415 |
intro: integrable_continuous) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6416 |
also have "\<dots> = content (cbox a b) * e * norm (x - x0)" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6417 |
by simp |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6418 |
also have "\<dots> < e' * norm (x - x0)" |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
6419 |
using \<open>e' > 0\<close> |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
6420 |
apply (intro mult_strict_right_mono[OF _ \<open>0 < norm (x - x0)\<close>]) |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
6421 |
apply (auto simp: divide_simps e_def) |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
6422 |
by (metis \<open>0 < e\<close> e_def order.asym zero_less_divide_iff) |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6423 |
finally have "norm (?F x - ?F x0 - ?dF (x - x0)) < e' * norm (x - x0)" . |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6424 |
then show ?case |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6425 |
by (auto simp: divide_simps) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6426 |
qed |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6427 |
qed (rule blinfun.bounded_linear_right) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6428 |
qed (auto intro!: derivative_eq_intros simp: blinfun.bilinear_simps) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6429 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
6430 |
lemma has_vector_derivative_eq_has_derivative_blinfun: |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6431 |
"(f has_vector_derivative f') (at x within U) \<longleftrightarrow> |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6432 |
(f has_derivative blinfun_scaleR_left f') (at x within U)" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6433 |
by (simp add: has_vector_derivative_def) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6434 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6435 |
lemma leibniz_rule_vector_derivative: |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6436 |
fixes f::"real \<Rightarrow> 'b::euclidean_space \<Rightarrow> 'c::banach" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6437 |
assumes fx: "\<And>x t. x \<in> U \<Longrightarrow> t \<in> cbox a b \<Longrightarrow> |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6438 |
((\<lambda>x. f x t) has_vector_derivative (fx x t)) (at x within U)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6439 |
assumes integrable_f2: "\<And>x. x \<in> U \<Longrightarrow> (f x) integrable_on cbox a b" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6440 |
assumes cont_fx: "continuous_on (U \<times> cbox a b) (\<lambda>(x, t). fx x t)" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6441 |
assumes U: "x0 \<in> U" "convex U" |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6442 |
shows "((\<lambda>x. integral (cbox a b) (f x)) has_vector_derivative integral (cbox a b) (fx x0)) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6443 |
(at x0 within U)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6444 |
proof - |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6445 |
note [continuous_intros] = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6446 |
continuous_on_compose2[OF cont_fx, where f="\<lambda>y. Pair x y" for x, |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6447 |
unfolded split_beta fst_conv snd_conv] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6448 |
have *: "blinfun_scaleR_left (integral (cbox a b) (fx x0)) = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6449 |
integral (cbox a b) (\<lambda>t. blinfun_scaleR_left (fx x0 t))" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6450 |
by (subst integral_linear[symmetric]) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6451 |
(auto simp: has_vector_derivative_def o_def |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6452 |
intro!: integrable_continuous U continuous_intros bounded_linear_intros) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6453 |
show ?thesis |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6454 |
unfolding has_vector_derivative_eq_has_derivative_blinfun |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6455 |
apply (rule has_derivative_eq_rhs) |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6456 |
apply (rule leibniz_rule[OF _ integrable_f2 _ U, where fx="\<lambda>x t. blinfun_scaleR_left (fx x t)"]) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6457 |
using fx cont_fx |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6458 |
apply (auto simp: has_vector_derivative_def * split_beta intro!: continuous_intros) |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6459 |
done |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6460 |
qed |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6461 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
6462 |
lemma has_field_derivative_eq_has_derivative_blinfun: |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6463 |
"(f has_field_derivative f') (at x within U) \<longleftrightarrow> (f has_derivative blinfun_mult_right f') (at x within U)" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6464 |
by (simp add: has_field_derivative_def) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6465 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6466 |
lemma leibniz_rule_field_derivative: |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6467 |
fixes f::"'a::{real_normed_field, banach} \<Rightarrow> 'b::euclidean_space \<Rightarrow> 'a" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6468 |
assumes fx: "\<And>x t. x \<in> U \<Longrightarrow> t \<in> cbox a b \<Longrightarrow> ((\<lambda>x. f x t) has_field_derivative fx x t) (at x within U)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6469 |
assumes integrable_f2: "\<And>x. x \<in> U \<Longrightarrow> (f x) integrable_on cbox a b" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6470 |
assumes cont_fx: "continuous_on (U \<times> (cbox a b)) (\<lambda>(x, t). fx x t)" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6471 |
assumes U: "x0 \<in> U" "convex U" |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6472 |
shows "((\<lambda>x. integral (cbox a b) (f x)) has_field_derivative integral (cbox a b) (fx x0)) (at x0 within U)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6473 |
proof - |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6474 |
note [continuous_intros] = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6475 |
continuous_on_compose2[OF cont_fx, where f="\<lambda>y. Pair x y" for x, |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6476 |
unfolded split_beta fst_conv snd_conv] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6477 |
have *: "blinfun_mult_right (integral (cbox a b) (fx x0)) = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6478 |
integral (cbox a b) (\<lambda>t. blinfun_mult_right (fx x0 t))" |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6479 |
by (subst integral_linear[symmetric]) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6480 |
(auto simp: has_vector_derivative_def o_def |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6481 |
intro!: integrable_continuous U continuous_intros bounded_linear_intros) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6482 |
show ?thesis |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6483 |
unfolding has_field_derivative_eq_has_derivative_blinfun |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6484 |
apply (rule has_derivative_eq_rhs) |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6485 |
apply (rule leibniz_rule[OF _ integrable_f2 _ U, where fx="\<lambda>x t. blinfun_mult_right (fx x t)"]) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6486 |
using fx cont_fx |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6487 |
apply (auto simp: has_field_derivative_def * split_beta intro!: continuous_intros) |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6488 |
done |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6489 |
qed |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6490 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6491 |
|
61243 | 6492 |
subsection \<open>Exchange uniform limit and integral\<close> |
6493 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6494 |
lemma uniform_limit_integral_cbox: |
61243 | 6495 |
fixes f::"'a \<Rightarrow> 'b::euclidean_space \<Rightarrow> 'c::banach" |
6496 |
assumes u: "uniform_limit (cbox a b) f g F" |
|
6497 |
assumes c: "\<And>n. continuous_on (cbox a b) (f n)" |
|
6498 |
assumes [simp]: "F \<noteq> bot" |
|
6499 |
obtains I J where |
|
6500 |
"\<And>n. (f n has_integral I n) (cbox a b)" |
|
6501 |
"(g has_integral J) (cbox a b)" |
|
61973 | 6502 |
"(I \<longlongrightarrow> J) F" |
61243 | 6503 |
proof - |
6504 |
have fi[simp]: "f n integrable_on (cbox a b)" for n |
|
6505 |
by (auto intro!: integrable_continuous assms) |
|
6506 |
then obtain I where I: "\<And>n. (f n has_integral I n) (cbox a b)" |
|
6507 |
by atomize_elim (auto simp: integrable_on_def intro!: choice) |
|
6508 |
||
6509 |
moreover |
|
6510 |
||
6511 |
have gi[simp]: "g integrable_on (cbox a b)" |
|
6512 |
by (auto intro!: integrable_continuous uniform_limit_theorem[OF _ u] eventuallyI c) |
|
6513 |
then obtain J where J: "(g has_integral J) (cbox a b)" |
|
6514 |
by blast |
|
6515 |
||
6516 |
moreover |
|
6517 |
||
61973 | 6518 |
have "(I \<longlongrightarrow> J) F" |
61243 | 6519 |
proof cases |
6520 |
assume "content (cbox a b) = 0" |
|
6521 |
hence "I = (\<lambda>_. 0)" "J = 0" |
|
6522 |
by (auto intro!: has_integral_unique I J) |
|
6523 |
thus ?thesis by simp |
|
6524 |
next |
|
6525 |
assume content_nonzero: "content (cbox a b) \<noteq> 0" |
|
6526 |
show ?thesis |
|
6527 |
proof (rule tendstoI) |
|
6528 |
fix e::real |
|
6529 |
assume "e > 0" |
|
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6530 |
define e' where "e' = e/2" |
61243 | 6531 |
with \<open>e > 0\<close> have "e' > 0" by simp |
6532 |
then have "\<forall>\<^sub>F n in F. \<forall>x\<in>cbox a b. norm (f n x - g x) < e' / content (cbox a b)" |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
6533 |
using u content_nonzero by (auto simp: uniform_limit_iff dist_norm zero_less_measure_iff) |
61243 | 6534 |
then show "\<forall>\<^sub>F n in F. dist (I n) J < e" |
6535 |
proof eventually_elim |
|
6536 |
case (elim n) |
|
6537 |
have "I n = integral (cbox a b) (f n)" |
|
6538 |
"J = integral (cbox a b) g" |
|
6539 |
using I[of n] J by (simp_all add: integral_unique) |
|
6540 |
then have "dist (I n) J = norm (integral (cbox a b) (\<lambda>x. f n x - g x))" |
|
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6541 |
by (simp add: integral_diff dist_norm) |
61243 | 6542 |
also have "\<dots> \<le> integral (cbox a b) (\<lambda>x. (e' / content (cbox a b)))" |
6543 |
using elim |
|
63941
f353674c2528
move absolutely_integrable_on to Equivalence_Lebesgue_Henstock_Integration, now based on the Lebesgue integral
hoelzl
parents:
63940
diff
changeset
|
6544 |
by (intro integral_norm_bound_integral) (auto intro!: integrable_diff) |
61243 | 6545 |
also have "\<dots> < e" |
6546 |
using \<open>0 < e\<close> |
|
6547 |
by (simp add: e'_def) |
|
6548 |
finally show ?case . |
|
6549 |
qed |
|
6550 |
qed |
|
6551 |
qed |
|
6552 |
ultimately show ?thesis .. |
|
6553 |
qed |
|
6554 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6555 |
lemma uniform_limit_integral: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6556 |
fixes f::"'a \<Rightarrow> 'b::ordered_euclidean_space \<Rightarrow> 'c::banach" |
66402 | 6557 |
assumes u: "uniform_limit {a..b} f g F" |
6558 |
assumes c: "\<And>n. continuous_on {a..b} (f n)" |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6559 |
assumes [simp]: "F \<noteq> bot" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6560 |
obtains I J where |
66402 | 6561 |
"\<And>n. (f n has_integral I n) {a..b}" |
6562 |
"(g has_integral J) {a..b}" |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6563 |
"(I \<longlongrightarrow> J) F" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6564 |
by (metis interval_cbox assms uniform_limit_integral_cbox) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6565 |
|
61243 | 6566 |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6567 |
subsection \<open>Integration by parts\<close> |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6568 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6569 |
lemma integration_by_parts_interior_strong: |
64272 | 6570 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
6571 |
assumes bilinear: "bounded_bilinear (prod)" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6572 |
assumes s: "finite s" and le: "a \<le> b" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6573 |
assumes cont [continuous_intros]: "continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6574 |
assumes deriv: "\<And>x. x\<in>{a<..<b} - s \<Longrightarrow> (f has_vector_derivative f' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6575 |
"\<And>x. x\<in>{a<..<b} - s \<Longrightarrow> (g has_vector_derivative g' x) (at x)" |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
6576 |
assumes int: "((\<lambda>x. prod (f x) (g' x)) has_integral |
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6577 |
(prod (f b) (g b) - prod (f a) (g a) - y)) {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6578 |
shows "((\<lambda>x. prod (f' x) (g x)) has_integral y) {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6579 |
proof - |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6580 |
interpret bounded_bilinear prod by fact |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6581 |
have "((\<lambda>x. prod (f x) (g' x) + prod (f' x) (g x)) has_integral |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6582 |
(prod (f b) (g b) - prod (f a) (g a))) {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6583 |
using deriv by (intro fundamental_theorem_of_calculus_interior_strong[OF s le]) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6584 |
(auto intro!: continuous_intros continuous_on has_vector_derivative) |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
6585 |
from has_integral_diff[OF this int] show ?thesis by (simp add: algebra_simps) |
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6586 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6587 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6588 |
lemma integration_by_parts_interior: |
64272 | 6589 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
6590 |
assumes "bounded_bilinear (prod)" "a \<le> b" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6591 |
"continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6592 |
assumes "\<And>x. x\<in>{a<..<b} \<Longrightarrow> (f has_vector_derivative f' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6593 |
"\<And>x. x\<in>{a<..<b} \<Longrightarrow> (g has_vector_derivative g' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6594 |
assumes "((\<lambda>x. prod (f x) (g' x)) has_integral (prod (f b) (g b) - prod (f a) (g a) - y)) {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6595 |
shows "((\<lambda>x. prod (f' x) (g x)) has_integral y) {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6596 |
by (rule integration_by_parts_interior_strong[of _ "{}" _ _ f g f' g']) (insert assms, simp_all) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6597 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6598 |
lemma integration_by_parts: |
64272 | 6599 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
6600 |
assumes "bounded_bilinear (prod)" "a \<le> b" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6601 |
"continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6602 |
assumes "\<And>x. x\<in>{a..b} \<Longrightarrow> (f has_vector_derivative f' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6603 |
"\<And>x. x\<in>{a..b} \<Longrightarrow> (g has_vector_derivative g' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6604 |
assumes "((\<lambda>x. prod (f x) (g' x)) has_integral (prod (f b) (g b) - prod (f a) (g a) - y)) {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6605 |
shows "((\<lambda>x. prod (f' x) (g x)) has_integral y) {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6606 |
by (rule integration_by_parts_interior[of _ _ _ f g f' g']) (insert assms, simp_all) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6607 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6608 |
lemma integrable_by_parts_interior_strong: |
64272 | 6609 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
6610 |
assumes bilinear: "bounded_bilinear (prod)" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6611 |
assumes s: "finite s" and le: "a \<le> b" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6612 |
assumes cont [continuous_intros]: "continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6613 |
assumes deriv: "\<And>x. x\<in>{a<..<b} - s \<Longrightarrow> (f has_vector_derivative f' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6614 |
"\<And>x. x\<in>{a<..<b} - s \<Longrightarrow> (g has_vector_derivative g' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6615 |
assumes int: "(\<lambda>x. prod (f x) (g' x)) integrable_on {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6616 |
shows "(\<lambda>x. prod (f' x) (g x)) integrable_on {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6617 |
proof - |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6618 |
from int obtain I where "((\<lambda>x. prod (f x) (g' x)) has_integral I) {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6619 |
unfolding integrable_on_def by blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6620 |
hence "((\<lambda>x. prod (f x) (g' x)) has_integral (prod (f b) (g b) - prod (f a) (g a) - |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6621 |
(prod (f b) (g b) - prod (f a) (g a) - I))) {a..b}" by simp |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6622 |
from integration_by_parts_interior_strong[OF assms(1-7) this] |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6623 |
show ?thesis unfolding integrable_on_def by blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6624 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6625 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6626 |
lemma integrable_by_parts_interior: |
64272 | 6627 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
6628 |
assumes "bounded_bilinear (prod)" "a \<le> b" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6629 |
"continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6630 |
assumes "\<And>x. x\<in>{a<..<b} \<Longrightarrow> (f has_vector_derivative f' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6631 |
"\<And>x. x\<in>{a<..<b} \<Longrightarrow> (g has_vector_derivative g' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6632 |
assumes "(\<lambda>x. prod (f x) (g' x)) integrable_on {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6633 |
shows "(\<lambda>x. prod (f' x) (g x)) integrable_on {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6634 |
by (rule integrable_by_parts_interior_strong[of _ "{}" _ _ f g f' g']) (insert assms, simp_all) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6635 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6636 |
lemma integrable_by_parts: |
64272 | 6637 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
6638 |
assumes "bounded_bilinear (prod)" "a \<le> b" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6639 |
"continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6640 |
assumes "\<And>x. x\<in>{a..b} \<Longrightarrow> (f has_vector_derivative f' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6641 |
"\<And>x. x\<in>{a..b} \<Longrightarrow> (g has_vector_derivative g' x) (at x)" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6642 |
assumes "(\<lambda>x. prod (f x) (g' x)) integrable_on {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6643 |
shows "(\<lambda>x. prod (f' x) (g x)) integrable_on {a..b}" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6644 |
by (rule integrable_by_parts_interior_strong[of _ "{}" _ _ f g f' g']) (insert assms, simp_all) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6645 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6646 |
|
63299 | 6647 |
subsection \<open>Integration by substitution\<close> |
6648 |
||
6649 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6650 |
lemma has_integral_substitution_general: |
63299 | 6651 |
fixes f :: "real \<Rightarrow> 'a::euclidean_space" and g :: "real \<Rightarrow> real" |
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6652 |
assumes s: "finite s" and le: "a \<le> b" |
63299 | 6653 |
and subset: "g ` {a..b} \<subseteq> {c..d}" |
6654 |
and f [continuous_intros]: "continuous_on {c..d} f" |
|
6655 |
and g [continuous_intros]: "continuous_on {a..b} g" |
|
6656 |
and deriv [derivative_intros]: |
|
6657 |
"\<And>x. x \<in> {a..b} - s \<Longrightarrow> (g has_field_derivative g' x) (at x within {a..b})" |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6658 |
shows "((\<lambda>x. g' x *\<^sub>R f (g x)) has_integral (integral {g a..g b} f - integral {g b..g a} f)) {a..b}" |
63299 | 6659 |
proof - |
6660 |
let ?F = "\<lambda>x. integral {c..g x} f" |
|
6661 |
have cont_int: "continuous_on {a..b} ?F" |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
6662 |
by (rule continuous_on_compose2[OF _ g subset] indefinite_integral_continuous_1 |
63299 | 6663 |
f integrable_continuous_real)+ |
6664 |
have deriv: "(((\<lambda>x. integral {c..x} f) \<circ> g) has_vector_derivative g' x *\<^sub>R f (g x)) |
|
6665 |
(at x within {a..b})" if "x \<in> {a..b} - s" for x |
|
6666 |
apply (rule has_vector_derivative_eq_rhs) |
|
6667 |
apply (rule vector_diff_chain_within) |
|
6668 |
apply (subst has_field_derivative_iff_has_vector_derivative [symmetric]) |
|
6669 |
apply (rule deriv that)+ |
|
6670 |
apply (rule has_vector_derivative_within_subset) |
|
6671 |
apply (rule integral_has_vector_derivative f)+ |
|
6672 |
using that le subset |
|
6673 |
apply blast+ |
|
6674 |
done |
|
6675 |
have deriv: "(?F has_vector_derivative g' x *\<^sub>R f (g x)) |
|
6676 |
(at x)" if "x \<in> {a..b} - (s \<union> {a,b})" for x |
|
6677 |
using deriv[of x] that by (simp add: at_within_closed_interval o_def) |
|
6678 |
||
6679 |
||
6680 |
have "((\<lambda>x. g' x *\<^sub>R f (g x)) has_integral (?F b - ?F a)) {a..b}" |
|
6681 |
using le cont_int s deriv cont_int |
|
6682 |
by (intro fundamental_theorem_of_calculus_interior_strong[of "s \<union> {a,b}"]) simp_all |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6683 |
also |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6684 |
from subset have "g x \<in> {c..d}" if "x \<in> {a..b}" for x using that by blast |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6685 |
from this[of a] this[of b] le have cd: "c \<le> g a" "g b \<le> d" "c \<le> g b" "g a \<le> d" by auto |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6686 |
have "integral {c..g b} f - integral {c..g a} f = integral {g a..g b} f - integral {g b..g a} f" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6687 |
proof cases |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6688 |
assume "g a \<le> g b" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6689 |
note le = le this |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6690 |
from cd have "integral {c..g a} f + integral {g a..g b} f = integral {c..g b} f" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6691 |
by (intro integral_combine integrable_continuous_real continuous_on_subset[OF f] le) simp_all |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6692 |
with le show ?thesis |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6693 |
by (cases "g a = g b") (simp_all add: algebra_simps) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6694 |
next |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6695 |
assume less: "\<not>g a \<le> g b" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6696 |
then have "g a \<ge> g b" by simp |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6697 |
note le = le this |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6698 |
from cd have "integral {c..g b} f + integral {g b..g a} f = integral {c..g a} f" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6699 |
by (intro integral_combine integrable_continuous_real continuous_on_subset[OF f] le) simp_all |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6700 |
with less show ?thesis |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6701 |
by (simp_all add: algebra_simps) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6702 |
qed |
63299 | 6703 |
finally show ?thesis . |
6704 |
qed |
|
6705 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6706 |
lemma has_integral_substitution_strong: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6707 |
fixes f :: "real \<Rightarrow> 'a::euclidean_space" and g :: "real \<Rightarrow> real" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6708 |
assumes s: "finite s" and le: "a \<le> b" "g a \<le> g b" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6709 |
and subset: "g ` {a..b} \<subseteq> {c..d}" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6710 |
and f [continuous_intros]: "continuous_on {c..d} f" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6711 |
and g [continuous_intros]: "continuous_on {a..b} g" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6712 |
and deriv [derivative_intros]: |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6713 |
"\<And>x. x \<in> {a..b} - s \<Longrightarrow> (g has_field_derivative g' x) (at x within {a..b})" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6714 |
shows "((\<lambda>x. g' x *\<^sub>R f (g x)) has_integral (integral {g a..g b} f)) {a..b}" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6715 |
using has_integral_substitution_general[OF s le(1) subset f g deriv] le(2) |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6716 |
by (cases "g a = g b") auto |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6717 |
|
63299 | 6718 |
lemma has_integral_substitution: |
6719 |
fixes f :: "real \<Rightarrow> 'a::euclidean_space" and g :: "real \<Rightarrow> real" |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6720 |
assumes "a \<le> b" "g a \<le> g b" "g ` {a..b} \<subseteq> {c..d}" |
63299 | 6721 |
and "continuous_on {c..d} f" |
6722 |
and "\<And>x. x \<in> {a..b} \<Longrightarrow> (g has_field_derivative g' x) (at x within {a..b})" |
|
6723 |
shows "((\<lambda>x. g' x *\<^sub>R f (g x)) has_integral (integral {g a..g b} f)) {a..b}" |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
6724 |
by (intro has_integral_substitution_strong[of "{}" a b g c d] assms) |
63299 | 6725 |
(auto intro: DERIV_continuous_on assms) |
6726 |
||
6727 |
||
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
6728 |
subsection \<open>Compute a double integral using iterated integrals and switching the order of integration\<close> |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6729 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6730 |
lemma continuous_on_imp_integrable_on_Pair1: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6731 |
fixes f :: "_ \<Rightarrow> 'b::banach" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6732 |
assumes con: "continuous_on (cbox (a,c) (b,d)) f" and x: "x \<in> cbox a b" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6733 |
shows "(\<lambda>y. f (x, y)) integrable_on (cbox c d)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6734 |
proof - |
61736 | 6735 |
have "f \<circ> (\<lambda>y. (x, y)) integrable_on (cbox c d)" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6736 |
apply (rule integrable_continuous) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6737 |
apply (rule continuous_on_compose [OF _ continuous_on_subset [OF con]]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6738 |
using x |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6739 |
apply (auto intro: continuous_on_Pair continuous_on_const continuous_on_id continuous_on_subset con) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6740 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6741 |
then show ?thesis |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6742 |
by (simp add: o_def) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6743 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6744 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6745 |
lemma integral_integrable_2dim: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6746 |
fixes f :: "('a::euclidean_space * 'b::euclidean_space) \<Rightarrow> 'c::banach" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6747 |
assumes "continuous_on (cbox (a,c) (b,d)) f" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6748 |
shows "(\<lambda>x. integral (cbox c d) (\<lambda>y. f (x,y))) integrable_on cbox a b" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6749 |
proof (cases "content(cbox c d) = 0") |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6750 |
case True |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6751 |
then show ?thesis |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6752 |
by (simp add: True integrable_const) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6753 |
next |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6754 |
case False |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6755 |
have uc: "uniformly_continuous_on (cbox (a,c) (b,d)) f" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6756 |
by (simp add: assms compact_cbox compact_uniformly_continuous) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6757 |
{ fix x::'a and e::real |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6758 |
assume x: "x \<in> cbox a b" and e: "0 < e" |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
6759 |
then have e2_gt: "0 < e/2 / content (cbox c d)" and e2_less: "e/2 / content (cbox c d) * content (cbox c d) < e" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6760 |
by (auto simp: False content_lt_nz e) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6761 |
then obtain dd |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6762 |
where dd: "\<And>x x'. \<lbrakk>x\<in>cbox (a, c) (b, d); x'\<in>cbox (a, c) (b, d); norm (x' - x) < dd\<rbrakk> |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6763 |
\<Longrightarrow> norm (f x' - f x) \<le> e/(2 * content (cbox c d))" "dd>0" |
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6764 |
using uc [unfolded uniformly_continuous_on_def, THEN spec, of "e/(2 * content (cbox c d))"] |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6765 |
by (auto simp: dist_norm intro: less_imp_le) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6766 |
have "\<exists>delta>0. \<forall>x'\<in>cbox a b. norm (x' - x) < delta \<longrightarrow> norm (integral (cbox c d) (\<lambda>u. f (x', u) - f (x, u))) < e" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6767 |
apply (rule_tac x=dd in exI) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6768 |
using dd e2_gt assms x |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6769 |
apply clarify |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6770 |
apply (rule le_less_trans [OF _ e2_less]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6771 |
apply (rule integrable_bound) |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6772 |
apply (auto intro: integrable_diff continuous_on_imp_integrable_on_Pair1) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6773 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6774 |
} note * = this |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6775 |
show ?thesis |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6776 |
apply (rule integrable_continuous) |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6777 |
apply (simp add: * continuous_on_iff dist_norm integral_diff [symmetric] continuous_on_imp_integrable_on_Pair1 [OF assms]) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6778 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6779 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6780 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6781 |
lemma integral_split: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6782 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::{real_normed_vector,complete_space}" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6783 |
assumes f: "f integrable_on (cbox a b)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6784 |
and k: "k \<in> Basis" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6785 |
shows "integral (cbox a b) f = |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6786 |
integral (cbox a b \<inter> {x. x\<bullet>k \<le> c}) f + |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6787 |
integral (cbox a b \<inter> {x. x\<bullet>k \<ge> c}) f" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6788 |
apply (rule integral_unique [OF has_integral_split [where c=c]]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6789 |
using k f |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6790 |
apply (auto simp: has_integral_integral [symmetric]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6791 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6792 |
|
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6793 |
lemma integral_swap_operativeI: |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6794 |
fixes f :: "('a::euclidean_space * 'b::euclidean_space) \<Rightarrow> 'c::banach" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6795 |
assumes f: "continuous_on s f" and e: "0 < e" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6796 |
shows "operative conj True |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6797 |
(\<lambda>k. \<forall>a b c d. |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6798 |
cbox (a,c) (b,d) \<subseteq> k \<and> cbox (a,c) (b,d) \<subseteq> s |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6799 |
\<longrightarrow> norm(integral (cbox (a,c) (b,d)) f - |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6800 |
integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. f((x,y))))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6801 |
\<le> e * content (cbox (a,c) (b,d)))" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6802 |
proof (standard, auto) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6803 |
fix a::'a and c::'b and b::'a and d::'b and u::'a and v::'a and w::'b and z::'b |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
6804 |
assume *: "box (a, c) (b, d) = {}" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6805 |
and cb1: "cbox (u, w) (v, z) \<subseteq> cbox (a, c) (b, d)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6806 |
and cb2: "cbox (u, w) (v, z) \<subseteq> s" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
6807 |
then have c0: "content (cbox (a, c) (b, d)) = 0" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
6808 |
using * unfolding content_eq_0_interior by simp |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6809 |
have c0': "content (cbox (u, w) (v, z)) = 0" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6810 |
by (fact content_0_subset [OF c0 cb1]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6811 |
show "norm (integral (cbox (u,w) (v,z)) f - integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x, y)))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6812 |
\<le> e * content (cbox (u,w) (v,z))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6813 |
using content_cbox_pair_eq0_D [OF c0'] |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6814 |
by (force simp add: c0') |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6815 |
next |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6816 |
fix a::'a and c::'b and b::'a and d::'b |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6817 |
and M::real and i::'a and j::'b |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6818 |
and u::'a and v::'a and w::'b and z::'b |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6819 |
assume ij: "(i,j) \<in> Basis" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6820 |
and n1: "\<forall>a' b' c' d'. |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6821 |
cbox (a',c') (b',d') \<subseteq> cbox (a,c) (b,d) \<and> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6822 |
cbox (a',c') (b',d') \<subseteq> {x. x \<bullet> (i,j) \<le> M} \<and> cbox (a',c') (b',d') \<subseteq> s \<longrightarrow> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6823 |
norm (integral (cbox (a',c') (b',d')) f - integral (cbox a' b') (\<lambda>x. integral (cbox c' d') (\<lambda>y. f (x,y)))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6824 |
\<le> e * content (cbox (a',c') (b',d'))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6825 |
and n2: "\<forall>a' b' c' d'. |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6826 |
cbox (a',c') (b',d') \<subseteq> cbox (a,c) (b,d) \<and> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6827 |
cbox (a',c') (b',d') \<subseteq> {x. M \<le> x \<bullet> (i,j)} \<and> cbox (a',c') (b',d') \<subseteq> s \<longrightarrow> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6828 |
norm (integral (cbox (a',c') (b',d')) f - integral (cbox a' b') (\<lambda>x. integral (cbox c' d') (\<lambda>y. f (x,y)))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6829 |
\<le> e * content (cbox (a',c') (b',d'))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6830 |
and subs: "cbox (u,w) (v,z) \<subseteq> cbox (a,c) (b,d)" "cbox (u,w) (v,z) \<subseteq> s" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6831 |
have fcont: "continuous_on (cbox (u, w) (v, z)) f" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6832 |
using assms(1) continuous_on_subset subs(2) by blast |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6833 |
then have fint: "f integrable_on cbox (u, w) (v, z)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6834 |
by (metis integrable_continuous) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6835 |
consider "i \<in> Basis" "j=0" | "j \<in> Basis" "i=0" using ij |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6836 |
by (auto simp: Euclidean_Space.Basis_prod_def) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6837 |
then show "norm (integral (cbox (u,w) (v,z)) f - integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x,y)))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6838 |
\<le> e * content (cbox (u,w) (v,z))" (is ?normle) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6839 |
proof cases |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6840 |
case 1 |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6841 |
then have e: "e * content (cbox (u, w) (v, z)) = |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6842 |
e * (content (cbox u v \<inter> {x. x \<bullet> i \<le> M}) * content (cbox w z)) + |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6843 |
e * (content (cbox u v \<inter> {x. M \<le> x \<bullet> i}) * content (cbox w z))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6844 |
by (simp add: content_split [where c=M] content_Pair algebra_simps) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6845 |
have *: "integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x, y))) = |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6846 |
integral (cbox u v \<inter> {x. x \<bullet> i \<le> M}) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x, y))) + |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6847 |
integral (cbox u v \<inter> {x. M \<le> x \<bullet> i}) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x, y)))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6848 |
using 1 f subs integral_integrable_2dim continuous_on_subset |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6849 |
by (blast intro: integral_split) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6850 |
show ?normle |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6851 |
apply (rule norm_diff2 [OF integral_split [where c=M, OF fint ij] * e]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6852 |
using 1 subs |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6853 |
apply (simp_all add: cbox_Pair_eq setcomp_dot1 [of "\<lambda>u. M\<le>u"] setcomp_dot1 [of "\<lambda>u. u\<le>M"] Sigma_Int_Paircomp1) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6854 |
apply (simp_all add: interval_split ij) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6855 |
apply (simp_all add: cbox_Pair_eq [symmetric] content_Pair [symmetric]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6856 |
apply (force simp add: interval_split [symmetric] intro!: n1 [rule_format]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6857 |
apply (force simp add: interval_split [symmetric] intro!: n2 [rule_format]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6858 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6859 |
next |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6860 |
case 2 |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6861 |
then have e: "e * content (cbox (u, w) (v, z)) = |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6862 |
e * (content (cbox u v) * content (cbox w z \<inter> {x. x \<bullet> j \<le> M})) + |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6863 |
e * (content (cbox u v) * content (cbox w z \<inter> {x. M \<le> x \<bullet> j}))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6864 |
by (simp add: content_split [where c=M] content_Pair algebra_simps) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6865 |
have "(\<lambda>x. integral (cbox w z \<inter> {x. x \<bullet> j \<le> M}) (\<lambda>y. f (x, y))) integrable_on cbox u v" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6866 |
"(\<lambda>x. integral (cbox w z \<inter> {x. M \<le> x \<bullet> j}) (\<lambda>y. f (x, y))) integrable_on cbox u v" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6867 |
using 2 subs |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6868 |
apply (simp_all add: interval_split) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6869 |
apply (rule_tac [!] integral_integrable_2dim [OF continuous_on_subset [OF f]]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6870 |
apply (auto simp: cbox_Pair_eq interval_split [symmetric]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6871 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6872 |
with 2 have *: "integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x, y))) = |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6873 |
integral (cbox u v) (\<lambda>x. integral (cbox w z \<inter> {x. x \<bullet> j \<le> M}) (\<lambda>y. f (x, y))) + |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6874 |
integral (cbox u v) (\<lambda>x. integral (cbox w z \<inter> {x. M \<le> x \<bullet> j}) (\<lambda>y. f (x, y)))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6875 |
by (simp add: integral_add [symmetric] integral_split [symmetric] |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6876 |
continuous_on_imp_integrable_on_Pair1 [OF fcont] cong: integral_cong) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6877 |
show ?normle |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6878 |
apply (rule norm_diff2 [OF integral_split [where c=M, OF fint ij] * e]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6879 |
using 2 subs |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6880 |
apply (simp_all add: cbox_Pair_eq setcomp_dot2 [of "\<lambda>u. M\<le>u"] setcomp_dot2 [of "\<lambda>u. u\<le>M"] Sigma_Int_Paircomp2) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6881 |
apply (simp_all add: interval_split ij) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6882 |
apply (simp_all add: cbox_Pair_eq [symmetric] content_Pair [symmetric]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6883 |
apply (force simp add: interval_split [symmetric] intro!: n1 [rule_format]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6884 |
apply (force simp add: interval_split [symmetric] intro!: n2 [rule_format]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6885 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6886 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6887 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6888 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6889 |
lemma integral_Pair_const: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6890 |
"integral (cbox (a,c) (b,d)) (\<lambda>x. k) = |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6891 |
integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. k))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6892 |
by (simp add: content_Pair) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6893 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6894 |
lemma integral_prod_continuous: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6895 |
fixes f :: "('a::euclidean_space * 'b::euclidean_space) \<Rightarrow> 'c::banach" |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6896 |
assumes "continuous_on (cbox (a, c) (b, d)) f" (is "continuous_on ?CBOX f") |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6897 |
shows "integral (cbox (a, c) (b, d)) f = integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. f (x, y)))" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6898 |
proof (cases "content ?CBOX = 0") |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6899 |
case True |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6900 |
then show ?thesis |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6901 |
by (auto simp: content_Pair) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6902 |
next |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6903 |
case False |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6904 |
then have cbp: "content ?CBOX > 0" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6905 |
using content_lt_nz by blast |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6906 |
have "norm (integral ?CBOX f - integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. f (x,y)))) = 0" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6907 |
proof (rule dense_eq0_I, simp) |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6908 |
fix e :: real |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6909 |
assume "0 < e" |
66505 | 6910 |
with \<open>content ?CBOX > 0\<close> have "0 < e/content ?CBOX" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6911 |
by simp |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6912 |
have f_int_acbd: "f integrable_on ?CBOX" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6913 |
by (rule integrable_continuous [OF assms]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6914 |
{ fix p |
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6915 |
assume p: "p division_of ?CBOX" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6916 |
then have "finite p" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6917 |
by blast |
66505 | 6918 |
define e' where "e' = e/content ?CBOX" |
6919 |
with \<open>0 < e\<close> \<open>0 < e/content ?CBOX\<close> |
|
66492
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6920 |
have "0 < e'" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6921 |
by simp |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6922 |
interpret operative conj True |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6923 |
"\<lambda>k. \<forall>a' b' c' d'. |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6924 |
cbox (a', c') (b', d') \<subseteq> k \<and> cbox (a', c') (b', d') \<subseteq> ?CBOX |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6925 |
\<longrightarrow> norm (integral (cbox (a', c') (b', d')) f - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6926 |
integral (cbox a' b') (\<lambda>x. integral (cbox c' d') (\<lambda>y. f ((x, y))))) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6927 |
\<le> e' * content (cbox (a', c') (b', d'))" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6928 |
using assms \<open>0 < e'\<close> by (rule integral_swap_operativeI) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6929 |
have "norm (integral ?CBOX f - integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. f (x, y)))) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6930 |
\<le> e' * content ?CBOX" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6931 |
if "\<And>t u v w z. t \<in> p \<Longrightarrow> cbox (u, w) (v, z) \<subseteq> t \<Longrightarrow> cbox (u, w) (v, z) \<subseteq> ?CBOX |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6932 |
\<Longrightarrow> norm (integral (cbox (u, w) (v, z)) f - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6933 |
integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x, y)))) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6934 |
\<le> e' * content (cbox (u, w) (v, z))" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6935 |
using that division [of p "(a, c)" "(b, d)"] p \<open>finite p\<close> by (auto simp add: comm_monoid_set_F_and) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6936 |
with False have "norm (integral ?CBOX f - integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. f (x, y)))) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6937 |
\<le> e" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6938 |
if "\<And>t u v w z. t \<in> p \<Longrightarrow> cbox (u, w) (v, z) \<subseteq> t \<Longrightarrow> cbox (u, w) (v, z) \<subseteq> ?CBOX |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6939 |
\<Longrightarrow> norm (integral (cbox (u, w) (v, z)) f - |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6940 |
integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x, y)))) |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6941 |
\<le> e * content (cbox (u, w) (v, z)) / content ?CBOX" |
d7206afe2d28
dedicated local for "operative" avoids namespace pollution
haftmann
parents:
66487
diff
changeset
|
6942 |
using that by (simp add: e'_def) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6943 |
} note op_acbd = this |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6944 |
{ fix k::real and \<D> and u::'a and v w and z::'b and t1 t2 l |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6945 |
assume k: "0 < k" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6946 |
and nf: "\<And>x y u v. |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6947 |
\<lbrakk>x \<in> cbox a b; y \<in> cbox c d; u \<in> cbox a b; v\<in>cbox c d; norm (u-x, v-y) < k\<rbrakk> |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6948 |
\<Longrightarrow> norm (f(u,v) - f(x,y)) < e/(2 * (content ?CBOX))" |
66495
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6949 |
and p_acbd: "\<D> tagged_division_of cbox (a,c) (b,d)" |
0b46bd081228
More tidying up of monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66487
diff
changeset
|
6950 |
and fine: "(\<lambda>x. ball x k) fine \<D>" "((t1,t2), l) \<in> \<D>" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6951 |
and uwvz_sub: "cbox (u,w) (v,z) \<subseteq> l" "cbox (u,w) (v,z) \<subseteq> cbox (a,c) (b,d)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6952 |
have t: "t1 \<in> cbox a b" "t2 \<in> cbox c d" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6953 |
by (meson fine p_acbd cbox_Pair_iff tag_in_interval)+ |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6954 |
have ls: "l \<subseteq> ball (t1,t2) k" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6955 |
using fine by (simp add: fine_def Ball_def) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6956 |
{ fix x1 x2 |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6957 |
assume xuvwz: "x1 \<in> cbox u v" "x2 \<in> cbox w z" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6958 |
then have x: "x1 \<in> cbox a b" "x2 \<in> cbox c d" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6959 |
using uwvz_sub by auto |
65036
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
6960 |
have "norm (x1 - t1, x2 - t2) = norm (t1 - x1, t2 - x2)" |
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
6961 |
by (simp add: norm_Pair norm_minus_commute) |
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
6962 |
also have "norm (t1 - x1, t2 - x2) < k" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6963 |
using xuvwz ls uwvz_sub unfolding ball_def |
65036
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
6964 |
by (force simp add: cbox_Pair_eq dist_norm ) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6965 |
finally have "norm (f (x1,x2) - f (t1,t2)) \<le> e/content ?CBOX / 2" |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6966 |
using nf [OF t x] by simp |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6967 |
} note nf' = this |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6968 |
have f_int_uwvz: "f integrable_on cbox (u,w) (v,z)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6969 |
using f_int_acbd uwvz_sub integrable_on_subcbox by blast |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6970 |
have f_int_uv: "\<And>x. x \<in> cbox u v \<Longrightarrow> (\<lambda>y. f (x,y)) integrable_on cbox w z" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6971 |
using assms continuous_on_subset uwvz_sub |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6972 |
by (blast intro: continuous_on_imp_integrable_on_Pair1) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6973 |
have 1: "norm (integral (cbox (u,w) (v,z)) f - integral (cbox (u,w) (v,z)) (\<lambda>x. f (t1,t2))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6974 |
\<le> e * content (cbox (u,w) (v,z)) / content ?CBOX / 2" |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6975 |
apply (simp only: integral_diff [symmetric] f_int_uwvz integrable_const) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6976 |
apply (rule order_trans [OF integrable_bound [of "e/content ?CBOX / 2"]]) |
66505 | 6977 |
using cbp \<open>0 < e/content ?CBOX\<close> nf' |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6978 |
apply (auto simp: integrable_diff f_int_uwvz integrable_const) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6979 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6980 |
have int_integrable: "(\<lambda>x. integral (cbox w z) (\<lambda>y. f (x, y))) integrable_on cbox u v" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6981 |
using assms integral_integrable_2dim continuous_on_subset uwvz_sub(2) by blast |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6982 |
have normint_wz: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6983 |
"\<And>x. x \<in> cbox u v \<Longrightarrow> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6984 |
norm (integral (cbox w z) (\<lambda>y. f (x, y)) - integral (cbox w z) (\<lambda>y. f (t1, t2))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6985 |
\<le> e * content (cbox w z) / content (cbox (a, c) (b, d)) / 2" |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6986 |
apply (simp only: integral_diff [symmetric] f_int_uv integrable_const) |
66487
307c19f24d5c
more on the dreadful monotone_convergence_interval
paulson <lp15@cam.ac.uk>
parents:
66437
diff
changeset
|
6987 |
apply (rule order_trans [OF integrable_bound [of "e/content ?CBOX / 2"]]) |
66505 | 6988 |
using cbp \<open>0 < e/content ?CBOX\<close> nf' |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6989 |
apply (auto simp: integrable_diff f_int_uv integrable_const) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6990 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6991 |
have "norm (integral (cbox u v) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6992 |
(\<lambda>x. integral (cbox w z) (\<lambda>y. f (x,y)) - integral (cbox w z) (\<lambda>y. f (t1,t2)))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6993 |
\<le> e * content (cbox w z) / content ?CBOX / 2 * content (cbox u v)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6994 |
apply (rule integrable_bound [OF _ _ normint_wz]) |
66505 | 6995 |
using cbp \<open>0 < e/content ?CBOX\<close> |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6996 |
apply (auto simp: divide_simps content_pos_le integrable_diff int_integrable integrable_const) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6997 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6998 |
also have "... \<le> e * content (cbox (u,w) (v,z)) / content ?CBOX / 2" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
6999 |
by (simp add: content_Pair divide_simps) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7000 |
finally have 2: "norm (integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x,y))) - |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7001 |
integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (t1,t2)))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7002 |
\<le> e * content (cbox (u,w) (v,z)) / content ?CBOX / 2" |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
7003 |
by (simp only: integral_diff [symmetric] int_integrable integrable_const) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7004 |
have norm_xx: "\<lbrakk>x' = y'; norm(x - x') \<le> e/2; norm(y - y') \<le> e/2\<rbrakk> \<Longrightarrow> norm(x - y) \<le> e" for x::'c and y x' y' e |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7005 |
using norm_triangle_mono [of "x-y'" "e/2" "y'-y" "e/2"] real_sum_of_halves |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7006 |
by (simp add: norm_minus_commute) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7007 |
have "norm (integral (cbox (u,w) (v,z)) f - integral (cbox u v) (\<lambda>x. integral (cbox w z) (\<lambda>y. f (x,y)))) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7008 |
\<le> e * content (cbox (u,w) (v,z)) / content ?CBOX" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7009 |
by (rule norm_xx [OF integral_Pair_const 1 2]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7010 |
} note * = this |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7011 |
show "norm (integral ?CBOX f - integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. f (x,y)))) \<le> e" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7012 |
using compact_uniformly_continuous [OF assms compact_cbox] |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7013 |
apply (simp add: uniformly_continuous_on_def dist_norm) |
66406
f8f4cf0fa42d
cleanup of integral_norm_bound_integral
paulson <lp15@cam.ac.uk>
parents:
66402
diff
changeset
|
7014 |
apply (drule_tac x="e/2 / content?CBOX" in spec) |
61222 | 7015 |
using cbp \<open>0 < e\<close> |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7016 |
apply (auto simp: zero_less_mult_iff) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7017 |
apply (rename_tac k) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7018 |
apply (rule_tac e1=k in fine_division_exists [OF gauge_ball, where a = "(a,c)" and b = "(b,d)"]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7019 |
apply assumption |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7020 |
apply (rule op_acbd) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7021 |
apply (erule division_of_tagged_division) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7022 |
using * |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7023 |
apply auto |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7024 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7025 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7026 |
then show ?thesis |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7027 |
by simp |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7028 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7029 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7030 |
lemma integral_swap_2dim: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7031 |
fixes f :: "['a::euclidean_space, 'b::euclidean_space] \<Rightarrow> 'c::banach" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7032 |
assumes "continuous_on (cbox (a,c) (b,d)) (\<lambda>(x,y). f x y)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7033 |
shows "integral (cbox (a, c) (b, d)) (\<lambda>(x, y). f x y) = integral (cbox (c, a) (d, b)) (\<lambda>(x, y). f y x)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7034 |
proof - |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7035 |
have "((\<lambda>(x, y). f x y) has_integral integral (cbox (c, a) (d, b)) (\<lambda>(x, y). f y x)) (prod.swap ` (cbox (c, a) (d, b)))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7036 |
apply (rule has_integral_twiddle [of 1 prod.swap prod.swap "\<lambda>(x,y). f y x" "integral (cbox (c, a) (d, b)) (\<lambda>(x, y). f y x)", simplified]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7037 |
apply (auto simp: isCont_swap content_Pair has_integral_integral [symmetric] integrable_continuous swap_continuous assms) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7038 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7039 |
then show ?thesis |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7040 |
by force |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7041 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7042 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7043 |
theorem integral_swap_continuous: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7044 |
fixes f :: "['a::euclidean_space, 'b::euclidean_space] \<Rightarrow> 'c::banach" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7045 |
assumes "continuous_on (cbox (a,c) (b,d)) (\<lambda>(x,y). f x y)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7046 |
shows "integral (cbox a b) (\<lambda>x. integral (cbox c d) (f x)) = |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7047 |
integral (cbox c d) (\<lambda>y. integral (cbox a b) (\<lambda>x. f x y))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7048 |
proof - |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7049 |
have "integral (cbox a b) (\<lambda>x. integral (cbox c d) (f x)) = integral (cbox (a, c) (b, d)) (\<lambda>(x, y). f x y)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7050 |
using integral_prod_continuous [OF assms] by auto |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7051 |
also have "... = integral (cbox (c, a) (d, b)) (\<lambda>(x, y). f y x)" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7052 |
by (rule integral_swap_2dim [OF assms]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7053 |
also have "... = integral (cbox c d) (\<lambda>y. integral (cbox a b) (\<lambda>x. f x y))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7054 |
using integral_prod_continuous [OF swap_continuous] assms |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7055 |
by auto |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7056 |
finally show ?thesis . |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7057 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7058 |
|
63296 | 7059 |
|
7060 |
subsection \<open>Definite integrals for exponential and power function\<close> |
|
7061 |
||
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7062 |
lemma has_integral_exp_minus_to_infinity: |
63296 | 7063 |
assumes a: "a > 0" |
7064 |
shows "((\<lambda>x::real. exp (-a*x)) has_integral exp (-a*c)/a) {c..}" |
|
7065 |
proof - |
|
7066 |
define f where "f = (\<lambda>k x. if x \<in> {c..real k} then exp (-a*x) else 0)" |
|
7067 |
||
7068 |
{ |
|
7069 |
fix k :: nat assume k: "of_nat k \<ge> c" |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7070 |
from k a |
63296 | 7071 |
have "((\<lambda>x. exp (-a*x)) has_integral (-exp (-a*real k)/a - (-exp (-a*c)/a))) {c..real k}" |
7072 |
by (intro fundamental_theorem_of_calculus) |
|
7073 |
(auto intro!: derivative_eq_intros |
|
7074 |
simp: has_field_derivative_iff_has_vector_derivative [symmetric]) |
|
7075 |
hence "(f k has_integral (exp (-a*c)/a - exp (-a*real k)/a)) {c..}" unfolding f_def |
|
7076 |
by (subst has_integral_restrict) simp_all |
|
7077 |
} note has_integral_f = this |
|
7078 |
||
7079 |
have [simp]: "f k = (\<lambda>_. 0)" if "of_nat k < c" for k using that by (auto simp: fun_eq_iff f_def) |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7080 |
have integral_f: "integral {c..} (f k) = |
63296 | 7081 |
(if real k \<ge> c then exp (-a*c)/a - exp (-a*real k)/a else 0)" |
7082 |
for k using integral_unique[OF has_integral_f[of k]] by simp |
|
7083 |
||
7084 |
have A: "(\<lambda>x. exp (-a*x)) integrable_on {c..} \<and> |
|
7085 |
(\<lambda>k. integral {c..} (f k)) \<longlonglongrightarrow> integral {c..} (\<lambda>x. exp (-a*x))" |
|
7086 |
proof (intro monotone_convergence_increasing allI ballI) |
|
7087 |
fix k ::nat |
|
7088 |
have "(\<lambda>x. exp (-a*x)) integrable_on {c..of_real k}" (is ?P) |
|
7089 |
unfolding f_def by (auto intro!: continuous_intros integrable_continuous_real) |
|
7090 |
hence int: "(f k) integrable_on {c..of_real k}" |
|
7091 |
by (rule integrable_eq[rotated]) (simp add: f_def) |
|
7092 |
show "f k integrable_on {c..}" |
|
7093 |
by (rule integrable_on_superset[OF _ _ int]) (auto simp: f_def) |
|
7094 |
next |
|
7095 |
fix x assume x: "x \<in> {c..}" |
|
7096 |
have "sequentially \<le> principal {nat \<lceil>x\<rceil>..}" unfolding at_top_def by (simp add: Inf_lower) |
|
7097 |
also have "{nat \<lceil>x\<rceil>..} \<subseteq> {k. x \<le> real k}" by auto |
|
7098 |
also have "inf (principal \<dots>) (principal {k. \<not>x \<le> real k}) = |
|
7099 |
principal ({k. x \<le> real k} \<inter> {k. \<not>x \<le> real k})" by simp |
|
7100 |
also have "{k. x \<le> real k} \<inter> {k. \<not>x \<le> real k} = {}" by blast |
|
7101 |
finally have "inf sequentially (principal {k. \<not>x \<le> real k}) = bot" |
|
7102 |
by (simp add: inf.coboundedI1 bot_unique) |
|
7103 |
with x show "(\<lambda>k. f k x) \<longlonglongrightarrow> exp (-a*x)" unfolding f_def |
|
7104 |
by (intro filterlim_If) auto |
|
7105 |
next |
|
7106 |
have "\<bar>integral {c..} (f k)\<bar> \<le> exp (-a*c)/a" for k |
|
7107 |
proof (cases "c > of_nat k") |
|
7108 |
case False |
|
7109 |
hence "abs (integral {c..} (f k)) = abs (exp (- (a * c)) / a - exp (- (a * real k)) / a)" |
|
7110 |
by (simp add: integral_f) |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7111 |
also have "abs (exp (- (a * c)) / a - exp (- (a * real k)) / a) = |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7112 |
exp (- (a * c)) / a - exp (- (a * real k)) / a" |
63296 | 7113 |
using False a by (intro abs_of_nonneg) (simp_all add: field_simps) |
7114 |
also have "\<dots> \<le> exp (- a * c) / a" using a by simp |
|
7115 |
finally show ?thesis . |
|
7116 |
qed (insert a, simp_all add: integral_f) |
|
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
7117 |
thus "bounded (range(\<lambda>k. integral {c..} (f k)))" |
65036
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
7118 |
by (intro boundedI[of _ "exp (-a*c)/a"]) auto |
63296 | 7119 |
qed (auto simp: f_def) |
7120 |
||
7121 |
from eventually_gt_at_top[of "nat \<lceil>c\<rceil>"] have "eventually (\<lambda>k. of_nat k > c) sequentially" |
|
7122 |
by eventually_elim linarith |
|
7123 |
hence "eventually (\<lambda>k. exp (-a*c)/a - exp (-a * of_nat k)/a = integral {c..} (f k)) sequentially" |
|
7124 |
by eventually_elim (simp add: integral_f) |
|
7125 |
moreover have "(\<lambda>k. exp (-a*c)/a - exp (-a * of_nat k)/a) \<longlonglongrightarrow> exp (-a*c)/a - 0/a" |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7126 |
by (intro tendsto_intros filterlim_compose[OF exp_at_bot] |
63296 | 7127 |
filterlim_tendsto_neg_mult_at_bot[OF tendsto_const] filterlim_real_sequentially)+ |
7128 |
(insert a, simp_all) |
|
7129 |
ultimately have "(\<lambda>k. integral {c..} (f k)) \<longlonglongrightarrow> exp (-a*c)/a - 0/a" |
|
7130 |
by (rule Lim_transform_eventually) |
|
7131 |
from LIMSEQ_unique[OF conjunct2[OF A] this] |
|
7132 |
have "integral {c..} (\<lambda>x. exp (-a*x)) = exp (-a*c)/a" by simp |
|
7133 |
with conjunct1[OF A] show ?thesis |
|
7134 |
by (simp add: has_integral_integral) |
|
7135 |
qed |
|
7136 |
||
7137 |
lemma integrable_on_exp_minus_to_infinity: "a > 0 \<Longrightarrow> (\<lambda>x. exp (-a*x) :: real) integrable_on {c..}" |
|
7138 |
using has_integral_exp_minus_to_infinity[of a c] unfolding integrable_on_def by blast |
|
7139 |
||
7140 |
lemma has_integral_powr_from_0: |
|
7141 |
assumes a: "a > (-1::real)" and c: "c \<ge> 0" |
|
7142 |
shows "((\<lambda>x. x powr a) has_integral (c powr (a+1) / (a+1))) {0..c}" |
|
7143 |
proof (cases "c = 0") |
|
7144 |
case False |
|
7145 |
define f where "f = (\<lambda>k x. if x \<in> {inverse (of_nat (Suc k))..c} then x powr a else 0)" |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7146 |
define F where "F = (\<lambda>k. if inverse (of_nat (Suc k)) \<le> c then |
63296 | 7147 |
c powr (a+1)/(a+1) - inverse (real (Suc k)) powr (a+1)/(a+1) else 0)" |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7148 |
|
63296 | 7149 |
{ |
7150 |
fix k :: nat |
|
7151 |
have "(f k has_integral F k) {0..c}" |
|
7152 |
proof (cases "inverse (of_nat (Suc k)) \<le> c") |
|
7153 |
case True |
|
7154 |
{ |
|
7155 |
fix x assume x: "x \<ge> inverse (1 + real k)" |
|
7156 |
have "0 < inverse (1 + real k)" by simp |
|
7157 |
also note x |
|
7158 |
finally have "x > 0" . |
|
7159 |
} note x = this |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7160 |
hence "((\<lambda>x. x powr a) has_integral c powr (a + 1) / (a + 1) - |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7161 |
inverse (real (Suc k)) powr (a + 1) / (a + 1)) {inverse (real (Suc k))..c}" |
63296 | 7162 |
using True a by (intro fundamental_theorem_of_calculus) |
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7163 |
(auto intro!: derivative_eq_intros continuous_on_powr' continuous_on_const |
63296 | 7164 |
continuous_on_id simp: has_field_derivative_iff_has_vector_derivative [symmetric]) |
7165 |
with True show ?thesis unfolding f_def F_def by (subst has_integral_restrict) simp_all |
|
7166 |
next |
|
7167 |
case False |
|
7168 |
thus ?thesis unfolding f_def F_def by (subst has_integral_restrict) auto |
|
7169 |
qed |
|
7170 |
} note has_integral_f = this |
|
7171 |
have integral_f: "integral {0..c} (f k) = F k" for k |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7172 |
using has_integral_f[of k] by (rule integral_unique) |
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7173 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7174 |
have A: "(\<lambda>x. x powr a) integrable_on {0..c} \<and> |
63296 | 7175 |
(\<lambda>k. integral {0..c} (f k)) \<longlonglongrightarrow> integral {0..c} (\<lambda>x. x powr a)" |
7176 |
proof (intro monotone_convergence_increasing ballI allI) |
|
7177 |
fix k from has_integral_f[of k] show "f k integrable_on {0..c}" |
|
7178 |
by (auto simp: integrable_on_def) |
|
7179 |
next |
|
7180 |
fix k :: nat and x :: real |
|
7181 |
{ |
|
7182 |
assume x: "inverse (real (Suc k)) \<le> x" |
|
7183 |
have "inverse (real (Suc (Suc k))) \<le> inverse (real (Suc k))" by (simp add: field_simps) |
|
7184 |
also note x |
|
7185 |
finally have "inverse (real (Suc (Suc k))) \<le> x" . |
|
7186 |
} |
|
7187 |
thus "f k x \<le> f (Suc k) x" by (auto simp: f_def simp del: of_nat_Suc) |
|
7188 |
next |
|
7189 |
fix x assume x: "x \<in> {0..c}" |
|
7190 |
show "(\<lambda>k. f k x) \<longlonglongrightarrow> x powr a" |
|
7191 |
proof (cases "x = 0") |
|
7192 |
case False |
|
7193 |
with x have "x > 0" by simp |
|
7194 |
from order_tendstoD(2)[OF LIMSEQ_inverse_real_of_nat this] |
|
7195 |
have "eventually (\<lambda>k. x powr a = f k x) sequentially" |
|
7196 |
by eventually_elim (insert x, simp add: f_def) |
|
7197 |
moreover have "(\<lambda>_. x powr a) \<longlonglongrightarrow> x powr a" by simp |
|
7198 |
ultimately show ?thesis by (rule Lim_transform_eventually) |
|
7199 |
qed (simp_all add: f_def) |
|
7200 |
next |
|
7201 |
{ |
|
7202 |
fix k |
|
7203 |
from a have "F k \<le> c powr (a + 1) / (a + 1)" |
|
7204 |
by (auto simp add: F_def divide_simps) |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7205 |
also from a have "F k \<ge> 0" |
63296 | 7206 |
by (auto simp: F_def divide_simps simp del: of_nat_Suc intro!: powr_mono2) |
7207 |
hence "F k = abs (F k)" by simp |
|
7208 |
finally have "abs (F k) \<le> c powr (a + 1) / (a + 1)" . |
|
7209 |
} |
|
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
7210 |
thus "bounded (range(\<lambda>k. integral {0..c} (f k)))" |
65036
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
7211 |
by (intro boundedI[of _ "c powr (a+1) / (a+1)"]) (auto simp: integral_f) |
63296 | 7212 |
qed |
7213 |
||
7214 |
from False c have "c > 0" by simp |
|
7215 |
from order_tendstoD(2)[OF LIMSEQ_inverse_real_of_nat this] |
|
7216 |
have "eventually (\<lambda>k. c powr (a + 1) / (a + 1) - inverse (real (Suc k)) powr (a+1) / (a+1) = |
|
7217 |
integral {0..c} (f k)) sequentially" |
|
7218 |
by eventually_elim (simp add: integral_f F_def) |
|
7219 |
moreover have "(\<lambda>k. c powr (a + 1) / (a + 1) - inverse (real (Suc k)) powr (a + 1) / (a + 1)) |
|
7220 |
\<longlonglongrightarrow> c powr (a + 1) / (a + 1) - 0 powr (a + 1) / (a + 1)" |
|
7221 |
using a by (intro tendsto_intros LIMSEQ_inverse_real_of_nat) auto |
|
7222 |
hence "(\<lambda>k. c powr (a + 1) / (a + 1) - inverse (real (Suc k)) powr (a + 1) / (a + 1)) |
|
7223 |
\<longlonglongrightarrow> c powr (a + 1) / (a + 1)" by simp |
|
7224 |
ultimately have "(\<lambda>k. integral {0..c} (f k)) \<longlonglongrightarrow> c powr (a+1) / (a+1)" |
|
7225 |
by (rule Lim_transform_eventually) |
|
7226 |
with A have "integral {0..c} (\<lambda>x. x powr a) = c powr (a+1) / (a+1)" |
|
7227 |
by (blast intro: LIMSEQ_unique) |
|
7228 |
with A show ?thesis by (simp add: has_integral_integral) |
|
7229 |
qed (simp_all add: has_integral_refl) |
|
7230 |
||
7231 |
lemma integrable_on_powr_from_0: |
|
7232 |
assumes a: "a > (-1::real)" and c: "c \<ge> 0" |
|
7233 |
shows "(\<lambda>x. x powr a) integrable_on {0..c}" |
|
7234 |
using has_integral_powr_from_0[OF assms] unfolding integrable_on_def by blast |
|
7235 |
||
63721 | 7236 |
lemma has_integral_powr_to_inf: |
7237 |
fixes a e :: real |
|
7238 |
assumes "e < -1" "a > 0" |
|
7239 |
shows "((\<lambda>x. x powr e) has_integral -(a powr (e + 1)) / (e + 1)) {a..}" |
|
7240 |
proof - |
|
7241 |
define f :: "nat \<Rightarrow> real \<Rightarrow> real" where "f = (\<lambda>n x. if x \<in> {a..n} then x powr e else 0)" |
|
7242 |
define F where "F = (\<lambda>x. x powr (e + 1) / (e + 1))" |
|
7243 |
||
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7244 |
have has_integral_f: "(f n has_integral (F n - F a)) {a..}" |
63721 | 7245 |
if n: "n \<ge> a" for n :: nat |
7246 |
proof - |
|
7247 |
from n assms have "((\<lambda>x. x powr e) has_integral (F n - F a)) {a..n}" |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7248 |
by (intro fundamental_theorem_of_calculus) (auto intro!: derivative_eq_intros |
63721 | 7249 |
simp: has_field_derivative_iff_has_vector_derivative [symmetric] F_def) |
7250 |
hence "(f n has_integral (F n - F a)) {a..n}" |
|
7251 |
by (rule has_integral_eq [rotated]) (simp add: f_def) |
|
7252 |
thus "(f n has_integral (F n - F a)) {a..}" |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
7253 |
by (rule has_integral_on_superset) (auto simp: f_def) |
63721 | 7254 |
qed |
7255 |
have integral_f: "integral {a..} (f n) = (if n \<ge> a then F n - F a else 0)" for n :: nat |
|
7256 |
proof (cases "n \<ge> a") |
|
7257 |
case True |
|
7258 |
with has_integral_f[OF this] show ?thesis by (simp add: integral_unique) |
|
7259 |
next |
|
7260 |
case False |
|
7261 |
have "(f n has_integral 0) {a}" by (rule has_integral_refl) |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7262 |
hence "(f n has_integral 0) {a..}" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
7263 |
by (rule has_integral_on_superset) (insert False, simp_all add: f_def) |
63721 | 7264 |
with False show ?thesis by (simp add: integral_unique) |
7265 |
qed |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7266 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7267 |
have *: "(\<lambda>x. x powr e) integrable_on {a..} \<and> |
63721 | 7268 |
(\<lambda>n. integral {a..} (f n)) \<longlonglongrightarrow> integral {a..} (\<lambda>x. x powr e)" |
7269 |
proof (intro monotone_convergence_increasing allI ballI) |
|
7270 |
fix n :: nat |
|
7271 |
from assms have "(\<lambda>x. x powr e) integrable_on {a..n}" |
|
7272 |
by (auto intro!: integrable_continuous_real continuous_intros) |
|
7273 |
hence "f n integrable_on {a..n}" |
|
7274 |
by (rule integrable_eq [rotated]) (auto simp: f_def) |
|
7275 |
thus "f n integrable_on {a..}" |
|
7276 |
by (rule integrable_on_superset [rotated 2]) (auto simp: f_def) |
|
7277 |
next |
|
7278 |
fix n :: nat and x :: real |
|
7279 |
show "f n x \<le> f (Suc n) x" by (auto simp: f_def) |
|
7280 |
next |
|
7281 |
fix x :: real assume x: "x \<in> {a..}" |
|
7282 |
from filterlim_real_sequentially |
|
7283 |
have "eventually (\<lambda>n. real n \<ge> x) at_top" |
|
7284 |
by (simp add: filterlim_at_top) |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7285 |
with x have "eventually (\<lambda>n. f n x = x powr e) at_top" |
63721 | 7286 |
by (auto elim!: eventually_mono simp: f_def) |
7287 |
thus "(\<lambda>n. f n x) \<longlonglongrightarrow> x powr e" by (simp add: Lim_eventually) |
|
7288 |
next |
|
7289 |
have "norm (integral {a..} (f n)) \<le> -F a" for n :: nat |
|
7290 |
proof (cases "n \<ge> a") |
|
7291 |
case True |
|
7292 |
with assms have "a powr (e + 1) \<ge> n powr (e + 1)" |
|
7293 |
by (intro powr_mono2') simp_all |
|
7294 |
with assms show ?thesis by (auto simp: divide_simps F_def integral_f) |
|
7295 |
qed (insert assms, simp add: integral_f F_def divide_simps) |
|
66408
46cfd348c373
general rationalisation of Analysis
paulson <lp15@cam.ac.uk>
parents:
66406
diff
changeset
|
7296 |
thus "bounded (range(\<lambda>k. integral {a..} (f k)))" |
63721 | 7297 |
unfolding bounded_iff by (intro exI[of _ "-F a"]) auto |
7298 |
qed |
|
7299 |
||
7300 |
from filterlim_real_sequentially |
|
7301 |
have "eventually (\<lambda>n. real n \<ge> a) at_top" |
|
7302 |
by (simp add: filterlim_at_top) |
|
7303 |
hence "eventually (\<lambda>n. F n - F a = integral {a..} (f n)) at_top" |
|
7304 |
by eventually_elim (simp add: integral_f) |
|
7305 |
moreover have "(\<lambda>n. F n - F a) \<longlonglongrightarrow> 0 / (e + 1) - F a" unfolding F_def |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7306 |
by (insert assms, (rule tendsto_intros filterlim_compose[OF tendsto_neg_powr] |
63721 | 7307 |
filterlim_ident filterlim_real_sequentially | simp)+) |
7308 |
hence "(\<lambda>n. F n - F a) \<longlonglongrightarrow> -F a" by simp |
|
7309 |
ultimately have "(\<lambda>n. integral {a..} (f n)) \<longlonglongrightarrow> -F a" by (rule Lim_transform_eventually) |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7310 |
from conjunct2[OF *] and this |
63721 | 7311 |
have "integral {a..} (\<lambda>x. x powr e) = -F a" by (rule LIMSEQ_unique) |
7312 |
with conjunct1[OF *] show ?thesis |
|
7313 |
by (simp add: has_integral_integral F_def) |
|
7314 |
qed |
|
7315 |
||
7316 |
lemma has_integral_inverse_power_to_inf: |
|
7317 |
fixes a :: real and n :: nat |
|
7318 |
assumes "n > 1" "a > 0" |
|
7319 |
shows "((\<lambda>x. 1 / x ^ n) has_integral 1 / (real (n - 1) * a ^ (n - 1))) {a..}" |
|
7320 |
proof - |
|
7321 |
from assms have "real_of_int (-int n) < -1" by simp |
|
7322 |
note has_integral_powr_to_inf[OF this \<open>a > 0\<close>] |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7323 |
also have "- (a powr (real_of_int (- int n) + 1)) / (real_of_int (- int n) + 1) = |
63721 | 7324 |
1 / (real (n - 1) * a powr (real (n - 1)))" using assms |
7325 |
by (simp add: divide_simps powr_add [symmetric] of_nat_diff) |
|
7326 |
also from assms have "a powr (real (n - 1)) = a ^ (n - 1)" |
|
7327 |
by (intro powr_realpow) |
|
7328 |
finally show ?thesis |
|
7329 |
by (rule has_integral_eq [rotated]) |
|
7330 |
(insert assms, simp_all add: powr_minus powr_realpow divide_simps) |
|
7331 |
qed |
|
7332 |
||
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7333 |
subsubsection \<open>Adaption to ordered Euclidean spaces and the Cartesian Euclidean space\<close> |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7334 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7335 |
lemma integral_component_eq_cart[simp]: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7336 |
fixes f :: "'n::euclidean_space \<Rightarrow> real^'m" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7337 |
assumes "f integrable_on s" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7338 |
shows "integral s (\<lambda>x. f x $ k) = integral s f $ k" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7339 |
using integral_linear[OF assms(1) bounded_linear_component_cart,unfolded o_def] . |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7340 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7341 |
lemma content_closed_interval: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7342 |
fixes a :: "'a::ordered_euclidean_space" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7343 |
assumes "a \<le> b" |
66402 | 7344 |
shows "content {a..b} = (\<Prod>i\<in>Basis. b\<bullet>i - a\<bullet>i)" |
66409 | 7345 |
using content_cbox[of a b] assms by (simp add: cbox_interval eucl_le[where 'a='a]) |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7346 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7347 |
lemma integrable_const_ivl[intro]: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7348 |
fixes a::"'a::ordered_euclidean_space" |
66402 | 7349 |
shows "(\<lambda>x. c) integrable_on {a..b}" |
66409 | 7350 |
unfolding cbox_interval[symmetric] by (rule integrable_const) |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7351 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7352 |
lemma integrable_on_subinterval: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7353 |
fixes f :: "'n::ordered_euclidean_space \<Rightarrow> 'a::banach" |
66409 | 7354 |
assumes "f integrable_on s" "{a..b} \<subseteq> s" |
66402 | 7355 |
shows "f integrable_on {a..b}" |
66409 | 7356 |
using integrable_on_subcbox[of f s a b] assms by (simp add: cbox_interval) |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7357 |
|
35173
9b24bfca8044
Renamed Multivariate-Analysis/Integration to Multivariate-Analysis/Integration_MV to avoid name clash with Integration.
hoelzl
parents:
35172
diff
changeset
|
7358 |
end |