equal
deleted
inserted
replaced
344 using eq1 eq2 eq3 |
344 using eq1 eq2 eq3 |
345 by (simp add: algebra_simps) |
345 by (simp add: algebra_simps) |
346 qed |
346 qed |
347 |
347 |
348 |
348 |
349 |
|
350 proposition |
349 proposition |
351 fixes S :: "(real^'n) set" |
350 fixes S :: "(real^'n) set" |
352 assumes "S \<in> lmeasurable" |
351 assumes "S \<in> lmeasurable" |
353 shows measurable_stretch: "((\<lambda>x. \<chi> k. m k * x$k) ` S) \<in> lmeasurable" (is "?f ` S \<in> _") |
352 shows measurable_stretch: "((\<lambda>x. \<chi> k. m k * x$k) ` S) \<in> lmeasurable" (is "?f ` S \<in> _") |
354 and measure_stretch: "measure lebesgue ((\<lambda>x. \<chi> k. m k * x$k) ` S) = \<bar>prod m UNIV\<bar> * measure lebesgue S" |
353 and measure_stretch: "measure lebesgue ((\<lambda>x. \<chi> k. m k * x$k) ` S) = \<bar>prod m UNIV\<bar> * measure lebesgue S" |
447 by (simp add: prm negligible_iff_measure0) |
446 by (simp add: prm negligible_iff_measure0) |
448 qed |
447 qed |
449 then show "(?f ` S) \<in> lmeasurable" ?MEQ |
448 then show "(?f ` S) \<in> lmeasurable" ?MEQ |
450 by metis+ |
449 by metis+ |
451 qed |
450 qed |
452 |
|
453 |
451 |
454 |
452 |
455 proposition |
453 proposition |
456 fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_" |
454 fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real^'n::_" |
457 assumes "linear f" "S \<in> lmeasurable" |
455 assumes "linear f" "S \<in> lmeasurable" |
1811 proof (intro exI conjI) |
1809 proof (intro exI conjI) |
1812 show "0 < min d r" "min d r \<le> r" |
1810 show "0 < min d r" "min d r \<le> r" |
1813 using \<open>r > 0\<close> \<open>d > 0\<close> by auto |
1811 using \<open>r > 0\<close> \<open>d > 0\<close> by auto |
1814 show "{x' \<in> S. \<exists>v. v \<noteq> 0 \<and> (\<forall>\<xi>>0. \<exists>e>0. \<forall>z\<in>S - {x'}. norm (x' - z) < e \<longrightarrow> \<bar>v \<bullet> (z - x')\<bar> < \<xi> * norm (x' - z))} \<inter> ball x (min d r) \<subseteq> ?W" |
1812 show "{x' \<in> S. \<exists>v. v \<noteq> 0 \<and> (\<forall>\<xi>>0. \<exists>e>0. \<forall>z\<in>S - {x'}. norm (x' - z) < e \<longrightarrow> \<bar>v \<bullet> (z - x')\<bar> < \<xi> * norm (x' - z))} \<inter> ball x (min d r) \<subseteq> ?W" |
1815 proof (clarsimp simp: dist_norm norm_minus_commute) |
1813 proof (clarsimp simp: dist_norm norm_minus_commute) |
1816 fix y w |
1814 fix y w |
1817 assume "y \<in> S" "w \<noteq> 0" |
1815 assume "y \<in> S" "w \<noteq> 0" |
1818 and less [rule_format]: |
1816 and less [rule_format]: |
1819 "\<forall>\<xi>>0. \<exists>e>0. \<forall>z\<in>S - {y}. norm (y - z) < e \<longrightarrow> \<bar>w \<bullet> (z - y)\<bar> < \<xi> * norm (y - z)" |
1817 "\<forall>\<xi>>0. \<exists>e>0. \<forall>z\<in>S - {y}. norm (y - z) < e \<longrightarrow> \<bar>w \<bullet> (z - y)\<bar> < \<xi> * norm (y - z)" |
1820 and d: "norm (y - x) < d" and r: "norm (y - x) < r" |
1818 and d: "norm (y - x) < d" and r: "norm (y - x) < r" |
1821 show "\<bar>v \<bullet> (y - x)\<bar> < norm v * e * min d r / (2 * real CARD('m) ^ CARD('m))" |
1819 show "\<bar>v \<bullet> (y - x)\<bar> < norm v * e * min d r / (2 * real CARD('m) ^ CARD('m))" |
2286 assumes S: "S \<in> sets lebesgue" and f: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)" |
2284 assumes S: "S \<in> sets lebesgue" and f: "\<And>x. x \<in> S \<Longrightarrow> (f has_derivative f' x) (at x within S)" |
2287 shows "(\<lambda>x. det(matrix(f' x))) \<in> borel_measurable (lebesgue_on S)" |
2285 shows "(\<lambda>x. det(matrix(f' x))) \<in> borel_measurable (lebesgue_on S)" |
2288 unfolding det_def |
2286 unfolding det_def |
2289 by (intro measurable) (auto intro: f borel_measurable_partial_derivatives [OF S]) |
2287 by (intro measurable) (auto intro: f borel_measurable_partial_derivatives [OF S]) |
2290 |
2288 |
2291 text\<open>The localisation wrt S uses the same argument for many similar results. |
2289 text\<open>The localisation wrt S uses the same argument for many similar results.\<close> |
2292 See HOL Light's MEASURABLE_ON_LEBESGUE_MEASURABLE_PREIMAGE_BOREL, etc.\<close> |
2290 (*See HOL Light's MEASURABLE_ON_LEBESGUE_MEASURABLE_PREIMAGE_BOREL, etc.*) |
2293 lemma borel_measurable_lebesgue_on_preimage_borel: |
2291 lemma borel_measurable_lebesgue_on_preimage_borel: |
2294 fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
2292 fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
2295 assumes "S \<in> sets lebesgue" |
2293 assumes "S \<in> sets lebesgue" |
2296 shows "f \<in> borel_measurable (lebesgue_on S) \<longleftrightarrow> |
2294 shows "f \<in> borel_measurable (lebesgue_on S) \<longleftrightarrow> |
2297 (\<forall>T. T \<in> sets borel \<longrightarrow> {x \<in> S. f x \<in> T} \<in> sets lebesgue)" |
2295 (\<forall>T. T \<in> sets borel \<longrightarrow> {x \<in> S. f x \<in> T} \<in> sets lebesgue)" |
2368 ultimately show "{x \<in> S. f x \<in> U} \<in> sets lebesgue" |
2366 ultimately show "{x \<in> S. f x \<in> U} \<in> sets lebesgue" |
2369 using C by auto |
2367 using C by auto |
2370 qed |
2368 qed |
2371 |
2369 |
2372 |
2370 |
2373 |
|
2374 thm integrable_on_subcbox |
|
2375 |
|
2376 proposition measurable_bounded_by_integrable_imp_integrable: |
|
2377 fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
2378 assumes f: "f \<in> borel_measurable (lebesgue_on S)" and g: "g integrable_on S" |
|
2379 and normf: "\<And>x. x \<in> S \<Longrightarrow> norm(f x) \<le> g x" and S: "S \<in> sets lebesgue" |
|
2380 shows "f integrable_on S" |
|
2381 proof (rule integrable_on_all_intervals_integrable_bound [OF _ normf g]) |
|
2382 show "(\<lambda>x. if x \<in> S then f x else 0) integrable_on cbox a b" for a b |
|
2383 proof (rule measurable_bounded_lemma) |
|
2384 show "(\<lambda>x. if x \<in> S then f x else 0) \<in> borel_measurable lebesgue" |
|
2385 by (simp add: S borel_measurable_UNIV f) |
|
2386 show "(\<lambda>x. if x \<in> S then g x else 0) integrable_on cbox a b" |
|
2387 by (simp add: g integrable_altD(1)) |
|
2388 show "norm (if x \<in> S then f x else 0) \<le> (if x \<in> S then g x else 0)" for x |
|
2389 using normf by simp |
|
2390 qed |
|
2391 qed |
|
2392 |
|
2393 |
|
2394 subsection\<open>Simplest case of Sard's theorem (we don't need continuity of derivative)\<close> |
2371 subsection\<open>Simplest case of Sard's theorem (we don't need continuity of derivative)\<close> |
2395 |
2372 |
2396 lemma Sard_lemma00: |
2373 lemma Sard_lemma00: |
2397 fixes P :: "'b::euclidean_space set" |
2374 fixes P :: "'b::euclidean_space set" |
2398 assumes "a \<ge> 0" and a: "a *\<^sub>R i \<noteq> 0" and i: "i \<in> Basis" |
2375 assumes "a \<ge> 0" and a: "a *\<^sub>R i \<noteq> 0" and i: "i \<in> Basis" |
2426 using \<open>i \<in> Basis\<close> |
2403 using \<open>i \<in> Basis\<close> |
2427 by (simp add: content_cbox [OF *] prod.distrib prod.If_cases Diff_eq [symmetric] 2) |
2404 by (simp add: content_cbox [OF *] prod.distrib prod.If_cases Diff_eq [symmetric] 2) |
2428 qed blast |
2405 qed blast |
2429 qed |
2406 qed |
2430 |
2407 |
2431 text\<open>As above, but reorienting the vector (HOL Light's @text{GEOM_BASIS_MULTIPLE_TAC})\<close> |
2408 text\<open>As above, but reorienting the vector (HOL Light's @text{GEOM\_BASIS\_MULTIPLE\_TAC})\<close> |
2432 lemma Sard_lemma0: |
2409 lemma Sard_lemma0: |
2433 fixes P :: "(real^'n::{finite,wellorder}) set" |
2410 fixes P :: "(real^'n::{finite,wellorder}) set" |
2434 assumes "a \<noteq> 0" |
2411 assumes "a \<noteq> 0" |
2435 and P: "P \<subseteq> {x. a \<bullet> x = 0}" and "0 \<le> m" "0 \<le> e" |
2412 and P: "P \<subseteq> {x. a \<bullet> x = 0}" and "0 \<le> m" "0 \<le> e" |
2436 obtains S where "S \<in> lmeasurable" |
2413 obtains S where "S \<in> lmeasurable" |
2485 show "measure lebesgue (T ` S) \<le> 2 * e * (2 * m) ^ (CARD('n) - 1)" |
2462 show "measure lebesgue (T ` S) \<le> 2 * e * (2 * m) ^ (CARD('n) - 1)" |
2486 using mS T by (simp add: S measure_orthogonal_image) |
2463 using mS T by (simp add: S measure_orthogonal_image) |
2487 qed |
2464 qed |
2488 qed |
2465 qed |
2489 |
2466 |
2490 (*As above, but translating the sets (HOL Light's GEN_GEOM_ORIGIN_TAC)*) |
2467 text\<open>As above, but translating the sets (HOL Light's @text{GEN\_GEOM\_ORIGIN\_TAC})\<close> |
2491 lemma Sard_lemma1: |
2468 lemma Sard_lemma1: |
2492 fixes P :: "(real^'n::{finite,wellorder}) set" |
2469 fixes P :: "(real^'n::{finite,wellorder}) set" |
2493 assumes P: "dim P < CARD('n)" and "0 \<le> m" "0 \<le> e" |
2470 assumes P: "dim P < CARD('n)" and "0 \<le> m" "0 \<le> e" |
2494 obtains S where "S \<in> lmeasurable" |
2471 obtains S where "S \<in> lmeasurable" |
2495 and "{z. norm(z - w) \<le> m \<and> (\<exists>t \<in> P. norm(z - w - t) \<le> e)} \<subseteq> S" |
2472 and "{z. norm(z - w) \<le> m \<and> (\<exists>t \<in> P. norm(z - w - t) \<le> e)} \<subseteq> S" |
3071 finally show "integral (g ` S) f \<le> ?b" . |
3048 finally show "integral (g ` S) f \<le> ?b" . |
3072 qed |
3049 qed |
3073 qed |
3050 qed |
3074 |
3051 |
3075 |
3052 |
3076 |
|
3077 lemma absolutely_integrable_on_image_real: |
3053 lemma absolutely_integrable_on_image_real: |
3078 fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real" and g :: "real^'n::_ \<Rightarrow> real^'n::_" |
3054 fixes f :: "real^'n::{finite,wellorder} \<Rightarrow> real" and g :: "real^'n::_ \<Rightarrow> real^'n::_" |
3079 assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)" |
3055 assumes der_g: "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)" |
3080 and intS: "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x)) absolutely_integrable_on S" |
3056 and intS: "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x)) absolutely_integrable_on S" |
3081 shows "f absolutely_integrable_on (g ` S)" |
3057 shows "f absolutely_integrable_on (g ` S)" |
3162 assumes"\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f(g x)" |
3138 assumes"\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f(g x)" |
3163 and "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)" |
3139 and "\<And>x. x \<in> S \<Longrightarrow> (g has_derivative g' x) (at x within S)" |
3164 and "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x)) integrable_on S" |
3140 and "(\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x)) integrable_on S" |
3165 shows "integral (g ` S) f \<le> integral S (\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x))" |
3141 shows "integral (g ` S) f \<le> integral S (\<lambda>x. \<bar>det (matrix (g' x))\<bar> * f(g x))" |
3166 using integral_on_image_ubound_nonneg [OF assms] by simp |
3142 using integral_on_image_ubound_nonneg [OF assms] by simp |
3167 |
|
3168 |
3143 |
3169 |
3144 |
3170 subsection\<open>Change-of-variables theorem\<close> |
3145 subsection\<open>Change-of-variables theorem\<close> |
3171 |
3146 |
3172 text\<open>The classic change-of-variables theorem. We have two versions with quite general hypotheses, |
3147 text\<open>The classic change-of-variables theorem. We have two versions with quite general hypotheses, |