# HG changeset patch # User paulson # Date 1642808950 0 # Node ID e9a514c70b9add9e27c251b261aa00a302afc5a8 # Parent 79635df97a90edffb3a8a9526c300d60736ec323 new theorem has_integral_UN diff -r 79635df97a90 -r e9a514c70b9a src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Fri Jan 21 17:39:07 2022 +0100 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Fri Jan 21 23:49:10 2022 +0000 @@ -5472,45 +5472,57 @@ shows "f integrable_on C" using integrable_Un[of A B f] assms by simp -lemma has_integral_Union: +lemma has_integral_UN: fixes f :: "'n::euclidean_space \ 'a::banach" - assumes \: "finite \" - and int: "\S. S \ \ \ (f has_integral (i S)) S" - and neg: "pairwise (\S S'. negligible (S \ S')) \" - shows "(f has_integral (sum i \)) (\\)" + assumes "finite I" + and int: "\i. i \ I \ (f has_integral (g i)) (\ i)" + and neg: "pairwise (\i i'. negligible (\ i \ \ i')) I" + shows "(f has_integral (sum g I)) (\i\I. \ i)" proof - - let ?\ = "((\(a,b). a \ b) ` {(a,b). a \ \ \ b \ {y. y \ \ \ a \ y}})" - have "((\x. if x \ \\ then f x else 0) has_integral sum i \) UNIV" + let ?\ = "((\(a,b). \ a \ \ b) ` {(a,b). a \ I \ b \ I-{a}})" + have "((\x. if x \ (\i\I. \ i) then f x else 0) has_integral sum g I) UNIV" proof (rule has_integral_spike) show "negligible (\?\)" proof (rule negligible_Union) - have "finite (\ \ \)" - by (simp add: \) - moreover have "{(a, b). a \ \ \ b \ {y \ \. a \ y}} \ \ \ \" + have "finite (I \ I)" + by (simp add: \finite I\) + moreover have "{(a,b). a \ I \ b \ I-{a}} \ I \ I" by auto ultimately show "finite ?\" - by (blast intro: finite_subset[of _ "\ \ \"]) + by (simp add: finite_subset) show "\t. t \ ?\ \ negligible t" using neg unfolding pairwise_def by auto qed next - show "(if x \ \\ then f x else 0) = (\A\\. if x \ A then f x else 0)" + show "(if x \ (\i\I. \ i) then f x else 0) = (\i\I. if x \ \ i then f x else 0)" if "x \ UNIV - (\?\)" for x proof clarsimp - fix S assume "S \ \" "x \ S" - moreover then have "\b\\. x \ b \ b = S" + fix i assume i: "i \ I" "x \ \ i" + then have "\j\I. x \ \ j \ j = i" using that by blast - ultimately show "f x = (\A\\. if x \ A then f x else 0)" - by (simp add: sum.delta[OF \]) + with i show "f x = (\i\I. if x \ \ i then f x else 0)" + by (simp add: sum.delta[OF \finite I\]) qed next - show "((\x. \A\\. if x \ A then f x else 0) has_integral (\A\\. i A)) UNIV" - using int by (simp add: has_integral_restrict_UNIV has_integral_sum [OF \]) + show "((\x. (\i\I. if x \ \ i then f x else 0)) has_integral sum g I) UNIV" + using int by (simp add: has_integral_restrict_UNIV has_integral_sum [OF \finite I\]) qed then show ?thesis using has_integral_restrict_UNIV by blast qed +lemma has_integral_Union: + fixes f :: "'n::euclidean_space \ 'a::banach" + assumes "finite \" + and "\S. S \ \ \ (f has_integral (i S)) S" + and "pairwise (\S S'. negligible (S \ S')) \" + shows "(f has_integral (sum i \)) (\\)" +proof - + have "(f has_integral (sum i \)) (\S\\. S)" + by (intro has_integral_UN assms) + then show ?thesis + by force +qed text \In particular adding integrals over a division, maybe not of an interval.\