author | hoelzl |
Fri, 16 Sep 2016 13:56:51 +0200 | |
changeset 63886 | 685fb01256af |
parent 63589 | 58aab4745e85 |
child 64283 | 979cdfdf7a79 |
permissions | -rw-r--r-- |
63329 | 1 |
(* Title: HOL/Probability/Levy.thy |
2 |
Authors: Jeremy Avigad (CMU) |
|
62083 | 3 |
*) |
4 |
||
5 |
section \<open>The Levy inversion theorem, and the Levy continuity theorem.\<close> |
|
6 |
||
7 |
theory Levy |
|
8 |
imports Characteristic_Functions Helly_Selection Sinc_Integral |
|
9 |
begin |
|
10 |
||
11 |
lemma LIM_zero_cancel: |
|
12 |
fixes f :: "_ \<Rightarrow> 'b::real_normed_vector" |
|
13 |
shows "((\<lambda>x. f x - l) \<longlongrightarrow> 0) F \<Longrightarrow> (f \<longlongrightarrow> l) F" |
|
14 |
unfolding tendsto_iff dist_norm by simp |
|
15 |
||
16 |
subsection \<open>The Levy inversion theorem\<close> |
|
17 |
||
18 |
(* Actually, this is not needed for us -- but it is useful for other purposes. (See Billingsley.) *) |
|
19 |
lemma Levy_Inversion_aux1: |
|
20 |
fixes a b :: real |
|
21 |
assumes "a \<le> b" |
|
63589 | 22 |
shows "((\<lambda>t. (iexp (-(t * a)) - iexp (-(t * b))) / (\<i> * t)) \<longlongrightarrow> b - a) (at 0)" |
62083 | 23 |
(is "(?F \<longlongrightarrow> _) (at _)") |
24 |
proof - |
|
25 |
have 1: "cmod (?F t - (b - a)) \<le> a^2 / 2 * abs t + b^2 / 2 * abs t" if "t \<noteq> 0" for t |
|
26 |
proof - |
|
27 |
have "cmod (?F t - (b - a)) = cmod ( |
|
63589 | 28 |
(iexp (-(t * a)) - (1 + \<i> * -(t * a))) / (\<i> * t) - |
29 |
(iexp (-(t * b)) - (1 + \<i> * -(t * b))) / (\<i> * t))" |
|
30 |
(is "_ = cmod (?one / (\<i> * t) - ?two / (\<i> * t))") |
|
63167 | 31 |
using \<open>t \<noteq> 0\<close> by (intro arg_cong[where f=norm]) (simp add: field_simps) |
63589 | 32 |
also have "\<dots> \<le> cmod (?one / (\<i> * t)) + cmod (?two / (\<i> * t))" |
62083 | 33 |
by (rule norm_triangle_ineq4) |
63589 | 34 |
also have "cmod (?one / (\<i> * t)) = cmod ?one / abs t" |
62083 | 35 |
by (simp add: norm_divide norm_mult) |
63589 | 36 |
also have "cmod (?two / (\<i> * t)) = cmod ?two / abs t" |
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
37 |
by (simp add: norm_divide norm_mult) |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
38 |
also have "cmod ?one / abs t + cmod ?two / abs t \<le> |
62083 | 39 |
((- (a * t))^2 / 2) / abs t + ((- (b * t))^2 / 2) / abs t" |
40 |
apply (rule add_mono) |
|
41 |
apply (rule divide_right_mono) |
|
42 |
using iexp_approx1 [of "-(t * a)" 1] apply (simp add: field_simps eval_nat_numeral) |
|
43 |
apply force |
|
44 |
apply (rule divide_right_mono) |
|
45 |
using iexp_approx1 [of "-(t * b)" 1] apply (simp add: field_simps eval_nat_numeral) |
|
46 |
by force |
|
47 |
also have "\<dots> = a^2 / 2 * abs t + b^2 / 2 * abs t" |
|
63167 | 48 |
using \<open>t \<noteq> 0\<close> apply (case_tac "t \<ge> 0", simp add: field_simps power2_eq_square) |
49 |
using \<open>t \<noteq> 0\<close> by (subst (1 2) abs_of_neg, auto simp add: field_simps power2_eq_square) |
|
62083 | 50 |
finally show "cmod (?F t - (b - a)) \<le> a^2 / 2 * abs t + b^2 / 2 * abs t" . |
51 |
qed |
|
52 |
show ?thesis |
|
53 |
apply (rule LIM_zero_cancel) |
|
54 |
apply (rule tendsto_norm_zero_cancel) |
|
55 |
apply (rule real_LIM_sandwich_zero [OF _ _ 1]) |
|
56 |
apply (auto intro!: tendsto_eq_intros) |
|
57 |
done |
|
58 |
qed |
|
59 |
||
60 |
lemma Levy_Inversion_aux2: |
|
61 |
fixes a b t :: real |
|
62 |
assumes "a \<le> b" and "t \<noteq> 0" |
|
63589 | 63 |
shows "cmod ((iexp (t * b) - iexp (t * a)) / (\<i> * t)) \<le> b - a" (is "?F \<le> _") |
62083 | 64 |
proof - |
63589 | 65 |
have "?F = cmod (iexp (t * a) * (iexp (t * (b - a)) - 1) / (\<i> * t))" |
63167 | 66 |
using \<open>t \<noteq> 0\<close> by (intro arg_cong[where f=norm]) (simp add: field_simps exp_diff exp_minus) |
62083 | 67 |
also have "\<dots> = cmod (iexp (t * (b - a)) - 1) / abs t" |
63167 | 68 |
unfolding norm_divide norm_mult norm_exp_ii_times using \<open>t \<noteq> 0\<close> |
62083 | 69 |
by (simp add: complex_eq_iff norm_mult) |
70 |
also have "\<dots> \<le> abs (t * (b - a)) / abs t" |
|
71 |
using iexp_approx1 [of "t * (b - a)" 0] |
|
72 |
by (intro divide_right_mono) (auto simp add: field_simps eval_nat_numeral) |
|
73 |
also have "\<dots> = b - a" |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
74 |
using assms by (auto simp add: abs_mult) |
62083 | 75 |
finally show ?thesis . |
76 |
qed |
|
77 |
||
78 |
(* TODO: refactor! *) |
|
79 |
theorem (in real_distribution) Levy_Inversion: |
|
80 |
fixes a b :: real |
|
81 |
assumes "a \<le> b" |
|
82 |
defines "\<mu> \<equiv> measure M" and "\<phi> \<equiv> char M" |
|
83 |
assumes "\<mu> {a} = 0" and "\<mu> {b} = 0" |
|
63589 | 84 |
shows "(\<lambda>T. 1 / (2 * pi) * (CLBINT t=-T..T. (iexp (-(t * a)) - iexp (-(t * b))) / (\<i> * t) * \<phi> t)) |
62083 | 85 |
\<longlonglongrightarrow> \<mu> {a<..b}" |
86 |
(is "(\<lambda>T. 1 / (2 * pi) * (CLBINT t=-T..T. ?F t * \<phi> t)) \<longlonglongrightarrow> of_real (\<mu> {a<..b})") |
|
87 |
proof - |
|
88 |
interpret P: pair_sigma_finite lborel M .. |
|
89 |
from bounded_Si obtain B where Bprop: "\<And>T. abs (Si T) \<le> B" by auto |
|
90 |
from Bprop [of 0] have [simp]: "B \<ge> 0" by auto |
|
63589 | 91 |
let ?f = "\<lambda>t x :: real. (iexp (t * (x - a)) - iexp(t * (x - b))) / (\<i> * t)" |
62083 | 92 |
{ fix T :: real |
93 |
assume "T \<ge> 0" |
|
94 |
let ?f' = "\<lambda>(t, x). indicator {-T<..<T} t *\<^sub>R ?f t x" |
|
95 |
{ fix x |
|
96 |
have 1: "complex_interval_lebesgue_integrable lborel u v (\<lambda>t. ?f t x)" for u v :: real |
|
97 |
using Levy_Inversion_aux2[of "x - b" "x - a"] |
|
98 |
apply (simp add: interval_lebesgue_integrable_def del: times_divide_eq_left) |
|
99 |
apply (intro integrableI_bounded_set_indicator[where B="b - a"] conjI impI) |
|
100 |
apply (auto intro!: AE_I [of _ _ "{0}"] simp: assms) |
|
101 |
done |
|
102 |
have "(CLBINT t. ?f' (t, x)) = (CLBINT t=-T..T. ?f t x)" |
|
63167 | 103 |
using \<open>T \<ge> 0\<close> by (simp add: interval_lebesgue_integral_def) |
62083 | 104 |
also have "\<dots> = (CLBINT t=-T..(0 :: real). ?f t x) + (CLBINT t=(0 :: real)..T. ?f t x)" |
105 |
(is "_ = _ + ?t") |
|
106 |
using 1 by (intro interval_integral_sum[symmetric]) (simp add: min_absorb1 max_absorb2 \<open>T \<ge> 0\<close>) |
|
107 |
also have "(CLBINT t=-T..(0 :: real). ?f t x) = (CLBINT t=(0::real)..T. ?f (-t) x)" |
|
108 |
by (subst interval_integral_reflect) auto |
|
109 |
also have "\<dots> + ?t = (CLBINT t=(0::real)..T. ?f (-t) x + ?f t x)" |
|
110 |
using 1 |
|
111 |
by (intro interval_lebesgue_integral_add(2) [symmetric] interval_integrable_mirror[THEN iffD2]) simp_all |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
112 |
also have "\<dots> = (CLBINT t=(0::real)..T. ((iexp(t * (x - a)) - iexp (-(t * (x - a)))) - |
63589 | 113 |
(iexp(t * (x - b)) - iexp (-(t * (x - b))))) / (\<i> * t))" |
63167 | 114 |
using \<open>T \<ge> 0\<close> by (intro interval_integral_cong) (auto simp add: divide_simps) |
62083 | 115 |
also have "\<dots> = (CLBINT t=(0::real)..T. complex_of_real( |
116 |
2 * (sin (t * (x - a)) / t) - 2 * (sin (t * (x - b)) / t)))" |
|
63167 | 117 |
using \<open>T \<ge> 0\<close> |
62083 | 118 |
apply (intro interval_integral_cong) |
119 |
apply (simp add: field_simps cis.ctr Im_divide Re_divide Im_exp Re_exp complex_eq_iff) |
|
120 |
unfolding minus_diff_eq[symmetric, of "y * x" "y * a" for y a] sin_minus cos_minus |
|
121 |
apply (simp add: field_simps power2_eq_square) |
|
122 |
done |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
123 |
also have "\<dots> = complex_of_real (LBINT t=(0::real)..T. |
62083 | 124 |
2 * (sin (t * (x - a)) / t) - 2 * (sin (t * (x - b)) / t))" |
125 |
by (rule interval_lebesgue_integral_of_real) |
|
126 |
also have "\<dots> = complex_of_real (2 * (sgn (x - a) * Si (T * abs (x - a)) - |
|
127 |
sgn (x - b) * Si (T * abs (x - b))))" |
|
128 |
apply (subst interval_lebesgue_integral_diff) |
|
129 |
apply (rule interval_lebesgue_integrable_mult_right, rule integrable_sinc')+ |
|
130 |
apply (subst interval_lebesgue_integral_mult_right)+ |
|
63167 | 131 |
apply (simp add: zero_ereal_def[symmetric] LBINT_I0c_sin_scale_divide[OF \<open>T \<ge> 0\<close>]) |
62083 | 132 |
done |
133 |
finally have "(CLBINT t. ?f' (t, x)) = |
|
134 |
2 * (sgn (x - a) * Si (T * abs (x - a)) - sgn (x - b) * Si (T * abs (x - b)))" . |
|
135 |
} note main_eq = this |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
136 |
have "(CLBINT t=-T..T. ?F t * \<phi> t) = |
62083 | 137 |
(CLBINT t. (CLINT x | M. ?F t * iexp (t * x) * indicator {-T<..<T} t))" |
63167 | 138 |
using \<open>T \<ge> 0\<close> unfolding \<phi>_def char_def interval_lebesgue_integral_def |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63589
diff
changeset
|
139 |
by (auto split: split_indicator intro!: Bochner_Integration.integral_cong) |
62083 | 140 |
also have "\<dots> = (CLBINT t. (CLINT x | M. ?f' (t, x)))" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63589
diff
changeset
|
141 |
by (auto intro!: Bochner_Integration.integral_cong simp: field_simps exp_diff exp_minus split: split_indicator) |
62083 | 142 |
also have "\<dots> = (CLINT x | M. (CLBINT t. ?f' (t, x)))" |
143 |
proof (intro P.Fubini_integral [symmetric] integrableI_bounded_set [where B="b - a"]) |
|
144 |
show "emeasure (lborel \<Otimes>\<^sub>M M) ({- T<..<T} \<times> space M) < \<infinity>" |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
145 |
using \<open>T \<ge> 0\<close> |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
146 |
by (subst emeasure_pair_measure_Times) |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
147 |
(auto simp: ennreal_mult_less_top not_less top_unique) |
62083 | 148 |
show "AE x\<in>{- T<..<T} \<times> space M in lborel \<Otimes>\<^sub>M M. cmod (case x of (t, x) \<Rightarrow> ?f' (t, x)) \<le> b - a" |
63167 | 149 |
using Levy_Inversion_aux2[of "x - b" "x - a" for x] \<open>a \<le> b\<close> |
62083 | 150 |
by (intro AE_I [of _ _ "{0} \<times> UNIV"]) (force simp: emeasure_pair_measure_Times)+ |
151 |
qed (auto split: split_indicator split_indicator_asm) |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
152 |
also have "\<dots> = (CLINT x | M. (complex_of_real (2 * (sgn (x - a) * |
62083 | 153 |
Si (T * abs (x - a)) - sgn (x - b) * Si (T * abs (x - b))))))" |
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63589
diff
changeset
|
154 |
using main_eq by (intro Bochner_Integration.integral_cong, auto) |
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
155 |
also have "\<dots> = complex_of_real (LINT x | M. (2 * (sgn (x - a) * |
62083 | 156 |
Si (T * abs (x - a)) - sgn (x - b) * Si (T * abs (x - b)))))" |
157 |
by (rule integral_complex_of_real) |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
158 |
finally have "(CLBINT t=-T..T. ?F t * \<phi> t) = |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
159 |
complex_of_real (LINT x | M. (2 * (sgn (x - a) * |
62083 | 160 |
Si (T * abs (x - a)) - sgn (x - b) * Si (T * abs (x - b)))))" . |
161 |
} note main_eq2 = this |
|
162 |
||
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
163 |
have "(\<lambda>T :: nat. LINT x | M. (2 * (sgn (x - a) * |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
164 |
Si (T * abs (x - a)) - sgn (x - b) * Si (T * abs (x - b))))) \<longlonglongrightarrow> |
62083 | 165 |
(LINT x | M. 2 * pi * indicator {a<..b} x)" |
166 |
proof (rule integral_dominated_convergence [where w="\<lambda>x. 4 * B"]) |
|
167 |
show "integrable M (\<lambda>x. 4 * B)" |
|
168 |
by (rule integrable_const_bound [of _ "4 * B"]) auto |
|
169 |
next |
|
170 |
let ?S = "\<lambda>n::nat. \<lambda>x. sgn (x - a) * Si (n * \<bar>x - a\<bar>) - sgn (x - b) * Si (n * \<bar>x - b\<bar>)" |
|
171 |
{ fix n x |
|
172 |
have "norm (?S n x) \<le> norm (sgn (x - a) * Si (n * \<bar>x - a\<bar>)) + norm (sgn (x - b) * Si (n * \<bar>x - b\<bar>))" |
|
173 |
by (rule norm_triangle_ineq4) |
|
174 |
also have "\<dots> \<le> B + B" |
|
175 |
using Bprop by (intro add_mono) (auto simp: abs_mult abs_sgn_eq) |
|
176 |
finally have "norm (2 * ?S n x) \<le> 4 * B" |
|
177 |
by simp } |
|
178 |
then show "\<And>n. AE x in M. norm (2 * ?S n x) \<le> 4 * B" |
|
179 |
by auto |
|
180 |
have "AE x in M. x \<noteq> a" "AE x in M. x \<noteq> b" |
|
63167 | 181 |
using prob_eq_0[of "{a}"] prob_eq_0[of "{b}"] \<open>\<mu> {a} = 0\<close> \<open>\<mu> {b} = 0\<close> by (auto simp: \<mu>_def) |
62083 | 182 |
then show "AE x in M. (\<lambda>n. 2 * ?S n x) \<longlonglongrightarrow> 2 * pi * indicator {a<..b} x" |
183 |
proof eventually_elim |
|
184 |
fix x assume x: "x \<noteq> a" "x \<noteq> b" |
|
185 |
then have "(\<lambda>n. 2 * (sgn (x - a) * Si (\<bar>x - a\<bar> * n) - sgn (x - b) * Si (\<bar>x - b\<bar> * n))) |
|
186 |
\<longlonglongrightarrow> 2 * (sgn (x - a) * (pi / 2) - sgn (x - b) * (pi / 2))" |
|
187 |
by (intro tendsto_intros filterlim_compose[OF Si_at_top] |
|
188 |
filterlim_tendsto_pos_mult_at_top[OF tendsto_const] filterlim_real_sequentially) |
|
189 |
auto |
|
190 |
also have "(\<lambda>n. 2 * (sgn (x - a) * Si (\<bar>x - a\<bar> * n) - sgn (x - b) * Si (\<bar>x - b\<bar> * n))) = (\<lambda>n. 2 * ?S n x)" |
|
191 |
by (auto simp: ac_simps) |
|
192 |
also have "2 * (sgn (x - a) * (pi / 2) - sgn (x - b) * (pi / 2)) = 2 * pi * indicator {a<..b} x" |
|
63167 | 193 |
using x \<open>a \<le> b\<close> by (auto split: split_indicator) |
62083 | 194 |
finally show "(\<lambda>n. 2 * ?S n x) \<longlonglongrightarrow> 2 * pi * indicator {a<..b} x" . |
195 |
qed |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
196 |
qed simp_all |
62083 | 197 |
also have "(LINT x | M. 2 * pi * indicator {a<..b} x) = 2 * pi * \<mu> {a<..b}" |
198 |
by (simp add: \<mu>_def) |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
199 |
finally have "(\<lambda>T. LINT x | M. (2 * (sgn (x - a) * |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
200 |
Si (T * abs (x - a)) - sgn (x - b) * Si (T * abs (x - b))))) \<longlonglongrightarrow> |
62083 | 201 |
2 * pi * \<mu> {a<..b}" . |
202 |
with main_eq2 show ?thesis |
|
203 |
by (auto intro!: tendsto_eq_intros) |
|
204 |
qed |
|
205 |
||
206 |
theorem Levy_uniqueness: |
|
207 |
fixes M1 M2 :: "real measure" |
|
208 |
assumes "real_distribution M1" "real_distribution M2" and |
|
209 |
"char M1 = char M2" |
|
210 |
shows "M1 = M2" |
|
211 |
proof - |
|
212 |
interpret M1: real_distribution M1 by (rule assms) |
|
213 |
interpret M2: real_distribution M2 by (rule assms) |
|
214 |
have "countable ({x. measure M1 {x} \<noteq> 0} \<union> {x. measure M2 {x} \<noteq> 0})" |
|
215 |
by (intro countable_Un M2.countable_support M1.countable_support) |
|
216 |
then have count: "countable {x. measure M1 {x} \<noteq> 0 \<or> measure M2 {x} \<noteq> 0}" |
|
217 |
by (simp add: Un_def) |
|
218 |
||
219 |
have "cdf M1 = cdf M2" |
|
220 |
proof (rule ext) |
|
221 |
fix x |
|
63393 | 222 |
let ?D = "\<lambda>x. \<bar>cdf M1 x - cdf M2 x\<bar>" |
62083 | 223 |
|
224 |
{ fix \<epsilon> :: real |
|
225 |
assume "\<epsilon> > 0" |
|
63393 | 226 |
have "(?D \<longlongrightarrow> 0) at_bot" |
227 |
using \<open>(cdf M1 \<longlongrightarrow> 0) at_bot\<close> \<open>(cdf M2 \<longlongrightarrow> 0) at_bot\<close> by (intro tendsto_eq_intros) auto |
|
228 |
then have "eventually (\<lambda>y. ?D y < \<epsilon> / 2 \<and> y \<le> x) at_bot" |
|
229 |
using \<open>\<epsilon> > 0\<close> by (simp only: tendsto_iff dist_real_def diff_0_right eventually_conj eventually_le_at_bot abs_idempotent) |
|
230 |
then obtain M where "\<And>y. y \<le> M \<Longrightarrow> ?D y < \<epsilon> / 2" "M \<le> x" |
|
62083 | 231 |
unfolding eventually_at_bot_linorder by auto |
232 |
with open_minus_countable[OF count, of "{..< M}"] obtain a where |
|
63393 | 233 |
"measure M1 {a} = 0" "measure M2 {a} = 0" "a < M" "a \<le> x" and 1: "?D a < \<epsilon> / 2" |
62083 | 234 |
by auto |
235 |
||
63393 | 236 |
have "(?D \<longlongrightarrow> ?D x) (at_right x)" |
237 |
using M1.cdf_is_right_cont [of x] M2.cdf_is_right_cont [of x] |
|
238 |
by (intro tendsto_intros) (auto simp add: continuous_within) |
|
239 |
then have "eventually (\<lambda>y. \<bar>?D y - ?D x\<bar> < \<epsilon> / 2) (at_right x)" |
|
240 |
using \<open>\<epsilon> > 0\<close> by (simp only: tendsto_iff dist_real_def eventually_conj eventually_at_right_less) |
|
241 |
then obtain N where "N > x" "\<And>y. x < y \<Longrightarrow> y < N \<Longrightarrow> \<bar>?D y - ?D x\<bar> < \<epsilon> / 2" |
|
62083 | 242 |
by (auto simp add: eventually_at_right[OF less_add_one]) |
243 |
with open_minus_countable[OF count, of "{x <..< N}"] obtain b where "x < b" "b < N" |
|
63393 | 244 |
"measure M1 {b} = 0" "measure M2 {b} = 0" and 2: "\<bar>?D b - ?D x\<bar> < \<epsilon> / 2" |
62083 | 245 |
by (auto simp: abs_minus_commute) |
63167 | 246 |
from \<open>a \<le> x\<close> \<open>x < b\<close> have "a < b" "a \<le> b" by auto |
62083 | 247 |
|
63167 | 248 |
from \<open>char M1 = char M2\<close> |
63393 | 249 |
M1.Levy_Inversion [OF \<open>a \<le> b\<close> \<open>measure M1 {a} = 0\<close> \<open>measure M1 {b} = 0\<close>] |
63167 | 250 |
M2.Levy_Inversion [OF \<open>a \<le> b\<close> \<open>measure M2 {a} = 0\<close> \<open>measure M2 {b} = 0\<close>] |
62083 | 251 |
have "complex_of_real (measure M1 {a<..b}) = complex_of_real (measure M2 {a<..b})" |
252 |
by (intro LIMSEQ_unique) auto |
|
63393 | 253 |
then have "?D a = ?D b" |
254 |
unfolding of_real_eq_iff M1.cdf_diff_eq [OF \<open>a < b\<close>, symmetric] M2.cdf_diff_eq [OF \<open>a < b\<close>, symmetric] by simp |
|
255 |
then have "?D x = \<bar>(?D b - ?D x) - ?D a\<bar>" |
|
62083 | 256 |
by simp |
63393 | 257 |
also have "\<dots> \<le> \<bar>?D b - ?D x\<bar> + \<bar>?D a\<bar>" |
258 |
by (rule abs_triangle_ineq4) |
|
259 |
also have "\<dots> \<le> \<epsilon> / 2 + \<epsilon> / 2" |
|
260 |
using 1 2 by (intro add_mono) auto |
|
261 |
finally have "?D x \<le> \<epsilon>" by simp } |
|
62083 | 262 |
then show "cdf M1 x = cdf M2 x" |
263 |
by (metis abs_le_zero_iff dense_ge eq_iff_diff_eq_0) |
|
264 |
qed |
|
265 |
thus ?thesis |
|
63167 | 266 |
by (rule cdf_unique [OF \<open>real_distribution M1\<close> \<open>real_distribution M2\<close>]) |
62083 | 267 |
qed |
268 |
||
269 |
||
270 |
subsection \<open>The Levy continuity theorem\<close> |
|
271 |
||
272 |
theorem levy_continuity1: |
|
273 |
fixes M :: "nat \<Rightarrow> real measure" and M' :: "real measure" |
|
274 |
assumes "\<And>n. real_distribution (M n)" "real_distribution M'" "weak_conv_m M M'" |
|
275 |
shows "(\<lambda>n. char (M n) t) \<longlonglongrightarrow> char M' t" |
|
276 |
unfolding char_def using assms by (rule weak_conv_imp_integral_bdd_continuous_conv) auto |
|
277 |
||
278 |
theorem levy_continuity: |
|
279 |
fixes M :: "nat \<Rightarrow> real measure" and M' :: "real measure" |
|
280 |
assumes real_distr_M : "\<And>n. real_distribution (M n)" |
|
281 |
and real_distr_M': "real_distribution M'" |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
282 |
and char_conv: "\<And>t. (\<lambda>n. char (M n) t) \<longlonglongrightarrow> char M' t" |
62083 | 283 |
shows "weak_conv_m M M'" |
284 |
proof - |
|
285 |
interpret Mn: real_distribution "M n" for n by fact |
|
286 |
interpret M': real_distribution M' by fact |
|
287 |
||
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
288 |
have *: "\<And>u x. u > 0 \<Longrightarrow> x \<noteq> 0 \<Longrightarrow> (CLBINT t:{-u..u}. 1 - iexp (t * x)) = |
62083 | 289 |
2 * (u - sin (u * x) / x)" |
290 |
proof - |
|
291 |
fix u :: real and x :: real |
|
292 |
assume "u > 0" and "x \<noteq> 0" |
|
293 |
hence "(CLBINT t:{-u..u}. 1 - iexp (t * x)) = (CLBINT t=-u..u. 1 - iexp (t * x))" |
|
294 |
by (subst interval_integral_Icc, auto) |
|
295 |
also have "\<dots> = (CLBINT t=-u..0. 1 - iexp (t * x)) + (CLBINT t=0..u. 1 - iexp (t * x))" |
|
63167 | 296 |
using \<open>u > 0\<close> |
62083 | 297 |
apply (subst interval_integral_sum) |
298 |
apply (simp add: min_absorb1 min_absorb2 max_absorb1 max_absorb2) |
|
299 |
apply (rule interval_integrable_isCont) |
|
300 |
apply auto |
|
301 |
done |
|
302 |
also have "\<dots> = (CLBINT t=ereal 0..u. 1 - iexp (t * -x)) + (CLBINT t=ereal 0..u. 1 - iexp (t * x))" |
|
303 |
apply (subgoal_tac "0 = ereal 0", erule ssubst) |
|
304 |
by (subst interval_integral_reflect, auto) |
|
305 |
also have "\<dots> = (LBINT t=ereal 0..u. 2 - 2 * cos (t * x))" |
|
306 |
apply (subst interval_lebesgue_integral_add (2) [symmetric]) |
|
307 |
apply ((rule interval_integrable_isCont, auto)+) [2] |
|
308 |
unfolding exp_Euler cos_of_real |
|
309 |
apply (simp add: of_real_mult interval_lebesgue_integral_of_real[symmetric]) |
|
310 |
done |
|
311 |
also have "\<dots> = 2 * u - 2 * sin (u * x) / x" |
|
312 |
by (subst interval_lebesgue_integral_diff) |
|
313 |
(auto intro!: interval_integrable_isCont |
|
63167 | 314 |
simp: interval_lebesgue_integral_of_real integral_cos [OF \<open>x \<noteq> 0\<close>] mult.commute[of _ x]) |
62083 | 315 |
finally show "(CLBINT t:{-u..u}. 1 - iexp (t * x)) = 2 * (u - sin (u * x) / x)" |
316 |
by (simp add: field_simps) |
|
317 |
qed |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
318 |
have main_bound: "\<And>u n. u > 0 \<Longrightarrow> Re (CLBINT t:{-u..u}. 1 - char (M n) t) \<ge> |
62083 | 319 |
u * measure (M n) {x. abs x \<ge> 2 / u}" |
320 |
proof - |
|
321 |
fix u :: real and n |
|
322 |
assume "u > 0" |
|
323 |
interpret P: pair_sigma_finite "M n" lborel .. |
|
324 |
(* TODO: put this in the real_distribution locale as a simp rule? *) |
|
325 |
have Mn1 [simp]: "measure (M n) UNIV = 1" by (metis Mn.prob_space Mn.space_eq_univ) |
|
326 |
(* TODO: make this automatic somehow? *) |
|
327 |
have Mn2 [simp]: "\<And>x. complex_integrable (M n) (\<lambda>t. exp (\<i> * complex_of_real (x * t)))" |
|
328 |
by (rule Mn.integrable_const_bound [where B = 1], auto) |
|
329 |
have Mn3: "set_integrable (M n \<Otimes>\<^sub>M lborel) (UNIV \<times> {- u..u}) (\<lambda>a. 1 - exp (\<i> * complex_of_real (snd a * fst a)))" |
|
63167 | 330 |
using \<open>0 < u\<close> |
62083 | 331 |
by (intro integrableI_bounded_set_indicator [where B="2"]) |
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
332 |
(auto simp: lborel.emeasure_pair_measure_Times ennreal_mult_less_top not_less top_unique |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
333 |
split: split_indicator |
62083 | 334 |
intro!: order_trans [OF norm_triangle_ineq4]) |
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
335 |
have "(CLBINT t:{-u..u}. 1 - char (M n) t) = |
62083 | 336 |
(CLBINT t:{-u..u}. (CLINT x | M n. 1 - iexp (t * x)))" |
337 |
unfolding char_def by (rule set_lebesgue_integral_cong, auto simp del: of_real_mult) |
|
338 |
also have "\<dots> = (CLBINT t. (CLINT x | M n. indicator {-u..u} t *\<^sub>R (1 - iexp (t * x))))" |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63589
diff
changeset
|
339 |
by (rule Bochner_Integration.integral_cong) (auto split: split_indicator) |
62083 | 340 |
also have "\<dots> = (CLINT x | M n. (CLBINT t:{-u..u}. 1 - iexp (t * x)))" |
341 |
using Mn3 by (subst P.Fubini_integral) (auto simp: indicator_times split_beta') |
|
342 |
also have "\<dots> = (CLINT x | M n. (if x = 0 then 0 else 2 * (u - sin (u * x) / x)))" |
|
63886
685fb01256af
move Henstock-Kurzweil integration after Lebesgue_Measure; replace content by abbreviation measure lborel
hoelzl
parents:
63589
diff
changeset
|
343 |
using \<open>u > 0\<close> by (intro Bochner_Integration.integral_cong, auto simp add: * simp del: of_real_mult) |
62083 | 344 |
also have "\<dots> = (LINT x | M n. (if x = 0 then 0 else 2 * (u - sin (u * x) / x)))" |
345 |
by (rule integral_complex_of_real) |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
346 |
finally have "Re (CLBINT t:{-u..u}. 1 - char (M n) t) = |
62083 | 347 |
(LINT x | M n. (if x = 0 then 0 else 2 * (u - sin (u * x) / x)))" by simp |
348 |
also have "\<dots> \<ge> (LINT x : {x. abs x \<ge> 2 / u} | M n. u)" |
|
349 |
proof - |
|
350 |
have "complex_integrable (M n) (\<lambda>x. CLBINT t:{-u..u}. 1 - iexp (snd (x, t) * fst (x, t)))" |
|
351 |
using Mn3 by (intro P.integrable_fst) (simp add: indicator_times split_beta') |
|
352 |
hence "complex_integrable (M n) (\<lambda>x. if x = 0 then 0 else 2 * (u - sin (u * x) / x))" |
|
63167 | 353 |
using \<open>u > 0\<close> by (subst integrable_cong) (auto simp add: * simp del: of_real_mult) |
62083 | 354 |
hence **: "integrable (M n) (\<lambda>x. if x = 0 then 0 else 2 * (u - sin (u * x) / x))" |
355 |
unfolding complex_of_real_integrable_eq . |
|
356 |
have "2 * sin x \<le> x" if "2 \<le> x" for x :: real |
|
357 |
by (rule order_trans[OF _ \<open>2 \<le> x\<close>]) auto |
|
358 |
moreover have "x \<le> 2 * sin x" if "x \<le> - 2" for x :: real |
|
359 |
by (rule order_trans[OF \<open>x \<le> - 2\<close>]) auto |
|
360 |
moreover have "x < 0 \<Longrightarrow> x \<le> sin x" for x :: real |
|
361 |
using sin_x_le_x[of "-x"] by simp |
|
362 |
ultimately show ?thesis |
|
63167 | 363 |
using \<open>u > 0\<close> |
62083 | 364 |
by (intro integral_mono [OF _ **]) |
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
365 |
(auto simp: divide_simps sin_x_le_x mult.commute[of u] mult_neg_pos top_unique less_top[symmetric] |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
366 |
split: split_indicator) |
62083 | 367 |
qed |
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
368 |
also (xtrans) have "(LINT x : {x. abs x \<ge> 2 / u} | M n. u) = |
62083 | 369 |
u * measure (M n) {x. abs x \<ge> 2 / u}" |
370 |
by (simp add: Mn.emeasure_eq_measure) |
|
371 |
finally show "Re (CLBINT t:{-u..u}. 1 - char (M n) t) \<ge> u * measure (M n) {x. abs x \<ge> 2 / u}" . |
|
372 |
qed |
|
373 |
||
374 |
have tight_aux: "\<And>\<epsilon>. \<epsilon> > 0 \<Longrightarrow> \<exists>a b. a < b \<and> (\<forall>n. 1 - \<epsilon> < measure (M n) {a<..b})" |
|
375 |
proof - |
|
376 |
fix \<epsilon> :: real |
|
377 |
assume "\<epsilon> > 0" |
|
378 |
note M'.isCont_char [of 0] |
|
379 |
hence "\<exists>d>0. \<forall>t. abs t < d \<longrightarrow> cmod (char M' t - 1) < \<epsilon> / 4" |
|
380 |
apply (subst (asm) continuous_at_eps_delta) |
|
381 |
apply (drule_tac x = "\<epsilon> / 4" in spec) |
|
63167 | 382 |
using \<open>\<epsilon> > 0\<close> by (auto simp add: dist_real_def dist_complex_def M'.char_zero) |
62083 | 383 |
then obtain d where "d > 0 \<and> (\<forall>t. (abs t < d \<longrightarrow> cmod (char M' t - 1) < \<epsilon> / 4))" .. |
384 |
hence d0: "d > 0" and d1: "\<And>t. abs t < d \<Longrightarrow> cmod (char M' t - 1) < \<epsilon> / 4" by auto |
|
385 |
have 1: "\<And>x. cmod (1 - char M' x) \<le> 2" |
|
386 |
by (rule order_trans [OF norm_triangle_ineq4], auto simp add: M'.cmod_char_le_1) |
|
387 |
then have 2: "\<And>u v. complex_set_integrable lborel {u..v} (\<lambda>x. 1 - char M' x)" |
|
388 |
by (intro integrableI_bounded_set_indicator[where B=2]) (auto simp: emeasure_lborel_Icc_eq) |
|
389 |
have 3: "\<And>u v. set_integrable lborel {u..v} (\<lambda>x. cmod (1 - char M' x))" |
|
390 |
by (intro borel_integrable_compact[OF compact_Icc] continuous_at_imp_continuous_on |
|
391 |
continuous_intros ballI M'.isCont_char continuous_intros) |
|
392 |
have "cmod (CLBINT t:{-d/2..d/2}. 1 - char M' t) \<le> LBINT t:{-d/2..d/2}. cmod (1 - char M' t)" |
|
393 |
using integral_norm_bound[OF 2] by simp |
|
63540 | 394 |
also have 4: "\<dots> \<le> LBINT t:{-d/2..d/2}. \<epsilon> / 4" |
62083 | 395 |
apply (rule integral_mono [OF 3]) |
63540 | 396 |
apply (simp add: emeasure_lborel_Icc_eq) |
397 |
apply (case_tac "x \<in> {-d/2..d/2}") |
|
398 |
apply auto |
|
62083 | 399 |
apply (subst norm_minus_commute) |
400 |
apply (rule less_imp_le) |
|
401 |
apply (rule d1 [simplified]) |
|
63540 | 402 |
using d0 apply auto |
403 |
done |
|
404 |
also from d0 4 have "\<dots> = d * \<epsilon> / 4" |
|
62083 | 405 |
by simp |
406 |
finally have bound: "cmod (CLBINT t:{-d/2..d/2}. 1 - char M' t) \<le> d * \<epsilon> / 4" . |
|
63540 | 407 |
have "cmod (1 - char (M n) x) \<le> 2" for n x |
408 |
by (rule order_trans [OF norm_triangle_ineq4], auto simp add: Mn.cmod_char_le_1) |
|
409 |
then have "(\<lambda>n. CLBINT t:{-d/2..d/2}. 1 - char (M n) t) \<longlonglongrightarrow> (CLBINT t:{-d/2..d/2}. 1 - char M' t)" |
|
62083 | 410 |
apply (intro integral_dominated_convergence[where w="\<lambda>x. indicator {-d/2..d/2} x *\<^sub>R 2"]) |
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
411 |
apply (auto intro!: char_conv tendsto_intros |
62083 | 412 |
simp: emeasure_lborel_Icc_eq |
413 |
split: split_indicator) |
|
414 |
done |
|
415 |
hence "eventually (\<lambda>n. cmod ((CLBINT t:{-d/2..d/2}. 1 - char (M n) t) - |
|
416 |
(CLBINT t:{-d/2..d/2}. 1 - char M' t)) < d * \<epsilon> / 4) sequentially" |
|
63167 | 417 |
using d0 \<open>\<epsilon> > 0\<close> apply (subst (asm) tendsto_iff) |
62083 | 418 |
by (subst (asm) dist_complex_def, drule spec, erule mp, auto) |
419 |
hence "\<exists>N. \<forall>n \<ge> N. cmod ((CLBINT t:{-d/2..d/2}. 1 - char (M n) t) - |
|
420 |
(CLBINT t:{-d/2..d/2}. 1 - char M' t)) < d * \<epsilon> / 4" by (simp add: eventually_sequentially) |
|
421 |
then guess N .. |
|
422 |
hence N: "\<And>n. n \<ge> N \<Longrightarrow> cmod ((CLBINT t:{-d/2..d/2}. 1 - char (M n) t) - |
|
423 |
(CLBINT t:{-d/2..d/2}. 1 - char M' t)) < d * \<epsilon> / 4" by auto |
|
424 |
{ fix n |
|
425 |
assume "n \<ge> N" |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
426 |
have "cmod (CLBINT t:{-d/2..d/2}. 1 - char (M n) t) = |
62083 | 427 |
cmod ((CLBINT t:{-d/2..d/2}. 1 - char (M n) t) - (CLBINT t:{-d/2..d/2}. 1 - char M' t) |
428 |
+ (CLBINT t:{-d/2..d/2}. 1 - char M' t))" by simp |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
429 |
also have "\<dots> \<le> cmod ((CLBINT t:{-d/2..d/2}. 1 - char (M n) t) - |
62083 | 430 |
(CLBINT t:{-d/2..d/2}. 1 - char M' t)) + cmod(CLBINT t:{-d/2..d/2}. 1 - char M' t)" |
431 |
by (rule norm_triangle_ineq) |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
432 |
also have "\<dots> < d * \<epsilon> / 4 + d * \<epsilon> / 4" |
63167 | 433 |
by (rule add_less_le_mono [OF N [OF \<open>n \<ge> N\<close>] bound]) |
62083 | 434 |
also have "\<dots> = d * \<epsilon> / 2" by auto |
435 |
finally have "cmod (CLBINT t:{-d/2..d/2}. 1 - char (M n) t) < d * \<epsilon> / 2" . |
|
436 |
hence "d * \<epsilon> / 2 > Re (CLBINT t:{-d/2..d/2}. 1 - char (M n) t)" |
|
437 |
by (rule order_le_less_trans [OF complex_Re_le_cmod]) |
|
438 |
hence "d * \<epsilon> / 2 > Re (CLBINT t:{-(d/2)..d/2}. 1 - char (M n) t)" (is "_ > ?lhs") by simp |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
439 |
also have "?lhs \<ge> (d / 2) * measure (M n) {x. abs x \<ge> 2 / (d / 2)}" |
62083 | 440 |
using d0 by (intro main_bound, simp) |
441 |
finally (xtrans) have "d * \<epsilon> / 2 > (d / 2) * measure (M n) {x. abs x \<ge> 2 / (d / 2)}" . |
|
63167 | 442 |
with d0 \<open>\<epsilon> > 0\<close> have "\<epsilon> > measure (M n) {x. abs x \<ge> 2 / (d / 2)}" by (simp add: field_simps) |
62083 | 443 |
hence "\<epsilon> > 1 - measure (M n) (UNIV - {x. abs x \<ge> 2 / (d / 2)})" |
444 |
apply (subst Mn.borel_UNIV [symmetric]) |
|
445 |
by (subst Mn.prob_compl, auto) |
|
446 |
also have "UNIV - {x. abs x \<ge> 2 / (d / 2)} = {x. -(4 / d) < x \<and> x < (4 / d)}" |
|
447 |
using d0 apply (auto simp add: field_simps) |
|
448 |
(* very annoying -- this should be automatic *) |
|
449 |
apply (case_tac "x \<ge> 0", auto simp add: field_simps) |
|
450 |
apply (subgoal_tac "0 \<le> x * d", arith, rule mult_nonneg_nonneg, auto) |
|
451 |
apply (case_tac "x \<ge> 0", auto simp add: field_simps) |
|
452 |
apply (subgoal_tac "x * d \<le> 0", arith) |
|
453 |
apply (rule mult_nonpos_nonneg, auto) |
|
454 |
by (case_tac "x \<ge> 0", auto simp add: field_simps) |
|
455 |
finally have "measure (M n) {x. -(4 / d) < x \<and> x < (4 / d)} > 1 - \<epsilon>" |
|
456 |
by auto |
|
457 |
} note 6 = this |
|
458 |
{ fix n :: nat |
|
459 |
have *: "(UN (k :: nat). {- real k<..real k}) = UNIV" |
|
460 |
by (auto, metis leI le_less_trans less_imp_le minus_less_iff reals_Archimedean2) |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
461 |
have "(\<lambda>k. measure (M n) {- real k<..real k}) \<longlonglongrightarrow> |
62083 | 462 |
measure (M n) (UN (k :: nat). {- real k<..real k})" |
463 |
by (rule Mn.finite_Lim_measure_incseq, auto simp add: incseq_def) |
|
464 |
hence "(\<lambda>k. measure (M n) {- real k<..real k}) \<longlonglongrightarrow> 1" |
|
465 |
using Mn.prob_space unfolding * Mn.borel_UNIV by simp |
|
466 |
hence "eventually (\<lambda>k. measure (M n) {- real k<..real k} > 1 - \<epsilon>) sequentially" |
|
467 |
apply (elim order_tendstoD (1)) |
|
63167 | 468 |
using \<open>\<epsilon> > 0\<close> by auto |
62083 | 469 |
} note 7 = this |
470 |
{ fix n :: nat |
|
471 |
have "eventually (\<lambda>k. \<forall>m < n. measure (M m) {- real k<..real k} > 1 - \<epsilon>) sequentially" |
|
472 |
(is "?P n") |
|
473 |
proof (induct n) |
|
474 |
case (Suc n) with 7[of n] show ?case |
|
475 |
by eventually_elim (auto simp add: less_Suc_eq) |
|
476 |
qed simp |
|
477 |
} note 8 = this |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
478 |
from 8 [of N] have "\<exists>K :: nat. \<forall>k \<ge> K. \<forall>m<N. 1 - \<epsilon> < |
62083 | 479 |
Sigma_Algebra.measure (M m) {- real k<..real k}" |
480 |
by (auto simp add: eventually_sequentially) |
|
481 |
hence "\<exists>K :: nat. \<forall>m<N. 1 - \<epsilon> < Sigma_Algebra.measure (M m) {- real K<..real K}" by auto |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
482 |
then obtain K :: nat where |
62083 | 483 |
"\<forall>m<N. 1 - \<epsilon> < Sigma_Algebra.measure (M m) {- real K<..real K}" .. |
484 |
hence K: "\<And>m. m < N \<Longrightarrow> 1 - \<epsilon> < Sigma_Algebra.measure (M m) {- real K<..real K}" |
|
485 |
by auto |
|
486 |
let ?K' = "max K (4 / d)" |
|
487 |
have "-?K' < ?K' \<and> (\<forall>n. 1 - \<epsilon> < measure (M n) {-?K'<..?K'})" |
|
488 |
using d0 apply auto |
|
489 |
apply (rule max.strict_coboundedI2, auto) |
|
490 |
proof - |
|
491 |
fix n |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
492 |
show " 1 - \<epsilon> < measure (M n) {- max (real K) (4 / d)<..max (real K) (4 / d)}" |
62083 | 493 |
apply (case_tac "n < N") |
494 |
apply (rule order_less_le_trans) |
|
495 |
apply (erule K) |
|
496 |
apply (rule Mn.finite_measure_mono, auto) |
|
497 |
apply (rule order_less_le_trans) |
|
498 |
apply (rule 6, erule leI) |
|
499 |
by (rule Mn.finite_measure_mono, auto) |
|
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
500 |
qed |
62083 | 501 |
thus "\<exists>a b. a < b \<and> (\<forall>n. 1 - \<epsilon> < measure (M n) {a<..b})" by (intro exI) |
502 |
qed |
|
503 |
have tight: "tight M" |
|
504 |
by (auto simp: tight_def intro: assms tight_aux) |
|
505 |
show ?thesis |
|
506 |
proof (rule tight_subseq_weak_converge [OF real_distr_M real_distr_M' tight]) |
|
507 |
fix s \<nu> |
|
508 |
assume s: "subseq s" |
|
509 |
assume nu: "weak_conv_m (M \<circ> s) \<nu>" |
|
510 |
assume *: "real_distribution \<nu>" |
|
511 |
have 2: "\<And>n. real_distribution ((M \<circ> s) n)" unfolding comp_def by (rule assms) |
|
512 |
have 3: "\<And>t. (\<lambda>n. char ((M \<circ> s) n) t) \<longlonglongrightarrow> char \<nu> t" by (intro levy_continuity1 [OF 2 * nu]) |
|
513 |
have 4: "\<And>t. (\<lambda>n. char ((M \<circ> s) n) t) = ((\<lambda>n. char (M n) t) \<circ> s)" by (rule ext, simp) |
|
514 |
have 5: "\<And>t. (\<lambda>n. char ((M \<circ> s) n) t) \<longlonglongrightarrow> char M' t" |
|
62397
5ae24f33d343
Substantial new material for multivariate analysis. Also removal of some duplicates.
paulson <lp15@cam.ac.uk>
parents:
62083
diff
changeset
|
515 |
by (subst 4, rule LIMSEQ_subseq_LIMSEQ [OF _ s], rule assms) |
62083 | 516 |
hence "char \<nu> = char M'" by (intro ext, intro LIMSEQ_unique [OF 3 5]) |
63167 | 517 |
hence "\<nu> = M'" by (rule Levy_uniqueness [OF * \<open>real_distribution M'\<close>]) |
62975
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
518 |
thus "weak_conv_m (M \<circ> s) M'" |
1d066f6ab25d
Probability: move emeasure and nn_integral from ereal to ennreal
hoelzl
parents:
62397
diff
changeset
|
519 |
by (elim subst) (rule nu) |
62083 | 520 |
qed |
521 |
qed |
|
522 |
||
523 |
end |