diff -r 7454317f883c -r 13b051ebc6c5 src/HOL/Analysis/Tagged_Division.thy --- a/src/HOL/Analysis/Tagged_Division.thy Tue Aug 01 22:19:37 2017 +0200 +++ b/src/HOL/Analysis/Tagged_Division.thy Wed Aug 02 16:31:42 2017 +0200 @@ -1504,7 +1504,7 @@ done by (simp add: interval_split k interval_doublesplit) qed - + lemma (in comm_monoid_set) operative_division: fixes g :: "'b::euclidean_space set \ 'a" assumes g: "operative g" and d: "d division_of (cbox a b)" shows "F g d = g (cbox a b)" @@ -1614,60 +1614,75 @@ case False then have "\x. x \ division_points (cbox a b) d" by auto - then guess k c - unfolding split_paired_Ex division_points_def mem_Collect_eq split_conv - apply (elim exE conjE) - done - note this(2-4,1) note kc=this[unfolded interval_bounds[OF ab']] - from this(3) guess j .. note j=this - define d1 where "d1 = {l \ {x. x\k \ c} | l. l \ d \ l \ {x. x\k \ c} \ {}}" - define d2 where "d2 = {l \ {x. x\k \ c} | l. l \ d \ l \ {x. x\k \ c} \ {}}" + then obtain k c + where "k \ Basis" "interval_lowerbound (cbox a b) \ k < c" + "c < interval_upperbound (cbox a b) \ k" + "\i\d. interval_lowerbound i \ k = c \ interval_upperbound i \ k = c" + unfolding division_points_def by auto + then obtain j where "a \ k < c" "c < b \ k" + and "j \ d" and j: "interval_lowerbound j \ k = c \ interval_upperbound j \ k = c" + by (metis division_of_trivial empty_iff interval_bounds' less.prems) + let ?lec = "{x. x\k \ c}" let ?gec = "{x. x\k \ c}" + define d1 where "d1 = {l \ ?lec | l. l \ d \ l \ ?lec \ {}}" + define d2 where "d2 = {l \ ?gec | l. l \ d \ l \ ?gec \ {}}" define cb where "cb = (\i\Basis. (if i = k then c else b\i) *\<^sub>R i)" define ca where "ca = (\i\Basis. (if i = k then c else a\i) *\<^sub>R i)" - note division_points_psubset[OF \d division_of cbox a b\ ab kc(1-2) j] - note psubset_card_mono[OF _ this(1)] psubset_card_mono[OF _ this(2)] - then have *: "F g d1 = g (cbox a b \ {x. x\k \ c})" "F g d2 = g (cbox a b \ {x. x\k \ c})" - unfolding interval_split[OF kc(4)] - apply (rule_tac[!] "less.hyps"[rule_format]) - using division_split[OF \d division_of cbox a b\, where k=k and c=c] - apply (simp_all add: interval_split kc d1_def d2_def division_points_finite[OF \d division_of cbox a b\]) - done - { fix l y - assume as: "l \ d" "y \ d" "l \ {x. x \ k \ c} = y \ {x. x \ k \ c}" "l \ y" - then obtain u v where leq: "l = cbox u v" - by (meson cbox_division_memE less.prems) - have "g (l \ {x. x \ k \ c}) = \<^bold>1" - unfolding leq interval_split[OF kc(4)] - apply (rule operativeD[OF g]) - unfolding interior_cbox[symmetric] interval_split[symmetric, OF kc(4)] - using division_split_left_inj less as kc leq by blast - } note fxk_le = this - { fix l y - assume as: "l \ d" "y \ d" "l \ {x. c \ x \ k} = y \ {x. c \ x \ k}" "l \ y" - then obtain u v where leq: "l = cbox u v" - by (meson cbox_division_memE less.prems) - have "g (l \ {x. x \ k \ c}) = \<^bold>1" - unfolding leq interval_split[OF kc(4)] - apply (rule operativeD(1)[OF g]) - unfolding interior_cbox[symmetric] interval_split[symmetric,OF kc(4)] - using division_split_right_inj less leq as kc by blast - } note fxk_ge = this - have d1_alt: "d1 = (\l. l \ {x. x\k \ c}) ` {l \ d. l \ {x. x\k \ c} \ {}}" + have "division_points (cbox a b \ ?lec) {l \ ?lec |l. l \ d \ l \ ?lec \ {}} + \ division_points (cbox a b) d" + by (rule division_points_psubset[OF \d division_of cbox a b\ ab \a \ k < c\ \c < b \ k\ \j \ d\ j \k \ Basis\]) + with division_points_finite[OF \d division_of cbox a b\] + have "card + (division_points (cbox a b \ ?lec) {l \ ?lec |l. l \ d \ l \ ?lec \ {}}) + < card (division_points (cbox a b) d)" + by (rule psubset_card_mono) + moreover have "division_points (cbox a b \ {x. c \ x \ k}) {l \ {x. c \ x \ k} |l. l \ d \ l \ {x. c \ x \ k} \ {}} + \ division_points (cbox a b) d" + by (rule division_points_psubset[OF \d division_of cbox a b\ ab \a \ k < c\ \c < b \ k\ \j \ d\ j \k \ Basis\]) + with division_points_finite[OF \d division_of cbox a b\] + have "card (division_points (cbox a b \ ?gec) {l \ ?gec |l. l \ d \ l \ ?gec \ {}}) + < card (division_points (cbox a b) d)" + by (rule psubset_card_mono) + ultimately have *: "F g d1 = g (cbox a b \ ?lec)" "F g d2 = g (cbox a b \ ?gec)" + unfolding interval_split[OF \k \ Basis\] + apply (rule_tac[!] less.hyps) + using division_split[OF \d division_of cbox a b\, where k=k and c=c] \k \ Basis\ + by (simp_all add: interval_split d1_def d2_def division_points_finite[OF \d division_of cbox a b\]) + have fxk_le: "g (l \ ?lec) = \<^bold>1" + if "l \ d" "y \ d" "l \ ?lec = y \ ?lec" "l \ y" for l y + proof - + obtain u v where leq: "l = cbox u v" + using \l \ d\ less.prems by auto + have "interior (cbox u v \ ?lec) = {}" + using that division_split_left_inj leq less.prems by blast + then show ?thesis + unfolding leq interval_split[OF \k \ Basis\] using g by auto + qed + have fxk_ge: "g (l \ {x. x \ k \ c}) = \<^bold>1" + if "l \ d" "y \ d" "l \ ?gec = y \ ?gec" "l \ y" for l y + proof - + obtain u v where leq: "l = cbox u v" + using \l \ d\ less.prems by auto + have "interior (cbox u v \ ?gec) = {}" + using that division_split_right_inj leq less.prems by blast + then show ?thesis + unfolding leq interval_split[OF \k \ Basis\] using g by auto + qed + have d1_alt: "d1 = (\l. l \ ?lec) ` {l \ d. l \ ?lec \ {}}" using d1_def by auto - have d2_alt: "d2 = (\l. l \ {x. x\k \ c}) ` {l \ d. l \ {x. x\k \ c} \ {}}" + have d2_alt: "d2 = (\l. l \ ?gec) ` {l \ d. l \ ?gec \ {}}" using d2_def by auto have "g (cbox a b) = F g d1 \<^bold>* F g d2" (is "_ = ?prev") - unfolding * using g kc(4) by blast - also have "F g d1 = F (\l. g (l \ {x. x\k \ c})) d" + unfolding * using g \k \ Basis\ by blast + also have "F g d1 = F (\l. g (l \ ?lec)) d" unfolding d1_alt using division_of_finite[OF less.prems] fxk_le by (subst reindex_nontrivial) (auto intro!: mono_neutral_cong_left simp: operative_empty[OF g]) - also have "F g d2 = F (\l. g (l \ {x. x\k \ c})) d" + also have "F g d2 = F (\l. g (l \ ?gec)) d" unfolding d2_alt using division_of_finite[OF less.prems] fxk_ge by (subst reindex_nontrivial) (auto intro!: mono_neutral_cong_left simp: operative_empty[OF g]) - also have *: "\x\d. g x = g (x \ {x. x \ k \ c}) \<^bold>* g (x \ {x. c \ x \ k})" + also have *: "\x\d. g x = g (x \ ?lec) \<^bold>* g (x \ ?gec)" unfolding forall_in_division[OF \d division_of cbox a b\] - using g kc(4) by blast - have "F (\l. g (l \ {x. x\k \ c})) d \<^bold>* F (\l. g (l \ {x. x\k \ c})) d = F g d" + using g \k \ Basis\ by blast + have "F (\l. g (l \ ?lec)) d \<^bold>* F (\l. g (l \ ?gec)) d = F g d" using * by (simp add: distrib) finally show ?thesis by auto qed