# HG changeset patch # User paulson # Date 1504880842 -3600 # Node ID f7e38b8583a0ed479183e6145aa76158b877dde0 # Parent ff2e0115fea4166cc93ce63b68b8a5bd78f0bd01 Correction of typos and a bit of streamlining diff -r ff2e0115fea4 -r f7e38b8583a0 NEWS --- a/NEWS Fri Sep 08 12:49:40 2017 +0100 +++ b/NEWS Fri Sep 08 15:27:22 2017 +0100 @@ -220,7 +220,7 @@ * Theory "HOL-Library.Permutations": theorem bij_swap_ompose_bij has been renamed to bij_swap_compose_bij. INCOMPATIBILITY. -* New theory "HOL-Library.Going_To_Filter" providing the "f going_to F" +* New theory "HOL-Library.Going_To_Filter" providing the "f going_to F" filter for describing points x such that f(x) is in the filter F. * Theory "HOL-Library.Formal_Power_Series": constants X/E/L/F have been @@ -255,7 +255,7 @@ * Session HOL-Analysis: more material involving arcs, paths, covering spaces, innessential maps, retracts, infinite products, simplicial complexes. -Baire Category theory. Major results include the Jordan Curve Theorem and the Great Picard +Baire Category theorem. Major results include the Jordan Curve Theorem and the Great Picard Theorem. * Session HOL-Algebra has been extended by additional lattice theory: diff -r ff2e0115fea4 -r f7e38b8583a0 src/HOL/Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Analysis/Topology_Euclidean_Space.thy Fri Sep 08 12:49:40 2017 +0100 +++ b/src/HOL/Analysis/Topology_Euclidean_Space.thy Fri Sep 08 15:27:22 2017 +0100 @@ -140,10 +140,8 @@ apply safe apply fastforce apply fastforce - apply (erule_tac x="x" in allE) - apply simp - apply (rule_tac x="{x}" in exI) - apply auto + apply (erule_tac x=x in allE, simp) + apply (rule_tac x="{x}" in exI, auto) done lemma topological_basis_iff: @@ -275,7 +273,7 @@ assumes "open X" obtains B' where "B' \ B" "X = \B'" using assms open_countable_basis_ex - by (atomize_elim) simp + by atomize_elim simp lemma countable_dense_exists: "\D::'a set. countable D \ (\X. open X \ X \ {} \ (\d \ D. d \ X))" @@ -299,8 +297,7 @@ using first_countable_basis[of x] apply atomize_elim apply (elim exE) - apply (rule_tac x="range A" in exI) - apply auto + apply (rule_tac x="range A" in exI, auto) done lemma (in first_countable_topology) first_countable_basis_Int_stableE: @@ -647,7 +644,7 @@ using openin_Union[of "{S,T}" U] by auto lemma openin_topspace[intro, simp]: "openin U (topspace U)" - by (force simp add: openin_Union topspace_def) + by (force simp: openin_Union topspace_def) lemma openin_subopen: "openin U S \ (\x \ S. \T. openin U T \ x \ T \ T \ S)" (is "?lhs \ ?rhs") @@ -657,7 +654,7 @@ next assume H: ?rhs let ?t = "\{T. openin U T \ T \ S}" - have "openin U ?t" by (force simp add: openin_Union) + have "openin U ?t" by (force simp: openin_Union) also have "?t = S" using H by auto finally show "openin U S" . qed @@ -666,7 +663,7 @@ assumes "finite I" "\i. i \ I \ openin T (U i)" shows "openin T ((\i \ I. U i) \ topspace T)" -using assms by (induct, auto simp add: inf_sup_aci(2) openin_Int) +using assms by (induct, auto simp: inf_sup_aci(2) openin_Int) lemma openin_INT2 [intro]: assumes "finite I" "I \ {}" @@ -694,7 +691,7 @@ by (simp add: closedin_def) lemma closedin_Un[intro]: "closedin U S \ closedin U T \ closedin U (S \ T)" - by (auto simp add: Diff_Un closedin_def) + by (auto simp: Diff_Un closedin_def) lemma Diff_Inter[intro]: "A - \S = \{A - s|s. s\S}" by auto @@ -722,7 +719,7 @@ using closedin_Inter[of "{S,T}" U] by auto lemma openin_closedin_eq: "openin U S \ S \ topspace U \ closedin U (topspace U - S)" - apply (auto simp add: closedin_def Diff_Diff_Int inf_absorb2) + apply (auto simp: closedin_def Diff_Diff_Int inf_absorb2) apply (metis openin_subset subset_eq) done @@ -735,9 +732,9 @@ shows "openin U (S - T)" proof - have "S - T = S \ (topspace U - T)" using openin_subset[of U S] oS cT - by (auto simp add: topspace_def openin_subset) + by (auto simp: topspace_def openin_subset) then show ?thesis using oS cT - by (auto simp add: closedin_def) + by (auto simp: closedin_def) qed lemma closedin_diff[intro]: @@ -746,9 +743,9 @@ shows "closedin U (S - T)" proof - have "S - T = S \ (topspace U - T)" - using closedin_subset[of U S] oS cT by (auto simp add: topspace_def) + using closedin_subset[of U S] oS cT by (auto simp: topspace_def) then show ?thesis - using oS cT by (auto simp add: openin_closedin_eq) + using oS cT by (auto simp: openin_closedin_eq) qed @@ -781,7 +778,7 @@ have "\K = (\Sk) \ V" using Sk by auto moreover have "openin U (\Sk)" - using Sk by (auto simp add: subset_eq) + using Sk by (auto simp: subset_eq) ultimately have "?L (\K)" by blast } ultimately show ?thesis @@ -793,11 +790,11 @@ by auto lemma topspace_subtopology: "topspace (subtopology U V) = topspace U \ V" - by (auto simp add: topspace_def openin_subtopology) + by (auto simp: topspace_def openin_subtopology) lemma closedin_subtopology: "closedin (subtopology U V) S \ (\T. closedin U T \ S = T \ V)" unfolding closedin_def topspace_subtopology - by (auto simp add: openin_subtopology) + by (auto simp: openin_subtopology) lemma openin_subtopology_refl: "openin (subtopology U V) V \ V \ topspace U" unfolding openin_subtopology @@ -871,13 +868,13 @@ unfolding euclidean_def apply (rule cong[where x=S and y=S]) apply (rule topology_inverse[symmetric]) - apply (auto simp add: istopology_def) + apply (auto simp: istopology_def) done declare open_openin [symmetric, simp] lemma topspace_euclidean [simp]: "topspace euclidean = UNIV" - by (force simp add: topspace_def) + by (force simp: topspace_def) lemma topspace_euclidean_subtopology[simp]: "topspace (subtopology euclidean S) = S" by (simp add: topspace_subtopology) @@ -894,7 +891,7 @@ text \Basic "localization" results are handy for connectedness.\ lemma openin_open: "openin (subtopology euclidean U) S \ (\T. open T \ (S = U \ T))" - by (auto simp add: openin_subtopology) + by (auto simp: openin_subtopology) lemma openin_Int_open: "\openin (subtopology euclidean U) S; open T\ @@ -902,14 +899,14 @@ by (metis open_Int Int_assoc openin_open) lemma openin_open_Int[intro]: "open S \ openin (subtopology euclidean U) (U \ S)" - by (auto simp add: openin_open) + by (auto simp: openin_open) lemma open_openin_trans[trans]: "open S \ open T \ T \ S \ openin (subtopology euclidean S) T" by (metis Int_absorb1 openin_open_Int) lemma open_subset: "S \ T \ open S \ openin (subtopology euclidean T) S" - by (auto simp add: openin_open) + by (auto simp: openin_open) lemma closedin_closed: "closedin (subtopology euclidean U) S \ (\T. closed T \ S = U \ T)" by (simp add: closedin_subtopology closed_closedin Int_ac) @@ -918,7 +915,7 @@ by (metis closedin_closed) lemma closed_subset: "S \ T \ closed S \ closedin (subtopology euclidean T) S" - by (auto simp add: closedin_closed) + by (auto simp: closedin_closed) lemma closedin_closed_subset: "\closedin (subtopology euclidean U) V; T \ U; S = V \ T\ @@ -974,8 +971,7 @@ openin (subtopology euclidean s) e2 \ e1 \ e2 = s \ e1 \ e2 = {} \ e1 \ {} \ e2 \ {})" - apply (simp add: connected_openin, safe) - apply blast + apply (simp add: connected_openin, safe, blast) by (metis Int_lower1 Un_subset_iff openin_open subset_antisym) lemma connected_closedin: @@ -1016,8 +1012,7 @@ closedin (subtopology euclidean s) e2 \ e1 \ e2 = s \ e1 \ e2 = {} \ e1 \ {} \ e2 \ {})" - apply (simp add: connected_closedin, safe) - apply blast + apply (simp add: connected_closedin, safe, blast) by (metis Int_lower1 Un_subset_iff closedin_closed subset_antisym) text \These "transitivity" results are handy too\ @@ -1028,15 +1023,15 @@ unfolding open_openin openin_open by blast lemma openin_open_trans: "openin (subtopology euclidean T) S \ open T \ open S" - by (auto simp add: openin_open intro: openin_trans) + by (auto simp: openin_open intro: openin_trans) lemma closedin_trans[trans]: "closedin (subtopology euclidean T) S \ closedin (subtopology euclidean U) T \ closedin (subtopology euclidean U) S" - by (auto simp add: closedin_closed closed_closedin closed_Inter Int_assoc) + by (auto simp: closedin_closed closed_closedin closed_Inter Int_assoc) lemma closedin_closed_trans: "closedin (subtopology euclidean T) S \ closed T \ closed S" - by (auto simp add: closedin_closed intro: closedin_trans) + by (auto simp: closedin_closed intro: closedin_trans) lemma openin_subtopology_Int_subset: "\openin (subtopology euclidean u) (u \ S); v \ u\ \ openin (subtopology euclidean v) (v \ S)" @@ -1198,8 +1193,7 @@ apply (simp add: openin_contains_ball) apply (rule iffI) apply (auto dest!: bspec) -apply (rule_tac x="e/2" in exI) -apply force+ +apply (rule_tac x="e/2" in exI, force+) done lemma ball_eq_empty[simp]: "ball x e = {} \ e \ 0" @@ -1295,7 +1289,7 @@ lemma rational_boxes: fixes x :: "'a::euclidean_space" assumes "e > 0" - shows "\a b. (\i\Basis. a \ i \ \ \ b \ i \ \ ) \ x \ box a b \ box a b \ ball x e" + shows "\a b. (\i\Basis. a \ i \ \ \ b \ i \ \) \ x \ box a b \ box a b \ ball x e" proof - define e' where "e' = e / (2 * sqrt (real (DIM ('a))))" then have e: "e' > 0" @@ -1610,7 +1604,7 @@ then have "c \ j < ?x \ j \ ?x \ j < d \ j" apply (cases "j = i") using as(2)[THEN bspec[where x=j]] i - apply (auto simp add: as2) + apply (auto simp: as2) done } then have "?x\box c d" @@ -1636,7 +1630,7 @@ then have "d \ j > ?x \ j \ ?x \ j > c \ j" apply (cases "j = i") using as(2)[THEN bspec[where x=j]] - apply (auto simp add: as2) + apply (auto simp: as2) done } then have "?x\box c d" @@ -1691,7 +1685,7 @@ then have "cbox a b \ cbox c d" "cbox c d \ cbox a b" by auto then show ?rhs - by (force simp add: subset_box box_eq_empty intro: antisym euclidean_eqI) + by (force simp: subset_box box_eq_empty intro: antisym euclidean_eqI) next assume ?rhs then show ?lhs @@ -1737,13 +1731,13 @@ qed lemma subset_box_complex: - "cbox a b \ cbox c d \ + "cbox a b \ cbox c d \ (Re a \ Re b \ Im a \ Im b) \ Re a \ Re c \ Im a \ Im c \ Re b \ Re d \ Im b \ Im d" - "cbox a b \ box c d \ + "cbox a b \ box c d \ (Re a \ Re b \ Im a \ Im b) \ Re a > Re c \ Im a > Im c \ Re b < Re d \ Im b < Im d" "box a b \ cbox c d \ (Re a < Re b \ Im a < Im b) \ Re a \ Re c \ Im a \ Im c \ Re b \ Re d \ Im b \ Im d" - "box a b \ box c d \ + "box a b \ box c d \ (Re a < Re b \ Im a < Im b) \ Re a \ Re c \ Im a \ Im c \ Re b \ Re d \ Im b \ Im d" by (subst subset_box; force simp: Basis_complex_def)+ @@ -1841,7 +1835,7 @@ define y where "y = rec_list (s j) (\j _ Y. (\i\Basis. (if i = j then s i \ i else Y \ i) *\<^sub>R i))" have "x = (\i\Basis. (if i \ set bs then s i \ i else s j \ i) *\<^sub>R i)" - using bs by (auto simp add: s(1)[symmetric] euclidean_representation) + using bs by (auto simp: s(1)[symmetric] euclidean_representation) also have [symmetric]: "y bs = \" using bs(2) bs(1)[THEN equalityD1] by (induct bs) (auto simp: y_def euclidean_representation intro!: euclidean_eqI[where 'a='a]) @@ -1880,7 +1874,7 @@ by blast qed - + subsection \Connectedness\ lemma connected_local: @@ -1996,7 +1990,7 @@ done lemma islimpt_EMPTY[simp]: "\ x islimpt {}" - by (auto simp add: islimpt_def) + by (auto simp: islimpt_def) lemma finite_set_avoid: fixes a :: "'a::metric_space" @@ -2047,7 +2041,7 @@ from z y have "dist z y < e" by (intro dist_triangle_lt [where z=x]) simp from d[rule_format, OF y(1) z(1) this] y z show ?thesis - by (auto simp add: dist_commute) + by (auto simp: dist_commute) qed then show ?thesis by (metis islimpt_approachable closed_limpt [where 'a='a]) @@ -2065,7 +2059,7 @@ lemma closed_Ints [simp]: "closed (\ :: 'a :: real_normed_algebra_1 set)" unfolding Ints_def by (rule closed_of_int_image) -lemma closed_subset_Ints: +lemma closed_subset_Ints: fixes A :: "'a :: real_normed_algebra_1 set" assumes "A \ \" shows "closed A" @@ -2095,10 +2089,10 @@ by (simp add: interior_def open_Union) lemma interior_subset: "interior S \ S" - by (auto simp add: interior_def) + by (auto simp: interior_def) lemma interior_maximal: "T \ S \ open T \ T \ interior S" - by (auto simp add: interior_def) + by (auto simp: interior_def) lemma interior_open: "open S \ interior S = S" by (intro equalityI interior_subset interior_maximal subset_refl) @@ -2119,7 +2113,7 @@ using open_interior by (rule interior_open) lemma interior_mono: "S \ T \ interior S \ interior T" - by (auto simp add: interior_def) + by (auto simp: interior_def) lemma interior_unique: assumes "T \ S" and "open T" @@ -2129,8 +2123,7 @@ lemma interior_singleton [simp]: "interior {a} = {}" for a :: "'a::perfect_space" - apply (rule interior_unique) - apply simp_all + apply (rule interior_unique, simp_all) using not_open_singleton subset_singletonD apply fastforce done @@ -2154,7 +2147,7 @@ unfolding interior_def islimpt_def apply (clarsimp, rename_tac T T') apply (drule_tac x="T \ T'" in spec) - apply (auto simp add: open_Int) + apply (auto simp: open_Int) done lemma interior_closed_Un_empty_interior: @@ -2251,7 +2244,7 @@ definition "closure S = S \ {x | x. x islimpt S}" lemma interior_closure: "interior S = - (closure (- S))" - by (auto simp add: interior_def closure_def islimpt_def) + by (auto simp: interior_def closure_def islimpt_def) lemma closure_interior: "closure S = - interior (- S)" by (simp add: interior_closure) @@ -2263,7 +2256,7 @@ by (simp add: closure_def) lemma closure_hull: "closure S = closed hull S" - by (auto simp add: hull_def closure_interior interior_def) + by (auto simp: hull_def closure_interior interior_def) lemma closure_eq: "closure S = S \ closed S" unfolding closure_hull using closed_Inter by (rule hull_eq) @@ -2345,14 +2338,12 @@ fix T assume "A \ B \ T" and "closed T" then show "closure A \ closure B \ T" - apply (simp add: closed_def open_prod_def) - apply clarify + apply (simp add: closed_def open_prod_def, clarify) apply (rule ccontr) apply (drule_tac x="(a, b)" in bspec, simp, clarify, rename_tac C D) apply (simp add: closure_interior interior_def) apply (drule_tac x=C in spec) - apply (drule_tac x=D in spec) - apply auto + apply (drule_tac x=D in spec, auto) done qed @@ -2406,8 +2397,7 @@ "closedin (subtopology euclidean T) S \ S \ T \ (\x. x islimpt S \ x \ T \ x \ S)" apply (simp add: closedin_closed, safe) apply (simp add: closed_limpt islimpt_subset) - apply (rule_tac x="closure S" in exI) - apply simp + apply (rule_tac x="closure S" in exI, simp) apply (force simp: closure_def) done @@ -2651,11 +2641,9 @@ lemma connected_component_eq_eq: "connected_component_set s x = connected_component_set s y \ x \ s \ y \ s \ x \ s \ y \ s \ connected_component s x y" - apply (cases "y \ s") - apply (simp add:) + apply (cases "y \ s", simp) apply (metis connected_component_eq connected_component_eq_empty connected_component_refl_eq mem_Collect_eq) - apply (cases "x \ s") - apply (simp add:) + apply (cases "x \ s", simp) apply (metis connected_component_eq_empty) using connected_component_eq_empty apply blast @@ -2864,8 +2852,7 @@ by (meson connected_component_def connected_component_trans) lemma exists_component_superset: "\t \ s; s \ {}; connected t\ \ \c. c \ components s \ t \ c" - apply (cases "t = {}") - apply force + apply (cases "t = {}", force) apply (metis components_def ex_in_conv connected_component_maximal contra_subsetD image_eqI) done @@ -2911,13 +2898,12 @@ have *: "connected_component_set s x \ s \ closure (connected_component_set s x)" by (auto simp: closure_def connected_component_in) have "connected_component s x y \ s \ closure (connected_component_set s x) \ connected_component_set s x" - apply (rule connected_component_maximal) - apply simp + apply (rule connected_component_maximal, simp) using closure_subset connected_component_in apply fastforce using * connected_intermediate_closure apply blast+ done with y * show ?thesis - by (auto simp add: Topology_Euclidean_Space.closedin_closed) + by (auto simp: Topology_Euclidean_Space.closedin_closed) qed @@ -2929,13 +2915,13 @@ by (simp add: frontier_def closed_Diff) lemma frontier_closures: "frontier S = closure S \ closure (- S)" - by (auto simp add: frontier_def interior_closure) + by (auto simp: frontier_def interior_closure) lemma frontier_straddle: fixes a :: "'a::metric_space" shows "a \ frontier S \ (\e>0. (\x\S. dist a x < e) \ (\x. x \ S \ dist a x < e))" unfolding frontier_def closure_interior - by (auto simp add: mem_interior subset_eq ball_def) + by (auto simp: mem_interior subset_eq ball_def) lemma frontier_subset_closed: "closed S \ frontier S \ S" by (metis frontier_def closure_closed Diff_subset) @@ -2956,7 +2942,7 @@ qed lemma frontier_complement [simp]: "frontier (- S) = frontier S" - by (auto simp add: frontier_def closure_complement interior_complement) + by (auto simp: frontier_def closure_complement interior_complement) lemma frontier_disjoint_eq: "frontier S \ S = {} \ open S" using frontier_complement frontier_subset_eq[of "- S"] @@ -3054,33 +3040,31 @@ lemma Lim_within_le: "(f \ l)(at a within S) \ (\e>0. \d>0. \x\S. 0 < dist x a \ dist x a \ d \ dist (f x) l < e)" - by (auto simp add: tendsto_iff eventually_at_le) + by (auto simp: tendsto_iff eventually_at_le) lemma Lim_within: "(f \ l) (at a within S) \ (\e >0. \d>0. \x \ S. 0 < dist x a \ dist x a < d \ dist (f x) l < e)" - by (auto simp add: tendsto_iff eventually_at) + by (auto simp: tendsto_iff eventually_at) corollary Lim_withinI [intro?]: assumes "\e. e > 0 \ \d>0. \x \ S. 0 < dist x a \ dist x a < d \ dist (f x) l \ e" shows "(f \ l) (at a within S)" apply (simp add: Lim_within, clarify) - apply (rule ex_forward [OF assms [OF half_gt_zero]]) - apply auto + apply (rule ex_forward [OF assms [OF half_gt_zero]], auto) done lemma Lim_at: "(f \ l) (at a) \ (\e >0. \d>0. \x. 0 < dist x a \ dist x a < d \ dist (f x) l < e)" - by (auto simp add: tendsto_iff eventually_at) + by (auto simp: tendsto_iff eventually_at) lemma Lim_at_infinity: "(f \ l) at_infinity \ (\e>0. \b. \x. norm x \ b \ dist (f x) l < e)" - by (auto simp add: tendsto_iff eventually_at_infinity) + by (auto simp: tendsto_iff eventually_at_infinity) corollary Lim_at_infinityI [intro?]: assumes "\e. e > 0 \ \B. \x. norm x \ B \ dist (f x) l \ e" shows "(f \ l) at_infinity" apply (simp add: Lim_at_infinity, clarify) - apply (rule ex_forward [OF assms [OF half_gt_zero]]) - apply auto + apply (rule ex_forward [OF assms [OF half_gt_zero]], auto) done lemma Lim_eventually: "eventually (\x. f x = l) net \ (f \ l) net" @@ -3538,7 +3522,7 @@ lemma closure_approachable: fixes S :: "'a::metric_space set" shows "x \ closure S \ (\e>0. \y\S. dist y x < e)" - apply (auto simp add: closure_def islimpt_approachable) + apply (auto simp: closure_def islimpt_approachable) apply (metis dist_self) done @@ -3567,7 +3551,7 @@ with assms obtain x where "x \ S" "x < Inf S + e" by (subst (asm) cInf_less_iff) auto with * have "\x\S. dist x (Inf S) < e" - by (intro bexI[of _ x]) (auto simp add: dist_real_def) + by (intro bexI[of _ x]) (auto simp: dist_real_def) } then show ?thesis unfolding closure_approachable by auto qed @@ -3647,7 +3631,7 @@ by (simp add: infdist_def) lemma infdist_nonneg: "0 \ infdist x A" - by (auto simp add: infdist_def intro: cINF_greatest) + by (auto simp: infdist_def intro: cINF_greatest) lemma infdist_le: "a \ A \ infdist x A \ dist x a" by (auto intro: cINF_lower simp add: infdist_def) @@ -3772,8 +3756,7 @@ lemma seq_offset_neg: (* TODO: move to Topological_Spaces.thy *) "(f \ l) sequentially \ ((\i. f(i - k)) \ l) sequentially" apply (erule filterlim_compose) - apply (simp add: filterlim_def le_sequentially eventually_filtermap eventually_sequentially) - apply arith + apply (simp add: filterlim_def le_sequentially eventually_filtermap eventually_sequentially, arith) done lemma seq_harmonic: "((\n. inverse (real n)) \ 0) sequentially" @@ -3803,8 +3786,7 @@ assume "x\S" "e>0" "cball x e \ S" then have "\d>0. ball x d \ S" unfolding subset_eq - apply(rule_tac x="e/2" in exI) - apply auto + apply (rule_tac x="e/2" in exI, auto) done } ultimately show ?thesis @@ -3816,7 +3798,7 @@ lemma mem_interior_cball: "x \ interior S \ (\e>0. cball x e \ S)" apply (simp add: interior_def, safe) - apply (force simp add: open_contains_cball) + apply (force simp: open_contains_cball) apply (rule_tac x="ball x e" in exI) apply (simp add: subset_trans [OF ball_subset_cball]) done @@ -3866,18 +3848,18 @@ also have "\ = \- 1 + d / (2 * norm (x - y))\ * norm (x - y)" using scaleR_left_distrib[of "- 1" "d / (2 * norm (y - x))", symmetric, of "y - x"] unfolding scaleR_minus_left scaleR_one - by (auto simp add: norm_minus_commute) + by (auto simp: norm_minus_commute) also have "\ = \- norm (x - y) + d / 2\" unfolding abs_mult_pos[of "norm (x - y)", OF norm_ge_zero[of "x - y"]] unfolding distrib_right using \x\y\ by auto also have "\ \ e - d/2" using \d \ dist x y\ and \d>0\ and \?rhs\ - by (auto simp add: dist_norm) + by (auto simp: dist_norm) finally have "y - (d / (2 * dist y x)) *\<^sub>R (y - x) \ ball x e" using \d>0\ by auto moreover have "(d / (2*dist y x)) *\<^sub>R (y - x) \ 0" using \x\y\[unfolded dist_nz] \d>0\ unfolding scaleR_eq_0_iff - by (auto simp add: dist_commute) + by (auto simp: dist_commute) moreover have "dist (y - (d / (2 * dist y x)) *\<^sub>R (y - x)) y < d" unfolding dist_norm @@ -3905,14 +3887,13 @@ unfolding \x = y\ using \z \ y\ ** apply (rule_tac x=z in bexI) - apply (auto simp add: dist_commute) + apply (auto simp: dist_commute) done next case False then show "\x'\ball x e. x' \ y \ dist x' y < d" using \d>0\ \d > dist x y\ \?rhs\ - apply (rule_tac x=x in bexI) - apply auto + apply (rule_tac x=x in bexI, auto) done qed qed @@ -3971,8 +3952,7 @@ apply (simp add: le_less [where 'a=real]) apply (erule disjE) apply (rule subsetD [OF closure_subset], simp) - apply (simp add: closure_def) - apply clarify + apply (simp add: closure_def, clarify) apply (rule closure_ball_lemma) apply (simp add: zero_less_dist_iff) done @@ -4010,7 +3990,7 @@ using perfect_choose_dist [of d] by auto have "xa \ S" using d[THEN spec[where x = xa]] - using xa by (auto simp add: dist_commute) + using xa by (auto simp: dist_commute) then have xa_cball: "xa \ cball x e" using as(1) by auto then have "y \ ball x e" @@ -4031,15 +4011,15 @@ unfolding zero_less_norm_iff[symmetric] using \d>0\ by auto have "dist (y + (d / 2 / dist y x) *\<^sub>R (y - x)) x = norm (y + (d / (2 * norm (y - x))) *\<^sub>R y - (d / (2 * norm (y - x))) *\<^sub>R x - x)" - by (auto simp add: dist_norm algebra_simps) + by (auto simp: dist_norm algebra_simps) also have "\ = norm ((1 + d / (2 * norm (y - x))) *\<^sub>R (y - x))" - by (auto simp add: algebra_simps) + by (auto simp: algebra_simps) also have "\ = \1 + d / (2 * norm (y - x))\ * norm (y - x)" using ** by auto also have "\ = (dist y x) + d/2" - using ** by (auto simp add: distrib_right dist_norm) + using ** by (auto simp: distrib_right dist_norm) finally have "e \ dist x y +d/2" - using *[unfolded mem_cball] by (auto simp add: dist_commute) + using *[unfolded mem_cball] by (auto simp: dist_commute) then show "y \ ball x e" unfolding mem_ball using \d>0\ by auto qed @@ -4081,14 +4061,14 @@ obtain a where "a \ x" "dist a x < e" using perfect_choose_dist [OF e] by auto then have "a \ x" "dist x a \ e" - by (auto simp add: dist_commute) - with e show ?thesis by (auto simp add: set_eq_iff) + by (auto simp: dist_commute) + with e show ?thesis by (auto simp: set_eq_iff) qed auto lemma cball_sing: fixes x :: "'a::metric_space" shows "e = 0 \ cball x e = {x}" - by (auto simp add: set_eq_iff) + by (auto simp: set_eq_iff) lemma ball_divide_subset: "d \ 1 \ ball x (e/d) \ ball x e" apply (cases "e \ 0") @@ -4179,15 +4159,14 @@ lemma bounded_cball[simp,intro]: "bounded (cball x e)" apply (simp add: bounded_def) apply (rule_tac x=x in exI) - apply (rule_tac x=e in exI) - apply auto + apply (rule_tac x=e in exI, auto) done lemma bounded_ball[simp,intro]: "bounded (ball x e)" by (metis ball_subset_cball bounded_cball bounded_subset) lemma bounded_Un[simp]: "bounded (S \ T) \ bounded S \ bounded T" - by (auto simp add: bounded_def) (metis Un_iff bounded_any_center le_max_iff_disj) + by (auto simp: bounded_def) (metis Un_iff bounded_any_center le_max_iff_disj) lemma bounded_Union[intro]: "finite F \ \S\F. bounded S \ bounded (\F)" by (induct rule: finite_induct[of F]) auto @@ -4249,7 +4228,7 @@ lemma not_bounded_UNIV[simp]: "\ bounded (UNIV :: 'a::{real_normed_vector, perfect_space} set)" -proof (auto simp add: bounded_pos not_le) +proof (auto simp: bounded_pos not_le) obtain x :: 'a where "x \ 0" using perfect_choose_dist [OF zero_less_one] by fast fix b :: real @@ -4287,7 +4266,7 @@ from assms(1) obtain b where b: "b > 0" "\x\S. norm x \ b" unfolding bounded_pos by auto from assms(2) obtain B where B: "B > 0" "\x. norm (f x) \ B * norm x" - using bounded_linear.pos_bounded by (auto simp add: ac_simps) + using bounded_linear.pos_bounded by (auto simp: ac_simps) { fix x assume "x \ S" @@ -4302,14 +4281,13 @@ then show ?thesis unfolding bounded_pos apply (rule_tac x="b*B" in exI) - using b B by (auto simp add: mult.commute) + using b B by (auto simp: mult.commute) qed lemma bounded_scaling: fixes S :: "'a::real_normed_vector set" shows "bounded S \ bounded ((\x. c *\<^sub>R x) ` S)" - apply (rule bounded_linear_image) - apply assumption + apply (rule bounded_linear_image, assumption) apply (rule bounded_linear_scaleR_right) done @@ -4347,7 +4325,7 @@ lemma bounded_uminus [simp]: fixes X :: "'a::real_normed_vector set" shows "bounded (uminus ` X) \ bounded X" -by (auto simp: bounded_def dist_norm; rule_tac x="-x" in exI; force simp add: add.commute norm_minus_commute) +by (auto simp: bounded_def dist_norm; rule_tac x="-x" in exI; force simp: add.commute norm_minus_commute) lemma uminus_bounded_comp [simp]: fixes f :: "'a \ 'b::real_normed_vector" @@ -4374,7 +4352,7 @@ "bounded (f ` S) \ bounded (g ` S) \ bounded ((\x. f x - g x) ` S)" for f g::"'a \ 'b::real_normed_vector" using bounded_plus_comp[of "f" S "\x. - g x"] - by (auto simp: ) + by auto subsection\Some theorems on sups and infs using the notion "bounded".\ @@ -4898,7 +4876,7 @@ with A(2)[THEN spec, of "X - {U}"] have "U \ \(X - {U}) \ {}" by auto with X show "(INF a:X. principal a) \ bot" - by (auto simp add: INF_principal_finite principal_eq_bot_iff) + by (auto simp: INF_principal_finite principal_eq_bot_iff) qed moreover have "F \ principal U" @@ -5133,7 +5111,7 @@ moreover have "eventually (\x. x \ A (Suc n)) (nhds x)" using A(1,2)[of "Suc n"] by (auto simp: eventually_nhds) ultimately have "eventually (\x. False) ?F" - by (auto simp add: eventually_inf) + by (auto simp: eventually_inf) with x show False by (simp add: eventually_False) qed @@ -5583,7 +5561,7 @@ obtain l1 r1 where r1: "strict_mono r1" and l1: "(\n. fst (f (r1 n))) \ l1" using bounded_imp_convergent_subsequence [OF s1] unfolding o_def by fast from f have s2: "bounded (range (snd \ f \ r1))" - by (auto simp add: image_comp intro: bounded_snd bounded_subset) + by (auto simp: image_comp intro: bounded_snd bounded_subset) obtain l2 r2 where r2: "strict_mono r2" and l2: "((\n. snd (f (r1 (r2 n)))) \ l2) sequentially" using bounded_imp_convergent_subsequence [OF s2] unfolding o_def by fast @@ -5674,7 +5652,7 @@ done qed -text\The Baire propery of dense sets\ +text\The Baire property of dense sets\ theorem Baire: fixes S::"'a::{real_normed_vector,heine_borel} set" assumes "closed S" "countable \" @@ -5693,14 +5671,14 @@ proof (clarsimp simp: closure_approachable) fix x and e::real assume "x \ S" "0 < e" - obtain TF where opeF: "\n. openin (subtopology euclidean S) (TF n)" - and ne: "\n. TF n \ {}" + obtain TF where opeF: "\n. openin (subtopology euclidean S) (TF n)" + and ne: "\n. TF n \ {}" and subg: "\n. S \ closure(TF n) \ ?g n" - and subball: "\n. closure(TF n) \ ball x e" + and subball: "\n. closure(TF n) \ ball x e" and decr: "\n. TF(Suc n) \ TF n" proof - have *: "\Y. (openin (subtopology euclidean S) Y \ Y \ {} \ - S \ closure Y \ ?g n \ closure Y \ ball x e) \ Y \ U" + S \ closure Y \ ?g n \ closure Y \ ball x e) \ Y \ U" if opeU: "openin (subtopology euclidean S) U" and "U \ {}" and cloU: "closure U \ ball x e" for U n proof - obtain T where T: "open T" "U = T \ S" @@ -5714,7 +5692,7 @@ moreover have "openin (subtopology euclidean S) (U \ ?g n)" using gin ope opeU by blast ultimately obtain d where U: "U \ ?g n \ S" and "d > 0" and d: "ball y d \ S \ U \ ?g n" - by (force simp add: openin_contains_ball) + by (force simp: openin_contains_ball) show ?thesis proof (intro exI conjI) show "openin (subtopology euclidean S) (S \ ball y (d/2))" @@ -5742,7 +5720,7 @@ using ball_divide_subset_numeral d by blast qed qed - let ?\ = "\n X. openin (subtopology euclidean S) X \ X \ {} \ + let ?\ = "\n X. openin (subtopology euclidean S) X \ X \ {} \ S \ closure X \ ?g n \ closure X \ ball x e" have "closure (S \ ball x (e / 2)) \ closure(ball x (e/2))" by (simp add: closure_mono) @@ -5765,7 +5743,7 @@ proof (rule compact_nest) show "\n. compact (S \ closure (TF n))" by (metis closed_closure subball bounded_subset_ballI compact_eq_bounded_closed closed_Int_compact [OF \closed S\]) - show "\n. S \ closure (TF n) \ {}" + show "\n. S \ closure (TF n) \ {}" by (metis Int_absorb1 opeF \closed S\ closure_eq_empty closure_minimal ne openin_imp_subset) show "\m n. m \ n \ S \ closure (TF n) \ S \ closure (TF m)" by (meson closure_mono decr dual_order.refl inf_mono lift_Suc_antimono_le) @@ -5815,8 +5793,7 @@ from as(2) obtain N where N:"\m n. N \ m \ N \ n \ dist (f m) (f n) < e/2" unfolding cauchy_def using \e > 0\ - apply (erule_tac x="e/2" in allE) - apply auto + apply (erule_tac x="e/2" in allE, auto) done from lr(3)[unfolded lim_sequentially, THEN spec[where x="e/2"]] obtain M where M:"\n\M. dist ((f \ r) n) l < e/2" @@ -5832,7 +5809,7 @@ using N and n by auto ultimately have "dist (f n) l < e" using dist_triangle_half_r[of "f (r n)" "f n" e l] - by (auto simp add: dist_commute) + by (auto simp: dist_commute) } then have "\N. \n\N. dist (f n) l < e" by blast } @@ -5952,10 +5929,7 @@ shows "bounded (range s)" proof - from assms obtain N :: nat where "\m n. N \ m \ N \ n \ dist (s m) (s n) < 1" - unfolding cauchy_def - apply (erule_tac x= 1 in allE) - apply auto - done + unfolding cauchy_def by force then have N:"\n. N \ n \ dist (s N) (s n) < 1" by auto moreover have "bounded (s ` {0..N})" @@ -5964,11 +5938,9 @@ unfolding bounded_any_center [where a="s N"] by auto ultimately show "?thesis" unfolding bounded_any_center [where a="s N"] - apply (rule_tac x="max a 1" in exI) - apply auto + apply (rule_tac x="max a 1" in exI, auto) apply (erule_tac x=y in allE) - apply (erule_tac x=y in ballE) - apply auto + apply (erule_tac x=y in ballE, auto) done qed @@ -6114,7 +6086,7 @@ shows "summable (\n. of_real(norm(a n)) * w ^ n)" proof - obtain M where M: "\x. norm (a x * z ^ x) \ M" - using summable_imp_bounded [OF sum] by (force simp add: bounded_iff) + using summable_imp_bounded [OF sum] by (force simp: bounded_iff) then have *: "summable (\n. norm (a n) * norm w ^ n)" by (rule_tac M=M in Abel_lemma) (auto simp: norm_mult norm_power intro: no) show ?thesis @@ -6259,8 +6231,7 @@ "continuous (at x within s) f \ (\e>0. \d>0. \x'\ s. dist x' x < d --> dist (f x') (f x) < e)" unfolding continuous_within and Lim_within apply auto - apply (metis dist_nz dist_self) - apply blast + apply (metis dist_nz dist_self, blast) done corollary continuous_at_eps_delta: @@ -6272,26 +6243,20 @@ assumes nondecF: "\x y. x \ y \ f x \ f y" shows "continuous (at_right a) f \ (\e>0. \d>0. f (a + d) - f a < e)" apply (simp add: greaterThan_def dist_real_def continuous_within Lim_within_le) - apply (intro all_cong ex_cong) - apply safe - apply (erule_tac x="a + d" in allE) - apply simp + apply (intro all_cong ex_cong, safe) + apply (erule_tac x="a + d" in allE, simp) apply (simp add: nondecF field_simps) - apply (drule nondecF) - apply simp + apply (drule nondecF, simp) done lemma continuous_at_left_real_increasing: assumes nondecF: "\ x y. x \ y \ f x \ ((f y) :: real)" shows "(continuous (at_left (a :: real)) f) = (\e > 0. \delta > 0. f a - f (a - delta) < e)" apply (simp add: lessThan_def dist_real_def continuous_within Lim_within_le) - apply (intro all_cong ex_cong) - apply safe - apply (erule_tac x="a - d" in allE) - apply simp + apply (intro all_cong ex_cong, safe) + apply (erule_tac x="a - d" in allE, simp) apply (simp add: nondecF field_simps) - apply (cut_tac x="a - d" and y="x" in nondecF) - apply simp_all + apply (cut_tac x="a - d" and y=x in nondecF, simp_all) done text\Versions in terms of open balls.\ @@ -6312,25 +6277,23 @@ assume "y \ f ` (ball x d \ s)" then have "y \ ball (f x) e" using d(2) - apply (auto simp add: dist_commute) - apply (erule_tac x=xa in ballE) - apply auto + apply (auto simp: dist_commute) + apply (erule_tac x=xa in ballE, auto) using \e > 0\ apply auto done } then have "\d>0. f ` (ball x d \ s) \ ball (f x) e" using \d > 0\ - unfolding subset_eq ball_def by (auto simp add: dist_commute) + unfolding subset_eq ball_def by (auto simp: dist_commute) } then show ?rhs by auto next assume ?rhs then show ?lhs unfolding continuous_within Lim_within ball_def subset_eq - apply (auto simp add: dist_commute) - apply (erule_tac x=e in allE) - apply auto + apply (auto simp: dist_commute) + apply (erule_tac x=e in allE, auto) done qed @@ -6341,24 +6304,20 @@ then show ?rhs unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball apply auto - apply (erule_tac x=e in allE) - apply auto - apply (rule_tac x=d in exI) - apply auto + apply (erule_tac x=e in allE, auto) + apply (rule_tac x=d in exI, auto) apply (erule_tac x=xa in allE) - apply (auto simp add: dist_commute) + apply (auto simp: dist_commute) done next assume ?rhs then show ?lhs unfolding continuous_at Lim_at subset_eq Ball_def Bex_def image_iff mem_ball apply auto - apply (erule_tac x=e in allE) - apply auto - apply (rule_tac x=d in exI) - apply auto + apply (erule_tac x=e in allE, auto) + apply (rule_tac x=d in exI, auto) apply (erule_tac x="f xa" in allE) - apply (auto simp add: dist_commute) + apply (auto simp: dist_commute) done qed @@ -6528,7 +6487,7 @@ "\x. 0 < x \ fst (fa x) \ s \ snd (fa x) \ s \ dist (fst (fa x)) (snd (fa x)) < x \ \ dist (f (fst (fa x))) (f (snd (fa x))) < e" using choice[of "\d x. d>0 \ fst x \ s \ snd x \ s \ dist (snd x) (fst x) < d \ \ dist (f (snd x)) (f (fst x)) < e"] unfolding Bex_def - by (auto simp add: dist_commute) + by (auto simp: dist_commute) define x where "x n = fst (fa (inverse (real n + 1)))" for n define y where "y n = snd (fa (inverse (real n + 1)))" for n have xyn: "\n. x n \ s \ y n \ s" @@ -6579,7 +6538,7 @@ shows "continuous (at x within s) g" using assms unfolding continuous_within - by (force simp add: intro: Lim_transform_within) + by (force intro: Lim_transform_within) subsubsection \Structural rules for pointwise continuity\ @@ -6944,7 +6903,7 @@ using image_closure_subset[OF assms(1) closed_cball[of 0 b] *] assms(3) unfolding subset_eq apply (erule_tac x="f x" in ballE) - apply (auto simp add: dist_norm) + apply (auto simp: dist_norm) done qed @@ -7505,8 +7464,7 @@ by auto } ultimately have "\e>0. \x'. dist x' (c *\<^sub>R x) < e \ x' \ op *\<^sub>R c ` s" - apply (rule_tac x="e * \c\" in exI) - apply auto + apply (rule_tac x="e * \c\" in exI, auto) done } then show ?thesis unfolding open_dist by auto @@ -7563,7 +7521,7 @@ unfolding mem_interior by auto then have "ball (x - a) e \ S" unfolding subset_eq Ball_def mem_ball dist_norm - by (auto simp add: diff_diff_eq) + by (auto simp: diff_diff_eq) then show "x \ op + a ` interior S" unfolding image_iff apply (rule_tac x="x - a" in bexI) @@ -7654,12 +7612,12 @@ have "dist (x + (\i\Basis. (u \ i) *\<^sub>R inv f i)) x \ (\i\Basis. norm ((u \ i) *\<^sub>R inv f i))" by (simp add: dist_norm sum_norm_le) also have "... = (\i\Basis. \u \ i\ * norm (inv f i))" - by (simp add: ) + by simp also have "... \ (\i\Basis. \u \ i\) * B" by (simp add: B sum_distrib_right sum_mono mult_left_mono) also have "... \ DIM('b) * dist y (f x) * B" apply (rule mult_right_mono [OF sum_bounded_above]) - using \0 < B\ by (auto simp add: Basis_le_norm dist_norm u_def) + using \0 < B\ by (auto simp: Basis_le_norm dist_norm u_def) also have "... < e" by (metis mult.commute mult.left_commute that) finally show "x + (\i\Basis. (u \ i) *\<^sub>R inv f i) \ A" @@ -7679,7 +7637,7 @@ proof assume "open(f ` A)" then have "open(f -` (f ` A))" - using assms by (force simp add: linear_continuous_at linear_conv_bounded_linear continuous_open_vimage) + using assms by (force simp: linear_continuous_at linear_conv_bounded_linear continuous_open_vimage) then show "open A" by (simp add: assms bij_is_inj inj_vimage_image_eq) next @@ -7705,7 +7663,7 @@ then show "f x \ interior (f ` S)" by (meson assms imageI image_mono interiorI interior_subset open_bijective_linear_image_eq open_interior) qed - + lemma interior_injective_linear_image: fixes f :: "'a::euclidean_space \ 'a::euclidean_space" assumes "linear f" "inj f" @@ -7778,8 +7736,7 @@ from \finite D\ show "finite ?D" by (rule finite_imageI) from \S \ \D\ show "S \ \?D" - apply (rule subset_trans) - apply clarsimp + apply (rule subset_trans, clarsimp) apply (frule subsetD [OF \D \ ?C\, THEN f_inv_into_f]) apply (erule rev_bexI, fast) done @@ -7935,14 +7892,10 @@ unfolding Lim_at unfolding dist_norm apply auto - apply (erule_tac x=e in allE) - apply auto - apply (rule_tac x=d in exI) - apply auto - apply (erule_tac x=x' in allE) - apply auto - apply (erule_tac x=e in allE) - apply auto + apply (erule_tac x=e in allE, auto) + apply (rule_tac x=d in exI, auto) + apply (erule_tac x=x' in allE, auto) + apply (erule_tac x=e in allE, auto) done lemma continuous_on_real_range: @@ -7997,7 +7950,7 @@ obtain x y a b where "\z\s. dist x z \ a" "\z\t. dist y z \ b" using assms [unfolded bounded_def] by auto then have "\z\s \ t. dist (x, y) z \ sqrt (a\<^sup>2 + b\<^sup>2)" - by (auto simp add: dist_Pair_Pair real_sqrt_le_mono add_mono power_mono) + by (auto simp: dist_Pair_Pair real_sqrt_le_mono add_mono power_mono) then show ?thesis unfolding bounded_any_center [where a="(x, y)"] by auto qed @@ -8065,7 +8018,7 @@ finally have "s \ t \ (\x\e. \d x)" . } ultimately show "\C'\C. finite C' \ s \ t \ \C'" - by (intro exI[of _ "(\x\e. d x)"]) (auto simp add: subset_eq) + by (intro exI[of _ "(\x\e. d x)"]) (auto simp: subset_eq) qed text\Hence some useful properties follow quite easily.\ @@ -8115,8 +8068,7 @@ proof- have "{x - y | x y. x\s \ y \ t} = {x + y | x y. x \ s \ y \ (uminus ` t)}" apply auto - apply (rule_tac x= xa in exI) - apply auto + apply (rule_tac x= xa in exI, auto) done then show ?thesis using compact_sums[OF assms(1) compact_negations[OF assms(2)]] by auto @@ -8199,7 +8151,7 @@ ultimately have "dist x y \ (SUP (x,y):s\s. dist x y)" by (rule cSUP_upper2) simp with \x \ s\ show ?thesis - by (auto simp add: diameter_def) + by (auto simp: diameter_def) qed lemma diameter_lower_bounded: @@ -8210,7 +8162,7 @@ proof (rule ccontr) assume contr: "\ ?thesis" moreover have "s \ {}" - using d by (auto simp add: diameter_def) + using d by (auto simp: diameter_def) ultimately have "diameter s \ d" by (auto simp: not_less diameter_def intro!: cSUP_least) with \d < diameter s\ show False by auto @@ -8236,8 +8188,7 @@ then have "diameter s \ dist x y" unfolding diameter_def apply clarsimp - apply (rule cSUP_least) - apply fast+ + apply (rule cSUP_least, fast+) done then show ?thesis by (metis b diameter_bounded_bound order_antisym xys) @@ -8424,7 +8375,7 @@ shows "closed ((\x. c *\<^sub>R x) ` S)" proof (cases "c = 0") case True then show ?thesis - by (auto simp add: image_constant_conv) + by (auto simp: image_constant_conv) next case False from assms have "closed ((\x. inverse c *\<^sub>R x) -` S)" @@ -8467,8 +8418,7 @@ using \l' \ S\ apply auto apply (rule_tac x=l' in exI) - apply (rule_tac x="l - l'" in exI) - apply auto + apply (rule_tac x="l - l'" in exI, auto) done } moreover have "?S = (\x\ S. \y \ T. {x + y})" @@ -8524,17 +8474,15 @@ lemma translation_Compl: fixes a :: "'a::ab_group_add" shows "(\x. a + x) ` (- t) = - ((\x. a + x) ` t)" - apply (auto simp add: image_iff) - apply (rule_tac x="x - a" in bexI) - apply auto + apply (auto simp: image_iff) + apply (rule_tac x="x - a" in bexI, auto) done lemma translation_UNIV: fixes a :: "'a::ab_group_add" shows "range (\x. a + x) = UNIV" - apply (auto simp add: image_iff) - apply (rule_tac x="x - a" in exI) - apply auto + apply (auto simp: image_iff) + apply (rule_tac x="x - a" in exI, auto) done lemma translation_diff: @@ -8554,8 +8502,7 @@ have *: "op + a ` (- s) = - op + a ` s" apply auto unfolding image_iff - apply (rule_tac x="x - a" in bexI) - apply auto + apply (rule_tac x="x - a" in bexI, auto) done show ?thesis unfolding closure_interior translation_Compl @@ -8644,10 +8591,9 @@ show ?thesis using separate_compact_closed[OF assms(2,1) *] apply auto - apply (rule_tac x=d in exI) - apply auto + apply (rule_tac x=d in exI, auto) apply (erule_tac x=y in ballE) - apply (auto simp add: dist_commute) + apply (auto simp: dist_commute) done qed @@ -8788,7 +8734,7 @@ "(f \ l) (at x within (s \ t)) \ (f \ l) (at x within s) \ (f \ l) (at x within t)" unfolding tendsto_def - by (auto simp add: eventually_within_Un) + by (auto simp: eventually_within_Un) lemma Lim_topological: "(f \ l) net \ @@ -8885,7 +8831,7 @@ have "open (\i\Basis. (op \ i) -` {a \ i <..< b \ i})" by (auto intro!: continuous_open_vimage continuous_inner continuous_ident continuous_const) also have "(\i\Basis. (op \ i) -` {a \ i <..< b \ i}) = box a b" - by (auto simp add: box_def inner_commute) + by (auto simp: box_def inner_commute) finally show ?thesis . qed @@ -8907,7 +8853,7 @@ show "\B'\B. \B' = A" apply (rule exI[of _ "{b\B. b \ A}"]) apply (subst (3) open_UNION_box[OF \open A\]) - apply (auto simp add: a b B_def) + apply (auto simp: a b B_def) done qed ultimately @@ -8931,7 +8877,7 @@ by (intro closed_INT ballI continuous_closed_vimage allI linear_continuous_at closed_real_atLeastAtMost finite_Basis bounded_linear_inner_left) also have "(\i\Basis. (\x. x\i) -` {a\i .. b\i}) = cbox a b" - by (auto simp add: cbox_def) + by (auto simp: cbox_def) finally show "closed (cbox a b)" . qed @@ -8991,8 +8937,7 @@ } then have "(\i\Basis. \x \ i\) \ ?b" apply - - apply (rule sum_mono) - apply auto + apply (rule sum_mono, auto) done then have "norm x \ ?b" using norm_le_l1[of x] by auto @@ -9168,7 +9113,7 @@ unfolding inverse_le_1_iff by auto have "(inverse (real n + 1)) *\<^sub>R ((1 / 2) *\<^sub>R (a + b)) + (1 - inverse (real n + 1)) *\<^sub>R x = x + (inverse (real n + 1)) *\<^sub>R (((1 / 2) *\<^sub>R (a + b)) - x)" - by (auto simp add: algebra_simps) + by (auto simp: algebra_simps) then have "f n 0" then have "\N::nat. inverse (real (N + 1)) < e" using real_arch_inverse[of e] - apply (auto simp add: Suc_pred') + apply (auto simp: Suc_pred') apply (metis Suc_pred' of_nat_Suc) done then obtain N :: nat where N: "inverse (real (N + 1)) < e" @@ -9193,7 +9138,7 @@ then have "\N::nat. \n\N. inverse (real n + 1) < e" by auto } then have "((\n. inverse (real n + 1)) \ 0) sequentially" - unfolding lim_sequentially by(auto simp add: dist_norm) + unfolding lim_sequentially by(auto simp: dist_norm) then have "(f \ x) sequentially" unfolding f_def using tendsto_add[OF tendsto_const, of "\n::nat. (inverse (real n + 1)) *\<^sub>R ((1 / 2) *\<^sub>R (a + b) - x)" 0 sequentially x] @@ -9283,7 +9228,7 @@ lemma diameter_cbox: fixes a b::"'a::euclidean_space" shows "(\i \ Basis. a \ i \ b \ i) \ diameter (cbox a b) = dist a b" - by (force simp add: diameter_def intro!: cSup_eq_maximum setL2_mono + by (force simp: diameter_def intro!: cSup_eq_maximum setL2_mono simp: euclidean_dist_l2[where 'a='a] cbox_def dist_norm) lemma eucl_less_eq_halfspaces: @@ -9329,7 +9274,7 @@ done } moreover have "c \ cbox (m *\<^sub>R a + c) (m *\<^sub>R b + c)" - unfolding True by (auto simp add: cbox_sing) + unfolding True by (auto simp: cbox_sing) ultimately show ?thesis using True by (auto simp: cbox_def) next case False @@ -9344,7 +9289,7 @@ fix y assume "\i\Basis. a \ i \ y \ i" "\i\Basis. y \ i \ b \ i" "m < 0" then have "\i\Basis. (m *\<^sub>R b + c) \ i \ (m *\<^sub>R y + c) \ i" and "\i\Basis. (m *\<^sub>R y + c) \ i \ (m *\<^sub>R a + c) \ i" - by (auto simp add: mult_left_mono_neg inner_distrib) + by (auto simp: mult_left_mono_neg inner_distrib) } moreover { @@ -9353,7 +9298,7 @@ then have "y \ (\x. m *\<^sub>R x + c) ` cbox a b" unfolding image_iff Bex_def mem_box apply (intro exI[where x="(1 / m) *\<^sub>R (y - c)"]) - apply (auto simp add: pos_le_divide_eq pos_divide_le_eq mult.commute inner_distrib inner_diff_left) + apply (auto simp: pos_le_divide_eq pos_divide_le_eq mult.commute inner_distrib inner_diff_left) done } moreover @@ -9363,7 +9308,7 @@ then have "y \ (\x. m *\<^sub>R x + c) ` cbox a b" unfolding image_iff Bex_def mem_box apply (intro exI[where x="(1 / m) *\<^sub>R (y - c)"]) - apply (auto simp add: neg_le_divide_eq neg_divide_le_eq mult.commute inner_distrib inner_diff_left) + apply (auto simp: neg_le_divide_eq neg_divide_le_eq mult.commute inner_distrib inner_diff_left) done } ultimately show ?thesis using False by (auto simp: cbox_def) @@ -9442,7 +9387,7 @@ proof - from assms have "{a ..< b} = {a} \ {a <..< b}" by auto also have "closure \ = {a .. b}" unfolding closure_Un - by (auto simp add: assms less_imp_le) + by (auto simp: assms less_imp_le) finally show ?thesis . qed @@ -9453,7 +9398,7 @@ proof - from assms have "{a <.. b} = {b} \ {a <..< b}" by auto also have "closure \ = {a .. b}" unfolding closure_Un - by (auto simp add: assms less_imp_le) + by (auto simp: assms less_imp_le) finally show ?thesis . qed @@ -9497,7 +9442,7 @@ lemma homeomorphic_empty [iff]: "S homeomorphic {} \ S = {}" "{} homeomorphic S \ S = {}" - by (auto simp add: homeomorphic_def homeomorphism_def) + by (auto simp: homeomorphic_def homeomorphism_def) lemma homeomorphic_refl: "s homeomorphic s" unfolding homeomorphic_def homeomorphism_def @@ -9591,10 +9536,10 @@ next assume R: ?rhs with finite_same_card_bij obtain h where "bij_betw h S T" - by (auto simp: ) + by auto with R show ?lhs apply (auto simp: homeomorphic_def homeomorphism_def continuous_on_finite) - apply (rule_tac x="h" in exI) + apply (rule_tac x=h in exI) apply (rule_tac x="inv_into S h" in exI) apply (auto simp: bij_betw_inv_into_left bij_betw_inv_into_right bij_betw_imp_surj_on inv_into_into bij_betwE) apply (metis bij_betw_def bij_betw_inv_into) @@ -9672,7 +9617,7 @@ apply (rule_tac x="\x. c *\<^sub>R x" in exI) apply (rule_tac x="\x. (1 / c) *\<^sub>R x" in exI) using assms - apply (auto simp add: continuous_intros) + apply (auto simp: continuous_intros) done lemma homeomorphic_translation: @@ -9874,7 +9819,7 @@ then have x: "\n. x n \ s" "\n. g n = f (x n)" by auto then have "f \ x = g" by (simp add: fun_eq_iff) then obtain l where "l\s" and l:"(x \ l) sequentially" - using cs[unfolded complete_def, THEN spec[where x="x"]] + using cs[unfolded complete_def, THEN spec[where x=x]] using cauchy_isometric[OF \0 < e\ s f normf] and cfg and x(1) by auto then show ?thesis @@ -10190,7 +10135,7 @@ using mult_right_mono[OF * order_less_imp_le[OF **]] by (simp add: mult.assoc) also have "\ < (e * (1 - c) / d) * d * (1 - c ^ (m - n)) / (1 - c)" - using mult_strict_right_mono[OF N **] by (auto simp add: mult.assoc) + using mult_strict_right_mono[OF N **] by (auto simp: mult.assoc) also from c \d > 0\ \1 - c > 0\ have "\ = e * (1 - c ^ (m - n))" by simp also from c \1 - c ^ (m - n) > 0\ \e > 0\ have "\ \ e" @@ -10204,7 +10149,7 @@ next case False with *[of n m] *[of m n] and that show ?thesis - by (auto simp add: dist_commute nat_neq_iff) + by (auto simp: dist_commute nat_neq_iff) qed then show ?thesis by auto qed @@ -10313,8 +10258,8 @@ proof (cases "a = a'") case True then show ?thesis - using subsetD [where c = "a + r *\<^sub>R (SOME i. i \ Basis)", OF \?lhs\] subsetD [where c = "a", OF \?lhs\] - by (force simp add: SOME_Basis dist_norm) + using subsetD [where c = "a + r *\<^sub>R (SOME i. i \ Basis)", OF \?lhs\] subsetD [where c = a, OF \?lhs\] + by (force simp: SOME_Basis dist_norm) next case False have "norm (a' - (a + (r / norm (a - a')) *\<^sub>R (a - a'))) = norm (a' - a - (r / norm (a - a')) *\<^sub>R (a - a'))" @@ -10355,8 +10300,8 @@ proof (cases "a = a'") case True then show ?thesis - using subsetD [where c = "a + r *\<^sub>R (SOME i. i \ Basis)", OF \?lhs\] subsetD [where c = "a", OF \?lhs\] - by (force simp add: SOME_Basis dist_norm) + using subsetD [where c = "a + r *\<^sub>R (SOME i. i \ Basis)", OF \?lhs\] subsetD [where c = a, OF \?lhs\] + by (force simp: SOME_Basis dist_norm) next case False have False if "norm (a - a') + r \ r'" @@ -10444,14 +10389,14 @@ next case False with \?lhs\ show ?rhs - apply (auto simp add: set_eq_subset ball_subset_ball_iff dist_norm norm_minus_commute algebra_simps) + apply (auto simp: set_eq_subset ball_subset_ball_iff dist_norm norm_minus_commute algebra_simps) apply (metis add_le_same_cancel1 le_add_same_cancel1 norm_ge_zero norm_pths(2) order_trans) apply (metis add_increasing2 add_le_imp_le_right eq_iff norm_ge_zero) done qed next assume ?rhs then show ?lhs - by (auto simp add: set_eq_subset ball_subset_ball_iff) + by (auto simp: set_eq_subset ball_subset_ball_iff) qed lemma cball_eq_cball_iff: @@ -10468,14 +10413,14 @@ next case False with \?lhs\ show ?rhs - apply (auto simp add: set_eq_subset cball_subset_cball_iff dist_norm norm_minus_commute algebra_simps) + apply (auto simp: set_eq_subset cball_subset_cball_iff dist_norm norm_minus_commute algebra_simps) apply (metis add_le_same_cancel1 le_add_same_cancel1 norm_ge_zero norm_pths(2) order_trans) apply (metis add_increasing2 add_le_imp_le_right eq_iff norm_ge_zero) done qed next assume ?rhs then show ?lhs - by (auto simp add: set_eq_subset cball_subset_cball_iff) + by (auto simp: set_eq_subset cball_subset_cball_iff) qed lemma ball_eq_cball_iff: @@ -10484,7 +10429,7 @@ proof assume ?lhs then show ?rhs - apply (auto simp add: set_eq_subset ball_subset_cball_iff cball_subset_ball_iff algebra_simps) + apply (auto simp: set_eq_subset ball_subset_cball_iff cball_subset_ball_iff algebra_simps) apply (metis add_increasing2 add_le_cancel_right add_less_same_cancel1 dist_not_less_zero less_le_trans zero_le_dist) apply (metis add_less_same_cancel1 dist_not_less_zero less_le_trans not_le) using \?lhs\ ball_eq_empty cball_eq_empty apply blast+ @@ -11333,7 +11278,7 @@ proof cases assume le: "(\i\Basis. a \ i \ b \ i)" from bounded obtain c where f_bound: "\x\f ` cbox a b. dist undefined x \ c" - by (auto simp add: bounded_any_center[where a=undefined]) + by (auto simp: bounded_any_center[where a=undefined]) then show ?thesis by (auto intro!: exI[where x=c] clamp_in_interval[OF le[rule_format]] simp: bounded_any_center[where a=undefined])