Removed usage of normalizating locales.
authorhoelzl
Tue May 11 19:21:05 2010 +0200 (2010-05-11)
changeset 368445f9385ecc1a7
parent 36813 75d837441aa6
child 36845 d778c64fc35d
Removed usage of normalizating locales.
src/HOL/Metis_Examples/BT.thy
src/HOL/Metis_Examples/BigO.thy
src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Derivative.thy
src/HOL/Multivariate_Analysis/Integration.thy
src/HOL/Probability/Lebesgue.thy
     1.1 --- a/src/HOL/Metis_Examples/BT.thy	Tue May 11 08:52:22 2010 +0100
     1.2 +++ b/src/HOL/Metis_Examples/BT.thy	Tue May 11 19:21:05 2010 +0200
     1.3 @@ -88,7 +88,7 @@
     1.4    case Lf thus ?case by (metis reflect.simps(1))
     1.5  next
     1.6    case (Br a t1 t2) thus ?case
     1.7 -    by (metis normalizing.semiring_rules(24) n_nodes.simps(2) reflect.simps(2))
     1.8 +    by (metis add_commute n_nodes.simps(2) reflect.simps(2))
     1.9  qed
    1.10  
    1.11  declare [[ atp_problem_prefix = "BT__depth_reflect" ]]
     2.1 --- a/src/HOL/Metis_Examples/BigO.thy	Tue May 11 08:52:22 2010 +0100
     2.2 +++ b/src/HOL/Metis_Examples/BigO.thy	Tue May 11 19:21:05 2010 +0200
     2.3 @@ -41,7 +41,7 @@
     2.4    fix c :: 'a and x :: 'b
     2.5    assume A1: "\<forall>x. \<bar>h x\<bar> \<le> c * \<bar>f x\<bar>"
     2.6    have F1: "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 0 \<le> \<bar>x\<^isub>1\<bar>" by (metis abs_ge_zero)
     2.7 -  have F2: "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^isub>1 = x\<^isub>1" by (metis normalizing.mul_1)
     2.8 +  have F2: "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^isub>1 = x\<^isub>1" by (metis mult_1)
     2.9    have F3: "\<forall>x\<^isub>1 x\<^isub>3. x\<^isub>3 \<le> \<bar>h x\<^isub>1\<bar> \<longrightarrow> x\<^isub>3 \<le> c * \<bar>f x\<^isub>1\<bar>" by (metis A1 order_trans)
    2.10    have F4: "\<forall>x\<^isub>2 x\<^isub>3\<Colon>'a\<Colon>linordered_idom. \<bar>x\<^isub>3\<bar> * \<bar>x\<^isub>2\<bar> = \<bar>x\<^isub>3 * x\<^isub>2\<bar>"
    2.11      by (metis abs_mult)
    2.12 @@ -66,11 +66,11 @@
    2.13    apply auto
    2.14    apply (case_tac "c = 0", simp)
    2.15    apply (rule_tac x = "1" in exI, simp)
    2.16 -  apply (rule_tac x = "abs c" in exI, auto);
    2.17 +  apply (rule_tac x = "abs c" in exI, auto)
    2.18  proof -
    2.19    fix c :: 'a and x :: 'b
    2.20    assume A1: "\<forall>x. \<bar>h x\<bar> \<le> c * \<bar>f x\<bar>"
    2.21 -  have F1: "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^isub>1 = x\<^isub>1" by (metis normalizing.mul_1)
    2.22 +  have F1: "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^isub>1 = x\<^isub>1" by (metis mult_1)
    2.23    have F2: "\<forall>x\<^isub>2 x\<^isub>3\<Colon>'a\<Colon>linordered_idom. \<bar>x\<^isub>3\<bar> * \<bar>x\<^isub>2\<bar> = \<bar>x\<^isub>3 * x\<^isub>2\<bar>"
    2.24      by (metis abs_mult)
    2.25    have "\<forall>x\<^isub>1\<ge>0. \<bar>x\<^isub>1\<Colon>'a\<Colon>linordered_idom\<bar> = x\<^isub>1" by (metis F1 abs_mult_pos abs_one)
    2.26 @@ -92,7 +92,7 @@
    2.27  proof -
    2.28    fix c :: 'a and x :: 'b
    2.29    assume A1: "\<forall>x. \<bar>h x\<bar> \<le> c * \<bar>f x\<bar>"
    2.30 -  have F1: "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^isub>1 = x\<^isub>1" by (metis normalizing.mul_1)
    2.31 +  have F1: "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^isub>1 = x\<^isub>1" by (metis mult_1)
    2.32    have F2: "\<forall>x\<^isub>3 x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 0 \<le> x\<^isub>1 \<longrightarrow> \<bar>x\<^isub>3 * x\<^isub>1\<bar> = \<bar>x\<^isub>3\<bar> * x\<^isub>1" by (metis abs_mult_pos)
    2.33    hence "\<forall>x\<^isub>1\<ge>0. \<bar>x\<^isub>1\<Colon>'a\<Colon>linordered_idom\<bar> = x\<^isub>1" by (metis F1 abs_one)
    2.34    hence "\<forall>x\<^isub>3. 0 \<le> \<bar>f x\<^isub>3\<bar> \<longrightarrow> c * \<bar>f x\<^isub>3\<bar> = \<bar>c\<bar> * \<bar>f x\<^isub>3\<bar>" by (metis F2 A1 abs_ge_zero order_trans)
    2.35 @@ -111,7 +111,7 @@
    2.36  proof -
    2.37    fix c :: 'a and x :: 'b
    2.38    assume A1: "\<forall>x. \<bar>h x\<bar> \<le> c * \<bar>f x\<bar>"
    2.39 -  have "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^isub>1 = x\<^isub>1" by (metis normalizing.mul_1)
    2.40 +  have "\<forall>x\<^isub>1\<Colon>'a\<Colon>linordered_idom. 1 * x\<^isub>1 = x\<^isub>1" by (metis mult_1)
    2.41    hence "\<forall>x\<^isub>3. \<bar>c * \<bar>f x\<^isub>3\<bar>\<bar> = c * \<bar>f x\<^isub>3\<bar>"
    2.42      by (metis A1 abs_ge_zero order_trans abs_mult_pos abs_one)
    2.43    hence "\<bar>h x\<bar> \<le> \<bar>c * f x\<bar>" by (metis A1 abs_ge_zero abs_mult_pos abs_mult)
    2.44 @@ -131,26 +131,26 @@
    2.45    apply (rule conjI)
    2.46    apply (rule mult_pos_pos)
    2.47    apply (assumption)+ 
    2.48 -(*sledgehammer*);
    2.49 +(*sledgehammer*)
    2.50    apply (rule allI)
    2.51    apply (drule_tac x = "xa" in spec)+
    2.52 -  apply (subgoal_tac "ca * abs(f xa) <= ca * (c * abs(g xa))");
    2.53 +  apply (subgoal_tac "ca * abs(f xa) <= ca * (c * abs(g xa))")
    2.54    apply (erule order_trans)
    2.55    apply (simp add: mult_ac)
    2.56    apply (rule mult_left_mono, assumption)
    2.57 -  apply (rule order_less_imp_le, assumption);
    2.58 +  apply (rule order_less_imp_le, assumption)
    2.59  done
    2.60  
    2.61  
    2.62  declare [[ atp_problem_prefix = "BigO__bigo_refl" ]]
    2.63  lemma bigo_refl [intro]: "f : O(f)"
    2.64  apply (auto simp add: bigo_def)
    2.65 -by (metis normalizing.mul_1 order_refl)
    2.66 +by (metis mult_1 order_refl)
    2.67  
    2.68  declare [[ atp_problem_prefix = "BigO__bigo_zero" ]]
    2.69  lemma bigo_zero: "0 : O(g)"
    2.70  apply (auto simp add: bigo_def func_zero)
    2.71 -by (metis normalizing.mul_0 order_refl)
    2.72 +by (metis mult_zero_left order_refl)
    2.73  
    2.74  lemma bigo_zero2: "O(%x.0) = {%x.0}"
    2.75    apply (auto simp add: bigo_def) 
    2.76 @@ -237,7 +237,7 @@
    2.77    apply (rule bigo_plus_subset)
    2.78    apply (simp add: bigo_alt_def set_plus_def func_plus)
    2.79    apply clarify 
    2.80 -(*sledgehammer*); 
    2.81 +(*sledgehammer*) 
    2.82    apply (rule_tac x = "max c ca" in exI)
    2.83    apply (rule conjI)
    2.84     apply (metis Orderings.less_max_iff_disj)
    2.85 @@ -307,7 +307,7 @@
    2.86   apply (auto simp add: diff_minus fun_Compl_def func_plus)
    2.87   prefer 2
    2.88   apply (drule_tac x = x in spec)+
    2.89 - apply (metis add_right_mono normalizing.semiring_rules(24) diff_add_cancel diff_minus_eq_add le_less order_trans)
    2.90 + apply (metis add_right_mono add_commute diff_add_cancel diff_minus_eq_add le_less order_trans)
    2.91  proof -
    2.92    fix x :: 'a
    2.93    assume "\<forall>x. lb x \<le> f x"
    2.94 @@ -318,13 +318,13 @@
    2.95  lemma bigo_abs: "(%x. abs(f x)) =o O(f)" 
    2.96  apply (unfold bigo_def)
    2.97  apply auto
    2.98 -by (metis normalizing.mul_1 order_refl)
    2.99 +by (metis mult_1 order_refl)
   2.100  
   2.101  declare [[ atp_problem_prefix = "BigO__bigo_abs2" ]]
   2.102  lemma bigo_abs2: "f =o O(%x. abs(f x))"
   2.103  apply (unfold bigo_def)
   2.104  apply auto
   2.105 -by (metis normalizing.mul_1 order_refl)
   2.106 +by (metis mult_1 order_refl)
   2.107   
   2.108  lemma bigo_abs3: "O(f) = O(%x. abs(f x))"
   2.109  proof -
     3.1 --- a/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy	Tue May 11 08:52:22 2010 +0100
     3.2 +++ b/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy	Tue May 11 19:21:05 2010 +0200
     3.3 @@ -1877,7 +1877,7 @@
     3.4        using assms(3) apply(erule_tac subsetD) unfolding mem_cball dist_commute dist_norm
     3.5        unfolding group_add_class.diff_0 group_add_class.diff_0_right norm_minus_cancel norm_scaleR
     3.6        apply (rule mult_left_le_imp_le[of "1 - u"])
     3.7 -      unfolding normalizing.mul_a using `u<1` by auto
     3.8 +      unfolding mult_assoc[symmetric] using `u<1` by auto
     3.9      thus "y \<in> s" using assms(1)[unfolded convex_def, rule_format, of "inverse(1 - u) *\<^sub>R (y - u *\<^sub>R x)" x "1 - u" u]
    3.10        using as unfolding scaleR_scaleR by auto qed auto
    3.11    thus "u *\<^sub>R x \<in> s - frontier s" using frontier_def and interior_subset by auto qed
     4.1 --- a/src/HOL/Multivariate_Analysis/Derivative.thy	Tue May 11 08:52:22 2010 +0100
     4.2 +++ b/src/HOL/Multivariate_Analysis/Derivative.thy	Tue May 11 19:21:05 2010 +0200
     4.3 @@ -698,7 +698,8 @@
     4.4      unfolding o_def apply(rule,rule has_derivative_lift_dot) using assms(3) by auto
     4.5    then guess x .. note x=this
     4.6    show ?thesis proof(cases "f a = f b")
     4.7 -    case False have "norm (f b - f a) * norm (f b - f a) = norm (f b - f a)^2" by(simp add:normalizing.semiring_rules)
     4.8 +    case False
     4.9 +    have "norm (f b - f a) * norm (f b - f a) = norm (f b - f a)^2" by(simp add: power2_eq_square)
    4.10      also have "\<dots> = (f b - f a) \<bullet> (f b - f a)" unfolding power2_norm_eq_inner ..
    4.11      also have "\<dots> = (f b - f a) \<bullet> f' x (b - a)" using x unfolding inner_simps by auto
    4.12      also have "\<dots> \<le> norm (f b - f a) * norm (f' x (b - a))" by(rule norm_cauchy_schwarz)
     5.1 --- a/src/HOL/Multivariate_Analysis/Integration.thy	Tue May 11 08:52:22 2010 +0100
     5.2 +++ b/src/HOL/Multivariate_Analysis/Integration.thy	Tue May 11 19:21:05 2010 +0200
     5.3 @@ -2533,7 +2533,7 @@
     5.4            show "content x \<ge> 0" unfolding as snd_conv * interval_doublesplit by(rule content_pos_le)
     5.5          qed have **:"norm (1::real) \<le> 1" by auto note division_doublesplit[OF p'',unfolded interval_doublesplit]
     5.6          note dsum_bound[OF this **,unfolded interval_doublesplit[THEN sym]]
     5.7 -        note this[unfolded real_scaleR_def real_norm_def normalizing.semiring_rules, of k c d] note le_less_trans[OF this d(2)]
     5.8 +        note this[unfolded real_scaleR_def real_norm_def mult_1_right mult_1, of k c d] note le_less_trans[OF this d(2)]
     5.9          from this[unfolded abs_of_nonneg[OF *]] show "(\<Sum>ka\<in>snd ` p. content (ka \<inter> {x. \<bar>x $ k - c\<bar> \<le> d})) < e"
    5.10            apply(subst vsum_nonzero_image_lemma[of "snd ` p" content "{}", unfolded o_def,THEN sym])
    5.11            apply(rule finite_imageI p' content_empty)+ unfolding forall_in_division[OF p'']
    5.12 @@ -4723,7 +4723,7 @@
    5.13    have "\<And>e sg dsa dia ig. norm(sg) \<le> dsa \<longrightarrow> abs(dsa - dia) < e / 2 \<longrightarrow> norm(sg - ig) < e / 2
    5.14      \<longrightarrow> norm(ig) < dia + e" 
    5.15    proof safe case goal1 show ?case apply(rule le_less_trans[OF norm_triangle_sub[of ig sg]])
    5.16 -      apply(subst real_sum_of_halves[of e,THEN sym]) unfolding normalizing.add_a
    5.17 +      apply(subst real_sum_of_halves[of e,THEN sym]) unfolding add_assoc[symmetric]
    5.18        apply(rule add_le_less_mono) defer apply(subst norm_minus_commute,rule goal1)
    5.19        apply(rule order_trans[OF goal1(1)]) using goal1(2) by arith
    5.20    qed note norm=this[rule_format]
     6.1 --- a/src/HOL/Probability/Lebesgue.thy	Tue May 11 08:52:22 2010 +0100
     6.2 +++ b/src/HOL/Probability/Lebesgue.thy	Tue May 11 19:21:05 2010 +0200
     6.3 @@ -939,17 +939,17 @@
     6.4    proof safe
     6.5      fix t assume t: "t \<in> space M"
     6.6      { fix m n :: nat assume "m \<le> n"
     6.7 -      hence *: "(2::real)^n = 2^m * 2^(n - m)" unfolding normalizing.mul_pwr by auto
     6.8 +      hence *: "(2::real)^n = 2^m * 2^(n - m)" unfolding power_add[symmetric] by auto
     6.9        have "real (natfloor (f t * 2^m) * natfloor (2^(n-m))) \<le> real (natfloor (f t * 2 ^ n))"
    6.10          apply (subst *)
    6.11 -        apply (subst normalizing.mul_a)
    6.12 +        apply (subst mult_assoc[symmetric])
    6.13          apply (subst real_of_nat_le_iff)
    6.14          apply (rule le_mult_natfloor)
    6.15          using nonneg[OF t] by (auto intro!: mult_nonneg_nonneg)
    6.16        hence "real (natfloor (f t * 2^m)) * 2^n \<le> real (natfloor (f t * 2^n)) * 2^m"
    6.17          apply (subst *)
    6.18 -        apply (subst (3) normalizing.mul_c)
    6.19 -        apply (subst normalizing.mul_a)
    6.20 +        apply (subst (3) mult_commute)
    6.21 +        apply (subst mult_assoc[symmetric])
    6.22          by (auto intro: mult_right_mono simp: natfloor_power real_of_nat_power[symmetric]) }
    6.23      thus "incseq (\<lambda>n. ?u n t)" unfolding u_at_t[OF t] unfolding incseq_def
    6.24        by (auto simp add: le_divide_eq divide_le_eq less_divide_eq)