src/HOL/Probability/Set_Integral.thy
changeset 61969 e01015e49041
parent 61945 1135b8de26c3
child 62083 7582b39f51ed
equal deleted inserted replaced
61968:e13e70f32407 61969:e01015e49041
   325 lemma pos_integrable_to_top:
   325 lemma pos_integrable_to_top:
   326   fixes l::real
   326   fixes l::real
   327   assumes "\<And>i. A i \<in> sets M" "mono A"
   327   assumes "\<And>i. A i \<in> sets M" "mono A"
   328   assumes nneg: "\<And>x i. x \<in> A i \<Longrightarrow> 0 \<le> f x"
   328   assumes nneg: "\<And>x i. x \<in> A i \<Longrightarrow> 0 \<le> f x"
   329   and intgbl: "\<And>i::nat. set_integrable M (A i) f"
   329   and intgbl: "\<And>i::nat. set_integrable M (A i) f"
   330   and lim: "(\<lambda>i::nat. LINT x:A i|M. f x) ----> l"
   330   and lim: "(\<lambda>i::nat. LINT x:A i|M. f x) \<longlonglongrightarrow> l"
   331   shows "set_integrable M (\<Union>i. A i) f"
   331   shows "set_integrable M (\<Union>i. A i) f"
   332   apply (rule integrable_monotone_convergence[where f = "\<lambda>i::nat. \<lambda>x. indicator (A i) x *\<^sub>R f x" and x = l])
   332   apply (rule integrable_monotone_convergence[where f = "\<lambda>i::nat. \<lambda>x. indicator (A i) x *\<^sub>R f x" and x = l])
   333   apply (rule intgbl)
   333   apply (rule intgbl)
   334   prefer 3 apply (rule lim)
   334   prefer 3 apply (rule lim)
   335   apply (rule AE_I2)
   335   apply (rule AE_I2)
   336   using \<open>mono A\<close> apply (auto simp: mono_def nneg split: split_indicator) []
   336   using \<open>mono A\<close> apply (auto simp: mono_def nneg split: split_indicator) []
   337 proof (rule AE_I2)
   337 proof (rule AE_I2)
   338   { fix x assume "x \<in> space M"
   338   { fix x assume "x \<in> space M"
   339     show "(\<lambda>i. indicator (A i) x *\<^sub>R f x) ----> indicator (\<Union>i. A i) x *\<^sub>R f x"
   339     show "(\<lambda>i. indicator (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicator (\<Union>i. A i) x *\<^sub>R f x"
   340     proof cases
   340     proof cases
   341       assume "\<exists>i. x \<in> A i"
   341       assume "\<exists>i. x \<in> A i"
   342       then guess i ..
   342       then guess i ..
   343       then have *: "eventually (\<lambda>i. x \<in> A i) sequentially"
   343       then have *: "eventually (\<lambda>i. x \<in> A i) sequentially"
   344         using \<open>x \<in> A i\<close> \<open>mono A\<close> by (auto simp: eventually_sequentially mono_def)
   344         using \<open>x \<in> A i\<close> \<open>mono A\<close> by (auto simp: eventually_sequentially mono_def)
   407 
   407 
   408 lemma set_integral_cont_up:
   408 lemma set_integral_cont_up:
   409   fixes f :: "_ \<Rightarrow> 'a :: {banach, second_countable_topology}"
   409   fixes f :: "_ \<Rightarrow> 'a :: {banach, second_countable_topology}"
   410   assumes [measurable]: "\<And>i. A i \<in> sets M" and A: "incseq A"
   410   assumes [measurable]: "\<And>i. A i \<in> sets M" and A: "incseq A"
   411   and intgbl: "set_integrable M (\<Union>i. A i) f"
   411   and intgbl: "set_integrable M (\<Union>i. A i) f"
   412   shows "(\<lambda>i. LINT x:(A i)|M. f x) ----> LINT x:(\<Union>i. A i)|M. f x"
   412   shows "(\<lambda>i. LINT x:(A i)|M. f x) \<longlonglongrightarrow> LINT x:(\<Union>i. A i)|M. f x"
   413 proof (intro integral_dominated_convergence[where w="\<lambda>x. indicator (\<Union>i. A i) x *\<^sub>R norm (f x)"])
   413 proof (intro integral_dominated_convergence[where w="\<lambda>x. indicator (\<Union>i. A i) x *\<^sub>R norm (f x)"])
   414   have int_A: "\<And>i. set_integrable M (A i) f"
   414   have int_A: "\<And>i. set_integrable M (A i) f"
   415     using intgbl by (rule set_integrable_subset) auto
   415     using intgbl by (rule set_integrable_subset) auto
   416   then show "\<And>i. set_borel_measurable M (A i) f" "set_borel_measurable M (\<Union>i. A i) f"
   416   then show "\<And>i. set_borel_measurable M (A i) f" "set_borel_measurable M (\<Union>i. A i) f"
   417     "set_integrable M (\<Union>i. A i) (\<lambda>x. norm (f x))"
   417     "set_integrable M (\<Union>i. A i) (\<lambda>x. norm (f x))"
   418     using intgbl integrable_norm[OF intgbl] by auto
   418     using intgbl integrable_norm[OF intgbl] by auto
   419 
   419 
   420   { fix x i assume "x \<in> A i"
   420   { fix x i assume "x \<in> A i"
   421     with A have "(\<lambda>xa. indicator (A xa) x::real) ----> 1 \<longleftrightarrow> (\<lambda>xa. 1::real) ----> 1"
   421     with A have "(\<lambda>xa. indicator (A xa) x::real) \<longlonglongrightarrow> 1 \<longleftrightarrow> (\<lambda>xa. 1::real) \<longlonglongrightarrow> 1"
   422       by (intro filterlim_cong refl)
   422       by (intro filterlim_cong refl)
   423          (fastforce simp: eventually_sequentially incseq_def subset_eq intro!: exI[of _ i]) }
   423          (fastforce simp: eventually_sequentially incseq_def subset_eq intro!: exI[of _ i]) }
   424   then show "AE x in M. (\<lambda>i. indicator (A i) x *\<^sub>R f x) ----> indicator (\<Union>i. A i) x *\<^sub>R f x"
   424   then show "AE x in M. (\<lambda>i. indicator (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicator (\<Union>i. A i) x *\<^sub>R f x"
   425     by (intro AE_I2 tendsto_intros) (auto split: split_indicator)
   425     by (intro AE_I2 tendsto_intros) (auto split: split_indicator)
   426 qed (auto split: split_indicator)
   426 qed (auto split: split_indicator)
   427 
   427 
   428 (* Can the int0 hypothesis be dropped? *)
   428 (* Can the int0 hypothesis be dropped? *)
   429 lemma set_integral_cont_down:
   429 lemma set_integral_cont_down:
   430   fixes f :: "_ \<Rightarrow> 'a :: {banach, second_countable_topology}"
   430   fixes f :: "_ \<Rightarrow> 'a :: {banach, second_countable_topology}"
   431   assumes [measurable]: "\<And>i. A i \<in> sets M" and A: "decseq A"
   431   assumes [measurable]: "\<And>i. A i \<in> sets M" and A: "decseq A"
   432   and int0: "set_integrable M (A 0) f"
   432   and int0: "set_integrable M (A 0) f"
   433   shows "(\<lambda>i::nat. LINT x:(A i)|M. f x) ----> LINT x:(\<Inter>i. A i)|M. f x"
   433   shows "(\<lambda>i::nat. LINT x:(A i)|M. f x) \<longlonglongrightarrow> LINT x:(\<Inter>i. A i)|M. f x"
   434 proof (rule integral_dominated_convergence)
   434 proof (rule integral_dominated_convergence)
   435   have int_A: "\<And>i. set_integrable M (A i) f"
   435   have int_A: "\<And>i. set_integrable M (A i) f"
   436     using int0 by (rule set_integrable_subset) (insert A, auto simp: decseq_def)
   436     using int0 by (rule set_integrable_subset) (insert A, auto simp: decseq_def)
   437   show "set_integrable M (A 0) (\<lambda>x. norm (f x))"
   437   show "set_integrable M (A 0) (\<lambda>x. norm (f x))"
   438     using int0[THEN integrable_norm] by simp
   438     using int0[THEN integrable_norm] by simp
   441   with int_A show "set_borel_measurable M (\<Inter>i. A i) f" "\<And>i. set_borel_measurable M (A i) f"
   441   with int_A show "set_borel_measurable M (\<Inter>i. A i) f" "\<And>i. set_borel_measurable M (A i) f"
   442     by auto
   442     by auto
   443   show "\<And>i. AE x in M. norm (indicator (A i) x *\<^sub>R f x) \<le> indicator (A 0) x *\<^sub>R norm (f x)"
   443   show "\<And>i. AE x in M. norm (indicator (A i) x *\<^sub>R f x) \<le> indicator (A 0) x *\<^sub>R norm (f x)"
   444     using A by (auto split: split_indicator simp: decseq_def)
   444     using A by (auto split: split_indicator simp: decseq_def)
   445   { fix x i assume "x \<in> space M" "x \<notin> A i"
   445   { fix x i assume "x \<in> space M" "x \<notin> A i"
   446     with A have "(\<lambda>i. indicator (A i) x::real) ----> 0 \<longleftrightarrow> (\<lambda>i. 0::real) ----> 0"
   446     with A have "(\<lambda>i. indicator (A i) x::real) \<longlonglongrightarrow> 0 \<longleftrightarrow> (\<lambda>i. 0::real) \<longlonglongrightarrow> 0"
   447       by (intro filterlim_cong refl)
   447       by (intro filterlim_cong refl)
   448          (auto split: split_indicator simp: eventually_sequentially decseq_def intro!: exI[of _ i]) }
   448          (auto split: split_indicator simp: eventually_sequentially decseq_def intro!: exI[of _ i]) }
   449   then show "AE x in M. (\<lambda>i. indicator (A i) x *\<^sub>R f x) ----> indicator (\<Inter>i. A i) x *\<^sub>R f x"
   449   then show "AE x in M. (\<lambda>i. indicator (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicator (\<Inter>i. A i) x *\<^sub>R f x"
   450     by (intro AE_I2 tendsto_intros) (auto split: split_indicator)
   450     by (intro AE_I2 tendsto_intros) (auto split: split_indicator)
   451 qed
   451 qed
   452 
   452 
   453 lemma set_integral_at_point:
   453 lemma set_integral_at_point:
   454   fixes a :: real
   454   fixes a :: real