# HG changeset patch # User paulson # Date 1563460815 -3600 # Node ID 2b0dca68c3ee27464d3a5bccaa179da89d0bf90a # Parent 8a7053892d8e5ed3eef59e7ebab0800c5bfed856 More analysis / measure theory material diff -r 8a7053892d8e -r 2b0dca68c3ee src/HOL/Analysis/Change_Of_Vars.thy --- a/src/HOL/Analysis/Change_Of_Vars.thy Thu Jul 18 14:08:44 2019 +0100 +++ b/src/HOL/Analysis/Change_Of_Vars.thy Thu Jul 18 15:40:15 2019 +0100 @@ -421,64 +421,6 @@ by (simp add: measure_linear_image \linear f\ S f) qed -subsection\\F_sigma\ and \G_delta\ sets.\(*FIX ME mv *) - -text\A Lebesgue set is almost an \F_sigma\ or \G_delta\.\ -lemma lebesgue_set_almost_fsigma: - assumes "S \ sets lebesgue" - obtains C T where "fsigma C" "negligible T" "C \ T = S" "disjnt C T" -proof - - { fix n::nat - obtain T where "closed T" "T \ S" "S-T \ lmeasurable" "emeasure lebesgue (S - T) < ennreal (1 / Suc n)" - using sets_lebesgue_inner_closed [OF assms] - by (metis of_nat_0_less_iff zero_less_Suc zero_less_divide_1_iff) - then have "\T. closed T \ T \ S \ S - T \ lmeasurable \ measure lebesgue (S-T) < 1 / Suc n" - by (metis emeasure_eq_measure2 ennreal_leI not_le) - } - then obtain F where F: "\n::nat. closed (F n) \ F n \ S \ S - F n \ lmeasurable \ measure lebesgue (S - F n) < 1 / Suc n" - by metis - let ?C = "\(F ` UNIV)" - show thesis - proof - show "fsigma ?C" - using F by (simp add: fsigma.intros) - show "negligible (S - ?C)" - proof (clarsimp simp add: negligible_outer_le) - fix e :: "real" - assume "0 < e" - then obtain n where n: "1 / Suc n < e" - using nat_approx_posE by metis - show "\T. S - (\x. F x) \ T \ T \ lmeasurable \ measure lebesgue T \ e" - proof (intro exI conjI) - show "measure lebesgue (S - F n) \ e" - by (meson F n less_trans not_le order.asym) - qed (use F in auto) - qed - show "?C \ (S - ?C) = S" - using F by blast - show "disjnt ?C (S - ?C)" - by (auto simp: disjnt_def) - qed -qed - -lemma lebesgue_set_almost_gdelta: - assumes "S \ sets lebesgue" - obtains C T where "gdelta C" "negligible T" "S \ T = C" "disjnt S T" -proof - - have "-S \ sets lebesgue" - using assms Compl_in_sets_lebesgue by blast - then obtain C T where C: "fsigma C" "negligible T" "C \ T = -S" "disjnt C T" - using lebesgue_set_almost_fsigma by metis - show thesis - proof - show "gdelta (-C)" - by (simp add: \fsigma C\ fsigma_imp_gdelta) - show "S \ T = -C" "disjnt S T" - using C by (auto simp: disjnt_def) - qed (use C in auto) -qed - - proposition measure_semicontinuous_with_hausdist_explicit: assumes "bounded S" and neg: "negligible(frontier S)" and "e > 0" obtains d where "d > 0" @@ -3459,11 +3401,13 @@ integral S (\x. \det (matrix (g' x))\ *\<^sub>R f(g x)) = b \ f absolutely_integrable_on (g ` S) \ integral (g ` S) f = b" proof - - obtain C N where "fsigma C" "negligible N" and CNS: "C \ N = S" and "disjnt C N" + obtain C N where "fsigma C" and N: "N \ null_sets lebesgue" and CNS: "C \ N = S" and "disjnt C N" using lebesgue_set_almost_fsigma [OF S] . then obtain F :: "nat \ (real^'m::_) set" where F: "range F \ Collect compact" and Ceq: "C = Union(range F)" using fsigma_Union_compact by metis + have "negligible N" + using N by (simp add: negligible_iff_null_sets) let ?D = "\x. \det (matrix (g' x))\ *\<^sub>R f (g x)" have "?D absolutely_integrable_on C \ integral C ?D = b \ f absolutely_integrable_on (g ` C) \ integral (g ` C) f = b" diff -r 8a7053892d8e -r 2b0dca68c3ee src/HOL/Analysis/Elementary_Normed_Spaces.thy --- a/src/HOL/Analysis/Elementary_Normed_Spaces.thy Thu Jul 18 14:08:44 2019 +0100 +++ b/src/HOL/Analysis/Elementary_Normed_Spaces.thy Thu Jul 18 15:40:15 2019 +0100 @@ -641,11 +641,8 @@ qed lemma bounded_pos: "bounded S \ (\b>0. \x\ S. norm x \ b)" - apply (simp add: bounded_iff) - apply (subgoal_tac "\x (y::real). 0 < 1 + \y\ \ (x \ y \ x \ 1 + \y\)") - apply metis - apply arith - done + unfolding bounded_iff + by (meson less_imp_le not_le order_trans zero_less_one) lemma bounded_pos_less: "bounded S \ (\b>0. \x\ S. norm x < b)" apply (simp add: bounded_pos) diff -r 8a7053892d8e -r 2b0dca68c3ee src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy --- a/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Thu Jul 18 14:08:44 2019 +0100 +++ b/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Thu Jul 18 15:40:15 2019 +0100 @@ -957,6 +957,11 @@ using absolutely_integrable_on_def set_integrable_def by blast qed +lemma absolutely_integrable_imp_integrable: + assumes "f absolutely_integrable_on S" "S \ sets lebesgue" + shows "integrable (lebesgue_on S) f" + by (meson assms integrable_restrict_space set_integrable_def sets.Int sets.top) + lemma absolutely_integrable_on_null [intro]: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" shows "content (cbox a b) = 0 \ f absolutely_integrable_on (cbox a b)" diff -r 8a7053892d8e -r 2b0dca68c3ee src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Thu Jul 18 14:08:44 2019 +0100 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Thu Jul 18 15:40:15 2019 +0100 @@ -119,6 +119,11 @@ "content (cbox (a,c) (b,d)) = 0 \ content (cbox a b) = 0 \ content (cbox c d) = 0" by (simp add: content_Pair) +lemma content_cbox_plus: + fixes x :: "'a::euclidean_space" + shows "content(cbox x (x + h *\<^sub>R One)) = (if h \ 0 then h ^ DIM('a) else 0)" + by (simp add: algebra_simps content_cbox_if box_eq_empty) + lemma content_0_subset: "content(cbox a b) = 0 \ s \ cbox a b \ content s = 0" using emeasure_mono[of s "cbox a b" lborel] by (auto simp: measure_def enn2real_eq_0_iff emeasure_lborel_cbox_eq) diff -r 8a7053892d8e -r 2b0dca68c3ee src/HOL/Analysis/Lebesgue_Measure.thy --- a/src/HOL/Analysis/Lebesgue_Measure.thy Thu Jul 18 14:08:44 2019 +0100 +++ b/src/HOL/Analysis/Lebesgue_Measure.thy Thu Jul 18 15:40:15 2019 +0100 @@ -386,6 +386,16 @@ abbreviation\<^marker>\tag important\ lebesgue_on :: "'a set \ 'a::euclidean_space measure" where "lebesgue_on \ \ restrict_space (completion lborel) \" +lemma lebesgue_on_mono: + assumes major: "AE x in lebesgue_on S. P x" and minor: "\x.\P x; x \ S\ \ Q x" + shows "AE x in lebesgue_on S. Q x" +proof - + have "AE a in lebesgue_on S. P a \ Q a" + using minor space_restrict_space by fastforce + then show ?thesis + using major by auto +qed + lemma shows sets_lborel[simp, measurable_cong]: "sets lborel = sets borel" and space_lborel[simp]: "space lborel = space borel" @@ -425,6 +435,12 @@ space_restrict_space) qed +lemma id_borel_measurable_lebesgue [iff]: "id \ borel_measurable lebesgue" + by (simp add: measurable_completion) + +lemma id_borel_measurable_lebesgue_on [iff]: "id \ borel_measurable (lebesgue_on S)" + by (simp add: measurable_completion measurable_restrict_space1) + context begin @@ -617,6 +633,21 @@ lemma finite_imp_null_set_lborel: "finite A \ A \ null_sets lborel" by (intro countable_imp_null_set_lborel countable_finite) +lemma insert_null_sets_iff [simp]: "insert a N \ null_sets lebesgue \ N \ null_sets lebesgue" + (is "?lhs = ?rhs") +proof + assume ?lhs then show ?rhs + by (meson completion.complete2 subset_insertI) +next + assume ?rhs then show ?lhs + by (simp add: null_sets.insert_in_sets null_setsI) +qed + +lemma insert_null_sets_lebesgue_on_iff [simp]: + assumes "a \ S" "S \ sets lebesgue" + shows "insert a N \ null_sets (lebesgue_on S) \ N \ null_sets (lebesgue_on S)" + by (simp add: assms null_sets_restrict_space) + lemma lborel_neq_count_space[simp]: "lborel \ count_space (A::('a::ordered_euclidean_space) set)" proof assume asm: "lborel = count_space A" @@ -1418,4 +1449,58 @@ lemma gdelta_complement: "gdelta(- S) \ fsigma S" using fsigma_imp_gdelta gdelta_imp_fsigma by force +lemma lebesgue_set_almost_fsigma: + assumes "S \ sets lebesgue" + obtains C T where "fsigma C" "T \ null_sets lebesgue" "C \ T = S" "disjnt C T" +proof - + { fix n::nat + obtain T where "closed T" "T \ S" "S-T \ lmeasurable" "emeasure lebesgue (S - T) < ennreal (1 / Suc n)" + using sets_lebesgue_inner_closed [OF assms] + by (metis of_nat_0_less_iff zero_less_Suc zero_less_divide_1_iff) + then have "\T. closed T \ T \ S \ S - T \ lmeasurable \ measure lebesgue (S-T) < 1 / Suc n" + by (metis emeasure_eq_measure2 ennreal_leI not_le) + } + then obtain F where F: "\n::nat. closed (F n) \ F n \ S \ S - F n \ lmeasurable \ measure lebesgue (S - F n) < 1 / Suc n" + by metis + let ?C = "\(F ` UNIV)" + show thesis + proof + show "fsigma ?C" + using F by (simp add: fsigma.intros) + show "(S - ?C) \ null_sets lebesgue" + proof (clarsimp simp add: completion.null_sets_outer_le) + fix e :: "real" + assume "0 < e" + then obtain n where n: "1 / Suc n < e" + using nat_approx_posE by metis + show "\T \ lmeasurable. S - (\x. F x) \ T \ measure lebesgue T \ e" + proof (intro bexI conjI) + show "measure lebesgue (S - F n) \ e" + by (meson F n less_trans not_le order.asym) + qed (use F in auto) + qed + show "?C \ (S - ?C) = S" + using F by blast + show "disjnt ?C (S - ?C)" + by (auto simp: disjnt_def) + qed +qed + +lemma lebesgue_set_almost_gdelta: + assumes "S \ sets lebesgue" + obtains C T where "gdelta C" "T \ null_sets lebesgue" "S \ T = C" "disjnt S T" +proof - + have "-S \ sets lebesgue" + using assms Compl_in_sets_lebesgue by blast + then obtain C T where C: "fsigma C" "T \ null_sets lebesgue" "C \ T = -S" "disjnt C T" + using lebesgue_set_almost_fsigma by metis + show thesis + proof + show "gdelta (-C)" + by (simp add: \fsigma C\ fsigma_imp_gdelta) + show "S \ T = -C" "disjnt S T" + using C by (auto simp: disjnt_def) + qed (use C in auto) +qed + end diff -r 8a7053892d8e -r 2b0dca68c3ee src/HOL/Analysis/Measure_Space.thy --- a/src/HOL/Analysis/Measure_Space.thy Thu Jul 18 14:08:44 2019 +0100 +++ b/src/HOL/Analysis/Measure_Space.thy Thu Jul 18 15:40:15 2019 +0100 @@ -1112,7 +1112,7 @@ lemma AE_impI: "(P \ AE x in M. Q x) \ AE x in M. P \ Q x" - by (cases P) auto + by fastforce lemma AE_measure: assumes AE: "AE x in M. P x" and sets: "{x\space M. P x} \ sets M" (is "?P \ sets M") @@ -1562,6 +1562,9 @@ by (simp add: enn2real_def plus_ennreal.rep_eq real_of_ereal_add less_top del: real_of_ereal_enn2ereal) +lemma enn2real_sum:"(\i. i \ I \ f i < top) \ enn2real (sum f I) = sum (enn2real \ f) I" + by (induction I rule: infinite_finite_induct) (auto simp: enn2real_plus) + lemma measure_eq_AE: assumes iff: "AE x in M. x \ A \ x \ B" assumes A: "A \ sets M" and B: "B \ sets M" diff -r 8a7053892d8e -r 2b0dca68c3ee src/HOL/Library/Extended_Nonnegative_Real.thy --- a/src/HOL/Library/Extended_Nonnegative_Real.thy Thu Jul 18 14:08:44 2019 +0100 +++ b/src/HOL/Library/Extended_Nonnegative_Real.thy Thu Jul 18 15:40:15 2019 +0100 @@ -1110,7 +1110,7 @@ lemma enn2real_positive_iff: "0 < enn2real x \ (0 < x \ x < top)" by (cases x rule: ennreal_cases) auto -lemma enn2real_eq_1_iff[simp]: "enn2real x = 1 \ x = 1" +lemma enn2real_eq_posreal_iff[simp]: "c > 0 \ enn2real x = c \ x = c" by (cases x) auto subsection \Coercion from \<^typ>\enat\ to \<^typ>\ennreal\\