# HG changeset patch # User paulson # Date 1672137514 0 # Node ID 7fd705b107f2b9c7cb87192b68d138f62c225d5f # Parent 9e5a27486ca23defab1a0d112cedc2d30dec078c# Parent 50672d2d78db24e5f59239f3befe2d40dc140770 merged diff -r 9e5a27486ca2 -r 7fd705b107f2 src/HOL/Analysis/Brouwer_Fixpoint.thy --- a/src/HOL/Analysis/Brouwer_Fixpoint.thy Mon Dec 26 21:28:20 2022 +0100 +++ b/src/HOL/Analysis/Brouwer_Fixpoint.thy Tue Dec 27 10:38:34 2022 +0000 @@ -83,11 +83,8 @@ lemma retraction_openin_vimage_iff: "openin (top_of_set S) (S \ r -` U) \ openin (top_of_set T) U" - if retraction: "retraction S T r" and "U \ T" - using retraction apply (rule retractionE) - apply (rule continuous_right_inverse_imp_quotient_map [where g=r]) - using \U \ T\ apply (auto elim: continuous_on_subset) - done + if "retraction S T r" and "U \ T" + by (simp add: retraction_openin_vimage_iff that) lemma retract_of_locally_compact: fixes S :: "'a :: {heine_borel,real_normed_vector} set" @@ -251,7 +248,7 @@ then obtain u l where "l \ s" "\b\s. l \ b" "u \ s" "\b\s. b \ u" using insert by auto with * show "\a\insert b s. \x\insert b s. a \ x" "\a\insert b s. \x\insert b s. x \ a" - using *[rule_format, of b u] *[rule_format, of b l] by (metis insert_iff order.trans)+ + by (metis insert_iff order.trans)+ qed auto lemma kuhn_labelling_lemma: @@ -1081,7 +1078,7 @@ qed } with ks_f' eq \a \ b.enum 0\ \n \ 0\ show ?thesis apply (intro ex1I[of _ "b.enum ` {.. n}"]) - apply auto [] + apply fastforce apply metis done next @@ -1111,16 +1108,11 @@ have "{i} \ {..n}" using i by auto { fix j assume "j \ n" - moreover have "j < i \ i = j \ i < j" by arith - moreover note i - ultimately have "enum j = b.enum j \ j \ i" - apply (simp only: fun_eq_iff enum_def b.enum_def flip: image_comp) + with i Suc_i' have "enum j = b.enum j \ j \ i" + unfolding fun_eq_iff enum_def b.enum_def image_comp [symmetric] apply (cases \i = j\) - apply simp - apply (metis Suc_i' \i \ n\ imageI in_upd_image lessI lessThan_iff lessThan_subset_iff less_irrefl_nat transpose_apply_second transpose_commute) - apply (subst transpose_image_eq) - apply (auto simp add: i'_def) - done + apply (metis imageI in_upd_image lessI lessThan_iff lessThan_subset_iff order_less_le transpose_apply_first) + by (metis lessThan_iff linorder_not_less not_less_eq_eq order_less_le transpose_image_eq) } note enum_eq_benum = this then have "enum ` ({.. n} - {i}) = b.enum ` ({.. n} - {i})" @@ -1295,7 +1287,7 @@ lemma reduced_labelling_unique: "r \ n \ \i r = n \ x r \ 0 \ reduced n x = r" - unfolding reduced_def by (rule LeastI2_wellorder[where a=n]) (metis le_less not_le)+ + by (metis linorder_less_linear linorder_not_le reduced_labelling) lemma reduced_labelling_zero: "j < n \ x j = 0 \ reduced n x \ j" using reduced_labelling[of n x] by auto @@ -1369,7 +1361,7 @@ by (auto simp: out_eq_p) moreover { fix x assume "x \ s" - with lab_1[rule_format, of n x] all_eq_p s_le_p[of x] + with lab_1[rule_format, of n x] all_eq_p s_le_p[of x] have "?rl x \ n" by (auto intro!: reduced_labelling_nonzero) then have "?rl x = reduced n (lab x)" @@ -1532,34 +1524,9 @@ (\x i. P x \ Q i \ x i = 1 \ l x i = 1) \ (\x i. P x \ Q i \ l x i = 0 \ x i \ f x i) \ (\x i. P x \ Q i \ l x i = 1 \ f x i \ x i)" -proof - - have and_forall_thm: "\P Q. (\x. P x) \ (\x. Q x) \ (\x. P x \ Q x)" - by auto - have *: "\x y::real. 0 \ x \ x \ 1 \ 0 \ y \ y \ 1 \ x \ 1 \ x \ y \ x \ 0 \ y \ x" - by auto - show ?thesis - unfolding and_forall_thm - apply (subst choice_iff[symmetric])+ - apply rule - apply rule - proof - - fix x x' - let ?R = "\y::nat. - (P x \ Q x' \ x x' = 0 \ y = 0) \ - (P x \ Q x' \ x x' = 1 \ y = 1) \ - (P x \ Q x' \ y = 0 \ x x' \ (f x) x') \ - (P x \ Q x' \ y = 1 \ (f x) x' \ x x')" - have "0 \ f x x' \ f x x' \ 1" if "P x" "Q x'" - using assms(2)[rule_format,of "f x" x'] that - apply (drule_tac assms(1)[rule_format]) - apply auto - done - then have "?R 0 \ ?R 1" - by auto - then show "\y\1. ?R y" - by auto - qed -qed + unfolding all_conj_distrib [symmetric] + apply (subst choice_iff[symmetric])+ + by (metis assms bot_nat_0.extremum nle_le zero_neq_one) subsection \Brouwer's fixed point theorem\ @@ -1785,11 +1752,7 @@ using b' unfolding bij_betw_def by auto define r' ::'a where "r' = (\i\Basis. (real (r (b' i)) / real p) *\<^sub>R i)" have "\i. i \ Basis \ r (b' i) \ p" - apply (rule order_trans) - apply (rule rs(1)[OF b'_im,THEN conjunct2]) - using q(1)[rule_format,OF b'_im] - apply (auto simp: Suc_le_eq) - done + using b'_im q(1) rs(1) by fastforce then have "r' \ cbox 0 One" unfolding r'_def cbox_def using b'_Basis @@ -1899,9 +1862,8 @@ have "\x\ cball 0 e. (f \ closest_point S) x = x" proof (rule_tac brouwer_ball[OF e(1)]) show "continuous_on (cball 0 e) (f \ closest_point S)" - apply (rule continuous_on_compose) - using S compact_eq_bounded_closed continuous_on_closest_point apply blast - by (meson S contf closest_point_in_set compact_imp_closed continuous_on_subset image_subsetI) + by (meson assms closest_point_in_set compact_eq_bounded_closed contf continuous_on_closest_point + continuous_on_compose continuous_on_subset image_subsetI) show "(f \ closest_point S) ` cball 0 e \ cball 0 e" by clarsimp (metis S fim closest_point_exists(1) compact_eq_bounded_closed e(2) image_subset_iff mem_cball_0 subsetCE) qed (use assms in auto) @@ -2033,9 +1995,7 @@ using \bounded S\ bounded_subset_ballD by blast have notga: "g x \ a" for x unfolding g_def using fros fim \a \ T\ - apply (auto simp: frontier_def) - using fid interior_subset apply fastforce - by (simp add: \a \ S\ closure_def) + by (metis Un_iff \a \ S\ closure_Un_frontier fid imageI subset_eq) define h where "h \ (\y. a + (B / norm(y - a)) *\<^sub>R (y - a)) \ g" have "\ (frontier (cball a B) retract_of (cball a B))" by (metis no_retraction_cball \0 < B\) @@ -2119,8 +2079,7 @@ using k \x \ 0\ \0 < dd x\ apply (simp add: in_segment) apply (rule_tac x = "dd x / k" in exI) - apply (simp add: field_simps that) - apply (simp add: vector_add_divide_simps algebra_simps) + apply (simp add: that vector_add_divide_simps algebra_simps) done ultimately show ?thesis using segsub by (auto simp: rel_frontier_def) @@ -2163,8 +2122,7 @@ then have "\ dd (x - a) \ 0 \ a + dd (x - a) *\<^sub>R (x - a) \ rel_frontier S" using \x \ a\ dd1 by fastforce with \x \ a\ show "(1 - u) *\<^sub>R x + u *\<^sub>R (a + dd (x - a) *\<^sub>R (x - a)) \ a" - apply (auto simp: iff) - using less_eq_real_def mult_le_0_iff not_less u by fastforce + using less_eq_real_def mult_le_0_iff not_less u by (fastforce simp: iff) qed qed show "retraction (T - {a}) (rel_frontier S) (\x. a + dd (x - a) *\<^sub>R (x - a))" @@ -2216,9 +2174,8 @@ fixes S :: "'a::euclidean_space set" assumes "bounded S" "convex S" "a \ rel_interior S" shows "rel_frontier S retract_of (affine hull S - {a})" -apply (rule rel_frontier_deformation_retract_of_punctured_convex [of S "affine hull S" a]) -apply (auto simp: affine_imp_convex rel_frontier_affine_hull retract_of_def assms) -done + by (meson assms convex_affine_hull dual_order.refl rel_frontier_affine_hull + rel_frontier_deformation_retract_of_punctured_convex retract_of_def) corollary rel_boundary_retract_of_punctured_affine_hull: fixes S :: "'a::euclidean_space set" @@ -2231,29 +2188,24 @@ fixes S :: "'a::euclidean_space set" assumes "convex S" "bounded S" "a \ rel_interior S" "convex T" "rel_frontier S \ T" "T \ affine hull S" shows "(rel_frontier S) homotopy_eqv (T - {a})" - apply (rule rel_frontier_deformation_retract_of_punctured_convex [of S T]) - using assms - apply auto - using deformation_retract_imp_homotopy_eqv homotopy_equivalent_space_sym by blast + by (meson assms deformation_retract_imp_homotopy_eqv homotopy_equivalent_space_sym + rel_frontier_deformation_retract_of_punctured_convex[of S T]) lemma homotopy_eqv_rel_frontier_punctured_affine_hull: fixes S :: "'a::euclidean_space set" assumes "convex S" "bounded S" "a \ rel_interior S" shows "(rel_frontier S) homotopy_eqv (affine hull S - {a})" -apply (rule homotopy_eqv_rel_frontier_punctured_convex) - using assms rel_frontier_affine_hull by force+ + by (simp add: assms homotopy_eqv_rel_frontier_punctured_convex rel_frontier_affine_hull) lemma path_connected_sphere_gen: assumes "convex S" "bounded S" "aff_dim S \ 1" shows "path_connected(rel_frontier S)" -proof (cases "rel_interior S = {}") - case True +proof - + have "convex (closure S)" + using assms by auto then show ?thesis - by (simp add: \convex S\ convex_imp_path_connected rel_frontier_def) -next - case False - then show ?thesis - by (metis aff_dim_affine_hull affine_affine_hull affine_imp_convex all_not_in_conv assms path_connected_punctured_convex rel_frontier_retract_of_punctured_affine_hull retract_of_path_connected) + by (metis Diff_empty aff_dim_affine_hull assms convex_affine_hull convex_imp_path_connected equals0I + path_connected_punctured_convex rel_frontier_def rel_frontier_retract_of_punctured_affine_hull retract_of_path_connected) qed lemma connected_sphere_gen: @@ -2282,8 +2234,7 @@ then show ?thesis apply (simp add: path_def path_image_def pathstart_def pathfinish_def homotopic_with_def) apply (rule_tac x = "\z. inverse(norm(snd z - (g \ fst)z)) *\<^sub>R (snd z - (g \ fst)z)" in exI) - apply (intro conjI continuous_intros) - apply (rule continuous_intros | erule continuous_on_subset | fastforce simp: divide_simps sphere_def)+ + apply (rule conjI continuous_intros | erule continuous_on_subset | fastforce simp: divide_simps sphere_def)+ done qed @@ -2315,8 +2266,8 @@ using ball_subset_cball [of a r] r by auto have cont1: "continuous_on (s \ connected_component_set (- s) a) (\x. a + r *\<^sub>R g x)" - apply (rule continuous_intros)+ - using \continuous_on (s \ c) g\ ceq by blast + using \continuous_on (s \ c) g\ ceq + by (intro continuous_intros) blast have cont2: "continuous_on (cball a r - connected_component_set (- s) a) (\x. a + r *\<^sub>R ((x - a) /\<^sub>R norm (x - a)))" by (rule continuous_intros | force simp: \a \ s\)+ @@ -2326,10 +2277,8 @@ else a + r *\<^sub>R ((x - a) /\<^sub>R norm (x - a)))" apply (subst cb_eq) apply (rule continuous_on_cases [OF _ _ cont1 cont2]) - using ceq cin - apply (auto intro: closed_Un_complement_component - simp: \closed s\ open_Compl open_connected_component) - done + using \closed s\ ceq cin + by (force simp: closed_Diff open_Compl closed_Un_complement_component open_connected_component)+ have 2: "(\x. a + r *\<^sub>R g x) ` (cball a r \ connected_component_set (- s) a) \ sphere a r " using \0 < r\ by (force simp: dist_norm ceq) @@ -2384,12 +2333,7 @@ and "x \ S" and "\x y. \x\S; y\cball a e\ \ x + (y - f y) \ cball a e" shows "\y\cball a e. f y = x" - apply (rule brouwer_surjective) - apply (rule compact_cball convex_cball)+ - unfolding cball_eq_empty - using assms - apply auto - done + by (smt (verit, best) assms brouwer_surjective cball_eq_empty compact_cball convex_cball) subsubsection \Inverse function theorem\ @@ -2510,8 +2454,7 @@ lemma has_derivative_inverse_strong: fixes f :: "'n::euclidean_space \ 'n" - assumes "open S" - and "x \ S" + assumes S: "open S" "x \ S" and contf: "continuous_on S f" and gf: "\x. x \ S \ g (f x) = x" and derf: "(f has_derivative f') (at x)" @@ -2524,23 +2467,16 @@ unfolding linear_conv_bounded_linear[symmetric] using id right_inverse_linear by blast moreover have "g' \ f' = id" - using id linf ling - unfolding linear_conv_bounded_linear[symmetric] - using linear_inverse_left - by auto + using id linear_inverse_left linear_linear linf ling by blast moreover have *: "\T. \T \ S; x \ interior T\ \ f x \ interior (f ` T)" - apply (rule sussmann_open_mapping) - apply (rule assms ling)+ - apply auto - done + using S derf contf id ling sussmann_open_mapping by blast have "continuous (at (f x)) g" unfolding continuous_at Lim_at - proof (rule, rule) + proof (intro strip) fix e :: real assume "e > 0" then have "f x \ interior (f ` (ball x e \ S))" - using *[rule_format,of "ball x e \ S"] \x \ S\ - by (auto simp add: interior_open[OF open_ball] interior_open[OF assms(1)]) + by (simp add: "*" S interior_open) then obtain d where d: "0 < d" "ball (f x) d \ f ` (ball x e \ S)" unfolding mem_interior by blast show "\d>0. \y. 0 < dist y (f x) \ dist y (f x) < d \ dist (g y) (g (f x)) < e" @@ -2550,16 +2486,11 @@ then have "g y \ g ` f ` (ball x e \ S)" by (metis d(2) dist_commute mem_ball rev_image_eqI subset_iff) then show "dist (g y) (g (f x)) < e" - using gf[OF \x \ S\] - by (simp add: assms(4) dist_commute image_iff) + using \x \ S\ by (simp add: gf dist_commute image_iff) qed (use d in auto) qed moreover have "f x \ interior (f ` S)" - apply (rule sussmann_open_mapping) - apply (rule assms ling)+ - using interior_open[OF assms(1)] and \x \ S\ - apply auto - done + using "*" S interior_eq by blast moreover have "f (g y) = y" if "y \ interior (f ` S)" for y by (metis gf imageE interiorE subsetD that) ultimately show ?thesis using assms @@ -2576,26 +2507,20 @@ and "\x. x \ S \ g (f x) = x" and "(f has_derivative f') (at (g y))" and "f' \ g' = id" - and "f (g y) = y" + and f: "f (g y) = y" shows "(g has_derivative g') (at y)" - using has_derivative_inverse_strong[OF assms(1-6)] - unfolding assms(7) - by simp + using has_derivative_inverse_strong[OF assms(1-6)] by (simp add: f) text \On a region.\ theorem has_derivative_inverse_on: fixes f :: "'n::euclidean_space \ 'n" assumes "open S" - and derf: "\x. x \ S \ (f has_derivative f'(x)) (at x)" + and "\x. x \ S \ (f has_derivative f'(x)) (at x)" and "\x. x \ S \ g (f x) = x" and "f' x \ g' x = id" and "x \ S" shows "(g has_derivative g'(x)) (at (f x))" -proof (rule has_derivative_inverse_strong[where g'="g' x" and f=f]) - show "continuous_on S f" - unfolding continuous_on_eq_continuous_at[OF \open S\] - using derf has_derivative_continuous by blast -qed (use assms in auto) + by (meson assms continuous_on_eq_continuous_at has_derivative_continuous has_derivative_inverse_strong) end diff -r 9e5a27486ca2 -r 7fd705b107f2 src/HOL/Analysis/Lebesgue_Measure.thy --- a/src/HOL/Analysis/Lebesgue_Measure.thy Mon Dec 26 21:28:20 2022 +0100 +++ b/src/HOL/Analysis/Lebesgue_Measure.thy Tue Dec 27 10:38:34 2022 +0000 @@ -145,11 +145,8 @@ proof cases assume "?R" with \j \ S\ psubset.prems have "{u..v} \ (\i\S-{j}. {l i<..< r i})" - apply (auto simp: subset_eq Ball_def) - apply (metis Diff_iff less_le_trans leD linear singletonD) - apply (metis Diff_iff less_le_trans leD linear singletonD) - apply (metis order_trans less_le_not_le linear) - done + apply (simp add: subset_eq Ball_def Bex_def) + by (metis order_le_less_trans order_less_le_trans order_less_not_sym) with \j \ S\ have "F v - F u \ (\i\S - {j}. F (r i) - F (l i))" by (intro psubset) auto also have "\ \ (\i\S. F (r i) - F (l i))" @@ -162,19 +159,14 @@ by (auto simp: not_less) let ?S1 = "{i \ S. l i < l j}" let ?S2 = "{i \ S. r i > r j}" - + have *: "?S1 \ ?S2 = {}" + using j by (fastforce simp add: disjoint_iff) have "(\i\S. F (r i) - F (l i)) \ (\i\?S1 \ ?S2 \ {j}. F (r i) - F (l i))" using \j \ S\ \finite S\ psubset.prems j by (intro sum_mono2) (auto intro: less_imp_le) also have "(\i\?S1 \ ?S2 \ {j}. F (r i) - F (l i)) = (\i\?S1. F (r i) - F (l i)) + (\i\?S2 . F (r i) - F (l i)) + (F (r j) - F (l j))" - using psubset(1) psubset.prems(1) j - apply (subst sum.union_disjoint) - apply simp_all - apply (subst sum.union_disjoint) - apply auto - apply (metis less_le_not_le) - done + using psubset(1) by (simp add: * sum.union_disjoint disjoint_iff_not_equal) also (xtrans) have "(\i\?S1. F (r i) - F (l i)) \ F (l j) - F u" using \j \ S\ \finite S\ psubset.prems j apply (intro psubset.IH psubset) @@ -202,31 +194,24 @@ proof fix i note right_cont_F [of "r i"] + then have "\d>0. F (r i + d) - F (r i) < epsilon / 2 ^ (i + 2)" + by (simp add: continuous_at_right_real_increasing egt0) thus "\d>0. F (r i + d) < F (r i) + epsilon / 2^(i+2)" - apply - - apply (subst (asm) continuous_at_right_real_increasing) - apply (rule mono_F, assumption) - apply (drule_tac x = "epsilon / 2 ^ (i + 2)" in spec) - apply (erule impE) - using egt0 by (auto simp add: field_simps) + by force qed then obtain delta where deltai_gt0: "\i. delta i > 0" and deltai_prop: "\i. F (r i + delta i) < F (r i) + epsilon / 2^(i+2)" by metis have "\a' > a. F a' - F a < epsilon / 2" - apply (insert right_cont_F [of a]) - apply (subst (asm) continuous_at_right_real_increasing) - using mono_F apply force - apply (drule_tac x = "epsilon / 2" in spec) - using egt0 unfolding mult.commute [of 2] by force + using right_cont_F [of a] + by (metis continuous_at_right_real_increasing egt0 half_gt_zero less_add_same_cancel1 mono_F) then obtain a' where a'lea [arith]: "a' > a" and a_prop: "F a' - F a < epsilon / 2" by auto define S' where "S' = {i. l i < r i}" - obtain S :: "nat set" where - "S \ S'" and finS: "finite S" and - Sprop: "{a'..b} \ (\i \ S. {l i<.. S'" and finS: "finite S" + and Sprop: "{a'..b} \ (\i \ S. {l i<..i\S'. {l i<..r i})" unfolding lr_eq_ab[symmetric] by (fastforce simp add: S'_def intro: less_le_trans) also have "\ \ (\i \ S'. {l i<.. (\i \ S'. {l i<..i. i \ S \ l i < r i" by auto - from finS have "\n. \i \ S. i \ n" - by (subst finite_nat_set_iff_bounded_le [symmetric]) - then obtain n where Sbound [rule_format]: "\i \ S. i \ n" .. - have "F b - F a' \ (\i\S. F (r i + delta i) - F (l i))" - apply (rule claim2 [rule_format]) - using finS Sprop apply auto - apply (frule Sprop2) - apply (subgoal_tac "delta i > 0") - apply arith - by (rule deltai_gt0) - also have "... \ (\i \ S. F(r i) - F(l i) + epsilon / 2^(i+2))" - apply (rule sum_mono) - apply simp - apply (rule order_trans) - apply (rule less_imp_le) - apply (rule deltai_prop) - by auto - also have "... = (\i \ S. F(r i) - F(l i)) + - (epsilon / 4) * (\i \ S. (1 / 2)^i)" (is "_ = ?t + _") - by (subst sum.distrib) (simp add: field_simps sum_distrib_left) - also have "... \ ?t + (epsilon / 4) * (\ i < Suc n. (1 / 2)^i)" - apply (rule add_left_mono) - apply (rule mult_left_mono) - apply (rule sum_mono2) - using egt0 apply auto - by (frule Sbound, auto) - also have "... \ ?t + (epsilon / 2)" - apply (rule add_left_mono) - apply (subst geometric_sum) - apply auto - apply (rule mult_left_mono) - using egt0 apply auto - done - finally have aux2: "F b - F a' \ (\i\S. F (r i) - F (l i)) + epsilon / 2" - by simp - + obtain n where Sbound: "\i. i \ S \ i \ n" + using Max_ge finS by blast have "F b - F a = (F b - F a') + (F a' - F a)" by auto also have "... \ (F b - F a') + epsilon / 2" using a_prop by (intro add_left_mono) simp also have "... \ (\i\S. F (r i) - F (l i)) + epsilon / 2 + epsilon / 2" - apply (intro add_right_mono) - apply (rule aux2) - done + proof - + have "F b - F a' \ (\i\S. F (r i + delta i) - F (l i))" + using claim2 l_r Sprop by (simp add: deltai_gt0 finS add.commute add_strict_increasing) + also have "... \ (\i \ S. F(r i) - F(l i) + epsilon / 2^(i+2))" + by (smt (verit) sum_mono deltai_prop) + also have "... = (\i \ S. F(r i) - F(l i)) + + (epsilon / 4) * (\i \ S. (1 / 2)^i)" (is "_ = ?t + _") + by (subst sum.distrib) (simp add: field_simps sum_distrib_left) + also have "... \ ?t + (epsilon / 4) * (\ i < Suc n. (1 / 2)^i)" + using egt0 Sbound by (intro add_left_mono mult_left_mono sum_mono2) force+ + also have "... \ ?t + (epsilon / 2)" + using egt0 by (simp add: geometric_sum add_left_mono mult_left_mono) + finally have "F b - F a' \ (\i\S. F (r i) - F (l i)) + epsilon / 2" + by simp + then show ?thesis + by linarith + qed also have "... = (\i\S. F (r i) - F (l i)) + epsilon" by auto also have "... \ (\i\n. F (r i) - F (l i)) + epsilon" @@ -316,12 +277,8 @@ lemma\<^marker>\tag important\ sets_interval_measure [simp, measurable_cong]: "sets (interval_measure F) = sets borel" - apply (simp add: sets_extend_measure interval_measure_def borel_sigma_sets_Ioc) - apply (rule sigma_sets_eqI) - apply auto - apply (case_tac "a \ ba") - apply (auto intro: sigma_sets.Empty) - done + apply (simp add: sets_extend_measure interval_measure_def borel_sigma_sets_Ioc image_def split: prod.split) + by (metis greaterThanAtMost_empty nle_le) lemma space_interval_measure [simp]: "space (interval_measure F) = UNIV" by (simp add: interval_measure_def space_extend_measure) @@ -342,21 +299,16 @@ show "((\a. F b - F a) \ emeasure ?F {a..b}) (at_left a)" proof (rule tendsto_at_left_sequentially) show "a - 1 < a" by simp - fix X assume "\n. X n < a" "incseq X" "X \ a" - with \a \ b\ have "(\n. emeasure ?F {X n<..b}) \ emeasure ?F (\n. {X n <..b})" - apply (intro Lim_emeasure_decseq) - apply (auto simp: decseq_def incseq_def emeasure_interval_measure_Ioc *) - apply force - apply (subst (asm ) *) - apply (auto intro: less_le_trans less_imp_le) - done + fix X assume X: "\n. X n < a" "incseq X" "X \ a" + then have "emeasure (interval_measure F) {X n<..b} \ \" for n + by (smt (verit) "*" \a \ b\ ennreal_neq_top infinity_ennreal_def) + with X have "(\n. emeasure ?F {X n<..b}) \ emeasure ?F (\n. {X n <..b})" + by (intro Lim_emeasure_decseq; force simp: decseq_def incseq_def emeasure_interval_measure_Ioc *) also have "(\n. {X n <..b}) = {a..b}" - using \\n. X n < a\ apply auto apply (rule LIMSEQ_le_const2[OF \X \ a\]) - apply (auto intro: less_imp_le) - apply (auto intro: less_le_trans) - done + using less_eq_real_def apply presburger + using X(1) order_less_le_trans by blast also have "(\n. emeasure ?F {X n<..b}) = (\n. F b - F (X n))" using \\n. X n < a\ \a \ b\ by (subst *) (auto intro: less_imp_le less_le_trans) finally show "(\n. F b - F (X n)) \ emeasure ?F {a..b}" . @@ -426,12 +378,7 @@ by (metis (mono_tags, lifting) IntD1 assms measurable_cong_simp space_restrict_space) lemma lebesgue_on_UNIV_eq: "lebesgue_on UNIV = lebesgue" -proof - - have "measure_of UNIV (sets lebesgue) (emeasure lebesgue) = lebesgue" - by (metis measure_of_of_measure space_borel space_completion space_lborel) - then show ?thesis - by (auto simp: restrict_space_def) -qed + by (simp add: emeasure_restrict_space measure_eqI) lemma integral_restrict_Int: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" @@ -528,11 +475,7 @@ fixes f :: "'a::euclidean_space \ 'b::euclidean_space" assumes "(\x. if x \ S then f x else 0) \ borel_measurable lebesgue" shows "f \ borel_measurable (lebesgue_on S)" - using assms - apply (simp add: in_borel_measurable_borel Ball_def) - apply (elim all_forward imp_forward asm_rl) - apply (force simp: space_restrict_space sets_restrict_space image_iff intro: rev_bexI) - done + using assms by (smt (verit) measurable_lebesgue_cong measurable_restrict_space1) lemma borel_measurable_if: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" @@ -557,33 +500,25 @@ lemma borel_measurable_vimage_halfspace_component_lt: "f \ borel_measurable (lebesgue_on S) \ (\a i. i \ Basis \ {x \ S. f x \ i < a} \ sets (lebesgue_on S))" - apply (rule trans [OF borel_measurable_iff_halfspace_less]) - apply (fastforce simp add: space_restrict_space) - done + by (force simp add: space_restrict_space trans [OF borel_measurable_iff_halfspace_less]) lemma borel_measurable_vimage_halfspace_component_ge: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" shows "f \ borel_measurable (lebesgue_on S) \ (\a i. i \ Basis \ {x \ S. f x \ i \ a} \ sets (lebesgue_on S))" - apply (rule trans [OF borel_measurable_iff_halfspace_ge]) - apply (fastforce simp add: space_restrict_space) - done + by (force simp add: space_restrict_space trans [OF borel_measurable_iff_halfspace_ge]) lemma borel_measurable_vimage_halfspace_component_gt: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" shows "f \ borel_measurable (lebesgue_on S) \ (\a i. i \ Basis \ {x \ S. f x \ i > a} \ sets (lebesgue_on S))" - apply (rule trans [OF borel_measurable_iff_halfspace_greater]) - apply (fastforce simp add: space_restrict_space) - done + by (force simp add: space_restrict_space trans [OF borel_measurable_iff_halfspace_greater]) lemma borel_measurable_vimage_halfspace_component_le: fixes f :: "'a::euclidean_space \ 'b::euclidean_space" shows "f \ borel_measurable (lebesgue_on S) \ (\a i. i \ Basis \ {x \ S. f x \ i \ a} \ sets (lebesgue_on S))" - apply (rule trans [OF borel_measurable_iff_halfspace_le]) - apply (fastforce simp add: space_restrict_space) - done + by (force simp add: space_restrict_space trans [OF borel_measurable_iff_halfspace_le]) lemma fixes f :: "'a::euclidean_space \ 'b::euclidean_space" @@ -630,16 +565,12 @@ fixes f :: "'a::euclidean_space \ 'b::euclidean_space" shows "f \ borel_measurable (lebesgue_on S) \ (\T. closed T \ {x \ S. f x \ T} \ sets (lebesgue_on S))" - (is "?lhs = ?rhs") proof - - have eq: "{x \ S. f x \ T} = S - {x \ S. f x \ (- T)}" for T + have eq: "{x \ S. f x \ T} = S - (S \ f -` (- T))" for T by auto show ?thesis - apply (simp add: borel_measurable_vimage_open, safe) - apply (simp_all (no_asm) add: eq) - apply (intro sets.Diff sets_lebesgue_on_refl, force simp: closed_open) - apply (intro sets.Diff sets_lebesgue_on_refl, force simp: open_closed) - done + unfolding borel_measurable_vimage_open eq + by (metis Diff_Diff_Int closed_Compl diff_eq open_Compl sets.Diff sets_lebesgue_on_refl vimage_Compl) qed lemma borel_measurable_vimage_closed_interval: @@ -689,9 +620,7 @@ fixes f :: "'a::euclidean_space \ 'b::euclidean_space" shows "f \ borel_measurable lebesgue \ (\T. T \ sets borel \ {x. f x \ T} \ sets lebesgue)" - apply (intro iffI allI impI lebesgue_measurable_vimage_borel) - apply (auto simp: in_borel_measurable_borel vimage_def) - done + by (smt (verit, best) Collect_cong UNIV_I borel_measurable_vimage_borel lebesgue_on_UNIV_eq) subsection \<^marker>\tag unimportant\ \Measurability of continuous functions\ @@ -699,13 +628,9 @@ lemma continuous_imp_measurable_on_sets_lebesgue: assumes f: "continuous_on S f" and S: "S \ sets lebesgue" shows "f \ borel_measurable (lebesgue_on S)" -proof - - have "sets (restrict_space borel S) \ sets (lebesgue_on S)" - by (simp add: mono_restrict_space subsetI) - then show ?thesis - by (simp add: borel_measurable_continuous_on_restrict [OF f] borel_measurable_subalgebra - space_restrict_space) -qed + by (metis borel_measurable_continuous_on_restrict borel_measurable_subalgebra f + lebesgue_on_UNIV_eq mono_restrict_space sets_completionI_sets sets_lborel space_borel + space_lebesgue_on space_restrict_space subsetI) lemma id_borel_measurable_lebesgue [iff]: "id \ borel_measurable lebesgue" by (simp add: measurable_completion) @@ -741,12 +666,7 @@ fixes l u :: real assumes [simp]: "l \ u" shows "emeasure lborel {l .. u} = u - l" -proof - - have "((\f. f 1) -` {l..u} \ space (Pi\<^sub>M {1} (\b. interval_measure (\x. x)))) = {1::real} \\<^sub>E {l..u}" - by (auto simp: space_PiM) - then show ?thesis - by (simp add: lborel_def emeasure_distr emeasure_PiM emeasure_interval_measure_Icc) -qed + by (simp add: emeasure_interval_measure_Icc lborel_eq_real) lemma emeasure_lborel_Icc_eq: "emeasure lborel {l .. u} = ennreal (if l \ u then u - l else 0)" by simp @@ -781,12 +701,7 @@ lemma emeasure_lborel_Ioc[simp]: assumes [simp]: "l \ u" shows "emeasure lborel {l <.. u} = ennreal (u - l)" -proof - - have "emeasure lborel {l <.. u} = emeasure lborel {l .. u}" - using AE_lborel_singleton[of u] AE_lborel_singleton[of l] by (intro emeasure_eq_AE) auto - then show ?thesis - by simp -qed + by (simp add: emeasure_interval_measure_Ioc lborel_eq_real) lemma emeasure_lborel_Ico[simp]: assumes [simp]: "l \ u" @@ -830,26 +745,12 @@ by (auto simp: emeasure_lborel_box_eq) lemma emeasure_lborel_ball_finite: "emeasure lborel (ball c r) < \" -proof - - have "bounded (ball c r)" by simp - from bounded_subset_cbox_symmetric[OF this] obtain a where a: "ball c r \ cbox (-a) a" - by auto - hence "emeasure lborel (ball c r) \ emeasure lborel (cbox (-a) a)" - by (intro emeasure_mono) auto - also have "\ < \" by (simp add: emeasure_lborel_cbox_eq) - finally show ?thesis . -qed + by (metis bounded_ball bounded_subset_cbox_symmetric cbox_borel emeasure_lborel_cbox_finite + emeasure_mono order_le_less_trans sets_lborel) lemma emeasure_lborel_cball_finite: "emeasure lborel (cball c r) < \" -proof - - have "bounded (cball c r)" by simp - from bounded_subset_cbox_symmetric[OF this] obtain a where a: "cball c r \ cbox (-a) a" - by auto - hence "emeasure lborel (cball c r) \ emeasure lborel (cbox (-a) a)" - by (intro emeasure_mono) auto - also have "\ < \" by (simp add: emeasure_lborel_cbox_eq) - finally show ?thesis . -qed + by (metis bounded_cball bounded_subset_cbox_symmetric cbox_borel emeasure_lborel_cbox_finite + emeasure_mono order_le_less_trans sets_lborel) lemma fmeasurable_cbox [iff]: "cbox a b \ fmeasurable lborel" and fmeasurable_box [iff]: "box a b \ fmeasurable lborel" @@ -924,7 +825,7 @@ also have "emeasure lborel (\i. {from_nat_into A i}) = 0" by (rule emeasure_UN_eq_0) auto finally show ?thesis - by (auto simp add: ) + by simp qed lemma countable_imp_null_set_lborel: "countable A \ A \ null_sets lborel" @@ -934,30 +835,18 @@ by (intro countable_imp_null_set_lborel countable_finite) lemma insert_null_sets_iff [simp]: "insert a N \ null_sets lebesgue \ N \ null_sets lebesgue" - (is "?lhs = ?rhs") -proof - assume ?lhs then show ?rhs - by (meson completion.complete2 subset_insertI) -next - assume ?rhs then show ?lhs - by (simp add: null_sets.insert_in_sets null_setsI) -qed + by (meson completion.complete2 finite.simps finite_imp_null_set_lborel null_sets.insert_in_sets + null_sets_completionI subset_insertI) lemma insert_null_sets_lebesgue_on_iff [simp]: assumes "a \ S" "S \ sets lebesgue" shows "insert a N \ null_sets (lebesgue_on S) \ N \ null_sets (lebesgue_on S)" by (simp add: assms null_sets_restrict_space) -lemma lborel_neq_count_space[simp]: "lborel \ count_space (A::('a::ordered_euclidean_space) set)" -proof - assume asm: "lborel = count_space A" - have "space lborel = UNIV" by simp - hence [simp]: "A = UNIV" by (subst (asm) asm) (simp only: space_count_space) - have "emeasure lborel {undefined::'a} = 1" - by (subst asm, subst emeasure_count_space_finite) auto - moreover have "emeasure lborel {undefined} \ 1" by simp - ultimately show False by contradiction -qed +lemma lborel_neq_count_space[simp]: + fixes A :: "('a::ordered_euclidean_space) set" + shows "lborel \ count_space A" + by (metis finite.simps finite_imp_null_set_lborel insert_not_empty null_sets_count_space singleton_iff) lemma mem_closed_if_AE_lebesgue_open: assumes "open S" "closed C" @@ -1004,13 +893,9 @@ let ?A = "\n::nat. box (- (real n *\<^sub>R One)) (real n *\<^sub>R One) :: 'a set" show "range ?A \ ?E" "(\i. ?A i) = UNIV" unfolding UN_box_eq_UNIV by auto - - { fix i show "emeasure lborel (?A i) \ \" by auto } - { fix X assume "X \ ?E" then show "emeasure lborel X = emeasure M X" - apply (auto simp: emeasure_eq emeasure_lborel_box_eq) - apply (subst box_eq_empty(1)[THEN iffD2]) - apply (auto intro: less_imp_le simp: not_le) - done } + show "emeasure lborel (?A i) \ \" for i by auto + show "emeasure lborel X = emeasure M X" if "X \ ?E" for X + using that box_eq_empty(1) by (fastforce simp: emeasure_eq emeasure_lborel_box_eq) qed lemma\<^marker>\tag important\ lborel_affine_euclidean: @@ -1102,7 +987,7 @@ by (auto simp: null_sets_def) show "T \ lebesgue \\<^sub>M lebesgue" - by (rule completion.measurable_completion2) (auto simp: eq measurable_completion) + by (simp add: completion.measurable_completion2 eq measurable_completion) have "lebesgue = completion (density (distr lborel borel T) (\_. (\j\Basis. \c j\)))" using c by (subst lborel_affine_euclidean[of c t]) (simp_all add: T_def[abs_def]) @@ -1135,7 +1020,7 @@ lemma lebesgue_measurable_scaling[measurable]: "(*\<^sub>R) x \ lebesgue \\<^sub>M lebesgue" proof cases - assume "x = 0" + assume "x = 0" then have "(*\<^sub>R) x = (\x. 0::'a)" by (auto simp: fun_eq_iff) then show ?thesis by auto @@ -1352,8 +1237,7 @@ lemma fixes a::real shows lmeasurable_interval [iff]: "{a..b} \ lmeasurable" "{a<.. lmeasurable" - apply (metis box_real(2) lmeasurable_cbox) - by (metis box_real(1) lmeasurable_box) + by (metis box_real lmeasurable_box lmeasurable_cbox)+ lemma fmeasurable_compact: "compact S \ S \ fmeasurable lborel" using emeasure_compact_finite[of S] by (intro fmeasurableI) (auto simp: borel_compact) @@ -1387,14 +1271,7 @@ by (simp add: bounded_interior lmeasurable_open) lemma null_sets_cbox_Diff_box: "cbox a b - box a b \ null_sets lborel" -proof - - have "emeasure lborel (cbox a b - box a b) = 0" - by (subst emeasure_Diff) (auto simp: emeasure_lborel_cbox_eq emeasure_lborel_box_eq box_subset_cbox) - then have "cbox a b - box a b \ null_sets lborel" - by (auto simp: null_sets_def) - then show ?thesis - by (auto dest!: AE_not_in) -qed + by (simp add: emeasure_Diff emeasure_lborel_box_eq emeasure_lborel_cbox_eq null_setsI subset_box) lemma bounded_set_imp_lmeasurable: assumes "bounded S" "S \ sets lebesgue" shows "S \ lmeasurable" @@ -1423,10 +1300,8 @@ by (simp add: sigma_sets.Empty) next case (Compl a) - then have "\ - a \ \" "a \ \" - by (auto simp: sigma_sets_into_sp [OF \M \ Pow \\]) - then show ?case - by (auto simp: inj_on_image_set_diff [OF \inj_on f \\] assms intro: Compl sigma_sets.Compl) + with assms show ?case + by (metis inj_on_image_set_diff sigma_sets.Compl sigma_sets_into_sp) next case (Union a) then show ?case by (metis image_UN sigma_sets.simps) @@ -1475,9 +1350,8 @@ lemma measurable_translation: "S \ lmeasurable \ ((+) a ` S) \ lmeasurable" using emeasure_lebesgue_affine [of 1 a S] - apply (auto intro: lebesgue_sets_translation simp add: fmeasurable_def cong: image_cong_simp) - apply (simp add: ac_simps) - done + by (smt (verit, best) add.commute ennreal_1 fmeasurable_def image_cong lambda_one + lebesgue_sets_translation mem_Collect_eq power_one scaleR_one) lemma measurable_translation_subtract: "S \ lmeasurable \ ((\x. x - a) ` S) \ lmeasurable" @@ -1508,11 +1382,10 @@ let ?f = "\n. root DIM('a) (Suc n)" - have vimage_eq_image: "(*\<^sub>R) (?f n) -` S = (*\<^sub>R) (1 / ?f n) ` S" for n - apply safe - subgoal for x by (rule image_eqI[of _ _ "?f n *\<^sub>R x"]) auto - subgoal by auto - done + have "?f n *\<^sub>R x \ S \ x \ (*\<^sub>R) (1 / ?f n) ` S" for x n + by (rule image_eqI[of _ _ "?f n *\<^sub>R x"]) auto + then have vimage_eq_image: "(*\<^sub>R) (?f n) -` S = (*\<^sub>R) (1 / ?f n) ` S" for n + by auto have eq: "(1 / ?f n) ^ DIM('a) = 1 / Suc n" for n by (simp add: field_simps) @@ -1642,12 +1515,12 @@ "emeasure (completion M) A = emeasure M A'" proof - from AE_notin_null_part[OF A] obtain N where N: "N \ null_sets M" "null_part M A \ N" - unfolding eventually_ae_filter using null_part_null_sets[OF A, THEN null_setsD2, THEN sets.sets_into_space] by auto + by (meson assms null_part) let ?A' = "main_part M A \ N" show ?thesis proof show "A \ ?A'" - using \null_part M A \ N\ by (subst main_part_null_part_Un[symmetric, OF A]) auto + using \null_part M A \ N\ assms main_part_null_part_Un by blast have "main_part M A \ A" using assms main_part_null_part_Un by auto then have "?A' - A \ N" diff -r 9e5a27486ca2 -r 7fd705b107f2 src/HOL/Library/BigO.thy --- a/src/HOL/Library/BigO.thy Mon Dec 26 21:28:20 2022 +0100 +++ b/src/HOL/Library/BigO.thy Tue Dec 27 10:38:34 2022 +0000 @@ -42,49 +42,22 @@ lemma bigo_pos_const: "(\c::'a::linordered_idom. \x. \h x\ \ c * \f x\) \ (\c. 0 < c \ (\x. \h x\ \ c * \f x\))" - apply auto - apply (case_tac "c = 0") - apply simp - apply (rule_tac x = "1" in exI) - apply simp - apply (rule_tac x = "\c\" in exI) - apply auto - apply (subgoal_tac "c * \f x\ \ \c\ * \f x\") - apply (erule_tac x = x in allE) - apply force - apply (rule mult_right_mono) - apply (rule abs_ge_self) - apply (rule abs_ge_zero) - done + by (metis (no_types, opaque_lifting) abs_ge_zero abs_not_less_zero abs_of_nonneg dual_order.trans + mult_1 zero_less_abs_iff zero_less_mult_iff zero_less_one) lemma bigo_alt_def: "O(f) = {h. \c. 0 < c \ (\x. \h x\ \ c * \f x\)}" by (auto simp add: bigo_def bigo_pos_const) lemma bigo_elt_subset [intro]: "f \ O(g) \ O(f) \ O(g)" apply (auto simp add: bigo_alt_def) - apply (rule_tac x = "ca * c" in exI) - apply (rule conjI) - apply simp - apply (rule allI) - apply (drule_tac x = "xa" in spec)+ - apply (subgoal_tac "ca * \f xa\ \ ca * (c * \g xa\)") - apply (erule order_trans) - apply (simp add: ac_simps) - apply (rule mult_left_mono, assumption) - apply (rule order_less_imp_le, assumption) - done + by (metis (no_types, opaque_lifting) mult.assoc mult_le_cancel_iff2 order.trans + zero_less_mult_iff) lemma bigo_refl [intro]: "f \ O(f)" - apply (auto simp add: bigo_def) - apply (rule_tac x = 1 in exI) - apply simp - done + using bigo_def comm_monoid_mult_class.mult_1 dual_order.eq_iff by blast lemma bigo_zero: "0 \ O(g)" - apply (auto simp add: bigo_def func_zero) - apply (rule_tac x = 0 in exI) - apply auto - done + using bigo_def mult_le_cancel_left1 by fastforce lemma bigo_zero2: "O(\x. 0) = {\x. 0}" by (auto simp add: bigo_def) @@ -92,21 +65,10 @@ lemma bigo_plus_self_subset [intro]: "O(f) + O(f) \ O(f)" apply (auto simp add: bigo_alt_def set_plus_def) apply (rule_tac x = "c + ca" in exI) - apply auto - apply (simp add: ring_distribs func_plus) - apply (rule order_trans) - apply (rule abs_triangle_ineq) - apply (rule add_mono) - apply force - apply force - done + by (smt (verit, best) abs_triangle_ineq add_mono add_pos_pos comm_semiring_class.distrib dual_order.trans) lemma bigo_plus_idemp [simp]: "O(f) + O(f) = O(f)" - apply (rule equalityI) - apply (rule bigo_plus_self_subset) - apply (rule set_zero_plus2) - apply (rule bigo_zero) - done + by (simp add: antisym bigo_plus_self_subset bigo_zero set_zero_plus2) lemma bigo_plus_subset [intro]: "O(f + g) \ O(f) + O(g)" apply (rule subsetI) @@ -117,37 +79,22 @@ apply (rule_tac x = "c + c" in exI) apply (clarsimp) apply (subgoal_tac "c * \f xa + g xa\ \ (c + c) * \f xa\") - apply (erule_tac x = xa in allE) - apply (erule order_trans) - apply (simp) + apply (metis mult_2 order_trans) apply (subgoal_tac "c * \f xa + g xa\ \ c * (\f xa\ + \g xa\)") - apply (erule order_trans) - apply (simp add: ring_distribs) - apply (rule mult_left_mono) - apply (simp add: abs_triangle_ineq) - apply (simp add: order_less_le) + apply auto[1] + using abs_triangle_ineq mult_le_cancel_iff2 apply blast + apply (simp add: order_less_le) apply (rule_tac x = "\n. if \f n\ < \g n\ then x n else 0" in exI) apply (rule conjI) apply (rule_tac x = "c + c" in exI) apply auto apply (subgoal_tac "c * \f xa + g xa\ \ (c + c) * \g xa\") - apply (erule_tac x = xa in allE) - apply (erule order_trans) - apply simp - apply (subgoal_tac "c * \f xa + g xa\ \ c * (\f xa\ + \g xa\)") - apply (erule order_trans) - apply (simp add: ring_distribs) - apply (rule mult_left_mono) - apply (rule abs_triangle_ineq) - apply (simp add: order_less_le) + apply (metis mult_2 order.trans) + apply simp done lemma bigo_plus_subset2 [intro]: "A \ O(f) \ B \ O(f) \ A + B \ O(f)" - apply (subgoal_tac "A + B \ O(f) + O(f)") - apply (erule order_trans) - apply simp - apply (auto del: subsetI simp del: bigo_plus_idemp) - done + using bigo_plus_idemp set_plus_mono2 by blast lemma bigo_plus_eq: "\x. 0 \ f x \ \x. 0 \ g x \ O(f + g) = O(f) + O(g)" apply (rule equalityI) @@ -157,8 +104,7 @@ apply (rule_tac x = "max c ca" in exI) apply (rule conjI) apply (subgoal_tac "c \ max c ca") - apply (erule order_less_le_trans) - apply assumption + apply linarith apply (rule max.cobounded1) apply clarify apply (drule_tac x = "xa" in spec)+ @@ -167,21 +113,9 @@ apply (subgoal_tac "\a xa + b xa\ \ \a xa\ + \b xa\") apply (subgoal_tac "\a xa\ + \b xa\ \ max c ca * f xa + max c ca * g xa") apply force - apply (rule add_mono) - apply (subgoal_tac "c * f xa \ max c ca * f xa") - apply force - apply (rule mult_right_mono) - apply (rule max.cobounded1) - apply assumption - apply (subgoal_tac "ca * g xa \ max c ca * g xa") - apply force - apply (rule mult_right_mono) - apply (rule max.cobounded2) - apply assumption - apply (rule abs_triangle_ineq) - apply (rule add_nonneg_nonneg) - apply assumption+ - done + apply (metis add_mono le_max_iff_disj max_mult_distrib_right) + using abs_triangle_ineq apply blast + using add_nonneg_nonneg by blast lemma bigo_bounded_alt: "\x. 0 \ f x \ \x. f x \ c * g x \ f \ O(g)" apply (auto simp add: bigo_def)