# HG changeset patch # User paulson # Date 1501752548 -7200 # Node ID a9bb833ee9715fe9834a879bcfefd9df5ad69f62 # Parent 2a1739aad711ec689b3b2881741cd3044ec3dd69 more tidying up diff -r 2a1739aad711 -r a9bb833ee971 src/HOL/Analysis/Lebesgue_Integral_Substitution.thy --- a/src/HOL/Analysis/Lebesgue_Integral_Substitution.thy Thu Aug 03 10:52:13 2017 +0200 +++ b/src/HOL/Analysis/Lebesgue_Integral_Substitution.thy Thu Aug 03 11:29:08 2017 +0200 @@ -12,6 +12,24 @@ imports Interval_Integral begin + +lemma finite_product_dependent: (*FIXME DELETE*) + assumes "finite s" + and "\x. x \ s \ finite (t x)" + shows "finite {(i, j) |i j. i \ s \ j \ t i}" + using assms +proof induct + case (insert x s) + have *: "{(i, j) |i j. i \ insert x s \ j \ t i} = + (\y. (x,y)) ` (t x) \ {(i, j) |i j. i \ s \ j \ t i}" by auto + show ?case + unfolding * + apply (rule finite_UnI) + using insert + apply auto + done +qed auto + lemma nn_integral_substitution_aux: fixes f :: "real \ ennreal" assumes Mf: "f \ borel_measurable borel" diff -r 2a1739aad711 -r a9bb833ee971 src/HOL/Analysis/Tagged_Division.thy --- a/src/HOL/Analysis/Tagged_Division.thy Thu Aug 03 10:52:13 2017 +0200 +++ b/src/HOL/Analysis/Tagged_Division.thy Thu Aug 03 11:29:08 2017 +0200 @@ -10,23 +10,6 @@ Topology_Euclidean_Space begin -lemma finite_product_dependent: (*FIXME DELETE*) - assumes "finite s" - and "\x. x \ s \ finite (t x)" - shows "finite {(i, j) |i j. i \ s \ j \ t i}" - using assms -proof induct - case (insert x s) - have *: "{(i, j) |i j. i \ insert x s \ j \ t i} = - (\y. (x,y)) ` (t x) \ {(i, j) |i j. i \ s \ j \ t i}" by auto - show ?case - unfolding * - apply (rule finite_UnI) - using insert - apply auto - done -qed auto - lemma sum_Sigma_product: assumes "finite S" and "\i. i \ S \ finite (T i)" @@ -210,18 +193,18 @@ subsection \The notion of a gauge --- simply an open set containing the point.\ -definition "gauge d \ (\x. x \ d x \ open (d x))" +definition "gauge \ \ (\x. x \ \ x \ open (\ x))" lemma gaugeI: - assumes "\x. x \ g x" - and "\x. open (g x)" - shows "gauge g" + assumes "\x. x \ \ x" + and "\x. open (\ x)" + shows "gauge \" using assms unfolding gauge_def by auto lemma gaugeD[dest]: - assumes "gauge d" - shows "x \ d x" - and "open (d x)" + assumes "gauge \" + shows "x \ \ x" + and "open (\ x)" using assms unfolding gauge_def by auto lemma gauge_ball_dependent: "\x. 0 < e x \ gauge (\x. ball x (e x))" @@ -233,7 +216,7 @@ lemma gauge_trivial[intro!]: "gauge (\x. ball x 1)" by (rule gauge_ball) auto -lemma gauge_Int[intro]: "gauge d1 \ gauge d2 \ gauge (\x. d1 x \ d2 x)" +lemma gauge_Int[intro]: "gauge \1 \ gauge \2 \ gauge (\x. \1 x \ \2 x)" unfolding gauge_def by auto lemma gauge_reflect: @@ -244,10 +227,10 @@ lemma gauge_Inter: assumes "finite S" - and "\d. d\S \ gauge (f d)" - shows "gauge (\x. \{f d x | d. d \ S})" + and "\u. u\S \ gauge (f u)" + shows "gauge (\x. \{f u x | u. u \ S})" proof - - have *: "\x. {f d x |d. d \ S} = (\d. f d x) ` S" + have *: "\x. {f u x |u. u \ S} = (\u. f u x) ` S" by auto show ?thesis unfolding gauge_def unfolding * @@ -314,18 +297,15 @@ assume "s = {{a}}" "K\s" then have "\x y. K = cbox x y" apply (rule_tac x=a in exI)+ - apply (force simp: cbox_sing) + apply force done } ultimately show ?l unfolding division_of_def cbox_sing by auto next assume ?l - { - fix x - assume x: "x \ s" have "x = {a}" - by (metis \s division_of cbox a a\ cbox_sing division_ofD(2) division_ofD(3) subset_singletonD x) - } + have "x = {a}" if "x \ s" for x + by (metis \s division_of cbox a a\ cbox_sing division_ofD(2) division_ofD(3) subset_singletonD that) moreover have "s \ {}" using \s division_of cbox a a\ by auto ultimately show ?r @@ -401,11 +381,8 @@ have *: "\s. \{x\s. x \ {}} = \s" by auto show "\?A = s1 \ s2" - apply (rule set_eqI) - unfolding * and UN_iff - using division_ofD(6)[OF assms(1)] and division_ofD(6)[OF assms(2)] - apply auto - done + unfolding * + using division_ofD(6)[OF assms(1)] and division_ofD(6)[OF assms(2)] by auto { fix k assume "k \ ?A" @@ -461,14 +438,14 @@ unfolding * by auto qed -lemma elementary_inter: +lemma elementary_Int: fixes s t :: "'a::euclidean_space set" assumes "p1 division_of s" and "p2 division_of t" shows "\p. p division_of (s \ t)" using assms division_inter by blast -lemma elementary_inters: +lemma elementary_Inter: assumes "finite f" and "f \ {}" and "\s\f. \p. p division_of (s::('a::euclidean_space) set)" @@ -488,7 +465,7 @@ moreover obtain px where "px division_of x" using insert(5)[rule_format,OF insertI1] .. ultimately show ?thesis - by (simp add: elementary_inter Inter_insert) + by (simp add: elementary_Int Inter_insert) qed qed auto @@ -665,8 +642,8 @@ then have di: "\x. x \ p \ \d. d division_of \(q x - {x})" by (meson Diff_subset division_of_subset) have "\d. d division_of \((\i. \(q i - {i})) ` p)" - apply (rule elementary_inters [OF finite_imageI[OF p(1)]]) - apply (auto dest: di simp: False elementary_inters [OF finite_imageI[OF p(1)]]) + apply (rule elementary_Inter [OF finite_imageI[OF p(1)]]) + apply (auto dest: di simp: False elementary_Inter [OF finite_imageI[OF p(1)]]) done then obtain d where d: "d division_of \((\i. \(q i - {i})) ` p)" .. have "d \ p division_of cbox a b" @@ -920,7 +897,7 @@ apply auto done then obtain r2 where r2: "r2 division_of (\(r1 - p)) \ (\q)" - by (metis assms(2) divq(6) elementary_inter) + by (metis assms(2) divq(6) elementary_Int) { fix x assume x: "x \ T" "x \ S"