author | paulson <lp15@cam.ac.uk> |
Wed, 09 Aug 2017 23:41:47 +0200 | |
changeset 66388 | 8e614c223000 |
parent 66387 | 5db8427fdfd3 |
child 66400 | abb7f0a71e74 |
permissions | -rw-r--r-- |
53399 | 1 |
(* Author: John Harrison |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
2 |
Author: Robert Himmelmann, TU Muenchen (Translation from HOL light); proofs reworked by LCP |
53399 | 3 |
*) |
4 |
||
63594
bd218a9320b5
HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents:
63593
diff
changeset
|
5 |
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
|
6 |
|
bd218a9320b5
HOL-Multivariate_Analysis: rename theories for more descriptive names
hoelzl
parents:
63593
diff
changeset
|
7 |
theory Henstock_Kurzweil_Integration |
41413
64cd30d6b0b8
explicit file specifications -- avoid secondary load path;
wenzelm
parents:
40513
diff
changeset
|
8 |
imports |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
9 |
Lebesgue_Measure Tagged_Division |
35172 | 10 |
begin |
11 |
||
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
12 |
lemma norm_triangle_le_sub: "norm x + norm y \<le> e \<Longrightarrow> norm (x - y) \<le> e" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
13 |
apply (subst(asm)(2) norm_minus_cancel[symmetric]) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
14 |
apply (drule norm_triangle_le) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
15 |
apply (auto simp add: algebra_simps) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
16 |
done |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
17 |
|
66359 | 18 |
lemma eps_leI: |
19 |
assumes "(\<And>e::'a::linordered_idom. 0 < e \<Longrightarrow> x < y + e)" shows "x \<le> y" |
|
20 |
by (metis add_diff_eq assms diff_diff_add diff_gt_0_iff_gt linorder_not_less order_less_irrefl) |
|
21 |
||
66193 | 22 |
(*FIXME DELETE*) |
23 |
lemma conjunctD2: assumes "a \<and> b" shows a b using assms by auto |
|
24 |
||
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
|
25 |
(* try instead structured proofs below *) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
26 |
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
|
27 |
\<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
|
28 |
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
|
29 |
by (simp add: add_diff_add) |
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 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
|
32 |
by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
33 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
34 |
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
|
35 |
by auto |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
36 |
|
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
37 |
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
|
38 |
by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
39 |
|
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
40 |
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
|
41 |
by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
42 |
(* END MOVE *) |
59425 | 43 |
|
60420 | 44 |
subsection \<open>Content (length, area, volume...) of an interval.\<close> |
35172 | 45 |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
46 |
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
|
47 |
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
|
48 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
49 |
lemma content_cbox_cases: |
64272 | 50 |
"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
|
51 |
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
|
52 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
53 |
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
|
54 |
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
|
55 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
56 |
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
|
57 |
by (simp add: box_ne_empty inner_diff) |
49970 | 58 |
|
66296
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
59 |
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
|
60 |
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
|
61 |
|
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
62 |
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
|
63 |
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
|
64 |
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
|
65 |
proof - |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
66 |
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
|
67 |
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
|
68 |
then show ?thesis |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
69 |
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
|
70 |
qed |
33a47f2d9edc
New theory of Equiintegrability / Continuity of the indefinite integral / improper integration
paulson <lp15@cam.ac.uk>
parents:
66294
diff
changeset
|
71 |
|
53408 | 72 |
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
|
73 |
by simp |
56188 | 74 |
|
61945 | 75 |
lemma abs_eq_content: "\<bar>y - x\<bar> = (if x\<le>y then content {x .. y} else content {y..x})" |
61204 | 76 |
by (auto simp: content_real) |
77 |
||
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
78 |
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
|
79 |
by simp |
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_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
|
82 |
by simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
83 |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
84 |
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
|
85 |
by simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
86 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
87 |
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
|
88 |
using not_le by blast |
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: "\<forall>i\<in>Basis. a\<bullet>i < b\<bullet>i \<Longrightarrow> 0 < content (cbox a b)" |
64272 | 91 |
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
|
92 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
93 |
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
|
94 |
by (auto simp: content_cbox_cases not_le intro: less_imp_le antisym eq_refl) |
56188 | 95 |
|
96 |
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
|
97 |
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
|
98 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
99 |
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 | 100 |
by (auto simp add: content_cbox_cases less_le prod_nonneg) |
49970 | 101 |
|
53399 | 102 |
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
|
103 |
by simp |
35172 | 104 |
|
60762 | 105 |
lemma content_real_if [simp]: "content {a..b} = (if a \<le> b then b - a else 0)" |
106 |
by (simp add: content_real) |
|
107 |
||
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
108 |
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
|
109 |
unfolding measure_def |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
110 |
by (intro enn2real_mono emeasure_mono) (auto simp: emeasure_lborel_cbox_eq) |
56188 | 111 |
|
112 |
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
|
113 |
unfolding content_pos_lt_eq content_eq_0 unfolding not_ex not_le by fastforce |
35172 | 114 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
115 |
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
|
116 |
unfolding measure_lborel_cbox_eq Basis_prod_def |
64272 | 117 |
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
|
118 |
apply (auto simp: bex_Un ball_Un) |
64272 | 119 |
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
|
120 |
apply auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
121 |
done |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
122 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
123 |
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
|
124 |
"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
|
125 |
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
|
126 |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
127 |
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
|
128 |
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
|
129 |
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
|
130 |
|
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 |
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
|
132 |
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
|
133 |
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
|
134 |
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 | 135 |
\<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
|
136 |
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
|
137 |
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
|
138 |
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
|
139 |
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
|
140 |
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
|
141 |
"(\<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
|
142 |
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
|
143 |
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
|
144 |
apply (subst *(1)) |
64272 | 145 |
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
|
146 |
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
|
147 |
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
|
148 |
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
|
149 |
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
|
150 |
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
|
151 |
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
|
152 |
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
|
153 |
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
|
154 |
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
|
155 |
(\<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
|
156 |
"(\<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
|
157 |
(\<Prod>i\<in>Basis. b \<bullet> i - (if i = k then max (a \<bullet> k) c else a \<bullet> i))" |
64272 | 158 |
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
|
159 |
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
|
160 |
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
|
161 |
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
|
162 |
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
|
163 |
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
|
164 |
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
|
165 |
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
|
166 |
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
|
167 |
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
|
168 |
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
|
169 |
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
|
170 |
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
|
171 |
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
|
172 |
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
|
173 |
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
|
174 |
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
|
175 |
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
|
176 |
|
49970 | 177 |
lemma division_of_content_0: |
56188 | 178 |
assumes "content (cbox a b) = 0" "d division_of (cbox a b)" |
49970 | 179 |
shows "\<forall>k\<in>d. content k = 0" |
180 |
unfolding forall_in_division[OF assms(2)] |
|
60384 | 181 |
by (metis antisym_conv assms content_pos_le content_subset division_ofD(2)) |
49970 | 182 |
|
64267 | 183 |
lemma sum_content_null: |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
184 |
assumes "content (cbox a b) = 0" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
185 |
and "p tagged_division_of (cbox a b)" |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
186 |
shows "(\<Sum>(x,k)\<in>p. content k *\<^sub>R f x) = (0::'a::real_normed_vector)" |
64267 | 187 |
proof (rule sum.neutral, rule) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
188 |
fix y |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
189 |
assume y: "y \<in> p" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
190 |
obtain x k where xk: "y = (x, k)" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
191 |
using surj_pair[of y] by blast |
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
192 |
then obtain c d where k: "k = cbox c d" "k \<subseteq> cbox a b" |
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
193 |
by (metis assms(2) tagged_division_ofD(3) tagged_division_ofD(4) y) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
194 |
have "(\<lambda>(x, k). content k *\<^sub>R f x) y = content k *\<^sub>R f x" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
195 |
unfolding xk by auto |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
196 |
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
|
197 |
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
|
198 |
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
|
199 |
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
|
200 |
|
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
|
201 |
lemma operative_content[intro]: "add.operative content" |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
202 |
by (force simp add: add.operative_def content_split[symmetric] content_eq_0_interior) |
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
|
203 |
|
64267 | 204 |
lemma additive_content_division: "d division_of (cbox a b) \<Longrightarrow> sum content d = content (cbox a b)" |
205 |
by (metis operative_content sum.operative_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
|
206 |
|
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
|
207 |
lemma additive_content_tagged_division: |
64267 | 208 |
"d tagged_division_of (cbox a b) \<Longrightarrow> sum (\<lambda>(x,l). content l) d = content (cbox a b)" |
209 |
unfolding sum.operative_tagged_division[OF operative_content, symmetric] by blast |
|
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
|
210 |
|
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
211 |
lemma subadditive_content_division: |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
212 |
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
|
213 |
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
|
214 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
215 |
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
|
216 |
using assms by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
217 |
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
|
218 |
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
|
219 |
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
|
220 |
using sum_mono2 by blast |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
221 |
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
|
222 |
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
|
223 |
finally show ?thesis . |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
224 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
225 |
|
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 |
lemma content_real_eq_0: "content {a .. b::real} = 0 \<longleftrightarrow> a \<ge> 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
|
227 |
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
|
228 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
229 |
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
|
230 |
using content_empty unfolding empty_as_interval by auto |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
231 |
|
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
232 |
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
|
233 |
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
|
234 |
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
|
235 |
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
|
236 |
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
|
237 |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
238 |
subsection \<open>Gauge integral\<close> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
239 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
240 |
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
|
241 |
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
|
242 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
243 |
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
|
244 |
(infixr "has'_integral" 46) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
245 |
where "(f has_integral I) s \<longleftrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
246 |
(if \<exists>a b. s = cbox a b |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
247 |
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
|
248 |
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
|
249 |
(\<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
|
250 |
norm (z - I) < e)))" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
251 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
252 |
lemma has_integral_cbox: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
253 |
"(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
|
254 |
by (auto simp add: has_integral_def) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
255 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
256 |
lemma has_integral: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
257 |
"(f has_integral y) (cbox a b) \<longleftrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
258 |
(\<forall>e>0. \<exists>d. gauge d \<and> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
259 |
(\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
64267 | 260 |
norm (sum (\<lambda>(x,k). content(k) *\<^sub>R f x) p - y) < e))" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
261 |
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
|
262 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
263 |
lemma has_integral_real: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
264 |
"(f has_integral y) {a .. b::real} \<longleftrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
265 |
(\<forall>e>0. \<exists>d. gauge d \<and> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
266 |
(\<forall>p. p tagged_division_of {a .. b} \<and> d fine p \<longrightarrow> |
64267 | 267 |
norm (sum (\<lambda>(x,k). content(k) *\<^sub>R f x) p - y) < e))" |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
268 |
unfolding box_real[symmetric] |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
269 |
by (rule has_integral) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
270 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
271 |
lemma has_integralD[dest]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
272 |
assumes "(f has_integral y) (cbox a b)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
273 |
and "e > 0" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
274 |
obtains d |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
275 |
where "gauge d" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
276 |
and "\<And>p. p tagged_division_of (cbox a b) \<Longrightarrow> d fine p \<Longrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
277 |
norm ((\<Sum>(x,k)\<in>p. content k *\<^sub>R f x) - y) < e" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
278 |
using assms unfolding has_integral by auto |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
279 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
280 |
lemma has_integral_alt: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
281 |
"(f has_integral y) i \<longleftrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
282 |
(if \<exists>a b. i = cbox a b |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
283 |
then (f has_integral y) i |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
284 |
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
|
285 |
(\<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
|
286 |
by (subst has_integral_def) (auto simp add: has_integral_cbox) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
287 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
288 |
lemma has_integral_altD: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
289 |
assumes "(f has_integral y) i" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
290 |
and "\<not> (\<exists>a b. i = cbox a b)" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
291 |
and "e>0" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
292 |
obtains B where "B > 0" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
293 |
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
|
294 |
(\<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
|
295 |
using assms has_integral_alt[of f y i] by auto |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
296 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
297 |
definition integrable_on (infixr "integrable'_on" 46) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
298 |
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
|
299 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
300 |
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
|
301 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
302 |
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
|
303 |
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
|
304 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
305 |
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
|
306 |
unfolding integrable_on_def integral_def by blast |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
307 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
308 |
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
|
309 |
unfolding integrable_on_def by auto |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
310 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
311 |
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
|
312 |
by auto |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
313 |
|
60420 | 314 |
subsection \<open>Basic theorems about integrals.\<close> |
35172 | 315 |
|
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
316 |
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
|
317 |
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
|
318 |
|
53409 | 319 |
lemma has_integral_unique: |
56188 | 320 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
53410 | 321 |
assumes "(f has_integral k1) i" |
322 |
and "(f has_integral k2) i" |
|
53409 | 323 |
shows "k1 = k2" |
53410 | 324 |
proof (rule ccontr) |
53842 | 325 |
let ?e = "norm (k1 - k2) / 2" |
61165 | 326 |
assume as: "k1 \<noteq> k2" |
53410 | 327 |
then have e: "?e > 0" |
328 |
by auto |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
329 |
have lem: "(f has_integral k1) (cbox a b) \<Longrightarrow> (f has_integral k2) (cbox a b) \<Longrightarrow> k1 = k2" |
61165 | 330 |
for f :: "'n \<Rightarrow> 'a" and a b k1 k2 |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
331 |
by (auto simp: has_integral_cbox intro: tendsto_unique[OF division_filter_not_empty]) |
53410 | 332 |
{ |
56188 | 333 |
presume "\<not> (\<exists>a b. i = cbox a b) \<Longrightarrow> False" |
53410 | 334 |
then show False |
60396 | 335 |
using as assms lem by blast |
53410 | 336 |
} |
56188 | 337 |
assume as: "\<not> (\<exists>a b. i = cbox a b)" |
55751 | 338 |
obtain B1 where B1: |
339 |
"0 < B1" |
|
56188 | 340 |
"\<And>a b. ball 0 B1 \<subseteq> cbox a b \<Longrightarrow> |
341 |
\<exists>z. ((\<lambda>x. if x \<in> i then f x else 0) has_integral z) (cbox a b) \<and> |
|
55751 | 342 |
norm (z - k1) < norm (k1 - k2) / 2" |
343 |
by (rule has_integral_altD[OF assms(1) as,OF e]) blast |
|
344 |
obtain B2 where B2: |
|
345 |
"0 < B2" |
|
56188 | 346 |
"\<And>a b. ball 0 B2 \<subseteq> cbox a b \<Longrightarrow> |
347 |
\<exists>z. ((\<lambda>x. if x \<in> i then f x else 0) has_integral z) (cbox a b) \<and> |
|
55751 | 348 |
norm (z - k2) < norm (k1 - k2) / 2" |
349 |
by (rule has_integral_altD[OF assms(2) as,OF e]) blast |
|
56188 | 350 |
have "\<exists>a b::'n. ball 0 B1 \<union> ball 0 B2 \<subseteq> cbox a b" |
351 |
apply (rule bounded_subset_cbox) |
|
53410 | 352 |
using bounded_Un bounded_ball |
353 |
apply auto |
|
354 |
done |
|
56188 | 355 |
then obtain a b :: 'n where ab: "ball 0 B1 \<subseteq> cbox a b" "ball 0 B2 \<subseteq> cbox a b" |
53410 | 356 |
by blast |
357 |
obtain w where w: |
|
56188 | 358 |
"((\<lambda>x. if x \<in> i then f x else 0) has_integral w) (cbox a b)" |
53410 | 359 |
"norm (w - k1) < norm (k1 - k2) / 2" |
360 |
using B1(2)[OF ab(1)] by blast |
|
361 |
obtain z where z: |
|
56188 | 362 |
"((\<lambda>x. if x \<in> i then f x else 0) has_integral z) (cbox a b)" |
53410 | 363 |
"norm (z - k2) < norm (k1 - k2) / 2" |
364 |
using B2(2)[OF ab(2)] by blast |
|
365 |
have "z = w" |
|
366 |
using lem[OF w(1) z(1)] by auto |
|
367 |
then have "norm (k1 - k2) \<le> norm (z - k2) + norm (w - k1)" |
|
368 |
using norm_triangle_ineq4 [of "k1 - w" "k2 - z"] |
|
369 |
by (auto simp add: norm_minus_commute) |
|
370 |
also have "\<dots> < norm (k1 - k2) / 2 + norm (k1 - k2) / 2" |
|
371 |
apply (rule add_strict_mono) |
|
372 |
apply (rule_tac[!] z(2) w(2)) |
|
373 |
done |
|
374 |
finally show False by auto |
|
375 |
qed |
|
376 |
||
377 |
lemma integral_unique [intro]: "(f has_integral y) k \<Longrightarrow> integral k f = y" |
|
378 |
unfolding integral_def |
|
379 |
by (rule some_equality) (auto intro: has_integral_unique) |
|
380 |
||
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
|
381 |
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
|
382 |
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
|
383 |
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
|
384 |
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
|
385 |
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
|
386 |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
387 |
lemma has_integral_const [intro]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
388 |
fixes a b :: "'a::euclidean_space" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
389 |
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
|
390 |
using eventually_division_filter_tagged_division[of "cbox a b"] |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
391 |
additive_content_tagged_division[of _ a b] |
64267 | 392 |
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
|
393 |
elim!: eventually_mono intro!: tendsto_cong[THEN iffD1, OF _ tendsto_const]) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
394 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
395 |
lemma has_integral_const_real [intro]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
396 |
fixes a b :: real |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
397 |
shows "((\<lambda>x. c) has_integral (content {a .. b} *\<^sub>R c)) {a .. b}" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
398 |
by (metis box_real(2) has_integral_const) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
399 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
400 |
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
|
401 |
by blast |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
402 |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
403 |
lemma integral_const [simp]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
404 |
fixes a b :: "'a::euclidean_space" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
405 |
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
|
406 |
by (rule integral_unique) (rule has_integral_const) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
407 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
408 |
lemma integral_const_real [simp]: |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
409 |
fixes a b :: real |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
410 |
shows "integral {a .. b} (\<lambda>x. c) = content {a .. b} *\<^sub>R c" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
411 |
by (metis box_real(2) integral_const) |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
412 |
|
53410 | 413 |
lemma has_integral_is_0: |
56188 | 414 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
53410 | 415 |
assumes "\<forall>x\<in>s. f x = 0" |
416 |
shows "(f has_integral 0) s" |
|
417 |
proof - |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
418 |
have lem: "(\<forall>x\<in>cbox a b. f x = 0) \<Longrightarrow> (f has_integral 0) (cbox a b)" for a b and f :: "'n \<Rightarrow> 'a" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
419 |
unfolding has_integral_cbox |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
420 |
using eventually_division_filter_tagged_division[of "cbox a b"] |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
421 |
by (subst tendsto_cong[where g="\<lambda>_. 0"]) |
64267 | 422 |
(auto elim!: eventually_mono intro!: sum.neutral simp: tag_in_interval) |
53410 | 423 |
{ |
56188 | 424 |
presume "\<not> (\<exists>a b. s = cbox a b) \<Longrightarrow> ?thesis" |
60396 | 425 |
with assms lem show ?thesis |
426 |
by blast |
|
53410 | 427 |
} |
428 |
have *: "(\<lambda>x. if x \<in> s then f x else 0) = (\<lambda>x. 0)" |
|
429 |
apply (rule ext) |
|
430 |
using assms |
|
431 |
apply auto |
|
432 |
done |
|
56188 | 433 |
assume "\<not> (\<exists>a b. s = cbox a b)" |
53410 | 434 |
then show ?thesis |
60396 | 435 |
using lem |
436 |
by (subst has_integral_alt) (force simp add: *) |
|
53410 | 437 |
qed |
35172 | 438 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
439 |
lemma has_integral_0[simp]: "((\<lambda>x::'n::euclidean_space. 0) has_integral 0) S" |
53410 | 440 |
by (rule has_integral_is_0) auto |
35172 | 441 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
442 |
lemma has_integral_0_eq[simp]: "((\<lambda>x. 0) has_integral i) S \<longleftrightarrow> i = 0" |
35172 | 443 |
using has_integral_unique[OF has_integral_0] by auto |
444 |
||
53410 | 445 |
lemma has_integral_linear: |
56188 | 446 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
447 |
assumes "(f has_integral y) S" |
53410 | 448 |
and "bounded_linear h" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
449 |
shows "((h \<circ> f) has_integral ((h y))) S" |
53410 | 450 |
proof - |
451 |
interpret bounded_linear h |
|
452 |
using assms(2) . |
|
453 |
from pos_bounded obtain B where B: "0 < B" "\<And>x. norm (h x) \<le> norm x * B" |
|
454 |
by blast |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
455 |
have lem: "\<And>a b y f::'n\<Rightarrow>'a. (f has_integral y) (cbox a b) \<Longrightarrow> ((h \<circ> f) has_integral h y) (cbox a b)" |
64267 | 456 |
unfolding has_integral_cbox by (drule tendsto) (simp add: sum scaleR split_beta') |
53410 | 457 |
{ |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
458 |
presume "\<not> (\<exists>a b. S = cbox a b) \<Longrightarrow> ?thesis" |
53410 | 459 |
then show ?thesis |
60396 | 460 |
using assms(1) lem by blast |
53410 | 461 |
} |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
462 |
assume as: "\<not> (\<exists>a b. S = cbox a b)" |
53410 | 463 |
then show ?thesis |
60396 | 464 |
proof (subst has_integral_alt, clarsimp) |
53410 | 465 |
fix e :: real |
466 |
assume e: "e > 0" |
|
56541 | 467 |
have *: "0 < e/B" using e B(1) by simp |
53410 | 468 |
obtain M where M: |
469 |
"M > 0" |
|
56188 | 470 |
"\<And>a b. ball 0 M \<subseteq> cbox a b \<Longrightarrow> |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
471 |
\<exists>z. ((\<lambda>x. if x \<in> S then f x else 0) has_integral z) (cbox a b) \<and> norm (z - y) < e / B" |
53410 | 472 |
using has_integral_altD[OF assms(1) as *] by blast |
56188 | 473 |
show "\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
474 |
(\<exists>z. ((\<lambda>x. if x \<in> S then (h \<circ> f) x else 0) has_integral z) (cbox a b) \<and> norm (z - h y) < e)" |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
475 |
proof (rule_tac x=M in exI, clarsimp simp add: M, goal_cases) |
61167 | 476 |
case prems: (1 a b) |
53410 | 477 |
obtain z where z: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
478 |
"((\<lambda>x. if x \<in> S then f x else 0) has_integral z) (cbox a b)" |
53410 | 479 |
"norm (z - y) < e / B" |
61167 | 480 |
using M(2)[OF prems(1)] by blast |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
481 |
have *: "(\<lambda>x. if x \<in> S then (h \<circ> f) x else 0) = h \<circ> (\<lambda>x. if x \<in> S then f x else 0)" |
60396 | 482 |
using zero by auto |
53410 | 483 |
show ?case |
484 |
apply (rule_tac x="h z" in exI) |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
485 |
apply (simp add: * lem[OF z(1)]) |
61165 | 486 |
apply (metis B diff le_less_trans pos_less_divide_eq z(2)) |
487 |
done |
|
53410 | 488 |
qed |
489 |
qed |
|
490 |
qed |
|
491 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
492 |
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
|
493 |
"(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
|
494 |
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
|
495 |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
496 |
lemma integrable_on_scaleR_left: |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
497 |
assumes "f integrable_on A" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
498 |
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
|
499 |
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
|
500 |
|
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
501 |
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
|
502 |
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
|
503 |
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
|
504 |
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
|
505 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
506 |
text\<open>The case analysis eliminates the condition @{term "f integrable_on S"} at the cost |
62837 | 507 |
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
|
508 |
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
|
509 |
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
|
510 |
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
|
511 |
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
|
512 |
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
|
513 |
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
|
514 |
next |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
515 |
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
|
516 |
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
|
517 |
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
|
518 |
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
|
519 |
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
|
520 |
|
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
521 |
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
|
522 |
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
|
523 |
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
|
524 |
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
|
525 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
526 |
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
|
527 |
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
|
528 |
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
|
529 |
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
|
530 |
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
|
531 |
|
60762 | 532 |
lemma has_integral_mult_right: |
533 |
fixes c :: "'a :: real_normed_algebra" |
|
534 |
shows "(f has_integral y) i \<Longrightarrow> ((\<lambda>x. c * f x) has_integral (c * y)) i" |
|
535 |
using has_integral_linear[OF _ bounded_linear_mult_right] by (simp add: comp_def) |
|
61165 | 536 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
537 |
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 | 538 |
unfolding o_def[symmetric] |
60396 | 539 |
by (metis has_integral_linear bounded_linear_scaleR_right) |
35172 | 540 |
|
50104 | 541 |
lemma has_integral_cmult_real: |
542 |
fixes c :: real |
|
543 |
assumes "c \<noteq> 0 \<Longrightarrow> (f has_integral x) A" |
|
544 |
shows "((\<lambda>x. c * f x) has_integral c * x) A" |
|
53410 | 545 |
proof (cases "c = 0") |
546 |
case True |
|
547 |
then show ?thesis by simp |
|
548 |
next |
|
549 |
case False |
|
50104 | 550 |
from has_integral_cmul[OF assms[OF this], of c] show ?thesis |
551 |
unfolding real_scaleR_def . |
|
53410 | 552 |
qed |
553 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
554 |
lemma has_integral_neg: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. -(f x)) has_integral -k) S" |
60396 | 555 |
by (drule_tac c="-1" in has_integral_cmul) auto |
53410 | 556 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
557 |
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
|
558 |
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
|
559 |
|
53410 | 560 |
lemma has_integral_add: |
56188 | 561 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
562 |
assumes "(f has_integral k) S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
563 |
and "(g has_integral l) S" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
564 |
shows "((\<lambda>x. f x + g x) has_integral (k + l)) S" |
53410 | 565 |
proof - |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
566 |
have lem: "(f has_integral k) (cbox a b) \<Longrightarrow> (g has_integral l) (cbox a b) \<Longrightarrow> |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
567 |
((\<lambda>x. f x + g x) has_integral (k + l)) (cbox a b)" |
61165 | 568 |
for f :: "'n \<Rightarrow> 'a" and g a b k l |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
569 |
unfolding has_integral_cbox |
64267 | 570 |
by (simp add: split_beta' scaleR_add_right sum.distrib[abs_def] tendsto_add) |
53410 | 571 |
{ |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
572 |
presume "\<not> (\<exists>a b. S = cbox a b) \<Longrightarrow> ?thesis" |
53410 | 573 |
then show ?thesis |
60396 | 574 |
using assms lem by force |
53410 | 575 |
} |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
576 |
assume as: "\<not> (\<exists>a b. S = cbox a b)" |
53410 | 577 |
then show ?thesis |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
578 |
proof (subst has_integral_alt, clarsimp, goal_cases) |
61165 | 579 |
case (1 e) |
580 |
then have *: "e / 2 > 0" |
|
53410 | 581 |
by auto |
55751 | 582 |
from has_integral_altD[OF assms(1) as *] |
583 |
obtain B1 where B1: |
|
584 |
"0 < B1" |
|
56188 | 585 |
"\<And>a b. ball 0 B1 \<subseteq> cbox a b \<Longrightarrow> |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
586 |
\<exists>z. ((\<lambda>x. if x \<in> S then f x else 0) has_integral z) (cbox a b) \<and> norm (z - k) < e / 2" |
55751 | 587 |
by blast |
588 |
from has_integral_altD[OF assms(2) as *] |
|
589 |
obtain B2 where B2: |
|
590 |
"0 < B2" |
|
56188 | 591 |
"\<And>a b. ball 0 B2 \<subseteq> (cbox a b) \<Longrightarrow> |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
592 |
\<exists>z. ((\<lambda>x. if x \<in> S then g x else 0) has_integral z) (cbox a b) \<and> norm (z - l) < e / 2" |
55751 | 593 |
by blast |
53410 | 594 |
show ?case |
60396 | 595 |
proof (rule_tac x="max B1 B2" in exI, clarsimp simp add: max.strict_coboundedI1 B1) |
53410 | 596 |
fix a b |
56188 | 597 |
assume "ball 0 (max B1 B2) \<subseteq> cbox a (b::'n)" |
598 |
then have *: "ball 0 B1 \<subseteq> cbox a (b::'n)" "ball 0 B2 \<subseteq> cbox a (b::'n)" |
|
53410 | 599 |
by auto |
600 |
obtain w where w: |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
601 |
"((\<lambda>x. if x \<in> S then f x else 0) has_integral w) (cbox a b)" |
53410 | 602 |
"norm (w - k) < e / 2" |
603 |
using B1(2)[OF *(1)] by blast |
|
604 |
obtain z where z: |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
605 |
"((\<lambda>x. if x \<in> S then g x else 0) has_integral z) (cbox a b)" |
53410 | 606 |
"norm (z - l) < e / 2" |
607 |
using B2(2)[OF *(2)] by blast |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
608 |
have *: "\<And>x. (if x \<in> S then f x + g x else 0) = |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
609 |
(if x \<in> S then f x else 0) + (if x \<in> S then g x else 0)" |
53410 | 610 |
by auto |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
611 |
show "\<exists>z. ((\<lambda>x. if x \<in> S then f x + g x else 0) has_integral z) (cbox a b) \<and> norm (z - (k + l)) < e" |
53410 | 612 |
apply (rule_tac x="w + z" in exI) |
60396 | 613 |
apply (simp add: lem[OF w(1) z(1), unfolded *[symmetric]]) |
53410 | 614 |
using norm_triangle_ineq[of "w - k" "z - l"] w(2) z(2) |
615 |
apply (auto simp add: field_simps) |
|
616 |
done |
|
617 |
qed |
|
618 |
qed |
|
619 |
qed |
|
35172 | 620 |
|
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
621 |
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
|
622 |
"(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
|
623 |
((\<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
|
624 |
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
|
625 |
by (auto simp: algebra_simps) |
53410 | 626 |
|
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
|
627 |
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
|
628 |
"integral S (\<lambda>x::'n::euclidean_space. 0::'m::real_normed_vector) = 0" |
53410 | 629 |
by (rule integral_unique has_integral_0)+ |
630 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
631 |
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
|
632 |
integral S (\<lambda>x. f x + g x) = integral S f + integral S g" |
60396 | 633 |
by (rule integral_unique) (metis integrable_integral has_integral_add) |
53410 | 634 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
635 |
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
|
636 |
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
|
637 |
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
|
638 |
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
|
639 |
next |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
640 |
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
|
641 |
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
|
642 |
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
|
643 |
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
|
644 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
645 |
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
|
646 |
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
|
647 |
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
|
648 |
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
|
649 |
next |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
650 |
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
|
651 |
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
|
652 |
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
|
653 |
qed |
53410 | 654 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
655 |
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
|
656 |
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
|
657 |
by (rule integral_unique) (metis integrable_integral has_integral_diff) |
35172 | 658 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
659 |
lemma integrable_0: "(\<lambda>x. 0) integrable_on S" |
35172 | 660 |
unfolding integrable_on_def using has_integral_0 by auto |
661 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
662 |
lemma integrable_add: "f integrable_on S \<Longrightarrow> g integrable_on S \<Longrightarrow> (\<lambda>x. f x + g x) integrable_on S" |
35172 | 663 |
unfolding integrable_on_def by(auto intro: has_integral_add) |
664 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
665 |
lemma integrable_cmul: "f integrable_on S \<Longrightarrow> (\<lambda>x. c *\<^sub>R f(x)) integrable_on S" |
35172 | 666 |
unfolding integrable_on_def by(auto intro: has_integral_cmul) |
667 |
||
50104 | 668 |
lemma integrable_on_cmult_iff: |
53410 | 669 |
fixes c :: real |
670 |
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
|
671 |
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
|
672 |
using integrable_cmul[of "\<lambda>x. c * f x" S "1 / c"] integrable_cmul[of f S c] \<open>c \<noteq> 0\<close> |
50104 | 673 |
by auto |
674 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
675 |
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
|
676 |
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
|
677 |
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
|
678 |
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
|
679 |
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
|
680 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
681 |
lemma integrable_neg: "f integrable_on S \<Longrightarrow> (\<lambda>x. -f(x)) integrable_on S" |
35172 | 682 |
unfolding integrable_on_def by(auto intro: has_integral_neg) |
683 |
||
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
684 |
lemma integrable_diff: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
685 |
"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
|
686 |
unfolding integrable_on_def by(auto intro: has_integral_diff) |
35172 | 687 |
|
688 |
lemma integrable_linear: |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
689 |
"f integrable_on S \<Longrightarrow> bounded_linear h \<Longrightarrow> (h \<circ> f) integrable_on S" |
35172 | 690 |
unfolding integrable_on_def by(auto intro: has_integral_linear) |
691 |
||
692 |
lemma integral_linear: |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
693 |
"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
|
694 |
apply (rule has_integral_unique [where i=S and f = "h \<circ> f"]) |
60396 | 695 |
apply (simp_all add: integrable_integral integrable_linear has_integral_linear ) |
53410 | 696 |
done |
697 |
||
698 |
lemma integral_component_eq[simp]: |
|
56188 | 699 |
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
|
700 |
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
|
701 |
shows "integral S (\<lambda>x. f x \<bullet> k) = integral S f \<bullet> k" |
63938 | 702 |
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
|
703 |
|
64267 | 704 |
lemma has_integral_sum: |
53410 | 705 |
assumes "finite t" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
706 |
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
|
707 |
shows "((\<lambda>x. sum (\<lambda>a. f a x) t) has_integral (sum i t)) S" |
53410 | 708 |
using assms(1) subset_refl[of t] |
709 |
proof (induct rule: finite_subset_induct) |
|
710 |
case empty |
|
711 |
then show ?case by auto |
|
712 |
next |
|
713 |
case (insert x F) |
|
60396 | 714 |
with assms show ?case |
715 |
by (simp add: has_integral_add) |
|
716 |
qed |
|
717 |
||
64267 | 718 |
lemma integral_sum: |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
719 |
"\<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
|
720 |
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
|
721 |
by (simp add: has_integral_sum integrable_integral integral_unique) |
64267 | 722 |
|
723 |
lemma integrable_sum: |
|
66089
def95e0bc529
Some new material. SIMPRULE STATUS for sum/prod.delta rules!
paulson <lp15@cam.ac.uk>
parents:
65680
diff
changeset
|
724 |
"\<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
|
725 |
unfolding integrable_on_def using has_integral_sum[of I] by metis |
35172 | 726 |
|
727 |
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
|
728 |
assumes "\<And>x. x \<in> s \<Longrightarrow> f x = g x" |
53410 | 729 |
and "(f has_integral k) s" |
730 |
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
|
731 |
using has_integral_diff[OF assms(2), of "\<lambda>x. f x - g x" 0] |
53410 | 732 |
using has_integral_is_0[of s "\<lambda>x. f x - g x"] |
733 |
using assms(1) |
|
734 |
by auto |
|
735 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
736 |
lemma integrable_eq: "(\<And>x. x \<in> s \<Longrightarrow> f x = g x) \<Longrightarrow> f integrable_on s \<Longrightarrow> g integrable_on s" |
53410 | 737 |
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
|
738 |
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
|
739 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
740 |
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
|
741 |
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
|
742 |
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
|
743 |
using has_integral_eq[of s f g] has_integral_eq[of s g f] assms |
53410 | 744 |
by auto |
745 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
746 |
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
|
747 |
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
|
748 |
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
|
749 |
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
|
750 |
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
|
751 |
|
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
752 |
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
|
753 |
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
|
754 |
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
|
755 |
(is "?lhs = ?rhs") |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
756 |
proof |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
757 |
assume ?lhs |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
758 |
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
|
759 |
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
|
760 |
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
|
761 |
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
|
762 |
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
|
763 |
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
|
764 |
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
|
765 |
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
|
766 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
767 |
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
|
768 |
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
|
769 |
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
|
770 |
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
|
771 |
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
|
772 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
773 |
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
|
774 |
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
|
775 |
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
|
776 |
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
|
777 |
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
|
778 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
779 |
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
|
780 |
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
|
781 |
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
|
782 |
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
|
783 |
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
|
784 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
785 |
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
|
786 |
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
|
787 |
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
|
788 |
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
|
789 |
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
|
790 |
|
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
791 |
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
|
792 |
unfolding has_integral_cbox |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
793 |
using eventually_division_filter_tagged_division[of "cbox a b"] |
64267 | 794 |
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
|
795 |
|
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
796 |
lemma has_integral_null_real [intro]: "content {a .. b::real} = 0 \<Longrightarrow> (f has_integral 0) {a .. b}" |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
797 |
by (metis box_real(2) has_integral_null) |
56188 | 798 |
|
799 |
lemma has_integral_null_eq[simp]: "content (cbox a b) = 0 \<Longrightarrow> (f has_integral i) (cbox a b) \<longleftrightarrow> i = 0" |
|
60396 | 800 |
by (auto simp add: has_integral_null dest!: integral_unique) |
53410 | 801 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
802 |
lemma integral_null [simp]: "content (cbox a b) = 0 \<Longrightarrow> integral (cbox a b) f = 0" |
60396 | 803 |
by (metis has_integral_null integral_unique) |
53410 | 804 |
|
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
805 |
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
|
806 |
by (simp add: has_integral_integrable) |
53410 | 807 |
|
808 |
lemma has_integral_empty[intro]: "(f has_integral 0) {}" |
|
60396 | 809 |
by (simp add: has_integral_is_0) |
53410 | 810 |
|
811 |
lemma has_integral_empty_eq[simp]: "(f has_integral i) {} \<longleftrightarrow> i = 0" |
|
60396 | 812 |
by (auto simp add: has_integral_empty has_integral_unique) |
53410 | 813 |
|
814 |
lemma integrable_on_empty[intro]: "f integrable_on {}" |
|
815 |
unfolding integrable_on_def by auto |
|
816 |
||
817 |
lemma integral_empty[simp]: "integral {} f = 0" |
|
818 |
by (rule integral_unique) (rule has_integral_empty) |
|
819 |
||
820 |
lemma has_integral_refl[intro]: |
|
56188 | 821 |
fixes a :: "'a::euclidean_space" |
822 |
shows "(f has_integral 0) (cbox a a)" |
|
53410 | 823 |
and "(f has_integral 0) {a}" |
824 |
proof - |
|
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
825 |
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
|
826 |
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
|
827 |
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
|
828 |
by simp |
56188 | 829 |
qed |
830 |
||
831 |
lemma integrable_on_refl[intro]: "f integrable_on cbox a a" |
|
53410 | 832 |
unfolding integrable_on_def by auto |
833 |
||
60762 | 834 |
lemma integral_refl [simp]: "integral (cbox a a) f = 0" |
53410 | 835 |
by (rule integral_unique) auto |
836 |
||
60762 | 837 |
lemma integral_singleton [simp]: "integral {a} f = 0" |
838 |
by auto |
|
839 |
||
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
840 |
lemma integral_blinfun_apply: |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
841 |
assumes "f integrable_on s" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
842 |
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
|
843 |
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
|
844 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
845 |
lemma blinfun_apply_integral: |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
846 |
assumes "f integrable_on s" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
847 |
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
|
848 |
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
|
849 |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
850 |
lemma has_integral_componentwise_iff: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
851 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
852 |
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
|
853 |
proof safe |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
854 |
fix b :: 'b assume "(f has_integral y) A" |
63938 | 855 |
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
|
856 |
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
|
857 |
next |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
858 |
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
|
859 |
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
|
860 |
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
|
861 |
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 | 862 |
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
|
863 |
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
|
864 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
865 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
866 |
lemma has_integral_componentwise: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
867 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
868 |
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
|
869 |
by (subst has_integral_componentwise_iff) blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
870 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
871 |
lemma integrable_componentwise_iff: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
872 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
873 |
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
|
874 |
proof |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
875 |
assume "f integrable_on A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
876 |
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
|
877 |
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
|
878 |
by (subst (asm) has_integral_componentwise_iff) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
879 |
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
|
880 |
next |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
881 |
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
|
882 |
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
|
883 |
unfolding integrable_on_def by (subst (asm) bchoice_iff) blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
884 |
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
|
885 |
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
|
886 |
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 | 887 |
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
|
888 |
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
|
889 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
890 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
891 |
lemma integrable_componentwise: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
892 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
893 |
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
|
894 |
by (subst integrable_componentwise_iff) blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
895 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
896 |
lemma integral_componentwise: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
897 |
fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
898 |
assumes "f integrable_on A" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
899 |
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
|
900 |
proof - |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
901 |
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
|
902 |
by (subst (asm) integrable_componentwise_iff, intro integrable_linear ballI) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
903 |
(simp_all add: bounded_linear_scaleR_left) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
904 |
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
|
905 |
by (simp add: euclidean_representation) |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
906 |
also from integrable have "\<dots> = (\<Sum>a\<in>Basis. integral A (\<lambda>x. (f x \<bullet> a) *\<^sub>R a))" |
64267 | 907 |
by (subst integral_sum) (simp_all add: o_def) |
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
908 |
finally show ?thesis . |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
909 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
910 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
911 |
lemma integrable_component: |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
912 |
"f integrable_on A \<Longrightarrow> (\<lambda>x. f x \<bullet> (y :: 'b :: euclidean_space)) integrable_on A" |
63938 | 913 |
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
|
914 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
915 |
|
35172 | 916 |
|
60420 | 917 |
subsection \<open>Cauchy-type criterion for integrability.\<close> |
35172 | 918 |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
919 |
lemma integrable_Cauchy: |
56188 | 920 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::{real_normed_vector,complete_space}" |
921 |
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
|
922 |
(\<forall>e>0. \<exists>\<gamma>. gauge \<gamma> \<and> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
923 |
(\<forall>p1 p2. p1 tagged_division_of (cbox a b) \<and> \<gamma> fine p1 \<and> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
924 |
p2 tagged_division_of (cbox a b) \<and> \<gamma> fine p2 \<longrightarrow> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
925 |
norm ((\<Sum>(x,K)\<in>p1. content K *\<^sub>R f x) - (\<Sum>(x,K)\<in>p2. 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
|
926 |
(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
|
927 |
proof (intro iffI allI impI) |
53442 | 928 |
assume ?l |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
929 |
then obtain y |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
930 |
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
|
931 |
\<exists>\<gamma>. gauge \<gamma> \<and> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
932 |
(\<forall>p. p tagged_division_of cbox a b \<and> \<gamma> fine p \<longrightarrow> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
933 |
norm ((\<Sum>(x,K) \<in> p. 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
|
934 |
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
|
935 |
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
|
936 |
proof - |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
937 |
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
|
938 |
with y obtain \<gamma> where "gauge \<gamma>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
939 |
and \<gamma>: "\<And>p. p tagged_division_of cbox a b \<and> \<gamma> fine p \<Longrightarrow> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
940 |
norm ((\<Sum>(x,K)\<in>p. 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
|
941 |
by meson |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
942 |
show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
943 |
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
|
944 |
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
|
945 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
946 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
947 |
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
|
948 |
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
|
949 |
by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
950 |
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
|
951 |
"\<And>m. gauge (\<gamma> m)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
952 |
"\<And>m p1 p2. \<lbrakk>p1 tagged_division_of cbox a b; |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
953 |
\<gamma> m fine p1; p2 tagged_division_of cbox a b; \<gamma> m fine p2\<rbrakk> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
954 |
\<Longrightarrow> norm ((\<Sum>(x,K) \<in> p1. content K *\<^sub>R f x) - (\<Sum>(x,K) \<in> p2. content K *\<^sub>R f x)) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
955 |
< 1 / (m + 1)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
956 |
by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
957 |
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
|
958 |
apply (rule gauge_Inter) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
959 |
using \<gamma> by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
960 |
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
|
961 |
by (meson fine_division_exists) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
962 |
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
|
963 |
"\<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
|
964 |
by meson |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
965 |
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
|
966 |
using p unfolding fine_Inter |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
967 |
using atLeastAtMost_iff by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
968 |
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
|
969 |
proof (rule CauchyI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
970 |
fix e::real |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
971 |
assume "0 < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
972 |
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
|
973 |
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
|
974 |
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
|
975 |
proof (intro exI allI impI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
976 |
fix m n |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
977 |
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
|
978 |
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
|
979 |
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
|
980 |
also have "... < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
981 |
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
|
982 |
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 | 983 |
qed |
984 |
qed |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
985 |
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
|
986 |
by (auto simp: convergent_eq_Cauchy[symmetric] dest: LIMSEQ_D) |
53442 | 987 |
show ?l |
988 |
unfolding integrable_on_def has_integral |
|
60425 | 989 |
proof (rule_tac x=y in exI, clarify) |
53442 | 990 |
fix e :: real |
991 |
assume "e>0" |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
992 |
then have e2: "e/2 > 0" by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
993 |
then obtain N1::nat where N1: "N1 \<noteq> 0" "inverse (real N1) < e / 2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
994 |
using real_arch_inverse by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
995 |
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" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
996 |
using y[OF e2] by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
997 |
show "\<exists>\<gamma>. gauge \<gamma> \<and> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
998 |
(\<forall>p. p tagged_division_of (cbox a b) \<and> \<gamma> fine p \<longrightarrow> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
999 |
norm ((\<Sum>(x,K) \<in> p. 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
|
1000 |
proof (intro exI conjI allI impI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1001 |
show "gauge (\<gamma> (N1+N2))" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1002 |
using \<gamma> by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1003 |
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
|
1004 |
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
|
1005 |
proof (rule norm_triangle_half_r) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1006 |
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
|
1007 |
< 1 / (real (N1+N2) + 1)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1008 |
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
|
1009 |
also have "... < e/2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1010 |
using N1 \<open>0 < e\<close> by (auto simp: field_simps intro: less_le_trans) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1011 |
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" . |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1012 |
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
|
1013 |
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
|
1014 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1015 |
qed |
53442 | 1016 |
qed |
1017 |
qed |
|
1018 |
||
35172 | 1019 |
|
60420 | 1020 |
subsection \<open>Additivity of integral on abutting intervals.\<close> |
35172 | 1021 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1022 |
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
|
1023 |
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
|
1024 |
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
|
1025 |
shows "content (K1 \<inter> {x. x\<bullet>k \<le> c}) = 0" |
53443 | 1026 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1027 |
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
|
1028 |
by auto |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1029 |
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
|
1030 |
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
|
1031 |
then show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1032 |
unfolding K1 interval_split[OF \<open>k \<in> Basis\<close>] by (auto simp: content_eq_0_interior) |
53443 | 1033 |
qed |
1034 |
||
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1035 |
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
|
1036 |
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
|
1037 |
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
|
1038 |
shows "content (K1 \<inter> {x. x\<bullet>k \<ge> c}) = 0" |
53443 | 1039 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1040 |
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
|
1041 |
by auto |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1042 |
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
|
1043 |
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
|
1044 |
then show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1045 |
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
|
1046 |
by (auto simp: content_eq_0_interior) |
53443 | 1047 |
qed |
35172 | 1048 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1049 |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1050 |
proposition has_integral_split: |
56188 | 1051 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
60435 | 1052 |
assumes fi: "(f has_integral i) (cbox a b \<inter> {x. x\<bullet>k \<le> c})" |
1053 |
and fj: "(f has_integral j) (cbox a b \<inter> {x. x\<bullet>k \<ge> c})" |
|
1054 |
and k: "k \<in> Basis" |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1055 |
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
|
1056 |
unfolding has_integral |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1057 |
proof clarify |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1058 |
fix e::real |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1059 |
assume "0 < e" |
53468 | 1060 |
then have e: "e/2 > 0" |
1061 |
by auto |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1062 |
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
|
1063 |
and \<gamma>1norm: |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1064 |
"\<And>p. \<lbrakk>p tagged_division_of cbox a b \<inter> {x. x \<bullet> k \<le> c}; \<gamma>1 fine p\<rbrakk> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1065 |
\<Longrightarrow> norm ((\<Sum>(x,K) \<in> p. content K *\<^sub>R f x) - i) < e / 2" |
60435 | 1066 |
apply (rule has_integralD[OF fi[unfolded interval_split[OF k]] e]) |
1067 |
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
|
1068 |
done |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1069 |
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
|
1070 |
and \<gamma>2norm: |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1071 |
"\<And>p. \<lbrakk>p tagged_division_of cbox a b \<inter> {x. c \<le> x \<bullet> k}; \<gamma>2 fine p\<rbrakk> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1072 |
\<Longrightarrow> norm ((\<Sum>(x, k) \<in> p. content k *\<^sub>R f x) - j) < e / 2" |
60435 | 1073 |
apply (rule has_integralD[OF fj[unfolded interval_split[OF k]] e]) |
1074 |
apply (simp add: interval_split[symmetric] k) |
|
1075 |
done |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1076 |
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
|
1077 |
have "gauge ?\<gamma>" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1078 |
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
|
1079 |
then show "\<exists>\<gamma>. gauge \<gamma> \<and> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1080 |
(\<forall>p. p tagged_division_of cbox a b \<and> \<gamma> fine p \<longrightarrow> |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1081 |
norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - (i + j)) < e)" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1082 |
proof (rule_tac x="?\<gamma>" in exI, safe) |
53468 | 1083 |
fix p |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1084 |
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
|
1085 |
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
|
1086 |
using p by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1087 |
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
|
1088 |
proof (rule ccontr) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1089 |
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
|
1090 |
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
|
1091 |
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
|
1092 |
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
|
1093 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1094 |
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
|
1095 |
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
|
1096 |
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
|
1097 |
with y show False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1098 |
using ** by (auto simp add: field_simps) |
60435 | 1099 |
qed |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1100 |
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
|
1101 |
proof (rule ccontr) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1102 |
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
|
1103 |
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
|
1104 |
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
|
1105 |
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
|
1106 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1107 |
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
|
1108 |
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
|
1109 |
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
|
1110 |
with y show False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1111 |
using ** by (auto simp add: field_simps) |
53468 | 1112 |
qed |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1113 |
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
|
1114 |
if "finite s" for s and f :: "'a set \<Rightarrow> 'a set" and P :: "'a \<Rightarrow> 'a set \<Rightarrow> bool" |
53468 | 1115 |
proof - |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1116 |
from that have "finite ((\<lambda>(x,K). (x, f K)) ` s)" |
60425 | 1117 |
by auto |
61165 | 1118 |
then show ?thesis |
60425 | 1119 |
by (rule rev_finite_subset) auto |
53468 | 1120 |
qed |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1121 |
{ fix \<G> :: "'a set \<Rightarrow> 'a set" |
53468 | 1122 |
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
|
1123 |
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
|
1124 |
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
|
1125 |
"(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
|
1126 |
by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1127 |
have "content (\<G> K) = 0" |
53468 | 1128 |
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
|
1129 |
then have "(\<lambda>(x,K). content K *\<^sub>R f x) i = 0" |
53468 | 1130 |
unfolding xk split_conv by auto |
60435 | 1131 |
} note [simp] = this |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1132 |
have "finite p" |
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 |
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
|
1135 |
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
|
1136 |
using \<open>?\<gamma> fine p\<close> by (fastforce simp: fine_def split: if_split_asm) |
53468 | 1137 |
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
|
1138 |
proof (rule \<gamma>1norm [OF tagged_division_ofI \<gamma>1_fine]) |
60435 | 1139 |
show "finite ?M1" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1140 |
by (rule fin_finite) (use p in blast) |
56188 | 1141 |
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
|
1142 |
by (auto simp: ab_eqp) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1143 |
|
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1144 |
fix x L |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1145 |
assume xL: "(x, L) \<in> ?M1" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1146 |
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
|
1147 |
"(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
|
1148 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1149 |
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
|
1150 |
using p by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1151 |
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
|
1152 |
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
|
1153 |
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
|
1154 |
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
|
1155 |
|
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1156 |
fix y R |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1157 |
assume yR: "(y, R) \<in> ?M1" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1158 |
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
|
1159 |
"(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
|
1160 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1161 |
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
|
1162 |
show "interior L \<inter> interior R = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1163 |
proof (cases "L' = R' \<longrightarrow> x' = y'") |
53468 | 1164 |
case False |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1165 |
have "interior R' = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1166 |
by (metis (no_types) False Pair_inject inf.idem tagged_division_ofD(5) [OF p] xL'(3) yR'(3)) |
53468 | 1167 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1168 |
using yR' by simp |
53468 | 1169 |
next |
1170 |
case True |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1171 |
then have "L' \<noteq> R'" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1172 |
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
|
1173 |
have "interior L' \<inter> interior R' = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1174 |
by (metis (no_types) Pair_inject \<open>L' \<noteq> R'\<close> p tagged_division_ofD(5) xL'(3) yR'(3)) |
53468 | 1175 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1176 |
using xL'(2) yR'(2) by auto |
35172 | 1177 |
qed |
1178 |
qed |
|
53468 | 1179 |
moreover |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1180 |
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
|
1181 |
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
|
1182 |
using \<open>?\<gamma> fine p\<close> by (fastforce simp: fine_def split: if_split_asm) |
53468 | 1183 |
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
|
1184 |
proof (rule \<gamma>2norm [OF tagged_division_ofI \<gamma>2_fine]) |
60435 | 1185 |
show "finite ?M2" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1186 |
by (rule fin_finite) (use p in blast) |
56188 | 1187 |
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
|
1188 |
by (auto simp: ab_eqp) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1189 |
|
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1190 |
fix x L |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1191 |
assume xL: "(x, L) \<in> ?M2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1192 |
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
|
1193 |
"(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
|
1194 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1195 |
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
|
1196 |
using p by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1197 |
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
|
1198 |
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
|
1199 |
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
|
1200 |
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
|
1201 |
|
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1202 |
fix y R |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1203 |
assume yR: "(y, R) \<in> ?M2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1204 |
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
|
1205 |
"(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
|
1206 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1207 |
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
|
1208 |
show "interior L \<inter> interior R = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1209 |
proof (cases "L' = R' \<longrightarrow> x' = y'") |
53468 | 1210 |
case False |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1211 |
have "interior R' = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1212 |
by (metis (no_types) False Pair_inject inf.idem tagged_division_ofD(5) [OF p] xL'(3) yR'(3)) |
53468 | 1213 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1214 |
using yR' by simp |
53468 | 1215 |
next |
1216 |
case True |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1217 |
then have "L' \<noteq> R'" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1218 |
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
|
1219 |
have "interior L' \<inter> interior R' = {}" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1220 |
by (metis (no_types) Pair_inject \<open>L' \<noteq> R'\<close> p tagged_division_ofD(5) xL'(3) yR'(3)) |
53468 | 1221 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1222 |
using xL'(2) yR'(2) by auto |
53468 | 1223 |
qed |
1224 |
qed |
|
1225 |
ultimately |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1226 |
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 | 1227 |
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
|
1228 |
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
|
1229 |
((\<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
|
1230 |
(\<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
|
1231 |
proof - |
60435 | 1232 |
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
|
1233 |
by auto |
60435 | 1234 |
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)" |
1235 |
by auto |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1236 |
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
|
1237 |
(\<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
|
1238 |
(\<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
|
1239 |
by (rule sum.mono_neutral_left) (auto simp: \<open>finite p\<close>) |
53468 | 1240 |
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) = |
1241 |
(\<Sum>(x, k)\<in>?M1. content k *\<^sub>R f x) + (\<Sum>(x, k)\<in>?M2. content k *\<^sub>R f x) - (i + j)" |
|
1242 |
by auto |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1243 |
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
|
1244 |
(\<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
|
1245 |
unfolding * |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1246 |
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
|
1247 |
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
|
1248 |
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
|
1249 |
done |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1250 |
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
|
1251 |
(\<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
|
1252 |
(\<lambda>(a,B). content B *\<^sub>R f a) x" |
60435 | 1253 |
proof clarify |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1254 |
fix a B |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1255 |
assume "(a, B) \<in> p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1256 |
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
|
1257 |
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
|
1258 |
by (auto simp: scaleR_left_distrib uv content_split[OF k,of u v c]) |
53468 | 1259 |
qed |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1260 |
ultimately show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1261 |
by (auto simp: sum.distrib[symmetric]) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1262 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1263 |
ultimately show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - (i + j)) < e" |
53468 | 1264 |
by auto |
1265 |
qed |
|
1266 |
qed |
|
1267 |
||
35172 | 1268 |
|
60420 | 1269 |
subsection \<open>A sort of converse, integrability on subintervals.\<close> |
35172 | 1270 |
|
53494 | 1271 |
lemma has_integral_separate_sides: |
56188 | 1272 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
66359 | 1273 |
assumes f: "(f has_integral i) (cbox a b)" |
53494 | 1274 |
and "e > 0" |
1275 |
and k: "k \<in> Basis" |
|
1276 |
obtains d where "gauge d" |
|
56188 | 1277 |
"\<forall>p1 p2. p1 tagged_division_of (cbox a b \<inter> {x. x\<bullet>k \<le> c}) \<and> d fine p1 \<and> |
1278 |
p2 tagged_division_of (cbox a b \<inter> {x. x\<bullet>k \<ge> c}) \<and> d fine p2 \<longrightarrow> |
|
64267 | 1279 |
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 | 1280 |
proof - |
66359 | 1281 |
obtain \<gamma> where d: "gauge \<gamma>" |
1282 |
"\<And>p. \<lbrakk>p tagged_division_of cbox a b; \<gamma> fine p\<rbrakk> |
|
1283 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - i) < e" |
|
1284 |
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
|
1285 |
{ fix p1 p2 |
66359 | 1286 |
assume tdiv1: "p1 tagged_division_of (cbox a b) \<inter> {x. x \<bullet> k \<le> c}" and "\<gamma> fine p1" |
1287 |
note p1=tagged_division_ofD[OF this(1)] |
|
1288 |
assume tdiv2: "p2 tagged_division_of (cbox a b) \<inter> {x. c \<le> x \<bullet> k}" and "\<gamma> fine p2" |
|
1289 |
note p2=tagged_division_ofD[OF this(1)] |
|
1290 |
note tagged_division_union_interval[OF tdiv1 tdiv2] |
|
1291 |
note p12 = tagged_division_ofD[OF this] this |
|
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1292 |
{ fix a b |
53494 | 1293 |
assume ab: "(a, b) \<in> p1 \<inter> p2" |
1294 |
have "(a, b) \<in> p1" |
|
1295 |
using ab by auto |
|
66359 | 1296 |
obtain u v where uv: "b = cbox u v" |
1297 |
using \<open>(a, b) \<in> p1\<close> p1(4) by moura |
|
53494 | 1298 |
have "b \<subseteq> {x. x\<bullet>k = c}" |
1299 |
using ab p1(3)[of a b] p2(3)[of a b] by fastforce |
|
1300 |
moreover |
|
1301 |
have "interior {x::'a. x \<bullet> k = c} = {}" |
|
1302 |
proof (rule ccontr) |
|
1303 |
assume "\<not> ?thesis" |
|
1304 |
then obtain x where x: "x \<in> interior {x::'a. x\<bullet>k = c}" |
|
1305 |
by auto |
|
66359 | 1306 |
then obtain \<epsilon> where "0 < \<epsilon>" and \<epsilon>: "ball x \<epsilon> \<subseteq> {x. x \<bullet> k = c}" |
1307 |
using mem_interior by metis |
|
53494 | 1308 |
have x: "x\<bullet>k = c" |
1309 |
using x interior_subset by fastforce |
|
66359 | 1310 |
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)" |
1311 |
using \<open>0 < \<epsilon>\<close> k by (auto simp: inner_simps inner_not_same_Basis) |
|
1312 |
have "(\<Sum>i\<in>Basis. \<bar>(x - (x + (\<epsilon> / 2 ) *\<^sub>R k)) \<bullet> i\<bar>) = |
|
1313 |
(\<Sum>i\<in>Basis. (if i = k then \<epsilon> / 2 else 0))" |
|
64267 | 1314 |
using "*" by (blast intro: sum.cong) |
66359 | 1315 |
also have "\<dots> < \<epsilon>" |
1316 |
by (subst sum.delta) (use \<open>0 < \<epsilon>\<close> in auto) |
|
1317 |
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
|
1318 |
unfolding mem_ball dist_norm by(rule le_less_trans[OF norm_le_l1]) |
66359 | 1319 |
then have "x + (\<epsilon>/2) *\<^sub>R k \<in> {x. x\<bullet>k = c}" |
1320 |
using \<epsilon> by auto |
|
53494 | 1321 |
then show False |
66359 | 1322 |
using \<open>0 < \<epsilon>\<close> x k by (auto simp: inner_simps) |
53494 | 1323 |
qed |
1324 |
ultimately have "content b = 0" |
|
1325 |
unfolding uv content_eq_0_interior |
|
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1326 |
using interior_mono by blast |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1327 |
then have "content b *\<^sub>R f a = 0" |
53494 | 1328 |
by auto |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1329 |
} |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1330 |
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
|
1331 |
norm ((\<Sum>(x, k)\<in>p1 \<union> p2. content k *\<^sub>R f x) - i)" |
64267 | 1332 |
by (subst sum.union_inter_neutral) (auto simp: p1 p2) |
53494 | 1333 |
also have "\<dots> < e" |
66359 | 1334 |
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
|
1335 |
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
|
1336 |
} |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1337 |
then show ?thesis |
66359 | 1338 |
using d(1) that by auto |
53494 | 1339 |
qed |
35172 | 1340 |
|
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1341 |
lemma integrable_split [intro]: |
56188 | 1342 |
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
|
1343 |
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
|
1344 |
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
|
1345 |
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
|
1346 |
and "f integrable_on (cbox a b \<inter> {x. x\<bullet>k \<ge> c})" (is ?thesis2) |
53494 | 1347 |
proof - |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1348 |
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
|
1349 |
using f by blast |
63040 | 1350 |
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
|
1351 |
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
|
1352 |
have "\<exists>d. gauge d \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1353 |
(\<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
|
1354 |
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
|
1355 |
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
|
1356 |
if "e > 0" for e |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1357 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1358 |
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
|
1359 |
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
|
1360 |
obtain d |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1361 |
where "gauge d" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1362 |
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
|
1363 |
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
|
1364 |
\<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
|
1365 |
by metis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1366 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1367 |
proof (rule_tac x=d in exI, clarsimp simp add: \<open>gauge d\<close>) |
53494 | 1368 |
fix p1 p2 |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1369 |
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
|
1370 |
"p2 tagged_division_of (cbox a b) \<inter> {x. x \<bullet> k \<le> c}" "d fine p2" |
35172 | 1371 |
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
|
1372 |
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
|
1373 |
fix p |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1374 |
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
|
1375 |
then show ?thesis |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1376 |
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
|
1377 |
unfolding interval_split[OF k] b'_def[symmetric] a'_def[symmetric] |
53494 | 1378 |
by (auto simp add: algebra_simps) |
1379 |
qed |
|
1380 |
qed |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1381 |
qed |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1382 |
with f show ?thesis1 |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1383 |
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
|
1384 |
have "\<exists>d. gauge d \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1385 |
(\<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
|
1386 |
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
|
1387 |
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
|
1388 |
if "e > 0" for e |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1389 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1390 |
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
|
1391 |
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
|
1392 |
obtain d |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1393 |
where "gauge d" |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1394 |
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
|
1395 |
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
|
1396 |
\<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
|
1397 |
by metis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1398 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1399 |
proof (rule_tac x=d in exI, clarsimp simp add: \<open>gauge d\<close>) |
53494 | 1400 |
fix p1 p2 |
60428
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1401 |
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
|
1402 |
"p2 tagged_division_of (cbox a b) \<inter> {x. x \<bullet> k \<ge> c}" "d fine p2" |
35172 | 1403 |
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
|
1404 |
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
|
1405 |
fix p |
5e9de4faef98
fixed several "inside-out" proofs
paulson <lp15@cam.ac.uk>
parents:
60425
diff
changeset
|
1406 |
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
|
1407 |
then show ?thesis |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1408 |
using as norm_triangle_half_l[OF d[of p p1] d[of p p2]] |
53494 | 1409 |
unfolding interval_split[OF k] b'_def[symmetric] a'_def[symmetric] |
53520 | 1410 |
by (auto simp add: algebra_simps) |
53494 | 1411 |
qed |
1412 |
qed |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
1413 |
qed |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
1414 |
with f show ?thesis2 |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1415 |
by (simp add: interval_split[OF k] integrable_Cauchy) |
53494 | 1416 |
qed |
1417 |
||
1418 |
lemma operative_integral: |
|
56188 | 1419 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
63659 | 1420 |
shows "comm_monoid.operative (lift_option op +) (Some 0) |
1421 |
(\<lambda>i. if f integrable_on i then Some (integral i f) else None)" |
|
1422 |
proof - |
|
1423 |
interpret comm_monoid "lift_option plus" "Some (0::'b)" |
|
1424 |
by (rule comm_monoid_lift_option) |
|
1425 |
(rule add.comm_monoid_axioms) |
|
1426 |
show ?thesis |
|
1427 |
proof (unfold operative_def, safe) |
|
1428 |
fix a b c |
|
1429 |
fix k :: 'a |
|
1430 |
assume k: "k \<in> Basis" |
|
1431 |
show "(if f integrable_on cbox a b then Some (integral (cbox a b) f) else None) = |
|
1432 |
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) |
|
1433 |
(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)" |
|
1434 |
proof (cases "f integrable_on cbox a b") |
|
1435 |
case True |
|
1436 |
with k show ?thesis |
|
1437 |
apply (simp add: integrable_split) |
|
1438 |
apply (rule integral_unique [OF has_integral_split[OF _ _ k]]) |
|
60440 | 1439 |
apply (auto intro: integrable_integral) |
53494 | 1440 |
done |
63659 | 1441 |
next |
1442 |
case False |
|
1443 |
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})" |
|
1444 |
proof (rule ccontr) |
|
1445 |
assume "\<not> ?thesis" |
|
1446 |
then have "f integrable_on cbox a b" |
|
1447 |
unfolding integrable_on_def |
|
1448 |
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) |
|
1449 |
apply (rule has_integral_split[OF _ _ k]) |
|
1450 |
apply (auto intro: integrable_integral) |
|
1451 |
done |
|
1452 |
then show False |
|
1453 |
using False by auto |
|
1454 |
qed |
|
1455 |
then show ?thesis |
|
53494 | 1456 |
using False by auto |
1457 |
qed |
|
63659 | 1458 |
next |
1459 |
fix a b :: 'a |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1460 |
assume "box a b = {}" |
63659 | 1461 |
then show "(if f integrable_on cbox a b then Some (integral (cbox a b) f) else None) = Some 0" |
1462 |
using has_integral_null_eq |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
1463 |
by (auto simp: integrable_on_null content_eq_0_interior) |
63659 | 1464 |
qed |
53494 | 1465 |
qed |
1466 |
||
60420 | 1467 |
subsection \<open>Bounds on the norm of Riemann sums and the integral itself.\<close> |
35172 | 1468 |
|
53494 | 1469 |
lemma dsum_bound: |
56188 | 1470 |
assumes "p division_of (cbox a b)" |
53494 | 1471 |
and "norm c \<le> e" |
64267 | 1472 |
shows "norm (sum (\<lambda>l. content l *\<^sub>R c) p) \<le> e * content(cbox a b)" |
60467 | 1473 |
proof - |
64267 | 1474 |
have sumeq: "(\<Sum>i\<in>p. \<bar>content i\<bar>) = sum content p" |
1475 |
apply (rule sum.cong) |
|
60467 | 1476 |
using assms |
1477 |
apply simp |
|
1478 |
apply (metis abs_of_nonneg assms(1) content_pos_le division_ofD(4)) |
|
1479 |
done |
|
1480 |
have e: "0 \<le> e" |
|
1481 |
using assms(2) norm_ge_zero order_trans by blast |
|
64267 | 1482 |
have "norm (sum (\<lambda>l. content l *\<^sub>R c) p) \<le> (\<Sum>i\<in>p. norm (content i *\<^sub>R c))" |
1483 |
using norm_sum by blast |
|
60467 | 1484 |
also have "... \<le> e * (\<Sum>i\<in>p. \<bar>content i\<bar>)" |
64267 | 1485 |
by (simp add: sum_distrib_left[symmetric] mult.commute assms(2) mult_right_mono sum_nonneg) |
60467 | 1486 |
also have "... \<le> e * content (cbox a b)" |
1487 |
apply (rule mult_left_mono [OF _ e]) |
|
1488 |
apply (simp add: sumeq) |
|
1489 |
using additive_content_division assms(1) eq_iff apply blast |
|
1490 |
done |
|
1491 |
finally show ?thesis . |
|
1492 |
qed |
|
53494 | 1493 |
|
1494 |
lemma rsum_bound: |
|
60472 | 1495 |
assumes p: "p tagged_division_of (cbox a b)" |
1496 |
and "\<forall>x\<in>cbox a b. norm (f x) \<le> e" |
|
64267 | 1497 |
shows "norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p) \<le> e * content (cbox a b)" |
56188 | 1498 |
proof (cases "cbox a b = {}") |
60472 | 1499 |
case True show ?thesis |
1500 |
using p unfolding True tagged_division_of_trivial by auto |
|
53494 | 1501 |
next |
1502 |
case False |
|
60472 | 1503 |
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
|
1504 |
by (meson ex_in_conv assms(2) norm_ge_zero order_trans) |
64267 | 1505 |
have sum_le: "sum (content \<circ> snd) p \<le> content (cbox a b)" |
60472 | 1506 |
unfolding additive_content_tagged_division[OF p, symmetric] split_def |
1507 |
by (auto intro: eq_refl) |
|
1508 |
have con: "\<And>xk. xk \<in> p \<Longrightarrow> 0 \<le> content (snd xk)" |
|
1509 |
using tagged_division_ofD(4) [OF p] content_pos_le |
|
1510 |
by force |
|
1511 |
have norm: "\<And>xk. xk \<in> p \<Longrightarrow> norm (f (fst xk)) \<le> e" |
|
1512 |
unfolding fst_conv using tagged_division_ofD(2,3)[OF p] assms |
|
1513 |
by (metis prod.collapse subset_eq) |
|
64267 | 1514 |
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))" |
1515 |
by (rule norm_sum) |
|
60472 | 1516 |
also have "... \<le> e * content (cbox a b)" |
53494 | 1517 |
unfolding split_def norm_scaleR |
64267 | 1518 |
apply (rule order_trans[OF sum_mono]) |
53494 | 1519 |
apply (rule mult_left_mono[OF _ abs_ge_zero, of _ e]) |
60472 | 1520 |
apply (metis norm) |
64267 | 1521 |
unfolding sum_distrib_right[symmetric] |
1522 |
using con sum_le |
|
60472 | 1523 |
apply (auto simp: mult.commute intro: mult_left_mono [OF _ e]) |
1524 |
done |
|
1525 |
finally show ?thesis . |
|
53494 | 1526 |
qed |
35172 | 1527 |
|
1528 |
lemma rsum_diff_bound: |
|
56188 | 1529 |
assumes "p tagged_division_of (cbox a b)" |
1530 |
and "\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e" |
|
64267 | 1531 |
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 | 1532 |
e * content (cbox a b)" |
53494 | 1533 |
apply (rule order_trans[OF _ rsum_bound[OF assms]]) |
64267 | 1534 |
apply (simp add: split_def scaleR_diff_right sum_subtractf eq_refl) |
53494 | 1535 |
done |
1536 |
||
1537 |
lemma has_integral_bound: |
|
56188 | 1538 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
53494 | 1539 |
assumes "0 \<le> B" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1540 |
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
|
1541 |
and "\<And>x. x\<in>cbox a b \<Longrightarrow> norm (f x) \<le> B" |
60472 | 1542 |
shows "norm i \<le> B * content (cbox a b)" |
1543 |
proof (rule ccontr) |
|
53494 | 1544 |
assume "\<not> ?thesis" |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1545 |
then have "norm i - B * content (cbox a b) > 0" |
53494 | 1546 |
by auto |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1547 |
with f[unfolded has_integral] |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1548 |
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
|
1549 |
"\<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
|
1550 |
\<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
|
1551 |
by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1552 |
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
|
1553 |
using fine_division_exists by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1554 |
have "\<And>s B. norm s \<le> B \<Longrightarrow> \<not> norm (s - i) < norm i - B" |
60472 | 1555 |
unfolding not_less |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1556 |
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
|
1557 |
then show False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1558 |
using \<gamma> [OF p \<open>\<gamma> fine p\<close>] rsum_bound[OF p] assms by metis |
53494 | 1559 |
qed |
1560 |
||
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1561 |
corollary has_integral_bound_real: |
56188 | 1562 |
fixes f :: "real \<Rightarrow> 'b::real_normed_vector" |
1563 |
assumes "0 \<le> B" |
|
60472 | 1564 |
and "(f has_integral i) {a .. b}" |
1565 |
and "\<forall>x\<in>{a .. b}. norm (f x) \<le> B" |
|
1566 |
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
|
1567 |
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
|
1568 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
1569 |
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
|
1570 |
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
|
1571 |
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
|
1572 |
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
|
1573 |
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
|
1574 |
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
|
1575 |
by (metis integrable_integral has_integral_bound assms) |
56188 | 1576 |
|
35172 | 1577 |
|
60420 | 1578 |
subsection \<open>Similar theorems about relationship among components.\<close> |
35172 | 1579 |
|
53494 | 1580 |
lemma rsum_component_le: |
56188 | 1581 |
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
|
1582 |
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
|
1583 |
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
|
1584 |
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 | 1585 |
unfolding inner_sum_left |
1586 |
proof (rule sum_mono, clarify) |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1587 |
fix x K |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1588 |
assume ab: "(x, K) \<in> p" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1589 |
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
|
1590 |
by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
1591 |
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
|
1592 |
by (metis ab assms inner_scaleR_left measure_nonneg mult_left_mono tag_in_interval) |
53494 | 1593 |
qed |
35172 | 1594 |
|
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
|
1595 |
lemma has_integral_component_le: |
56188 | 1596 |
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
|
1597 |
assumes k: "k \<in> Basis" |
66199 | 1598 |
assumes "(f has_integral i) S" "(g has_integral j) S" |
1599 |
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
|
1600 |
shows "i\<bullet>k \<le> j\<bullet>k" |
50348 | 1601 |
proof - |
66199 | 1602 |
have ik_le_jk: "i\<bullet>k \<le> j\<bullet>k" |
61165 | 1603 |
if f_i: "(f has_integral i) (cbox a b)" |
1604 |
and g_j: "(g has_integral j) (cbox a b)" |
|
1605 |
and le: "\<forall>x\<in>cbox a b. (f x)\<bullet>k \<le> (g x)\<bullet>k" |
|
1606 |
for a b i and j :: 'b and f g :: "'a \<Rightarrow> 'b" |
|
50348 | 1607 |
proof (rule ccontr) |
61165 | 1608 |
assume "\<not> ?thesis" |
53494 | 1609 |
then have *: "0 < (i\<bullet>k - j\<bullet>k) / 3" |
1610 |
by auto |
|
66199 | 1611 |
obtain \<gamma>1 where "gauge \<gamma>1" |
1612 |
and \<gamma>1: "\<And>p. \<lbrakk>p tagged_division_of cbox a b; \<gamma>1 fine p\<rbrakk> |
|
1613 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - i) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1614 |
using f_i[unfolded has_integral,rule_format,OF *] by fastforce |
|
1615 |
obtain \<gamma>2 where "gauge \<gamma>2" |
|
1616 |
and \<gamma>2: "\<And>p. \<lbrakk>p tagged_division_of cbox a b; \<gamma>2 fine p\<rbrakk> |
|
1617 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R g x) - j) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1618 |
using g_j[unfolded has_integral,rule_format,OF *] by fastforce |
|
1619 |
obtain p where p: "p tagged_division_of cbox a b" and "\<gamma>1 fine p" "\<gamma>2 fine p" |
|
1620 |
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
|
1621 |
by metis |
60474 | 1622 |
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 | 1623 |
"\<bar>((\<Sum>(x, k)\<in>p. content k *\<^sub>R g x) - j) \<bullet> k\<bar> < (i \<bullet> k - j \<bullet> k) / 3" |
1624 |
using le_less_trans[OF Basis_le_norm[OF k]] k \<gamma>1 \<gamma>2 by metis+ |
|
53494 | 1625 |
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
|
1626 |
unfolding inner_simps |
66199 | 1627 |
using rsum_component_le[OF p] le |
1628 |
by (fastforce simp add: abs_real_def split: if_split_asm) |
|
53494 | 1629 |
qed |
60474 | 1630 |
show ?thesis |
66199 | 1631 |
proof (cases "\<exists>a b. S = cbox a b") |
60474 | 1632 |
case True |
66199 | 1633 |
with ik_le_jk assms show ?thesis |
60474 | 1634 |
by auto |
1635 |
next |
|
1636 |
case False |
|
1637 |
show ?thesis |
|
1638 |
proof (rule ccontr) |
|
1639 |
assume "\<not> i\<bullet>k \<le> j\<bullet>k" |
|
1640 |
then have ij: "(i\<bullet>k - j\<bullet>k) / 3 > 0" |
|
1641 |
by auto |
|
66199 | 1642 |
obtain B1 where "0 < B1" |
1643 |
and B1: "\<And>a b. ball 0 B1 \<subseteq> cbox a b \<Longrightarrow> |
|
1644 |
\<exists>z. ((\<lambda>x. if x \<in> S then f x else 0) has_integral z) (cbox a b) \<and> |
|
1645 |
norm (z - i) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1646 |
using has_integral_altD[OF _ False ij] assms by blast |
|
1647 |
obtain B2 where "0 < B2" |
|
1648 |
and B2: "\<And>a b. ball 0 B2 \<subseteq> cbox a b \<Longrightarrow> |
|
1649 |
\<exists>z. ((\<lambda>x. if x \<in> S then g x else 0) has_integral z) (cbox a b) \<and> |
|
1650 |
norm (z - j) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1651 |
using has_integral_altD[OF _ False ij] assms by blast |
|
60474 | 1652 |
have "bounded (ball 0 B1 \<union> ball (0::'a) B2)" |
1653 |
unfolding bounded_Un by(rule conjI bounded_ball)+ |
|
66199 | 1654 |
from bounded_subset_cbox[OF this] |
1655 |
obtain a b::'a where ab: "ball 0 B1 \<subseteq> cbox a b" "ball 0 B2 \<subseteq> cbox a b" |
|
66193 | 1656 |
by blast+ |
66199 | 1657 |
then obtain w1 w2 where int_w1: "((\<lambda>x. if x \<in> S then f x else 0) has_integral w1) (cbox a b)" |
1658 |
and norm_w1: "norm (w1 - i) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1659 |
and int_w2: "((\<lambda>x. if x \<in> S then g x else 0) has_integral w2) (cbox a b)" |
|
1660 |
and norm_w2: "norm (w2 - j) < (i \<bullet> k - j \<bullet> k) / 3" |
|
1661 |
using B1 B2 by blast |
|
60474 | 1662 |
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 | 1663 |
by (simp add: abs_real_def split: if_split_asm) |
66199 | 1664 |
have "\<bar>(w1 - i) \<bullet> k\<bar> < (i \<bullet> k - j \<bullet> k) / 3" |
1665 |
"\<bar>(w2 - j) \<bullet> k\<bar> < (i \<bullet> k - j \<bullet> k) / 3" |
|
1666 |
using Basis_le_norm k le_less_trans norm_w1 norm_w2 by blast+ |
|
60474 | 1667 |
moreover |
1668 |
have "w1\<bullet>k \<le> w2\<bullet>k" |
|
66199 | 1669 |
using ik_le_jk int_w1 int_w2 f_le_g by auto |
60474 | 1670 |
ultimately show False |
1671 |
unfolding inner_simps by(rule *) |
|
1672 |
qed |
|
1673 |
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
|
1674 |
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
|
1675 |
|
53494 | 1676 |
lemma integral_component_le: |
56188 | 1677 |
fixes g f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53494 | 1678 |
assumes "k \<in> Basis" |
66199 | 1679 |
and "f integrable_on S" "g integrable_on S" |
1680 |
and "\<And>x. x \<in> S \<Longrightarrow> (f x)\<bullet>k \<le> (g x)\<bullet>k" |
|
1681 |
shows "(integral S f)\<bullet>k \<le> (integral S g)\<bullet>k" |
|
53494 | 1682 |
apply (rule has_integral_component_le) |
1683 |
using integrable_integral assms |
|
1684 |
apply auto |
|
1685 |
done |
|
1686 |
||
1687 |
lemma has_integral_component_nonneg: |
|
56188 | 1688 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53494 | 1689 |
assumes "k \<in> Basis" |
66199 | 1690 |
and "(f has_integral i) S" |
1691 |
and "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> (f x)\<bullet>k" |
|
53494 | 1692 |
shows "0 \<le> i\<bullet>k" |
1693 |
using has_integral_component_le[OF assms(1) has_integral_0 assms(2)] |
|
1694 |
using assms(3-) |
|
1695 |
by auto |
|
1696 |
||
1697 |
lemma integral_component_nonneg: |
|
56188 | 1698 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53494 | 1699 |
assumes "k \<in> Basis" |
66199 | 1700 |
and "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> (f x)\<bullet>k" |
1701 |
shows "0 \<le> (integral S f)\<bullet>k" |
|
1702 |
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
|
1703 |
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
|
1704 |
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
|
1705 |
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
|
1706 |
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
|
1707 |
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
|
1708 |
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
|
1709 |
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
|
1710 |
qed |
53494 | 1711 |
|
1712 |
lemma has_integral_component_neg: |
|
56188 | 1713 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
53494 | 1714 |
assumes "k \<in> Basis" |
66199 | 1715 |
and "(f has_integral i) S" |
1716 |
and "\<And>x. x \<in> S \<Longrightarrow> (f x)\<bullet>k \<le> 0" |
|
53494 | 1717 |
shows "i\<bullet>k \<le> 0" |
1718 |
using has_integral_component_le[OF assms(1,2) has_integral_0] assms(2-) |
|
1719 |
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
|
1720 |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1721 |
lemma has_integral_component_lbound: |
56188 | 1722 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
1723 |
assumes "(f has_integral i) (cbox a b)" |
|
1724 |
and "\<forall>x\<in>cbox a b. B \<le> f(x)\<bullet>k" |
|
53494 | 1725 |
and "k \<in> Basis" |
56188 | 1726 |
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
|
1727 |
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 | 1728 |
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
|
1729 |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
50348
diff
changeset
|
1730 |
lemma has_integral_component_ubound: |
56188 | 1731 |
fixes f::"'a::euclidean_space => 'b::euclidean_space" |
1732 |
assumes "(f has_integral i) (cbox a b)" |
|
1733 |
and "\<forall>x\<in>cbox a b. f x\<bullet>k \<le> B" |
|
53494 | 1734 |
and "k \<in> Basis" |
56188 | 1735 |
shows "i\<bullet>k \<le> B * content (cbox a b)" |
53494 | 1736 |
using has_integral_component_le[OF assms(3,1) has_integral_const, of "\<Sum>i\<in>Basis. B *\<^sub>R i"] assms(2-) |
1737 |
by (auto simp add: field_simps) |
|
1738 |
||
1739 |
lemma integral_component_lbound: |
|
56188 | 1740 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
1741 |
assumes "f integrable_on cbox a b" |
|
1742 |
and "\<forall>x\<in>cbox a b. B \<le> f(x)\<bullet>k" |
|
53494 | 1743 |
and "k \<in> Basis" |
56188 | 1744 |
shows "B * content (cbox a b) \<le> (integral(cbox a b) f)\<bullet>k" |
53494 | 1745 |
apply (rule has_integral_component_lbound) |
1746 |
using assms |
|
1747 |
unfolding has_integral_integral |
|
1748 |
apply auto |
|
1749 |
done |
|
1750 |
||
56190 | 1751 |
lemma integral_component_lbound_real: |
1752 |
assumes "f integrable_on {a ::real .. b}" |
|
1753 |
and "\<forall>x\<in>{a .. b}. B \<le> f(x)\<bullet>k" |
|
1754 |
and "k \<in> Basis" |
|
1755 |
shows "B * content {a .. b} \<le> (integral {a .. b} f)\<bullet>k" |
|
1756 |
using assms |
|
1757 |
by (metis box_real(2) integral_component_lbound) |
|
1758 |
||
53494 | 1759 |
lemma integral_component_ubound: |
56188 | 1760 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
1761 |
assumes "f integrable_on cbox a b" |
|
1762 |
and "\<forall>x\<in>cbox a b. f x\<bullet>k \<le> B" |
|
53494 | 1763 |
and "k \<in> Basis" |
56188 | 1764 |
shows "(integral (cbox a b) f)\<bullet>k \<le> B * content (cbox a b)" |
53494 | 1765 |
apply (rule has_integral_component_ubound) |
1766 |
using assms |
|
1767 |
unfolding has_integral_integral |
|
1768 |
apply auto |
|
1769 |
done |
|
1770 |
||
56190 | 1771 |
lemma integral_component_ubound_real: |
1772 |
fixes f :: "real \<Rightarrow> 'a::euclidean_space" |
|
1773 |
assumes "f integrable_on {a .. b}" |
|
1774 |
and "\<forall>x\<in>{a .. b}. f x\<bullet>k \<le> B" |
|
1775 |
and "k \<in> Basis" |
|
1776 |
shows "(integral {a .. b} f)\<bullet>k \<le> B * content {a .. b}" |
|
1777 |
using assms |
|
1778 |
by (metis box_real(2) integral_component_ubound) |
|
35172 | 1779 |
|
60420 | 1780 |
subsection \<open>Uniform limit of integrable functions is integrable.\<close> |
35172 | 1781 |
|
62626
de25474ce728
Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1782 |
lemma real_arch_invD: |
de25474ce728
Contractible sets. Also removal of obsolete theorems and refactoring
paulson <lp15@cam.ac.uk>
parents:
62623
diff
changeset
|
1783 |
"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
|
1784 |
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
|
1785 |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1786 |
|
53494 | 1787 |
lemma integrable_uniform_limit: |
56188 | 1788 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1789 |
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 | 1790 |
shows "f integrable_on cbox a b" |
60487 | 1791 |
proof (cases "content (cbox a b) > 0") |
1792 |
case False then show ?thesis |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1793 |
using has_integral_null by (simp add: content_lt_nz integrable_on_def) |
60487 | 1794 |
next |
1795 |
case True |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1796 |
have "1 / (real n + 1) > 0" for n |
53494 | 1797 |
by auto |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1798 |
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
|
1799 |
using assms by blast |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1800 |
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
|
1801 |
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
|
1802 |
by metis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1803 |
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
|
1804 |
unfolding integrable_on_def by metis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1805 |
have "Cauchy h" |
53494 | 1806 |
unfolding Cauchy_def |
60487 | 1807 |
proof clarify |
53494 | 1808 |
fix e :: real |
1809 |
assume "e>0" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1810 |
then have "e/4 / content (cbox a b) > 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1811 |
using True by (auto simp: field_simps) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1812 |
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
|
1813 |
by (metis inverse_eq_divide real_arch_inverse) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1814 |
show "\<exists>M. \<forall>m\<ge>M. \<forall>n\<ge>M. dist (h m) (h n) < e" |
60487 | 1815 |
proof (rule exI [where x=M], clarify) |
1816 |
fix m n |
|
1817 |
assume m: "M \<le> m" and n: "M \<le> n" |
|
60420 | 1818 |
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
|
1819 |
then obtain gm gn where "gauge gm" "gauge gn" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1820 |
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
|
1821 |
\<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
|
1822 |
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
|
1823 |
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
|
1824 |
using h[unfolded has_integral] by meson |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1825 |
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
|
1826 |
by (metis (full_types) fine_division_exists gauge_Int) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1827 |
have triangle3: "norm (i1 - i2) < e" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1828 |
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
|
1829 |
proof - |
53494 | 1830 |
have "norm (i1 - i2) \<le> norm (i1 - s1) + norm (s1 - s2) + norm (s2 - i2)" |
35172 | 1831 |
using norm_triangle_ineq[of "i1 - s1" "s1 - i2"] |
53494 | 1832 |
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
|
1833 |
by (auto simp: algebra_simps) |
53494 | 1834 |
also have "\<dots> < e" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1835 |
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
|
1836 |
finally show ?thesis . |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1837 |
qed |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1838 |
have finep: "gm fine \<D>" "gn fine \<D>" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1839 |
using fine_Int \<D> by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1840 |
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
|
1841 |
proof - |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1842 |
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
|
1843 |
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
|
1844 |
also have "\<dots> \<le> 1 / (real M) + 1 / (real M)" |
53494 | 1845 |
apply (rule add_mono) |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1846 |
using \<open>M \<noteq> 0\<close> m n by (auto simp: divide_simps) |
53494 | 1847 |
also have "\<dots> = 2 / real M" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1848 |
by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1849 |
finally show "norm (g n x - g m x) \<le> 2 / real M" |
35172 | 1850 |
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
|
1851 |
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
|
1852 |
qed |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1853 |
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
|
1854 |
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
|
1855 |
also have "... \<le> e/2" |
60487 | 1856 |
using M True |
66294
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 |
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
|
1859 |
then show "dist (h m) (h n) < e" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1860 |
unfolding dist_norm using gm gn \<D> finep by (auto intro!: triangle3) |
60487 | 1861 |
qed |
1862 |
qed |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1863 |
then obtain s where s: "h \<longlonglongrightarrow> s" |
64287 | 1864 |
using convergent_eq_Cauchy[symmetric] by blast |
53494 | 1865 |
show ?thesis |
60487 | 1866 |
unfolding integrable_on_def has_integral |
1867 |
proof (rule_tac x=s in exI, clarify) |
|
1868 |
fix e::real |
|
1869 |
assume e: "0 < e" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1870 |
then have "e/3 > 0" by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1871 |
then obtain N1 where N1: "\<forall>n\<ge>N1. norm (h n - s) < e/3" |
60487 | 1872 |
using LIMSEQ_D [OF s] by metis |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1873 |
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
|
1874 |
by (auto simp: field_simps) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1875 |
then obtain N2 :: nat |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1876 |
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
|
1877 |
by (metis inverse_eq_divide real_arch_inverse) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1878 |
obtain g' where "gauge g'" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1879 |
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
|
1880 |
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
|
1881 |
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
|
1882 |
have *: "norm (sf - s) < e" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1883 |
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
|
1884 |
proof - |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1885 |
have "norm (sf - s) \<le> norm (sf - sg) + norm (sg - h) + norm (h - s)" |
35172 | 1886 |
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
|
1887 |
using norm_triangle_ineq[of "sg - h" " h - s"] |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1888 |
by (auto simp: algebra_simps) |
53494 | 1889 |
also have "\<dots> < e" |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1890 |
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
|
1891 |
finally show ?thesis . |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1892 |
qed |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1893 |
{ fix \<D> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1894 |
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
|
1895 |
then have norm_less: "norm ((\<Sum>(x,K) \<in> \<D>. content K *\<^sub>R g (N1 + N2) x) - h (N1 + N2)) < e/3" |
60487 | 1896 |
using g' by blast |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1897 |
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
|
1898 |
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
|
1899 |
moreover have "e/3 * of_nat N2 \<le> e/3 * (of_nat (N1 + N2) + 1)" |
60487 | 1900 |
using \<open>e>0\<close> by auto |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1901 |
ultimately have "content (cbox a b) < e/3 * (of_nat (N1 + N2) + 1)" |
60487 | 1902 |
by linarith |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1903 |
then have le_e3: "1 / (real (N1 + N2) + 1) * content (cbox a b) \<le> e/3" |
60487 | 1904 |
unfolding inverse_eq_divide |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1905 |
by (auto simp: field_simps) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1906 |
have ne3: "norm (h (N1 + N2) - s) < e/3" |
60487 | 1907 |
using N1 by auto |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1908 |
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
|
1909 |
\<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
|
1910 |
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
|
1911 |
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
|
1912 |
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
|
1913 |
} |
60487 | 1914 |
then show "\<exists>d. gauge d \<and> |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1915 |
(\<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
|
1916 |
by (blast intro: g' \<open>gauge g'\<close>) |
53494 | 1917 |
qed |
1918 |
qed |
|
1919 |
||
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
1920 |
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
|
1921 |
|
35172 | 1922 |
|
60420 | 1923 |
subsection \<open>Negligible sets.\<close> |
35172 | 1924 |
|
56188 | 1925 |
definition "negligible (s:: 'a::euclidean_space set) \<longleftrightarrow> |
1926 |
(\<forall>a b. ((indicator s :: 'a\<Rightarrow>real) has_integral 0) (cbox a b))" |
|
53494 | 1927 |
|
35172 | 1928 |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
1929 |
subsubsection \<open>Negligibility of hyperplane.\<close> |
35172 | 1930 |
|
53495 | 1931 |
lemma content_doublesplit: |
56188 | 1932 |
fixes a :: "'a::euclidean_space" |
53495 | 1933 |
assumes "0 < e" |
1934 |
and k: "k \<in> Basis" |
|
61945 | 1935 |
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
|
1936 |
proof cases |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1937 |
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
|
1938 |
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
|
1939 |
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
|
1940 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1941 |
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
|
1942 |
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
|
1943 |
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
|
1944 |
using k * |
64272 | 1945 |
by (intro prod_zero bexI[OF _ k]) |
64267 | 1946 |
(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
|
1947 |
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
|
1948 |
((\<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
|
1949 |
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
|
1950 |
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
|
1951 |
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
|
1952 |
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
|
1953 |
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
|
1954 |
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
|
1955 |
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
|
1956 |
by simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1957 |
qed simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1958 |
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
|
1959 |
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
|
1960 |
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
|
1961 |
by (subst (asm) eventually_at_right[of _ 1]) auto |
53495 | 1962 |
show ?thesis |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1963 |
by (rule that[of "d'/2"], insert \<open>0<d'\<close> d'[of "d'/2"], auto) |
53495 | 1964 |
next |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1965 |
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
|
1966 |
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
|
1967 |
by (auto simp: not_le) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1968 |
show thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1969 |
proof cases |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1970 |
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
|
1971 |
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
|
1972 |
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
|
1973 |
show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1974 |
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
|
1975 |
next |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1976 |
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
|
1977 |
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
|
1978 |
by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1979 |
then show thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1980 |
proof |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1981 |
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
|
1982 |
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
|
1983 |
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
|
1984 |
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
|
1985 |
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
|
1986 |
with \<open>0<e\<close> c that[of "(a \<bullet> k - c) / 2"] show ?thesis |
53495 | 1987 |
by auto |
60492 | 1988 |
next |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1989 |
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
|
1990 |
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
|
1991 |
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
|
1992 |
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
|
1993 |
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
|
1994 |
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
|
1995 |
by auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1996 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1997 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1998 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
1999 |
|
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
|
2000 |
|
53399 | 2001 |
lemma negligible_standard_hyperplane[intro]: |
56188 | 2002 |
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
|
2003 |
assumes k: "k \<in> Basis" |
53399 | 2004 |
shows "negligible {x. x\<bullet>k = c}" |
53495 | 2005 |
unfolding negligible_def has_integral |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
2006 |
proof (clarify, goal_cases) |
61165 | 2007 |
case (1 a b e) |
2008 |
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" |
|
2009 |
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
|
2010 |
let ?i = "indicator {x::'a. x\<bullet>k = c} :: 'a\<Rightarrow>real" |
53495 | 2011 |
show ?case |
2012 |
apply (rule_tac x="\<lambda>x. ball x d" in exI) |
|
2013 |
apply rule |
|
2014 |
apply (rule gauge_ball) |
|
2015 |
apply (rule d) |
|
2016 |
proof (rule, rule) |
|
2017 |
fix p |
|
56188 | 2018 |
assume p: "p tagged_division_of (cbox a b) \<and> (\<lambda>x. ball x d) fine p" |
53495 | 2019 |
have *: "(\<Sum>(x, ka)\<in>p. content ka *\<^sub>R ?i x) = |
61945 | 2020 |
(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x\<bullet>k - c\<bar> \<le> d}) *\<^sub>R ?i x)" |
64267 | 2021 |
apply (rule sum.cong) |
57418 | 2022 |
apply (rule refl) |
53495 | 2023 |
unfolding split_paired_all real_scaleR_def mult_cancel_right split_conv |
2024 |
apply cases |
|
2025 |
apply (rule disjI1) |
|
2026 |
apply assumption |
|
2027 |
apply (rule disjI2) |
|
2028 |
proof - |
|
2029 |
fix x l |
|
2030 |
assume as: "(x, l) \<in> p" "?i x \<noteq> 0" |
|
2031 |
then have xk: "x\<bullet>k = c" |
|
2032 |
unfolding indicator_def |
|
2033 |
apply - |
|
2034 |
apply (rule ccontr) |
|
2035 |
apply auto |
|
2036 |
done |
|
2037 |
show "content l = content (l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})" |
|
2038 |
apply (rule arg_cong[where f=content]) |
|
2039 |
apply (rule set_eqI) |
|
2040 |
apply rule |
|
2041 |
apply rule |
|
2042 |
unfolding mem_Collect_eq |
|
2043 |
proof - |
|
2044 |
fix y |
|
2045 |
assume y: "y \<in> l" |
|
2046 |
note p[THEN conjunct2,unfolded fine_def,rule_format,OF as(1),unfolded split_conv] |
|
2047 |
note this[unfolded subset_eq mem_ball dist_norm,rule_format,OF y] |
|
2048 |
note le_less_trans[OF Basis_le_norm[OF k] this] |
|
2049 |
then show "\<bar>y \<bullet> k - c\<bar> \<le> d" |
|
2050 |
unfolding inner_simps xk by auto |
|
2051 |
qed auto |
|
2052 |
qed |
|
35172 | 2053 |
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
|
2054 |
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 | 2055 |
proof - |
2056 |
have "(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) * ?i x) \<le> |
|
2057 |
(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}))" |
|
64267 | 2058 |
apply (rule sum_mono) |
53495 | 2059 |
unfolding split_paired_all split_conv |
2060 |
apply (rule mult_right_le_one_le) |
|
2061 |
apply (drule p'(4)) |
|
2062 |
apply (auto simp add:interval_doublesplit[OF k]) |
|
2063 |
done |
|
2064 |
also have "\<dots> < e" |
|
64267 | 2065 |
proof (subst sum.over_tagged_division_lemma[OF p[THEN conjunct1]], goal_cases) |
61167 | 2066 |
case prems: (1 u v) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
2067 |
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
|
2068 |
unfolding content_eq_0_interior by simp |
56188 | 2069 |
have "content (cbox u v \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) \<le> content (cbox u v)" |
53495 | 2070 |
unfolding interval_doublesplit[OF k] |
2071 |
apply (rule content_subset) |
|
2072 |
unfolding interval_doublesplit[symmetric,OF k] |
|
2073 |
apply auto |
|
2074 |
done |
|
2075 |
then show ?case |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
2076 |
unfolding * interval_doublesplit[OF k] |
50348 | 2077 |
by (blast intro: antisym) |
53495 | 2078 |
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
|
2079 |
have "(\<Sum>l\<in>snd ` p. content (l \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})) = |
64267 | 2080 |
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> {}})" |
2081 |
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
|
2082 |
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
|
2083 |
"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
|
2084 |
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
|
2085 |
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
|
2086 |
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
|
2087 |
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
|
2088 |
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
|
2089 |
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
|
2090 |
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
|
2091 |
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
|
2092 |
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
|
2093 |
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 | 2094 |
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
|
2095 |
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
|
2096 |
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
|
2097 |
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
|
2098 |
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
|
2099 |
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
|
2100 |
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
|
2101 |
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
|
2102 |
finally show "(\<Sum>ka\<in>snd ` p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d})) < e" . |
53495 | 2103 |
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
|
2104 |
finally show "(\<Sum>(x, ka)\<in>p. content (ka \<inter> {x. \<bar>x \<bullet> k - c\<bar> \<le> d}) * ?i x) < e" . |
53495 | 2105 |
qed |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
2106 |
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
|
2107 |
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
|
2108 |
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
|
2109 |
using measure_nonneg by (force simp add: indicator_def intro: sum_nonneg)+ |
53495 | 2110 |
qed |
2111 |
qed |
|
2112 |
||
35172 | 2113 |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2114 |
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
|
2115 |
|
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2116 |
|
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2117 |
lemma has_integral_negligible_cbox: |
56188 | 2118 |
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
|
2119 |
assumes negs: "negligible S" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2120 |
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
|
2121 |
shows "(f has_integral 0) (cbox a b)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2122 |
unfolding has_integral |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2123 |
proof clarify |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2124 |
fix e::real |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2125 |
assume "e > 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2126 |
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
|
2127 |
by simp |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2128 |
then have "\<exists>\<gamma>. gauge \<gamma> \<and> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2129 |
(\<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
|
2130 |
\<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
|
2131 |
< e/2 / ((real n + 1) * 2 ^ n))" for n |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2132 |
using negs [unfolded negligible_def has_integral] by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2133 |
then obtain \<gamma> where |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2134 |
gd: "\<And>n. gauge (\<gamma> n)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2135 |
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
|
2136 |
\<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
|
2137 |
by metis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2138 |
show "\<exists>\<gamma>. gauge \<gamma> \<and> |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2139 |
(\<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
|
2140 |
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
|
2141 |
proof (intro exI, safe) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2142 |
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
|
2143 |
using gd by (auto simp: gauge_def) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2144 |
|
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2145 |
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
|
2146 |
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
|
2147 |
proof (cases "\<D> = {}") |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2148 |
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
|
2149 |
next |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2150 |
case False |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2151 |
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
|
2152 |
using real_arch_simple by blast |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2153 |
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
|
2154 |
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
|
2155 |
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
|
2156 |
by (auto intro: tagged_division_finer[OF that(1) gd]) |
66199 | 2157 |
from choice[OF this] |
2158 |
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
|
2159 |
"\<And>n. \<gamma> n fine q n" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2160 |
"\<And>n x K. \<lbrakk>(x, K) \<in> \<D>; K \<subseteq> \<gamma> n x\<rbrakk> \<Longrightarrow> (x, K) \<in> q n" |
66199 | 2161 |
by fastforce |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2162 |
have "finite \<D>" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2163 |
using that(1) by blast |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2164 |
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
|
2165 |
\<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
|
2166 |
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
|
2167 |
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
|
2168 |
unfolding split_def by (rule norm_sum) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2169 |
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
|
2170 |
(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
|
2171 |
proof (rule sum_le_inc, safe) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2172 |
show "finite (Sigma {..N+1} q)" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2173 |
by (meson finite_SigmaI finite_atMost tagged_division_of_finite q(1)) |
53495 | 2174 |
next |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2175 |
fix x K |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2176 |
assume xk: "(x, K) \<in> \<D>" |
63040 | 2177 |
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
|
2178 |
have *: "norm (f x) \<in> (\<lambda>(x, K). norm (f x)) ` \<D>" |
53495 | 2179 |
using xk by auto |
2180 |
have nfx: "real n \<le> norm (f x)" "norm (f x) \<le> real n + 1" |
|
2181 |
unfolding n_def by auto |
|
2182 |
then have "n \<in> {0..N + 1}" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2183 |
using N[OF *] by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2184 |
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
|
2185 |
using that(2) xk by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2186 |
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
|
2187 |
by (simp add: q(3) xk) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2188 |
moreover then have "(x, K) \<in> q n" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2189 |
using n_def by blast |
53495 | 2190 |
moreover |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2191 |
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
|
2192 |
proof (cases "x \<in> S") |
53495 | 2193 |
case False |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2194 |
then show ?thesis by (simp add: 0) |
53495 | 2195 |
next |
2196 |
case True |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2197 |
have *: "content K \<ge> 0" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2198 |
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
|
2199 |
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
|
2200 |
by (simp add: mult_left_mono nfx(2)) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2201 |
ultimately show ?thesis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2202 |
using nfx True by (auto simp: field_simps) |
53495 | 2203 |
qed |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2204 |
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
|
2205 |
(real y + 1) * (content K *\<^sub>R indicator S x)" |
66199 | 2206 |
by force |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2207 |
qed auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2208 |
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
|
2209 |
apply (rule sum_Sigma_product [symmetric]) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2210 |
using q(1) apply auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2211 |
done |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2212 |
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
|
2213 |
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
|
2214 |
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
|
2215 |
proof (rule sum_mono) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2216 |
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
|
2217 |
if "i \<in> {..N + 1}" for i |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2218 |
using \<gamma>[of "q i" i] q by (simp add: divide_simps mult.left_commute) |
53495 | 2219 |
qed |
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2220 |
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
|
2221 |
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
|
2222 |
also have "\<dots> < e/2 * 2" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2223 |
proof (rule mult_strict_left_mono) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2224 |
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
|
2225 |
using lessThan_Suc_atMost by auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2226 |
also have "... < 2" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2227 |
by (auto simp: geometric_sum) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2228 |
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
|
2229 |
qed (use \<open>0 < e\<close> in auto) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2230 |
finally show ?thesis by auto |
53495 | 2231 |
qed |
2232 |
qed |
|
2233 |
qed |
|
2234 |
||
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2235 |
|
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2236 |
proposition has_integral_negligible: |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2237 |
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
|
2238 |
assumes negs: "negligible S" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2239 |
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
|
2240 |
shows "(f has_integral 0) T" |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2241 |
proof (cases "\<exists>a b. T = cbox a b") |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2242 |
case True |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2243 |
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
|
2244 |
using assms by (auto intro!: has_integral_negligible_cbox) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2245 |
then show ?thesis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2246 |
by (rule has_integral_eq [rotated]) auto |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2247 |
next |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2248 |
case False |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2249 |
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
|
2250 |
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
|
2251 |
apply (auto simp: False has_integral_alt [of ?f]) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2252 |
apply (rule_tac x=1 in exI, auto) |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2253 |
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
|
2254 |
done |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2255 |
then show ?thesis |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2256 |
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
|
2257 |
qed |
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2258 |
|
53495 | 2259 |
lemma has_integral_spike: |
56188 | 2260 |
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
|
2261 |
assumes "negligible S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2262 |
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
|
2263 |
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
|
2264 |
shows "(g has_integral y) T" |
53495 | 2265 |
proof - |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2266 |
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
|
2267 |
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
|
2268 |
proof - |
56188 | 2269 |
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
|
2270 |
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
|
2271 |
then show ?thesis |
53495 | 2272 |
by auto |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2273 |
qed |
53495 | 2274 |
show ?thesis |
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2275 |
using fint gf |
53495 | 2276 |
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
|
2277 |
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
|
2278 |
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
|
2279 |
apply (blast dest: *) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
2280 |
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
|
2281 |
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
|
2282 |
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 | 2283 |
done |
2284 |
qed |
|
35172 | 2285 |
|
2286 |
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
|
2287 |
assumes "negligible S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2288 |
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
|
2289 |
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
|
2290 |
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
|
2291 |
by metis |
53495 | 2292 |
|
2293 |
lemma integrable_spike: |
|
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2294 |
assumes "negligible S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2295 |
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
|
2296 |
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
|
2297 |
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
|
2298 |
using assms unfolding integrable_on_def by (blast intro: has_integral_spike) |
53495 | 2299 |
|
2300 |
lemma integral_spike: |
|
65587
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2301 |
assumes "negligible S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2302 |
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
|
2303 |
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
|
2304 |
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
|
2305 |
by (auto simp: integral_def integrable_on_def) |
53495 | 2306 |
|
35172 | 2307 |
|
60420 | 2308 |
subsection \<open>Some other trivialities about negligible sets.\<close> |
35172 | 2309 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2310 |
lemma negligible_subset: |
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2311 |
assumes "negligible s" "t \<subseteq> s" |
53495 | 2312 |
shows "negligible t" |
2313 |
unfolding negligible_def |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2314 |
by (metis (no_types) Diff_iff assms contra_subsetD has_integral_negligible indicator_simps(2)) |
53495 | 2315 |
|
2316 |
lemma negligible_diff[intro?]: |
|
2317 |
assumes "negligible s" |
|
2318 |
shows "negligible (s - t)" |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2319 |
using assms by (meson Diff_subset negligible_subset) |
53495 | 2320 |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2321 |
lemma negligible_Int: |
53495 | 2322 |
assumes "negligible s \<or> negligible t" |
2323 |
shows "negligible (s \<inter> t)" |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2324 |
using assms negligible_subset by force |
53495 | 2325 |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2326 |
lemma negligible_Un: |
53495 | 2327 |
assumes "negligible s" |
2328 |
and "negligible t" |
|
2329 |
shows "negligible (s \<union> t)" |
|
2330 |
unfolding negligible_def |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
2331 |
proof (safe, goal_cases) |
61165 | 2332 |
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
|
2333 |
note assms[unfolded negligible_def,rule_format,of a b] |
53495 | 2334 |
then show ?case |
2335 |
apply (subst has_integral_spike_eq[OF assms(2)]) |
|
2336 |
defer |
|
2337 |
apply assumption |
|
2338 |
unfolding indicator_def |
|
2339 |
apply auto |
|
2340 |
done |
|
2341 |
qed |
|
2342 |
||
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2343 |
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
|
2344 |
using negligible_Un negligible_subset by blast |
35172 | 2345 |
|
56188 | 2346 |
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
|
2347 |
using negligible_standard_hyperplane[OF SOME_Basis, of "a \<bullet> (SOME i. i \<in> Basis)"] negligible_subset by blast |
35172 | 2348 |
|
53495 | 2349 |
lemma negligible_insert[simp]: "negligible (insert a s) \<longleftrightarrow> negligible s" |
2350 |
apply (subst insert_is_Un) |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
2351 |
unfolding negligible_Un_eq |
53495 | 2352 |
apply auto |
2353 |
done |
|
2354 |
||
60762 | 2355 |
lemma negligible_empty[iff]: "negligible {}" |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
2356 |
using negligible_insert by blast |
53495 | 2357 |
|
2358 |
lemma negligible_finite[intro]: |
|
2359 |
assumes "finite s" |
|
2360 |
shows "negligible s" |
|
2361 |
using assms by (induct s) auto |
|
2362 |
||
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
2363 |
lemma negligible_Union[intro]: |
53495 | 2364 |
assumes "finite s" |
2365 |
and "\<forall>t\<in>s. negligible t" |
|
2366 |
shows "negligible(\<Union>s)" |
|
2367 |
using assms by induct auto |
|
2368 |
||
2369 |
lemma negligible: |
|
56188 | 2370 |
"negligible s \<longleftrightarrow> (\<forall>t::('a::euclidean_space) set. ((indicator s::'a\<Rightarrow>real) has_integral 0) t)" |
53495 | 2371 |
apply safe |
2372 |
defer |
|
2373 |
apply (subst negligible_def) |
|
46905 | 2374 |
proof - |
53495 | 2375 |
fix t :: "'a set" |
2376 |
assume as: "negligible s" |
|
2377 |
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 | 2378 |
by auto |
2379 |
show "((indicator s::'a\<Rightarrow>real) has_integral 0) t" |
|
53495 | 2380 |
apply (subst has_integral_alt) |
2381 |
apply cases |
|
2382 |
apply (subst if_P,assumption) |
|
46905 | 2383 |
unfolding if_not_P |
53495 | 2384 |
apply safe |
2385 |
apply (rule as[unfolded negligible_def,rule_format]) |
|
2386 |
apply (rule_tac x=1 in exI) |
|
2387 |
apply safe |
|
2388 |
apply (rule zero_less_one) |
|
2389 |
apply (rule_tac x=0 in exI) |
|
46905 | 2390 |
using negligible_subset[OF as,of "s \<inter> t"] |
2391 |
unfolding negligible_def indicator_def [abs_def] |
|
2392 |
unfolding * |
|
2393 |
apply auto |
|
2394 |
done |
|
2395 |
qed auto |
|
35172 | 2396 |
|
53495 | 2397 |
|
60420 | 2398 |
subsection \<open>Finite case of the spike theorem is quite commonly needed.\<close> |
35172 | 2399 |
|
53495 | 2400 |
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
|
2401 |
assumes "finite S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2402 |
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
|
2403 |
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
|
2404 |
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
|
2405 |
using assms has_integral_spike negligible_finite by blast |
53495 | 2406 |
|
2407 |
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
|
2408 |
assumes "finite S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2409 |
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
|
2410 |
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
|
2411 |
by (metis assms has_integral_spike_finite) |
35172 | 2412 |
|
2413 |
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
|
2414 |
assumes "finite S" |
16a8991ab398
New material (and some tidying) purely in the Analysis directory
paulson <lp15@cam.ac.uk>
parents:
65578
diff
changeset
|
2415 |
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
|
2416 |
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
|
2417 |
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
|
2418 |
using assms has_integral_spike_finite by blast |
53495 | 2419 |
|
35172 | 2420 |
|
60420 | 2421 |
subsection \<open>In particular, the boundary of an interval is negligible.\<close> |
35172 | 2422 |
|
56188 | 2423 |
lemma negligible_frontier_interval: "negligible(cbox (a::'a::euclidean_space) b - box a b)" |
53495 | 2424 |
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
|
2425 |
let ?A = "\<Union>((\<lambda>k. {x. x\<bullet>k = a\<bullet>k} \<union> {x::'a. x\<bullet>k = b\<bullet>k}) ` Basis)" |
56188 | 2426 |
have "cbox a b - box a b \<subseteq> ?A" |
2427 |
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
|
2428 |
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
|
2429 |
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
|
2430 |
apply(rule_tac x=i in bexI) |
53495 | 2431 |
apply auto |
2432 |
done |
|
2433 |
then show ?thesis |
|
2434 |
apply - |
|
2435 |
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
|
2436 |
apply (rule negligible_Union[OF finite_imageI]) |
53495 | 2437 |
apply auto |
2438 |
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
|
2439 |
qed |
35172 | 2440 |
|
2441 |
lemma has_integral_spike_interior: |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
2442 |
assumes "\<forall>x\<in>box a b. g x = f x" |
56188 | 2443 |
and "(f has_integral y) (cbox a b)" |
2444 |
shows "(g has_integral y) (cbox a b)" |
|
53495 | 2445 |
apply (rule has_integral_spike[OF negligible_frontier_interval _ assms(2)]) |
2446 |
using assms(1) |
|
2447 |
apply auto |
|
2448 |
done |
|
35172 | 2449 |
|
2450 |
lemma has_integral_spike_interior_eq: |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
2451 |
assumes "\<forall>x\<in>box a b. g x = f x" |
56188 | 2452 |
shows "(f has_integral y) (cbox a b) \<longleftrightarrow> (g has_integral y) (cbox a b)" |
53495 | 2453 |
apply rule |
2454 |
apply (rule_tac[!] has_integral_spike_interior) |
|
2455 |
using assms |
|
2456 |
apply auto |
|
2457 |
done |
|
2458 |
||
2459 |
lemma integrable_spike_interior: |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
2460 |
assumes "\<forall>x\<in>box a b. g x = f x" |
56188 | 2461 |
and "f integrable_on cbox a b" |
2462 |
shows "g integrable_on cbox a b" |
|
53495 | 2463 |
using assms |
2464 |
unfolding integrable_on_def |
|
2465 |
using has_integral_spike_interior[OF assms(1)] |
|
2466 |
by auto |
|
2467 |
||
35172 | 2468 |
|
60420 | 2469 |
subsection \<open>Integrability of continuous functions.\<close> |
35172 | 2470 |
|
53520 | 2471 |
lemma operative_approximable: |
61165 | 2472 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
53520 | 2473 |
assumes "0 \<le> e" |
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
|
2474 |
shows "comm_monoid.operative op \<and> True (\<lambda>i. \<exists>g. (\<forall>x\<in>i. norm (f x - g (x::'b)) \<le> e) \<and> g integrable_on 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
|
2475 |
unfolding comm_monoid.operative_def[OF comm_monoid_and] |
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
|
2476 |
proof safe |
53520 | 2477 |
fix a b :: 'b |
61165 | 2478 |
show "\<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b" |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2479 |
if "box a b = {}" for a b |
61165 | 2480 |
apply (rule_tac x=f in exI) |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2481 |
using assms that by (auto simp: content_eq_0_interior) |
53520 | 2482 |
{ |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2483 |
fix c g and k :: 'b |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2484 |
assume fg: "\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e" and g: "g integrable_on cbox a b" |
53520 | 2485 |
assume k: "k \<in> Basis" |
56188 | 2486 |
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}" |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2487 |
"\<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}" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2488 |
apply (rule_tac[!] x=g in exI) |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2489 |
using fg integrable_split[OF g k] by auto |
53520 | 2490 |
} |
56188 | 2491 |
show "\<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b" |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2492 |
if fg1: "\<forall>x\<in>cbox a b \<inter> {x. x \<bullet> k \<le> c}. norm (f x - g1 x) \<le> e" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2493 |
and g1: "g1 integrable_on cbox a b \<inter> {x. x \<bullet> k \<le> c}" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2494 |
and fg2: "\<forall>x\<in>cbox a b \<inter> {x. c \<le> x \<bullet> k}. norm (f x - g2 x) \<le> e" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2495 |
and g2: "g2 integrable_on cbox a b \<inter> {x. c \<le> x \<bullet> k}" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2496 |
and k: "k \<in> Basis" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2497 |
for c k g1 g2 |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2498 |
proof - |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2499 |
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" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2500 |
show "\<exists>g. (\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e) \<and> g integrable_on cbox a b" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2501 |
proof (intro exI conjI ballI) |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2502 |
show "norm (f x - ?g x) \<le> e" if "x \<in> cbox a b" for x |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2503 |
by (auto simp: that assms fg1 fg2) |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2504 |
show "?g integrable_on cbox a b" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2505 |
proof - |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2506 |
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}" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2507 |
by(rule integrable_spike[OF negligible_standard_hyperplane[of k c]], use k g1 g2 in auto)+ |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2508 |
with has_integral_split[OF _ _ k] show ?thesis |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2509 |
unfolding integrable_on_def by blast |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2510 |
qed |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2511 |
qed |
53520 | 2512 |
qed |
2513 |
qed |
|
2514 |
||
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
|
2515 |
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
|
2516 |
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
|
2517 |
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
|
2518 |
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
|
2519 |
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
|
2520 |
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
|
2521 |
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
|
2522 |
|
53520 | 2523 |
lemma approximable_on_division: |
56188 | 2524 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
53520 | 2525 |
assumes "0 \<le> e" |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2526 |
and d: "d division_of (cbox a b)" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2527 |
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 | 2528 |
obtains g where "\<forall>x\<in>cbox a b. norm (f x - g x) \<le> e" "g integrable_on cbox a b" |
53520 | 2529 |
proof - |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2530 |
note * = comm_monoid_set.operative_division |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2531 |
[OF comm_monoid_set_and operative_approximable[OF \<open>0 \<le> e\<close>] d] |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2532 |
have "finite d" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2533 |
by (rule division_of_finite[OF d]) |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2534 |
with f *[unfolded comm_monoid_set_F_and, of f] that show thesis |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
2535 |
by auto |
53520 | 2536 |
qed |
2537 |
||
2538 |
lemma integrable_continuous: |
|
56188 | 2539 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
2540 |
assumes "continuous_on (cbox a b) f" |
|
2541 |
shows "f integrable_on cbox a b" |
|
66294
0442b3f45556
refactored some HORRIBLE integration proofs
paulson <lp15@cam.ac.uk>
parents:
66199
diff
changeset
|
2542 |
proof (rule integrable_uniform_limit) |
53520 | 2543 |
fix e :: real |
2544 |
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
|
2545 |
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
|
2546 |
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
|
2547 |
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
|
2548 |
using fine_division_exists[OF gauge_ball[OF \<open>0 < d\<close>], of a b] . |
53520 | 2549 |
have *: "\<forall>i\<in>snd ` p. \<exists>g. (\<forall>x\<in>i. norm (f x - g x) \<le> e) \<and> g integrable_on i" |
2550 |
proof (safe, unfold snd_conv) |
|
2551 |
fix x l |
|
2552 |
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
|
2553 |
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
|
2554 |
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
|
2555 |
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
|
2556 |
using as ptag by auto |
53520 | 2557 |
show "\<exists>g. (\<forall>x\<in>l. norm (f x - g x) \<le> e) \<and> g integrable_on l" |
2558 |
apply (rule_tac x="\<lambda>y. f x" in exI) |
|
2559 |
proof safe |
|
2560 |
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
|
2561 |
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
|
2562 |
next |
53520 | 2563 |
fix y |
2564 |
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
|
2565 |
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
|
2566 |
using as finep by fastforce |
53520 | 2567 |
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
|
2568 |
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
|
2569 |
by (metis dist_commute dist_norm less_imp_le mem_ball ptag subsetCE tagged_division_ofD(3)) |
53520 | 2570 |
qed |
2571 |
qed |
|
2572 |
from e have "e \<ge> 0" |
|
2573 |
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
|
2574 |
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
|
2575 |
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
|
2576 |
by metis |
53520 | 2577 |
qed |
2578 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
2579 |
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
|
2580 |
fixes f :: "'b::ordered_euclidean_space \<Rightarrow> 'a::banach" |
56188 | 2581 |
assumes "continuous_on {a .. b} f" |
2582 |
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
|
2583 |
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
|
2584 |
|
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
2585 |
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
|
2586 |
|
56188 | 2587 |
|
60420 | 2588 |
subsection \<open>Specialization of additivity to one dimension.\<close> |
35172 | 2589 |
|
2590 |
||
60420 | 2591 |
subsection \<open>A useful lemma allowing us to factor out the content size.\<close> |
35172 | 2592 |
|
2593 |
lemma has_integral_factor_content: |
|
56188 | 2594 |
"(f has_integral i) (cbox a b) \<longleftrightarrow> |
2595 |
(\<forall>e>0. \<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
|
64267 | 2596 |
norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p - i) \<le> e * content (cbox a b)))" |
56188 | 2597 |
proof (cases "content (cbox a b) = 0") |
53520 | 2598 |
case True |
2599 |
show ?thesis |
|
2600 |
unfolding has_integral_null_eq[OF True] |
|
2601 |
apply safe |
|
2602 |
apply (rule, rule, rule gauge_trivial, safe) |
|
64267 | 2603 |
unfolding sum_content_null[OF True] True |
53520 | 2604 |
defer |
2605 |
apply (erule_tac x=1 in allE) |
|
2606 |
apply safe |
|
2607 |
defer |
|
2608 |
apply (rule fine_division_exists[of _ a b]) |
|
2609 |
apply assumption |
|
2610 |
apply (erule_tac x=p in allE) |
|
64267 | 2611 |
unfolding sum_content_null[OF True] |
53520 | 2612 |
apply auto |
2613 |
done |
|
2614 |
next |
|
2615 |
case False |
|
2616 |
note F = this[unfolded content_lt_nz[symmetric]] |
|
2617 |
let ?P = "\<lambda>e opp. \<exists>d. gauge d \<and> |
|
56188 | 2618 |
(\<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 | 2619 |
show ?thesis |
2620 |
apply (subst has_integral) |
|
2621 |
proof safe |
|
2622 |
fix e :: real |
|
2623 |
assume e: "e > 0" |
|
2624 |
{ |
|
2625 |
assume "\<forall>e>0. ?P e op <" |
|
56188 | 2626 |
then show "?P (e * content (cbox a b)) op \<le>" |
2627 |
apply (erule_tac x="e * content (cbox a b)" in allE) |
|
53520 | 2628 |
apply (erule impE) |
2629 |
defer |
|
2630 |
apply (erule exE,rule_tac x=d in exI) |
|
2631 |
using F e |
|
56544 | 2632 |
apply (auto simp add:field_simps) |
53520 | 2633 |
done |
2634 |
} |
|
2635 |
{ |
|
56188 | 2636 |
assume "\<forall>e>0. ?P (e * content (cbox a b)) op \<le>" |
53520 | 2637 |
then show "?P e op <" |
56188 | 2638 |
apply (erule_tac x="e / 2 / content (cbox a b)" in allE) |
53520 | 2639 |
apply (erule impE) |
2640 |
defer |
|
2641 |
apply (erule exE,rule_tac x=d in exI) |
|
2642 |
using F e |
|
56544 | 2643 |
apply (auto simp add: field_simps) |
53520 | 2644 |
done |
2645 |
} |
|
2646 |
qed |
|
2647 |
qed |
|
2648 |
||
56188 | 2649 |
lemma has_integral_factor_content_real: |
2650 |
"(f has_integral i) {a .. b::real} \<longleftrightarrow> |
|
2651 |
(\<forall>e>0. \<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of {a .. b} \<and> d fine p \<longrightarrow> |
|
64267 | 2652 |
norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p - i) \<le> e * content {a .. b} ))" |
56188 | 2653 |
unfolding box_real[symmetric] |
2654 |
by (rule has_integral_factor_content) |
|
2655 |
||
35172 | 2656 |
|
60420 | 2657 |
subsection \<open>Fundamental theorem of calculus.\<close> |
35172 | 2658 |
|
53520 | 2659 |
lemma interval_bounds_real: |
2660 |
fixes q b :: real |
|
2661 |
assumes "a \<le> b" |
|
54777 | 2662 |
shows "Sup {a..b} = b" |
2663 |
and "Inf {a..b} = a" |
|
56188 | 2664 |
using assms by auto |
53520 | 2665 |
|
2666 |
lemma fundamental_theorem_of_calculus: |
|
2667 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
2668 |
assumes "a \<le> b" |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2669 |
and vecd: "\<forall>x\<in>{a .. b}. (f has_vector_derivative f' x) (at x within {a .. b})" |
56188 | 2670 |
shows "(f' has_integral (f b - f a)) {a .. b}" |
2671 |
unfolding has_integral_factor_content box_real[symmetric] |
|
53520 | 2672 |
proof safe |
2673 |
fix e :: real |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2674 |
assume "e > 0" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2675 |
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
|
2676 |
x \<in> {a..b} \<longrightarrow> |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2677 |
(\<forall>y\<in>{a..b}. |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
2678 |
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
|
2679 |
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
|
2680 |
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
|
2681 |
"\<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
|
2682 |
\<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
|
2683 |
by metis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2684 |
|
56188 | 2685 |
show "\<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
2686 |
norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f' x) - (f b - f a)) \<le> e * content (cbox a b))" |
|
53520 | 2687 |
apply (rule_tac x="\<lambda>x. ball x (d x)" in exI) |
2688 |
apply safe |
|
2689 |
apply (rule gauge_ball_dependent) |
|
2690 |
apply rule |
|
2691 |
apply (rule d(1)) |
|
2692 |
proof - |
|
2693 |
fix p |
|
56188 | 2694 |
assume as: "p tagged_division_of cbox a b" "(\<lambda>x. ball x (d x)) fine p" |
2695 |
show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f' x) - (f b - f a)) \<le> e * content (cbox a b)" |
|
2696 |
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] |
|
2697 |
unfolding additive_tagged_division_1[OF assms(1) as(1)[simplified box_real],of "\<lambda>x. x",symmetric] |
|
64267 | 2698 |
unfolding sum_distrib_left |
53520 | 2699 |
defer |
64267 | 2700 |
unfolding sum_subtractf[symmetric] |
2701 |
proof (rule sum_norm_le,safe) |
|
53520 | 2702 |
fix x k |
2703 |
assume "(x, k) \<in> p" |
|
2704 |
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
|
2705 |
then obtain u v where k: "k = cbox u v" by blast |
53520 | 2706 |
have *: "u \<le> v" |
2707 |
using xk unfolding k by auto |
|
2708 |
have ball: "\<forall>xa\<in>k. xa \<in> ball x (d x)" |
|
60420 | 2709 |
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
|
2710 |
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
|
2711 |
norm (f u - f x - (u - x) *\<^sub>R f' x) + norm (f v - f x - (v - x) *\<^sub>R f' x)" |
53520 | 2712 |
apply (rule order_trans[OF _ norm_triangle_ineq4]) |
2713 |
apply (rule eq_refl) |
|
2714 |
apply (rule arg_cong[where f=norm]) |
|
2715 |
unfolding scaleR_diff_left |
|
2716 |
apply (auto simp add:algebra_simps) |
|
2717 |
done |
|
2718 |
also have "\<dots> \<le> e * norm (u - x) + e * norm (v - x)" |
|
2719 |
apply (rule add_mono) |
|
2720 |
apply (rule d(2)[of "x" "u",unfolded o_def]) |
|
2721 |
prefer 4 |
|
2722 |
apply (rule d(2)[of "x" "v",unfolded o_def]) |
|
53399 | 2723 |
using ball[rule_format,of u] ball[rule_format,of v] |
53520 | 2724 |
using xk(1-2) |
2725 |
unfolding k subset_eq |
|
2726 |
apply (auto simp add:dist_real_def) |
|
2727 |
done |
|
54777 | 2728 |
also have "\<dots> \<le> e * (Sup k - Inf k)" |
53520 | 2729 |
unfolding k interval_bounds_real[OF *] |
2730 |
using xk(1) |
|
2731 |
unfolding k |
|
2732 |
by (auto simp add: dist_real_def field_simps) |
|
54777 | 2733 |
finally show "norm (content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) \<le> |
2734 |
e * (Sup k - Inf k)" |
|
56188 | 2735 |
unfolding box_real k interval_bounds_real[OF *] content_real[OF *] |
2736 |
interval_upperbound_real interval_lowerbound_real |
|
2737 |
. |
|
53520 | 2738 |
qed |
2739 |
qed |
|
2740 |
qed |
|
2741 |
||
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2742 |
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
|
2743 |
fixes a::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2744 |
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
|
2745 |
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
|
2746 |
proof - |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2747 |
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
|
2748 |
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
|
2749 |
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
|
2750 |
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
|
2751 |
then show ?thesis |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2752 |
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
|
2753 |
qed |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2754 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2755 |
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
|
2756 |
fixes a::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2757 |
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
|
2758 |
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
|
2759 |
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
|
2760 |
|
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2761 |
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
|
2762 |
fixes a::real |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
2763 |
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
|
2764 |
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
|
2765 |
|
35172 | 2766 |
|
60420 | 2767 |
subsection \<open>Taylor series expansion\<close> |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2768 |
|
64267 | 2769 |
lemma (in bounded_bilinear) sum_prod_derivatives_has_vector_derivative: |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2770 |
assumes "p>0" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2771 |
and f0: "Df 0 = f" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2772 |
and Df: "\<And>m t. m < p \<Longrightarrow> a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2773 |
(Df m has_vector_derivative Df (Suc m) t) (at t within {a .. b})" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2774 |
and g0: "Dg 0 = g" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2775 |
and Dg: "\<And>m t. m < p \<Longrightarrow> a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2776 |
(Dg m has_vector_derivative Dg (Suc m) t) (at t within {a .. b})" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2777 |
and ivl: "a \<le> t" "t \<le> b" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2778 |
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
|
2779 |
has_vector_derivative |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2780 |
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
|
2781 |
(at t within {a .. b})" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2782 |
using assms |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2783 |
proof cases |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2784 |
assume p: "p \<noteq> 1" |
63040 | 2785 |
define p' where "p' = p - 2" |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2786 |
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
|
2787 |
by (auto simp: p'_def) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2788 |
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
|
2789 |
by auto |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2790 |
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
|
2791 |
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
|
2792 |
prod (Df (Suc i) t) (Dg (p - Suc i) t))) = |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2793 |
(\<Sum>i\<le>(Suc p'). ?f i - ?f (Suc i))" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2794 |
by (auto simp: algebra_simps p'(2) numeral_2_eq_2 * lessThan_Suc_atMost) |
64267 | 2795 |
also note sum_telescope |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2796 |
finally |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2797 |
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
|
2798 |
prod (Df (Suc i) t) (Dg (p - Suc i) t))) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2799 |
= 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
|
2800 |
unfolding p'[symmetric] |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2801 |
by (simp add: assms) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2802 |
thus ?thesis |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2803 |
using assms |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2804 |
by (auto intro!: derivative_eq_intros has_vector_derivative) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2805 |
qed (auto intro!: derivative_eq_intros has_vector_derivative) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2806 |
|
60621 | 2807 |
lemma |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2808 |
fixes f::"real\<Rightarrow>'a::banach" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2809 |
assumes "p>0" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2810 |
and f0: "Df 0 = f" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2811 |
and Df: "\<And>m t. m < p \<Longrightarrow> a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2812 |
(Df m has_vector_derivative Df (Suc m) t) (at t within {a .. b})" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2813 |
and ivl: "a \<le> b" |
60621 | 2814 |
defines "i \<equiv> \<lambda>x. ((b - x) ^ (p - 1) / fact (p - 1)) *\<^sub>R Df p x" |
2815 |
shows taylor_has_integral: |
|
2816 |
"(i has_integral f b - (\<Sum>i<p. ((b - a) ^ i / fact i) *\<^sub>R Df i a)) {a..b}" |
|
2817 |
and taylor_integral: |
|
2818 |
"f b = (\<Sum>i<p. ((b - a) ^ i / fact i) *\<^sub>R Df i a) + integral {a..b} i" |
|
2819 |
and taylor_integrable: |
|
2820 |
"i integrable_on {a .. b}" |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
2821 |
proof goal_cases |
60621 | 2822 |
case 1 |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2823 |
interpret bounded_bilinear "scaleR::real\<Rightarrow>'a\<Rightarrow>'a" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2824 |
by (rule bounded_bilinear_scaleR) |
63040 | 2825 |
define g where "g s = (b - s)^(p - 1)/fact (p - 1)" for s |
2826 |
define Dg where [abs_def]: |
|
2827 |
"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
|
2828 |
have g0: "Dg 0 = g" |
60420 | 2829 |
using \<open>p > 0\<close> |
62390 | 2830 |
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
|
2831 |
{ |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2832 |
fix m |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2833 |
assume "p > Suc m" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2834 |
hence "p - Suc m = Suc (p - Suc (Suc m))" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2835 |
by auto |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2836 |
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
|
2837 |
by auto |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2838 |
} note fact_eq = this |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2839 |
have Dg: "\<And>m t. m < p \<Longrightarrow> a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2840 |
(Dg m has_vector_derivative Dg (Suc m) t) (at t within {a .. b})" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2841 |
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
|
2842 |
by (auto intro!: derivative_eq_intros simp: has_vector_derivative_def fact_eq divide_simps) |
60621 | 2843 |
let ?sum = "\<lambda>t. \<Sum>i<p. (- 1) ^ i *\<^sub>R Dg i t *\<^sub>R Df (p - Suc i) t" |
64267 | 2844 |
from sum_prod_derivatives_has_vector_derivative[of _ Dg _ _ _ Df, |
60420 | 2845 |
OF \<open>p > 0\<close> g0 Dg f0 Df] |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2846 |
have deriv: "\<And>t. a \<le> t \<Longrightarrow> t \<le> b \<Longrightarrow> |
60621 | 2847 |
(?sum has_vector_derivative |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2848 |
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
|
2849 |
by auto |
60420 | 2850 |
from fundamental_theorem_of_calculus[rule_format, OF \<open>a \<le> b\<close> deriv] |
60621 | 2851 |
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
|
2852 |
using atLeastatMost_empty'[simp del] |
60621 | 2853 |
by (simp add: i_def g_def Dg_def) |
2854 |
also |
|
2855 |
have one: "(- 1) ^ p' * (- 1) ^ p' = (1::real)" |
|
2856 |
and "{..<p} \<inter> {i. p = Suc i} = {p - 1}" |
|
2857 |
for p' |
|
61222 | 2858 |
using \<open>p > 0\<close> |
60621 | 2859 |
by (auto simp: power_mult_distrib[symmetric]) |
2860 |
then have "?sum b = f b" |
|
61222 | 2861 |
using Suc_pred'[OF \<open>p > 0\<close>] |
60621 | 2862 |
by (simp add: diff_eq_eq Dg_def power_0_left le_Suc_eq if_distrib |
64267 | 2863 |
cond_application_beta sum.If_cases f0) |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2864 |
also |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2865 |
have "{..<p} = (\<lambda>x. p - x - 1) ` {..<p}" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2866 |
proof safe |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2867 |
fix x |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2868 |
assume "x < p" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2869 |
thus "x \<in> (\<lambda>x. p - x - 1) ` {..<p}" |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2870 |
by (auto intro!: image_eqI[where x = "p - x - 1"]) |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2871 |
qed simp |
60621 | 2872 |
from _ this |
2873 |
have "?sum a = (\<Sum>i<p. ((b - a) ^ i / fact i) *\<^sub>R Df i a)" |
|
64267 | 2874 |
by (rule sum.reindex_cong) (auto simp add: inj_on_def Dg_def one) |
60621 | 2875 |
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
|
2876 |
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
|
2877 |
by (metis (lifting) add.commute diff_eq_eq integral_unique) |
60621 | 2878 |
case 3 show ?case using c by force |
60180
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2879 |
qed |
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2880 |
|
09a7481c03b1
general Taylor series expansion with integral remainder
immler
parents:
59765
diff
changeset
|
2881 |
|
35172 | 2882 |
|
60420 | 2883 |
subsection \<open>Only need trivial subintervals if the interval itself is trivial.\<close> |
35172 | 2884 |
|
53520 | 2885 |
lemma division_of_nontrivial: |
56188 | 2886 |
fixes s :: "'a::euclidean_space set set" |
2887 |
assumes "s division_of (cbox a b)" |
|
2888 |
and "content (cbox a b) \<noteq> 0" |
|
2889 |
shows "{k. k \<in> s \<and> content k \<noteq> 0} division_of (cbox a b)" |
|
53520 | 2890 |
using assms(1) |
2891 |
apply - |
|
2892 |
proof (induct "card s" arbitrary: s rule: nat_less_induct) |
|
2893 |
fix s::"'a set set" |
|
56188 | 2894 |
assume assm: "s division_of (cbox a b)" |
53520 | 2895 |
"\<forall>m<card s. \<forall>x. m = card x \<longrightarrow> |
56188 | 2896 |
x division_of (cbox a b) \<longrightarrow> {k \<in> x. content k \<noteq> 0} division_of (cbox a b)" |
53520 | 2897 |
note s = division_ofD[OF assm(1)] |
56188 | 2898 |
let ?thesis = "{k \<in> s. content k \<noteq> 0} division_of (cbox a b)" |
53520 | 2899 |
{ |
2900 |
presume *: "{k \<in> s. content k \<noteq> 0} \<noteq> s \<Longrightarrow> ?thesis" |
|
2901 |
show ?thesis |
|
2902 |
apply cases |
|
2903 |
defer |
|
2904 |
apply (rule *) |
|
2905 |
apply assumption |
|
2906 |
using assm(1) |
|
2907 |
apply auto |
|
2908 |
done |
|
2909 |
} |
|
2910 |
assume noteq: "{k \<in> s. content k \<noteq> 0} \<noteq> s" |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2911 |
then obtain k c d where k: "k \<in> s" "content k = 0" "k = cbox c d" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2912 |
using s(4) by blast |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2913 |
then have "card s > 0" |
53520 | 2914 |
unfolding card_gt_0_iff using assm(1) by auto |
2915 |
then have card: "card (s - {k}) < card s" |
|
2916 |
using assm(1) k(1) |
|
2917 |
apply (subst card_Diff_singleton_if) |
|
2918 |
apply auto |
|
2919 |
done |
|
2920 |
have *: "closed (\<Union>(s - {k}))" |
|
2921 |
apply (rule closed_Union) |
|
2922 |
defer |
|
2923 |
apply rule |
|
2924 |
apply (drule DiffD1,drule s(4)) |
|
2925 |
using assm(1) |
|
2926 |
apply auto |
|
2927 |
done |
|
2928 |
have "k \<subseteq> \<Union>(s - {k})" |
|
2929 |
apply safe |
|
2930 |
apply (rule *[unfolded closed_limpt,rule_format]) |
|
2931 |
unfolding islimpt_approachable |
|
2932 |
proof safe |
|
2933 |
fix x |
|
2934 |
fix e :: real |
|
2935 |
assume as: "x \<in> k" "e > 0" |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2936 |
obtain i where i: "c\<bullet>i = d\<bullet>i" "i\<in>Basis" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2937 |
using k(2) s(3)[OF k(1)] unfolding box_ne_empty k |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
2938 |
by (metis dual_order.antisym content_eq_0) |
53520 | 2939 |
then have xi: "x\<bullet>i = d\<bullet>i" |
56188 | 2940 |
using as unfolding k mem_box by (metis antisym) |
63040 | 2941 |
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 + |
2942 |
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 | 2943 |
show "\<exists>x'\<in>\<Union>(s - {k}). x' \<noteq> x \<and> dist x' x < e" |
2944 |
apply (rule_tac x=y in bexI) |
|
2945 |
proof |
|
56188 | 2946 |
have "d \<in> cbox c d" |
53520 | 2947 |
using s(3)[OF k(1)] |
56188 | 2948 |
unfolding k box_eq_empty mem_box |
53520 | 2949 |
by (fastforce simp add: not_less) |
56188 | 2950 |
then have "d \<in> cbox a b" |
53520 | 2951 |
using s(2)[OF k(1)] |
2952 |
unfolding k |
|
2953 |
by auto |
|
56188 | 2954 |
note di = this[unfolded mem_box,THEN bspec[where x=i]] |
53520 | 2955 |
then have xyi: "y\<bullet>i \<noteq> x\<bullet>i" |
2956 |
unfolding y_def i xi |
|
2957 |
using as(2) 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
|
2958 |
by (auto elim!: ballE[of _ _ i]) |
53520 | 2959 |
then show "y \<noteq> x" |
2960 |
unfolding euclidean_eq_iff[where 'a='a] using i by auto |
|
2961 |
have *: "Basis = insert i (Basis - {i})" |
|
2962 |
using i by auto |
|
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
2963 |
have "norm (y-x) < e + sum (\<lambda>i. 0) Basis" |
53520 | 2964 |
apply (rule le_less_trans[OF norm_le_l1]) |
2965 |
apply (subst *) |
|
64267 | 2966 |
apply (subst sum.insert) |
53520 | 2967 |
prefer 3 |
2968 |
apply (rule add_less_le_mono) |
|
2969 |
proof - |
|
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
2970 |
show "\<bar>(y-x) \<bullet> i\<bar> < e" |
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
|
2971 |
using di as(2) 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
|
2972 |
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
|
2973 |
unfolding y_def by (auto simp: inner_simps) |
53520 | 2974 |
qed auto |
2975 |
then show "dist y x < e" |
|
2976 |
unfolding dist_norm by auto |
|
2977 |
have "y \<notin> k" |
|
56188 | 2978 |
unfolding k mem_box |
53520 | 2979 |
apply rule |
2980 |
apply (erule_tac x=i in ballE) |
|
2981 |
using xyi k i xi |
|
2982 |
apply auto |
|
2983 |
done |
|
2984 |
moreover |
|
2985 |
have "y \<in> \<Union>s" |
|
2986 |
using set_rev_mp[OF as(1) s(2)[OF k(1)]] as(2) di i |
|
56188 | 2987 |
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
|
2988 |
by (auto simp: field_simps elim!: ballE[of _ _ i]) |
53520 | 2989 |
ultimately |
2990 |
show "y \<in> \<Union>(s - {k})" by auto |
|
2991 |
qed |
|
2992 |
qed |
|
56188 | 2993 |
then have "\<Union>(s - {k}) = cbox a b" |
53520 | 2994 |
unfolding s(6)[symmetric] by auto |
56188 | 2995 |
then have "{ka \<in> s - {k}. content ka \<noteq> 0} division_of (cbox a b)" |
53520 | 2996 |
apply - |
2997 |
apply (rule assm(2)[rule_format,OF card refl]) |
|
2998 |
apply (rule division_ofI) |
|
2999 |
defer |
|
3000 |
apply (rule_tac[1-4] s) |
|
3001 |
using assm(1) |
|
3002 |
apply auto |
|
3003 |
done |
|
3004 |
moreover |
|
3005 |
have "{ka \<in> s - {k}. content ka \<noteq> 0} = {k \<in> s. content k \<noteq> 0}" |
|
3006 |
using k by auto |
|
3007 |
ultimately show ?thesis by auto |
|
3008 |
qed |
|
3009 |
||
35172 | 3010 |
|
60420 | 3011 |
subsection \<open>Integrability on subintervals.\<close> |
35172 | 3012 |
|
53520 | 3013 |
lemma operative_integrable: |
56188 | 3014 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
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
|
3015 |
shows "comm_monoid.operative op \<and> True (\<lambda>i. f integrable_on 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
|
3016 |
unfolding comm_monoid.operative_def[OF comm_monoid_and] |
53520 | 3017 |
apply safe |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
3018 |
apply (subst integrable_on_def) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
3019 |
apply rule |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
3020 |
apply (rule has_integral_null_eq[where i=0, THEN iffD2]) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
3021 |
apply (simp add: content_eq_0_interior) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
3022 |
apply rule |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
3023 |
apply (rule, assumption, assumption)+ |
53520 | 3024 |
unfolding integrable_on_def |
3025 |
by (auto intro!: has_integral_split) |
|
3026 |
||
3027 |
lemma integrable_subinterval: |
|
56188 | 3028 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
3029 |
assumes "f integrable_on cbox a b" |
|
3030 |
and "cbox c d \<subseteq> cbox a b" |
|
3031 |
shows "f integrable_on cbox c d" |
|
3032 |
apply (cases "cbox c d = {}") |
|
53520 | 3033 |
defer |
3034 |
apply (rule partial_division_extend_1[OF assms(2)],assumption) |
|
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
|
3035 |
using comm_monoid_set.operative_division[OF comm_monoid_set_and operative_integrable,symmetric,of _ _ _ f] assms(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
|
3036 |
apply (auto simp: comm_monoid_set_F_and) |
53520 | 3037 |
done |
3038 |
||
56188 | 3039 |
lemma integrable_subinterval_real: |
3040 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
3041 |
assumes "f integrable_on {a .. b}" |
|
3042 |
and "{c .. d} \<subseteq> {a .. b}" |
|
3043 |
shows "f integrable_on {c .. d}" |
|
3044 |
by (metis assms(1) assms(2) box_real(2) integrable_subinterval) |
|
3045 |
||
35172 | 3046 |
|
60420 | 3047 |
subsection \<open>Combining adjacent intervals in 1 dimension.\<close> |
35172 | 3048 |
|
53520 | 3049 |
lemma has_integral_combine: |
3050 |
fixes a b c :: real |
|
3051 |
assumes "a \<le> c" |
|
3052 |
and "c \<le> b" |
|
56188 | 3053 |
and "(f has_integral i) {a .. c}" |
3054 |
and "(f has_integral (j::'a::banach)) {c .. b}" |
|
3055 |
shows "(f has_integral (i + j)) {a .. b}" |
|
53520 | 3056 |
proof - |
63659 | 3057 |
interpret comm_monoid "lift_option plus" "Some (0::'a)" |
3058 |
by (rule comm_monoid_lift_option) |
|
3059 |
(rule add.comm_monoid_axioms) |
|
3060 |
note operative_integral [of f, unfolded operative_1_le] |
|
3061 |
note conjunctD2 [OF this, rule_format] |
|
3062 |
note * = this(2) [OF conjI [OF assms(1-2)], |
|
3063 |
unfolded if_P [OF assms(3)]] |
|
56188 | 3064 |
then have "f integrable_on cbox a b" |
53520 | 3065 |
apply - |
3066 |
apply (rule ccontr) |
|
3067 |
apply (subst(asm) if_P) |
|
3068 |
defer |
|
3069 |
apply (subst(asm) if_P) |
|
3070 |
using assms(3-) |
|
3071 |
apply auto |
|
3072 |
done |
|
3073 |
with * |
|
3074 |
show ?thesis |
|
3075 |
apply - |
|
3076 |
apply (subst(asm) if_P) |
|
3077 |
defer |
|
3078 |
apply (subst(asm) if_P) |
|
3079 |
defer |
|
3080 |
apply (subst(asm) if_P) |
|
3081 |
using assms(3-) |
|
3082 |
apply (auto simp add: integrable_on_def integral_unique) |
|
3083 |
done |
|
3084 |
qed |
|
3085 |
||
3086 |
lemma integral_combine: |
|
3087 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
3088 |
assumes "a \<le> c" |
|
3089 |
and "c \<le> b" |
|
56188 | 3090 |
and "f integrable_on {a .. b}" |
3091 |
shows "integral {a .. c} f + integral {c .. b} f = integral {a .. b} f" |
|
53520 | 3092 |
apply (rule integral_unique[symmetric]) |
3093 |
apply (rule has_integral_combine[OF assms(1-2)]) |
|
56188 | 3094 |
apply (metis assms(2) assms(3) atLeastatMost_subset_iff box_real(2) content_pos_le content_real_eq_0 integrable_integral integrable_subinterval le_add_same_cancel2 monoid_add_class.add.left_neutral) |
3095 |
by (metis assms(1) assms(3) atLeastatMost_subset_iff box_real(2) content_pos_le content_real_eq_0 integrable_integral integrable_subinterval le_add_same_cancel1 monoid_add_class.add.right_neutral) |
|
53520 | 3096 |
|
3097 |
lemma integrable_combine: |
|
3098 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
3099 |
assumes "a \<le> c" |
|
3100 |
and "c \<le> b" |
|
56188 | 3101 |
and "f integrable_on {a .. c}" |
3102 |
and "f integrable_on {c .. b}" |
|
3103 |
shows "f integrable_on {a .. b}" |
|
53520 | 3104 |
using assms |
3105 |
unfolding integrable_on_def |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
3106 |
by (auto intro!:has_integral_combine) |
53520 | 3107 |
|
35172 | 3108 |
|
60420 | 3109 |
subsection \<open>Reduce integrability to "local" integrability.\<close> |
35172 | 3110 |
|
53520 | 3111 |
lemma integrable_on_little_subintervals: |
56188 | 3112 |
fixes f :: "'b::euclidean_space \<Rightarrow> 'a::banach" |
3113 |
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> |
|
3114 |
f integrable_on cbox u v" |
|
3115 |
shows "f integrable_on cbox a b" |
|
3116 |
proof - |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3117 |
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 | 3118 |
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
|
3119 |
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
|
3120 |
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
|
3121 |
"\<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
|
3122 |
\<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
|
3123 |
by metis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3124 |
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
|
3125 |
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
|
3126 |
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
|
3127 |
by (metis division_of_tagged_division) |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3128 |
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
|
3129 |
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
|
3130 |
then show ?thesis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3131 |
unfolding comm_monoid_set.operative_division[OF comm_monoid_set_and operative_integrable sndp, symmetric] |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3132 |
comm_monoid_set_F_and |
53520 | 3133 |
by auto |
3134 |
qed |
|
3135 |
||
35172 | 3136 |
|
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
|
3137 |
subsection \<open>Second FTC or existence of antiderivative.\<close> |
35172 | 3138 |
|
56188 | 3139 |
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
|
3140 |
unfolding integrable_on_def by blast |
53520 | 3141 |
|
61204 | 3142 |
lemma integral_has_vector_derivative_continuous_at: |
3143 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
3144 |
assumes f: "f integrable_on {a..b}" |
|
3145 |
and x: "x \<in> {a..b}" |
|
3146 |
and fx: "continuous (at x within {a..b}) f" |
|
3147 |
shows "((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})" |
|
3148 |
proof - |
|
3149 |
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
|
3150 |
{ fix e::real |
61204 | 3151 |
assume "e > 0" |
3152 |
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 | 3153 |
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
|
3154 |
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
|
3155 |
if y: "y \<in> {a..b}" and yx: "\<bar>y - x\<bar> < d" for y |
61204 | 3156 |
proof (cases "y < x") |
3157 |
case False |
|
3158 |
have "f integrable_on {a..y}" |
|
3159 |
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
|
3160 |
then have Idiff: "?I a y - ?I a x = ?I x y" |
61204 | 3161 |
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
|
3162 |
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
|
3163 |
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
|
3164 |
using x y apply (auto intro: integrable_integral [OF integrable_subinterval_real [OF f]]) |
61204 | 3165 |
using has_integral_const_real [of "f x" x y] False |
3166 |
apply (simp add: ) |
|
3167 |
done |
|
3168 |
show ?thesis |
|
3169 |
using False |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3170 |
apply (simp add: abs_eq_content del: content_real_if measure_lborel_Icc) |
61204 | 3171 |
apply (rule has_integral_bound_real[where f="(\<lambda>u. f u - f x)"]) |
61222 | 3172 |
using yx False d x y \<open>e>0\<close> apply (auto simp add: Idiff fux_int) |
61204 | 3173 |
done |
3174 |
next |
|
3175 |
case True |
|
3176 |
have "f integrable_on {a..x}" |
|
3177 |
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
|
3178 |
then have Idiff: "?I a x - ?I a y = ?I y x" |
61204 | 3179 |
using True x y by (simp add: algebra_simps integral_combine) |
3180 |
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
|
3181 |
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
|
3182 |
using x y apply (auto intro: integrable_integral [OF integrable_subinterval_real [OF f]]) |
61204 | 3183 |
using has_integral_const_real [of "f x" y x] True |
3184 |
apply (simp add: ) |
|
3185 |
done |
|
3186 |
have "norm (integral {a..x} f - integral {a..y} f - (x - y) *\<^sub>R f x) \<le> e * \<bar>y - x\<bar>" |
|
3187 |
using True |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3188 |
apply (simp add: abs_eq_content del: content_real_if measure_lborel_Icc) |
61204 | 3189 |
apply (rule has_integral_bound_real[where f="(\<lambda>u. f u - f x)"]) |
61222 | 3190 |
using yx True d x y \<open>e>0\<close> apply (auto simp add: Idiff fux_int) |
61204 | 3191 |
done |
3192 |
then show ?thesis |
|
3193 |
by (simp add: algebra_simps norm_minus_commute) |
|
3194 |
qed |
|
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3195 |
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
|
3196 |
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
|
3197 |
} |
61204 | 3198 |
then show ?thesis |
3199 |
by (simp add: has_vector_derivative_def has_derivative_within_alt bounded_linear_scaleR_left) |
|
3200 |
qed |
|
3201 |
||
53520 | 3202 |
lemma integral_has_vector_derivative: |
3203 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
56188 | 3204 |
assumes "continuous_on {a .. b} f" |
3205 |
and "x \<in> {a .. b}" |
|
3206 |
shows "((\<lambda>u. integral {a .. u} f) has_vector_derivative f(x)) (at x within {a .. b})" |
|
61204 | 3207 |
apply (rule integral_has_vector_derivative_continuous_at [OF integrable_continuous_real]) |
3208 |
using assms |
|
3209 |
apply (auto simp: continuous_on_eq_continuous_within) |
|
3210 |
done |
|
53520 | 3211 |
|
3212 |
lemma antiderivative_continuous: |
|
3213 |
fixes q b :: real |
|
56188 | 3214 |
assumes "continuous_on {a .. b} f" |
3215 |
obtains g where "\<forall>x\<in>{a .. b}. (g has_vector_derivative (f x::_::banach)) (at x within {a .. b})" |
|
53520 | 3216 |
apply (rule that) |
3217 |
apply rule |
|
3218 |
using integral_has_vector_derivative[OF assms] |
|
3219 |
apply auto |
|
3220 |
done |
|
3221 |
||
35172 | 3222 |
|
60420 | 3223 |
subsection \<open>Combined fundamental theorem of calculus.\<close> |
35172 | 3224 |
|
53520 | 3225 |
lemma antiderivative_integral_continuous: |
3226 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
56188 | 3227 |
assumes "continuous_on {a .. b} f" |
3228 |
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 | 3229 |
proof - |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3230 |
obtain g |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3231 |
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
|
3232 |
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
|
3233 |
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
|
3234 |
proof - |
56188 | 3235 |
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
|
3236 |
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
|
3237 |
then show ?thesis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3238 |
by (simp add: fundamental_theorem_of_calculus that(3)) |
53520 | 3239 |
qed |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3240 |
then show ?thesis |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3241 |
using that by blast |
53520 | 3242 |
qed |
3243 |
||
35172 | 3244 |
|
60420 | 3245 |
subsection \<open>General "twiddling" for interval-to-interval function image.\<close> |
35172 | 3246 |
|
3247 |
lemma has_integral_twiddle: |
|
53520 | 3248 |
assumes "0 < r" |
3249 |
and "\<forall>x. h(g x) = x" |
|
3250 |
and "\<forall>x. g(h x) = x" |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3251 |
and contg: "\<And>x. continuous (at x) g" |
56188 | 3252 |
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
|
3253 |
and h: "\<forall>u v. \<exists>w z. h ` cbox u v = cbox w z" |
56188 | 3254 |
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
|
3255 |
and intfi: "(f has_integral i) (cbox a b)" |
56188 | 3256 |
shows "((\<lambda>x. f(g x)) has_integral (1 / r) *\<^sub>R i) (h ` cbox a b)" |
53520 | 3257 |
proof - |
61165 | 3258 |
show ?thesis when *: "cbox a b \<noteq> {} \<Longrightarrow> ?thesis" |
3259 |
apply cases |
|
3260 |
defer |
|
3261 |
apply (rule *) |
|
3262 |
apply assumption |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
3263 |
proof goal_cases |
61167 | 3264 |
case prems: 1 |
61165 | 3265 |
then show ?thesis |
61167 | 3266 |
unfolding prems assms(8)[unfolded prems has_integral_empty_eq] by auto |
61165 | 3267 |
qed |
56188 | 3268 |
assume "cbox a b \<noteq> {}" |
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3269 |
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
|
3270 |
using h by blast |
53520 | 3271 |
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
|
3272 |
apply (metis assms(2) injI) |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3273 |
by (metis assms(3) injI) |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
3274 |
from h obtain ha hb where h_eq: "h ` cbox a b = cbox ha hb" by blast |
53520 | 3275 |
show ?thesis |
63944
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
3276 |
unfolding h_eq has_integral |
21eaff8c8fc9
use filter to define Henstock-Kurzweil integration
hoelzl
parents:
63941
diff
changeset
|
3277 |
unfolding h_eq[symmetric] |
53520 | 3278 |
proof safe |
3279 |
fix e :: real |
|
3280 |
assume e: "e > 0" |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3281 |
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
|
3282 |
with intfi[unfolded has_integral] |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3283 |
obtain d where d: "gauge d" |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3284 |
"\<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
|
3285 |
\<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
|
3286 |
by metis |
63040 | 3287 |
define d' where "d' x = {y. g y \<in> d (g x)}" for x |
53520 | 3288 |
have d': "\<And>x. d' x = {y. g y \<in> (d (g x))}" |
3289 |
unfolding d'_def .. |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3290 |
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
|
3291 |
\<longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - (1 / r) *\<^sub>R i) < e)" |
53520 | 3292 |
proof (rule_tac x=d' in exI, safe) |
3293 |
show "gauge d'" |
|
3294 |
using d(1) |
|
3295 |
unfolding gauge_def d' |
|
63928
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3296 |
using continuous_open_preimage_univ[OF _ contg] |
53520 | 3297 |
by auto |
3298 |
fix p |
|
56188 | 3299 |
assume as: "p tagged_division_of h ` cbox a b" "d' fine p" |
53520 | 3300 |
note p = tagged_division_ofD[OF as(1)] |
56188 | 3301 |
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 | 3302 |
unfolding tagged_division_of |
3303 |
proof safe |
|
3304 |
show "finite ((\<lambda>(x, k). (g x, g ` k)) ` p)" |
|
3305 |
using as by auto |
|
3306 |
show "d fine (\<lambda>(x, k). (g x, g ` k)) ` p" |
|
3307 |
using as(2) unfolding fine_def d' by auto |
|
3308 |
fix x k |
|
3309 |
assume xk[intro]: "(x, k) \<in> p" |
|
3310 |
show "g x \<in> g ` k" |
|
3311 |
using p(2)[OF xk] by auto |
|
56188 | 3312 |
show "\<exists>u v. g ` k = cbox u v" |
53520 | 3313 |
using p(4)[OF xk] using assms(5-6) by auto |
3314 |
{ |
|
3315 |
fix y |
|
3316 |
assume "y \<in> k" |
|
56188 | 3317 |
then show "g y \<in> cbox a b" "g y \<in> cbox a b" |
53520 | 3318 |
using p(3)[OF xk,unfolded subset_eq,rule_format,of "h (g y)"] |
3319 |
using assms(2)[rule_format,of y] |
|
3320 |
unfolding inj_image_mem_iff[OF inj(2)] |
|
3321 |
by auto |
|
3322 |
} |
|
3323 |
fix x' k' |
|
3324 |
assume xk': "(x', k') \<in> p" |
|
3325 |
fix z |
|
63018
ae2ec7d86ad4
tidying some proofs; getting rid of "nonempty_witness"
paulson <lp15@cam.ac.uk>
parents:
63007
diff
changeset
|
3326 |
assume z: "z \<in> interior (g ` k)" "z \<in> interior (g ` k')" |
53520 | 3327 |
have same: "(x, k) = (x', k')" |
3328 |
apply - |
|
53842 | 3329 |
apply (rule ccontr) |
3330 |
apply (drule p(5)[OF xk xk']) |
|
53520 | 3331 |
proof - |
3332 |
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
|
3333 |
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
|
3334 |
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
|
3335 |
unfolding image_Int[OF inj(1)] by blast |
53520 | 3336 |
then show False |
3337 |
using as by blast |
|
3338 |
qed |
|
3339 |
then show "g x = g x'" |
|
3340 |
by auto |
|
3341 |
{ |
|
3342 |
fix z |
|
3343 |
assume "z \<in> k" |
|
3344 |
then show "g z \<in> g ` k'" |
|
3345 |
using same by auto |
|
3346 |
} |
|
3347 |
{ |
|
3348 |
fix z |
|
3349 |
assume "z \<in> k'" |
|
3350 |
then show "g z \<in> g ` k" |
|
3351 |
using same by auto |
|
3352 |
} |
|
3353 |
next |
|
3354 |
fix x |
|
56188 | 3355 |
assume "x \<in> cbox a b" |
53520 | 3356 |
then have "h x \<in> \<Union>{k. \<exists>x. (x, k) \<in> p}" |
3357 |
using p(6) by auto |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3358 |
then obtain X y where "h x \<in> X" "(y, X) \<in> p" by blast |
53520 | 3359 |
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
|
3360 |
apply (clarsimp simp: ) |
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3361 |
by (metis (no_types, lifting) assms(3) image_eqI pair_imageI) |
53520 | 3362 |
qed |
3363 |
note ** = d(2)[OF this] |
|
3364 |
have *: "inj_on (\<lambda>(x, k). (g x, g ` k)) p" |
|
3365 |
using inj(1) unfolding inj_on_def by fastforce |
|
3366 |
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
|
3367 |
using assms(7) |
64267 | 3368 |
apply (simp only: algebra_simps add_left_cancel scaleR_right.sum) |
3369 |
apply (subst sum.reindex_bij_betw[symmetric, where h="\<lambda>(x, k). (g x, g ` k)" and S=p]) |
|
3370 |
apply (auto intro!: * sum.cong simp: bij_betw_def dest!: p(4)) |
|
63170 | 3371 |
done |
53520 | 3372 |
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") |
3373 |
unfolding scaleR_diff_right scaleR_scaleR |
|
3374 |
using assms(1) |
|
3375 |
by auto |
|
3376 |
finally have *: "?l = ?r" . |
|
3377 |
show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f (g x)) - (1 / r) *\<^sub>R i) < e" |
|
3378 |
using ** |
|
3379 |
unfolding * |
|
3380 |
unfolding norm_scaleR |
|
3381 |
using assms(1) |
|
3382 |
by (auto simp add:field_simps) |
|
3383 |
qed |
|
3384 |
qed |
|
3385 |
qed |
|
3386 |
||
35172 | 3387 |
|
60420 | 3388 |
subsection \<open>Special case of a basic affine transformation.\<close> |
35172 | 3389 |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3390 |
lemma AE_lborel_inner_neq: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3391 |
assumes k: "k \<in> Basis" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3392 |
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
|
3393 |
proof - |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3394 |
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
|
3395 |
proof qed simp |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3396 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3397 |
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
|
3398 |
using k |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3399 |
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
|
3400 |
(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
|
3401 |
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
|
3402 |
by (intro measure_times) auto |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3403 |
also have "\<dots> = 0" |
64272 | 3404 |
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
|
3405 |
finally show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3406 |
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
|
3407 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3408 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3409 |
lemma content_image_stretch_interval: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3410 |
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
|
3411 |
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
|
3412 |
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
|
3413 |
proof cases |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3414 |
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
|
3415 |
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
|
3416 |
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
|
3417 |
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
|
3418 |
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
|
3419 |
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
|
3420 |
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
|
3421 |
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
|
3422 |
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
|
3423 |
show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3424 |
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
|
3425 |
by (subst lborel_affine_euclidean[where c=m and t=0]) |
64272 | 3426 |
(simp_all add: emeasure_density measurable_sets_borel[OF s] abs_prod nn_integral_cmult |
3427 |
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
|
3428 |
next |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3429 |
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
|
3430 |
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
|
3431 |
then have [simp]: "(\<Prod>k\<in>Basis. m k) = 0" |
64272 | 3432 |
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
|
3433 |
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
|
3434 |
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
|
3435 |
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
|
3436 |
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
|
3437 |
proof eventually_elim |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3438 |
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
|
3439 |
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
|
3440 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3441 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3442 |
then show ?thesis |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3443 |
by (simp add: measure_def) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3444 |
qed |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
3445 |
|
53520 | 3446 |
lemma interval_image_affinity_interval: |
56188 | 3447 |
"\<exists>u v. (\<lambda>x. m *\<^sub>R (x::'a::euclidean_space) + c) ` cbox a b = cbox u v" |
3448 |
unfolding image_affinity_cbox |
|
53520 | 3449 |
by auto |
3450 |
||
56188 | 3451 |
lemma content_image_affinity_cbox: |
3452 |
"content((\<lambda>x::'a::euclidean_space. m *\<^sub>R x + c) ` cbox a b) = |
|
61945 | 3453 |
\<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
|
3454 |
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
|
3455 |
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
|
3456 |
next |
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3457 |
case False |
53399 | 3458 |
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
|
3459 |
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
|
3460 |
case True |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3461 |
with \<open>cbox a b \<noteq> {}\<close> have "cbox (m *\<^sub>R a + c) (m *\<^sub>R b + c) \<noteq> {}" |
56188 | 3462 |
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
|
3463 |
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
|
3464 |
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
|
3465 |
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
|
3466 |
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
|
3467 |
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
|
3468 |
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
|
3469 |
ultimately show ?thesis |
56188 | 3470 |
by (simp add: image_affinity_cbox True content_cbox' |
64272 | 3471 |
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
|
3472 |
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
|
3473 |
case False |
62533
bc25f3916a99
new material to Blochj's theorem, as well as supporting lemmas
paulson <lp15@cam.ac.uk>
parents:
62463
diff
changeset
|
3474 |
with \<open>cbox a b \<noteq> {}\<close> have "cbox (m *\<^sub>R b + c) (m *\<^sub>R a + c) \<noteq> {}" |
56188 | 3475 |
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
|
3476 |
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
|
3477 |
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
|
3478 |
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
|
3479 |
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
|
3480 |
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
|
3481 |
by (simp add: inner_simps field_simps) |
53374
a14d2a854c02
tuned proofs -- clarified flow of facts wrt. calculation;
wenzelm
parents:
53015
diff
changeset
|
3482 |
ultimately show ?thesis using False |
56188 | 3483 |
by (simp add: image_affinity_cbox content_cbox' |
64272 | 3484 |
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
|
3485 |
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
|
3486 |
qed |
35172 | 3487 |
|
53520 | 3488 |
lemma has_integral_affinity: |
56188 | 3489 |
fixes a :: "'a::euclidean_space" |
3490 |
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
|
3491 |
and "m \<noteq> 0" |
61945 | 3492 |
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 | 3493 |
apply (rule has_integral_twiddle) |
60800
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3494 |
using assms |
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3495 |
apply (safe intro!: interval_image_affinity_interval content_image_affinity_cbox) |
53520 | 3496 |
apply (rule zero_less_power) |
61165 | 3497 |
unfolding scaleR_right_distrib |
53520 | 3498 |
apply auto |
3499 |
done |
|
3500 |
||
3501 |
lemma integrable_affinity: |
|
56188 | 3502 |
assumes "f integrable_on cbox a b" |
53520 | 3503 |
and "m \<noteq> 0" |
56188 | 3504 |
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 | 3505 |
using assms |
3506 |
unfolding integrable_on_def |
|
3507 |
apply safe |
|
3508 |
apply (drule has_integral_affinity) |
|
3509 |
apply auto |
|
3510 |
done |
|
3511 |
||
60800
7d04351c795a
New material for Cauchy's integral theorem
paulson <lp15@cam.ac.uk>
parents:
60762
diff
changeset
|
3512 |
lemmas has_integral_affinity01 = has_integral_affinity [of _ _ 0 "1::real", simplified] |
35172 | 3513 |
|
60420 | 3514 |
subsection \<open>Special case of stretching coordinate axes separately.\<close> |
35172 | 3515 |
|
53523 | 3516 |
lemma has_integral_stretch: |
56188 | 3517 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
3518 |
assumes "(f has_integral i) (cbox a b)" |
|
53523 | 3519 |
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
|
3520 |
shows "((\<lambda>x. f (\<Sum>k\<in>Basis. (m k * (x\<bullet>k))*\<^sub>R k)) has_integral |
64272 | 3521 |
((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
|
3522 |
apply (rule has_integral_twiddle[where f=f]) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3523 |
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
|
3524 |
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
|
3525 |
using assms |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3526 |
by auto |
63941
f353674c2528
move absolutely_integrable_on to Equivalence_Lebesgue_Henstock_Integration, now based on the Lebesgue integral
hoelzl
parents:
63940
diff
changeset
|
3527 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36899
diff
changeset
|
3528 |
|
53523 | 3529 |
lemma integrable_stretch: |
56188 | 3530 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector" |
3531 |
assumes "f integrable_on cbox a b" |
|
53523 | 3532 |
and "\<forall>k\<in>Basis. m k \<noteq> 0" |
3533 |
shows "(\<lambda>x::'a. f (\<Sum>k\<in>Basis. (m k * (x\<bullet>k))*\<^sub>R k)) integrable_on |
|
56188 | 3534 |
((\<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
|
3535 |
using assms unfolding integrable_on_def |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3536 |
by (force dest: has_integral_stretch) |
d81fb5b46a5c
new material about topological concepts, etc
paulson <lp15@cam.ac.uk>
parents:
63918
diff
changeset
|
3537 |
|
53523 | 3538 |
|
60420 | 3539 |
subsection \<open>even more special cases.\<close> |
35172 | 3540 |
|
53523 | 3541 |
lemma uminus_interval_vector[simp]: |
56188 | 3542 |
fixes a b :: "'a::euclidean_space" |
3543 |
shows "uminus ` cbox a b = cbox (-b) (-a)" |
|
53523 | 3544 |
apply (rule set_eqI) |
3545 |
apply rule |
|
3546 |
defer |
|
3547 |
unfolding image_iff |
|
3548 |
apply (rule_tac x="-x" in bexI) |
|
56188 | 3549 |
apply (auto simp add:minus_le_iff le_minus_iff mem_box) |
53523 | 3550 |
done |
3551 |
||
3552 |
lemma has_integral_reflect_lemma[intro]: |
|
56188 | 3553 |
assumes "(f has_integral i) (cbox a b)" |
3554 |
shows "((\<lambda>x. f(-x)) has_integral i) (cbox (-b) (-a))" |
|
53523 | 3555 |
using has_integral_affinity[OF assms, of "-1" 0] |
3556 |
by auto |
|
3557 |
||
56188 | 3558 |
lemma has_integral_reflect_lemma_real[intro]: |
3559 |
assumes "(f has_integral i) {a .. b::real}" |
|
3560 |
shows "((\<lambda>x. f(-x)) has_integral i) {-b .. -a}" |
|
3561 |
using assms |
|
3562 |
unfolding box_real[symmetric] |
|
3563 |
by (rule has_integral_reflect_lemma) |
|
3564 |
||
53523 | 3565 |
lemma has_integral_reflect[simp]: |
56188 | 3566 |
"((\<lambda>x. f (-x)) has_integral i) (cbox (-b) (-a)) \<longleftrightarrow> (f has_integral i) (cbox a b)" |
53523 | 3567 |
apply rule |
3568 |
apply (drule_tac[!] has_integral_reflect_lemma) |
|
3569 |
apply auto |
|
3570 |
done |
|
35172 | 3571 |
|
56188 | 3572 |
lemma integrable_reflect[simp]: "(\<lambda>x. f(-x)) integrable_on cbox (-b) (-a) \<longleftrightarrow> f integrable_on cbox a b" |
35172 | 3573 |
unfolding integrable_on_def by auto |
3574 |
||
56188 | 3575 |
lemma integrable_reflect_real[simp]: "(\<lambda>x. f(-x)) integrable_on {-b .. -a} \<longleftrightarrow> f integrable_on {a .. b::real}" |
3576 |
unfolding box_real[symmetric] |
|
3577 |
by (rule integrable_reflect) |
|
3578 |
||
3579 |
lemma integral_reflect[simp]: "integral (cbox (-b) (-a)) (\<lambda>x. f (-x)) = integral (cbox a b) f" |
|
35172 | 3580 |
unfolding integral_def by auto |
3581 |
||
56188 | 3582 |
lemma integral_reflect_real[simp]: "integral {-b .. -a} (\<lambda>x. f (-x)) = integral {a .. b::real} f" |
3583 |
unfolding box_real[symmetric] |
|
3584 |
by (rule integral_reflect) |
|
3585 |
||
53523 | 3586 |
|
60420 | 3587 |
subsection \<open>Stronger form of FCT; quite a tedious proof.\<close> |
35172 | 3588 |
|
53523 | 3589 |
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" |
3590 |
by (simp add: split_def) |
|
35172 | 3591 |
|
66382 | 3592 |
theorem fundamental_theorem_of_calculus_interior: |
53523 | 3593 |
fixes f :: "real \<Rightarrow> 'a::real_normed_vector" |
3594 |
assumes "a \<le> b" |
|
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3595 |
and contf: "continuous_on {a .. b} f" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3596 |
and derf: "\<And>x. x \<in> {a <..< b} \<Longrightarrow> (f has_vector_derivative f'(x)) (at x)" |
56188 | 3597 |
shows "(f' has_integral (f b - f a)) {a .. b}" |
66382 | 3598 |
proof (cases "a = b") |
3599 |
case True |
|
3600 |
then have *: "cbox a b = {b}" "f b - f a = 0" |
|
3601 |
by (auto simp add: order_antisym) |
|
3602 |
with True show ?thesis by auto |
|
3603 |
next |
|
3604 |
case False |
|
3605 |
with \<open>a \<le> b\<close> have ab: "a < b" by arith |
|
3606 |
let ?P = "\<lambda>e. \<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of {a .. b} \<longrightarrow> d fine p \<longrightarrow> |
|
56188 | 3607 |
norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f' x) - (f b - f a)) \<le> e * content {a .. b})" |
66382 | 3608 |
{ presume "\<And>e. e > 0 \<Longrightarrow> ?P e" then show ?thesis unfolding has_integral_factor_content_real by force } |
53523 | 3609 |
fix e :: real |
3610 |
assume e: "e > 0" |
|
66382 | 3611 |
then have eba8: "(e * (b - a)) / 8 > 0" |
3612 |
using ab by (auto simp add: field_simps) |
|
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3613 |
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
|
3614 |
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
|
3615 |
using derf_exp by simp |
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3616 |
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)" |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3617 |
(is "\<forall>x \<in> box a b. ?Q x") |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3618 |
proof |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3619 |
fix x assume x: "x \<in> box a b" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3620 |
show "?Q x" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3621 |
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
|
3622 |
using x e by auto |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3623 |
qed |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3624 |
from this [unfolded bgauge_existence_lemma] |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3625 |
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
|
3626 |
"\<And>x y. \<lbrakk>x \<in> box 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
|
3627 |
\<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
|
3628 |
by metis |
56188 | 3629 |
have "bounded (f ` cbox a b)" |
53523 | 3630 |
apply (rule compact_imp_bounded compact_continuous_image)+ |
66382 | 3631 |
using compact_cbox assms by auto |
3632 |
then obtain B |
|
66355
c828efcb95f3
towards a cleanup of Henstock_Kurzweil_Integration.thy
paulson <lp15@cam.ac.uk>
parents:
66299
diff
changeset
|
3633 |
where "0 < B" and B: "\<And>x. x \<in> f ` cbox a b \<Longrightarrow> norm x \<le> B" |
66382 | 3634 |
unfolding bounded_pos by metis |
3635 |
obtain da where "0 < da" |
|
3636 |
and da: "\<And>c. \<lbrakk>a \<le> c; {a .. c} \<subseteq> {a .. b}; {a .. c} \<subseteq> ball a da\<rbrakk> |
|
3637 |
\<Longrightarrow> norm (content {a .. c} *\<^sub>R f' a - (f c - f a)) \<le> (e * (b - a)) / 4" |
|
53523 | 3638 |
proof - |
66382 | 3639 |
have "continuous (at a within {a..b}) f" |
3640 |
using contf continuous_on_eq_continuous_within by force |
|
3641 |
with eba8 obtain k where "0 < k" |
|
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3642 |
and k: "\<And>x. \<lbrakk>x \<in> {a..b}; 0 < norm (x-a); norm (x-a) < k\<rbrakk> |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3643 |
\<Longrightarrow> norm (f x - f a) < e * (b - a) / 8" |
66382 | 3644 |
unfolding continuous_within Lim_within dist_norm by metis |
3645 |
obtain l where l: "0 < l" "norm (l *\<^sub>R f' a) \<le> e * (b - a) / 8" |
|
53523 | 3646 |
proof (cases "f' a = 0") |
3647 |
case True |
|
66382 | 3648 |
thus ?thesis using ab e that by auto |
53523 | 3649 |
next |
3650 |
case False |
|
3651 |
then show ?thesis |
|
66382 | 3652 |
apply (rule_tac l="(e * (b - a)) / 8 / norm (f' a)" in that) |
3653 |
using ab e apply (auto simp add: field_simps) |
|
53523 | 3654 |
done |
3655 |
qed |
|
66382 | 3656 |
have "norm (content {a .. c} *\<^sub>R f' a - (f c - f a)) \<le> e * (b - a) / 4" |
3657 |
if "a \<le> c" "{a .. c} \<subseteq> {a .. b}" and bmin: "{a .. c} \<subseteq> ball a (min k l)" for c |
|
53523 | 3658 |
proof - |
66382 | 3659 |
have minkl: "\<bar>a - x\<bar> < min k l" if "x \<in> {a..c}" for x |
3660 |
using bmin dist_real_def that by auto |
|
3661 |
then have lel: "\<bar>c - a\<bar> \<le> \<bar>l\<bar>" |
|
3662 |
using that by force |
|
53523 | 3663 |
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)" |
3664 |
by (rule norm_triangle_ineq4) |
|
3665 |
also have "\<dots> \<le> e * (b - a) / 8 + e * (b - a) / 8" |
|
3666 |
proof (rule add_mono) |
|
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3667 |
have "norm ((c - a) *\<^sub>R f' a) \<le> norm (l *\<^sub>R f' a)" |
66382 | 3668 |
by (auto intro: mult_right_mono [OF lel]) |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3669 |
also have "... \<le> e * (b - a) / 8" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3670 |
by (rule l) |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3671 |
finally show "norm ((c - a) *\<^sub>R f' a) \<le> e * (b - a) / 8" . |
53523 | 3672 |
next |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3673 |
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
|
3674 |
proof (cases "a = c") |
66382 | 3675 |
case True then show ?thesis |
3676 |
using eba8 by auto |
|
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3677 |
next |
66382 | 3678 |
case False show ?thesis |
3679 |
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
|
3680 |
qed |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3681 |
then show "norm (f c - f a) \<le> e * (b - a) / 8" by simp |
53523 | 3682 |
qed |
56188 | 3683 |
finally show "norm (content {a .. c} *\<^sub>R f' a - (f c - f a)) \<le> e * (b - a) / 4" |
66382 | 3684 |
unfolding content_real[OF \<open>a \<le> c\<close>] by auto |
53523 | 3685 |
qed |
66382 | 3686 |
then show ?thesis |
3687 |
by (rule_tac da="min k l" in that) (auto simp: l \<open>0 < k\<close>) |
|
53523 | 3688 |
qed |
66382 | 3689 |
|
3690 |
obtain db where "0 < db" |
|
3691 |
and db: "\<And>c. \<lbrakk>c \<le> b; {c .. b} \<subseteq> {a .. b}; {c .. b} \<subseteq> ball b db\<rbrakk> |
|
3692 |
\<Longrightarrow> norm (content {c .. b} *\<^sub>R f' b - (f b - f c)) \<le> (e * (b - a)) / 4" |
|
53523 | 3693 |
proof - |
66382 | 3694 |
have "continuous (at b within {a..b}) f" |
3695 |
using contf continuous_on_eq_continuous_within by force |
|
3696 |
with eba8 obtain k |
|
3697 |
where "0 < k" |
|
3698 |
and k: "\<And>x. \<lbrakk>x \<in> {a..b}; 0 < norm(x-b); norm(x-b) < k\<rbrakk> |
|
3699 |
\<Longrightarrow> norm (f b - f x) < e * (b - a) / 8" |
|
3700 |
unfolding continuous_within Lim_within dist_norm norm_minus_commute by metis |
|
66356 | 3701 |
obtain l where l: "0 < l" "norm (l *\<^sub>R f' b) \<le> (e * (b - a)) / 8" |
53523 | 3702 |
proof (cases "f' b = 0") |
66382 | 3703 |
case True thus ?thesis |
3704 |
using ab e that by auto |
|
53523 | 3705 |
next |
66382 | 3706 |
case False then show ?thesis |
66356 | 3707 |
apply (rule_tac l="(e * (b - a)) / 8 / norm (f' b)" in that) |
66382 | 3708 |
using ab e by (auto simp add: field_simps) |
53523 | 3709 |
qed |
66382 | 3710 |
have "norm (content {c..b} *\<^sub>R f' b - (f b - f c)) \<le> e * (b - a) / 4" |
3711 |
if "c \<le> b" "{c..b} \<subseteq> {a..b}" and bmin: "{c..b} \<subseteq> ball b (min k l)" for c |
|
53523 | 3712 |
proof - |
66382 | 3713 |
have minkl: "\<bar>b - x\<bar> < min k l" if "x \<in> {c..b}" for x |
3714 |
using bmin dist_real_def that by auto |
|
3715 |
then have lel: "\<bar>b - c\<bar> \<le> \<bar>l\<bar>" |
|
3716 |
using that by force |
|
53523 | 3717 |
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)" |
3718 |
by (rule norm_triangle_ineq4) |
|
3719 |
also have "\<dots> \<le> e * (b - a) / 8 + e * (b - a) / 8" |
|
3720 |
proof (rule add_mono) |
|
66382 | 3721 |
have "norm ((b - c) *\<^sub>R f' b) \<le> norm (l *\<^sub>R f' b)" |
3722 |
by (auto intro: mult_right_mono [OF lel]) |
|
3723 |
also have "... \<le> e * (b - a) / 8" |
|
3724 |
by (rule l) |
|
3725 |
finally show "norm ((b - c) *\<^sub>R f' b) \<le> e * (b - a) / 8" . |
|
53523 | 3726 |
next |
66382 | 3727 |
have "norm (f b - f c) < e * (b - a) / 8" |
3728 |
proof (cases "b = c") |
|
3729 |
case True |
|
3730 |
then show ?thesis |
|
3731 |
using eba8 by auto |
|
3732 |
next |
|
3733 |
case False show ?thesis |
|
3734 |
by (rule k) (use minkl \<open>c \<le> b\<close> that False in auto) |
|
3735 |
qed |
|
3736 |
then show "norm (f b - f c) \<le> e * (b - a) / 8" by simp |
|
53523 | 3737 |
qed |
56188 | 3738 |
finally show "norm (content {c .. b} *\<^sub>R f' b - (f b - f c)) \<le> e * (b - a) / 4" |
66382 | 3739 |
unfolding content_real[OF \<open>c \<le> b\<close>] by auto |
53523 | 3740 |
qed |
66382 | 3741 |
then show ?thesis |
3742 |
by (rule_tac db="min k l" in that) (auto simp: l \<open>0 < k\<close>) |
|
53523 | 3743 |
qed |
35172 | 3744 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36899
diff
changeset
|
3745 |
let ?d = "(\<lambda>x. ball x (if x=a then da else if x=b then db else d x))" |
53523 | 3746 |
show "?P e" |
66382 | 3747 |
proof (intro exI conjI allI impI) |
3748 |
show "gauge ?d" |
|
3749 |
using ab \<open>db > 0\<close> \<open>da > 0\<close> d(1) by (auto intro: gauge_ball_dependent) |
|
53523 | 3750 |
next |
66382 | 3751 |
fix p |
3752 |
assume as: "p tagged_division_of {a..b}" "?d fine p" |
|
53523 | 3753 |
let ?A = "{t. fst t \<in> {a, b}}" |
61165 | 3754 |
note p = tagged_division_ofD[OF as(1)] |
53523 | 3755 |
have pA: "p = (p \<inter> ?A) \<union> (p - ?A)" "finite (p \<inter> ?A)" "finite (p - ?A)" "(p \<inter> ?A) \<inter> (p - ?A) = {}" |
61165 | 3756 |
using as by auto |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3757 |
note * = additive_tagged_division_1[OF assms(1) as(1), symmetric] |
53523 | 3758 |
have **: "\<And>n1 s1 n2 s2::real. n2 \<le> s2 / 2 \<Longrightarrow> n1 - s1 \<le> s2 / 2 \<Longrightarrow> n1 + n2 \<le> s1 + s2" |
3759 |
by arith |
|
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3760 |
have XX: False if xk: "(x,k) \<in> p" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3761 |
and less: "e * (Sup k - Inf k) / 2 < norm (content k *\<^sub>R f' x - (f (Sup k) - f (Inf k)))" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3762 |
and "x \<noteq> a" "x \<noteq> b" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3763 |
for x k |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3764 |
proof - |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3765 |
obtain u v where k: "k = cbox u v" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3766 |
using p(4) xk by blast |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3767 |
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
|
3768 |
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
|
3769 |
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
|
3770 |
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
|
3771 |
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
|
3772 |
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
|
3773 |
with d have *: "\<And>y. norm (y-x) < d x |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3774 |
\<Longrightarrow> norm (f y - f x - (y-x) *\<^sub>R f' x) \<le> e / 2 * norm (y-x)" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3775 |
by metis |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3776 |
have xd: "norm (u - x) < d x" "norm (v - x) < d x" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3777 |
using fineD[OF as(2) xk] \<open>x \<noteq> a\<close> \<open>x \<noteq> b\<close> uv |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3778 |
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
|
3779 |
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
|
3780 |
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
|
3781 |
by (rule arg_cong[where f=norm]) (auto simp: scaleR_left.diff) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3782 |
also have "\<dots> \<le> e / 2 * norm (u - x) + e / 2 * norm (v - x)" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3783 |
by (metis norm_triangle_le_sub add_mono * xd) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3784 |
also have "\<dots> \<le> e / 2 * norm (v - u)" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3785 |
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
|
3786 |
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
|
3787 |
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
|
3788 |
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
|
3789 |
using uv by auto |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3790 |
then show False by auto |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3791 |
qed |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3792 |
have "norm (\<Sum>(x, k)\<in>p - ?A. content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3793 |
\<le> (\<Sum>(x, k)\<in>p - ?A. norm (content k *\<^sub>R f' x - (f (Sup k) - f (Inf k))))" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3794 |
by (auto intro: sum_norm_le) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3795 |
also have "... \<le> (\<Sum>n\<in>p - ?A. e * (case n of (x, k) \<Rightarrow> Sup k - Inf k) / 2)" |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3796 |
using XX by (force intro: sum_mono) |
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3797 |
finally have 1: "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
|
3798 |
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
|
3799 |
\<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
|
3800 |
by (simp add: sum_divide_distrib) |
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3801 |
have 2: "norm (\<Sum>(x, k)\<in>p \<inter> ?A. 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
|
3802 |
(\<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
|
3803 |
\<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
|
3804 |
proof - |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3805 |
have ge0: "0 \<le> e * (Sup k - Inf k)" if xkp: "(x, k) \<in> p \<inter> ?A" for x k |
53523 | 3806 |
proof - |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3807 |
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
|
3808 |
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
|
3809 |
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
|
3810 |
by blast |
54777 | 3811 |
then show "0 \<le> e * ((Sup k) - (Inf k))" |
53523 | 3812 |
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
|
3813 |
qed |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3814 |
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))) \<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
|
3815 |
proof - |
64267 | 3816 |
have *: "\<And>s f t e. sum f s = sum f t \<Longrightarrow> norm (sum f t) \<le> e \<Longrightarrow> norm (sum f s) \<le> e" |
53523 | 3817 |
by auto |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3818 |
|
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3819 |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36899
diff
changeset
|
3820 |
show "norm (\<Sum>(x, k)\<in>p \<inter> ?A. content k *\<^sub>R f' x - |
54777 | 3821 |
(f ((Sup k)) - f ((Inf k)))) \<le> e * (b - a) / 2" |
59647
c6f413b660cf
clarified Drule.gen_all: observe context more carefully;
wenzelm
parents:
59425
diff
changeset
|
3822 |
apply (rule *[where t1="p \<inter> {t. fst t \<in> {a, b} \<and> content(snd t) \<noteq> 0}"]) |
64267 | 3823 |
apply (rule sum.mono_neutral_right[OF pA(2)]) |
53523 | 3824 |
defer |
3825 |
apply rule |
|
3826 |
unfolding split_paired_all split_conv o_def |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
3827 |
proof goal_cases |
53523 | 3828 |
fix x k |
3829 |
assume "(x, k) \<in> p \<inter> {t. fst t \<in> {a, b}} - p \<inter> {t. fst t \<in> {a, b} \<and> content (snd t) \<noteq> 0}" |
|
66384
cc66710c9d48
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66383
diff
changeset
|
3830 |
then have xk: "(x, k) \<in> p" and k0: "content k = 0" |
53523 | 3831 |
by auto |
66356 | 3832 |
then obtain u v where uv: "k = cbox u v" |
3833 |
using p(4) by blast |
|
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3834 |
then have "u = v" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3835 |
using xk k0 p(2) by force |
54777 | 3836 |
then show "content k *\<^sub>R (f' (x)) - (f ((Sup k)) - f ((Inf k))) = 0" |
53523 | 3837 |
using xk unfolding uv by auto |
3838 |
next |
|
64267 | 3839 |
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
|
3840 |
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 | 3841 |
for s f and e :: real |
3842 |
proof (cases "s = {}") |
|
3843 |
case True |
|
3844 |
with that show ?thesis by auto |
|
3845 |
next |
|
3846 |
case False |
|
53523 | 3847 |
then obtain x where "x \<in> s" |
3848 |
by auto |
|
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3849 |
then have "s = {x}" |
61165 | 3850 |
using that(1) by auto |
3851 |
then show ?thesis |
|
3852 |
using \<open>x \<in> s\<close> that(2) by auto |
|
3853 |
qed |
|
3854 |
case 2 |
|
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3855 |
let ?B = "\<lambda>x. {t \<in> p. fst t = x \<and> content (snd t) \<noteq> 0}" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3856 |
have *: "p \<inter> {t. fst t \<in> {a, b} \<and> content(snd t) \<noteq> 0} = ?B a \<union> ?B b" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3857 |
by blast |
53523 | 3858 |
show ?case |
3859 |
apply (subst *) |
|
64267 | 3860 |
apply (subst sum.union_disjoint) |
53523 | 3861 |
prefer 4 |
3862 |
apply (rule order_trans[of _ "e * (b - a)/4 + e * (b - a)/4"]) |
|
3863 |
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
|
3864 |
apply (rule_tac[1-2] **) |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3865 |
|
53523 | 3866 |
proof - |
61165 | 3867 |
have pa: "\<exists>v. k = cbox a v \<and> a \<le> v" if "(a, k) \<in> p" for k |
53523 | 3868 |
proof - |
66356 | 3869 |
obtain u v where uv: "k = cbox u v" |
3870 |
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
|
3871 |
moreover have "u \<le> v" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3872 |
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
|
3873 |
moreover have "u = a" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3874 |
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
|
3875 |
ultimately show ?thesis |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3876 |
by blast |
35172 | 3877 |
qed |
61165 | 3878 |
have pb: "\<exists>v. k = cbox v b \<and> b \<ge> v" if "(b, k) \<in> p" for k |
53523 | 3879 |
proof - |
66365
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3880 |
obtain u v where uv: "k = cbox u v" |
d77a4ab4fe59
more Henstock_Kurzweil_Integration cleanup
paulson <lp15@cam.ac.uk>
parents:
66359
diff
changeset
|
3881 |
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
|
3882 |
moreover have "u \<le> v" |
61165 | 3883 |
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
|
3884 |
moreover have "v = b" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3885 |
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
|
3886 |
ultimately show ?thesis |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3887 |
by blast |
35172 | 3888 |
qed |
53523 | 3889 |
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
|
3890 |
proof (safe; clarsimp) |
53523 | 3891 |
fix x k k' |
3892 |
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
|
3893 |
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
|
3894 |
using pa[OF k(1)] by blast |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3895 |
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
|
3896 |
using pa[OF k(2)] by blast |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3897 |
let ?v = "min v v'" |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
3898 |
have "box a ?v \<subseteq> k \<inter> k'" |
56188 | 3899 |
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
|
3900 |
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
|
3901 |
using interior_Int interior_mono by blast |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
3902 |
moreover have "(a + ?v)/2 \<in> box a ?v" |
53523 | 3903 |
using k(3-) |
3904 |
unfolding v v' content_eq_0 not_le |
|
56188 | 3905 |
by (auto simp add: mem_box) |
53523 | 3906 |
ultimately have "(a + ?v)/2 \<in> interior k \<inter> interior k'" |
56188 | 3907 |
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
|
3908 |
then have eq: "k = k'" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3909 |
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
|
3910 |
{ 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
|
3911 |
{ assume "x \<in> k'" then show "x \<in> k" unfolding eq . } |
53399 | 3912 |
qed |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3913 |
|
53523 | 3914 |
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
|
3915 |
proof (safe; clarsimp) |
53523 | 3916 |
fix x k k' |
3917 |
assume k: "(b, k) \<in> p" "(b, 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
|
3918 |
obtain v where v: "k = cbox v b" "v \<le> b" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3919 |
using pb[OF k(1)] by blast |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3920 |
obtain v' where v': "k' = cbox v' b" "v' \<le> b" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3921 |
using pb[OF k(2)] by blast |
53523 | 3922 |
let ?v = "max v v'" |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
3923 |
have "box ?v b \<subseteq> k \<inter> k'" |
56188 | 3924 |
unfolding v v' by (auto simp: mem_box) |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3925 |
then have "interior (box (max v v') b) \<subseteq> interior k \<inter> interior k'" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3926 |
using interior_Int interior_mono by blast |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
3927 |
moreover have " ((b + ?v)/2) \<in> box ?v b" |
56188 | 3928 |
using k(3-) unfolding v v' content_eq_0 not_le by (auto simp: mem_box) |
53523 | 3929 |
ultimately have " ((b + ?v)/2) \<in> interior k \<inter> interior k'" |
56188 | 3930 |
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
|
3931 |
then have eq: "k = k'" |
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3932 |
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
|
3933 |
{ 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
|
3934 |
{ assume "x \<in> k'" then show "x\<in>k" unfolding eq . } |
35172 | 3935 |
qed |
3936 |
||
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3937 |
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
|
3938 |
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
|
3939 |
proof - |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3940 |
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
|
3941 |
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
|
3942 |
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
|
3943 |
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
|
3944 |
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
|
3945 |
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
|
3946 |
ultimately show ?thesis |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3947 |
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
|
3948 |
using da \<open>a \<le> v\<close> by auto |
35172 | 3949 |
qed |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3950 |
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
|
3951 |
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
|
3952 |
by auto |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3953 |
|
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3954 |
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
|
3955 |
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
|
3956 |
proof - |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3957 |
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
|
3958 |
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
|
3959 |
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
|
3960 |
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
|
3961 |
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
|
3962 |
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
|
3963 |
ultimately show ?thesis |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3964 |
using db v by auto |
35172 | 3965 |
qed |
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3966 |
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
|
3967 |
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
|
3968 |
\<le> e * (b - a) / 4" |
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3969 |
by auto |
53523 | 3970 |
qed (insert p(1) ab e, auto simp add: field_simps) |
3971 |
qed auto |
|
66387
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3972 |
|
5db8427fdfd3
more cleanup of fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66384
diff
changeset
|
3973 |
|
53523 | 3974 |
qed |
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3975 |
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
|
3976 |
by auto |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3977 |
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
|
3978 |
apply (rule * [OF sum_nonneg]) |
66382 | 3979 |
using ge0 apply force |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3980 |
unfolding sum.union_disjoint[OF pA(2-),symmetric] pA(1)[symmetric] |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3981 |
unfolding sum_distrib_left[symmetric] |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3982 |
apply (subst additive_tagged_division_1[OF _ as(1)]) |
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3983 |
apply (rule assms) |
66388
8e614c223000
fundamental_theorem_of_calculus_interior: more cleanup
paulson <lp15@cam.ac.uk>
parents:
66387
diff
changeset
|
3984 |
apply (rule norm_le) |
65680
378a2f11bec9
Simplification of some proofs. Also key lemmas using !! rather than ! in premises
paulson <lp15@cam.ac.uk>
parents:
65587
diff
changeset
|
3985 |
done |
53523 | 3986 |
qed |
66383
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3987 |
show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f' x) - (f b - f a)) \<le> e * content {a..b}" |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3988 |
unfolding content_real[OF assms(1)] and *[of "\<lambda>x. x"] *[of f] sum_subtractf[symmetric] split_minus |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3989 |
unfolding sum_distrib_left |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3990 |
apply (subst(2) pA) |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3991 |
apply (subst pA) |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3992 |
unfolding sum.union_disjoint[OF pA(2-)] |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3993 |
using ** norm_triangle_le 1 2 |
5eb0faf4477a
partly unravelled fundamental_theorem_of_calculus_interior
paulson <lp15@cam.ac.uk>
parents:
66382
diff
changeset
|
3994 |
by blast |
53523 | 3995 |
qed |
3996 |
qed |
|
3997 |
||
35172 | 3998 |
|
60420 | 3999 |
subsection \<open>Stronger form with finite number of exceptional points.\<close> |
35172 | 4000 |
|
53524 | 4001 |
lemma fundamental_theorem_of_calculus_interior_strong: |
4002 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
4003 |
assumes "finite s" |
|
4004 |
and "a \<le> b" |
|
56188 | 4005 |
and "continuous_on {a .. b} f" |
4006 |
and "\<forall>x\<in>{a <..< b} - s. (f has_vector_derivative f'(x)) (at x)" |
|
4007 |
shows "(f' has_integral (f b - f a)) {a .. b}" |
|
53524 | 4008 |
using assms |
4009 |
proof (induct "card s" arbitrary: s a b) |
|
4010 |
case 0 |
|
4011 |
show ?case |
|
4012 |
apply (rule fundamental_theorem_of_calculus_interior) |
|
4013 |
using 0 |
|
4014 |
apply auto |
|
4015 |
done |
|
4016 |
next |
|
4017 |
case (Suc n) |
|
4018 |
from this(2) guess c s' |
|
4019 |
apply - |
|
4020 |
apply (subst(asm) eq_commute) |
|
4021 |
unfolding card_Suc_eq |
|
4022 |
apply (subst(asm)(2) eq_commute) |
|
4023 |
apply (elim exE conjE) |
|
4024 |
done |
|
4025 |
note cs = this[rule_format] |
|
4026 |
show ?case |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
4027 |
proof (cases "c \<in> box a b") |
53524 | 4028 |
case False |
4029 |
then show ?thesis |
|
4030 |
apply - |
|
4031 |
apply (rule Suc(1)[OF cs(3) _ Suc(4,5)]) |
|
4032 |
apply safe |
|
4033 |
defer |
|
4034 |
apply (rule Suc(6)[rule_format]) |
|
4035 |
using Suc(3) |
|
4036 |
unfolding cs |
|
4037 |
apply auto |
|
4038 |
done |
|
4039 |
next |
|
4040 |
have *: "f b - f a = (f c - f a) + (f b - f c)" |
|
4041 |
by auto |
|
4042 |
case True |
|
4043 |
then have "a \<le> c" "c \<le> b" |
|
56188 | 4044 |
by (auto simp: mem_box) |
53524 | 4045 |
then show ?thesis |
4046 |
apply (subst *) |
|
4047 |
apply (rule has_integral_combine) |
|
4048 |
apply assumption+ |
|
4049 |
apply (rule_tac[!] Suc(1)[OF cs(3)]) |
|
4050 |
using Suc(3) |
|
4051 |
unfolding cs |
|
4052 |
proof - |
|
56188 | 4053 |
show "continuous_on {a .. c} f" "continuous_on {c .. b} f" |
53524 | 4054 |
apply (rule_tac[!] continuous_on_subset[OF Suc(5)]) |
4055 |
using True |
|
56188 | 4056 |
apply (auto simp: mem_box) |
4057 |
done |
|
4058 |
let ?P = "\<lambda>i j. \<forall>x\<in>{i <..< j} - s'. (f has_vector_derivative f' x) (at x)" |
|
53524 | 4059 |
show "?P a c" "?P c b" |
4060 |
apply safe |
|
4061 |
apply (rule_tac[!] Suc(6)[rule_format]) |
|
4062 |
using True |
|
4063 |
unfolding cs |
|
56188 | 4064 |
apply (auto simp: mem_box) |
53524 | 4065 |
done |
4066 |
qed auto |
|
4067 |
qed |
|
4068 |
qed |
|
4069 |
||
4070 |
lemma fundamental_theorem_of_calculus_strong: |
|
4071 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
4072 |
assumes "finite s" |
|
4073 |
and "a \<le> b" |
|
56188 | 4074 |
and "continuous_on {a .. b} f" |
4075 |
and "\<forall>x\<in>{a .. b} - s. (f has_vector_derivative f'(x)) (at x)" |
|
4076 |
shows "(f' has_integral (f b - f a)) {a .. b}" |
|
53524 | 4077 |
apply (rule fundamental_theorem_of_calculus_interior_strong[OF assms(1-3), of f']) |
4078 |
using assms(4) |
|
56188 | 4079 |
apply (auto simp: mem_box) |
53524 | 4080 |
done |
4081 |
||
4082 |
lemma indefinite_integral_continuous_left: |
|
53634 | 4083 |
fixes f:: "real \<Rightarrow> 'a::banach" |
56188 | 4084 |
assumes "f integrable_on {a .. b}" |
53634 | 4085 |
and "a < c" |
4086 |
and "c \<le> b" |
|
4087 |
and "e > 0" |
|
4088 |
obtains d where "d > 0" |
|
56188 | 4089 |
and "\<forall>t. c - d < t \<and> t \<le> c \<longrightarrow> norm (integral {a .. c} f - integral {a .. t} f) < e" |
53634 | 4090 |
proof - |
4091 |
have "\<exists>w>0. \<forall>t. c - w < t \<and> t < c \<longrightarrow> norm (f c) * norm(c - t) < e / 3" |
|
4092 |
proof (cases "f c = 0") |
|
4093 |
case False |
|
60420 | 4094 |
hence "0 < e / 3 / norm (f c)" using \<open>e>0\<close> by simp |
53634 | 4095 |
then show ?thesis |
4096 |
apply - |
|
4097 |
apply rule |
|
4098 |
apply rule |
|
4099 |
apply assumption |
|
4100 |
apply safe |
|
4101 |
proof - |
|
4102 |
fix t |
|
4103 |
assume as: "t < c" and "c - e / 3 / norm (f c) < t" |
|
4104 |
then have "c - t < e / 3 / norm (f c)" |
|
4105 |
by auto |
|
4106 |
then have "norm (c - t) < e / 3 / norm (f c)" |
|
4107 |
using as by auto |
|
4108 |
then show "norm (f c) * norm (c - t) < e / 3" |
|
4109 |
using False |
|
4110 |
apply - |
|
57512
cc97b347b301
reduced name variants for assoc and commute on plus and mult
haftmann
parents:
57447
diff
changeset
|
4111 |
apply (subst mult.commute) |
53634 | 4112 |
apply (subst pos_less_divide_eq[symmetric]) |
4113 |
apply auto |
|
4114 |
done |
|
4115 |
qed |
|
4116 |
next |
|
4117 |
case True |
|
4118 |
show ?thesis |
|
4119 |
apply (rule_tac x=1 in exI) |
|
4120 |
unfolding True |
|
60420 | 4121 |
using \<open>e > 0\<close> |
53634 | 4122 |
apply auto |
4123 |
done |
|
4124 |
qed |
|
4125 |
then guess w .. note w = conjunctD2[OF this,rule_format] |
|
4126 |
||
4127 |
have *: "e / 3 > 0" |
|
4128 |
using assms by auto |
|
56188 | 4129 |
have "f integrable_on {a .. c}" |
4130 |
apply (rule integrable_subinterval_real[OF assms(1)]) |
|
53634 | 4131 |
using assms(2-3) |
4132 |
apply auto |
|
4133 |
done |
|
56188 | 4134 |
from integrable_integral[OF this,unfolded has_integral_real,rule_format,OF *] guess d1 .. |
53634 | 4135 |
note d1 = conjunctD2[OF this,rule_format] |
63040 | 4136 |
define d where [abs_def]: "d x = ball x w \<inter> d1 x" for x |
53634 | 4137 |
have "gauge d" |
4138 |
unfolding d_def using w(1) d1 by auto |
|
4139 |
note this[unfolded gauge_def,rule_format,of c] |
|
4140 |
note conjunctD2[OF this] |
|
4141 |
from this(2)[unfolded open_contains_ball,rule_format,OF this(1)] guess k .. |
|
4142 |
note k=conjunctD2[OF this] |
|
4143 |
||
4144 |
let ?d = "min k (c - a) / 2" |
|
4145 |
show ?thesis |
|
4146 |
apply (rule that[of ?d]) |
|
4147 |
apply safe |
|
4148 |
proof - |
|
4149 |
show "?d > 0" |
|
4150 |
using k(1) using assms(2) by auto |
|
4151 |
fix t |
|
4152 |
assume as: "c - ?d < t" "t \<le> c" |
|
56188 | 4153 |
let ?thesis = "norm (integral ({a .. c}) f - integral ({a .. t}) f) < e" |
53634 | 4154 |
{ |
4155 |
presume *: "t < c \<Longrightarrow> ?thesis" |
|
4156 |
show ?thesis |
|
4157 |
apply (cases "t = c") |
|
4158 |
defer |
|
4159 |
apply (rule *) |
|
4160 |
apply (subst less_le) |
|
60420 | 4161 |
using \<open>e > 0\<close> as(2) |
53634 | 4162 |
apply auto |
4163 |
done |
|
4164 |
} |
|
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
|
4165 |
assume "t < c" |
35751 | 4166 |
|
56188 | 4167 |
have "f integrable_on {a .. t}" |
4168 |
apply (rule integrable_subinterval_real[OF assms(1)]) |
|
53634 | 4169 |
using assms(2-3) as(2) |
4170 |
apply auto |
|
4171 |
done |
|
56188 | 4172 |
from integrable_integral[OF this,unfolded has_integral_real,rule_format,OF *] guess d2 .. |
35751 | 4173 |
note d2 = conjunctD2[OF this,rule_format] |
63040 | 4174 |
define d3 where "d3 x = (if x \<le> t then d1 x \<inter> d2 x else d1 x)" for x |
53634 | 4175 |
have "gauge d3" |
4176 |
using d2(1) d1(1) unfolding d3_def gauge_def by auto |
|
56188 | 4177 |
from fine_division_exists_real[OF this, of a t] guess p . note p=this |
35751 | 4178 |
note p'=tagged_division_ofD[OF this(1)] |
53634 | 4179 |
have pt: "\<forall>(x,k)\<in>p. x \<le> t" |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
4180 |
proof (safe, goal_cases) |
61167 | 4181 |
case prems: 1 |
4182 |
from p'(2,3)[OF prems] show ?case |
|
53634 | 4183 |
by auto |
4184 |
qed |
|
4185 |
with p(2) have "d2 fine p" |
|
4186 |
unfolding fine_def d3_def |
|
4187 |
apply safe |
|
4188 |
apply (erule_tac x="(a,b)" in ballE)+ |
|
4189 |
apply auto |
|
4190 |
done |
|
35751 | 4191 |
note d2_fin = d2(2)[OF conjI[OF p(1) this]] |
53399 | 4192 |
|
56188 | 4193 |
have *: "{a .. c} \<inter> {x. x \<bullet> 1 \<le> t} = {a .. t}" "{a .. c} \<inter> {x. x \<bullet> 1 \<ge> t} = {t .. c}" |
53634 | 4194 |
using assms(2-3) as by (auto simp add: field_simps) |
56188 | 4195 |
have "p \<union> {(c, {t .. c})} tagged_division_of {a .. c} \<and> d1 fine p \<union> {(c, {t .. c})}" |
53634 | 4196 |
apply rule |
56188 | 4197 |
apply (rule tagged_division_union_interval_real[of _ _ _ 1 "t"]) |
53634 | 4198 |
unfolding * |
4199 |
apply (rule p) |
|
56188 | 4200 |
apply (rule tagged_division_of_self_real) |
53634 | 4201 |
unfolding fine_def |
4202 |
apply safe |
|
4203 |
proof - |
|
4204 |
fix x k y |
|
4205 |
assume "(x,k) \<in> p" and "y \<in> k" |
|
4206 |
then show "y \<in> d1 x" |
|
4207 |
using p(2) pt |
|
4208 |
unfolding fine_def d3_def |
|
4209 |
apply - |
|
4210 |
apply (erule_tac x="(x,k)" in ballE)+ |
|
4211 |
apply auto |
|
4212 |
done |
|
4213 |
next |
|
4214 |
fix x assume "x \<in> {t..c}" |
|
4215 |
then have "dist c x < k" |
|
4216 |
unfolding dist_real_def |
|
4217 |
using as(1) |
|
4218 |
by (auto simp add: field_simps) |
|
4219 |
then show "x \<in> d1 c" |
|
4220 |
using k(2) |
|
4221 |
unfolding d_def |
|
4222 |
by auto |
|
4223 |
qed (insert as(2), auto) note d1_fin = d1(2)[OF this] |
|
4224 |
||
56188 | 4225 |
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)) - |
4226 |
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 | 4227 |
"e = (e/3 + e/3) + e/3" |
4228 |
by auto |
|
56188 | 4229 |
have **: "(\<Sum>(x, k)\<in>p \<union> {(c, {t .. c})}. content k *\<^sub>R f x) = |
53634 | 4230 |
(c - t) *\<^sub>R f c + (\<Sum>(x, k)\<in>p. content k *\<^sub>R f x)" |
4231 |
proof - |
|
4232 |
have **: "\<And>x F. F \<union> {x} = insert x F" |
|
4233 |
by auto |
|
56188 | 4234 |
have "(c, cbox t c) \<notin> p" |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
4235 |
proof (safe, goal_cases) |
61167 | 4236 |
case prems: 1 |
4237 |
from p'(2-3)[OF prems] have "c \<in> cbox a t" |
|
53634 | 4238 |
by auto |
60420 | 4239 |
then show False using \<open>t < c\<close> |
53634 | 4240 |
by auto |
4241 |
qed |
|
4242 |
then show ?thesis |
|
56188 | 4243 |
unfolding ** box_real |
53634 | 4244 |
apply - |
64267 | 4245 |
apply (subst sum.insert) |
53634 | 4246 |
apply (rule p') |
4247 |
unfolding split_conv |
|
4248 |
defer |
|
4249 |
apply (subst content_real) |
|
4250 |
using as(2) |
|
4251 |
apply auto |
|
4252 |
done |
|
4253 |
qed |
|
4254 |
have ***: "c - w < t \<and> t < c" |
|
4255 |
proof - |
|
4256 |
have "c - k < t" |
|
60420 | 4257 |
using \<open>k>0\<close> as(1) by (auto simp add: field_simps) |
53634 | 4258 |
moreover have "k \<le> w" |
4259 |
apply (rule ccontr) |
|
4260 |
using k(2) |
|
4261 |
unfolding subset_eq |
|
4262 |
apply (erule_tac x="c + ((k + w)/2)" in ballE) |
|
4263 |
unfolding d_def |
|
60420 | 4264 |
using \<open>k > 0\<close> \<open>w > 0\<close> |
53634 | 4265 |
apply (auto simp add: field_simps not_le not_less dist_real_def) |
4266 |
done |
|
60420 | 4267 |
ultimately show ?thesis using \<open>t < c\<close> |
53634 | 4268 |
by (auto simp add: field_simps) |
4269 |
qed |
|
4270 |
show ?thesis |
|
4271 |
unfolding *(1) |
|
4272 |
apply (subst *(2)) |
|
4273 |
apply (rule norm_triangle_lt add_strict_mono)+ |
|
4274 |
unfolding norm_minus_cancel |
|
4275 |
apply (rule d1_fin[unfolded **]) |
|
4276 |
apply (rule d2_fin) |
|
4277 |
using w(2)[OF ***] |
|
4278 |
unfolding norm_scaleR |
|
4279 |
apply (auto simp add: field_simps) |
|
4280 |
done |
|
4281 |
qed |
|
4282 |
qed |
|
4283 |
||
4284 |
lemma indefinite_integral_continuous_right: |
|
4285 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
56188 | 4286 |
assumes "f integrable_on {a .. b}" |
53634 | 4287 |
and "a \<le> c" |
4288 |
and "c < b" |
|
4289 |
and "e > 0" |
|
4290 |
obtains d where "0 < d" |
|
56188 | 4291 |
and "\<forall>t. c \<le> t \<and> t < c + d \<longrightarrow> norm (integral {a .. c} f - integral {a .. t} f) < e" |
4292 |
proof - |
|
4293 |
have *: "(\<lambda>x. f (- x)) integrable_on {-b .. -a}" "- b < - c" "- c \<le> - a" |
|
53634 | 4294 |
using assms by auto |
60420 | 4295 |
from indefinite_integral_continuous_left[OF * \<open>e>0\<close>] guess d . note d = this |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4296 |
let ?d = "min d (b - c)" |
53634 | 4297 |
show ?thesis |
4298 |
apply (rule that[of "?d"]) |
|
4299 |
apply safe |
|
4300 |
proof - |
|
4301 |
show "0 < ?d" |
|
4302 |
using d(1) assms(3) by auto |
|
4303 |
fix t :: real |
|
4304 |
assume as: "c \<le> t" "t < c + ?d" |
|
56188 | 4305 |
have *: "integral {a .. c} f = integral {a .. b} f - integral {c .. b} f" |
4306 |
"integral {a .. t} f = integral {a .. b} f - integral {t .. b} f" |
|
63170 | 4307 |
apply (simp_all only: algebra_simps) |
53634 | 4308 |
apply (rule_tac[!] integral_combine) |
4309 |
using assms as |
|
4310 |
apply auto |
|
4311 |
done |
|
4312 |
have "(- c) - d < (- t) \<and> - t \<le> - c" |
|
4313 |
using as by auto note d(2)[rule_format,OF this] |
|
56188 | 4314 |
then show "norm (integral {a .. c} f - integral {a .. t} f) < e" |
53634 | 4315 |
unfolding * |
4316 |
unfolding integral_reflect |
|
4317 |
apply (subst norm_minus_commute) |
|
4318 |
apply (auto simp add: algebra_simps) |
|
4319 |
done |
|
4320 |
qed |
|
4321 |
qed |
|
4322 |
||
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4323 |
lemma indefinite_integral_continuous_1: |
53634 | 4324 |
fixes f :: "real \<Rightarrow> 'a::banach" |
56188 | 4325 |
assumes "f integrable_on {a .. b}" |
4326 |
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
|
4327 |
proof - |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4328 |
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
|
4329 |
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
|
4330 |
proof (cases "a = b") |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4331 |
case True |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4332 |
with that show ?thesis by force |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4333 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4334 |
case False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4335 |
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
|
4336 |
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
|
4337 |
by force |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4338 |
then show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4339 |
proof cases |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4340 |
case 1 show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4341 |
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
|
4342 |
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
|
4343 |
done |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4344 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4345 |
case 2 show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4346 |
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
|
4347 |
using \<open>x = b\<close> apply (force simp: dist_norm norm_minus_commute algebra_simps) |
53634 | 4348 |
done |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4349 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4350 |
case 3 |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4351 |
obtain d1 where "0 < d1" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4352 |
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
|
4353 |
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
|
4354 |
obtain d2 where "0 < d2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4355 |
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
|
4356 |
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
|
4357 |
show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4358 |
proof (intro exI ballI conjI impI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4359 |
show "0 < min d1 d2" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4360 |
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
|
4361 |
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
|
4362 |
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
|
4363 |
proof (cases "y < x") |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4364 |
case True |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4365 |
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
|
4366 |
next |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4367 |
case False |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4368 |
with that d2 show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4369 |
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
|
4370 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4371 |
qed |
53634 | 4372 |
qed |
4373 |
qed |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4374 |
then show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4375 |
by (auto simp: continuous_on_iff) |
53634 | 4376 |
qed |
4377 |
||
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4378 |
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
|
4379 |
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
|
4380 |
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
|
4381 |
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
|
4382 |
proof - |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4383 |
have "integral {a .. b} f - integral {a .. x} f = integral {x .. b} f" if "x \<in> {a .. b}" for x |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4384 |
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
|
4385 |
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
|
4386 |
with _ show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
4387 |
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
|
4388 |
qed |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
4389 |
|
35751 | 4390 |
|
60420 | 4391 |
subsection \<open>This doesn't directly involve integration, but that gives an easy proof.\<close> |
35751 | 4392 |
|
53634 | 4393 |
lemma has_derivative_zero_unique_strong_interval: |
4394 |
fixes f :: "real \<Rightarrow> 'a::banach" |
|
4395 |
assumes "finite k" |
|
56188 | 4396 |
and "continuous_on {a .. b} f" |
53634 | 4397 |
and "f a = y" |
56188 | 4398 |
and "\<forall>x\<in>({a .. b} - k). (f has_derivative (\<lambda>h. 0)) (at x within {a .. b})" "x \<in> {a .. b}" |
35751 | 4399 |
shows "f x = y" |
53634 | 4400 |
proof - |
4401 |
have ab: "a \<le> b" |
|
4402 |
using assms by auto |
|
4403 |
have *: "a \<le> x" |
|
4404 |
using assms(5) by auto |
|
61076 | 4405 |
have "((\<lambda>x. 0::'a) has_integral f x - f a) {a .. x}" |
53634 | 4406 |
apply (rule fundamental_theorem_of_calculus_interior_strong[OF assms(1) *]) |
4407 |
apply (rule continuous_on_subset[OF assms(2)]) |
|
4408 |
defer |
|
4409 |
apply safe |
|
4410 |
unfolding has_vector_derivative_def |
|
4411 |
apply (subst has_derivative_within_open[symmetric]) |
|
4412 |
apply assumption |
|
56188 | 4413 |
apply (rule open_greaterThanLessThan) |
4414 |
apply (rule has_derivative_within_subset[where s="{a .. b}"]) |
|
53634 | 4415 |
using assms(4) assms(5) |
56188 | 4416 |
apply (auto simp: mem_box) |
53634 | 4417 |
done |
4418 |
note this[unfolded *] |
|
35751 | 4419 |
note has_integral_unique[OF has_integral_0 this] |
53634 | 4420 |
then show ?thesis |
4421 |
unfolding assms by auto |
|
4422 |
qed |
|
4423 |
||
35751 | 4424 |
|
60420 | 4425 |
subsection \<open>Generalize a bit to any convex set.\<close> |
35751 | 4426 |
|
53634 | 4427 |
lemma has_derivative_zero_unique_strong_convex: |
56188 | 4428 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
53634 | 4429 |
assumes "convex s" |
4430 |
and "finite k" |
|
4431 |
and "continuous_on s f" |
|
4432 |
and "c \<in> s" |
|
4433 |
and "f c = y" |
|
4434 |
and "\<forall>x\<in>(s - k). (f has_derivative (\<lambda>h. 0)) (at x within s)" |
|
4435 |
and "x \<in> s" |
|
35751 | 4436 |
shows "f x = y" |
53634 | 4437 |
proof - |
4438 |
{ |
|
4439 |
presume *: "x \<noteq> c \<Longrightarrow> ?thesis" |
|
4440 |
show ?thesis |
|
4441 |
apply cases |
|
4442 |
apply (rule *) |
|
4443 |
apply assumption |
|
4444 |
unfolding assms(5)[symmetric] |
|
4445 |
apply auto |
|
4446 |
done |
|
4447 |
} |
|
4448 |
assume "x \<noteq> c" |
|
35751 | 4449 |
note conv = assms(1)[unfolded convex_alt,rule_format] |
56188 | 4450 |
have as1: "continuous_on {0 ..1} (f \<circ> (\<lambda>t. (1 - t) *\<^sub>R c + t *\<^sub>R x))" |
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56332
diff
changeset
|
4451 |
apply (rule continuous_intros)+ |
53634 | 4452 |
apply (rule continuous_on_subset[OF assms(3)]) |
4453 |
apply safe |
|
4454 |
apply (rule conv) |
|
4455 |
using assms(4,7) |
|
4456 |
apply auto |
|
4457 |
done |
|
61165 | 4458 |
have *: "t = xa" if "(1 - t) *\<^sub>R c + t *\<^sub>R x = (1 - xa) *\<^sub>R c + xa *\<^sub>R x" for t xa |
53634 | 4459 |
proof - |
61165 | 4460 |
from that have "(t - xa) *\<^sub>R x = (t - xa) *\<^sub>R c" |
53634 | 4461 |
unfolding scaleR_simps by (auto simp add: algebra_simps) |
61165 | 4462 |
then show ?thesis |
60420 | 4463 |
using \<open>x \<noteq> c\<close> by auto |
53634 | 4464 |
qed |
4465 |
have as2: "finite {t. ((1 - t) *\<^sub>R c + t *\<^sub>R x) \<in> k}" |
|
4466 |
using assms(2) |
|
4467 |
apply (rule finite_surj[where f="\<lambda>z. SOME t. (1-t) *\<^sub>R c + t *\<^sub>R x = z"]) |
|
4468 |
apply safe |
|
4469 |
unfolding image_iff |
|
4470 |
apply rule |
|
4471 |
defer |
|
4472 |
apply assumption |
|
4473 |
apply (rule sym) |
|
4474 |
apply (rule some_equality) |
|
4475 |
defer |
|
4476 |
apply (drule *) |
|
4477 |
apply auto |
|
4478 |
done |
|
35751 | 4479 |
have "(f \<circ> (\<lambda>t. (1 - t) *\<^sub>R c + t *\<^sub>R x)) 1 = y" |
53634 | 4480 |
apply (rule has_derivative_zero_unique_strong_interval[OF as2 as1, of ]) |
4481 |
unfolding o_def |
|
4482 |
using assms(5) |
|
4483 |
defer |
|
4484 |
apply - |
|
4485 |
apply rule |
|
4486 |
proof - |
|
4487 |
fix t |
|
56188 | 4488 |
assume as: "t \<in> {0 .. 1} - {t. (1 - t) *\<^sub>R c + t *\<^sub>R x \<in> k}" |
53634 | 4489 |
have *: "c - t *\<^sub>R c + t *\<^sub>R x \<in> s - k" |
4490 |
apply safe |
|
4491 |
apply (rule conv[unfolded scaleR_simps]) |
|
60420 | 4492 |
using \<open>x \<in> s\<close> \<open>c \<in> s\<close> as |
53634 | 4493 |
by (auto simp add: algebra_simps) |
4494 |
have "(f \<circ> (\<lambda>t. (1 - t) *\<^sub>R c + t *\<^sub>R x) has_derivative (\<lambda>x. 0) \<circ> (\<lambda>z. (0 - z *\<^sub>R c) + z *\<^sub>R x)) |
|
56188 | 4495 |
(at t within {0 .. 1})" |
56381
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
4496 |
apply (intro derivative_eq_intros) |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
4497 |
apply simp_all |
0556204bc230
merged DERIV_intros, has_derivative_intros into derivative_intros
hoelzl
parents:
56371
diff
changeset
|
4498 |
apply (simp add: field_simps) |
44140
2c10c35dd4be
remove several redundant and unused theorems about derivatives
huffman
parents:
44125
diff
changeset
|
4499 |
unfolding scaleR_simps |
53634 | 4500 |
apply (rule has_derivative_within_subset,rule assms(6)[rule_format]) |
4501 |
apply (rule *) |
|
4502 |
apply safe |
|
4503 |
apply (rule conv[unfolded scaleR_simps]) |
|
60420 | 4504 |
using \<open>x \<in> s\<close> \<open>c \<in> s\<close> |
53634 | 4505 |
apply auto |
4506 |
done |
|
56188 | 4507 |
then show "((\<lambda>xa. f ((1 - xa) *\<^sub>R c + xa *\<^sub>R x)) has_derivative (\<lambda>h. 0)) (at t within {0 .. 1})" |
53634 | 4508 |
unfolding o_def . |
4509 |
qed auto |
|
4510 |
then show ?thesis |
|
4511 |
by auto |
|
4512 |
qed |
|
4513 |
||
4514 |
||
60420 | 4515 |
text \<open>Also to any open connected set with finite set of exceptions. Could |
4516 |
generalize to locally convex set with limpt-free set of exceptions.\<close> |
|
35751 | 4517 |
|
53634 | 4518 |
lemma has_derivative_zero_unique_strong_connected: |
56188 | 4519 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
53634 | 4520 |
assumes "connected s" |
4521 |
and "open s" |
|
4522 |
and "finite k" |
|
4523 |
and "continuous_on s f" |
|
4524 |
and "c \<in> s" |
|
4525 |
and "f c = y" |
|
4526 |
and "\<forall>x\<in>(s - k). (f has_derivative (\<lambda>h. 0)) (at x within s)" |
|
4527 |
and "x\<in>s" |
|
35751 | 4528 |
shows "f x = y" |
53634 | 4529 |
proof - |
4530 |
have "{x \<in> s. f x \<in> {y}} = {} \<or> {x \<in> s. f x \<in> {y}} = s" |
|
4531 |
apply (rule assms(1)[unfolded connected_clopen,rule_format]) |
|
4532 |
apply rule |
|
4533 |
defer |
|
61518
ff12606337e9
new lemmas about topology, etc., for Cauchy integral formula
paulson
parents:
61424
diff
changeset
|
4534 |
apply (rule continuous_closedin_preimage[OF assms(4) closed_singleton]) |
53634 | 4535 |
apply (rule open_openin_trans[OF assms(2)]) |
4536 |
unfolding open_contains_ball |
|
4537 |
proof safe |
|
4538 |
fix x |
|
4539 |
assume "x \<in> s" |
|
35751 | 4540 |
from assms(2)[unfolded open_contains_ball,rule_format,OF this] guess e .. note e=conjunctD2[OF this] |
53634 | 4541 |
show "\<exists>e>0. ball x e \<subseteq> {xa \<in> s. f xa \<in> {f x}}" |
4542 |
apply rule |
|
4543 |
apply rule |
|
4544 |
apply (rule e) |
|
4545 |
proof safe |
|
4546 |
fix y |
|
4547 |
assume y: "y \<in> ball x e" |
|
4548 |
then show "y \<in> s" |
|
4549 |
using e by auto |
|
4550 |
show "f y = f x" |
|
4551 |
apply (rule has_derivative_zero_unique_strong_convex[OF convex_ball]) |
|
4552 |
apply (rule assms) |
|
4553 |
apply (rule continuous_on_subset) |
|
4554 |
apply (rule assms) |
|
4555 |
apply (rule e)+ |
|
4556 |
apply (subst centre_in_ball) |
|
4557 |
apply (rule e) |
|
4558 |
apply rule |
|
4559 |
apply safe |
|
4560 |
apply (rule has_derivative_within_subset) |
|
4561 |
apply (rule assms(7)[rule_format]) |
|
4562 |
using y e |
|
4563 |
apply auto |
|
4564 |
done |
|
4565 |
qed |
|
4566 |
qed |
|
4567 |
then show ?thesis |
|
60420 | 4568 |
using \<open>x \<in> s\<close> \<open>f c = y\<close> \<open>c \<in> s\<close> by auto |
53634 | 4569 |
qed |
4570 |
||
56332 | 4571 |
lemma has_derivative_zero_connected_constant: |
4572 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
|
4573 |
assumes "connected s" |
|
4574 |
and "open s" |
|
4575 |
and "finite k" |
|
4576 |
and "continuous_on s f" |
|
4577 |
and "\<forall>x\<in>(s - k). (f has_derivative (\<lambda>h. 0)) (at x within s)" |
|
4578 |
obtains c where "\<And>x. x \<in> s \<Longrightarrow> f(x) = c" |
|
4579 |
proof (cases "s = {}") |
|
4580 |
case True |
|
4581 |
then show ?thesis |
|
4582 |
by (metis empty_iff that) |
|
4583 |
next |
|
4584 |
case False |
|
4585 |
then obtain c where "c \<in> s" |
|
4586 |
by (metis equals0I) |
|
4587 |
then show ?thesis |
|
4588 |
by (metis has_derivative_zero_unique_strong_connected assms that) |
|
4589 |
qed |
|
4590 |
||
53634 | 4591 |
|
60420 | 4592 |
subsection \<open>Integrating characteristic function of an interval\<close> |
53634 | 4593 |
|
4594 |
lemma has_integral_restrict_open_subinterval: |
|
56188 | 4595 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
4596 |
assumes "(f has_integral i) (cbox c d)" |
|
4597 |
and "cbox c d \<subseteq> cbox a b" |
|
4598 |
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
|
4599 |
proof - |
63040 | 4600 |
define g where [abs_def]: "g x = (if x \<in>box c d then f x else 0)" for x |
53634 | 4601 |
{ |
56188 | 4602 |
presume *: "cbox c d \<noteq> {} \<Longrightarrow> ?thesis" |
53634 | 4603 |
show ?thesis |
4604 |
apply cases |
|
4605 |
apply (rule *) |
|
4606 |
apply assumption |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
4607 |
proof goal_cases |
61167 | 4608 |
case prems: 1 |
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
4609 |
then have *: "box c d = {}" |
56188 | 4610 |
by (metis bot.extremum_uniqueI box_subset_cbox) |
53634 | 4611 |
show ?thesis |
4612 |
using assms(1) |
|
4613 |
unfolding * |
|
61167 | 4614 |
using prems |
53634 | 4615 |
by auto |
4616 |
qed |
|
4617 |
} |
|
56188 | 4618 |
assume "cbox c d \<noteq> {}" |
63659 | 4619 |
from partial_division_extend_1 [OF assms(2) this] guess p . note p=this |
4620 |
interpret comm_monoid_set "lift_option plus" "Some (0 :: 'b)" |
|
4621 |
apply (rule comm_monoid_set.intro) |
|
4622 |
apply (rule comm_monoid_lift_option) |
|
4623 |
apply (rule add.comm_monoid_axioms) |
|
4624 |
done |
|
4625 |
note operat = operative_division |
|
4626 |
[OF operative_integral p(1), symmetric] |
|
56188 | 4627 |
let ?P = "(if g integrable_on cbox a b then Some (integral (cbox a b) g) else None) = Some i" |
53634 | 4628 |
{ |
4629 |
presume "?P" |
|
56188 | 4630 |
then have "g integrable_on cbox a b \<and> integral (cbox a b) g = i" |
53634 | 4631 |
apply - |
4632 |
apply cases |
|
4633 |
apply (subst(asm) if_P) |
|
4634 |
apply assumption |
|
4635 |
apply auto |
|
4636 |
done |
|
4637 |
then show ?thesis |
|
4638 |
using integrable_integral |
|
4639 |
unfolding g_def |
|
4640 |
by auto |
|
4641 |
} |
|
63659 | 4642 |
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
|
4643 |
have iterate:"?F (\<lambda>i. if g integrable_on i then Some (integral i g) else None) (p - {cbox c d}) = Some 0" |
63659 | 4644 |
proof (intro neutral ballI) |
61165 | 4645 |
fix x |
4646 |
assume x: "x \<in> p - {cbox c d}" |
|
53634 | 4647 |
then have "x \<in> p" |
4648 |
by auto |
|
4649 |
note div = division_ofD(2-5)[OF p(1) this] |
|
4650 |
from div(3) guess u v by (elim exE) note uv=this |
|
56188 | 4651 |
have "interior x \<inter> interior (cbox c d) = {}" |
61165 | 4652 |
using div(4)[OF p(2)] x by auto |
53634 | 4653 |
then have "(g has_integral 0) x" |
4654 |
unfolding uv |
|
4655 |
apply - |
|
4656 |
apply (rule has_integral_spike_interior[where f="\<lambda>x. 0"]) |
|
56188 | 4657 |
unfolding g_def interior_cbox |
53634 | 4658 |
apply auto |
4659 |
done |
|
61165 | 4660 |
then show "(if g integrable_on x then Some (integral x g) else None) = Some 0" |
53634 | 4661 |
by auto |
35751 | 4662 |
qed |
4663 |
||
56188 | 4664 |
have *: "p = insert (cbox c d) (p - {cbox c d})" |
53634 | 4665 |
using p by auto |
63659 | 4666 |
interpret comm_monoid_set "lift_option plus" "Some (0 :: 'b)" |
4667 |
apply (rule comm_monoid_set.intro) |
|
4668 |
apply (rule comm_monoid_lift_option) |
|
4669 |
apply (rule add.comm_monoid_axioms) |
|
4670 |
done |
|
56188 | 4671 |
have **: "g integrable_on cbox c d" |
53634 | 4672 |
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
|
4673 |
unfolding g_def using assms(1) |
53634 | 4674 |
apply auto |
4675 |
done |
|
4676 |
moreover |
|
56188 | 4677 |
have "integral (cbox c d) g = i" |
53634 | 4678 |
apply (rule has_integral_unique[OF _ assms(1)]) |
4679 |
apply (rule has_integral_spike_interior[where f=g]) |
|
4680 |
defer |
|
4681 |
apply (rule integrable_integral[OF **]) |
|
4682 |
unfolding g_def |
|
4683 |
apply auto |
|
4684 |
done |
|
4685 |
ultimately show ?P |
|
4686 |
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
|
4687 |
using p |
53634 | 4688 |
apply (subst *) |
63659 | 4689 |
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
|
4690 |
apply (simp_all add: division_of_finite iterate) |
53634 | 4691 |
done |
4692 |
qed |
|
4693 |
||
4694 |
lemma has_integral_restrict_closed_subinterval: |
|
56188 | 4695 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
4696 |
assumes "(f has_integral i) (cbox c d)" |
|
4697 |
and "cbox c d \<subseteq> cbox a b" |
|
4698 |
shows "((\<lambda>x. if x \<in> cbox c d then f x else 0) has_integral i) (cbox a b)" |
|
53634 | 4699 |
proof - |
4700 |
note has_integral_restrict_open_subinterval[OF assms] |
|
35751 | 4701 |
note * = has_integral_spike[OF negligible_frontier_interval _ this] |
53634 | 4702 |
show ?thesis |
4703 |
apply (rule *[of c d]) |
|
56188 | 4704 |
using box_subset_cbox[of c d] |
53634 | 4705 |
apply auto |
4706 |
done |
|
4707 |
qed |
|
4708 |
||
4709 |
lemma has_integral_restrict_closed_subintervals_eq: |
|
56188 | 4710 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::banach" |
4711 |
assumes "cbox c d \<subseteq> cbox a b" |
|
4712 |
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 | 4713 |
(is "?l = ?r") |
56188 | 4714 |
proof (cases "cbox c d = {}") |
53634 | 4715 |
case False |
56188 | 4716 |
let ?g = "\<lambda>x. if x \<in> cbox c d then f x else 0" |
53634 | 4717 |
show ?thesis |
4718 |
apply rule |
|
4719 |
defer |
|
4720 |
apply (rule has_integral_restrict_closed_subinterval[OF _ assms]) |
|
4721 |
apply assumption |
|
4722 |
proof - |
|
4723 |
assume ?l |
|
56188 | 4724 |
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
|
4725 |
using assms has_integral_integrable integrable_subinterval by blast |
56188 | 4726 |
then have *: "f integrable_on cbox c d" |
53634 | 4727 |
apply - |
4728 |
apply (rule integrable_eq) |
|
4729 |
apply auto |
|
4730 |
done |
|
56188 | 4731 |
then have "i = integral (cbox c d) f" |
53634 | 4732 |
apply - |
4733 |
apply (rule has_integral_unique) |
|
60420 | 4734 |
apply (rule \<open>?l\<close>) |
53634 | 4735 |
apply (rule has_integral_restrict_closed_subinterval[OF _ assms]) |
4736 |
apply auto |
|
4737 |
done |
|
4738 |
then show ?r |
|
4739 |
using * by auto |
|
4740 |
qed |
|
4741 |
qed auto |
|
4742 |
||
4743 |
||
60420 | 4744 |
text \<open>Hence we can apply the limit process uniformly to all integrals.\<close> |
53634 | 4745 |
|
4746 |
lemma has_integral': |
|
56188 | 4747 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 4748 |
shows "(f has_integral i) s \<longleftrightarrow> |
56188 | 4749 |
(\<forall>e>0. \<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
4750 |
(\<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 | 4751 |
(is "?l \<longleftrightarrow> (\<forall>e>0. ?r e)") |
4752 |
proof - |
|
4753 |
{ |
|
56188 | 4754 |
presume *: "\<exists>a b. s = cbox a b \<Longrightarrow> ?thesis" |
53634 | 4755 |
show ?thesis |
4756 |
apply cases |
|
4757 |
apply (rule *) |
|
4758 |
apply assumption |
|
4759 |
apply (subst has_integral_alt) |
|
4760 |
apply auto |
|
4761 |
done |
|
4762 |
} |
|
56188 | 4763 |
assume "\<exists>a b. s = cbox a b" |
53634 | 4764 |
then guess a b by (elim exE) note s=this |
56189
c4daa97ac57a
removed dependencies on theory Ordered_Euclidean_Space
immler
parents:
56188
diff
changeset
|
4765 |
from bounded_cbox[of a b, unfolded bounded_pos] guess B .. |
53634 | 4766 |
note B = conjunctD2[OF this,rule_format] show ?thesis |
4767 |
apply safe |
|
4768 |
proof - |
|
4769 |
fix e :: real |
|
4770 |
assume ?l and "e > 0" |
|
4771 |
show "?r e" |
|
4772 |
apply (rule_tac x="B+1" in exI) |
|
4773 |
apply safe |
|
4774 |
defer |
|
4775 |
apply (rule_tac x=i in exI) |
|
4776 |
proof |
|
4777 |
fix c d :: 'n |
|
56188 | 4778 |
assume as: "ball 0 (B+1) \<subseteq> cbox c d" |
4779 |
then show "((\<lambda>x. if x \<in> s then f x else 0) has_integral i) (cbox c d)" |
|
53634 | 4780 |
unfolding s |
4781 |
apply - |
|
4782 |
apply (rule has_integral_restrict_closed_subinterval) |
|
60420 | 4783 |
apply (rule \<open>?l\<close>[unfolded s]) |
53634 | 4784 |
apply safe |
4785 |
apply (drule B(2)[rule_format]) |
|
4786 |
unfolding subset_eq |
|
4787 |
apply (erule_tac x=x in ballE) |
|
4788 |
apply (auto simp add: dist_norm) |
|
4789 |
done |
|
60420 | 4790 |
qed (insert B \<open>e>0\<close>, auto) |
53634 | 4791 |
next |
4792 |
assume as: "\<forall>e>0. ?r e" |
|
35751 | 4793 |
from this[rule_format,OF zero_less_one] guess C .. note C=conjunctD2[OF this,rule_format] |
63040 | 4794 |
define c :: 'n where "c = (\<Sum>i\<in>Basis. (- max B C) *\<^sub>R i)" |
4795 |
define d :: 'n where "d = (\<Sum>i\<in>Basis. max B C *\<^sub>R i)" |
|
56188 | 4796 |
have c_d: "cbox a b \<subseteq> cbox c d" |
53634 | 4797 |
apply safe |
4798 |
apply (drule B(2)) |
|
56188 | 4799 |
unfolding 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
|
4800 |
proof |
61165 | 4801 |
fix x i |
4802 |
show "c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" if "norm x \<le> B" and "i \<in> Basis" |
|
4803 |
using that and Basis_le_norm[OF \<open>i\<in>Basis\<close>, of x] |
|
53634 | 4804 |
unfolding c_def d_def |
64267 | 4805 |
by (auto simp add: field_simps sum_negf) |
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
|
4806 |
qed |
56188 | 4807 |
have "ball 0 C \<subseteq> cbox c d" |
61165 | 4808 |
apply (rule subsetI) |
56188 | 4809 |
unfolding mem_box mem_ball dist_norm |
61167 | 4810 |
proof |
61165 | 4811 |
fix x i :: 'n |
4812 |
assume x: "norm (0 - x) < C" and i: "i \<in> Basis" |
|
4813 |
show "c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" |
|
4814 |
using Basis_le_norm[OF i, of x] and x i |
|
53634 | 4815 |
unfolding c_def d_def |
64267 | 4816 |
by (auto simp: sum_negf) |
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
|
4817 |
qed |
56188 | 4818 |
from C(2)[OF this] have "\<exists>y. (f has_integral y) (cbox a b)" |
53634 | 4819 |
unfolding has_integral_restrict_closed_subintervals_eq[OF c_d,symmetric] |
4820 |
unfolding s |
|
4821 |
by auto |
|
35751 | 4822 |
then guess y .. note y=this |
4823 |
||
53634 | 4824 |
have "y = i" |
4825 |
proof (rule ccontr) |
|
4826 |
assume "\<not> ?thesis" |
|
4827 |
then have "0 < norm (y - i)" |
|
4828 |
by auto |
|
35751 | 4829 |
from as[rule_format,OF this] guess C .. note C=conjunctD2[OF this,rule_format] |
63040 | 4830 |
define c :: 'n where "c = (\<Sum>i\<in>Basis. (- max B C) *\<^sub>R i)" |
4831 |
define d :: 'n where "d = (\<Sum>i\<in>Basis. max B C *\<^sub>R i)" |
|
56188 | 4832 |
have c_d: "cbox a b \<subseteq> cbox c d" |
53634 | 4833 |
apply safe |
4834 |
apply (drule B(2)) |
|
56188 | 4835 |
unfolding mem_box |
53634 | 4836 |
proof |
61165 | 4837 |
fix x i :: 'n |
4838 |
assume "norm x \<le> B" and "i \<in> Basis" |
|
4839 |
then show "c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" |
|
53634 | 4840 |
using Basis_le_norm[of i x] |
4841 |
unfolding c_def d_def |
|
64267 | 4842 |
by (auto simp add: field_simps sum_negf) |
53634 | 4843 |
qed |
56188 | 4844 |
have "ball 0 C \<subseteq> cbox c d" |
61165 | 4845 |
apply (rule subsetI) |
56188 | 4846 |
unfolding mem_box mem_ball dist_norm |
53634 | 4847 |
proof |
61165 | 4848 |
fix x i :: 'n |
4849 |
assume "norm (0 - x) < C" and "i \<in> Basis" |
|
4850 |
then show "c \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> d \<bullet> i" |
|
53634 | 4851 |
using Basis_le_norm[of i x] |
4852 |
unfolding c_def d_def |
|
64267 | 4853 |
by (auto simp: sum_negf) |
53634 | 4854 |
qed |
35751 | 4855 |
note C(2)[OF this] then guess z .. note z = conjunctD2[OF this, unfolded s] |
4856 |
note this[unfolded has_integral_restrict_closed_subintervals_eq[OF c_d]] |
|
53634 | 4857 |
then have "z = y" and "norm (z - i) < norm (y - i)" |
4858 |
apply - |
|
4859 |
apply (rule has_integral_unique[OF _ y(1)]) |
|
4860 |
apply assumption |
|
4861 |
apply assumption |
|
4862 |
done |
|
4863 |
then show False |
|
4864 |
by auto |
|
4865 |
qed |
|
4866 |
then show ?l |
|
4867 |
using y |
|
4868 |
unfolding s |
|
4869 |
by auto |
|
4870 |
qed |
|
4871 |
qed |
|
4872 |
||
4873 |
lemma has_integral_le: |
|
56188 | 4874 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
53634 | 4875 |
assumes "(f has_integral i) s" |
4876 |
and "(g has_integral j) s" |
|
4877 |
and "\<forall>x\<in>s. 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
|
4878 |
shows "i \<le> j" |
53634 | 4879 |
using has_integral_component_le[OF _ assms(1-2), of 1] |
4880 |
using assms(3) |
|
4881 |
by auto |
|
4882 |
||
4883 |
lemma integral_le: |
|
56188 | 4884 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
53634 | 4885 |
assumes "f integrable_on s" |
4886 |
and "g integrable_on s" |
|
4887 |
and "\<forall>x\<in>s. f x \<le> g x" |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
4888 |
shows "integral s f \<le> integral s g" |
53634 | 4889 |
by (rule has_integral_le[OF assms(1,2)[unfolded has_integral_integral] assms(3)]) |
4890 |
||
4891 |
lemma has_integral_nonneg: |
|
56188 | 4892 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
53634 | 4893 |
assumes "(f has_integral i) s" |
4894 |
and "\<forall>x\<in>s. 0 \<le> f x" |
|
4895 |
shows "0 \<le> i" |
|
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
|
4896 |
using has_integral_component_nonneg[of 1 f i s] |
53634 | 4897 |
unfolding o_def |
4898 |
using assms |
|
4899 |
by auto |
|
4900 |
||
4901 |
lemma integral_nonneg: |
|
56188 | 4902 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
53634 | 4903 |
assumes "f integrable_on s" |
4904 |
and "\<forall>x\<in>s. 0 \<le> f x" |
|
4905 |
shows "0 \<le> integral s f" |
|
4906 |
by (rule has_integral_nonneg[OF assms(1)[unfolded has_integral_integral] assms(2)]) |
|
4907 |
||
4908 |
||
60420 | 4909 |
text \<open>Hence a general restriction property.\<close> |
53634 | 4910 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4911 |
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
|
4912 |
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
|
4913 |
assumes "S \<subseteq> T" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4914 |
shows "((\<lambda>x. if x \<in> S then f x else 0) has_integral i) T \<longleftrightarrow> (f has_integral i) S" |
53634 | 4915 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4916 |
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 | 4917 |
using assms by auto |
4918 |
show ?thesis |
|
4919 |
apply (subst(2) has_integral') |
|
4920 |
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
|
4921 |
apply (simp add: *) |
53634 | 4922 |
done |
4923 |
qed |
|
4924 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4925 |
corollary has_integral_restrict_UNIV: |
56188 | 4926 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 4927 |
shows "((\<lambda>x. if x \<in> s then f x else 0) has_integral i) UNIV \<longleftrightarrow> (f has_integral i) s" |
4928 |
by auto |
|
4929 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4930 |
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
|
4931 |
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
|
4932 |
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
|
4933 |
proof - |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4934 |
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
|
4935 |
((\<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
|
4936 |
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
|
4937 |
then show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4938 |
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
|
4939 |
qed |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4940 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4941 |
lemma integral_restrict_Int: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4942 |
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
|
4943 |
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
|
4944 |
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
|
4945 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4946 |
lemma integrable_restrict_Int: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4947 |
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
|
4948 |
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
|
4949 |
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
|
4950 |
|
53634 | 4951 |
lemma has_integral_on_superset: |
56188 | 4952 |
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
|
4953 |
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
|
4954 |
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
|
4955 |
and "S \<subseteq> T" |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4956 |
shows "(f has_integral i) T" |
53634 | 4957 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4958 |
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
|
4959 |
using assms by fastforce |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4960 |
with f show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4961 |
by (simp only: has_integral_restrict_UNIV [symmetric, of f]) |
53634 | 4962 |
qed |
4963 |
||
4964 |
lemma integrable_on_superset: |
|
56188 | 4965 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 4966 |
assumes "\<forall>x. x \<notin> s \<longrightarrow> f x = 0" |
4967 |
and "s \<subseteq> t" |
|
4968 |
and "f integrable_on s" |
|
35751 | 4969 |
shows "f integrable_on t" |
53634 | 4970 |
using assms |
4971 |
unfolding integrable_on_def |
|
4972 |
by (auto intro:has_integral_on_superset) |
|
4973 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4974 |
lemma integral_restrict_UNIV [intro]: |
56188 | 4975 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
35751 | 4976 |
shows "f integrable_on s \<Longrightarrow> integral UNIV (\<lambda>x. if x \<in> s then f x else 0) = integral s f" |
53634 | 4977 |
apply (rule integral_unique) |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
4978 |
unfolding has_integral_restrict_UNIV |
53634 | 4979 |
apply auto |
4980 |
done |
|
4981 |
||
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
4982 |
lemma integrable_restrict_UNIV: |
56188 | 4983 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 4984 |
shows "(\<lambda>x. if x \<in> s then f x else 0) integrable_on UNIV \<longleftrightarrow> f integrable_on s" |
4985 |
unfolding integrable_on_def |
|
4986 |
by auto |
|
4987 |
||
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4988 |
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
|
4989 |
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
|
4990 |
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
|
4991 |
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
|
4992 |
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
|
4993 |
proof - |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4994 |
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
|
4995 |
"((\<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
|
4996 |
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
|
4997 |
then show ?thesis |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
4998 |
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
|
4999 |
using as by auto |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5000 |
qed |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5001 |
|
56188 | 5002 |
lemma negligible_on_intervals: "negligible s \<longleftrightarrow> (\<forall>a b. negligible(s \<inter> cbox a b))" (is "?l \<longleftrightarrow> ?r") |
53634 | 5003 |
proof |
5004 |
assume ?r |
|
5005 |
show ?l |
|
5006 |
unfolding negligible_def |
|
5007 |
proof safe |
|
61165 | 5008 |
fix a b |
5009 |
show "(indicator s has_integral 0) (cbox a b)" |
|
60420 | 5010 |
apply (rule has_integral_negligible[OF \<open>?r\<close>[rule_format,of a b]]) |
53634 | 5011 |
unfolding indicator_def |
5012 |
apply auto |
|
5013 |
done |
|
5014 |
qed |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
5015 |
qed (simp add: negligible_Int) |
53634 | 5016 |
|
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5017 |
lemma negligible_translation: |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5018 |
assumes "negligible S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5019 |
shows "negligible (op + c ` S)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5020 |
proof - |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5021 |
have inj: "inj (op + c)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5022 |
by simp |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5023 |
show ?thesis |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5024 |
using assms |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5025 |
proof (clarsimp simp: negligible_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5026 |
fix a b |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5027 |
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
|
5028 |
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
|
5029 |
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
|
5030 |
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
|
5031 |
by (force simp add: indicator_def) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5032 |
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
|
5033 |
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
|
5034 |
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
|
5035 |
by (simp add: eq add.commute) |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5036 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5037 |
qed |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5038 |
|
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5039 |
lemma negligible_translation_rev: |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5040 |
assumes "negligible (op + c ` S)" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5041 |
shows "negligible S" |
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5042 |
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
|
5043 |
|
53634 | 5044 |
lemma has_integral_spike_set_eq: |
56188 | 5045 |
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
|
5046 |
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
|
5047 |
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
|
5048 |
unfolding has_integral_restrict_UNIV[symmetric,of f] |
53634 | 5049 |
apply (rule has_integral_spike_eq[OF assms]) |
62390 | 5050 |
by (auto split: if_split_asm) |
53634 | 5051 |
|
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
5052 |
lemma has_integral_spike_set: |
56188 | 5053 |
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
|
5054 |
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
|
5055 |
shows "(f has_integral y) T" |
53634 | 5056 |
using assms has_integral_spike_set_eq |
5057 |
by auto |
|
5058 |
||
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
5059 |
lemma integrable_spike_set: |
56188 | 5060 |
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
|
5061 |
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
|
5062 |
shows "f integrable_on T" |
63945
444eafb6e864
a few new theorems and a renaming
paulson <lp15@cam.ac.uk>
parents:
63944
diff
changeset
|
5063 |
using assms by (simp add: integrable_on_def has_integral_spike_set_eq) |
35751 | 5064 |
|
53634 | 5065 |
lemma integrable_spike_set_eq: |
56188 | 5066 |
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
|
5067 |
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
|
5068 |
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
|
5069 |
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
|
5070 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5071 |
lemma has_integral_interior: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5072 |
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
|
5073 |
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
|
5074 |
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
|
5075 |
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
|
5076 |
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
|
5077 |
done |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5078 |
|
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5079 |
lemma has_integral_closure: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5080 |
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
|
5081 |
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
|
5082 |
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
|
5083 |
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
|
5084 |
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
|
5085 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5086 |
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
|
5087 |
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
|
5088 |
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
|
5089 |
unfolding interior_cbox [symmetric] |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5090 |
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
|
5091 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5092 |
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
|
5093 |
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
|
5094 |
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
|
5095 |
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
|
5096 |
|
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5097 |
lemma integral_open_interval: |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5098 |
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
|
5099 |
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
|
5100 |
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
|
5101 |
|
35751 | 5102 |
|
60420 | 5103 |
subsection \<open>More lemmas that are useful later\<close> |
53634 | 5104 |
|
5105 |
lemma has_integral_subset_le: |
|
56188 | 5106 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
53634 | 5107 |
assumes "s \<subseteq> t" |
5108 |
and "(f has_integral i) s" |
|
5109 |
and "(f has_integral j) t" |
|
5110 |
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
|
5111 |
shows "i \<le> j" |
53634 | 5112 |
using has_integral_subset_component_le[OF _ assms(1), of 1 f i j] |
5113 |
using assms |
|
5114 |
by auto |
|
5115 |
||
5116 |
lemma integral_subset_component_le: |
|
56188 | 5117 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'm::euclidean_space" |
53634 | 5118 |
assumes "k \<in> Basis" |
5119 |
and "s \<subseteq> t" |
|
5120 |
and "f integrable_on s" |
|
5121 |
and "f integrable_on t" |
|
5122 |
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
|
5123 |
shows "(integral s f)\<bullet>k \<le> (integral t f)\<bullet>k" |
53634 | 5124 |
apply (rule has_integral_subset_component_le) |
5125 |
using assms |
|
5126 |
apply auto |
|
5127 |
done |
|
5128 |
||
5129 |
lemma integral_subset_le: |
|
56188 | 5130 |
fixes f :: "'n::euclidean_space \<Rightarrow> real" |
53634 | 5131 |
assumes "s \<subseteq> t" |
5132 |
and "f integrable_on s" |
|
5133 |
and "f integrable_on t" |
|
5134 |
and "\<forall>x \<in> t. 0 \<le> f x" |
|
5135 |
shows "integral s f \<le> integral t f" |
|
5136 |
apply (rule has_integral_subset_le) |
|
5137 |
using assms |
|
5138 |
apply auto |
|
5139 |
done |
|
5140 |
||
5141 |
lemma has_integral_alt': |
|
56188 | 5142 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
5143 |
shows "(f has_integral i) s \<longleftrightarrow> (\<forall>a b. (\<lambda>x. if x \<in> s then f x else 0) integrable_on cbox a b) \<and> |
|
5144 |
(\<forall>e>0. \<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
|
5145 |
norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - i) < e)" |
|
53634 | 5146 |
(is "?l = ?r") |
5147 |
proof |
|
5148 |
assume ?r |
|
5149 |
show ?l |
|
5150 |
apply (subst has_integral') |
|
5151 |
apply safe |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5152 |
proof goal_cases |
61165 | 5153 |
case (1 e) |
60420 | 5154 |
from \<open>?r\<close>[THEN conjunct2,rule_format,OF this] guess B .. note B=conjunctD2[OF this] |
53634 | 5155 |
show ?case |
5156 |
apply rule |
|
5157 |
apply rule |
|
5158 |
apply (rule B) |
|
5159 |
apply safe |
|
56188 | 5160 |
apply (rule_tac x="integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0)" in exI) |
53634 | 5161 |
apply (drule B(2)[rule_format]) |
60420 | 5162 |
using integrable_integral[OF \<open>?r\<close>[THEN conjunct1,rule_format]] |
53634 | 5163 |
apply auto |
5164 |
done |
|
5165 |
qed |
|
5166 |
next |
|
35751 | 5167 |
assume ?l note as = this[unfolded has_integral'[of f],rule_format] |
5168 |
let ?f = "\<lambda>x. if x \<in> s then f x else 0" |
|
53634 | 5169 |
show ?r |
5170 |
proof safe |
|
5171 |
fix a b :: 'n |
|
35751 | 5172 |
from as[OF zero_less_one] guess B .. note B=conjunctD2[OF this,rule_format] |
53634 | 5173 |
let ?a = "\<Sum>i\<in>Basis. min (a\<bullet>i) (-B) *\<^sub>R i::'n" |
5174 |
let ?b = "\<Sum>i\<in>Basis. max (b\<bullet>i) B *\<^sub>R i::'n" |
|
56188 | 5175 |
show "?f integrable_on cbox a b" |
53634 | 5176 |
proof (rule integrable_subinterval[of _ ?a ?b]) |
56188 | 5177 |
have "ball 0 B \<subseteq> cbox ?a ?b" |
61165 | 5178 |
apply (rule subsetI) |
56188 | 5179 |
unfolding mem_ball mem_box dist_norm |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5180 |
proof (rule, goal_cases) |
61165 | 5181 |
case (1 x i) |
53634 | 5182 |
then show ?case using Basis_le_norm[of i x] |
5183 |
by (auto simp add:field_simps) |
|
5184 |
qed |
|
35751 | 5185 |
from B(2)[OF this] guess z .. note conjunct1[OF this] |
56188 | 5186 |
then show "?f integrable_on cbox ?a ?b" |
53634 | 5187 |
unfolding integrable_on_def by auto |
56188 | 5188 |
show "cbox a b \<subseteq> cbox ?a ?b" |
53634 | 5189 |
apply safe |
56188 | 5190 |
unfolding mem_box |
53634 | 5191 |
apply rule |
5192 |
apply (erule_tac x=i in ballE) |
|
5193 |
apply auto |
|
5194 |
done |
|
5195 |
qed |
|
5196 |
||
5197 |
fix e :: real |
|
5198 |
assume "e > 0" |
|
5199 |
from as[OF this] guess B .. note B=conjunctD2[OF this,rule_format] |
|
56188 | 5200 |
show "\<exists>B>0. \<forall>a b. ball 0 B \<subseteq> cbox a b \<longrightarrow> |
5201 |
norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - i) < e" |
|
53634 | 5202 |
apply rule |
5203 |
apply rule |
|
5204 |
apply (rule B) |
|
5205 |
apply safe |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5206 |
proof goal_cases |
61165 | 5207 |
case 1 |
53634 | 5208 |
from B(2)[OF this] guess z .. note z=conjunctD2[OF this] |
5209 |
from integral_unique[OF this(1)] show ?case |
|
5210 |
using z(2) by auto |
|
5211 |
qed |
|
5212 |
qed |
|
5213 |
qed |
|
35751 | 5214 |
|
35752 | 5215 |
|
60420 | 5216 |
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
|
5217 |
|
53634 | 5218 |
lemma integrable_alt: |
56188 | 5219 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53634 | 5220 |
shows "f integrable_on s \<longleftrightarrow> |
56188 | 5221 |
(\<forall>a b. (\<lambda>x. if x \<in> s then f x else 0) integrable_on cbox a b) \<and> |
5222 |
(\<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> |
|
5223 |
norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - |
|
5224 |
integral (cbox c d) (\<lambda>x. if x \<in> s then f x else 0)) < e)" |
|
53634 | 5225 |
(is "?l = ?r") |
5226 |
proof |
|
5227 |
assume ?l |
|
5228 |
then guess y unfolding integrable_on_def .. note this[unfolded has_integral_alt'[of f]] |
|
5229 |
note y=conjunctD2[OF this,rule_format] |
|
5230 |
show ?r |
|
5231 |
apply safe |
|
5232 |
apply (rule y) |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5233 |
proof goal_cases |
61165 | 5234 |
case (1 e) |
53634 | 5235 |
then have "e/2 > 0" |
5236 |
by auto |
|
5237 |
from y(2)[OF this] guess B .. note B=conjunctD2[OF this,rule_format] |
|
5238 |
show ?case |
|
5239 |
apply rule |
|
5240 |
apply rule |
|
5241 |
apply (rule B) |
|
5242 |
apply safe |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5243 |
proof goal_cases |
61167 | 5244 |
case prems: (1 a b c d) |
53634 | 5245 |
show ?case |
5246 |
apply (rule norm_triangle_half_l) |
|
61167 | 5247 |
using B(2)[OF prems(1)] B(2)[OF prems(2)] |
53634 | 5248 |
apply auto |
5249 |
done |
|
5250 |
qed |
|
5251 |
qed |
|
5252 |
next |
|
5253 |
assume ?r |
|
5254 |
note as = conjunctD2[OF this,rule_format] |
|
56188 | 5255 |
let ?cube = "\<lambda>n. cbox (\<Sum>i\<in>Basis. - real n *\<^sub>R i::'n) (\<Sum>i\<in>Basis. real n *\<^sub>R i)" |
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
|
5256 |
have "Cauchy (\<lambda>n. integral (?cube n) (\<lambda>x. if x \<in> s then f x else 0))" |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5257 |
proof (unfold Cauchy_def, safe, goal_cases) |
61165 | 5258 |
case (1 e) |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5259 |
from as(2)[OF this] guess B .. note B = conjunctD2[OF this,rule_format] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5260 |
from real_arch_simple[of B] guess N .. note N = this |
53634 | 5261 |
{ |
5262 |
fix n |
|
5263 |
assume n: "n \<ge> N" |
|
5264 |
have "ball 0 B \<subseteq> ?cube n" |
|
61165 | 5265 |
apply (rule subsetI) |
56188 | 5266 |
unfolding mem_ball mem_box dist_norm |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5267 |
proof (rule, goal_cases) |
61165 | 5268 |
case (1 x i) |
53634 | 5269 |
then show ?case |
60420 | 5270 |
using Basis_le_norm[of i x] \<open>i\<in>Basis\<close> |
53634 | 5271 |
using n N |
64267 | 5272 |
by (auto simp add: field_simps sum_negf) |
53634 | 5273 |
qed |
5274 |
} |
|
5275 |
then show ?case |
|
5276 |
apply - |
|
5277 |
apply (rule_tac x=N in exI) |
|
5278 |
apply safe |
|
5279 |
unfolding dist_norm |
|
5280 |
apply (rule B(2)) |
|
5281 |
apply auto |
|
5282 |
done |
|
5283 |
qed |
|
64287 | 5284 |
from this[unfolded convergent_eq_Cauchy[symmetric]] guess i .. |
44906 | 5285 |
note i = this[THEN LIMSEQ_D] |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5286 |
|
53634 | 5287 |
show ?l unfolding integrable_on_def has_integral_alt'[of f] |
5288 |
apply (rule_tac x=i in exI) |
|
5289 |
apply safe |
|
5290 |
apply (rule as(1)[unfolded integrable_on_def]) |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5291 |
proof goal_cases |
61165 | 5292 |
case (1 e) |
53634 | 5293 |
then have *: "e/2 > 0" by auto |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5294 |
from i[OF this] guess N .. note N =this[rule_format] |
53634 | 5295 |
from as(2)[OF *] guess B .. note B=conjunctD2[OF this,rule_format] |
5296 |
let ?B = "max (real N) B" |
|
5297 |
show ?case |
|
5298 |
apply (rule_tac x="?B" in exI) |
|
5299 |
proof safe |
|
5300 |
show "0 < ?B" |
|
5301 |
using B(1) by auto |
|
5302 |
fix a b :: 'n |
|
56188 | 5303 |
assume ab: "ball 0 ?B \<subseteq> cbox a b" |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5304 |
from real_arch_simple[of ?B] guess n .. note n=this |
56188 | 5305 |
show "norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f x else 0) - i) < e" |
53634 | 5306 |
apply (rule norm_triangle_half_l) |
5307 |
apply (rule B(2)) |
|
5308 |
defer |
|
5309 |
apply (subst norm_minus_commute) |
|
5310 |
apply (rule N[of n]) |
|
5311 |
proof safe |
|
5312 |
show "N \<le> n" |
|
5313 |
using n by auto |
|
5314 |
fix x :: 'n |
|
5315 |
assume x: "x \<in> ball 0 B" |
|
5316 |
then have "x \<in> ball 0 ?B" |
|
5317 |
by auto |
|
56188 | 5318 |
then show "x \<in> cbox a b" |
53634 | 5319 |
using ab by blast |
5320 |
show "x \<in> ?cube n" |
|
5321 |
using x |
|
56188 | 5322 |
unfolding mem_box mem_ball dist_norm |
53634 | 5323 |
apply - |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5324 |
proof (rule, goal_cases) |
61165 | 5325 |
case (1 i) |
53634 | 5326 |
then show ?case |
60420 | 5327 |
using Basis_le_norm[of i x] \<open>i \<in> Basis\<close> |
53634 | 5328 |
using n |
64267 | 5329 |
by (auto simp add: field_simps sum_negf) |
53634 | 5330 |
qed |
5331 |
qed |
|
5332 |
qed |
|
5333 |
qed |
|
5334 |
qed |
|
5335 |
||
5336 |
lemma integrable_altD: |
|
56188 | 5337 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5338 |
assumes "f integrable_on s" |
56188 | 5339 |
shows "\<And>a b. (\<lambda>x. if x \<in> s then f x else 0) integrable_on cbox a b" |
5340 |
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> |
|
5341 |
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
|
5342 |
using assms[unfolded integrable_alt[of f]] by auto |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5343 |
|
56188 | 5344 |
lemma integrable_on_subcbox: |
5345 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
|
53634 | 5346 |
assumes "f integrable_on s" |
56188 | 5347 |
and "cbox a b \<subseteq> s" |
5348 |
shows "f integrable_on cbox a b" |
|
53634 | 5349 |
apply (rule integrable_eq) |
5350 |
defer |
|
5351 |
apply (rule integrable_altD(1)[OF assms(1)]) |
|
5352 |
using assms(2) |
|
5353 |
apply auto |
|
5354 |
done |
|
5355 |
||
5356 |
||
60420 | 5357 |
subsection \<open>A straddling criterion for integrability\<close> |
53634 | 5358 |
|
5359 |
lemma integrable_straddle_interval: |
|
56188 | 5360 |
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
|
5361 |
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
|
5362 |
\<bar>i - j\<bar> < e \<and> (\<forall>x\<in>cbox a b. (g x) \<le> f x \<and> f x \<le> h x)" |
56188 | 5363 |
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
|
5364 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5365 |
have "\<exists>d. gauge d \<and> |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5366 |
(\<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
|
5367 |
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
|
5368 |
\<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
|
5369 |
if "e > 0" for e |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5370 |
proof - |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5371 |
have e: "e/3 > 0" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5372 |
using that by auto |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5373 |
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
|
5374 |
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
|
5375 |
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
|
5376 |
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
|
5377 |
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
|
5378 |
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
|
5379 |
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
|
5380 |
\<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
|
5381 |
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
|
5382 |
\<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
|
5383 |
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
|
5384 |
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
|
5385 |
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
|
5386 |
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
|
5387 |
proof - |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
5388 |
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
|
5389 |
\<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
|
5390 |
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
|
5391 |
\<Longrightarrow> \<bar>f1 - f2\<bar> < e" |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5392 |
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
|
5393 |
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
|
5394 |
"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
|
5395 |
"(\<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
|
5396 |
"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
|
5397 |
unfolding sum_subtractf[symmetric] |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5398 |
apply (auto intro!: sum_nonneg) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5399 |
apply (meson fgh measure_nonneg mult_left_mono tag_in_interval that sum_nonneg)+ |
53634 | 5400 |
done |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5401 |
show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5402 |
proof (rule *) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5403 |
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
|
5404 |
by (rule d1[OF p2 12]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5405 |
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
|
5406 |
by (rule d1[OF p1 11]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5407 |
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
|
5408 |
by (rule d2[OF p2 22]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5409 |
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
|
5410 |
by (rule d2[OF p1 21]) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5411 |
qed (use 0 in auto) |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5412 |
qed |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5413 |
then show ?thesis |
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5414 |
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
|
5415 |
(auto simp: fine_Int intro: \<open>gauge d1\<close> \<open>gauge d2\<close> d1 d2) |
53634 | 5416 |
qed |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5417 |
then show ?thesis |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5418 |
by (simp add: integrable_Cauchy) |
53634 | 5419 |
qed |
53399 | 5420 |
|
53638 | 5421 |
lemma integrable_straddle: |
56188 | 5422 |
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
|
5423 |
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
|
5424 |
\<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
|
5425 |
shows "f integrable_on s" |
53638 | 5426 |
proof - |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5427 |
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
|
5428 |
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
|
5429 |
proof (rule integrable_straddle_interval) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5430 |
fix e::real |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5431 |
assume "e > 0" |
53638 | 5432 |
then have *: "e/4 > 0" |
5433 |
by auto |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5434 |
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
|
5435 |
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
|
5436 |
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
|
5437 |
by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5438 |
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
|
5439 |
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
|
5440 |
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
|
5441 |
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
|
5442 |
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
|
5443 |
obtain Bh where |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5444 |
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
|
5445 |
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
|
5446 |
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
|
5447 |
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
|
5448 |
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
|
5449 |
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
|
5450 |
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
|
5451 |
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
|
5452 |
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
|
5453 |
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
|
5454 |
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
|
5455 |
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
|
5456 |
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
|
5457 |
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
|
5458 |
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
|
5459 |
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
|
5460 |
\<Longrightarrow> \<bar>ag - ah\<bar> < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5461 |
using ij by arith |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5462 |
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
|
5463 |
(\<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
|
5464 |
(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
|
5465 |
proof (intro exI ballI conjI) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5466 |
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
|
5467 |
(if x \<in> s then f x - g x else (0::real))" |
53638 | 5468 |
by auto |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5469 |
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
|
5470 |
"(\<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
|
5471 |
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
|
5472 |
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
|
5473 |
"(?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
|
5474 |
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
|
5475 |
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
|
5476 |
apply (rule has_integral_le) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5477 |
using fgh by force |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5478 |
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
|
5479 |
by simp |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5480 |
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
|
5481 |
\<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
|
5482 |
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
|
5483 |
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
|
5484 |
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
|
5485 |
done |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5486 |
then show "\<bar>integral (cbox a b) ?gs - integral (cbox a b) ?hs\<bar> < e" |
53638 | 5487 |
apply (rule **) |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5488 |
apply (rule Bg ballBg Bh ballBh)+ |
53638 | 5489 |
done |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5490 |
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
|
5491 |
using fgh by auto |
53638 | 5492 |
qed |
5493 |
qed |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5494 |
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
|
5495 |
by simp |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5496 |
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
|
5497 |
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
|
5498 |
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
|
5499 |
if "0 < e" for e |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5500 |
proof - |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5501 |
have *: "e/3 > 0" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5502 |
using that by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5503 |
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
|
5504 |
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
|
5505 |
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
|
5506 |
by metis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5507 |
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
|
5508 |
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
|
5509 |
obtain Bg where "Bg > 0" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5510 |
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
|
5511 |
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
|
5512 |
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
|
5513 |
obtain Bh where "Bh > 0" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5514 |
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
|
5515 |
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
|
5516 |
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
|
5517 |
{ fix a b c d :: 'n |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5518 |
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
|
5519 |
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
|
5520 |
by auto |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5521 |
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
|
5522 |
\<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
|
5523 |
\<bar>fa - fc\<bar> < e" |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5524 |
using ij by arith |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5525 |
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
|
5526 |
(\<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
|
5527 |
proof (rule *) |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5528 |
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
|
5529 |
using "**" Bg as by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5530 |
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
|
5531 |
using "**" Bg as by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5532 |
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
|
5533 |
using "**" Bh as by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5534 |
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
|
5535 |
using "**" Bh as by blast |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5536 |
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
|
5537 |
} |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5538 |
then show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5539 |
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
|
5540 |
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
|
5541 |
qed |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5542 |
then show ?thesis |
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5543 |
unfolding integrable_alt[of f] real_norm_def by (blast intro: int_f) |
53638 | 5544 |
qed |
5545 |
||
5546 |
||
60420 | 5547 |
subsection \<open>Adding integrals over several sets\<close> |
53638 | 5548 |
|
5549 |
lemma has_integral_union: |
|
56188 | 5550 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5551 |
assumes "(f has_integral i) s" |
5552 |
and "(f has_integral j) t" |
|
5553 |
and "negligible (s \<inter> t)" |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5554 |
shows "(f has_integral (i + j)) (s \<union> t)" |
53638 | 5555 |
proof - |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
5556 |
note * = has_integral_restrict_UNIV[symmetric, of f] |
53638 | 5557 |
show ?thesis |
5558 |
unfolding * |
|
5559 |
apply (rule has_integral_spike[OF assms(3)]) |
|
5560 |
defer |
|
5561 |
apply (rule has_integral_add[OF assms(1-2)[unfolded *]]) |
|
5562 |
apply auto |
|
5563 |
done |
|
5564 |
qed |
|
5565 |
||
63296 | 5566 |
lemma integrable_union: |
5567 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b :: banach" |
|
5568 |
assumes "negligible (A \<inter> B)" "f integrable_on A" "f integrable_on B" |
|
5569 |
shows "f integrable_on (A \<union> B)" |
|
5570 |
proof - |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
5571 |
from assms obtain y z where "(f has_integral y) A" "(f has_integral z) B" |
63296 | 5572 |
by (auto simp: integrable_on_def) |
5573 |
from has_integral_union[OF this assms(1)] show ?thesis by (auto simp: integrable_on_def) |
|
5574 |
qed |
|
5575 |
||
5576 |
lemma integrable_union': |
|
5577 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b :: banach" |
|
5578 |
assumes "f integrable_on A" "f integrable_on B" "negligible (A \<inter> B)" "C = A \<union> B" |
|
5579 |
shows "f integrable_on C" |
|
5580 |
using integrable_union[of A B f] assms by simp |
|
5581 |
||
53638 | 5582 |
lemma has_integral_unions: |
56188 | 5583 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5584 |
assumes "finite t" |
5585 |
and "\<forall>s\<in>t. (f has_integral (i s)) s" |
|
5586 |
and "\<forall>s\<in>t. \<forall>s'\<in>t. s \<noteq> s' \<longrightarrow> negligible (s \<inter> s')" |
|
64267 | 5587 |
shows "(f has_integral (sum i t)) (\<Union>t)" |
53638 | 5588 |
proof - |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
5589 |
note * = has_integral_restrict_UNIV[symmetric, of f] |
53638 | 5590 |
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
|
5591 |
apply (rule negligible_Union) |
53638 | 5592 |
apply (rule finite_imageI) |
5593 |
apply (rule finite_subset[of _ "t \<times> t"]) |
|
5594 |
defer |
|
5595 |
apply (rule finite_cartesian_product[OF assms(1,1)]) |
|
5596 |
using assms(3) |
|
5597 |
apply auto |
|
5598 |
done |
|
5599 |
note assms(2)[unfolded *] |
|
64267 | 5600 |
note has_integral_sum[OF assms(1) this] |
61165 | 5601 |
then show ?thesis |
5602 |
unfolding * |
|
5603 |
apply - |
|
5604 |
apply (rule has_integral_spike[OF **]) |
|
5605 |
defer |
|
5606 |
apply assumption |
|
5607 |
apply safe |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5608 |
proof goal_cases |
61167 | 5609 |
case prems: (1 x) |
53638 | 5610 |
then show ?case |
5611 |
proof (cases "x \<in> \<Union>t") |
|
5612 |
case True |
|
5613 |
then guess s unfolding Union_iff .. note s=this |
|
5614 |
then have *: "\<forall>b\<in>t. x \<in> b \<longleftrightarrow> b = s" |
|
61167 | 5615 |
using prems(3) by blast |
53638 | 5616 |
show ?thesis |
5617 |
unfolding if_P[OF True] |
|
5618 |
apply (rule trans) |
|
5619 |
defer |
|
64267 | 5620 |
apply (rule sum.cong) |
57418 | 5621 |
apply (rule refl) |
53638 | 5622 |
apply (subst *) |
5623 |
apply assumption |
|
5624 |
apply (rule refl) |
|
64267 | 5625 |
unfolding sum.delta[OF assms(1)] |
53638 | 5626 |
using s |
5627 |
apply auto |
|
5628 |
done |
|
5629 |
qed auto |
|
5630 |
qed |
|
5631 |
qed |
|
5632 |
||
5633 |
||
60420 | 5634 |
text \<open>In particular adding integrals over a division, maybe not of an interval.\<close> |
53638 | 5635 |
|
5636 |
lemma has_integral_combine_division: |
|
56188 | 5637 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5638 |
assumes "d division_of s" |
5639 |
and "\<forall>k\<in>d. (f has_integral (i k)) k" |
|
64267 | 5640 |
shows "(f has_integral (sum i d)) s" |
53638 | 5641 |
proof - |
5642 |
note d = division_ofD[OF assms(1)] |
|
5643 |
show ?thesis |
|
5644 |
unfolding d(6)[symmetric] |
|
5645 |
apply (rule has_integral_unions) |
|
5646 |
apply (rule d assms)+ |
|
5647 |
apply rule |
|
5648 |
apply rule |
|
5649 |
apply rule |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5650 |
proof goal_cases |
61167 | 5651 |
case prems: (1 s s') |
53638 | 5652 |
from d(4)[OF this(1)] d(4)[OF this(2)] guess a c b d by (elim exE) note obt=this |
61167 | 5653 |
from d(5)[OF prems] show ?case |
56188 | 5654 |
unfolding obt interior_cbox |
53638 | 5655 |
apply - |
56188 | 5656 |
apply (rule negligible_subset[of "(cbox a b-box a b) \<union> (cbox c d-box c d)"]) |
63492
a662e8139804
More advanced theorems about retracts, homotopies., etc
paulson <lp15@cam.ac.uk>
parents:
63469
diff
changeset
|
5657 |
apply (rule negligible_Un negligible_frontier_interval)+ |
53638 | 5658 |
apply auto |
5659 |
done |
|
5660 |
qed |
|
5661 |
qed |
|
5662 |
||
5663 |
lemma integral_combine_division_bottomup: |
|
56188 | 5664 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5665 |
assumes "d division_of s" |
5666 |
and "\<forall>k\<in>d. f integrable_on k" |
|
64267 | 5667 |
shows "integral s f = sum (\<lambda>i. integral i f) d" |
53638 | 5668 |
apply (rule integral_unique) |
5669 |
apply (rule has_integral_combine_division[OF assms(1)]) |
|
5670 |
using assms(2) |
|
5671 |
unfolding has_integral_integral |
|
5672 |
apply assumption |
|
5673 |
done |
|
5674 |
||
5675 |
lemma has_integral_combine_division_topdown: |
|
56188 | 5676 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5677 |
assumes "f integrable_on s" |
5678 |
and "d division_of k" |
|
5679 |
and "k \<subseteq> s" |
|
64267 | 5680 |
shows "(f has_integral (sum (\<lambda>i. integral i f) d)) k" |
53638 | 5681 |
apply (rule has_integral_combine_division[OF assms(2)]) |
5682 |
apply safe |
|
5683 |
unfolding has_integral_integral[symmetric] |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5684 |
proof goal_cases |
61165 | 5685 |
case (1 k) |
53638 | 5686 |
from division_ofD(2,4)[OF assms(2) this] |
5687 |
show ?case |
|
5688 |
apply safe |
|
56188 | 5689 |
apply (rule integrable_on_subcbox) |
53638 | 5690 |
apply (rule assms) |
5691 |
using assms(3) |
|
5692 |
apply auto |
|
5693 |
done |
|
5694 |
qed |
|
5695 |
||
5696 |
lemma integral_combine_division_topdown: |
|
56188 | 5697 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5698 |
assumes "f integrable_on s" |
5699 |
and "d division_of s" |
|
64267 | 5700 |
shows "integral s f = sum (\<lambda>i. integral i f) d" |
53638 | 5701 |
apply (rule integral_unique) |
5702 |
apply (rule has_integral_combine_division_topdown) |
|
5703 |
using assms |
|
5704 |
apply auto |
|
5705 |
done |
|
5706 |
||
5707 |
lemma integrable_combine_division: |
|
56188 | 5708 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5709 |
assumes "d division_of s" |
5710 |
and "\<forall>i\<in>d. f integrable_on i" |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5711 |
shows "f integrable_on s" |
53638 | 5712 |
using assms(2) |
5713 |
unfolding integrable_on_def |
|
5714 |
by (metis has_integral_combine_division[OF assms(1)]) |
|
5715 |
||
5716 |
lemma integrable_on_subdivision: |
|
56188 | 5717 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5718 |
assumes "d division_of i" |
5719 |
and "f integrable_on s" |
|
5720 |
and "i \<subseteq> s" |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5721 |
shows "f integrable_on i" |
53638 | 5722 |
apply (rule integrable_combine_division assms)+ |
61165 | 5723 |
apply safe |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5724 |
proof goal_cases |
61165 | 5725 |
case 1 |
53638 | 5726 |
note division_ofD(2,4)[OF assms(1) this] |
5727 |
then show ?case |
|
5728 |
apply safe |
|
56188 | 5729 |
apply (rule integrable_on_subcbox[OF assms(2)]) |
53638 | 5730 |
using assms(3) |
5731 |
apply auto |
|
5732 |
done |
|
5733 |
qed |
|
5734 |
||
5735 |
||
60420 | 5736 |
subsection \<open>Also tagged divisions\<close> |
53638 | 5737 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5738 |
lemma has_integral_iff: "(f has_integral i) s \<longleftrightarrow> (f integrable_on s \<and> integral s f = i)" |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5739 |
by blast |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5740 |
|
53638 | 5741 |
lemma has_integral_combine_tagged_division: |
56188 | 5742 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 5743 |
assumes "p tagged_division_of s" |
5744 |
and "\<forall>(x,k) \<in> p. (f has_integral (i k)) k" |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5745 |
shows "(f has_integral (\<Sum>(x,k)\<in>p. i k)) s" |
53638 | 5746 |
proof - |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5747 |
have *: "(f has_integral (\<Sum>k\<in>snd`p. integral k f)) s" |
53638 | 5748 |
using assms(2) |
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5749 |
apply (intro has_integral_combine_division) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5750 |
apply (auto simp: has_integral_integral[symmetric] intro: division_of_tagged_division[OF assms(1)]) |
53638 | 5751 |
apply auto |
5752 |
done |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5753 |
also have "(\<Sum>k\<in>snd`p. integral k f) = (\<Sum>(x, k)\<in>p. integral k f)" |
64267 | 5754 |
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
|
5755 |
(simp add: content_eq_0_interior) |
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
5756 |
finally show ?thesis |
64267 | 5757 |
using assms by (auto simp add: has_integral_iff intro!: sum.cong) |
53638 | 5758 |
qed |
5759 |
||
5760 |
lemma integral_combine_tagged_division_bottomup: |
|
56188 | 5761 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
5762 |
assumes "p tagged_division_of (cbox a b)" |
|
53638 | 5763 |
and "\<forall>(x,k)\<in>p. f integrable_on k" |
64267 | 5764 |
shows "integral (cbox a b) f = sum (\<lambda>(x,k). integral k f) p" |
53638 | 5765 |
apply (rule integral_unique) |
5766 |
apply (rule has_integral_combine_tagged_division[OF assms(1)]) |
|
5767 |
using assms(2) |
|
5768 |
apply auto |
|
5769 |
done |
|
5770 |
||
5771 |
lemma has_integral_combine_tagged_division_topdown: |
|
56188 | 5772 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
5773 |
assumes "f integrable_on cbox a b" |
|
5774 |
and "p tagged_division_of (cbox a b)" |
|
64267 | 5775 |
shows "(f has_integral (sum (\<lambda>(x,k). integral k f) p)) (cbox a b)" |
53638 | 5776 |
apply (rule has_integral_combine_tagged_division[OF assms(2)]) |
61165 | 5777 |
apply safe |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5778 |
proof goal_cases |
61165 | 5779 |
case 1 |
53638 | 5780 |
note tagged_division_ofD(3-4)[OF assms(2) this] |
5781 |
then show ?case |
|
54775
2d3df8633dad
prefer box over greaterThanLessThan on euclidean_space
immler
parents:
54411
diff
changeset
|
5782 |
using integrable_subinterval[OF assms(1)] by blast |
53638 | 5783 |
qed |
5784 |
||
5785 |
lemma integral_combine_tagged_division_topdown: |
|
56188 | 5786 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
5787 |
assumes "f integrable_on cbox a b" |
|
5788 |
and "p tagged_division_of (cbox a b)" |
|
64267 | 5789 |
shows "integral (cbox a b) f = sum (\<lambda>(x,k). integral k f) p" |
53638 | 5790 |
apply (rule integral_unique) |
5791 |
apply (rule has_integral_combine_tagged_division_topdown) |
|
5792 |
using assms |
|
5793 |
apply auto |
|
5794 |
done |
|
5795 |
||
5796 |
||
60420 | 5797 |
subsection \<open>Henstock's lemma\<close> |
53638 | 5798 |
|
5799 |
lemma henstock_lemma_part1: |
|
56188 | 5800 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
5801 |
assumes "f integrable_on cbox a b" |
|
53638 | 5802 |
and "e > 0" |
5803 |
and "gauge d" |
|
56188 | 5804 |
and "(\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
64267 | 5805 |
norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p - integral(cbox a b) f) < e)" |
56188 | 5806 |
and p: "p tagged_partial_division_of (cbox a b)" "d fine p" |
64267 | 5807 |
shows "norm (sum (\<lambda>(x,k). content k *\<^sub>R f x - integral k f) p) \<le> e" |
53638 | 5808 |
(is "?x \<le> e") |
5809 |
proof - |
|
5810 |
{ presume "\<And>k. 0<k \<Longrightarrow> ?x \<le> e + k" then show ?thesis by (blast intro: field_le_epsilon) } |
|
5811 |
fix k :: real |
|
5812 |
assume k: "k > 0" |
|
5813 |
note p' = tagged_partial_division_ofD[OF p(1)] |
|
56188 | 5814 |
have "\<Union>(snd ` p) \<subseteq> cbox a b" |
53638 | 5815 |
using p'(3) by fastforce |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5816 |
note partial_division_of_tagged_division[OF p(1)] this |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5817 |
from partial_division_extend_interval[OF this] guess q . note q=this and q' = division_ofD[OF this(2)] |
63040 | 5818 |
define r where "r = q - snd ` p" |
53638 | 5819 |
have "snd ` p \<inter> r = {}" |
5820 |
unfolding r_def by auto |
|
5821 |
have r: "finite r" |
|
5822 |
using q' unfolding r_def by auto |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5823 |
|
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5824 |
have "\<forall>i\<in>r. \<exists>p. p tagged_division_of i \<and> d fine p \<and> |
64267 | 5825 |
norm (sum (\<lambda>(x,j). content j *\<^sub>R f x) p - integral i f) < k / (real (card r) + 1)" |
61165 | 5826 |
apply safe |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5827 |
proof goal_cases |
61165 | 5828 |
case (1 i) |
53638 | 5829 |
then have i: "i \<in> q" |
5830 |
unfolding r_def by auto |
|
5831 |
from q'(4)[OF this] guess u v by (elim exE) note uv=this |
|
56541 | 5832 |
have *: "k / (real (card r) + 1) > 0" using k by simp |
56188 | 5833 |
have "f integrable_on cbox u v" |
53638 | 5834 |
apply (rule integrable_subinterval[OF assms(1)]) |
5835 |
using q'(2)[OF i] |
|
5836 |
unfolding uv |
|
5837 |
apply auto |
|
5838 |
done |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5839 |
note integrable_integral[OF this, unfolded has_integral[of f]] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5840 |
from this[rule_format,OF *] guess dd .. note dd=conjunctD2[OF this,rule_format] |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
5841 |
note gauge_Int[OF \<open>gauge d\<close> dd(1)] |
53638 | 5842 |
from fine_division_exists[OF this,of u v] guess qq . |
5843 |
then show ?case |
|
5844 |
apply (rule_tac x=qq in exI) |
|
5845 |
using dd(2)[of qq] |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5846 |
unfolding fine_Int uv |
53638 | 5847 |
apply auto |
5848 |
done |
|
5849 |
qed |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5850 |
from bchoice[OF this] guess qq .. note qq=this[rule_format] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5851 |
|
53638 | 5852 |
let ?p = "p \<union> \<Union>(qq ` r)" |
56188 | 5853 |
have "norm ((\<Sum>(x, k)\<in>?p. content k *\<^sub>R f x) - integral (cbox a b) f) < e" |
53638 | 5854 |
apply (rule assms(4)[rule_format]) |
5855 |
proof |
|
5856 |
show "d fine ?p" |
|
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5857 |
apply (rule fine_Un) |
53638 | 5858 |
apply (rule p) |
66192
e5b84854baa4
A few renamings and several tidied-up proofs
paulson <lp15@cam.ac.uk>
parents:
66164
diff
changeset
|
5859 |
apply (rule fine_Union) |
53638 | 5860 |
using qq |
5861 |
apply auto |
|
5862 |
done |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5863 |
note * = 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
|
5864 |
have "p \<union> \<Union>(qq ` r) tagged_division_of \<Union>(snd ` p) \<union> \<Union>r" |
61165 | 5865 |
using r |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5866 |
proof (rule tagged_division_union[OF * tagged_division_unions], goal_cases) |
61165 | 5867 |
case 1 |
53638 | 5868 |
then show ?case |
5869 |
using qq by auto |
|
5870 |
next |
|
61165 | 5871 |
case 2 |
53638 | 5872 |
then show ?case |
5873 |
apply rule |
|
5874 |
apply rule |
|
5875 |
apply rule |
|
5876 |
apply(rule q'(5)) |
|
5877 |
unfolding r_def |
|
5878 |
apply auto |
|
5879 |
done |
|
5880 |
next |
|
61165 | 5881 |
case 3 |
53638 | 5882 |
then show ?case |
66299
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5883 |
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
|
5884 |
show "open (interior (UNION p snd))" |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5885 |
by blast |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5886 |
show "\<And>T. T \<in> r \<Longrightarrow> \<exists>a b. T = cbox a b" |
53638 | 5887 |
apply (rule q') |
66299
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5888 |
using r_def by blast |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5889 |
have "finite (snd ` p)" |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5890 |
by (simp add: p'(1)) |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5891 |
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
|
5892 |
apply (subst Int_commute) |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5893 |
apply (rule Int_interior_Union_intervals) |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5894 |
using \<open>r \<equiv> q - snd ` p\<close> q'(5) q(1) apply auto |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5895 |
by (simp add: p'(4)) |
1b4aa3e3e4e6
partial cleanup of the horrible Tagged_Division
paulson <lp15@cam.ac.uk>
parents:
66296
diff
changeset
|
5896 |
qed |
53638 | 5897 |
qed |
56188 | 5898 |
moreover have "\<Union>(snd ` p) \<union> \<Union>r = cbox a b" and "{qq i |i. i \<in> r} = qq ` r" |
53638 | 5899 |
unfolding Union_Un_distrib[symmetric] r_def |
5900 |
using q |
|
5901 |
by auto |
|
56188 | 5902 |
ultimately show "?p tagged_division_of (cbox a b)" |
53638 | 5903 |
by fastforce |
5904 |
qed |
|
5905 |
||
5906 |
then have "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) + (\<Sum>(x, k)\<in>\<Union>(qq ` r). content k *\<^sub>R f x) - |
|
56188 | 5907 |
integral (cbox a b) f) < e" |
64267 | 5908 |
apply (subst sum.union_inter_neutral[symmetric]) |
53638 | 5909 |
apply (rule p') |
5910 |
prefer 3 |
|
5911 |
apply assumption |
|
5912 |
apply rule |
|
5913 |
apply (rule r) |
|
5914 |
apply safe |
|
5915 |
apply (drule qq) |
|
5916 |
proof - |
|
5917 |
fix x l k |
|
5918 |
assume as: "(x, l) \<in> p" "(x, l) \<in> qq k" "k \<in> r" |
|
5919 |
note qq[OF this(3)] |
|
5920 |
note tagged_division_ofD(3,4)[OF conjunct1[OF this] as(2)] |
|
5921 |
from this(2) guess u v by (elim exE) note uv=this |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5922 |
have "l\<in>snd ` p" unfolding image_iff apply(rule_tac x="(x,l)" in bexI) using as by auto |
53638 | 5923 |
then have "l \<in> q" "k \<in> q" "l \<noteq> k" |
5924 |
using as(1,3) q(1) unfolding r_def by auto |
|
5925 |
note q'(5)[OF this] |
|
5926 |
then have "interior l = {}" |
|
60420 | 5927 |
using interior_mono[OF \<open>l \<subseteq> k\<close>] by blast |
53638 | 5928 |
then show "content l *\<^sub>R f x = 0" |
5929 |
unfolding uv content_eq_0_interior[symmetric] by auto |
|
5930 |
qed auto |
|
5931 |
||
64267 | 5932 |
then have "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) + sum (sum (\<lambda>(x, k). content k *\<^sub>R f x)) |
56188 | 5933 |
(qq ` r) - integral (cbox a b) f) < e" |
64267 | 5934 |
apply (subst (asm) sum.Union_comp) |
57418 | 5935 |
prefer 2 |
53638 | 5936 |
unfolding split_paired_all split_conv image_iff |
5937 |
apply (erule bexE)+ |
|
5938 |
proof - |
|
5939 |
fix x m k l T1 T2 |
|
5940 |
assume "(x, m) \<in> T1" "(x, m) \<in> T2" "T1 \<noteq> T2" "k \<in> r" "l \<in> r" "T1 = qq k" "T2 = qq l" |
|
5941 |
note as = this(1-5)[unfolded this(6-)] |
|
5942 |
note kl = tagged_division_ofD(3,4)[OF qq[THEN conjunct1]] |
|
5943 |
from this(2)[OF as(4,1)] guess u v by (elim exE) note uv=this |
|
5944 |
have *: "interior (k \<inter> l) = {}" |
|
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
|
5945 |
by (metis DiffE \<open>T1 = qq k\<close> \<open>T1 \<noteq> T2\<close> \<open>T2 = qq l\<close> as(4) as(5) interior_Int q'(5) r_def) |
53638 | 5946 |
have "interior m = {}" |
5947 |
unfolding subset_empty[symmetric] |
|
5948 |
unfolding *[symmetric] |
|
5949 |
apply (rule interior_mono) |
|
5950 |
using kl(1)[OF as(4,1)] kl(1)[OF as(5,2)] |
|
5951 |
apply auto |
|
5952 |
done |
|
5953 |
then show "content m *\<^sub>R f x = 0" |
|
5954 |
unfolding uv content_eq_0_interior[symmetric] |
|
5955 |
by auto |
|
5956 |
qed (insert qq, auto) |
|
5957 |
||
64267 | 5958 |
then have **: "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) + sum (sum (\<lambda>(x, k). content k *\<^sub>R f x) \<circ> qq) r - |
56188 | 5959 |
integral (cbox a b) f) < e" |
64267 | 5960 |
apply (subst (asm) sum.reindex_nontrivial) |
53638 | 5961 |
apply fact |
64267 | 5962 |
apply (rule sum.neutral) |
53638 | 5963 |
apply rule |
5964 |
unfolding split_paired_all split_conv |
|
5965 |
defer |
|
5966 |
apply assumption |
|
5967 |
proof - |
|
5968 |
fix k l x m |
|
5969 |
assume as: "k \<in> r" "l \<in> r" "k \<noteq> l" "qq k = qq l" "(x, m) \<in> qq k" |
|
5970 |
note tagged_division_ofD(6)[OF qq[THEN conjunct1]] |
|
5971 |
from this[OF as(1)] this[OF as(2)] show "content m *\<^sub>R f x = 0" |
|
5972 |
using as(3) unfolding as by auto |
|
5973 |
qed |
|
5974 |
||
61165 | 5975 |
have *: "norm (cp - ip) \<le> e + k" |
5976 |
if "norm ((cp + cr) - i) < e" |
|
5977 |
and "norm (cr - ir) < k" |
|
5978 |
and "ip + ir = i" |
|
5979 |
for ir ip i cr cp |
|
53638 | 5980 |
proof - |
61165 | 5981 |
from that show ?thesis |
53638 | 5982 |
using norm_triangle_le[of "cp + cr - i" "- (cr - ir)"] |
61165 | 5983 |
unfolding that(3)[symmetric] norm_minus_cancel |
53638 | 5984 |
by (auto simp add: algebra_simps) |
5985 |
qed |
|
53399 | 5986 |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
5987 |
have "?x = norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - (\<Sum>(x, k)\<in>p. integral k f))" |
64267 | 5988 |
unfolding split_def sum_subtractf .. |
53638 | 5989 |
also have "\<dots> \<le> e + k" |
64267 | 5990 |
apply (rule *[OF **, where ir1="sum (\<lambda>k. integral k f) r"]) |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
5991 |
proof goal_cases |
61167 | 5992 |
case 1 |
5993 |
have *: "k * real (card r) / (1 + real (card r)) < k" |
|
5994 |
using k by (auto simp add: field_simps) |
|
5995 |
show ?case |
|
64267 | 5996 |
apply (rule le_less_trans[of _ "sum (\<lambda>x. k / (real (card r) + 1)) r"]) |
5997 |
unfolding sum_subtractf[symmetric] |
|
5998 |
apply (rule sum_norm_le) |
|
61167 | 5999 |
apply (drule qq) |
6000 |
defer |
|
64267 | 6001 |
unfolding divide_inverse sum_distrib_right[symmetric] |
61167 | 6002 |
unfolding divide_inverse[symmetric] |
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
|
6003 |
using * apply (auto simp add: field_simps) |
61167 | 6004 |
done |
6005 |
next |
|
61165 | 6006 |
case 2 |
53638 | 6007 |
have *: "(\<Sum>(x, k)\<in>p. integral k f) = (\<Sum>k\<in>snd ` p. integral k f)" |
64267 | 6008 |
apply (subst sum.reindex_nontrivial) |
53638 | 6009 |
apply fact |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6010 |
unfolding split_paired_all snd_conv split_def o_def |
53638 | 6011 |
proof - |
6012 |
fix x l y m |
|
6013 |
assume as: "(x, l) \<in> p" "(y, m) \<in> p" "(x, l) \<noteq> (y, m)" "l = m" |
|
6014 |
from p'(4)[OF as(1)] guess u v by (elim exE) note uv=this |
|
6015 |
show "integral l f = 0" |
|
6016 |
unfolding uv |
|
6017 |
apply (rule integral_unique) |
|
6018 |
apply (rule has_integral_null) |
|
6019 |
unfolding content_eq_0_interior |
|
6020 |
using p'(5)[OF as(1-3)] |
|
6021 |
unfolding uv as(4)[symmetric] |
|
6022 |
apply auto |
|
6023 |
done |
|
53399 | 6024 |
qed auto |
57418 | 6025 |
from q(1) have **: "snd ` p \<union> q = q" by auto |
53638 | 6026 |
show ?case |
6027 |
unfolding integral_combine_division_topdown[OF assms(1) q(2)] * r_def |
|
64267 | 6028 |
using ** q'(1) p'(1) sum.union_disjoint [of "snd ` p" "q - snd ` p" "\<lambda>k. integral k f", symmetric] |
57418 | 6029 |
by simp |
53638 | 6030 |
qed |
6031 |
finally show "?x \<le> e + k" . |
|
6032 |
qed |
|
6033 |
||
6034 |
lemma henstock_lemma_part2: |
|
56188 | 6035 |
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space" |
6036 |
assumes "f integrable_on cbox a b" |
|
53638 | 6037 |
and "e > 0" |
6038 |
and "gauge d" |
|
56188 | 6039 |
and "\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
64267 | 6040 |
norm (sum (\<lambda>(x,k). content k *\<^sub>R f x) p - integral (cbox a b) f) < e" |
56188 | 6041 |
and "p tagged_partial_division_of (cbox a b)" |
53638 | 6042 |
and "d fine p" |
64267 | 6043 |
shows "sum (\<lambda>(x,k). norm (content k *\<^sub>R f x - integral k f)) p \<le> 2 * real (DIM('n)) * e" |
53638 | 6044 |
unfolding split_def |
64267 | 6045 |
apply (rule sum_norm_allsubsets_bound) |
53638 | 6046 |
defer |
6047 |
apply (rule henstock_lemma_part1[unfolded split_def,OF assms(1-3)]) |
|
6048 |
apply safe |
|
6049 |
apply (rule assms[rule_format,unfolded split_def]) |
|
6050 |
defer |
|
6051 |
apply (rule tagged_partial_division_subset) |
|
6052 |
apply (rule assms) |
|
6053 |
apply assumption |
|
6054 |
apply (rule fine_subset) |
|
6055 |
apply assumption |
|
6056 |
apply (rule assms) |
|
6057 |
using assms(5) |
|
6058 |
apply auto |
|
6059 |
done |
|
6060 |
||
6061 |
lemma henstock_lemma: |
|
56188 | 6062 |
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space" |
6063 |
assumes "f integrable_on cbox a b" |
|
53638 | 6064 |
and "e > 0" |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6065 |
obtains d where "gauge d" |
56188 | 6066 |
and "\<forall>p. p tagged_partial_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
64267 | 6067 |
sum (\<lambda>(x,k). norm(content k *\<^sub>R f x - integral k f)) p < e" |
53638 | 6068 |
proof - |
56541 | 6069 |
have *: "e / (2 * (real DIM('n) + 1)) > 0" using assms(2) by simp |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6070 |
from integrable_integral[OF assms(1),unfolded has_integral[of f],rule_format,OF this] |
53638 | 6071 |
guess d .. note d = conjunctD2[OF this] |
6072 |
show thesis |
|
6073 |
apply (rule that) |
|
6074 |
apply (rule d) |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6075 |
proof (safe, goal_cases) |
61165 | 6076 |
case (1 p) |
53638 | 6077 |
note * = henstock_lemma_part2[OF assms(1) * d this] |
6078 |
show ?case |
|
6079 |
apply (rule le_less_trans[OF *]) |
|
60420 | 6080 |
using \<open>e > 0\<close> |
53638 | 6081 |
apply (auto simp add: field_simps) |
6082 |
done |
|
6083 |
qed |
|
6084 |
qed |
|
6085 |
||
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6086 |
|
60420 | 6087 |
subsection \<open>Monotone convergence (bounded interval first)\<close> |
53638 | 6088 |
|
6089 |
lemma monotone_convergence_interval: |
|
56188 | 6090 |
fixes f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" |
6091 |
assumes "\<forall>k. (f k) integrable_on cbox a b" |
|
6092 |
and "\<forall>k. \<forall>x\<in>cbox a b.(f k x) \<le> f (Suc k) x" |
|
61973 | 6093 |
and "\<forall>x\<in>cbox a b. ((\<lambda>k. f k x) \<longlongrightarrow> g x) sequentially" |
56188 | 6094 |
and "bounded {integral (cbox a b) (f k) | k . k \<in> UNIV}" |
61973 | 6095 |
shows "g integrable_on cbox a b \<and> ((\<lambda>k. integral (cbox a b) (f k)) \<longlongrightarrow> integral (cbox a b) g) sequentially" |
56188 | 6096 |
proof (cases "content (cbox a b) = 0") |
53638 | 6097 |
case True |
6098 |
show ?thesis |
|
6099 |
using integrable_on_null[OF True] |
|
6100 |
unfolding integral_null[OF True] |
|
6101 |
using tendsto_const |
|
6102 |
by auto |
|
6103 |
next |
|
6104 |
case False |
|
61165 | 6105 |
have fg: "\<forall>x\<in>cbox a b. \<forall>k. (f k x) \<bullet> 1 \<le> (g x) \<bullet> 1" |
53638 | 6106 |
proof safe |
61165 | 6107 |
fix x k |
6108 |
assume x: "x \<in> cbox a b" |
|
6109 |
note * = Lim_component_ge[OF assms(3)[rule_format, OF x] trivial_limit_sequentially] |
|
6110 |
show "f k x \<bullet> 1 \<le> g x \<bullet> 1" |
|
53638 | 6111 |
apply (rule *) |
6112 |
unfolding eventually_sequentially |
|
6113 |
apply (rule_tac x=k in exI) |
|
66193 | 6114 |
apply clarify |
53638 | 6115 |
apply (rule transitive_stepwise_le) |
61165 | 6116 |
using assms(2)[rule_format, OF x] |
53638 | 6117 |
apply auto |
6118 |
done |
|
6119 |
qed |
|
61973 | 6120 |
have "\<exists>i. ((\<lambda>k. integral (cbox a b) (f k)) \<longlongrightarrow> i) sequentially" |
53638 | 6121 |
apply (rule bounded_increasing_convergent) |
6122 |
defer |
|
6123 |
apply rule |
|
6124 |
apply (rule integral_le) |
|
6125 |
apply safe |
|
6126 |
apply (rule assms(1-2)[rule_format])+ |
|
6127 |
using assms(4) |
|
6128 |
apply auto |
|
6129 |
done |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6130 |
then guess i .. note i=this |
56188 | 6131 |
have i': "\<And>k. (integral(cbox a b) (f k)) \<le> i\<bullet>1" |
53638 | 6132 |
apply (rule Lim_component_ge) |
6133 |
apply (rule i) |
|
6134 |
apply (rule trivial_limit_sequentially) |
|
6135 |
unfolding eventually_sequentially |
|
6136 |
apply (rule_tac x=k in exI) |
|
66193 | 6137 |
apply clarify |
6138 |
apply (erule transitive_stepwise_le) |
|
53638 | 6139 |
prefer 3 |
6140 |
unfolding inner_simps real_inner_1_right |
|
6141 |
apply (rule integral_le) |
|
6142 |
apply (rule assms(1-2)[rule_format])+ |
|
6143 |
using assms(2) |
|
6144 |
apply auto |
|
6145 |
done |
|
6146 |
||
56188 | 6147 |
have "(g has_integral i) (cbox a b)" |
53638 | 6148 |
unfolding has_integral |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6149 |
proof (safe, goal_cases) |
61165 | 6150 |
case e: (1 e) |
56188 | 6151 |
then have "\<forall>k. (\<exists>d. gauge d \<and> (\<forall>p. p tagged_division_of (cbox a b) \<and> d fine p \<longrightarrow> |
6152 |
norm ((\<Sum>(x, ka)\<in>p. content ka *\<^sub>R f k x) - integral (cbox a b) (f k)) < e / 2 ^ (k + 2)))" |
|
53638 | 6153 |
apply - |
6154 |
apply rule |
|
6155 |
apply (rule assms(1)[unfolded has_integral_integral has_integral,rule_format]) |
|
6156 |
apply auto |
|
6157 |
done |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6158 |
from choice[OF this] guess c .. note c=conjunctD2[OF this[rule_format],rule_format] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6159 |
|
56188 | 6160 |
have "\<exists>r. \<forall>k\<ge>r. 0 \<le> i\<bullet>1 - (integral (cbox a b) (f k)) \<and> i\<bullet>1 - (integral (cbox a b) (f k)) < e / 4" |
53638 | 6161 |
proof - |
6162 |
have "e/4 > 0" |
|
6163 |
using e by auto |
|
44906 | 6164 |
from LIMSEQ_D [OF i this] guess r .. |
61165 | 6165 |
then show ?thesis |
53638 | 6166 |
apply (rule_tac x=r in exI) |
6167 |
apply rule |
|
6168 |
apply (erule_tac x=k in allE) |
|
61165 | 6169 |
subgoal for k using i'[of k] by auto |
6170 |
done |
|
53638 | 6171 |
qed |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6172 |
then guess r .. note r=conjunctD2[OF this[rule_format]] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6173 |
|
56188 | 6174 |
have "\<forall>x\<in>cbox a b. \<exists>n\<ge>r. \<forall>k\<ge>n. 0 \<le> (g x)\<bullet>1 - (f k x)\<bullet>1 \<and> |
6175 |
(g x)\<bullet>1 - (f k x)\<bullet>1 < e / (4 * content(cbox a b))" |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6176 |
proof (rule, goal_cases) |
61167 | 6177 |
case prems: (1 x) |
56188 | 6178 |
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
|
6179 |
by (simp add: False content_lt_nz e) |
61167 | 6180 |
from assms(3)[rule_format, OF prems, THEN LIMSEQ_D, OF this] |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6181 |
guess n .. note n=this |
53638 | 6182 |
then show ?case |
6183 |
apply (rule_tac x="n + r" in exI) |
|
6184 |
apply safe |
|
6185 |
apply (erule_tac[2-3] x=k in allE) |
|
6186 |
unfolding dist_real_def |
|
61167 | 6187 |
using fg[rule_format, OF prems] |
53638 | 6188 |
apply (auto simp add: field_simps) |
6189 |
done |
|
6190 |
qed |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6191 |
from bchoice[OF this] guess m .. note m=conjunctD2[OF this[rule_format],rule_format] |
63040 | 6192 |
define d where "d x = c (m x) x" for x |
53638 | 6193 |
show ?case |
6194 |
apply (rule_tac x=d in exI) |
|
6195 |
proof safe |
|
6196 |
show "gauge d" |
|
6197 |
using c(1) unfolding gauge_def d_def by auto |
|
6198 |
next |
|
6199 |
fix p |
|
56188 | 6200 |
assume p: "p tagged_division_of (cbox a b)" "d fine p" |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6201 |
note p'=tagged_division_ofD[OF p(1)] |
41851 | 6202 |
have "\<exists>a. \<forall>x\<in>p. m (fst x) \<le> a" |
6203 |
by (metis finite_imageI finite_nat_set_iff_bounded_le p'(1) rev_image_eqI) |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6204 |
then guess s .. note s=this |
53638 | 6205 |
have *: "\<forall>a b c d. norm(a - b) \<le> e / 4 \<and> norm(b - c) < e / 2 \<and> |
6206 |
norm (c - d) < e / 4 \<longrightarrow> norm (a - d) < e" |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6207 |
proof (safe, goal_cases) |
61165 | 6208 |
case (1 a b c d) |
53638 | 6209 |
then show ?case |
6210 |
using norm_triangle_lt[of "a - b" "b - c" "3* e/4"] |
|
6211 |
norm_triangle_lt[of "a - b + (b - c)" "c - d" e] |
|
6212 |
unfolding norm_minus_cancel |
|
6213 |
by (auto simp add: algebra_simps) |
|
6214 |
qed |
|
6215 |
show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R g x) - i) < e" |
|
6216 |
apply (rule *[rule_format,where |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6217 |
b="\<Sum>(x, k)\<in>p. content k *\<^sub>R f (m x) x" and c="\<Sum>(x, k)\<in>p. integral k (f (m x))"]) |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6218 |
proof (safe, goal_cases) |
61165 | 6219 |
case 1 |
53638 | 6220 |
show ?case |
56188 | 6221 |
apply (rule order_trans[of _ "\<Sum>(x, k)\<in>p. content k * (e / (4 * content (cbox a b)))"]) |
64267 | 6222 |
unfolding sum_subtractf[symmetric] |
53638 | 6223 |
apply (rule order_trans) |
64267 | 6224 |
apply (rule norm_sum) |
6225 |
apply (rule sum_mono) |
|
53638 | 6226 |
unfolding split_paired_all split_conv |
64267 | 6227 |
unfolding split_def sum_distrib_right[symmetric] scaleR_diff_right[symmetric] |
53638 | 6228 |
unfolding additive_content_tagged_division[OF p(1), unfolded split_def] |
6229 |
proof - |
|
6230 |
fix x k |
|
6231 |
assume xk: "(x, k) \<in> p" |
|
56188 | 6232 |
then have x: "x \<in> cbox a b" |
53638 | 6233 |
using p'(2-3)[OF xk] by auto |
6234 |
from p'(4)[OF xk] guess u v by (elim exE) note uv=this |
|
56188 | 6235 |
show "norm (content k *\<^sub>R (g x - f (m x) x)) \<le> content k * (e / (4 * content (cbox a b)))" |
53638 | 6236 |
unfolding norm_scaleR uv |
6237 |
unfolding abs_of_nonneg[OF content_pos_le] |
|
6238 |
apply (rule mult_left_mono) |
|
6239 |
using m(2)[OF x,of "m x"] |
|
6240 |
apply auto |
|
6241 |
done |
|
6242 |
qed (insert False, auto) |
|
6243 |
||
6244 |
next |
|
61165 | 6245 |
case 2 |
53638 | 6246 |
show ?case |
6247 |
apply (rule le_less_trans[of _ "norm (\<Sum>j = 0..s. |
|
6248 |
\<Sum>(x, k)\<in>{xk\<in>p. m (fst xk) = j}. content k *\<^sub>R f (m x) x - integral k (f (m x)))"]) |
|
64267 | 6249 |
apply (subst sum_group) |
53638 | 6250 |
apply fact |
6251 |
apply (rule finite_atLeastAtMost) |
|
6252 |
defer |
|
6253 |
apply (subst split_def)+ |
|
64267 | 6254 |
unfolding sum_subtractf |
53638 | 6255 |
apply rule |
6256 |
proof - |
|
6257 |
show "norm (\<Sum>j = 0..s. \<Sum>(x, k)\<in>{xk \<in> p. |
|
6258 |
m (fst xk) = j}. content k *\<^sub>R f (m x) x - integral k (f (m x))) < e / 2" |
|
64267 | 6259 |
apply (rule le_less_trans[of _ "sum (\<lambda>i. e / 2^(i+2)) {0..s}"]) |
6260 |
apply (rule sum_norm_le) |
|
64773
223b2ebdda79
Many new theorems, and more tidying
paulson <lp15@cam.ac.uk>
parents:
64287
diff
changeset
|
6261 |
proof - |
53638 | 6262 |
show "(\<Sum>i = 0..s. e / 2 ^ (i + 2)) < e / 2" |
6263 |
unfolding power_add divide_inverse inverse_mult_distrib |
|
64267 | 6264 |
unfolding sum_distrib_left[symmetric] sum_distrib_right[symmetric] |
60867 | 6265 |
unfolding power_inverse [symmetric] sum_gp |
53638 | 6266 |
apply(rule mult_strict_left_mono[OF _ e]) |
6267 |
unfolding power2_eq_square |
|
6268 |
apply auto |
|
6269 |
done |
|
6270 |
fix t |
|
6271 |
assume "t \<in> {0..s}" |
|
6272 |
show "norm (\<Sum>(x, k)\<in>{xk \<in> p. m (fst xk) = t}. content k *\<^sub>R f (m x) x - |
|
6273 |
integral k (f (m x))) \<le> e / 2 ^ (t + 2)" |
|
6274 |
apply (rule order_trans |
|
64267 | 6275 |
[of _ "norm (sum (\<lambda>(x,k). content k *\<^sub>R f t x - integral k (f t)) {xk \<in> p. m (fst xk) = t})"]) |
53638 | 6276 |
apply (rule eq_refl) |
6277 |
apply (rule arg_cong[where f=norm]) |
|
64267 | 6278 |
apply (rule sum.cong) |
57418 | 6279 |
apply (rule refl) |
53638 | 6280 |
defer |
6281 |
apply (rule henstock_lemma_part1) |
|
6282 |
apply (rule assms(1)[rule_format]) |
|
56541 | 6283 |
apply (simp add: e) |
53638 | 6284 |
apply safe |
6285 |
apply (rule c)+ |
|
6286 |
apply rule |
|
6287 |
apply assumption+ |
|
6288 |
apply (rule tagged_partial_division_subset[of p]) |
|
6289 |
apply (rule p(1)[unfolded tagged_division_of_def,THEN conjunct1]) |
|
6290 |
defer |
|
6291 |
unfolding fine_def |
|
6292 |
apply safe |
|
6293 |
apply (drule p(2)[unfolded fine_def,rule_format]) |
|
6294 |
unfolding d_def |
|
6295 |
apply auto |
|
6296 |
done |
|
6297 |
qed |
|
6298 |
qed (insert s, auto) |
|
6299 |
next |
|
61165 | 6300 |
case 3 |
53638 | 6301 |
note comb = integral_combine_tagged_division_topdown[OF assms(1)[rule_format] p(1)] |
6302 |
have *: "\<And>sr sx ss ks kr::real. kr = sr \<longrightarrow> ks = ss \<longrightarrow> |
|
61945 | 6303 |
ks \<le> i \<and> sr \<le> sx \<and> sx \<le> ss \<and> 0 \<le> i\<bullet>1 - kr\<bullet>1 \<and> i\<bullet>1 - kr\<bullet>1 < e/4 \<longrightarrow> \<bar>sx - i\<bar> < e/4" |
53638 | 6304 |
by auto |
6305 |
show ?case |
|
6306 |
unfolding real_norm_def |
|
6307 |
apply (rule *[rule_format]) |
|
6308 |
apply safe |
|
6309 |
apply (rule comb[of r]) |
|
6310 |
apply (rule comb[of s]) |
|
6311 |
apply (rule i'[unfolded real_inner_1_right]) |
|
64267 | 6312 |
apply (rule_tac[1-2] sum_mono) |
53638 | 6313 |
unfolding split_paired_all split_conv |
6314 |
apply (rule_tac[1-2] integral_le[OF ]) |
|
6315 |
proof safe |
|
56188 | 6316 |
show "0 \<le> i\<bullet>1 - (integral (cbox a b) (f r))\<bullet>1" |
53638 | 6317 |
using r(1) by auto |
56188 | 6318 |
show "i\<bullet>1 - (integral (cbox a b) (f r))\<bullet>1 < e / 4" |
53638 | 6319 |
using r(2) by auto |
6320 |
fix x k |
|
6321 |
assume xk: "(x, k) \<in> p" |
|
6322 |
from p'(4)[OF this] guess u v by (elim exE) note uv=this |
|
6323 |
show "f r integrable_on k" |
|
6324 |
and "f s integrable_on k" |
|
6325 |
and "f (m x) integrable_on k" |
|
6326 |
and "f (m x) integrable_on k" |
|
6327 |
unfolding uv |
|
56188 | 6328 |
apply (rule_tac[!] integrable_on_subcbox[OF assms(1)[rule_format]]) |
53638 | 6329 |
using p'(3)[OF xk] |
6330 |
unfolding uv |
|
6331 |
apply auto |
|
6332 |
done |
|
6333 |
fix y |
|
6334 |
assume "y \<in> k" |
|
56188 | 6335 |
then have "y \<in> cbox a b" |
53638 | 6336 |
using p'(3)[OF xk] by auto |
6337 |
then have *: "\<And>m. \<forall>n\<ge>m. f m y \<le> f n y" |
|
66193 | 6338 |
using assms(2) by (auto intro: transitive_stepwise_le) |
53638 | 6339 |
show "f r y \<le> f (m x) y" and "f (m x) y \<le> f s y" |
6340 |
apply (rule_tac[!] *[rule_format]) |
|
6341 |
using s[rule_format,OF xk] m(1)[of x] p'(2-3)[OF xk] |
|
6342 |
apply auto |
|
6343 |
done |
|
6344 |
qed |
|
6345 |
qed |
|
6346 |
qed |
|
6347 |
qed note * = this |
|
6348 |
||
56188 | 6349 |
have "integral (cbox a b) g = i" |
53638 | 6350 |
by (rule integral_unique) (rule *) |
6351 |
then show ?thesis |
|
6352 |
using i * by auto |
|
6353 |
qed |
|
6354 |
||
6355 |
lemma monotone_convergence_increasing: |
|
56188 | 6356 |
fixes f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" |
53638 | 6357 |
assumes "\<forall>k. (f k) integrable_on s" |
6358 |
and "\<forall>k. \<forall>x\<in>s. (f k x) \<le> (f (Suc k) x)" |
|
61973 | 6359 |
and "\<forall>x\<in>s. ((\<lambda>k. f k x) \<longlongrightarrow> g x) sequentially" |
53638 | 6360 |
and "bounded {integral s (f k)| k. True}" |
61973 | 6361 |
shows "g integrable_on s \<and> ((\<lambda>k. integral s (f k)) \<longlongrightarrow> integral s g) sequentially" |
6362 |
proof - |
|
6363 |
have lem: "g integrable_on s \<and> ((\<lambda>k. integral s (f k)) \<longlongrightarrow> integral s g) sequentially" |
|
61165 | 6364 |
if "\<forall>k. \<forall>x\<in>s. 0 \<le> f k x" |
6365 |
and "\<forall>k. (f k) integrable_on s" |
|
6366 |
and "\<forall>k. \<forall>x\<in>s. f k x \<le> f (Suc k) x" |
|
61973 | 6367 |
and "\<forall>x\<in>s. ((\<lambda>k. f k x) \<longlongrightarrow> g x) sequentially" |
61165 | 6368 |
and "bounded {integral s (f k)| k. True}" |
6369 |
for f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" and g s |
|
53638 | 6370 |
proof - |
61165 | 6371 |
note assms=that[rule_format] |
53638 | 6372 |
have "\<forall>x\<in>s. \<forall>k. (f k x)\<bullet>1 \<le> (g x)\<bullet>1" |
6373 |
apply safe |
|
6374 |
apply (rule Lim_component_ge) |
|
61165 | 6375 |
apply (rule that(4)[rule_format]) |
53638 | 6376 |
apply assumption |
6377 |
apply (rule trivial_limit_sequentially) |
|
6378 |
unfolding eventually_sequentially |
|
6379 |
apply (rule_tac x=k in exI) |
|
66193 | 6380 |
using assms(3) by (force intro: transitive_stepwise_le) |
53638 | 6381 |
note fg=this[rule_format] |
6382 |
||
61973 | 6383 |
have "\<exists>i. ((\<lambda>k. integral s (f k)) \<longlongrightarrow> i) sequentially" |
53638 | 6384 |
apply (rule bounded_increasing_convergent) |
61165 | 6385 |
apply (rule that(5)) |
53638 | 6386 |
apply rule |
6387 |
apply (rule integral_le) |
|
61165 | 6388 |
apply (rule that(2)[rule_format])+ |
6389 |
using that(3) |
|
53638 | 6390 |
apply auto |
6391 |
done |
|
6392 |
then guess i .. note i=this |
|
6393 |
have "\<And>k. \<forall>x\<in>s. \<forall>n\<ge>k. f k x \<le> f n x" |
|
66193 | 6394 |
using assms(3) by (force intro: transitive_stepwise_le) |
53638 | 6395 |
then have i': "\<forall>k. (integral s (f k))\<bullet>1 \<le> i\<bullet>1" |
6396 |
apply - |
|
6397 |
apply rule |
|
6398 |
apply (rule Lim_component_ge) |
|
6399 |
apply (rule i) |
|
6400 |
apply (rule trivial_limit_sequentially) |
|
6401 |
unfolding eventually_sequentially |
|
6402 |
apply (rule_tac x=k in exI) |
|
6403 |
apply safe |
|
6404 |
apply (rule integral_component_le) |
|
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
|
6405 |
apply simp |
61165 | 6406 |
apply (rule that(2)[rule_format])+ |
53638 | 6407 |
apply auto |
6408 |
done |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6409 |
|
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6410 |
note int = assms(2)[unfolded integrable_alt[of _ s],THEN conjunct1,rule_format] |
53638 | 6411 |
have ifif: "\<And>k t. (\<lambda>x. if x \<in> t then if x \<in> s then f k x else 0 else 0) = |
6412 |
(\<lambda>x. if x \<in> t \<inter> s then f k x else 0)" |
|
6413 |
by (rule ext) auto |
|
56188 | 6414 |
have int': "\<And>k a b. f k integrable_on cbox a b \<inter> s" |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
6415 |
apply (subst integrable_restrict_UNIV[symmetric]) |
53638 | 6416 |
apply (subst ifif[symmetric]) |
66112
0e640e04fc56
New theorems; stronger theorems; tidier theorems. Also some renaming
paulson <lp15@cam.ac.uk>
parents:
66089
diff
changeset
|
6417 |
apply (subst integrable_restrict_UNIV) |
53638 | 6418 |
apply (rule int) |
6419 |
done |
|
56188 | 6420 |
have "\<And>a b. (\<lambda>x. if x \<in> s then g x else 0) integrable_on cbox a b \<and> |
61973 | 6421 |
((\<lambda>k. integral (cbox a b) (\<lambda>x. if x \<in> s then f k x else 0)) \<longlongrightarrow> |
56188 | 6422 |
integral (cbox a b) (\<lambda>x. if x \<in> s then g x else 0)) sequentially" |
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6423 |
proof (rule monotone_convergence_interval, safe, goal_cases) |
61165 | 6424 |
case 1 |
53638 | 6425 |
show ?case by (rule int) |
6426 |
next |
|
61165 | 6427 |
case (2 _ _ _ x) |
53638 | 6428 |
then show ?case |
6429 |
apply (cases "x \<in> s") |
|
6430 |
using assms(3) |
|
6431 |
apply auto |
|
6432 |
done |
|
6433 |
next |
|
61165 | 6434 |
case (3 _ _ x) |
53638 | 6435 |
then show ?case |
6436 |
apply (cases "x \<in> s") |
|
6437 |
using assms(4) |
|
6438 |
apply auto |
|
6439 |
done |
|
6440 |
next |
|
61165 | 6441 |
case (4 a b) |
53638 | 6442 |
note * = integral_nonneg |
56188 | 6443 |
have "\<And>k. norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f k x else 0)) \<le> norm (integral s (f k))" |
53638 | 6444 |
unfolding real_norm_def |
6445 |
apply (subst abs_of_nonneg) |
|
6446 |
apply (rule *[OF int]) |
|
6447 |
apply safe |
|
6448 |
apply (case_tac "x \<in> s") |
|
6449 |
apply (drule assms(1)) |
|
6450 |
prefer 3 |
|
6451 |
apply (subst abs_of_nonneg) |
|
61165 | 6452 |
apply (rule *[OF assms(2) that(1)[THEN spec]]) |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
6453 |
apply (subst integral_restrict_UNIV[symmetric,OF int]) |
53638 | 6454 |
unfolding ifif |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
6455 |
unfolding integral_restrict_UNIV[OF int'] |
53638 | 6456 |
apply (rule integral_subset_le[OF _ int' assms(2)]) |
6457 |
using assms(1) |
|
6458 |
apply auto |
|
6459 |
done |
|
6460 |
then show ?case |
|
6461 |
using assms(5) |
|
6462 |
unfolding bounded_iff |
|
6463 |
apply safe |
|
6464 |
apply (rule_tac x=aa in exI) |
|
6465 |
apply safe |
|
6466 |
apply (erule_tac x="integral s (f k)" in ballE) |
|
6467 |
apply (rule order_trans) |
|
6468 |
apply assumption |
|
6469 |
apply auto |
|
6470 |
done |
|
6471 |
qed |
|
6472 |
note g = conjunctD2[OF this] |
|
6473 |
||
6474 |
have "(g has_integral i) s" |
|
6475 |
unfolding has_integral_alt' |
|
6476 |
apply safe |
|
6477 |
apply (rule g(1)) |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6478 |
proof goal_cases |
61165 | 6479 |
case (1 e) |
53638 | 6480 |
then have "e/4>0" |
6481 |
by auto |
|
44906 | 6482 |
from LIMSEQ_D [OF i this] guess N .. note N=this |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6483 |
note assms(2)[of N,unfolded has_integral_integral has_integral_alt'[of "f N"]] |
60420 | 6484 |
from this[THEN conjunct2,rule_format,OF \<open>e/4>0\<close>] guess B .. note B=conjunctD2[OF this] |
53638 | 6485 |
show ?case |
6486 |
apply rule |
|
6487 |
apply rule |
|
6488 |
apply (rule B) |
|
6489 |
apply safe |
|
6490 |
proof - |
|
6491 |
fix a b :: 'n |
|
56188 | 6492 |
assume ab: "ball 0 B \<subseteq> cbox a b" |
60420 | 6493 |
from \<open>e > 0\<close> have "e/2 > 0" |
53638 | 6494 |
by auto |
44906 | 6495 |
from LIMSEQ_D [OF g(2)[of a b] this] guess M .. note M=this |
56188 | 6496 |
have **: "norm (integral (cbox a b) (\<lambda>x. if x \<in> s then f N x else 0) - i) < e/2" |
53638 | 6497 |
apply (rule norm_triangle_half_l) |
6498 |
using B(2)[rule_format,OF ab] N[rule_format,of N] |
|
6499 |
apply - |
|
6500 |
defer |
|
6501 |
apply (subst norm_minus_commute) |
|
6502 |
apply auto |
|
6503 |
done |
|
61945 | 6504 |
have *: "\<And>f1 f2 g. \<bar>f1 - i\<bar> < e / 2 \<longrightarrow> \<bar>f2 - g\<bar> < e / 2 \<longrightarrow> |
6505 |
f1 \<le> f2 \<longrightarrow> f2 \<le> i \<longrightarrow> \<bar>g - i\<bar> < e" |
|
53638 | 6506 |
unfolding real_inner_1_right by arith |
56188 | 6507 |
show "norm (integral (cbox a b) (\<lambda>x. if x \<in> s then g x else 0) - i) < e" |
53638 | 6508 |
unfolding real_norm_def |
6509 |
apply (rule *[rule_format]) |
|
6510 |
apply (rule **[unfolded real_norm_def]) |
|
6511 |
apply (rule M[rule_format,of "M + N",unfolded real_norm_def]) |
|
6512 |
apply (rule le_add1) |
|
6513 |
apply (rule integral_le[OF int int]) |
|
6514 |
defer |
|
6515 |
apply (rule order_trans[OF _ i'[rule_format,of "M + N",unfolded real_inner_1_right]]) |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6516 |
proof (safe, goal_cases) |
61165 | 6517 |
case (2 x) |
53638 | 6518 |
have "\<And>m. x \<in> s \<Longrightarrow> \<forall>n\<ge>m. (f m x)\<bullet>1 \<le> (f n x)\<bullet>1" |
66193 | 6519 |
using assms(3) by (force intro: transitive_stepwise_le) |
53638 | 6520 |
then show ?case |
6521 |
by auto |
|
6522 |
next |
|
61165 | 6523 |
case 1 |
53638 | 6524 |
show ?case |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
6525 |
apply (subst integral_restrict_UNIV[symmetric,OF int]) |
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
6526 |
unfolding ifif integral_restrict_UNIV[OF int'] |
53638 | 6527 |
apply (rule integral_subset_le[OF _ int']) |
6528 |
using assms |
|
6529 |
apply auto |
|
6530 |
done |
|
6531 |
qed |
|
6532 |
qed |
|
6533 |
qed |
|
61165 | 6534 |
then show ?thesis |
53638 | 6535 |
apply safe |
6536 |
defer |
|
6537 |
apply (drule integral_unique) |
|
6538 |
using i |
|
6539 |
apply auto |
|
6540 |
done |
|
6541 |
qed |
|
6542 |
||
6543 |
have sub: "\<And>k. integral s (\<lambda>x. f k x - f 0 x) = integral s (f k) - integral s (f 0)" |
|
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6544 |
apply (subst integral_diff) |
53638 | 6545 |
apply (rule assms(1)[rule_format])+ |
6546 |
apply rule |
|
6547 |
done |
|
6548 |
have "\<And>x m. x \<in> s \<Longrightarrow> \<forall>n\<ge>m. f m x \<le> f n x" |
|
66193 | 6549 |
using assms(2) by (force intro: transitive_stepwise_le) |
53638 | 6550 |
note * = this[rule_format] |
61973 | 6551 |
have "(\<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> |
53638 | 6552 |
integral s (\<lambda>x. g x - f 0 x)) sequentially" |
6553 |
apply (rule lem) |
|
6554 |
apply safe |
|
61166
5976fe402824
renamed method "goals" to "goal_cases" to emphasize its meaning;
wenzelm
parents:
61165
diff
changeset
|
6555 |
proof goal_cases |
61165 | 6556 |
case (1 k x) |
53638 | 6557 |
then show ?case |
6558 |
using *[of x 0 "Suc k"] by auto |
|
6559 |
next |
|
61165 | 6560 |
case (2 k) |
53638 | 6561 |
then show ?case |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6562 |
apply (rule integrable_diff) |
53638 | 6563 |
using assms(1) |
6564 |
apply auto |
|
6565 |
done |
|
6566 |
next |
|
61165 | 6567 |
case (3 k x) |
53638 | 6568 |
then show ?case |
6569 |
using *[of x "Suc k" "Suc (Suc k)"] by auto |
|
6570 |
next |
|
61165 | 6571 |
case (4 x) |
53638 | 6572 |
then show ?case |
6573 |
apply - |
|
6574 |
apply (rule tendsto_diff) |
|
6575 |
using LIMSEQ_ignore_initial_segment[OF assms(3)[rule_format],of x 1] |
|
6576 |
apply auto |
|
6577 |
done |
|
6578 |
next |
|
61165 | 6579 |
case 5 |
53638 | 6580 |
then show ?case |
6581 |
using assms(4) |
|
6582 |
unfolding bounded_iff |
|
6583 |
apply safe |
|
6584 |
apply (rule_tac x="a + norm (integral s (\<lambda>x. f 0 x))" in exI) |
|
6585 |
apply safe |
|
6586 |
apply (erule_tac x="integral s (\<lambda>x. f (Suc k) x)" in ballE) |
|
6587 |
unfolding sub |
|
6588 |
apply (rule order_trans[OF norm_triangle_ineq4]) |
|
6589 |
apply auto |
|
6590 |
done |
|
6591 |
qed |
|
6592 |
note conjunctD2[OF this] |
|
6593 |
note tendsto_add[OF this(2) tendsto_const[of "integral s (f 0)"]] |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6594 |
integrable_add[OF this(1) assms(1)[rule_format,of 0]] |
53638 | 6595 |
then show ?thesis |
6596 |
unfolding sub |
|
6597 |
apply - |
|
6598 |
apply rule |
|
66382 | 6599 |
apply simp |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
6600 |
apply (subst(asm) integral_diff) |
53638 | 6601 |
using assms(1) |
66382 | 6602 |
apply auto |
53638 | 6603 |
apply (rule LIMSEQ_imp_Suc) |
6604 |
apply assumption |
|
6605 |
done |
|
6606 |
qed |
|
6607 |
||
57447
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6608 |
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
|
6609 |
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
|
6610 |
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
|
6611 |
assumes "\<And>k x. x \<in> s \<Longrightarrow> f k x \<le> f (Suc k) x" |
61969 | 6612 |
assumes "\<And>x. x \<in> s \<Longrightarrow> (\<lambda>k. f k x) \<longlonglongrightarrow> g x" |
6613 |
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
|
6614 |
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
|
6615 |
proof - |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6616 |
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
|
6617 |
by (simp add: integral_unique[OF f]) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6618 |
then have x: "{integral s (f k) |k. True} = range x" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6619 |
by auto |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6620 |
|
63540 | 6621 |
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
|
6622 |
proof (intro monotone_convergence_increasing allI ballI assms) |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6623 |
show "bounded {integral s (f k) |k. True}" |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6624 |
unfolding x by (rule convergent_imp_bounded) fact |
66164
2d79288b042c
New theorems and much tidying up of the old ones
paulson <lp15@cam.ac.uk>
parents:
66154
diff
changeset
|
6625 |
qed (use f in auto) |
63540 | 6626 |
then have "integral s g = x'" |
61969 | 6627 |
by (intro LIMSEQ_unique[OF _ \<open>x \<longlonglongrightarrow> x'\<close>]) (simp add: x_eq) |
63540 | 6628 |
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
|
6629 |
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
|
6630 |
qed |
87429bdecad5
import more stuff from the CLT proof; base the lborel measure on interval_measure; remove lebesgue measure
hoelzl
parents:
57418
diff
changeset
|
6631 |
|
53638 | 6632 |
lemma monotone_convergence_decreasing: |
56188 | 6633 |
fixes f :: "nat \<Rightarrow> 'n::euclidean_space \<Rightarrow> real" |
53638 | 6634 |
assumes "\<forall>k. (f k) integrable_on s" |
6635 |
and "\<forall>k. \<forall>x\<in>s. f (Suc k) x \<le> f k x" |
|
61973 | 6636 |
and "\<forall>x\<in>s. ((\<lambda>k. f k x) \<longlongrightarrow> g x) sequentially" |
53638 | 6637 |
and "bounded {integral s (f k)| k. True}" |
61973 | 6638 |
shows "g integrable_on s \<and> ((\<lambda>k. integral s (f k)) \<longlongrightarrow> integral s g) sequentially" |
53638 | 6639 |
proof - |
6640 |
note assm = assms[rule_format] |
|
58410
6d46ad54a2ab
explicit separation of signed and unsigned numerals using existing lexical categories num and xnum
haftmann
parents:
57865
diff
changeset
|
6641 |
have *: "{integral s (\<lambda>x. - f k x) |k. True} = op *\<^sub>R (- 1) ` {integral s (f k)| k. True}" |
53638 | 6642 |
apply safe |
6643 |
unfolding image_iff |
|
6644 |
apply (rule_tac x="integral s (f k)" in bexI) |
|
6645 |
prefer 3 |
|
6646 |
apply (rule_tac x=k in exI) |
|
6647 |
apply auto |
|
6648 |
done |
|
6649 |
have "(\<lambda>x. - g x) integrable_on s \<and> |
|
61973 | 6650 |
((\<lambda>k. integral s (\<lambda>x. - f k x)) \<longlongrightarrow> integral s (\<lambda>x. - g x)) sequentially" |
53638 | 6651 |
apply (rule monotone_convergence_increasing) |
6652 |
apply safe |
|
6653 |
apply (rule integrable_neg) |
|
6654 |
apply (rule assm) |
|
6655 |
defer |
|
6656 |
apply (rule tendsto_minus) |
|
6657 |
apply (rule assm) |
|
6658 |
apply assumption |
|
6659 |
unfolding * |
|
6660 |
apply (rule bounded_scaling) |
|
6661 |
using assm |
|
6662 |
apply auto |
|
6663 |
done |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6664 |
note * = conjunctD2[OF this] |
53638 | 6665 |
show ?thesis |
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
|
6666 |
using integrable_neg[OF *(1)] tendsto_minus[OF *(2)] |
547c5c6e66d4
the integral is 0 when otherwise it would be undefined (also for contour integrals)
paulson <lp15@cam.ac.uk>
parents:
62390
diff
changeset
|
6667 |
by auto |
53638 | 6668 |
qed |
6669 |
||
6670 |
lemma integral_norm_bound_integral: |
|
56188 | 6671 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
53638 | 6672 |
assumes "f integrable_on s" |
6673 |
and "g integrable_on s" |
|
6674 |
and "\<forall>x\<in>s. norm (f x) \<le> g x" |
|
6675 |
shows "norm (integral s f) \<le> integral s g" |
|
6676 |
proof - |
|
61165 | 6677 |
have norm: "norm ig < dia + e" |
66359 | 6678 |
if "norm sg \<le> dsa" and "\<bar>dsa - dia\<bar> < e / 2" and "norm (sg - ig) < e / 2" |
61165 | 6679 |
for e dsa dia and sg ig :: 'a |
6680 |
apply (rule le_less_trans[OF norm_triangle_sub[of ig sg]]) |
|
6681 |
apply (subst real_sum_of_halves[of e,symmetric]) |
|
6682 |
unfolding add.assoc[symmetric] |
|
6683 |
apply (rule add_le_less_mono) |
|
66359 | 6684 |
defer |
6685 |
apply (subst norm_minus_commute) |
|
6686 |
apply (rule that(3)) |
|
61165 | 6687 |
apply (rule order_trans[OF that(1)]) |
6688 |
using that(2) |
|
6689 |
apply arith |
|
6690 |
done |
|
6691 |
have lem: "norm (integral(cbox a b) f) \<le> integral (cbox a b) g" |
|
66359 | 6692 |
if f: "f integrable_on cbox a b" |
6693 |
and g: "g integrable_on cbox a b" |
|
6694 |
and nle: "\<And>x. x \<in> cbox a b \<Longrightarrow> norm (f x) \<le> g x" |
|
61165 | 6695 |
for f :: "'n \<Rightarrow> 'a" and g a b |
66359 | 6696 |
proof (rule eps_leI) |
61165 | 6697 |
fix e :: real |
6698 |
assume "e > 0" |
|
66359 | 6699 |
then have e: "e/2 > 0" |
53638 | 6700 |
by auto |
66359 | 6701 |
with integrable_integral[OF f,unfolded has_integral[of f]] |
6702 |
obtain \<gamma> where \<gamma>: "gauge \<gamma>" |
|
6703 |
"\<And>p. p tagged_division_of cbox a b \<and> \<gamma> fine p |
|
6704 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - integral (cbox a b) f) < e / 2" |
|
6705 |
by meson |
|
6706 |
moreover |
|
6707 |
from integrable_integral[OF g,unfolded has_integral[of g]] e |
|
6708 |
obtain \<delta> where \<delta>: "gauge \<delta>" |
|
6709 |
"\<And>p. p tagged_division_of cbox a b \<and> \<delta> fine p |
|
6710 |
\<Longrightarrow> norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R g x) - integral (cbox a b) g) < e / 2" |
|
6711 |
by meson |
|
6712 |
ultimately have "gauge (\<lambda>x. \<gamma> x \<inter> \<delta> x)" |
|
6713 |
using gauge_Int by blast |
|
6714 |
with fine_division_exists obtain p |
|
6715 |
where p: "p tagged_division_of cbox a b" "(\<lambda>x. \<gamma> x \<inter> \<delta> x) fine p" |
|
6716 |
by metis |
|
6717 |
have "\<gamma> fine p" "\<delta> fine p" |
|
6718 |
using fine_Int p(2) by blast+ |
|
61165 | 6719 |
show "norm (integral (cbox a b) f) < integral (cbox a b) g + e" |
66359 | 6720 |
proof (rule norm) |
6721 |
have "norm (content K *\<^sub>R f x) \<le> content K *\<^sub>R g x" if "(x, K) \<in> p" for x K |
|
6722 |
proof- |
|
6723 |
have K: "x \<in> K" "K \<subseteq> cbox a b" |
|
6724 |
using \<open>(x, K) \<in> p\<close> p(1) by blast+ |
|
6725 |
obtain u v where "K = cbox u v" |
|
6726 |
using \<open>(x, K) \<in> p\<close> p(1) by blast |
|
6727 |
moreover have "content K * norm (f x) \<le> content K * g x" |
|
6728 |
by (metis K subsetD dual_order.antisym measure_nonneg mult_zero_left nle not_le real_mult_le_cancel_iff2) |
|
6729 |
then show ?thesis |
|
6730 |
by simp |
|
6731 |
qed |
|
6732 |
then show "norm (\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) \<le> (\<Sum>(x, k)\<in>p. content k *\<^sub>R g x)" |
|
6733 |
by (simp add: sum_norm_le split_def) |
|
6734 |
show "norm ((\<Sum>(x, k)\<in>p. content k *\<^sub>R f x) - integral (cbox a b) f) < e / 2" |
|
6735 |
using \<open>\<gamma> fine p\<close> \<gamma> p(1) by simp |
|
6736 |
show "\<bar>(\<Sum>(x, k)\<in>p. content k *\<^sub>R g x) - integral (cbox a b) g\<bar> < e / 2" |
|
6737 |
using \<open>\<delta> fine p\<close> \<delta> p(1) by simp |
|
6738 |
qed |
|
53638 | 6739 |
qed |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6740 |
|
53399 | 6741 |
{ presume "\<And>e. 0 < e \<Longrightarrow> norm (integral s f) < integral s g + e" |
66359 | 6742 |
then show ?thesis by (rule eps_leI) auto } |
53638 | 6743 |
fix e :: real |
6744 |
assume "e > 0" |
|
6745 |
then have e: "e/2 > 0" |
|
6746 |
by auto |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6747 |
note assms(1)[unfolded integrable_alt[of f]] note f=this[THEN conjunct1,rule_format] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6748 |
note assms(2)[unfolded integrable_alt[of g]] note g=this[THEN conjunct1,rule_format] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6749 |
from integrable_integral[OF assms(1),unfolded has_integral'[of f],rule_format,OF e] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6750 |
guess B1 .. note B1=conjunctD2[OF this[rule_format],rule_format] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6751 |
from integrable_integral[OF assms(2),unfolded has_integral'[of g],rule_format,OF e] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6752 |
guess B2 .. note B2=conjunctD2[OF this[rule_format],rule_format] |
56188 | 6753 |
from bounded_subset_cbox[OF bounded_ball, of "0::'n" "max B1 B2"] |
53638 | 6754 |
guess a b by (elim exE) note ab=this[unfolded ball_max_Un] |
6755 |
||
56188 | 6756 |
have "ball 0 B1 \<subseteq> cbox a b" |
53638 | 6757 |
using ab by auto |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6758 |
from B1(2)[OF this] guess z .. note z=conjunctD2[OF this] |
56188 | 6759 |
have "ball 0 B2 \<subseteq> cbox a b" |
53638 | 6760 |
using ab by auto |
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6761 |
from B2(2)[OF this] guess w .. note w=conjunctD2[OF this] |
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6762 |
|
53638 | 6763 |
show "norm (integral s f) < integral s g + e" |
6764 |
apply (rule norm) |
|
6765 |
apply (rule lem[OF f g, of a b]) |
|
6766 |
unfolding integral_unique[OF z(1)] integral_unique[OF w(1)] |
|
6767 |
defer |
|
6768 |
apply (rule w(2)[unfolded real_norm_def]) |
|
6769 |
apply (rule z(2)) |
|
6770 |
apply (case_tac "x \<in> s") |
|
6771 |
unfolding if_P |
|
6772 |
apply (rule assms(3)[rule_format]) |
|
6773 |
apply auto |
|
6774 |
done |
|
6775 |
qed |
|
6776 |
||
66359 | 6777 |
|
53638 | 6778 |
lemma integral_norm_bound_integral_component: |
56188 | 6779 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
6780 |
fixes g :: "'n \<Rightarrow> 'b::euclidean_space" |
|
53638 | 6781 |
assumes "f integrable_on s" |
6782 |
and "g integrable_on s" |
|
6783 |
and "\<forall>x\<in>s. norm(f x) \<le> (g x)\<bullet>k" |
|
6784 |
shows "norm (integral s f) \<le> (integral s g)\<bullet>k" |
|
6785 |
proof - |
|
6786 |
have "norm (integral s f) \<le> integral s ((\<lambda>x. x \<bullet> k) \<circ> g)" |
|
6787 |
apply (rule integral_norm_bound_integral[OF assms(1)]) |
|
6788 |
apply (rule integrable_linear[OF assms(2)]) |
|
6789 |
apply rule |
|
6790 |
unfolding o_def |
|
6791 |
apply (rule assms) |
|
6792 |
done |
|
6793 |
then show ?thesis |
|
6794 |
unfolding o_def integral_component_eq[OF assms(2)] . |
|
6795 |
qed |
|
6796 |
||
6797 |
lemma has_integral_norm_bound_integral_component: |
|
56188 | 6798 |
fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach" |
6799 |
fixes g :: "'n \<Rightarrow> 'b::euclidean_space" |
|
53638 | 6800 |
assumes "(f has_integral i) s" |
6801 |
and "(g has_integral j) s" |
|
6802 |
and "\<forall>x\<in>s. norm (f x) \<le> (g x)\<bullet>k" |
|
6803 |
shows "norm i \<le> j\<bullet>k" |
|
6804 |
using integral_norm_bound_integral_component[of f s g k] |
|
36243
027ae62681be
Translated remaining theorems about integration from HOL light.
himmelma
parents:
36081
diff
changeset
|
6805 |
unfolding integral_unique[OF assms(1)] integral_unique[OF assms(2)] |
53638 | 6806 |
using assms |
6807 |
by auto |
|
6808 |
||
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6809 |
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
|
6810 |
|
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6811 |
lemma integral_continuous_on_param: |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6812 |
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
|
6813 |
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
|
6814 |
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
|
6815 |
proof cases |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6816 |
assume "content (cbox a b) \<noteq> 0" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6817 |
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
|
6818 |
|
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6819 |
note [continuous_intros] = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6820 |
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
|
6821 |
unfolded split_beta fst_conv snd_conv] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6822 |
|
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6823 |
show ?thesis |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6824 |
unfolding continuous_on_def |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6825 |
proof (safe intro!: tendstoI) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6826 |
fix e'::real and x |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6827 |
assume "e' > 0" |
63040 | 6828 |
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
|
6829 |
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
|
6830 |
assume "x \<in> U" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6831 |
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
|
6832 |
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
|
6833 |
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
|
6834 |
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
|
6835 |
by metis |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6836 |
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
|
6837 |
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
|
6838 |
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
|
6839 |
proof eventually_elim |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6840 |
case (elim y) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6841 |
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
|
6842 |
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
|
6843 |
using elim \<open>x \<in> U\<close> |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6844 |
unfolding dist_norm |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6845 |
by (subst integral_diff) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6846 |
(auto intro!: integrable_continuous continuous_intros) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6847 |
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
|
6848 |
using elim \<open>x \<in> U\<close> |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6849 |
by (intro integrable_bound) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6850 |
(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
|
6851 |
integrable_continuous continuous_intros) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6852 |
also have "\<dots> < e'" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6853 |
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
|
6854 |
by (auto simp: e_def divide_simps) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6855 |
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
|
6856 |
qed |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6857 |
qed |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6858 |
qed (auto intro!: continuous_on_const) |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6859 |
|
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6860 |
lemma leibniz_rule: |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6861 |
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
|
6862 |
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
|
6863 |
((\<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
|
6864 |
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
|
6865 |
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
|
6866 |
assumes [intro]: "x0 \<in> U" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6867 |
assumes "convex U" |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6868 |
shows |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6869 |
"((\<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
|
6870 |
(is "(?F has_derivative ?dF) _") |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6871 |
proof cases |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6872 |
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
|
6873 |
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
|
6874 |
note [continuous_intros] = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6875 |
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
|
6876 |
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
|
6877 |
show ?thesis |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6878 |
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
|
6879 |
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
|
6880 |
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
|
6881 |
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
|
6882 |
fix e'::real |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6883 |
assume "e' > 0" |
63040 | 6884 |
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
|
6885 |
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
|
6886 |
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
|
6887 |
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
|
6888 |
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
|
6889 |
unfolding split_beta fst_conv snd_conv |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6890 |
by (metis dist_norm) |
61915
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6891 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6892 |
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
|
6893 |
moreover |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6894 |
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
|
6895 |
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
|
6896 |
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
|
6897 |
by (auto simp: eventually_at_filter) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6898 |
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
|
6899 |
by (auto simp: eventually_at_filter) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6900 |
ultimately |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6901 |
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
|
6902 |
proof eventually_elim |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6903 |
case (elim x) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6904 |
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
|
6905 |
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
|
6906 |
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
|
6907 |
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
|
6908 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6909 |
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
|
6910 |
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
|
6911 |
(is "_ = ?id") |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6912 |
using \<open>x \<noteq> x0\<close> |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6913 |
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
|
6914 |
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
|
6915 |
intro: integrable_continuous)+ |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6916 |
also |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6917 |
{ |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6918 |
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
|
6919 |
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
|
6920 |
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
|
6921 |
\<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
|
6922 |
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
|
6923 |
from t have deriv: |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6924 |
"((\<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
|
6925 |
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
|
6926 |
unfolding has_vector_derivative_def[symmetric] |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6927 |
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
|
6928 |
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
|
6929 |
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
|
6930 |
using fx_bound t |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6931 |
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
|
6932 |
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
|
6933 |
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
|
6934 |
by (auto simp add: ac_simps) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6935 |
} |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6936 |
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
|
6937 |
by (intro integral_norm_bound_integral) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6938 |
(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
|
6939 |
intro: integrable_continuous) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6940 |
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
|
6941 |
by simp |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6942 |
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
|
6943 |
using \<open>e' > 0\<close> |
66154
bc5e6461f759
Tidying up integration theory and some new theorems
paulson <lp15@cam.ac.uk>
parents:
66112
diff
changeset
|
6944 |
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
|
6945 |
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
|
6946 |
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
|
6947 |
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
|
6948 |
then show ?case |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6949 |
by (auto simp: divide_simps) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6950 |
qed |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6951 |
qed (rule blinfun.bounded_linear_right) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6952 |
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
|
6953 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
6954 |
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
|
6955 |
"(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
|
6956 |
(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
|
6957 |
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
|
6958 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6959 |
lemma leibniz_rule_vector_derivative: |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6960 |
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
|
6961 |
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
|
6962 |
((\<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
|
6963 |
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
|
6964 |
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
|
6965 |
assumes U: "x0 \<in> U" "convex U" |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6966 |
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
|
6967 |
(at x0 within U)" |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6968 |
proof - |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6969 |
note [continuous_intros] = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6970 |
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
|
6971 |
unfolded split_beta fst_conv snd_conv] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6972 |
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
|
6973 |
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
|
6974 |
by (subst integral_linear[symmetric]) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6975 |
(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
|
6976 |
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
|
6977 |
show ?thesis |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6978 |
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
|
6979 |
apply (rule has_derivative_eq_rhs) |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6980 |
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
|
6981 |
using fx cont_fx |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6982 |
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
|
6983 |
done |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6984 |
qed |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6985 |
|
63957
c3da799b1b45
HOL-Analysis: move gauges and (tagged) divisions to its own theory file
hoelzl
parents:
63956
diff
changeset
|
6986 |
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
|
6987 |
"(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
|
6988 |
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
|
6989 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
6990 |
lemma leibniz_rule_field_derivative: |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6991 |
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
|
6992 |
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
|
6993 |
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
|
6994 |
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
|
6995 |
assumes U: "x0 \<in> U" "convex U" |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6996 |
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
|
6997 |
proof - |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6998 |
note [continuous_intros] = |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
6999 |
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
|
7000 |
unfolded split_beta fst_conv snd_conv] |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
7001 |
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
|
7002 |
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
|
7003 |
by (subst integral_linear[symmetric]) |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
7004 |
(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
|
7005 |
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
|
7006 |
show ?thesis |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
7007 |
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
|
7008 |
apply (rule has_derivative_eq_rhs) |
62182
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
7009 |
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
|
7010 |
using fx cont_fx |
9ca00b65d36c
continuity of parameterized integral; easier-to-apply formulation of rules
immler
parents:
61973
diff
changeset
|
7011 |
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
|
7012 |
done |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
7013 |
qed |
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
7014 |
|
e9812a95d108
theory for type of bounded linear functions; differentiation under the integral sign
immler
parents:
61824
diff
changeset
|
7015 |
|
61243 | 7016 |
subsection \<open>Exchange uniform limit and integral\<close> |
7017 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7018 |
lemma uniform_limit_integral_cbox: |
61243 | 7019 |
fixes f::"'a \<Rightarrow> 'b::euclidean_space \<Rightarrow> 'c::banach" |
7020 |
assumes u: "uniform_limit (cbox a b) f g F" |
|
7021 |
assumes c: "\<And>n. continuous_on (cbox a b) (f n)" |
|
7022 |
assumes [simp]: "F \<noteq> bot" |
|
7023 |
obtains I J where |
|
7024 |
"\<And>n. (f n has_integral I n) (cbox a b)" |
|
7025 |
"(g has_integral J) (cbox a b)" |
|
61973 | 7026 |
"(I \<longlongrightarrow> J) F" |
61243 | 7027 |
proof - |
7028 |
have fi[simp]: "f n integrable_on (cbox a b)" for n |
|
7029 |
by (auto intro!: integrable_continuous assms) |
|
7030 |
then obtain I where I: "\<And>n. (f n has_integral I n) (cbox a b)" |
|
7031 |
by atomize_elim (auto simp: integrable_on_def intro!: choice) |
|
7032 |
||
7033 |
moreover |
|
7034 |
||
7035 |
have gi[simp]: "g integrable_on (cbox a b)" |
|
7036 |
by (auto intro!: integrable_continuous uniform_limit_theorem[OF _ u] eventuallyI c) |
|
7037 |
then obtain J where J: "(g has_integral J) (cbox a b)" |
|
7038 |
by blast |
|
7039 |
||
7040 |
moreover |
|
7041 |
||
61973 | 7042 |
have "(I \<longlongrightarrow> J) F" |
61243 | 7043 |
proof cases |
7044 |
assume "content (cbox a b) = 0" |
|
7045 |
hence "I = (\<lambda>_. 0)" "J = 0" |
|
7046 |
by (auto intro!: has_integral_unique I J) |
|
7047 |
thus ?thesis by simp |
|
7048 |
next |
|
7049 |
assume content_nonzero: "content (cbox a b) \<noteq> 0" |
|
7050 |
show ?thesis |
|
7051 |
proof (rule tendstoI) |
|
7052 |
fix e::real |
|
7053 |
assume "e > 0" |
|
63040 | 7054 |
define e' where "e' = e / 2" |
61243 | 7055 |
with \<open>e > 0\<close> have "e' > 0" by simp |
7056 |
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
|
7057 |
using u content_nonzero by (auto simp: uniform_limit_iff dist_norm zero_less_measure_iff) |
61243 | 7058 |
then show "\<forall>\<^sub>F n in F. dist (I n) J < e" |
7059 |
proof eventually_elim |
|
7060 |
case (elim n) |
|
7061 |
have "I n = integral (cbox a b) (f n)" |
|
7062 |
"J = integral (cbox a b) g" |
|
7063 |
using I[of n] J by (simp_all add: integral_unique) |
|
7064 |
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
|
7065 |
by (simp add: integral_diff dist_norm) |
61243 | 7066 |
also have "\<dots> \<le> integral (cbox a b) (\<lambda>x. (e' / content (cbox a b)))" |
7067 |
using elim |
|
63941
f353674c2528
move absolutely_integrable_on to Equivalence_Lebesgue_Henstock_Integration, now based on the Lebesgue integral
hoelzl
parents:
63940
diff
changeset
|
7068 |
by (intro integral_norm_bound_integral) (auto intro!: integrable_diff) |
61243 | 7069 |
also have "\<dots> < e" |
7070 |
using \<open>0 < e\<close> |
|
7071 |
by (simp add: e'_def) |
|
7072 |
finally show ?case . |
|
7073 |
qed |
|
7074 |
qed |
|
7075 |
qed |
|
7076 |
ultimately show ?thesis .. |
|
7077 |
qed |
|
7078 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7079 |
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
|
7080 |
fixes f::"'a \<Rightarrow> 'b::ordered_euclidean_space \<Rightarrow> 'c::banach" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7081 |
assumes u: "uniform_limit {a .. b} f g F" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7082 |
assumes c: "\<And>n. continuous_on {a .. b} (f n)" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7083 |
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
|
7084 |
obtains I J where |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7085 |
"\<And>n. (f n has_integral I n) {a .. b}" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7086 |
"(g has_integral J) {a .. b}" |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7087 |
"(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
|
7088 |
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
|
7089 |
|
61243 | 7090 |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7091 |
subsection \<open>Integration by parts\<close> |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7092 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7093 |
lemma integration_by_parts_interior_strong: |
64272 | 7094 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
7095 |
assumes bilinear: "bounded_bilinear (prod)" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7096 |
assumes s: "finite s" and le: "a \<le> b" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7097 |
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
|
7098 |
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
|
7099 |
"\<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
|
7100 |
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
|
7101 |
(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
|
7102 |
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
|
7103 |
proof - |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7104 |
interpret bounded_bilinear prod by fact |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7105 |
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
|
7106 |
(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
|
7107 |
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
|
7108 |
(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
|
7109 |
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
|
7110 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7111 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7112 |
lemma integration_by_parts_interior: |
64272 | 7113 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
7114 |
assumes "bounded_bilinear (prod)" "a \<le> b" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7115 |
"continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7116 |
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
|
7117 |
"\<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
|
7118 |
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
|
7119 |
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
|
7120 |
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
|
7121 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7122 |
lemma integration_by_parts: |
64272 | 7123 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
7124 |
assumes "bounded_bilinear (prod)" "a \<le> b" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7125 |
"continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7126 |
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
|
7127 |
"\<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
|
7128 |
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
|
7129 |
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
|
7130 |
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
|
7131 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7132 |
lemma integrable_by_parts_interior_strong: |
64272 | 7133 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
7134 |
assumes bilinear: "bounded_bilinear (prod)" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7135 |
assumes s: "finite s" and le: "a \<le> b" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7136 |
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
|
7137 |
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
|
7138 |
"\<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
|
7139 |
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
|
7140 |
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
|
7141 |
proof - |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7142 |
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
|
7143 |
unfolding integrable_on_def by blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7144 |
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
|
7145 |
(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
|
7146 |
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
|
7147 |
show ?thesis unfolding integrable_on_def by blast |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7148 |
qed |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7149 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7150 |
lemma integrable_by_parts_interior: |
64272 | 7151 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
7152 |
assumes "bounded_bilinear (prod)" "a \<le> b" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7153 |
"continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7154 |
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
|
7155 |
"\<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
|
7156 |
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
|
7157 |
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
|
7158 |
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
|
7159 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7160 |
lemma integrable_by_parts: |
64272 | 7161 |
fixes prod :: "_ \<Rightarrow> _ \<Rightarrow> 'b :: banach" |
7162 |
assumes "bounded_bilinear (prod)" "a \<le> b" |
|
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7163 |
"continuous_on {a..b} f" "continuous_on {a..b} g" |
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7164 |
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
|
7165 |
"\<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
|
7166 |
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
|
7167 |
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
|
7168 |
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
|
7169 |
|
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7170 |
|
63299 | 7171 |
subsection \<open>Integration by substitution\<close> |
7172 |
||
7173 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7174 |
lemma has_integral_substitution_general: |
63299 | 7175 |
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
|
7176 |
assumes s: "finite s" and le: "a \<le> b" |
63299 | 7177 |
and subset: "g ` {a..b} \<subseteq> {c..d}" |
7178 |
and f [continuous_intros]: "continuous_on {c..d} f" |
|
7179 |
and g [continuous_intros]: "continuous_on {a..b} g" |
|
7180 |
and deriv [derivative_intros]: |
|
7181 |
"\<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
|
7182 |
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 | 7183 |
proof - |
7184 |
let ?F = "\<lambda>x. integral {c..g x} f" |
|
7185 |
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
|
7186 |
by (rule continuous_on_compose2[OF _ g subset] indefinite_integral_continuous_1 |
63299 | 7187 |
f integrable_continuous_real)+ |
7188 |
have deriv: "(((\<lambda>x. integral {c..x} f) \<circ> g) has_vector_derivative g' x *\<^sub>R f (g x)) |
|
7189 |
(at x within {a..b})" if "x \<in> {a..b} - s" for x |
|
7190 |
apply (rule has_vector_derivative_eq_rhs) |
|
7191 |
apply (rule vector_diff_chain_within) |
|
7192 |
apply (subst has_field_derivative_iff_has_vector_derivative [symmetric]) |
|
7193 |
apply (rule deriv that)+ |
|
7194 |
apply (rule has_vector_derivative_within_subset) |
|
7195 |
apply (rule integral_has_vector_derivative f)+ |
|
7196 |
using that le subset |
|
7197 |
apply blast+ |
|
7198 |
done |
|
7199 |
have deriv: "(?F has_vector_derivative g' x *\<^sub>R f (g x)) |
|
7200 |
(at x)" if "x \<in> {a..b} - (s \<union> {a,b})" for x |
|
7201 |
using deriv[of x] that by (simp add: at_within_closed_interval o_def) |
|
7202 |
||
7203 |
||
7204 |
have "((\<lambda>x. g' x *\<^sub>R f (g x)) has_integral (?F b - ?F a)) {a..b}" |
|
7205 |
using le cont_int s deriv cont_int |
|
7206 |
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
|
7207 |
also |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7208 |
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
|
7209 |
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
|
7210 |
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
|
7211 |
proof cases |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7212 |
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
|
7213 |
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
|
7214 |
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
|
7215 |
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
|
7216 |
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
|
7217 |
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
|
7218 |
next |
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7219 |
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
|
7220 |
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
|
7221 |
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
|
7222 |
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
|
7223 |
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
|
7224 |
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
|
7225 |
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
|
7226 |
qed |
63299 | 7227 |
finally show ?thesis . |
7228 |
qed |
|
7229 |
||
65204
d23eded35a33
modernized construction of type bcontfun; base explicit theorems on Uniform_Limit.thy; added some lemmas
immler
parents:
65036
diff
changeset
|
7230 |
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
|
7231 |
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
|
7232 |
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
|
7233 |
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
|
7234 |
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
|
7235 |
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
|
7236 |
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
|
7237 |
"\<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
|
7238 |
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
|
7239 |
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
|
7240 |
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
|
7241 |
|
63299 | 7242 |
lemma has_integral_substitution: |
7243 |
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
|
7244 |
assumes "a \<le> b" "g a \<le> g b" "g ` {a..b} \<subseteq> {c..d}" |
63299 | 7245 |
and "continuous_on {c..d} f" |
7246 |
and "\<And>x. x \<in> {a..b} \<Longrightarrow> (g has_field_derivative g' x) (at x within {a..b})" |
|
7247 |
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
|
7248 |
by (intro has_integral_substitution_strong[of "{}" a b g c d] assms) |
63299 | 7249 |
(auto intro: DERIV_continuous_on assms) |
7250 |
||
7251 |
||
63295
52792bb9126e
Facts about HK integration, complex powers, Gamma function
eberlm
parents:
63170
diff
changeset
|
7252 |
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
|
7253 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7254 |
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
|
7255 |
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
|
7256 |
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
|
7257 |
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
|
7258 |
proof - |
61736 | 7259 |
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
|
7260 |
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
|
7261 |
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
|
7262 |
using x |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7263 |
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
|
7264 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7265 |
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
|
7266 |
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
|
7267 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7268 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7269 |
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
|
7270 |
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
|
7271 |
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
|
7272 |
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
|
7273 |
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
|
7274 |
case True |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7275 |
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
|
7276 |
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
|
7277 |
next |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7278 |
case False |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7279 |
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
|
7280 |
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
|
7281 |
{ 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
|
7282 |
assume x: "x \<in> cbox a b" and e: "0 < e" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7283 |
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" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7284 |
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
|
7285 |
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
|
7286 |
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> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7287 |
\<Longrightarrow> norm (f x' - f x) \<le> e / (2 * content (cbox c d))" "dd>0" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7288 |
using uc [unfolded uniformly_continuous_on_def, THEN spec, of "e / (2 * content (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
|
7289 |
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
|
7290 |
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
|
7291 |
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
|
7292 |
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
|
7293 |
apply clarify |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7294 |
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
|
7295 |
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
|
7296 |
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
|
7297 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7298 |
} note * = this |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7299 |
show ?thesis |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7300 |
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
|
7301 |
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
|
7302 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7303 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7304 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7305 |
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
|
7306 |
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
|
7307 |
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
|
7308 |
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
|
7309 |
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
|
7310 |
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
|
7311 |
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
|
7312 |
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
|
7313 |
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
|
7314 |
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
|
7315 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7316 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7317 |
lemma integral_swap_operative: |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7318 |
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
|
7319 |
assumes f: "continuous_on s f" and e: "0 < e" |
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
|
7320 |
shows "comm_monoid.operative (op \<and>) True |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7321 |
(\<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
|
7322 |
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
|
7323 |
\<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
|
7324 |
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
|
7325 |
\<le> e * content (cbox (a,c) (b,d)))" |
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
|
7326 |
proof (auto simp: comm_monoid.operative_def[OF comm_monoid_and]) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7327 |
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
|
7328 |
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
|
7329 |
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
|
7330 |
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
|
7331 |
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
|
7332 |
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
|
7333 |
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
|
7334 |
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
|
7335 |
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
|
7336 |
\<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
|
7337 |
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
|
7338 |
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
|
7339 |
next |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7340 |
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
|
7341 |
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
|
7342 |
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
|
7343 |
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
|
7344 |
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
|
7345 |
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
|
7346 |
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
|
7347 |
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
|
7348 |
\<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
|
7349 |
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
|
7350 |
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
|
7351 |
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
|
7352 |
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
|
7353 |
\<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
|
7354 |
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
|
7355 |
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
|
7356 |
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
|
7357 |
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
|
7358 |
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
|
7359 |
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
|
7360 |
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
|
7361 |
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
|
7362 |
\<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
|
7363 |
proof cases |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7364 |
case 1 |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7365 |
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
|
7366 |
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
|
7367 |
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
|
7368 |
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
|
7369 |
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
|
7370 |
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
|
7371 |
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
|
7372 |
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
|
7373 |
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
|
7374 |
show ?normle |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7375 |
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
|
7376 |
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
|
7377 |
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
|
7378 |
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
|
7379 |
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
|
7380 |
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
|
7381 |
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
|
7382 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7383 |
next |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7384 |
case 2 |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7385 |
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
|
7386 |
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
|
7387 |
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
|
7388 |
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
|
7389 |
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
|
7390 |
"(\<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
|
7391 |
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
|
7392 |
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
|
7393 |
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
|
7394 |
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
|
7395 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7396 |
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
|
7397 |
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
|
7398 |
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
|
7399 |
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
|
7400 |
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
|
7401 |
show ?normle |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7402 |
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
|
7403 |
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
|
7404 |
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
|
7405 |
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
|
7406 |
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
|
7407 |
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
|
7408 |
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
|
7409 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7410 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7411 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7412 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7413 |
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
|
7414 |
"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
|
7415 |
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
|
7416 |
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
|
7417 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7418 |
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
|
7419 |
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
|
7420 |
assumes "continuous_on (cbox (a,c) (b,d)) f" (is "continuous_on ?CBOX f") |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7421 |
shows "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
|
7422 |
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
|
7423 |
case True |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7424 |
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
|
7425 |
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
|
7426 |
next |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7427 |
case False |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7428 |
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
|
7429 |
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
|
7430 |
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
|
7431 |
proof (rule dense_eq0_I, simp) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7432 |
fix e::real assume "0 < e" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7433 |
with cbp have e': "0 < e / content ?CBOX" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7434 |
by simp |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7435 |
have f_int_acbd: "f integrable_on 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
|
7436 |
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
|
7437 |
{ fix p |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7438 |
assume p: "p division_of cbox (a,c) (b,d)" |
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
|
7439 |
note opd1 = comm_monoid_set.operative_division [OF comm_monoid_set_and integral_swap_operative [OF assms e'], THEN iffD1, |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7440 |
THEN spec, THEN spec, THEN spec, THEN spec, of p "(a,c)" "(b,d)" 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
|
7441 |
have "(\<And>t u v w z. |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7442 |
\<lbrakk>t \<in> p; cbox (u,w) (v,z) \<subseteq> t; cbox (u,w) (v,z) \<subseteq> cbox (a,c) (b,d)\<rbrakk> \<Longrightarrow> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7443 |
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
|
7444 |
\<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
|
7445 |
\<Longrightarrow> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7446 |
norm (integral ?CBOX f - integral (cbox a b) (\<lambda>x. integral (cbox c d) (\<lambda>y. f (x,y)))) \<le> e" |
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
|
7447 |
using opd1 [OF p] False by (simp add: comm_monoid_set_F_and) |
60615
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7448 |
} note op_acbd = this |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7449 |
{ fix k::real and p and u::'a and v w and z::'b and t1 t2 l |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7450 |
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
|
7451 |
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
|
7452 |
\<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> |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7453 |
\<Longrightarrow> norm (f(u,v) - f(x,y)) < e / (2 * (content ?CBOX))" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7454 |
and p_acbd: "p tagged_division_of 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
|
7455 |
and fine: "(\<lambda>x. ball x k) fine p" "((t1,t2), l) \<in> p" |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7456 |
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
|
7457 |
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
|
7458 |
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
|
7459 |
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
|
7460 |
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
|
7461 |
{ 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
|
7462 |
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
|
7463 |
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
|
7464 |
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
|
7465 |
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
|
7466 |
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
|
7467 |
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
|
7468 |
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
|
7469 |
by (force simp add: cbox_Pair_eq dist_norm ) |
ab7e11730ad8
Some new lemmas. Existing lemmas modified to use uniform_limit rather than its expansion
paulson <lp15@cam.ac.uk>
parents:
64911
diff
changeset
|
7470 |
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
|
7471 |
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
|
7472 |
} 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
|
7473 |
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
|
7474 |
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
|
7475 |
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
|
7476 |
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
|
7477 |
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
|
7478 |
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
|
7479 |
\<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
|
7480 |
apply (simp only: integral_diff [symmetric] 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
|
7481 |
apply (rule order_trans [OF integrable_bound [of "e / 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
|
7482 |
using cbp e' nf' |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
7483 |
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
|
7484 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7485 |
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
|
7486 |
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
|
7487 |
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
|
7488 |
"\<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
|
7489 |
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
|
7490 |
\<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
|
7491 |
apply (simp only: integral_diff [symmetric] 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
|
7492 |
apply (rule order_trans [OF integrable_bound [of "e / 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
|
7493 |
using cbp e' nf' |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
7494 |
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
|
7495 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7496 |
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
|
7497 |
(\<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
|
7498 |
\<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
|
7499 |
apply (rule integrable_bound [OF _ _ normint_wz]) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7500 |
using cbp e' |
61806
d2e62ae01cd8
Cauchy's integral formula for circles. Starting to fix eventually_mono.
paulson <lp15@cam.ac.uk>
parents:
61762
diff
changeset
|
7501 |
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
|
7502 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7503 |
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
|
7504 |
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
|
7505 |
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
|
7506 |
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
|
7507 |
\<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
|
7508 |
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
|
7509 |
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
|
7510 |
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
|
7511 |
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
|
7512 |
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
|
7513 |
\<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
|
7514 |
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
|
7515 |
} note * = this |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7516 |
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
|
7517 |
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
|
7518 |
apply (simp add: uniformly_continuous_on_def dist_norm) |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7519 |
apply (drule_tac x="e / 2 / content?CBOX" in spec) |
61222 | 7520 |
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
|
7521 |
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
|
7522 |
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
|
7523 |
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
|
7524 |
apply assumption |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7525 |
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
|
7526 |
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
|
7527 |
using * |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7528 |
apply auto |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7529 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7530 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7531 |
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
|
7532 |
by simp |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7533 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7534 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7535 |
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
|
7536 |
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
|
7537 |
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
|
7538 |
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
|
7539 |
proof - |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7540 |
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
|
7541 |
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
|
7542 |
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
|
7543 |
done |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7544 |
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
|
7545 |
by force |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7546 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7547 |
|
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7548 |
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
|
7549 |
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
|
7550 |
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
|
7551 |
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
|
7552 |
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
|
7553 |
proof - |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7554 |
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
|
7555 |
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
|
7556 |
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
|
7557 |
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
|
7558 |
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
|
7559 |
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
|
7560 |
by auto |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7561 |
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
|
7562 |
qed |
e5fa1d5d3952
Useful lemmas. The theorem concerning swapping the variables in a double integral.
paulson <lp15@cam.ac.uk>
parents:
60585
diff
changeset
|
7563 |
|
63296 | 7564 |
|
7565 |
subsection \<open>Definite integrals for exponential and power function\<close> |
|
7566 |
||
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7567 |
lemma has_integral_exp_minus_to_infinity: |
63296 | 7568 |
assumes a: "a > 0" |
7569 |
shows "((\<lambda>x::real. exp (-a*x)) has_integral exp (-a*c)/a) {c..}" |
|
7570 |
proof - |
|
7571 |
define f where "f = (\<lambda>k x. if x \<in> {c..real k} then exp (-a*x) else 0)" |
|
7572 |
||
7573 |
{ |
|
7574 |
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
|
7575 |
from k a |
63296 | 7576 |
have "((\<lambda>x. exp (-a*x)) has_integral (-exp (-a*real k)/a - (-exp (-a*c)/a))) {c..real k}" |
7577 |
by (intro fundamental_theorem_of_calculus) |
|
7578 |
(auto intro!: derivative_eq_intros |
|
7579 |
simp: has_field_derivative_iff_has_vector_derivative [symmetric]) |
|
7580 |
hence "(f k has_integral (exp (-a*c)/a - exp (-a*real k)/a)) {c..}" unfolding f_def |
|
7581 |
by (subst has_integral_restrict) simp_all |
|
7582 |
} note has_integral_f = this |
|
7583 |
||
7584 |
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
|
7585 |
have integral_f: "integral {c..} (f k) = |
63296 | 7586 |
(if real k \<ge> c then exp (-a*c)/a - exp (-a*real k)/a else 0)" |
7587 |
for k using integral_unique[OF has_integral_f[of k]] by simp |
|
7588 |
||
7589 |
have A: "(\<lambda>x. exp (-a*x)) integrable_on {c..} \<and> |
|
7590 |
(\<lambda>k. integral {c..} (f k)) \<longlonglongrightarrow> integral {c..} (\<lambda>x. exp (-a*x))" |
|
7591 |
proof (intro monotone_convergence_increasing allI ballI) |
|
7592 |
fix k ::nat |
|
7593 |
have "(\<lambda>x. exp (-a*x)) integrable_on {c..of_real k}" (is ?P) |
|
7594 |
unfolding f_def by (auto intro!: continuous_intros integrable_continuous_real) |
|
7595 |
hence int: "(f k) integrable_on {c..of_real k}" |
|
7596 |
by (rule integrable_eq[rotated]) (simp add: f_def) |
|
7597 |
show "f k integrable_on {c..}" |
|
7598 |
by (rule integrable_on_superset[OF _ _ int]) (auto simp: f_def) |
|
7599 |
next |
|
7600 |
fix x assume x: "x \<in> {c..}" |
|
7601 |
have "sequentially \<le> principal {nat \<lceil>x\<rceil>..}" unfolding at_top_def by (simp add: Inf_lower) |
|
7602 |
also have "{nat \<lceil>x\<rceil>..} \<subseteq> {k. x \<le> real k}" by auto |
|
7603 |
also have "inf (principal \<dots>) (principal {k. \<not>x \<le> real k}) = |
|
7604 |
principal ({k. x \<le> real k} \<inter> {k. \<not>x \<le> real k})" by simp |
|
7605 |
also have "{k. x \<le> real k} \<inter> {k. \<not>x \<le> real k} = {}" by blast |
|
7606 |
finally have "inf sequentially (principal {k. \<not>x \<le> real k}) = bot" |
|
7607 |
by (simp add: inf.coboundedI1 bot_unique) |
|
7608 |
with x show "(\<lambda>k. f k x) \<longlonglongrightarrow> exp (-a*x)" unfolding f_def |
|
7609 |
by (intro filterlim_If) auto |
|
7610 |
next |
|
7611 |
have "\<bar>integral {c..} (f k)\<bar> \<le> exp (-a*c)/a" for k |
|
7612 |
proof (cases "c > of_nat k") |
|
7613 |
case False |
|
7614 |
hence "abs (integral {c..} (f k)) = abs (exp (- (a * c)) / a - exp (- (a * real k)) / a)" |
|
7615 |
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
|
7616 |
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
|
7617 |
exp (- (a * c)) / a - exp (- (a * real k)) / a" |
63296 | 7618 |
using False a by (intro abs_of_nonneg) (simp_all add: field_simps) |
7619 |
also have "\<dots> \<le> exp (- a * c) / a" using a by simp |
|
7620 |
finally show ?thesis . |
|
7621 |
qed (insert a, simp_all add: integral_f) |
|
7622 |
thus "bounded {integral {c..} (f k) |k. True}" |
|
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
|
7623 |
by (intro boundedI[of _ "exp (-a*c)/a"]) auto |
63296 | 7624 |
qed (auto simp: f_def) |
7625 |
||
7626 |
from eventually_gt_at_top[of "nat \<lceil>c\<rceil>"] have "eventually (\<lambda>k. of_nat k > c) sequentially" |
|
7627 |
by eventually_elim linarith |
|
7628 |
hence "eventually (\<lambda>k. exp (-a*c)/a - exp (-a * of_nat k)/a = integral {c..} (f k)) sequentially" |
|
7629 |
by eventually_elim (simp add: integral_f) |
|
7630 |
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
|
7631 |
by (intro tendsto_intros filterlim_compose[OF exp_at_bot] |
63296 | 7632 |
filterlim_tendsto_neg_mult_at_bot[OF tendsto_const] filterlim_real_sequentially)+ |
7633 |
(insert a, simp_all) |
|
7634 |
ultimately have "(\<lambda>k. integral {c..} (f k)) \<longlonglongrightarrow> exp (-a*c)/a - 0/a" |
|
7635 |
by (rule Lim_transform_eventually) |
|
7636 |
from LIMSEQ_unique[OF conjunct2[OF A] this] |
|
7637 |
have "integral {c..} (\<lambda>x. exp (-a*x)) = exp (-a*c)/a" by simp |
|
7638 |
with conjunct1[OF A] show ?thesis |
|
7639 |
by (simp add: has_integral_integral) |
|
7640 |
qed |
|
7641 |
||
7642 |
lemma integrable_on_exp_minus_to_infinity: "a > 0 \<Longrightarrow> (\<lambda>x. exp (-a*x) :: real) integrable_on {c..}" |
|
7643 |
using has_integral_exp_minus_to_infinity[of a c] unfolding integrable_on_def by blast |
|
7644 |
||
7645 |
lemma has_integral_powr_from_0: |
|
7646 |
assumes a: "a > (-1::real)" and c: "c \<ge> 0" |
|
7647 |
shows "((\<lambda>x. x powr a) has_integral (c powr (a+1) / (a+1))) {0..c}" |
|
7648 |
proof (cases "c = 0") |
|
7649 |
case False |
|
7650 |
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
|
7651 |
define F where "F = (\<lambda>k. if inverse (of_nat (Suc k)) \<le> c then |
63296 | 7652 |
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
|
7653 |
|
63296 | 7654 |
{ |
7655 |
fix k :: nat |
|
7656 |
have "(f k has_integral F k) {0..c}" |
|
7657 |
proof (cases "inverse (of_nat (Suc k)) \<le> c") |
|
7658 |
case True |
|
7659 |
{ |
|
7660 |
fix x assume x: "x \<ge> inverse (1 + real k)" |
|
7661 |
have "0 < inverse (1 + real k)" by simp |
|
7662 |
also note x |
|
7663 |
finally have "x > 0" . |
|
7664 |
} note x = this |
|
63469
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7665 |
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
|
7666 |
inverse (real (Suc k)) powr (a + 1) / (a + 1)) {inverse (real (Suc k))..c}" |
63296 | 7667 |
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
|
7668 |
(auto intro!: derivative_eq_intros continuous_on_powr' continuous_on_const |
63296 | 7669 |
continuous_on_id simp: has_field_derivative_iff_has_vector_derivative [symmetric]) |
7670 |
with True show ?thesis unfolding f_def F_def by (subst has_integral_restrict) simp_all |
|
7671 |
next |
|
7672 |
case False |
|
7673 |
thus ?thesis unfolding f_def F_def by (subst has_integral_restrict) auto |
|
7674 |
qed |
|
7675 |
} note has_integral_f = this |
|
7676 |
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
|
7677 |
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
|
7678 |
|
b6900858dcb9
lots of new theorems about differentiable_on, retracts, ANRs, etc.
paulson <lp15@cam.ac.uk>
parents:
63305
diff
changeset
|
7679 |
have A: "(\<lambda>x. x powr a) integrable_on {0..c} \<and> |
63296 | 7680 |
(\<lambda>k. integral {0..c} (f k)) \<longlonglongrightarrow> integral {0..c} (\<lambda>x. x powr a)" |
7681 |
proof (intro monotone_convergence_increasing ballI allI) |
|
7682 |
fix k from has_integral_f[of k] show "f k integrable_on {0..c}" |
|
7683 |
by (auto simp: integrable_on_def) |
|
7684 |
next |
|
7685 |
fix k :: nat and x :: real |
|
7686 |
{ |
|
7687 |
assume x: "inverse (real (Suc k)) \<le> x" |
|
7688 |
have "inverse (real (Suc (Suc k))) \<le> inverse (real (Suc k))" by (simp add: field_simps) |
|
7689 |
also note x |
|
7690 |
finally have "inverse (real (Suc (Suc k))) \<le> x" . |
|
7691 |
} |
|
7692 |
thus "f k x \<le> f (Suc k) x" by (auto simp: f_def simp del: of_nat_Suc) |
|
7693 |
next |
|
7694 |
fix x assume x: "x \<in> {0..c}" |
|
7695 |
show "(\<lambda>k. f k x) \<longlonglongrightarrow> x powr a" |
|
7696 |
proof (cases "x = 0") |
|
7697 |
case False |
|
7698 |
with x have "x > 0" by simp |
|
7699 |
from order_tendstoD(2)[OF LIMSEQ_inverse_real_of_nat this] |
|
7700 |
have "eventually (\<lambda>k. x powr a = f k x) sequentially" |
|
7701 |
by eventually_elim (insert x, simp add: f_def) |
|
7702 |
moreover have "(\<lambda>_. x powr a) \<longlonglongrightarrow> x powr a" by simp |
|
7703 |
ultimately show ?thesis by (rule Lim_transform_eventually) |
|
7704 |
qed (simp_all add: f_def) |
|
7705 |
next |
|
7706 |
{ |
|
7707 |
fix k |
|
7708 |
from a have "F k \<le> c powr (a + 1) / (a + 1)" |
|
7709 |
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
|
7710 |
also from a have "F k \<ge> 0" |
63296 | 7711 |
by (auto simp: F_def divide_simps simp del: of_nat_Suc intro!: powr_mono2) |
7712 |
hence "F k = abs (F k)" by simp |
|
7713 |
finally have "abs (F k) \<le> c powr (a + 1) / (a + 1)" . |
|
7714 |
} |
|
7715 |
thus "bounded {integral {0..c} (f k) |k. True}" |
|
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
|
7716 |
by (intro boundedI[of _ "c powr (a+1) / (a+1)"]) (auto simp: integral_f) |
63296 | 7717 |
qed |
7718 |
||
7719 |
from False c have "c > 0" by simp |
|
7720 |
from order_tendstoD(2)[OF LIMSEQ_inverse_real_of_nat this] |
|
7721 |
have "eventually (\<lambda>k. c powr (a + 1) / (a + 1) - inverse (real (Suc k)) powr (a+1) / (a+1) = |
|
7722 |
integral {0..c} (f k)) sequentially" |
|
7723 |
by eventually_elim (simp add: integral_f F_def) |
|
7724 |
moreover have "(\<lambda>k. c powr (a + 1) / (a + 1) - inverse (real (Suc k)) powr (a + 1) / (a + 1)) |
|
7725 |
\<longlonglongrightarrow> c powr (a + 1) / (a + 1) - 0 powr (a + 1) / (a + 1)" |
|
7726 |
using a by (intro tendsto_intros LIMSEQ_inverse_real_of_nat) auto |
|
7727 |
hence "(\<lambda>k. c powr (a + 1) / (a + 1) - inverse (real (Suc k)) powr (a + 1) / (a + 1)) |
|
7728 |
\<longlonglongrightarrow> c powr (a + 1) / (a + 1)" by simp |
|
7729 |
ultimately have "(\<lambda>k. integral {0..c} (f k)) \<longlonglongrightarrow> c powr (a+1) / (a+1)" |
|
7730 |
by (rule Lim_transform_eventually) |
|
7731 |
with A have "integral {0..c} (\<lambda>x. x powr a) = c powr (a+1) / (a+1)" |
|
7732 |
by (blast intro: LIMSEQ_unique) |
|
7733 |
with A show ?thesis by (simp add: has_integral_integral) |
|
7734 |
qed (simp_all add: has_integral_refl) |
|
7735 |
||
7736 |
lemma integrable_on_powr_from_0: |
|
7737 |
assumes a: "a > (-1::real)" and c: "c \<ge> 0" |
|
7738 |
shows "(\<lambda>x. x powr a) integrable_on {0..c}" |
|
7739 |
using has_integral_powr_from_0[OF assms] unfolding integrable_on_def by blast |
|
7740 |
||
63721 | 7741 |
lemma has_integral_powr_to_inf: |
7742 |
fixes a e :: real |
|
7743 |
assumes "e < -1" "a > 0" |
|
7744 |
shows "((\<lambda>x. x powr e) has_integral -(a powr (e + 1)) / (e + 1)) {a..}" |
|
7745 |
proof - |
|
7746 |
define f :: "nat \<Rightarrow> real \<Rightarrow> real" where "f = (\<lambda>n x. if x \<in> {a..n} then x powr e else 0)" |
|
7747 |
define F where "F = (\<lambda>x. x powr (e + 1) / (e + 1))" |
|
7748 |
||
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7749 |
have has_integral_f: "(f n has_integral (F n - F a)) {a..}" |
63721 | 7750 |
if n: "n \<ge> a" for n :: nat |
7751 |
proof - |
|
7752 |
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
|
7753 |
by (intro fundamental_theorem_of_calculus) (auto intro!: derivative_eq_intros |
63721 | 7754 |
simp: has_field_derivative_iff_has_vector_derivative [symmetric] F_def) |
7755 |
hence "(f n has_integral (F n - F a)) {a..n}" |
|
7756 |
by (rule has_integral_eq [rotated]) (simp add: f_def) |
|
7757 |
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
|
7758 |
by (rule has_integral_on_superset) (auto simp: f_def) |
63721 | 7759 |
qed |
7760 |
have integral_f: "integral {a..} (f n) = (if n \<ge> a then F n - F a else 0)" for n :: nat |
|
7761 |
proof (cases "n \<ge> a") |
|
7762 |
case True |
|
7763 |
with has_integral_f[OF this] show ?thesis by (simp add: integral_unique) |
|
7764 |
next |
|
7765 |
case False |
|
7766 |
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
|
7767 |
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
|
7768 |
by (rule has_integral_on_superset) (insert False, simp_all add: f_def) |
63721 | 7769 |
with False show ?thesis by (simp add: integral_unique) |
7770 |
qed |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7771 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7772 |
have *: "(\<lambda>x. x powr e) integrable_on {a..} \<and> |
63721 | 7773 |
(\<lambda>n. integral {a..} (f n)) \<longlonglongrightarrow> integral {a..} (\<lambda>x. x powr e)" |
7774 |
proof (intro monotone_convergence_increasing allI ballI) |
|
7775 |
fix n :: nat |
|
7776 |
from assms have "(\<lambda>x. x powr e) integrable_on {a..n}" |
|
7777 |
by (auto intro!: integrable_continuous_real continuous_intros) |
|
7778 |
hence "f n integrable_on {a..n}" |
|
7779 |
by (rule integrable_eq [rotated]) (auto simp: f_def) |
|
7780 |
thus "f n integrable_on {a..}" |
|
7781 |
by (rule integrable_on_superset [rotated 2]) (auto simp: f_def) |
|
7782 |
next |
|
7783 |
fix n :: nat and x :: real |
|
7784 |
show "f n x \<le> f (Suc n) x" by (auto simp: f_def) |
|
7785 |
next |
|
7786 |
fix x :: real assume x: "x \<in> {a..}" |
|
7787 |
from filterlim_real_sequentially |
|
7788 |
have "eventually (\<lambda>n. real n \<ge> x) at_top" |
|
7789 |
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
|
7790 |
with x have "eventually (\<lambda>n. f n x = x powr e) at_top" |
63721 | 7791 |
by (auto elim!: eventually_mono simp: f_def) |
7792 |
thus "(\<lambda>n. f n x) \<longlonglongrightarrow> x powr e" by (simp add: Lim_eventually) |
|
7793 |
next |
|
7794 |
have "norm (integral {a..} (f n)) \<le> -F a" for n :: nat |
|
7795 |
proof (cases "n \<ge> a") |
|
7796 |
case True |
|
7797 |
with assms have "a powr (e + 1) \<ge> n powr (e + 1)" |
|
7798 |
by (intro powr_mono2') simp_all |
|
7799 |
with assms show ?thesis by (auto simp: divide_simps F_def integral_f) |
|
7800 |
qed (insert assms, simp add: integral_f F_def divide_simps) |
|
7801 |
thus "bounded {integral {a..} (f n) |n. True}" |
|
7802 |
unfolding bounded_iff by (intro exI[of _ "-F a"]) auto |
|
7803 |
qed |
|
7804 |
||
7805 |
from filterlim_real_sequentially |
|
7806 |
have "eventually (\<lambda>n. real n \<ge> a) at_top" |
|
7807 |
by (simp add: filterlim_at_top) |
|
7808 |
hence "eventually (\<lambda>n. F n - F a = integral {a..} (f n)) at_top" |
|
7809 |
by eventually_elim (simp add: integral_f) |
|
7810 |
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
|
7811 |
by (insert assms, (rule tendsto_intros filterlim_compose[OF tendsto_neg_powr] |
63721 | 7812 |
filterlim_ident filterlim_real_sequentially | simp)+) |
7813 |
hence "(\<lambda>n. F n - F a) \<longlonglongrightarrow> -F a" by simp |
|
7814 |
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
|
7815 |
from conjunct2[OF *] and this |
63721 | 7816 |
have "integral {a..} (\<lambda>x. x powr e) = -F a" by (rule LIMSEQ_unique) |
7817 |
with conjunct1[OF *] show ?thesis |
|
7818 |
by (simp add: has_integral_integral F_def) |
|
7819 |
qed |
|
7820 |
||
7821 |
lemma has_integral_inverse_power_to_inf: |
|
7822 |
fixes a :: real and n :: nat |
|
7823 |
assumes "n > 1" "a > 0" |
|
7824 |
shows "((\<lambda>x. 1 / x ^ n) has_integral 1 / (real (n - 1) * a ^ (n - 1))) {a..}" |
|
7825 |
proof - |
|
7826 |
from assms have "real_of_int (-int n) < -1" by simp |
|
7827 |
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
|
7828 |
also have "- (a powr (real_of_int (- int n) + 1)) / (real_of_int (- int n) + 1) = |
63721 | 7829 |
1 / (real (n - 1) * a powr (real (n - 1)))" using assms |
7830 |
by (simp add: divide_simps powr_add [symmetric] of_nat_diff) |
|
7831 |
also from assms have "a powr (real (n - 1)) = a ^ (n - 1)" |
|
7832 |
by (intro powr_realpow) |
|
7833 |
finally show ?thesis |
|
7834 |
by (rule has_integral_eq [rotated]) |
|
7835 |
(insert assms, simp_all add: powr_minus powr_realpow divide_simps) |
|
7836 |
qed |
|
7837 |
||
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7838 |
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
|
7839 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7840 |
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
|
7841 |
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
|
7842 |
assumes "f integrable_on s" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7843 |
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
|
7844 |
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
|
7845 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7846 |
lemma content_closed_interval: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7847 |
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
|
7848 |
assumes "a \<le> b" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7849 |
shows "content {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
|
7850 |
using content_cbox[of a b] assms |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7851 |
by (simp add: cbox_interval eucl_le[where 'a='a]) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7852 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7853 |
lemma integrable_const_ivl[intro]: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7854 |
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
|
7855 |
shows "(\<lambda>x. c) integrable_on {a .. b}" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7856 |
unfolding cbox_interval[symmetric] |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7857 |
by (rule integrable_const) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7858 |
|
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7859 |
lemma integrable_on_subinterval: |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7860 |
fixes f :: "'n::ordered_euclidean_space \<Rightarrow> 'a::banach" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7861 |
assumes "f integrable_on s" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7862 |
and "{a .. b} \<subseteq> s" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7863 |
shows "f integrable_on {a .. b}" |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7864 |
using integrable_on_subcbox[of f s a b] assms |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7865 |
by (simp add: cbox_interval) |
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63721
diff
changeset
|
7866 |
|
35173
9b24bfca8044
Renamed Multivariate-Analysis/Integration to Multivariate-Analysis/Integration_MV to avoid name clash with Integration.
hoelzl
parents:
35172
diff
changeset
|
7867 |
end |