# HG changeset patch # User paulson # Date 1503704606 -3600 # Node ID ca8b18baf0e03db4231ad0cb879d486de1fa8e34 # Parent 89b6455b63b6f1bd20c369cac17681f9d8f6a7b8 unscrambling esp of Henstock_lemma_part1 diff -r 89b6455b63b6 -r ca8b18baf0e0 src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy --- a/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Fri Aug 25 23:30:36 2017 +0100 +++ b/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Sat Aug 26 00:43:26 2017 +0100 @@ -1732,31 +1732,27 @@ then have sum_less_e2: "(\(x,K) \ p'. norm (content K *\<^sub>R f x - integral K f)) < e/2" using g(2) gp' tagged_division_of_def by blast - have XX: "(x, I \ L) \ p'" if "(x, L) \ p" "I \ d" "y \ I" "y \ L" + have "(x, I \ L) \ p'" if x: "(x, L) \ p" "I \ d" and y: "y \ I" "y \ L" for x I L y proof - have "x \ I" - using fineD[OF p(3) that(1)] k(2)[OF that(2), of x] that(3-) by auto - then have "(\i l. x \ i \ i \ d \ (x, l) \ p \ I \ L = i \ l)" - using that(1) that(2) by blast + using fineD[OF p(3) that(1)] k(2)[OF \I \ d\] y by auto + with x have "(\i l. x \ i \ i \ d \ (x, l) \ p \ I \ L = i \ l)" + by blast then have "(x, I \ L) \ p'" by (simp add: p'_def) - then show ?thesis - using that(3) by auto + with y show ?thesis by auto qed - have p'alt: "p' = {(x, I \ L) | x I L. (x,L) \ p \ I \ d \ I \ L \ {}}" - proof (safe, goal_cases) - case prems: (2 _ _ x i l) - then show ?case - using XX by auto - next - fix x K - assume "(x, K) \ p'" - then obtain i l where il: "x \ i" "i \ d" "(x, l) \ p" "K = i \ l" - unfolding p'_def by auto - then show "\y i l. (x, K) = (y, i \ l) \ (y, l) \ p \ i \ d \ i \ l \ {}" + moreover have "\y i l. (x, K) = (y, i \ l) \ (y, l) \ p \ i \ d \ i \ l \ {}" + if xK: "(x,K) \ p'" for x K + proof - + obtain i l where il: "x \ i" "i \ d" "(x, l) \ p" "K = i \ l" + using xK unfolding p'_def by auto + then show ?thesis using p'(2) by fastforce qed + ultimately have p'alt: "p' = {(x, I \ L) | x I L. (x,L) \ p \ I \ d \ I \ L \ {}}" + by auto have sum_p': "(\(x,K) \ p'. norm (integral K f)) = (\k\snd ` p'. norm (integral k f))" apply (subst sum.over_tagged_division_lemma[OF p'',of "\k. norm (integral k f)"]) apply (auto intro: integral_null simp: content_eq_0_interior) @@ -2034,26 +2030,20 @@ from this[unfolded bounded_pos] obtain K where K: "0 < K" "\x\\d. norm x \ K" by auto show ?case - apply (rule_tac x="K + 1" in exI) - apply safe - proof - + proof (intro conjI impI allI exI) fix a b :: 'n assume ab: "ball 0 (K + 1) \ cbox a b" - have *: "\s s1. ?S - e < s1 \ s1 \ s \ s < ?S + e \ \s - ?S\ < e" + have *: "\s s1. \?S - e < s1; s1 \ s; s < ?S + e\ \ \s - ?S\ < e" by arith show "norm (integral (cbox a b) (\x. if x \ UNIV then norm (f x) else 0) - ?S) < e" unfolding real_norm_def - apply (rule *[rule_format]) - apply safe - apply (rule d) - proof goal_cases - case 1 + proof (rule * [OF d]) have "(\k\d. norm (integral k f)) \ sum (\k. integral k (\x. norm (f x))) d" - apply (intro sum_mono) - subgoal for k - using d'(4)[of k] f_int - by (auto simp: absolutely_integrable_on_def integral_norm_bound_integral) - done + proof (intro sum_mono) + fix k assume "k \ d" + with d'(4) f_int show "norm (integral k f) \ integral k (\x. norm (f x))" + by (force simp: absolutely_integrable_on_def integral_norm_bound_integral) + qed also have "\ = integral (\d) (\x. norm (f x))" apply (rule integral_combine_division_bottomup[OF ddiv, symmetric]) using absolutely_integrable_on_def d'(4) f_int by blast @@ -2065,7 +2055,8 @@ using integrable_on_subdivision[OF ddiv] f_int[of a b] unfolding absolutely_integrable_on_def by (auto intro!: integral_subset_le) qed - finally show ?case . + finally show "(\k\d. norm (integral k f)) + \ integral (cbox a b) (\x. if x \ UNIV then norm (f x) else 0)" . next have "e/2>0" using \e > 0\ by auto @@ -2101,9 +2092,7 @@ show "(\(x,k) \ p. norm (integral k f)) \ ?S" using partial_division_of_tagged_division[of p "cbox a b"] p(1) apply (subst sum.over_tagged_division_lemma[OF p(1)]) - apply (simp add: content_eq_0_interior) - apply (intro cSUP_upper2 D) - apply (auto simp: tagged_partial_division_of_def) + apply (auto simp: content_eq_0_interior tagged_partial_division_of_def intro!: cSUP_upper2 D) done qed then show "integral (cbox a b) (\x. if x \ UNIV then norm (f x) else 0) < ?S + e" diff -r 89b6455b63b6 -r ca8b18baf0e0 src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Fri Aug 25 23:30:36 2017 +0100 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Sat Aug 26 00:43:26 2017 +0100 @@ -5610,7 +5610,8 @@ note integrable_integral[OF this, unfolded has_integral[of f]] from this[rule_format,OF *] guess dd..note dd=conjunctD2[OF this,rule_format] note gauge_Int[OF \gauge d\ dd(1)] - from fine_division_exists[OF this,of u v] guess qq . + then obtain qq where qq: "qq tagged_division_of cbox u v" "(\x. d x \ dd x) fine qq" + using fine_division_exists by blast then show ?thesis apply (rule_tac x=qq in exI) using dd(2)[of qq] @@ -5674,14 +5675,15 @@ proof - fix x l k assume as: "(x, l) \ p" "(x, l) \ qq k" "k \ r" - note qq[OF this(3)] - note tagged_division_ofD(3,4)[OF conjunct1[OF this] as(2)] - from this(2) guess u v by (elim exE) note uv=this - have "l\snd ` p" unfolding image_iff apply(rule_tac x="(x,l)" in bexI) using as by auto + then obtain u v where uv: "l = cbox u v" + using p'(4) by blast + have "l \ k" + using qq[OF as(3)] tagged_division_ofD(3) \(x, l) \ qq k\ by metis + have "l \ snd ` p" + using \(x, l) \ p\ image_iff by fastforce then have "l \ q" "k \ q" "l \ k" using as(1,3) q(1) unfolding r_def by auto - note q'(5)[OF this] - then have "interior l = {}" + with q'(5) have "interior l = {}" using interior_mono[OF \l \ k\] by blast then show "content l *\<^sub>R f x = 0" unfolding uv content_eq_0_interior[symmetric] by auto @@ -5745,45 +5747,33 @@ have "?x = norm ((\(x, k)\p. content k *\<^sub>R f x) - (\(x, k)\p. integral k f))" unfolding split_def sum_subtractf .. also have "\ \ e + k" - apply (rule *[OF **, where ir1="sum (\k. integral k f) r"]) - proof goal_cases - case 1 + proof (rule *[OF **]) have *: "k * real (card r) / (1 + real (card r)) < k" using k by (auto simp add: field_simps) - show ?case - apply (rule le_less_trans[of _ "sum (\x. k / (real (card r) + 1)) r"]) - unfolding sum_subtractf[symmetric] - apply (rule sum_norm_le) - apply (drule qq) - defer - unfolding divide_inverse sum_distrib_right[symmetric] - unfolding divide_inverse[symmetric] - using * apply (auto simp add: field_simps) - done + have "norm (sum (sum (\(x, k). content k *\<^sub>R f x) \ qq) r - (\k\r. integral k f)) + \ (\x\r. k / (real (card r) + 1))" + unfolding sum_subtractf[symmetric] by (force dest: qq intro!: sum_norm_le) + also have "... < k" + by (simp add: "*" add.commute mult.commute) + finally show "norm (sum (sum (\(x, k). content k *\<^sub>R f x) \ qq) r - (\k\r. integral k f)) < k" . next - case 2 - have *: "(\(x, k)\p. integral k f) = (\k\snd ` p. integral k f)" - apply (subst sum.reindex_nontrivial) - apply fact - unfolding split_paired_all snd_conv split_def o_def + from q(1) have [simp]: "snd ` p \ q = q" by auto + have "integral l f = 0" + if inp: "(x, l) \ p" "(y, m) \ p" and ne: "(x, l) \ (y, m)" and "l = m" for x l y m proof - - fix x l y m - assume as: "(x, l) \ p" "(y, m) \ p" "(x, l) \ (y, m)" "l = m" - from p'(4)[OF as(1)] guess u v by (elim exE) note uv=this - show "integral l f = 0" - unfolding uv - apply (rule integral_unique) - apply (rule has_integral_null) - unfolding content_eq_0_interior - using p'(5)[OF as(1-3)] - unfolding uv as(4)[symmetric] - apply auto - done - qed auto - from q(1) have **: "snd ` p \ q = q" by auto - show ?case - unfolding integral_combine_division_topdown[OF assms(1) q(2)] * r_def - using ** q'(1) p'(1) sum.union_disjoint [of "snd ` p" "q - snd ` p" "\k. integral k f", symmetric] + obtain u v where uv: "l = cbox u v" + using inp p'(4) by blast + have "content (cbox u v) = 0" + unfolding content_eq_0_interior using that p(1) uv by auto + then show ?thesis + using uv by blast + qed + then have "(\(x, k)\p. integral k f) = (\k\snd ` p. integral k f)" + apply (subst sum.reindex_nontrivial [OF \finite p\]) + unfolding split_paired_all split_def by auto + then show "(\(x, k)\p. integral k f) + (\k\r. integral k f) = integral (cbox a b) f" + unfolding integral_combine_division_topdown[OF assms(1) q(2)] r_def + using q'(1) p'(1) sum.union_disjoint [of "snd ` p" "q - snd ` p", symmetric] by simp qed finally show "?x \ e + k" .