# HG changeset patch # User paulson # Date 1504126001 -3600 # Node ID 116f658195af7ab7f8aedd1f21b7d8bee66c53af # Parent 19bf4d5966dce39d88ff958d000a1ae2cfafc625 unscrambled has_integral_Union diff -r 19bf4d5966dc -r 116f658195af src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Tue Aug 29 20:34:43 2017 +0100 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Wed Aug 30 21:46:41 2017 +0100 @@ -685,10 +685,10 @@ unfolding integral_linear[OF assms(1) bounded_linear_inner_left,unfolded o_def] .. lemma has_integral_sum: - assumes "finite t" - and "\a\t. ((f a) has_integral (i a)) S" - shows "((\x. sum (\a. f a x) t) has_integral (sum i t)) S" - using assms(1) subset_refl[of t] + assumes "finite T" + and "\a. a \ T \ ((f a) has_integral (i a)) S" + shows "((\x. sum (\a. f a x) T) has_integral (sum i T)) S" + using assms(1) subset_refl[of T] proof (induct rule: finite_subset_induct) case empty then show ?case by auto @@ -2328,9 +2328,9 @@ using assms by (induct s) auto lemma negligible_Union[intro]: - assumes "finite s" - and "\t\s. negligible t" - shows "negligible(\s)" + assumes "finite \" + and "\t. t \ \ \ negligible t" + shows "negligible(\\)" using assms by induct auto lemma negligible: @@ -5123,43 +5123,42 @@ lemma has_integral_Union: fixes f :: "'n::euclidean_space \ 'a::banach" - assumes "finite t" - and "\s\t. (f has_integral (i s)) s" - and "\s\t. \s'\t. s \ s' \ negligible (s \ s')" - shows "(f has_integral (sum i t)) (\t)" + assumes \: "finite \" + and int: "\S. S \ \ \ (f has_integral (i S)) S" + and neg: "\S S'. \S \ \; S' \ \; S \ S'\ \ negligible (S \ S')" + shows "(f has_integral (sum i \)) (\\)" proof - - note * = has_integral_restrict_UNIV[symmetric, of f] - have **: "negligible (\((\(a,b). a \ b) ` {(a,b). a \ t \ b \ {y. y \ t \ a \ y}}))" - apply (rule negligible_Union) - apply (rule finite_imageI) - apply (rule finite_subset[of _ "t \ t"]) - defer - apply (rule finite_cartesian_product[OF assms(1,1)]) - using assms(3) - apply auto - done - note assms(2)[unfolded *] - note has_integral_sum[OF assms(1) this] + 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" + 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}} \ \ \ \" + by auto + ultimately show "finite ?\" + by (blast intro: finite_subset[of _ "\ \ \"]) + show "\t. t \ ?\ \ negligible t" + using neg by auto + qed + next + show "(if x \ \\ then f x else 0) = (\A\\. if x \ A 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" + using that by blast + ultimately show "f x = (\A\\. if x \ A then f x else 0)" + by (simp add: sum.delta[OF \]) + qed + next + show "((\x. \A\\. if x \ A then f x else 0) has_integral (\A\\. i A)) UNIV" + apply (rule has_integral_sum [OF \]) + using int by (simp add: has_integral_restrict_UNIV) + qed then show ?thesis - unfolding * - apply - - apply (rule has_integral_spike[OF **]) - defer - apply assumption - apply safe - proof goal_cases - case prems: (1 x) - then show ?case - proof (cases "x \ \t") - case True - then obtain s where "s \ t" "x \ s" - by blast - moreover then have "\b\t. x \ b \ b = s" - using prems(3) by blast - ultimately show ?thesis - by (simp add: sum.delta[OF assms(1)]) - qed auto - qed + using has_integral_restrict_UNIV by blast qed