reduced name variants for assoc and commute on plus and mult
authorhaftmann
Fri Jul 04 20:18:47 2014 +0200 (2014-07-04)
changeset 57512cc97b347b301
parent 57511 de51a86fc903
child 57513 55b2afc5ddfc
reduced name variants for assoc and commute on plus and mult
NEWS
src/Doc/Codegen/Further.thy
src/Doc/Tutorial/Advanced/simp2.thy
src/Doc/Tutorial/Rules/Basic.thy
src/Doc/Tutorial/Types/Numbers.thy
src/Doc/Tutorial/document/numerics.tex
src/Doc/Tutorial/document/rules.tex
src/HOL/Algebra/Coset.thy
src/HOL/Algebra/Exponent.thy
src/HOL/Algebra/Group.thy
src/HOL/Algebra/IntRing.thy
src/HOL/Algebra/UnivPoly.thy
src/HOL/Code_Numeral.thy
src/HOL/Complex.thy
src/HOL/Decision_Procs/Approximation.thy
src/HOL/Decision_Procs/Ferrack.thy
src/HOL/Decision_Procs/MIR.thy
src/HOL/Decision_Procs/Parametric_Ferrante_Rackoff.thy
src/HOL/Decision_Procs/Polynomial_List.thy
src/HOL/Decision_Procs/Rat_Pair.thy
src/HOL/Deriv.thy
src/HOL/Divides.thy
src/HOL/Fact.thy
src/HOL/Fields.thy
src/HOL/GCD.thy
src/HOL/Groups.thy
src/HOL/Groups_Big.thy
src/HOL/HOL.thy
src/HOL/HOLCF/FOCUS/Buffer_adm.thy
src/HOL/Hahn_Banach/Function_Norm.thy
src/HOL/Hahn_Banach/Vector_Space.thy
src/HOL/Hoare_Parallel/RG_Examples.thy
src/HOL/IMP/ACom.thy
src/HOL/IMP/Abs_Int0.thy
src/HOL/IMP/Abs_Int1.thy
src/HOL/IMP/Abs_Int_Den/Abs_Int_den1_ivl.thy
src/HOL/IMP/Abs_Int_ITP/Abs_Int2_ivl_ITP.thy
src/HOL/Int.thy
src/HOL/Isar_Examples/Fibonacci.thy
src/HOL/Library/BigO.thy
src/HOL/Library/Code_Target_Int.thy
src/HOL/Library/Code_Target_Nat.thy
src/HOL/Library/Convex.thy
src/HOL/Library/Extended_Nat.thy
src/HOL/Library/Extended_Real.thy
src/HOL/Library/Float.thy
src/HOL/Library/Formal_Power_Series.thy
src/HOL/Library/Fraction_Field.thy
src/HOL/Library/Fundamental_Theorem_Algebra.thy
src/HOL/Library/Inner_Product.thy
src/HOL/Library/Lattice_Algebras.thy
src/HOL/Library/ListVector.thy
src/HOL/Library/Multiset.thy
src/HOL/Library/Nat_Bijection.thy
src/HOL/Library/Polynomial.thy
src/HOL/Library/Product_plus.thy
src/HOL/Library/RBT_Impl.thy
src/HOL/Library/Saturated.thy
src/HOL/Library/Set_Algebras.thy
src/HOL/Limits.thy
src/HOL/List.thy
src/HOL/Matrix_LP/Matrix.thy
src/HOL/Metis_Examples/Big_O.thy
src/HOL/Metis_Examples/Binary_Tree.thy
src/HOL/MicroJava/Comp/CorrComp.thy
src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy
src/HOL/Multivariate_Analysis/Derivative.thy
src/HOL/Multivariate_Analysis/Determinants.thy
src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy
src/HOL/Multivariate_Analysis/Integration.thy
src/HOL/Multivariate_Analysis/Linear_Algebra.thy
src/HOL/Multivariate_Analysis/Operator_Norm.thy
src/HOL/Multivariate_Analysis/PolyRoots.thy
src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy
src/HOL/NSA/CLim.thy
src/HOL/NSA/Examples/NSPrimes.thy
src/HOL/NSA/HDeriv.thy
src/HOL/NSA/HLim.thy
src/HOL/NSA/HTranscendental.thy
src/HOL/NSA/HyperNat.thy
src/HOL/NSA/NSA.thy
src/HOL/NSA/NSCA.thy
src/HOL/NSA/StarDef.thy
src/HOL/Nat.thy
src/HOL/Nominal/Examples/Standardization.thy
src/HOL/NthRoot.thy
src/HOL/Num.thy
src/HOL/Number_Theory/Binomial.thy
src/HOL/Number_Theory/Cong.thy
src/HOL/Number_Theory/Eratosthenes.thy
src/HOL/Number_Theory/Fib.thy
src/HOL/Number_Theory/Gauss.thy
src/HOL/Number_Theory/Pocklington.thy
src/HOL/Number_Theory/Primes.thy
src/HOL/Number_Theory/Residues.thy
src/HOL/Old_Number_Theory/Euler.thy
src/HOL/Old_Number_Theory/Factorization.thy
src/HOL/Old_Number_Theory/Fib.thy
src/HOL/Old_Number_Theory/Gauss.thy
src/HOL/Old_Number_Theory/Int2.thy
src/HOL/Old_Number_Theory/IntPrimes.thy
src/HOL/Old_Number_Theory/Legacy_GCD.thy
src/HOL/Old_Number_Theory/Pocklington.thy
src/HOL/Old_Number_Theory/Primes.thy
src/HOL/Old_Number_Theory/Quadratic_Reciprocity.thy
src/HOL/Old_Number_Theory/WilsonBij.thy
src/HOL/Old_Number_Theory/WilsonRuss.thy
src/HOL/Power.thy
src/HOL/Presburger.thy
src/HOL/Probability/Bochner_Integration.thy
src/HOL/Probability/Convolution.thy
src/HOL/Probability/Distributions.thy
src/HOL/Probability/Finite_Product_Measure.thy
src/HOL/Probability/Independent_Family.thy
src/HOL/Probability/Infinite_Product_Measure.thy
src/HOL/Probability/Lebesgue_Measure.thy
src/HOL/Probability/Nonnegative_Lebesgue_Integration.thy
src/HOL/Probability/Sigma_Algebra.thy
src/HOL/Proofs/Extraction/Euclid.thy
src/HOL/Proofs/Extraction/Greatest_Common_Divisor.thy
src/HOL/Proofs/Lambda/ListApplication.thy
src/HOL/Quotient_Examples/Int_Pow.thy
src/HOL/Quotient_Examples/Quotient_Rat.thy
src/HOL/Rat.thy
src/HOL/Real.thy
src/HOL/Real_Vector_Spaces.thy
src/HOL/Rings.thy
src/HOL/Set_Interval.thy
src/HOL/String.thy
src/HOL/Tools/numeral_simprocs.ML
src/HOL/Transcendental.thy
src/HOL/Word/Misc_Numeric.thy
src/HOL/Word/Word.thy
src/HOL/Word/WordBitwise.thy
src/HOL/Word/Word_Miscellaneous.thy
src/HOL/ex/Adhoc_Overloading_Examples.thy
src/HOL/ex/Dedekind_Real.thy
src/HOL/ex/Gauge_Integration.thy
src/HOL/ex/ThreeDivides.thy
     1.1 --- a/NEWS	Fri Jul 04 20:07:08 2014 +0200
     1.2 +++ b/NEWS	Fri Jul 04 20:18:47 2014 +0200
     1.3 @@ -221,6 +221,22 @@
     1.4  * The symbol "\<newline>" may be used within char or string literals
     1.5  to represent (Char Nibble0 NibbleA), i.e. ASCII newline.
     1.6  
     1.7 +* Reduced name variants for rules on associativity and commutativity:
     1.8 +
     1.9 +    add_assoc ~> add.assoc
    1.10 +    add_commute ~> add.commute
    1.11 +    add_left_commute ~> add.left_commute
    1.12 +    mult_assoc ~> mult.assoc
    1.13 +    mult_commute ~> mult.commute
    1.14 +    mult_left_commute ~> mult.left_commute
    1.15 +    nat_add_assoc ~> add.assoc
    1.16 +    nat_add_commute ~> add.commute
    1.17 +    nat_add_left_commute ~> add.left_commute
    1.18 +    nat_mult_assoc ~> mult.assoc
    1.19 +    nat_mult_commute ~> mult.commute
    1.20 +    eq_assoc ~> iff_assoc
    1.21 +    eq_left_commute ~> iff_left_commute
    1.22 +
    1.23  * Qualified String.implode and String.explode.  INCOMPATIBILITY.
    1.24  
    1.25  * Simplifier: Enhanced solver of preconditions of rewrite rules can
     2.1 --- a/src/Doc/Codegen/Further.thy	Fri Jul 04 20:07:08 2014 +0200
     2.2 +++ b/src/Doc/Codegen/Further.thy	Fri Jul 04 20:18:47 2014 +0200
     2.3 @@ -205,7 +205,7 @@
     2.4  interpretation %quote fun_power: power "\<lambda>n (f :: 'a \<Rightarrow> 'a). f ^^ n" where
     2.5    "power.powers (\<lambda>n f. f ^^ n) = funpows"
     2.6    by unfold_locales
     2.7 -    (simp_all add: fun_eq_iff funpow_mult mult_commute funpows_def)
     2.8 +    (simp_all add: fun_eq_iff funpow_mult mult.commute funpows_def)
     2.9  
    2.10  text {*
    2.11    \noindent This additional equation is trivially proved by the
     3.1 --- a/src/Doc/Tutorial/Advanced/simp2.thy	Fri Jul 04 20:07:08 2014 +0200
     3.2 +++ b/src/Doc/Tutorial/Advanced/simp2.thy	Fri Jul 04 20:18:47 2014 +0200
     3.3 @@ -130,7 +130,7 @@
     3.4  Each occurrence of an unknown is of the form
     3.5  $\Var{f}~x@1~\dots~x@n$, where the $x@i$ are distinct bound
     3.6  variables. Thus all ordinary rewrite rules, where all unknowns are
     3.7 -of base type, for example @{thm add_assoc}, are acceptable: if an unknown is
     3.8 +of base type, for example @{thm add.assoc}, are acceptable: if an unknown is
     3.9  of base type, it cannot have any arguments. Additionally, the rule
    3.10  @{text"(\<forall>x. ?P x \<and> ?Q x) = ((\<forall>x. ?P x) \<and> (\<forall>x. ?Q x))"} is also acceptable, in
    3.11  both directions: all arguments of the unknowns @{text"?P"} and
     4.1 --- a/src/Doc/Tutorial/Rules/Basic.thy	Fri Jul 04 20:07:08 2014 +0200
     4.2 +++ b/src/Doc/Tutorial/Rules/Basic.thy	Fri Jul 04 20:18:47 2014 +0200
     4.3 @@ -64,11 +64,11 @@
     4.4  text {*
     4.5  the subst method
     4.6  
     4.7 -@{thm[display] mult_commute}
     4.8 -\rulename{mult_commute}
     4.9 +@{thm[display] mult.commute}
    4.10 +\rulename{mult.commute}
    4.11  
    4.12  this would fail:
    4.13 -apply (simp add: mult_commute) 
    4.14 +apply (simp add: mult.commute) 
    4.15  *}
    4.16  
    4.17  
    4.18 @@ -76,7 +76,7 @@
    4.19  txt{*
    4.20  @{subgoals[display,indent=0,margin=65]}
    4.21  *}
    4.22 -apply (subst mult_commute) 
    4.23 +apply (subst mult.commute) 
    4.24  txt{*
    4.25  @{subgoals[display,indent=0,margin=65]}
    4.26  *}
    4.27 @@ -84,7 +84,7 @@
    4.28  
    4.29  (*exercise involving THEN*)
    4.30  lemma "\<lbrakk>P x y z; Suc x < y\<rbrakk> \<Longrightarrow> f z = x*y"
    4.31 -apply (rule mult_commute [THEN ssubst]) 
    4.32 +apply (rule mult.commute [THEN ssubst]) 
    4.33  oops
    4.34  
    4.35  
     5.1 --- a/src/Doc/Tutorial/Types/Numbers.thy	Fri Jul 04 20:07:08 2014 +0200
     5.2 +++ b/src/Doc/Tutorial/Types/Numbers.thy	Fri Jul 04 20:18:47 2014 +0200
     5.3 @@ -31,14 +31,14 @@
     5.4  @{thm[display] add_2_eq_Suc'[no_vars]}
     5.5  \rulename{add_2_eq_Suc'}
     5.6  
     5.7 -@{thm[display] add_assoc[no_vars]}
     5.8 -\rulename{add_assoc}
     5.9 +@{thm[display] add.assoc[no_vars]}
    5.10 +\rulename{add.assoc}
    5.11  
    5.12 -@{thm[display] add_commute[no_vars]}
    5.13 -\rulename{add_commute}
    5.14 +@{thm[display] add.commute[no_vars]}
    5.15 +\rulename{add.commute}
    5.16  
    5.17 -@{thm[display] add_left_commute[no_vars]}
    5.18 -\rulename{add_left_commute}
    5.19 +@{thm[display] add.left_commute[no_vars]}
    5.20 +\rulename{add.left_commute}
    5.21  
    5.22  these form add_ac; similarly there is mult_ac
    5.23  *}
     6.1 --- a/src/Doc/Tutorial/document/numerics.tex	Fri Jul 04 20:07:08 2014 +0200
     6.2 +++ b/src/Doc/Tutorial/document/numerics.tex	Fri Jul 04 20:18:47 2014 +0200
     6.3 @@ -20,7 +20,7 @@
     6.4  infix symbols. Algebraic properties are organized using type classes
     6.5  around algebraic concepts such as rings and fields;
     6.6  a property such as the commutativity of addition is a single theorem 
     6.7 -(\isa{add_commute}) that applies to all numeric types.
     6.8 +(\isa{add.commute}) that applies to all numeric types.
     6.9  
    6.10  \index{linear arithmetic}%
    6.11  Many theorems involving numeric types can be proved automatically by
    6.12 @@ -441,11 +441,11 @@
    6.13  the two expressions identical.
    6.14  \begin{isabelle}
    6.15  a\ +\ b\ +\ c\ =\ a\ +\ (b\ +\ c)
    6.16 -\rulenamedx{add_assoc}\isanewline
    6.17 +\rulenamedx{add.assoc}\isanewline
    6.18  a\ +\ b\ =\ b\ +\ a%
    6.19 -\rulenamedx{add_commute}\isanewline
    6.20 +\rulenamedx{add.commute}\isanewline
    6.21  a\ +\ (b\ +\ c)\ =\ b\ +\ (a\ +\ c)
    6.22 -\rulename{add_left_commute}
    6.23 +\rulename{add.left_commute}
    6.24  \end{isabelle}
    6.25  The name \isa{add_ac}\index{*add_ac (theorems)} 
    6.26  refers to the list of all three theorems; similarly
     7.1 --- a/src/Doc/Tutorial/document/rules.tex	Fri Jul 04 20:07:08 2014 +0200
     7.2 +++ b/src/Doc/Tutorial/document/rules.tex	Fri Jul 04 20:18:47 2014 +0200
     7.3 @@ -751,11 +751,11 @@
     7.4  Now we wish to apply a commutative law:
     7.5  \begin{isabelle}
     7.6  ?m\ *\ ?n\ =\ ?n\ *\ ?m%
     7.7 -\rulename{mult_commute}
     7.8 +\rulename{mult.commute}
     7.9  \end{isabelle}
    7.10  Isabelle rejects our first attempt:
    7.11  \begin{isabelle}
    7.12 -apply (simp add: mult_commute)
    7.13 +apply (simp add: mult.commute)
    7.14  \end{isabelle}
    7.15  The simplifier notices the danger of looping and refuses to apply the
    7.16  rule.%
    7.17 @@ -764,9 +764,9 @@
    7.18  is already smaller than
    7.19  \isa{y\ *\ x}.}
    7.20  %
    7.21 -The \isa{subst} method applies \isa{mult_commute} exactly once.  
    7.22 +The \isa{subst} method applies \isa{mult.commute} exactly once.  
    7.23  \begin{isabelle}
    7.24 -\isacommand{apply}\ (subst\ mult_commute)\isanewline
    7.25 +\isacommand{apply}\ (subst\ mult.commute)\isanewline
    7.26  \ 1.\ \isasymlbrakk P\ x\ y\ z;\ Suc\ x\ <\ y\isasymrbrakk \
    7.27  \isasymLongrightarrow \ f\ z\ =\ y\ *\ x%
    7.28  \end{isabelle}
    7.29 @@ -775,7 +775,7 @@
    7.30  \medskip
    7.31  This use of the \methdx{subst} method has the same effect as the command
    7.32  \begin{isabelle}
    7.33 -\isacommand{apply}\ (rule\ mult_commute [THEN ssubst])
    7.34 +\isacommand{apply}\ (rule\ mult.commute [THEN ssubst])
    7.35  \end{isabelle}
    7.36  The attribute \isa{THEN}, which combines two rules, is described in 
    7.37  {\S}\ref{sec:THEN} below. The \methdx{subst} method is more powerful than
    7.38 @@ -1986,9 +1986,9 @@
    7.39  %  exercise worth including? E.g. find a difference between the two ways
    7.40  %  of substituting.
    7.41  %\begin{exercise}
    7.42 -%In {\S}\ref{sec:subst} the method \isa{subst\ mult_commute} was applied.  How
    7.43 +%In {\S}\ref{sec:subst} the method \isa{subst\ mult.commute} was applied.  How
    7.44  %can we achieve the same effect using \isa{THEN} with the rule \isa{ssubst}?
    7.45 -%% answer  rule (mult_commute [THEN ssubst])
    7.46 +%% answer  rule (mult.commute [THEN ssubst])
    7.47  %\end{exercise}
    7.48  
    7.49  \subsection{Modifying a Theorem using {\tt\slshape OF}}
     8.1 --- a/src/HOL/Algebra/Coset.thy	Fri Jul 04 20:07:08 2014 +0200
     8.2 +++ b/src/HOL/Algebra/Coset.thy	Fri Jul 04 20:18:47 2014 +0200
     8.3 @@ -815,7 +815,7 @@
     8.4       "\<lbrakk>finite(carrier G); subgroup H G\<rbrakk>
     8.5        \<Longrightarrow> card(rcosets H) * card(H) = order(G)"
     8.6  apply (simp (no_asm_simp) add: order_def rcosets_part_G [symmetric])
     8.7 -apply (subst mult_commute)
     8.8 +apply (subst mult.commute)
     8.9  apply (rule card_partition)
    8.10     apply (simp add: rcosets_subset_PowG [THEN finite_subset])
    8.11    apply (simp add: rcosets_part_G)
     9.1 --- a/src/HOL/Algebra/Exponent.thy	Fri Jul 04 20:07:08 2014 +0200
     9.2 +++ b/src/HOL/Algebra/Exponent.thy	Fri Jul 04 20:18:47 2014 +0200
     9.3 @@ -80,7 +80,7 @@
     9.4  lemma div_combine:
     9.5    fixes p::nat
     9.6    shows "[| prime p; ~ (p ^ (Suc r) dvd n);  p^(a+r) dvd n*k |] ==> p ^ a dvd k"
     9.7 -by (metis add_Suc nat_add_commute prime_power_dvd_cases)
     9.8 +by (metis add_Suc add.commute prime_power_dvd_cases)
     9.9  
    9.10  (*Lemma for power_dvd_bound*)
    9.11  lemma Suc_le_power: "Suc 0 < p ==> Suc n <= p^n"
    9.12 @@ -185,7 +185,7 @@
    9.13  text{*Main Combinatorial Argument*}
    9.14  
    9.15  lemma gcd_mult': fixes a::nat shows "gcd b (a * b) = b"
    9.16 -by (simp add: mult_commute[of a b]) 
    9.17 +by (simp add: mult.commute[of a b]) 
    9.18  
    9.19  lemma le_extend_mult: "[| c > 0; a <= b |] ==> a <= b * (c::nat)"
    9.20  apply (rule_tac P = "%x. x <= b * c" in subst)
    9.21 @@ -201,7 +201,7 @@
    9.22  apply (drule less_imp_le [of a])
    9.23  apply (drule le_imp_power_dvd)
    9.24  apply (drule_tac b = "p ^ r" in dvd_trans, assumption)
    9.25 -apply (metis diff_is_0_eq dvd_diffD1 gcd_dvd2_nat gcd_mult' gr0I le_extend_mult less_diff_conv nat_dvd_not_less nat_mult_commute not_add_less2 xt1(10))
    9.26 +apply (metis diff_is_0_eq dvd_diffD1 gcd_dvd2_nat gcd_mult' gr0I le_extend_mult less_diff_conv nat_dvd_not_less mult.commute not_add_less2 xt1(10))
    9.27  done
    9.28  
    9.29  lemma p_fac_forw: "[| (m::nat) > 0; k>0; k < p^a; (p^r) dvd (p^a)* m - k |]  
    10.1 --- a/src/HOL/Algebra/Group.thy	Fri Jul 04 20:07:08 2014 +0200
    10.2 +++ b/src/HOL/Algebra/Group.thy	Fri Jul 04 20:18:47 2014 +0200
    10.3 @@ -211,7 +211,7 @@
    10.4  
    10.5  lemma (in monoid) nat_pow_pow:
    10.6    "x \<in> carrier G ==> (x (^) n) (^) m = x (^) (n * m::nat)"
    10.7 -  by (induct m) (simp, simp add: nat_pow_mult add_commute)
    10.8 +  by (induct m) (simp, simp add: nat_pow_mult add.commute)
    10.9  
   10.10  
   10.11  (* Jacobson defines submonoid here. *)
    11.1 --- a/src/HOL/Algebra/IntRing.thy	Fri Jul 04 20:07:08 2014 +0200
    11.2 +++ b/src/HOL/Algebra/IntRing.thy	Fri Jul 04 20:18:47 2014 +0200
    11.3 @@ -271,11 +271,11 @@
    11.4    then have "p dvd a \<or> p dvd b"
    11.5      by (metis prime prime_dvd_mult_eq_int)
    11.6    then show "(\<exists>x. a = x * int p) \<or> (\<exists>x. b = x * int p)"
    11.7 -    by (metis dvd_def mult_commute)
    11.8 +    by (metis dvd_def mult.commute)
    11.9  next
   11.10    assume "UNIV = {uu. EX x. uu = x * int p}"
   11.11    then obtain x where "1 = x * int p" by best
   11.12 -  then have "\<bar>int p * x\<bar> = 1" by (simp add: mult_commute)
   11.13 +  then have "\<bar>int p * x\<bar> = 1" by (simp add: mult.commute)
   11.14    then show False
   11.15      by (metis abs_of_nat int_1 of_nat_eq_iff abs_zmult_eq_1 one_not_prime_nat prime)
   11.16  qed
    12.1 --- a/src/HOL/Algebra/UnivPoly.thy	Fri Jul 04 20:07:08 2014 +0200
    12.2 +++ b/src/HOL/Algebra/UnivPoly.thy	Fri Jul 04 20:18:47 2014 +0200
    12.3 @@ -1353,7 +1353,7 @@
    12.4    case 0 from R show ?case by simp
    12.5  next
    12.6    case Suc with R show ?case
    12.7 -    by (simp del: monom_mult add: monom_mult [THEN sym] add_commute)
    12.8 +    by (simp del: monom_mult add: monom_mult [THEN sym] add.commute)
    12.9  qed
   12.10  
   12.11  lemma (in ring_hom_cring) hom_pow [simp]:
    13.1 --- a/src/HOL/Code_Numeral.thy	Fri Jul 04 20:07:08 2014 +0200
    13.2 +++ b/src/HOL/Code_Numeral.thy	Fri Jul 04 20:18:47 2014 +0200
    13.3 @@ -494,7 +494,7 @@
    13.4      show "k = integer_of_int (int_of_integer k)" by simp
    13.5    qed
    13.6    moreover have "2 * (j div 2) = j - j mod 2"
    13.7 -    by (simp add: zmult_div_cancel mult_commute)
    13.8 +    by (simp add: zmult_div_cancel mult.commute)
    13.9    ultimately show ?thesis
   13.10      by (auto simp add: split_def Let_def mod_integer_def nat_of_integer_def not_le
   13.11        nat_add_distrib [symmetric] Suc_nat_eq_nat_zadd1)
    14.1 --- a/src/HOL/Complex.thy	Fri Jul 04 20:07:08 2014 +0200
    14.2 +++ b/src/HOL/Complex.thy	Fri Jul 04 20:18:47 2014 +0200
    14.3 @@ -118,7 +118,7 @@
    14.4    show "scaleR (a + b) x = scaleR a x + scaleR b x"
    14.5      by (simp add: complex_eq_iff distrib_right)
    14.6    show "scaleR a (scaleR b x) = scaleR (a * b) x"
    14.7 -    by (simp add: complex_eq_iff mult_assoc)
    14.8 +    by (simp add: complex_eq_iff mult.assoc)
    14.9    show "scaleR 1 x = x"
   14.10      by (simp add: complex_eq_iff)
   14.11    show "scaleR a x * y = scaleR a (x * y)"
   14.12 @@ -190,7 +190,7 @@
   14.13    by (simp add: divide_complex_def)
   14.14  
   14.15  lemma complex_i_mult_minus [simp]: "ii * (ii * x) = - x"
   14.16 -  by (simp add: mult_assoc [symmetric])
   14.17 +  by (simp add: mult.assoc [symmetric])
   14.18  
   14.19  lemma complex_i_not_zero [simp]: "ii \<noteq> 0"
   14.20    by (simp add: complex_eq_iff)
   14.21 @@ -298,14 +298,14 @@
   14.22    apply (rule abs_sqrt_wlog [where x="Re z"])
   14.23    apply (rule abs_sqrt_wlog [where x="Im z"])
   14.24    apply (rule power2_le_imp_le)
   14.25 -  apply (simp_all add: power2_sum add_commute sum_squares_bound real_sqrt_mult [symmetric])
   14.26 +  apply (simp_all add: power2_sum add.commute sum_squares_bound real_sqrt_mult [symmetric])
   14.27    done
   14.28  
   14.29  
   14.30  text {* Properties of complex signum. *}
   14.31  
   14.32  lemma sgn_eq: "sgn z = z / complex_of_real (cmod z)"
   14.33 -  by (simp add: sgn_div_norm divide_inverse scaleR_conv_of_real mult_commute)
   14.34 +  by (simp add: sgn_div_norm divide_inverse scaleR_conv_of_real mult.commute)
   14.35  
   14.36  lemma Re_sgn [simp]: "Re(sgn z) = Re(z)/cmod z"
   14.37    by (simp add: complex_sgn_def divide_inverse)
   14.38 @@ -703,7 +703,7 @@
   14.39  
   14.40  lemma complex_expi_Ex: "\<exists>a r. z = complex_of_real r * expi a"
   14.41  apply (insert rcis_Ex [of z])
   14.42 -apply (auto simp add: expi_def rcis_def mult_assoc [symmetric])
   14.43 +apply (auto simp add: expi_def rcis_def mult.assoc [symmetric])
   14.44  apply (rule_tac x = "ii * complex_of_real a" in exI, auto)
   14.45  done
   14.46  
    15.1 --- a/src/HOL/Decision_Procs/Approximation.thy	Fri Jul 04 20:07:08 2014 +0200
    15.2 +++ b/src/HOL/Decision_Procs/Approximation.thy	Fri Jul 04 20:18:47 2014 +0200
    15.3 @@ -247,7 +247,7 @@
    15.4          unfolding real_sqrt_mult[of _ "2 powr (?E mod 2)"] real_sqrt_abs2 by auto
    15.5        also have "\<dots> < 2 powr (?E div 2) * 2 powr 1"
    15.6          by (rule mult_strict_left_mono, auto intro: E_mod_pow)
    15.7 -      also have "\<dots> = 2 powr (?E div 2 + 1)" unfolding add_commute[of _ 1] powr_add[symmetric]
    15.8 +      also have "\<dots> = 2 powr (?E div 2 + 1)" unfolding add.commute[of _ 1] powr_add[symmetric]
    15.9          by simp
   15.10        finally show ?thesis by auto
   15.11      qed
   15.12 @@ -386,8 +386,8 @@
   15.13  
   15.14    { have "(x * lb_arctan_horner prec n 1 (x*x)) \<le> ?S n"
   15.15        using bounds(1) `0 \<le> real x`
   15.16 -      unfolding power_add power_one_right mult_assoc[symmetric] setsum_left_distrib[symmetric]
   15.17 -      unfolding mult_commute[where 'a=real] mult_commute[of _ "2::nat"] power_mult power2_eq_square[of "real x"]
   15.18 +      unfolding power_add power_one_right mult.assoc[symmetric] setsum_left_distrib[symmetric]
   15.19 +      unfolding mult.commute[where 'a=real] mult.commute[of _ "2::nat"] power_mult power2_eq_square[of "real x"]
   15.20        by (auto intro!: mult_left_mono)
   15.21      also have "\<dots> \<le> arctan x" using arctan_bounds ..
   15.22      finally have "(x * lb_arctan_horner prec n 1 (x*x)) \<le> arctan x" . }
   15.23 @@ -395,8 +395,8 @@
   15.24    { have "arctan x \<le> ?S (Suc n)" using arctan_bounds ..
   15.25      also have "\<dots> \<le> (x * ub_arctan_horner prec (Suc n) 1 (x*x))"
   15.26        using bounds(2)[of "Suc n"] `0 \<le> real x`
   15.27 -      unfolding power_add power_one_right mult_assoc[symmetric] setsum_left_distrib[symmetric]
   15.28 -      unfolding mult_commute[where 'a=real] mult_commute[of _ "2::nat"] power_mult power2_eq_square[of "real x"]
   15.29 +      unfolding power_add power_one_right mult.assoc[symmetric] setsum_left_distrib[symmetric]
   15.30 +      unfolding mult.commute[where 'a=real] mult.commute[of _ "2::nat"] power_mult power2_eq_square[of "real x"]
   15.31        by (auto intro!: mult_left_mono)
   15.32      finally have "arctan x \<le> (x * ub_arctan_horner prec (Suc n) 1 (x*x))" . }
   15.33    ultimately show ?thesis by auto
   15.34 @@ -842,8 +842,8 @@
   15.35    from horner_bounds[where lb="lb_sin_cos_aux prec" and ub="ub_sin_cos_aux prec" and j'=0,
   15.36      OF `0 \<le> real (x * x)` f_eq lb_sin_cos_aux.simps ub_sin_cos_aux.simps]
   15.37    show "?lb" and "?ub" using `0 \<le> real x`
   15.38 -    unfolding power_add power_one_right mult_assoc[symmetric] setsum_left_distrib[symmetric]
   15.39 -    unfolding mult_commute[where 'a=real]
   15.40 +    unfolding power_add power_one_right mult.assoc[symmetric] setsum_left_distrib[symmetric]
   15.41 +    unfolding mult.commute[where 'a=real]
   15.42      by (auto intro!: mult_left_mono simp add: power_mult power2_eq_square[of "real x"])
   15.43  qed
   15.44  
   15.45 @@ -1597,7 +1597,7 @@
   15.46    { fix n have "?a (Suc n) \<le> ?a n" unfolding inverse_eq_divide[symmetric]
   15.47      proof (rule mult_mono)
   15.48        show "0 \<le> x ^ Suc (Suc n)" by (auto simp add: `0 \<le> x`)
   15.49 -      have "x ^ Suc (Suc n) \<le> x ^ Suc n * 1" unfolding power_Suc2 mult_assoc[symmetric]
   15.50 +      have "x ^ Suc (Suc n) \<le> x ^ Suc n * 1" unfolding power_Suc2 mult.assoc[symmetric]
   15.51          by (rule mult_left_mono, fact less_imp_le[OF `x < 1`], auto simp: `0 \<le> x`)
   15.52        thus "x ^ Suc (Suc n) \<le> x ^ Suc n" by auto
   15.53      qed auto }
   15.54 @@ -1615,7 +1615,7 @@
   15.55  
   15.56    let "?s n" = "-1^n * (1 / real (1 + n)) * (real x)^(Suc n)"
   15.57  
   15.58 -  have "?lb \<le> setsum ?s {0 ..< 2 * ev}" unfolding power_Suc2 mult_assoc[symmetric] times_float.rep_eq setsum_left_distrib[symmetric] unfolding mult_commute[of "real x"] ev
   15.59 +  have "?lb \<le> setsum ?s {0 ..< 2 * ev}" unfolding power_Suc2 mult.assoc[symmetric] times_float.rep_eq setsum_left_distrib[symmetric] unfolding mult.commute[of "real x"] ev
   15.60      using horner_bounds(1)[where G="\<lambda> i k. Suc k" and F="\<lambda>x. x" and f="\<lambda>x. x" and lb="\<lambda>n i k x. lb_ln_horner prec n k x" and ub="\<lambda>n i k x. ub_ln_horner prec n k x" and j'=1 and n="2*ev",
   15.61        OF `0 \<le> real x` refl lb_ln_horner.simps ub_ln_horner.simps] `0 \<le> real x`
   15.62      by (rule mult_right_mono)
   15.63 @@ -1623,7 +1623,7 @@
   15.64    finally show "?lb \<le> ?ln" .
   15.65  
   15.66    have "?ln \<le> setsum ?s {0 ..< 2 * od + 1}" using ln_bounds(2)[OF `0 \<le> real x` `real x < 1`] by auto
   15.67 -  also have "\<dots> \<le> ?ub" unfolding power_Suc2 mult_assoc[symmetric] times_float.rep_eq setsum_left_distrib[symmetric] unfolding mult_commute[of "real x"] od
   15.68 +  also have "\<dots> \<le> ?ub" unfolding power_Suc2 mult.assoc[symmetric] times_float.rep_eq setsum_left_distrib[symmetric] unfolding mult.commute[of "real x"] od
   15.69      using horner_bounds(2)[where G="\<lambda> i k. Suc k" and F="\<lambda>x. x" and f="\<lambda>x. x" and lb="\<lambda>n i k x. lb_ln_horner prec n k x" and ub="\<lambda>n i k x. ub_ln_horner prec n k x" and j'=1 and n="2*od+1",
   15.70        OF `0 \<le> real x` refl lb_ln_horner.simps ub_ln_horner.simps] `0 \<le> real x`
   15.71      by (rule mult_right_mono)
   15.72 @@ -2961,7 +2961,7 @@
   15.73                 inverse (real (\<Prod> j \<in> {k..<k+Suc n}. j)) * ?f (Suc n) t * (xs!x - c)^Suc n" (is "_ = ?T")
   15.74          unfolding funpow_Suc C_def[symmetric] setsum_move0 setprod_head_Suc
   15.75          by (auto simp add: algebra_simps)
   15.76 -          (simp only: mult_left_commute [of _ "inverse (real k)"] setsum_right_distrib [symmetric])
   15.77 +          (simp only: mult.left_commute [of _ "inverse (real k)"] setsum_right_distrib [symmetric])
   15.78        finally have "?T \<in> {l .. u}" .
   15.79      }
   15.80      thus ?thesis using DERIV by blast
    16.1 --- a/src/HOL/Decision_Procs/Ferrack.thy	Fri Jul 04 20:07:08 2014 +0200
    16.2 +++ b/src/HOL/Decision_Procs/Ferrack.thy	Fri Jul 04 20:18:47 2014 +0200
    16.3 @@ -1407,7 +1407,7 @@
    16.4    then obtain s m where smU: "(s,m) \<in> set (uset p)" and mx: "real m * x \<ge> ?N a s" by blast
    16.5    from uset_l[OF lp] smU have mp: "real m > 0" by auto
    16.6    from pos_divide_le_eq[OF mp, where a="x" and b="?N a s", symmetric] mx have "x \<ge> ?N a s / real m" 
    16.7 -    by (auto simp add: mult_commute)
    16.8 +    by (auto simp add: mult.commute)
    16.9    thus ?thesis using smU by auto
   16.10  qed
   16.11  
   16.12 @@ -1423,7 +1423,7 @@
   16.13    then obtain s m where smU: "(s,m) \<in> set (uset p)" and mx: "real m * x \<le> ?N a s" by blast
   16.14    from uset_l[OF lp] smU have mp: "real m > 0" by auto
   16.15    from pos_le_divide_eq[OF mp, where a="x" and b="?N a s", symmetric] mx have "x \<le> ?N a s / real m" 
   16.16 -    by (auto simp add: mult_commute)
   16.17 +    by (auto simp add: mult.commute)
   16.18    thus ?thesis using smU by auto
   16.19  qed
   16.20  
   16.21 @@ -1674,7 +1674,7 @@
   16.22        with uset_l[OF lp] have tnb: "numbound0 t" and np:"real n > 0" and snb: "numbound0 s" and mp:"real m > 0"
   16.23          by auto
   16.24        let ?st = "Add (Mul m t) (Mul n s)"
   16.25 -      from np mp have mnp: "real (2*n*m) > 0" by (simp add: mult_commute)
   16.26 +      from np mp have mnp: "real (2*n*m) > 0" by (simp add: mult.commute)
   16.27        from tnb snb have st_nb: "numbound0 ?st" by simp
   16.28        have st: "(?N t / real n + ?N s / real m)/2 = ?N ?st / real (2*n*m)"
   16.29          using mnp mp np by (simp add: algebra_simps add_divide_distrib)
   16.30 @@ -1690,7 +1690,7 @@
   16.31      and px:"?I x (usubst p (Add (Mul l t) (Mul k s), 2*k*l))"
   16.32      with uset_l[OF lp] have tnb: "numbound0 t" and np:"real k > 0" and snb: "numbound0 s" and mp:"real l > 0" by auto
   16.33      let ?st = "Add (Mul l t) (Mul k s)"
   16.34 -    from np mp have mnp: "real (2*k*l) > 0" by (simp add: mult_commute)
   16.35 +    from np mp have mnp: "real (2*k*l) > 0" by (simp add: mult.commute)
   16.36      from tnb snb have st_nb: "numbound0 ?st" by simp
   16.37      from usubst_I[OF lp mnp st_nb, where bs="bs"] px have "?E" by auto}
   16.38    ultimately show "?E" by blast
   16.39 @@ -1729,7 +1729,7 @@
   16.40           (set U \<times> set U)"using mnz nnz th  
   16.41      apply (auto simp add: th add_divide_distrib algebra_simps split_def image_def)
   16.42      by (rule_tac x="(s,m)" in bexI,simp_all) 
   16.43 -  (rule_tac x="(t,n)" in bexI,simp_all add: mult_commute)
   16.44 +  (rule_tac x="(t,n)" in bexI,simp_all add: mult.commute)
   16.45  next
   16.46    fix t n s m
   16.47    assume tnU: "(t,n) \<in> set U" and smU:"(s,m) \<in> set U" 
   16.48 @@ -1778,7 +1778,7 @@
   16.49      and snb: "numbound0 s" and mp:"m > 0"  by auto
   16.50    let ?st= "Add (Mul m t) (Mul n s)"
   16.51    from np mp have mnp: "real (2*n*m) > 0" 
   16.52 -      by (simp add: mult_commute real_of_int_mult[symmetric] del: real_of_int_mult)
   16.53 +      by (simp add: mult.commute real_of_int_mult[symmetric] del: real_of_int_mult)
   16.54      from tnb snb have stnb: "numbound0 ?st" by simp
   16.55    have st: "(?N t / real n + ?N s / real m)/2 = ?N ?st / real (2*n*m)"
   16.56     using mp np by (simp add: algebra_simps add_divide_distrib)
   16.57 @@ -1806,7 +1806,7 @@
   16.58      and snb: "numbound0 s" and mp:"m > 0"  by auto
   16.59    let ?st= "Add (Mul m t) (Mul n s)"
   16.60    from np mp have mnp: "real (2*n*m) > 0" 
   16.61 -      by (simp add: mult_commute real_of_int_mult[symmetric] del: real_of_int_mult)
   16.62 +      by (simp add: mult.commute real_of_int_mult[symmetric] del: real_of_int_mult)
   16.63      from tnb snb have stnb: "numbound0 ?st" by simp
   16.64    have st: "(?N t / real n + ?N s / real m)/2 = ?N ?st / real (2*n*m)"
   16.65     using mp np by (simp add: algebra_simps add_divide_distrib)
    17.1 --- a/src/HOL/Decision_Procs/MIR.thy	Fri Jul 04 20:07:08 2014 +0200
    17.2 +++ b/src/HOL/Decision_Procs/MIR.thy	Fri Jul 04 20:18:47 2014 +0200
    17.3 @@ -4514,7 +4514,7 @@
    17.4    then obtain s m where smU: "(s,m) \<in> set (\<Upsilon> p)" and mx: "real m * x \<ge> ?N a s" by blast
    17.5    from \<Upsilon>_l[OF lp] smU have mp: "real m > 0" by auto
    17.6    from pos_divide_le_eq[OF mp, where a="x" and b="?N a s", symmetric] mx have "x \<ge> ?N a s / real m" 
    17.7 -    by (auto simp add: mult_commute)
    17.8 +    by (auto simp add: mult.commute)
    17.9    thus ?thesis using smU by auto
   17.10  qed
   17.11  
   17.12 @@ -4530,7 +4530,7 @@
   17.13    then obtain s m where smU: "(s,m) \<in> set (\<Upsilon> p)" and mx: "real m * x \<le> ?N a s" by blast
   17.14    from \<Upsilon>_l[OF lp] smU have mp: "real m > 0" by auto
   17.15    from pos_le_divide_eq[OF mp, where a="x" and b="?N a s", symmetric] mx have "x \<le> ?N a s / real m" 
   17.16 -    by (auto simp add: mult_commute)
   17.17 +    by (auto simp add: mult.commute)
   17.18    thus ?thesis using smU by auto
   17.19  qed
   17.20  
   17.21 @@ -4747,7 +4747,7 @@
   17.22        with \<Upsilon>_l[OF lp] have tnb: "numbound0 t" and np:"real n > 0" and snb: "numbound0 s" and mp:"real m > 0"
   17.23          by auto
   17.24        let ?st = "Add (Mul m t) (Mul n s)"
   17.25 -      from np mp have mnp: "real (2*n*m) > 0" by (simp add: mult_commute)
   17.26 +      from np mp have mnp: "real (2*n*m) > 0" by (simp add: mult.commute)
   17.27        from tnb snb have st_nb: "numbound0 ?st" by simp
   17.28        have st: "(?N t / real n + ?N s / real m)/2 = ?N ?st / real (2*n*m)"
   17.29          using mnp mp np by (simp add: algebra_simps add_divide_distrib)
   17.30 @@ -4763,7 +4763,7 @@
   17.31      and px:"?I x (\<upsilon> p (Add (Mul l t) (Mul k s), 2*k*l))"
   17.32      with \<Upsilon>_l[OF lp] have tnb: "numbound0 t" and np:"real k > 0" and snb: "numbound0 s" and mp:"real l > 0" by auto
   17.33      let ?st = "Add (Mul l t) (Mul k s)"
   17.34 -    from np mp have mnp: "real (2*k*l) > 0" by (simp add: mult_commute)
   17.35 +    from np mp have mnp: "real (2*k*l) > 0" by (simp add: mult.commute)
   17.36      from tnb snb have st_nb: "numbound0 ?st" by simp
   17.37      from \<upsilon>_I[OF lp mnp st_nb, where bs="bs"] px have "?E" by auto}
   17.38    ultimately show "?E" by blast
   17.39 @@ -4883,7 +4883,7 @@
   17.40      from aU bU \<Upsilon>_l[OF lrq] have tnb: "numbound0 t" and np:"real n > 0" and snb: "numbound0 s" and mp:"real m > 0" by (auto simp add: split_def)
   17.41      let ?st = "Add (Mul m t) (Mul n s)"
   17.42      from tnb snb have stnb: "numbound0 ?st" by simp
   17.43 -    from np mp have mnp: "real (2*n*m) > 0" by (simp add: mult_commute)
   17.44 +    from np mp have mnp: "real (2*n*m) > 0" by (simp add: mult.commute)
   17.45      from conjunct1[OF \<upsilon>_I[OF lrq mnp stnb, where bs="bs" and x="x"], symmetric] rqx
   17.46      have "\<exists> x. ?I x ?rq" by auto
   17.47      thus "?E" 
   17.48 @@ -4915,7 +4915,7 @@
   17.49           (set U \<times> set U)"using mnz nnz th  
   17.50      apply (auto simp add: th add_divide_distrib algebra_simps split_def image_def)
   17.51      by (rule_tac x="(s,m)" in bexI,simp_all) 
   17.52 -  (rule_tac x="(t,n)" in bexI,simp_all add: mult_commute)
   17.53 +  (rule_tac x="(t,n)" in bexI,simp_all add: mult.commute)
   17.54  next
   17.55    fix t n s m
   17.56    assume tnU: "(t,n) \<in> set U" and smU:"(s,m) \<in> set U" 
   17.57 @@ -4964,7 +4964,7 @@
   17.58      and snb: "numbound0 s" and mp:"m > 0"  by auto
   17.59    let ?st= "Add (Mul m t) (Mul n s)"
   17.60    from np mp have mnp: "real (2*n*m) > 0" 
   17.61 -      by (simp add: mult_commute real_of_int_mult[symmetric] del: real_of_int_mult)
   17.62 +      by (simp add: mult.commute real_of_int_mult[symmetric] del: real_of_int_mult)
   17.63      from tnb snb have stnb: "numbound0 ?st" by simp
   17.64    have st: "(?N t / real n + ?N s / real m)/2 = ?N ?st / real (2*n*m)"
   17.65     using mp np by (simp add: algebra_simps add_divide_distrib)
   17.66 @@ -4992,7 +4992,7 @@
   17.67      and snb: "numbound0 s" and mp:"m > 0"  by auto
   17.68    let ?st= "Add (Mul m t) (Mul n s)"
   17.69    from np mp have mnp: "real (2*n*m) > 0" 
   17.70 -      by (simp add: mult_commute real_of_int_mult[symmetric] del: real_of_int_mult)
   17.71 +      by (simp add: mult.commute real_of_int_mult[symmetric] del: real_of_int_mult)
   17.72      from tnb snb have stnb: "numbound0 ?st" by simp
   17.73    have st: "(?N t / real n + ?N s / real m)/2 = ?N ?st / real (2*n*m)"
   17.74     using mp np by (simp add: algebra_simps add_divide_distrib)
    18.1 --- a/src/HOL/Decision_Procs/Parametric_Ferrante_Rackoff.thy	Fri Jul 04 20:07:08 2014 +0200
    18.2 +++ b/src/HOL/Decision_Procs/Parametric_Ferrante_Rackoff.thy	Fri Jul 04 20:18:47 2014 +0200
    18.3 @@ -428,7 +428,7 @@
    18.4    apply (simp add: Let_def split_def field_simps)
    18.5    apply (simp add: Let_def split_def field_simps)
    18.6    apply (simp add: Let_def split_def field_simps)
    18.7 -  apply (simp add: Let_def split_def mult_assoc distrib_left[symmetric])
    18.8 +  apply (simp add: Let_def split_def mult.assoc distrib_left[symmetric])
    18.9    apply (simp add: Let_def split_def field_simps)
   18.10    apply (simp add: Let_def split_def field_simps)
   18.11    done
   18.12 @@ -1686,7 +1686,7 @@
   18.13        assume xz: "x < -?e / ?c"
   18.14        then have "?c * x < - ?e"
   18.15          using pos_less_divide_eq[OF cp, where a="x" and b="-?e"]
   18.16 -        by (simp add: mult_commute)
   18.17 +        by (simp add: mult.commute)
   18.18        then have "?c * x + ?e < 0"
   18.19          by simp
   18.20        then have "Ifm vs (x#bs) (Eq (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Eq (CNP 0 c e)))"
   18.21 @@ -1701,7 +1701,7 @@
   18.22        assume xz: "x < -?e / ?c"
   18.23        then have "?c * x > - ?e"
   18.24          using neg_less_divide_eq[OF cp, where a="x" and b="-?e"]
   18.25 -        by (simp add: mult_commute)
   18.26 +        by (simp add: mult.commute)
   18.27        then have "?c * x + ?e > 0"
   18.28          by simp
   18.29        then have "Ifm vs (x#bs) (Eq (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Eq (CNP 0 c e)))"
   18.30 @@ -1734,7 +1734,7 @@
   18.31        assume xz: "x < -?e / ?c"
   18.32        then have "?c * x < - ?e"
   18.33          using pos_less_divide_eq[OF cp, where a="x" and b="-?e"]
   18.34 -        by (simp add: mult_commute)
   18.35 +        by (simp add: mult.commute)
   18.36        then have "?c * x + ?e < 0"
   18.37          by simp
   18.38        then have "Ifm vs (x#bs) (NEq (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (NEq (CNP 0 c e)))"
   18.39 @@ -1749,7 +1749,7 @@
   18.40        assume xz: "x < -?e / ?c"
   18.41        then have "?c * x > - ?e"
   18.42          using neg_less_divide_eq[OF cp, where a="x" and b="-?e"]
   18.43 -        by (simp add: mult_commute)
   18.44 +        by (simp add: mult.commute)
   18.45        then have "?c * x + ?e > 0"
   18.46          by simp
   18.47        then have "Ifm vs (x#bs) (NEq (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (NEq (CNP 0 c e)))"
   18.48 @@ -1783,7 +1783,7 @@
   18.49        assume xz: "x < -?e / ?c"
   18.50        then have "?c * x < - ?e"
   18.51          using pos_less_divide_eq[OF cp, where a="x" and b="-?e"]
   18.52 -        by (simp add: mult_commute)
   18.53 +        by (simp add: mult.commute)
   18.54        then have "?c * x + ?e < 0" by simp
   18.55        then have "Ifm vs (x#bs) (Lt (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Lt (CNP 0 c e)))"
   18.56          using tmbound0_I[OF nbe, where b="y" and b'="x"] cp eqs by auto
   18.57 @@ -1797,7 +1797,7 @@
   18.58        assume xz: "x < -?e / ?c"
   18.59        then have "?c * x > - ?e"
   18.60          using neg_less_divide_eq[OF cp, where a="x" and b="-?e"]
   18.61 -        by (simp add: mult_commute)
   18.62 +        by (simp add: mult.commute)
   18.63        then have "?c * x + ?e > 0"
   18.64          by simp
   18.65        then have "Ifm vs (x#bs) (Lt (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Lt (CNP 0 c e)))"
   18.66 @@ -1830,7 +1830,7 @@
   18.67        assume xz: "x < -?e / ?c"
   18.68        then have "?c * x < - ?e"
   18.69          using pos_less_divide_eq[OF cp, where a="x" and b="-?e"]
   18.70 -        by (simp add: mult_commute)
   18.71 +        by (simp add: mult.commute)
   18.72        then have "?c * x + ?e < 0"
   18.73          by simp
   18.74        then have "Ifm vs (x#bs) (Le (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Le (CNP 0 c e)))"
   18.75 @@ -1846,7 +1846,7 @@
   18.76        assume xz: "x < -?e / ?c"
   18.77        then have "?c * x > - ?e"
   18.78          using neg_less_divide_eq[OF cp, where a="x" and b="-?e"]
   18.79 -        by (simp add: mult_commute)
   18.80 +        by (simp add: mult.commute)
   18.81        then have "?c * x + ?e > 0"
   18.82          by simp
   18.83        then have "Ifm vs (x#bs) (Le (CNP 0 c e)) = Ifm vs (x#bs) (minusinf (Le (CNP 0 c e)))"
   18.84 @@ -1899,7 +1899,7 @@
   18.85        assume xz: "x > -?e / ?c"
   18.86        then have "?c * x > - ?e"
   18.87          using pos_divide_less_eq[OF cp, where a="x" and b="-?e"]
   18.88 -        by (simp add: mult_commute)
   18.89 +        by (simp add: mult.commute)
   18.90        then have "?c * x + ?e > 0"
   18.91          by simp
   18.92        then have "Ifm vs (x#bs) (Eq (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Eq (CNP 0 c e)))"
   18.93 @@ -1914,7 +1914,7 @@
   18.94        assume xz: "x > -?e / ?c"
   18.95        then have "?c * x < - ?e"
   18.96          using neg_divide_less_eq[OF cp, where a="x" and b="-?e"]
   18.97 -        by (simp add: mult_commute)
   18.98 +        by (simp add: mult.commute)
   18.99        then have "?c * x + ?e < 0" by simp
  18.100        then have "Ifm vs (x#bs) (Eq (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Eq (CNP 0 c e)))"
  18.101          using tmbound0_I[OF nbe, where b="y" and b'="x"] eqs by auto
  18.102 @@ -1944,7 +1944,7 @@
  18.103        assume xz: "x > -?e / ?c"
  18.104        then have "?c * x > - ?e"
  18.105          using pos_divide_less_eq[OF cp, where a="x" and b="-?e"]
  18.106 -        by (simp add: mult_commute)
  18.107 +        by (simp add: mult.commute)
  18.108        then have "?c * x + ?e > 0"
  18.109          by simp
  18.110        then have "Ifm vs (x#bs) (NEq (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (NEq (CNP 0 c e)))"
  18.111 @@ -1959,7 +1959,7 @@
  18.112        assume xz: "x > -?e / ?c"
  18.113        then have "?c * x < - ?e"
  18.114          using neg_divide_less_eq[OF cp, where a="x" and b="-?e"]
  18.115 -        by (simp add: mult_commute)
  18.116 +        by (simp add: mult.commute)
  18.117        then have "?c * x + ?e < 0"
  18.118          by simp
  18.119        then have "Ifm vs (x#bs) (NEq (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (NEq (CNP 0 c e)))"
  18.120 @@ -1992,7 +1992,7 @@
  18.121        assume xz: "x > -?e / ?c"
  18.122        then have "?c * x > - ?e"
  18.123          using pos_divide_less_eq[OF cp, where a="x" and b="-?e"]
  18.124 -        by (simp add: mult_commute)
  18.125 +        by (simp add: mult.commute)
  18.126        then have "?c * x + ?e > 0"
  18.127          by simp
  18.128        then have "Ifm vs (x#bs) (Lt (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Lt (CNP 0 c e)))"
  18.129 @@ -2007,7 +2007,7 @@
  18.130        assume xz: "x > -?e / ?c"
  18.131        then have "?c * x < - ?e"
  18.132          using neg_divide_less_eq[OF cp, where a="x" and b="-?e"]
  18.133 -        by (simp add: mult_commute)
  18.134 +        by (simp add: mult.commute)
  18.135        then have "?c * x + ?e < 0"
  18.136          by simp
  18.137        then have "Ifm vs (x#bs) (Lt (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Lt (CNP 0 c e)))"
  18.138 @@ -2040,7 +2040,7 @@
  18.139        assume xz: "x > -?e / ?c"
  18.140        then have "?c * x > - ?e"
  18.141          using pos_divide_less_eq[OF cp, where a="x" and b="-?e"]
  18.142 -        by (simp add: mult_commute)
  18.143 +        by (simp add: mult.commute)
  18.144        then have "?c * x + ?e > 0"
  18.145          by simp
  18.146        then have "Ifm vs (x#bs) (Le (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Le (CNP 0 c e)))"
  18.147 @@ -2055,7 +2055,7 @@
  18.148        assume xz: "x > -?e / ?c"
  18.149        then have "?c * x < - ?e"
  18.150          using neg_divide_less_eq[OF cp, where a="x" and b="-?e"]
  18.151 -        by (simp add: mult_commute)
  18.152 +        by (simp add: mult.commute)
  18.153        then have "?c * x + ?e < 0"
  18.154          by simp
  18.155        then have "Ifm vs (x#bs) (Le (CNP 0 c e)) = Ifm vs (x#bs) (plusinf (Le (CNP 0 c e)))"
  18.156 @@ -2144,7 +2144,7 @@
  18.157        (Ipoly vs c > 0 \<and> Ipoly vs c * x \<ge> - Itm vs (x#bs) s)" by blast
  18.158    then have "x \<ge> (- Itm vs (x#bs) s) / Ipoly vs c"
  18.159      using divide_le_eq[of "- Itm vs (x#bs) s" "Ipoly vs c" x]
  18.160 -    by (auto simp add: mult_commute)
  18.161 +    by (auto simp add: mult.commute)
  18.162    then show ?thesis
  18.163      using csU by auto
  18.164  qed
  18.165 @@ -2188,7 +2188,7 @@
  18.166      by blast
  18.167    then have "x \<le> (- Itm vs (x#bs) s) / Ipoly vs c"
  18.168      using le_divide_eq[of x "- Itm vs (x#bs) s" "Ipoly vs c"]
  18.169 -    by (auto simp add: mult_commute)
  18.170 +    by (auto simp add: mult.commute)
  18.171    then show ?thesis
  18.172      using csU by auto
  18.173  qed
  18.174 @@ -3811,7 +3811,7 @@
  18.175        from msubst2[OF lp nn nn'(1), of x bs ] H(3) nn'
  18.176        have "\<lparr>c\<rparr>\<^sub>p\<^bsup>vs\<^esup> \<noteq> 0 \<and> \<lparr>d\<rparr>\<^sub>p\<^bsup>vs\<^esup> \<noteq> 0 \<and>
  18.177            Ifm vs ((- Itm vs (x # bs) t / \<lparr>c\<rparr>\<^sub>p\<^bsup>vs\<^esup> + - Itm vs (x # bs) s / \<lparr>d\<rparr>\<^sub>p\<^bsup>vs\<^esup>) / 2 # bs) p"
  18.178 -        by (simp add: add_divide_distrib diff_divide_distrib mult_minus2_left mult_commute)
  18.179 +        by (simp add: add_divide_distrib diff_divide_distrib mult_minus2_left mult.commute)
  18.180      }
  18.181      moreover
  18.182      {
  18.183 @@ -3828,7 +3828,7 @@
  18.184          using H(3,4) by (simp_all add: polymul_norm n2)
  18.185        from msubst2[OF lp nn, of x bs ] H(3,4,5)
  18.186        have "Ifm vs (x#bs) (msubst2 p (C (-2, 1) *\<^sub>p c*\<^sub>p d) (Add (Mul d t) (Mul c s)))"
  18.187 -        by (simp add: diff_divide_distrib add_divide_distrib mult_minus2_left mult_commute)
  18.188 +        by (simp add: diff_divide_distrib add_divide_distrib mult_minus2_left mult.commute)
  18.189      }
  18.190      ultimately show ?thesis by blast
  18.191    qed
    19.1 --- a/src/HOL/Decision_Procs/Polynomial_List.thy	Fri Jul 04 20:07:08 2014 +0200
    19.2 +++ b/src/HOL/Decision_Procs/Polynomial_List.thy	Fri Jul 04 20:18:47 2014 +0200
    19.3 @@ -121,7 +121,7 @@
    19.4    thus ?case by auto
    19.5  next
    19.6    case (Cons b bs a)
    19.7 -  thus ?case by (cases a) (simp_all add: add_commute)
    19.8 +  thus ?case by (cases a) (simp_all add: add.commute)
    19.9  qed
   19.10  
   19.11  lemma (in comm_semiring_0) padd_assoc: "\<forall>b c. (a +++ b) +++ c = a +++ (b +++ c)"
   19.12 @@ -192,13 +192,13 @@
   19.13    by simp
   19.14  
   19.15  lemma (in comm_semiring_0) poly_mult_assoc: "poly ((a *** b) *** c) x = poly (a *** (b *** c)) x"
   19.16 -  by (simp add: poly_mult mult_assoc)
   19.17 +  by (simp add: poly_mult mult.assoc)
   19.18  
   19.19  lemma (in semiring_0) poly_mult_Nil2[simp]: "poly (p *** []) x = 0"
   19.20    by (induct p) auto
   19.21  
   19.22  lemma (in comm_semiring_1) poly_exp_add: "poly (p %^ (n + d)) x = poly( p %^ n *** p %^ d) x"
   19.23 -  by (induct n) (auto simp add: poly_mult mult_assoc)
   19.24 +  by (induct n) (auto simp add: poly_mult mult.assoc)
   19.25  
   19.26  subsection{*Key Property: if @{term "f(a) = 0"} then @{term "(x - a)"} divides
   19.27   @{term "p(x)"} *}
   19.28 @@ -445,7 +445,7 @@
   19.29  lemma (in comm_ring_1) poly_prime_eq_zero[simp]: "poly [a,1] \<noteq> poly []"
   19.30    apply (simp add: fun_eq)
   19.31    apply (rule_tac x = "minus one a" in exI)
   19.32 -  apply (simp add: add_commute [of a])
   19.33 +  apply (simp add: add.commute [of a])
   19.34    done
   19.35  
   19.36  lemma (in idom) poly_exp_prime_eq_zero: "poly ([a, 1] %^ n) \<noteq> poly []"
   19.37 @@ -517,7 +517,7 @@
   19.38  lemma (in comm_semiring_1) poly_divides_trans: "p divides q \<Longrightarrow> q divides r \<Longrightarrow> p divides r"
   19.39    apply (simp add: divides_def, safe)
   19.40    apply (rule_tac x = "pmult qa qaa" in exI)
   19.41 -  apply (auto simp add: poly_mult fun_eq mult_assoc)
   19.42 +  apply (auto simp add: poly_mult fun_eq mult.assoc)
   19.43    done
   19.44  
   19.45  lemma (in comm_semiring_1) poly_divides_exp: "m \<le> n \<Longrightarrow> (p %^ m) divides (p %^ n)"
    20.1 --- a/src/HOL/Decision_Procs/Rat_Pair.thy	Fri Jul 04 20:07:08 2014 +0200
    20.2 +++ b/src/HOL/Decision_Procs/Rat_Pair.thy	Fri Jul 04 20:18:47 2014 +0200
    20.3 @@ -464,7 +464,7 @@
    20.4  qed
    20.5  
    20.6  lemma Nmul_commute: "isnormNum x \<Longrightarrow> isnormNum y \<Longrightarrow> x *\<^sub>N y = y *\<^sub>N x"
    20.7 -  by (simp add: Nmul_def split_def Let_def gcd_commute_int mult_commute)
    20.8 +  by (simp add: Nmul_def split_def Let_def gcd_commute_int mult.commute)
    20.9  
   20.10  lemma Nmul_assoc:
   20.11    assumes "SORT_CONSTRAINT('a::{field_char_0, field_inverse_zero})"
    21.1 --- a/src/HOL/Deriv.thy	Fri Jul 04 20:07:08 2014 +0200
    21.2 +++ b/src/HOL/Deriv.thy	Fri Jul 04 20:18:47 2014 +0200
    21.3 @@ -558,7 +558,7 @@
    21.4  lemma has_derivative_imp_has_field_derivative:
    21.5    "(f has_derivative D) F \<Longrightarrow> (\<And>x. x * D' = D x) \<Longrightarrow> (f has_field_derivative D') F"
    21.6    unfolding has_field_derivative_def 
    21.7 -  by (rule has_derivative_eq_rhs[of f D]) (simp_all add: fun_eq_iff mult_commute)
    21.8 +  by (rule has_derivative_eq_rhs[of f D]) (simp_all add: fun_eq_iff mult.commute)
    21.9  
   21.10  lemma has_field_derivative_imp_has_derivative: "(f has_field_derivative D) F \<Longrightarrow> (f has_derivative op * D) F"
   21.11    by (simp add: has_field_derivative_def)
   21.12 @@ -587,7 +587,7 @@
   21.13    then obtain f' where *: "(f has_derivative f') (at x within s)"
   21.14      unfolding differentiable_def by auto
   21.15    then obtain c where "f' = (op * c)"
   21.16 -    by (metis real_bounded_linear has_derivative_bounded_linear mult_commute fun_eq_iff)
   21.17 +    by (metis real_bounded_linear has_derivative_bounded_linear mult.commute fun_eq_iff)
   21.18    with * show "\<exists>D. (f has_real_derivative D) (at x within s)"
   21.19      unfolding has_field_derivative_def by auto
   21.20  qed (auto simp: differentiable_def has_field_derivative_def)
   21.21 @@ -610,7 +610,7 @@
   21.22    done
   21.23  
   21.24  lemma mult_commute_abs: "(\<lambda>x. x * c) = op * (c::'a::ab_semigroup_mult)"
   21.25 -  by (simp add: fun_eq_iff mult_commute)
   21.26 +  by (simp add: fun_eq_iff mult.commute)
   21.27  
   21.28  subsection {* Derivatives *}
   21.29  
   21.30 @@ -732,7 +732,7 @@
   21.31    "(f has_field_derivative d) (at x within s) \<Longrightarrow>
   21.32    (g has_field_derivative e) (at x within s)\<Longrightarrow> g x \<noteq> 0 \<Longrightarrow> 
   21.33    ((\<lambda>y. f y / g y) has_field_derivative (d * g x - (e * f x)) / (g x ^ Suc (Suc 0))) (at x within s)"
   21.34 -  by (drule (2) DERIV_divide) (simp add: mult_commute)
   21.35 +  by (drule (2) DERIV_divide) (simp add: mult.commute)
   21.36  
   21.37  lemma DERIV_power_Suc:
   21.38    "(f has_field_derivative D) (at x within s) \<Longrightarrow>
   21.39 @@ -765,7 +765,7 @@
   21.40  lemma DERIV_chain:
   21.41    "DERIV f (g x) :> Da \<Longrightarrow> (g has_field_derivative Db) (at x within s) \<Longrightarrow> 
   21.42    (f o g has_field_derivative Da * Db) (at x within s)"
   21.43 -  by (drule (1) DERIV_chain', simp add: o_def mult_commute)
   21.44 +  by (drule (1) DERIV_chain', simp add: o_def mult.commute)
   21.45  
   21.46  lemma DERIV_image_chain: 
   21.47    "(f has_field_derivative Da) (at (g x) within (g ` s)) \<Longrightarrow> (g has_field_derivative Db) (at x within s) \<Longrightarrow>
   21.48 @@ -779,7 +779,7 @@
   21.49        and "DERIV f x :> f'" 
   21.50        and "f x \<in> s"
   21.51      shows "DERIV (\<lambda>x. g(f x)) x :> f' * g'(f x)"
   21.52 -  by (metis (full_types) DERIV_chain' mult_commute assms)
   21.53 +  by (metis (full_types) DERIV_chain' mult.commute assms)
   21.54  
   21.55  lemma DERIV_chain3: (*HAS_COMPLEX_DERIVATIVE_CHAIN_UNIV*)
   21.56    assumes "(\<And>x. DERIV g x :> g'(x))"
   21.57 @@ -800,7 +800,7 @@
   21.58  apply (drule_tac k="- a" in LIM_offset)
   21.59  apply simp
   21.60  apply (drule_tac k="a" in LIM_offset)
   21.61 -apply (simp add: add_commute)
   21.62 +apply (simp add: add.commute)
   21.63  done
   21.64  
   21.65  lemma DERIV_iff2: "(DERIV f x :> D) \<longleftrightarrow> (\<lambda>z. (f z - f x) / (z - x)) --x --> D"
   21.66 @@ -1215,7 +1215,7 @@
   21.67    fixes f :: "real => real"
   21.68    shows "[|a \<noteq> b; \<forall>x. DERIV f x :> k |] ==> (f(b) - f(a))/(b-a) = k"
   21.69  apply (rule_tac c1 = "b-a" in mult_right_cancel [THEN iffD1])
   21.70 -apply (auto dest!: DERIV_const_ratio_const simp add: mult_assoc)
   21.71 +apply (auto dest!: DERIV_const_ratio_const simp add: mult.assoc)
   21.72  done
   21.73  
   21.74  lemma real_average_minus_first [simp]: "((a + b) /2 - a) = (b-a)/(2::real)"
   21.75 @@ -1248,7 +1248,7 @@
   21.76    hence "(b-a) * ((v b - v a) / (b-a)) = (b-a) * k" by simp
   21.77    moreover have " (v ((b + a) / 2) - v a) / ((b + a) / 2 - a) = k"
   21.78      by (rule DERIV_const_ratio_const2 [OF _ der], simp add: neq)
   21.79 -  ultimately show ?thesis using neq by (force simp add: add_commute)
   21.80 +  ultimately show ?thesis using neq by (force simp add: add.commute)
   21.81  qed
   21.82  
   21.83  (* A function with positive derivative is increasing. 
    22.1 --- a/src/HOL/Divides.thy	Fri Jul 04 20:07:08 2014 +0200
    22.2 +++ b/src/HOL/Divides.thy	Fri Jul 04 20:18:47 2014 +0200
    22.3 @@ -29,7 +29,7 @@
    22.4  text {* @{const div} and @{const mod} *}
    22.5  
    22.6  lemma mod_div_equality2: "b * (a div b) + a mod b = a"
    22.7 -  unfolding mult_commute [of b]
    22.8 +  unfolding mult.commute [of b]
    22.9    by (rule mod_div_equality)
   22.10  
   22.11  lemma mod_div_equality': "a mod b + a div b * b = a"
   22.12 @@ -51,7 +51,7 @@
   22.13  lemma div_mult_self2 [simp]:
   22.14    assumes "b \<noteq> 0"
   22.15    shows "(a + b * c) div b = c + a div b"
   22.16 -  using assms div_mult_self1 [of b a c] by (simp add: mult_commute)
   22.17 +  using assms div_mult_self1 [of b a c] by (simp add: mult.commute)
   22.18  
   22.19  lemma div_mult_self3 [simp]:
   22.20    assumes "b \<noteq> 0"
   22.21 @@ -74,7 +74,7 @@
   22.22      "\<dots> = (c + a div b) * b + (a + c * b) mod b"
   22.23        by (simp add: algebra_simps)
   22.24    finally have "a = a div b * b + (a + c * b) mod b"
   22.25 -    by (simp add: add_commute [of a] add_assoc distrib_right)
   22.26 +    by (simp add: add.commute [of a] add.assoc distrib_right)
   22.27    then have "a div b * b + (a + c * b) mod b = a div b * b + a mod b"
   22.28      by (simp add: mod_div_equality)
   22.29    then show ?thesis by simp
   22.30 @@ -82,7 +82,7 @@
   22.31  
   22.32  lemma mod_mult_self2 [simp]: 
   22.33    "(a + b * c) mod b = a mod b"
   22.34 -  by (simp add: mult_commute [of b])
   22.35 +  by (simp add: mult.commute [of b])
   22.36  
   22.37  lemma mod_mult_self3 [simp]:
   22.38    "(c * b + a) mod b = a mod b"
   22.39 @@ -123,16 +123,16 @@
   22.40  lemma div_add_self1 [simp]:
   22.41    assumes "b \<noteq> 0"
   22.42    shows "(b + a) div b = a div b + 1"
   22.43 -  using assms div_mult_self1 [of b a 1] by (simp add: add_commute)
   22.44 +  using assms div_mult_self1 [of b a 1] by (simp add: add.commute)
   22.45  
   22.46  lemma div_add_self2 [simp]:
   22.47    assumes "b \<noteq> 0"
   22.48    shows "(a + b) div b = a div b + 1"
   22.49 -  using assms div_add_self1 [of b a] by (simp add: add_commute)
   22.50 +  using assms div_add_self1 [of b a] by (simp add: add.commute)
   22.51  
   22.52  lemma mod_add_self1 [simp]:
   22.53    "(b + a) mod b = a mod b"
   22.54 -  using mod_mult_self1 [of a 1 b] by (simp add: add_commute)
   22.55 +  using mod_mult_self1 [of a 1 b] by (simp add: add.commute)
   22.56  
   22.57  lemma mod_add_self2 [simp]:
   22.58    "(a + b) mod b = a mod b"
   22.59 @@ -153,7 +153,7 @@
   22.60  proof
   22.61    assume "b mod a = 0"
   22.62    with mod_div_equality [of b a] have "b div a * a = b" by simp
   22.63 -  then have "b = a * (b div a)" unfolding mult_commute ..
   22.64 +  then have "b = a * (b div a)" unfolding mult.commute ..
   22.65    then have "\<exists>c. b = a * c" ..
   22.66    then show "a dvd b" unfolding dvd_def .
   22.67  next
   22.68 @@ -161,7 +161,7 @@
   22.69    then have "\<exists>c. b = a * c" unfolding dvd_def .
   22.70    then obtain c where "b = a * c" ..
   22.71    then have "b mod a = a * c mod a" by simp
   22.72 -  then have "b mod a = c * a mod a" by (simp add: mult_commute)
   22.73 +  then have "b mod a = c * a mod a" by (simp add: mult.commute)
   22.74    then show "b mod a = 0" by simp
   22.75  qed
   22.76  
   22.77 @@ -197,12 +197,12 @@
   22.78  by (subst (2) mod_div_equality [of b a, symmetric]) (simp add:dvd_imp_mod_0)
   22.79  
   22.80  lemma dvd_mult_div_cancel: "a dvd b \<Longrightarrow> a * (b div a) = b"
   22.81 -by (drule dvd_div_mult_self) (simp add: mult_commute)
   22.82 +by (drule dvd_div_mult_self) (simp add: mult.commute)
   22.83  
   22.84  lemma dvd_div_mult: "a dvd b \<Longrightarrow> (b div a) * c = b * c div a"
   22.85  apply (cases "a = 0")
   22.86   apply simp
   22.87 -apply (auto simp: dvd_def mult_assoc)
   22.88 +apply (auto simp: dvd_def mult.assoc)
   22.89  done
   22.90  
   22.91  lemma div_dvd_div[simp]:
   22.92 @@ -211,8 +211,8 @@
   22.93   apply simp
   22.94  apply (unfold dvd_def)
   22.95  apply auto
   22.96 - apply(blast intro:mult_assoc[symmetric])
   22.97 -apply(fastforce simp add: mult_assoc)
   22.98 + apply(blast intro:mult.assoc[symmetric])
   22.99 +apply(fastforce simp add: mult.assoc)
  22.100  done
  22.101  
  22.102  lemma dvd_mod_imp_dvd: "[| k dvd m mod n;  k dvd n |] ==> k dvd m"
  22.103 @@ -332,7 +332,7 @@
  22.104    apply (cases "y = 0", simp)
  22.105    apply (cases "z = 0", simp)
  22.106    apply (auto elim!: dvdE simp add: algebra_simps)
  22.107 -  apply (subst mult_assoc [symmetric])
  22.108 +  apply (subst mult.assoc [symmetric])
  22.109    apply (simp add: no_zero_divisors)
  22.110    done
  22.111  
  22.112 @@ -342,12 +342,12 @@
  22.113  proof -
  22.114    from assms have "b div c * (a div 1) = b * a div (c * 1)"
  22.115      by (simp only: div_mult_div_if_dvd one_dvd)
  22.116 -  then show ?thesis by (simp add: mult_commute)
  22.117 +  then show ?thesis by (simp add: mult.commute)
  22.118  qed
  22.119     
  22.120  lemma div_mult_mult2 [simp]:
  22.121    "c \<noteq> 0 \<Longrightarrow> (a * c) div (b * c) = a div b"
  22.122 -  by (drule div_mult_mult1) (simp add: mult_commute)
  22.123 +  by (drule div_mult_mult1) (simp add: mult.commute)
  22.124  
  22.125  lemma div_mult_mult1_if [simp]:
  22.126    "(c * a) div (c * b) = (if c = 0 then 0 else a div b)"
  22.127 @@ -368,7 +368,7 @@
  22.128    
  22.129  lemma mod_mult_mult2:
  22.130    "(a * c) mod (b * c) = (a mod b) * c"
  22.131 -  using mod_mult_mult1 [of c a b] by (simp add: mult_commute)
  22.132 +  using mod_mult_mult1 [of c a b] by (simp add: mult.commute)
  22.133  
  22.134  lemma mult_mod_left: "(a mod b) * c = (a * c) mod (b * c)"
  22.135    by (fact mod_mult_mult2 [symmetric])
  22.136 @@ -405,7 +405,7 @@
  22.137  lemma dvd_div_div_eq_mult:
  22.138    assumes "a \<noteq> 0" "c \<noteq> 0" and "a dvd b" "c dvd d"
  22.139    shows "b div a = d div c \<longleftrightarrow> b * c = a * d"
  22.140 -  using assms by (auto simp add: mult_commute [of _ a] dvd_div_mult_self dvd_div_eq_mult div_mult_swap intro: sym)
  22.141 +  using assms by (auto simp add: mult.commute [of _ a] dvd_div_mult_self dvd_div_eq_mult div_mult_swap intro: sym)
  22.142  
  22.143  end
  22.144  
  22.145 @@ -1065,7 +1065,7 @@
  22.146  by (force simp add: divmod_nat_rel [THEN divmod_nat_rel_mult2_eq, THEN div_nat_unique])
  22.147  
  22.148  lemma mod_mult2_eq: "a mod (b * c) = b * (a div b mod c) + a mod (b::nat)"
  22.149 -by (auto simp add: mult_commute divmod_nat_rel [THEN divmod_nat_rel_mult2_eq, THEN mod_nat_unique])
  22.150 +by (auto simp add: mult.commute divmod_nat_rel [THEN divmod_nat_rel_mult2_eq, THEN mod_nat_unique])
  22.151  
  22.152  
  22.153  subsubsection {* Further Facts about Quotient and Remainder *}
  22.154 @@ -1692,7 +1692,7 @@
  22.155    fix a b :: int
  22.156    show "a div b * b + a mod b = a"
  22.157      using divmod_int_rel_div_mod [of a b]
  22.158 -    unfolding divmod_int_rel_def by (simp add: mult_commute)
  22.159 +    unfolding divmod_int_rel_def by (simp add: mult.commute)
  22.160  next
  22.161    fix a b c :: int
  22.162    assume "b \<noteq> 0"
  22.163 @@ -2022,7 +2022,7 @@
  22.164  apply (subgoal_tac "b*q = r' - r + b'*q'")
  22.165   prefer 2 apply simp
  22.166  apply (simp (no_asm_simp) add: distrib_left)
  22.167 -apply (subst add_commute, rule add_less_le_mono, arith)
  22.168 +apply (subst add.commute, rule add_less_le_mono, arith)
  22.169  apply (rule mult_right_mono, auto)
  22.170  done
  22.171  
  22.172 @@ -2314,7 +2314,7 @@
  22.173    "numeral (Num.Bit1 v) div numeral (Num.Bit0 w) =  
  22.174      (numeral v div (numeral w :: int))"
  22.175    unfolding numeral.simps
  22.176 -  unfolding mult_2 [symmetric] add_commute [of _ 1]
  22.177 +  unfolding mult_2 [symmetric] add.commute [of _ 1]
  22.178    by (rule pos_zdiv_mult_2, simp)
  22.179  
  22.180  lemma pos_zmod_mult_2:
  22.181 @@ -2342,7 +2342,7 @@
  22.182    "numeral (Num.Bit1 v) mod numeral (Num.Bit0 w) =
  22.183      2 * (numeral v mod numeral w) + (1::int)"
  22.184    unfolding numeral_Bit1 [of v] numeral_Bit0 [of w]
  22.185 -  unfolding mult_2 [symmetric] add_commute [of _ 1]
  22.186 +  unfolding mult_2 [symmetric] add.commute [of _ 1]
  22.187    by (rule pos_zmod_mult_2, simp)
  22.188  
  22.189  lemma zdiv_eq_0_iff:
    23.1 --- a/src/HOL/Fact.thy	Fri Jul 04 20:07:08 2014 +0200
    23.2 +++ b/src/HOL/Fact.thy	Fri Jul 04 20:18:47 2014 +0200
    23.3 @@ -230,7 +230,7 @@
    23.4    apply auto
    23.5    apply (induct k rule: int_ge_induct)
    23.6    apply auto
    23.7 -  apply (subst add_assoc [symmetric])
    23.8 +  apply (subst add.assoc [symmetric])
    23.9    apply (subst fact_plus_one_int)
   23.10    apply auto
   23.11    apply (erule order_trans)
    24.1 --- a/src/HOL/Fields.thy	Fri Jul 04 20:07:08 2014 +0200
    24.2 +++ b/src/HOL/Fields.thy	Fri Jul 04 20:18:47 2014 +0200
    24.3 @@ -51,7 +51,7 @@
    24.4      assume ab: "a * b = 0"
    24.5      hence "0 = inverse a * (a * b) * inverse b" by simp
    24.6      also have "\<dots> = (inverse a * a) * (b * inverse b)"
    24.7 -      by (simp only: mult_assoc)
    24.8 +      by (simp only: mult.assoc)
    24.9      also have "\<dots> = 1" using a b by simp
   24.10      finally show False by simp
   24.11    qed
   24.12 @@ -81,7 +81,7 @@
   24.13  proof -
   24.14    have "a \<noteq> 0" using ab by (cases "a = 0") simp_all
   24.15    moreover have "inverse a * (a * b) = inverse a" by (simp add: ab)
   24.16 -  ultimately show ?thesis by (simp add: mult_assoc [symmetric])
   24.17 +  ultimately show ?thesis by (simp add: mult.assoc [symmetric])
   24.18  qed
   24.19  
   24.20  lemma nonzero_inverse_minus_eq:
   24.21 @@ -110,7 +110,7 @@
   24.22    shows "inverse (a * b) = inverse b * inverse a"
   24.23  proof -
   24.24    have "a * (b * inverse b) * inverse a = 1" using assms by simp
   24.25 -  hence "a * b * (inverse b * inverse a) = 1" by (simp only: mult_assoc)
   24.26 +  hence "a * b * (inverse b * inverse a) = 1" by (simp only: mult.assoc)
   24.27    thus ?thesis by (rule inverse_unique)
   24.28  qed
   24.29  
   24.30 @@ -126,7 +126,7 @@
   24.31  proof
   24.32    assume neq: "b \<noteq> 0"
   24.33    {
   24.34 -    hence "a = (a / b) * b" by (simp add: divide_inverse mult_assoc)
   24.35 +    hence "a = (a / b) * b" by (simp add: divide_inverse mult.assoc)
   24.36      also assume "a / b = 1"
   24.37      finally show "a = b" by simp
   24.38    next
   24.39 @@ -154,7 +154,7 @@
   24.40    by (simp add: divide_inverse)
   24.41  
   24.42  lemma times_divide_eq_right [simp]: "a * (b / c) = (a * b) / c"
   24.43 -  by (simp add: divide_inverse mult_assoc)
   24.44 +  by (simp add: divide_inverse mult.assoc)
   24.45  
   24.46  lemma minus_divide_left: "- (a / b) = (-a) / b"
   24.47    by (simp add: divide_inverse)
   24.48 @@ -175,7 +175,7 @@
   24.49  proof -
   24.50    assume [simp]: "c \<noteq> 0"
   24.51    have "a = b / c \<longleftrightarrow> a * c = (b / c) * c" by simp
   24.52 -  also have "... \<longleftrightarrow> a * c = b" by (simp add: divide_inverse mult_assoc)
   24.53 +  also have "... \<longleftrightarrow> a * c = b" by (simp add: divide_inverse mult.assoc)
   24.54    finally show ?thesis .
   24.55  qed
   24.56  
   24.57 @@ -183,7 +183,7 @@
   24.58  proof -
   24.59    assume [simp]: "c \<noteq> 0"
   24.60    have "b / c = a \<longleftrightarrow> (b / c) * c = a * c" by simp
   24.61 -  also have "... \<longleftrightarrow> b = a * c" by (simp add: divide_inverse mult_assoc) 
   24.62 +  also have "... \<longleftrightarrow> b = a * c" by (simp add: divide_inverse mult.assoc) 
   24.63    finally show ?thesis .
   24.64  qed
   24.65  
   24.66 @@ -194,10 +194,10 @@
   24.67    using nonzero_neg_divide_eq_eq[of b a c] by auto
   24.68  
   24.69  lemma divide_eq_imp: "c \<noteq> 0 \<Longrightarrow> b = a * c \<Longrightarrow> b / c = a"
   24.70 -  by (simp add: divide_inverse mult_assoc)
   24.71 +  by (simp add: divide_inverse mult.assoc)
   24.72  
   24.73  lemma eq_divide_imp: "c \<noteq> 0 \<Longrightarrow> a * c = b \<Longrightarrow> a = b / c"
   24.74 -  by (drule sym) (simp add: divide_inverse mult_assoc)
   24.75 +  by (drule sym) (simp add: divide_inverse mult.assoc)
   24.76  
   24.77  lemma add_divide_eq_iff [field_simps]:
   24.78    "z \<noteq> 0 \<Longrightarrow> x + y / z = (x * z + y) / z"
   24.79 @@ -298,7 +298,7 @@
   24.80    fix a :: 'a
   24.81    assume "a \<noteq> 0"
   24.82    thus "inverse a * a = 1" by (rule field_inverse)
   24.83 -  thus "a * inverse a = 1" by (simp only: mult_commute)
   24.84 +  thus "a * inverse a = 1" by (simp only: mult.commute)
   24.85  next
   24.86    fix a b :: 'a
   24.87    show "a / b = a * inverse b" by (rule field_divide_inverse)
   24.88 @@ -325,7 +325,7 @@
   24.89  
   24.90  lemma nonzero_mult_divide_mult_cancel_right [simp]:
   24.91    "\<lbrakk>b \<noteq> 0; c \<noteq> 0\<rbrakk> \<Longrightarrow> (a * c) / (b * c) = a / b"
   24.92 -by (simp add: mult_commute [of _ c])
   24.93 +by (simp add: mult.commute [of _ c])
   24.94  
   24.95  lemma times_divide_eq_left [simp]: "(b / c) * a = (b * a) / c"
   24.96    by (simp add: divide_inverse mult_ac)
   24.97 @@ -346,7 +346,7 @@
   24.98    also have "\<dots> = (x * z + y * w) / (y * z)"
   24.99      by (simp only: add_divide_distrib)
  24.100    finally show ?thesis
  24.101 -    by (simp only: mult_commute)
  24.102 +    by (simp only: mult.commute)
  24.103  qed
  24.104  
  24.105  text{*Special Cancellation Simprules for Division*}
  24.106 @@ -406,7 +406,7 @@
  24.107  
  24.108  lemma inverse_divide [simp]:
  24.109    "inverse (a / b) = b / a"
  24.110 -  by (simp add: divide_inverse mult_commute)
  24.111 +  by (simp add: divide_inverse mult.commute)
  24.112  
  24.113  
  24.114  text {* Calculations with fractions *}
  24.115 @@ -433,7 +433,7 @@
  24.116  
  24.117  lemma divide_divide_eq_left [simp]:
  24.118    "(a / b) / c = a / (b * c)"
  24.119 -  by (simp add: divide_inverse mult_assoc)
  24.120 +  by (simp add: divide_inverse mult.assoc)
  24.121  
  24.122  lemma divide_divide_times_eq:
  24.123    "(x / y) / (z / w) = (x * w) / (y * z)"
  24.124 @@ -538,7 +538,7 @@
  24.125      by (simp add: apos invle less_imp_le mult_left_mono)
  24.126    hence "(a * inverse a) * b \<le> (a * inverse b) * b"
  24.127      by (simp add: bpos less_imp_le mult_right_mono)
  24.128 -  thus "b \<le> a"  by (simp add: mult_assoc apos bpos less_imp_not_eq2)
  24.129 +  thus "b \<le> a"  by (simp add: mult.assoc apos bpos less_imp_not_eq2)
  24.130  qed
  24.131  
  24.132  lemma inverse_positive_imp_positive:
  24.133 @@ -669,7 +669,7 @@
  24.134    hence "(a \<le> b/c) = (a*c \<le> (b/c)*c)"
  24.135      by (simp add: mult_le_cancel_right less_not_sym [OF less] del: times_divide_eq)
  24.136    also have "... = (a*c \<le> b)"
  24.137 -    by (simp add: less_imp_not_eq2 [OF less] divide_inverse mult_assoc) 
  24.138 +    by (simp add: less_imp_not_eq2 [OF less] divide_inverse mult.assoc) 
  24.139    finally show ?thesis .
  24.140  qed
  24.141  
  24.142 @@ -679,7 +679,7 @@
  24.143    hence "(a \<le> b/c) = ((b/c)*c \<le> a*c)"
  24.144      by (simp add: mult_le_cancel_right less_not_sym [OF less] del: times_divide_eq)
  24.145    also have "... = (b \<le> a*c)"
  24.146 -    by (simp add: less_imp_not_eq [OF less] divide_inverse mult_assoc) 
  24.147 +    by (simp add: less_imp_not_eq [OF less] divide_inverse mult.assoc) 
  24.148    finally show ?thesis .
  24.149  qed
  24.150  
  24.151 @@ -689,7 +689,7 @@
  24.152    hence "(a < b/c) = (a*c < (b/c)*c)"
  24.153      by (simp add: mult_less_cancel_right_disj less_not_sym [OF less] del: times_divide_eq)
  24.154    also have "... = (a*c < b)"
  24.155 -    by (simp add: less_imp_not_eq2 [OF less] divide_inverse mult_assoc) 
  24.156 +    by (simp add: less_imp_not_eq2 [OF less] divide_inverse mult.assoc) 
  24.157    finally show ?thesis .
  24.158  qed
  24.159  
  24.160 @@ -699,7 +699,7 @@
  24.161    hence "(a < b/c) = ((b/c)*c < a*c)"
  24.162      by (simp add: mult_less_cancel_right_disj less_not_sym [OF less] del: times_divide_eq)
  24.163    also have "... = (b < a*c)"
  24.164 -    by (simp add: less_imp_not_eq [OF less] divide_inverse mult_assoc) 
  24.165 +    by (simp add: less_imp_not_eq [OF less] divide_inverse mult.assoc) 
  24.166    finally show ?thesis .
  24.167  qed
  24.168  
  24.169 @@ -709,7 +709,7 @@
  24.170    hence "(b/c < a) = ((b/c)*c < a*c)"
  24.171      by (simp add: mult_less_cancel_right_disj less_not_sym [OF less] del: times_divide_eq)
  24.172    also have "... = (b < a*c)"
  24.173 -    by (simp add: less_imp_not_eq2 [OF less] divide_inverse mult_assoc) 
  24.174 +    by (simp add: less_imp_not_eq2 [OF less] divide_inverse mult.assoc) 
  24.175    finally show ?thesis .
  24.176  qed
  24.177  
  24.178 @@ -719,7 +719,7 @@
  24.179    hence "(b/c < a) = (a*c < (b/c)*c)"
  24.180      by (simp add: mult_less_cancel_right_disj less_not_sym [OF less] del: times_divide_eq)
  24.181    also have "... = (a*c < b)"
  24.182 -    by (simp add: less_imp_not_eq [OF less] divide_inverse mult_assoc) 
  24.183 +    by (simp add: less_imp_not_eq [OF less] divide_inverse mult.assoc) 
  24.184    finally show ?thesis .
  24.185  qed
  24.186  
  24.187 @@ -729,7 +729,7 @@
  24.188    hence "(b/c \<le> a) = ((b/c)*c \<le> a*c)"
  24.189      by (simp add: mult_le_cancel_right less_not_sym [OF less] del: times_divide_eq)
  24.190    also have "... = (b \<le> a*c)"
  24.191 -    by (simp add: less_imp_not_eq2 [OF less] divide_inverse mult_assoc) 
  24.192 +    by (simp add: less_imp_not_eq2 [OF less] divide_inverse mult.assoc) 
  24.193    finally show ?thesis .
  24.194  qed
  24.195  
  24.196 @@ -739,7 +739,7 @@
  24.197    hence "(b/c \<le> a) = (a*c \<le> (b/c)*c)"
  24.198      by (simp add: mult_le_cancel_right less_not_sym [OF less] del: times_divide_eq)
  24.199    also have "... = (a*c \<le> b)"
  24.200 -    by (simp add: less_imp_not_eq [OF less] divide_inverse mult_assoc) 
  24.201 +    by (simp add: less_imp_not_eq [OF less] divide_inverse mult.assoc) 
  24.202    finally show ?thesis .
  24.203  qed
  24.204  
  24.205 @@ -1049,7 +1049,7 @@
  24.206  lemma divide_left_mono_neg: "a <= b 
  24.207      ==> c <= 0 ==> 0 < a * b ==> c / a <= c / b"
  24.208    apply (drule divide_left_mono [of _ _ "- c"])
  24.209 -  apply (auto simp add: mult_commute)
  24.210 +  apply (auto simp add: mult.commute)
  24.211  done
  24.212  
  24.213  lemma inverse_le_iff: "inverse a \<le> inverse b \<longleftrightarrow> (0 < a * b \<longrightarrow> b \<le> a) \<and> (a * b \<le> 0 \<longrightarrow> a \<le> b)"
    25.1 --- a/src/HOL/GCD.thy	Fri Jul 04 20:07:08 2014 +0200
    25.2 +++ b/src/HOL/GCD.thy	Fri Jul 04 20:18:47 2014 +0200
    25.3 @@ -410,7 +410,7 @@
    25.4    apply (rule_tac n = k in coprime_dvd_mult_nat)
    25.5    apply (simp add: gcd_assoc_nat)
    25.6    apply (simp add: gcd_commute_nat)
    25.7 -  apply (simp_all add: mult_commute)
    25.8 +  apply (simp_all add: mult.commute)
    25.9  done
   25.10  
   25.11  lemma gcd_mult_cancel_int:
   25.12 @@ -432,9 +432,9 @@
   25.13    with `coprime a d` have "a dvd b" by (simp add: coprime_dvd_mult_iff_nat)
   25.14    from `?lhs` have "b dvd a * c" by (auto intro: dvdI dest: sym)
   25.15    with `coprime b c` have "b dvd a" by (simp add: coprime_dvd_mult_iff_nat)
   25.16 -  from `?lhs` have "c dvd d * b" by (auto intro: dvdI dest: sym simp add: mult_commute)
   25.17 +  from `?lhs` have "c dvd d * b" by (auto intro: dvdI dest: sym simp add: mult.commute)
   25.18    with `coprime b c` have "c dvd d" by (simp add: coprime_dvd_mult_iff_nat gcd_commute_nat)
   25.19 -  from `?lhs` have "d dvd c * a" by (auto intro: dvdI dest: sym simp add: mult_commute)
   25.20 +  from `?lhs` have "d dvd c * a" by (auto intro: dvdI dest: sym simp add: mult.commute)
   25.21    with `coprime a d` have "d dvd c" by (simp add: coprime_dvd_mult_iff_nat gcd_commute_nat)
   25.22    from `a dvd b` `b dvd a` have "a = b" by (rule Nat.dvd.antisym)
   25.23    moreover from `c dvd d` `d dvd c` have "c = d" by (rule Nat.dvd.antisym)
   25.24 @@ -456,7 +456,7 @@
   25.25  
   25.26  lemma gcd_add2_nat [simp]: "gcd (m::nat) (m + n) = gcd m n"
   25.27    apply (subst (1 2) gcd_commute_nat)
   25.28 -  apply (subst add_commute)
   25.29 +  apply (subst add.commute)
   25.30    apply simp
   25.31  done
   25.32  
   25.33 @@ -496,16 +496,16 @@
   25.34  done
   25.35  
   25.36  lemma gcd_add1_int [simp]: "gcd ((m::int) + n) n = gcd m n"
   25.37 -by (metis gcd_red_int mod_add_self1 add_commute)
   25.38 +by (metis gcd_red_int mod_add_self1 add.commute)
   25.39  
   25.40  lemma gcd_add2_int [simp]: "gcd m ((m::int) + n) = gcd m n"
   25.41 -by (metis gcd_add1_int gcd_commute_int add_commute)
   25.42 +by (metis gcd_add1_int gcd_commute_int add.commute)
   25.43  
   25.44  lemma gcd_add_mult_nat: "gcd (m::nat) (k * m + n) = gcd m n"
   25.45  by (metis mod_mult_self3 gcd_commute_nat gcd_red_nat)
   25.46  
   25.47  lemma gcd_add_mult_int: "gcd (m::int) (k * m + n) = gcd m n"
   25.48 -by (metis gcd_commute_int gcd_red_int mod_mult_self1 add_commute)
   25.49 +by (metis gcd_commute_int gcd_red_int mod_mult_self1 add.commute)
   25.50  
   25.51  
   25.52  (* to do: differences, and all variations of addition rules
   25.53 @@ -778,7 +778,7 @@
   25.54      by (auto simp:div_gcd_coprime_nat)
   25.55    hence "gcd ((a div gcd a b)^n * (gcd a b)^n)
   25.56        ((b div gcd a b)^n * (gcd a b)^n) = (gcd a b)^n"
   25.57 -    apply (subst (1 2) mult_commute)
   25.58 +    apply (subst (1 2) mult.commute)
   25.59      apply (subst gcd_mult_distrib_nat [symmetric])
   25.60      apply simp
   25.61      done
   25.62 @@ -820,10 +820,10 @@
   25.63      from ab'(1) have "a' dvd a"  unfolding dvd_def by blast
   25.64      with dc have th0: "a' dvd b*c" using dvd_trans[of a' a "b*c"] by simp
   25.65      from dc ab'(1,2) have "a'*?g dvd (b'*?g) *c" by auto
   25.66 -    hence "?g*a' dvd ?g * (b' * c)" by (simp add: mult_assoc)
   25.67 +    hence "?g*a' dvd ?g * (b' * c)" by (simp add: mult.assoc)
   25.68      with z have th_1: "a' dvd b' * c" by auto
   25.69      from coprime_dvd_mult_nat[OF ab'(3)] th_1
   25.70 -    have thc: "a' dvd c" by (subst (asm) mult_commute, blast)
   25.71 +    have thc: "a' dvd c" by (subst (asm) mult.commute, blast)
   25.72      from ab' have "a = ?g*a'" by algebra
   25.73      with thb thc have ?thesis by blast }
   25.74    ultimately show ?thesis by blast
   25.75 @@ -844,10 +844,10 @@
   25.76      with dc have th0: "a' dvd b*c"
   25.77        using dvd_trans[of a' a "b*c"] by simp
   25.78      from dc ab'(1,2) have "a'*?g dvd (b'*?g) *c" by auto
   25.79 -    hence "?g*a' dvd ?g * (b' * c)" by (simp add: mult_assoc)
   25.80 +    hence "?g*a' dvd ?g * (b' * c)" by (simp add: mult.assoc)
   25.81      with z have th_1: "a' dvd b' * c" by auto
   25.82      from coprime_dvd_mult_int[OF ab'(3)] th_1
   25.83 -    have thc: "a' dvd c" by (subst (asm) mult_commute, blast)
   25.84 +    have thc: "a' dvd c" by (subst (asm) mult.commute, blast)
   25.85      from ab' have "a = ?g*a'" by algebra
   25.86      with thb thc have ?thesis by blast }
   25.87    ultimately show ?thesis by blast
   25.88 @@ -869,13 +869,13 @@
   25.89      from ab have "(a' * ?g) ^ n dvd (b' * ?g)^n"
   25.90        by (simp add: ab'(1,2)[symmetric])
   25.91      hence "?g^n*a'^n dvd ?g^n *b'^n"
   25.92 -      by (simp only: power_mult_distrib mult_commute)
   25.93 +      by (simp only: power_mult_distrib mult.commute)
   25.94      with zn z n have th0:"a'^n dvd b'^n" by auto
   25.95      have "a' dvd a'^n" by (simp add: m)
   25.96      with th0 have "a' dvd b'^n" using dvd_trans[of a' "a'^n" "b'^n"] by simp
   25.97 -    hence th1: "a' dvd b'^m * b'" by (simp add: m mult_commute)
   25.98 +    hence th1: "a' dvd b'^m * b'" by (simp add: m mult.commute)
   25.99      from coprime_dvd_mult_nat[OF coprime_exp_nat [OF ab'(3), of m]] th1
  25.100 -    have "a' dvd b'" by (subst (asm) mult_commute, blast)
  25.101 +    have "a' dvd b'" by (subst (asm) mult.commute, blast)
  25.102      hence "a'*?g dvd b'*?g" by simp
  25.103      with ab'(1,2)  have ?thesis by simp }
  25.104    ultimately show ?thesis by blast
  25.105 @@ -897,14 +897,14 @@
  25.106      from ab have "(a' * ?g) ^ n dvd (b' * ?g)^n"
  25.107        by (simp add: ab'(1,2)[symmetric])
  25.108      hence "?g^n*a'^n dvd ?g^n *b'^n"
  25.109 -      by (simp only: power_mult_distrib mult_commute)
  25.110 +      by (simp only: power_mult_distrib mult.commute)
  25.111      with zn z n have th0:"a'^n dvd b'^n" by auto
  25.112      have "a' dvd a'^n" by (simp add: m)
  25.113      with th0 have "a' dvd b'^n"
  25.114        using dvd_trans[of a' "a'^n" "b'^n"] by simp
  25.115 -    hence th1: "a' dvd b'^m * b'" by (simp add: m mult_commute)
  25.116 +    hence th1: "a' dvd b'^m * b'" by (simp add: m mult.commute)
  25.117      from coprime_dvd_mult_int[OF coprime_exp_int [OF ab'(3), of m]] th1
  25.118 -    have "a' dvd b'" by (subst (asm) mult_commute, blast)
  25.119 +    have "a' dvd b'" by (subst (asm) mult.commute, blast)
  25.120      hence "a'*?g dvd b'*?g" by simp
  25.121      with ab'(1,2)  have ?thesis by simp }
  25.122    ultimately show ?thesis by blast
  25.123 @@ -922,7 +922,7 @@
  25.124  proof-
  25.125    from mr nr obtain m' n' where m': "r = m*m'" and n': "r = n*n'"
  25.126      unfolding dvd_def by blast
  25.127 -  from mr n' have "m dvd n'*n" by (simp add: mult_commute)
  25.128 +  from mr n' have "m dvd n'*n" by (simp add: mult.commute)
  25.129    hence "m dvd n'" using coprime_dvd_mult_iff_nat[OF mn] by simp
  25.130    then obtain k where k: "n' = m*k" unfolding dvd_def by blast
  25.131    from n' k show ?thesis unfolding dvd_def by auto
  25.132 @@ -934,7 +934,7 @@
  25.133  proof-
  25.134    from mr nr obtain m' n' where m': "r = m*m'" and n': "r = n*n'"
  25.135      unfolding dvd_def by blast
  25.136 -  from mr n' have "m dvd n'*n" by (simp add: mult_commute)
  25.137 +  from mr n' have "m dvd n'*n" by (simp add: mult.commute)
  25.138    hence "m dvd n'" using coprime_dvd_mult_iff_int[OF mn] by simp
  25.139    then obtain k where k: "n' = m*k" unfolding dvd_def by blast
  25.140    from n' k show ?thesis unfolding dvd_def by auto
  25.141 @@ -1218,14 +1218,14 @@
  25.142            from H (3) have "d + (b - 1) * (b*x) = d + (b - 1) * (a*y + d)"
  25.143              by simp
  25.144            hence "d + (b - 1) * a * y + (b - 1) * d = d + (b - 1) * b * x"
  25.145 -            by (simp only: mult_assoc distrib_left)
  25.146 +            by (simp only: mult.assoc distrib_left)
  25.147            hence "a * ((b - 1) * y) + d * (b - 1 + 1) = d + x*b*(b - 1)"
  25.148              by algebra
  25.149            hence "a * ((b - 1) * y) = d + x*b*(b - 1) - d*b" using bp by simp
  25.150            hence "a * ((b - 1) * y) = d + (x*b*(b - 1) - d*b)"
  25.151              by (simp only: diff_add_assoc[OF dble, of d, symmetric])
  25.152            hence "a * ((b - 1) * y) = b*(x*(b - 1) - d) + d"
  25.153 -            by (simp only: diff_mult_distrib2 add_commute mult_ac)
  25.154 +            by (simp only: diff_mult_distrib2 add.commute mult_ac)
  25.155            hence ?thesis using H(1,2)
  25.156              apply -
  25.157              apply (rule exI[where x=d], simp)
  25.158 @@ -1674,7 +1674,7 @@
  25.159  apply(auto simp add:inj_on_def)
  25.160  apply (metis coprime_dvd_mult_iff_nat dvd.neq_le_trans dvd_triv_left)
  25.161  apply (metis gcd_semilattice_nat.inf_commute coprime_dvd_mult_iff_nat
  25.162 -             dvd.neq_le_trans dvd_triv_right mult_commute)
  25.163 +             dvd.neq_le_trans dvd_triv_right mult.commute)
  25.164  done
  25.165  
  25.166  text{* Nitpick: *}
    26.1 --- a/src/HOL/Groups.thy	Fri Jul 04 20:07:08 2014 +0200
    26.2 +++ b/src/HOL/Groups.thy	Fri Jul 04 20:18:47 2014 +0200
    26.3 @@ -158,6 +158,8 @@
    26.4  
    26.5  end
    26.6  
    26.7 +hide_fact add_assoc
    26.8 +
    26.9  class ab_semigroup_add = semigroup_add +
   26.10    assumes add_commute [algebra_simps, field_simps]: "a + b = b + a"
   26.11  begin
   26.12 @@ -165,13 +167,15 @@
   26.13  sublocale add!: abel_semigroup plus
   26.14    by default (fact add_commute)
   26.15  
   26.16 -lemmas add_left_commute [algebra_simps, field_simps] = add.left_commute
   26.17 +declare add.left_commute [algebra_simps, field_simps]
   26.18  
   26.19 -theorems add_ac = add_assoc add_commute add_left_commute
   26.20 +theorems add_ac = add.assoc add.commute add.left_commute
   26.21  
   26.22  end
   26.23  
   26.24 -theorems add_ac = add_assoc add_commute add_left_commute
   26.25 +hide_fact add_commute
   26.26 +
   26.27 +theorems add_ac = add.assoc add.commute add.left_commute
   26.28  
   26.29  class semigroup_mult = times +
   26.30    assumes mult_assoc [algebra_simps, field_simps]: "(a * b) * c = a * (b * c)"
   26.31 @@ -182,6 +186,8 @@
   26.32  
   26.33  end
   26.34  
   26.35 +hide_fact mult_assoc
   26.36 +
   26.37  class ab_semigroup_mult = semigroup_mult +
   26.38    assumes mult_commute [algebra_simps, field_simps]: "a * b = b * a"
   26.39  begin
   26.40 @@ -189,13 +195,15 @@
   26.41  sublocale mult!: abel_semigroup times
   26.42    by default (fact mult_commute)
   26.43  
   26.44 -lemmas mult_left_commute [algebra_simps, field_simps] = mult.left_commute
   26.45 +declare mult.left_commute [algebra_simps, field_simps]
   26.46  
   26.47 -theorems mult_ac = mult_assoc mult_commute mult_left_commute
   26.48 +theorems mult_ac = mult.assoc mult.commute mult.left_commute
   26.49  
   26.50  end
   26.51  
   26.52 -theorems mult_ac = mult_assoc mult_commute mult_left_commute
   26.53 +hide_fact mult_commute
   26.54 +
   26.55 +theorems mult_ac = mult.assoc mult.commute mult.left_commute
   26.56  
   26.57  class monoid_add = zero + semigroup_add +
   26.58    assumes add_0_left: "0 + a = a"
   26.59 @@ -325,7 +333,7 @@
   26.60  next
   26.61    fix a b c :: 'a
   26.62    assume "b + a = c + a"
   26.63 -  then have "a + b = a + c" by (simp only: add_commute)
   26.64 +  then have "a + b = a + c" by (simp only: add.commute)
   26.65    then show "b = c" by (rule add_imp_eq)
   26.66  qed
   26.67  
   26.68 @@ -349,7 +357,7 @@
   26.69    assumes "a + b = 0" shows "- a = b"
   26.70  proof -
   26.71    have "- a = - a + (a + b)" using assms by simp
   26.72 -  also have "\<dots> = b" by (simp add: add_assoc [symmetric])
   26.73 +  also have "\<dots> = b" by (simp add: add.assoc [symmetric])
   26.74    finally show ?thesis .
   26.75  qed
   26.76  
   26.77 @@ -381,36 +389,36 @@
   26.78    fix a b c :: 'a
   26.79    assume "a + b = a + c"
   26.80    then have "- a + a + b = - a + a + c"
   26.81 -    unfolding add_assoc by simp
   26.82 +    unfolding add.assoc by simp
   26.83    then show "b = c" by simp
   26.84  next
   26.85    fix a b c :: 'a
   26.86    assume "b + a = c + a"
   26.87    then have "b + a + - a = c + a  + - a" by simp
   26.88 -  then show "b = c" unfolding add_assoc by simp
   26.89 +  then show "b = c" unfolding add.assoc by simp
   26.90  qed
   26.91  
   26.92  lemma minus_add_cancel [simp]:
   26.93    "- a + (a + b) = b"
   26.94 -  by (simp add: add_assoc [symmetric])
   26.95 +  by (simp add: add.assoc [symmetric])
   26.96  
   26.97  lemma add_minus_cancel [simp]:
   26.98    "a + (- a + b) = b"
   26.99 -  by (simp add: add_assoc [symmetric])
  26.100 +  by (simp add: add.assoc [symmetric])
  26.101  
  26.102  lemma diff_add_cancel [simp]:
  26.103    "a - b + b = a"
  26.104 -  by (simp only: diff_conv_add_uminus add_assoc) simp
  26.105 +  by (simp only: diff_conv_add_uminus add.assoc) simp
  26.106  
  26.107  lemma add_diff_cancel [simp]:
  26.108    "a + b - b = a"
  26.109 -  by (simp only: diff_conv_add_uminus add_assoc) simp
  26.110 +  by (simp only: diff_conv_add_uminus add.assoc) simp
  26.111  
  26.112  lemma minus_add:
  26.113    "- (a + b) = - b + - a"
  26.114  proof -
  26.115    have "(a + b) + (- b + - a) = 0"
  26.116 -    by (simp only: add_assoc add_minus_cancel) simp
  26.117 +    by (simp only: add.assoc add_minus_cancel) simp
  26.118    then show "- (a + b) = - b + - a"
  26.119      by (rule minus_unique)
  26.120  qed
  26.121 @@ -419,7 +427,7 @@
  26.122    "a - b = 0 \<longleftrightarrow> a = b"
  26.123  proof
  26.124    assume "a - b = 0"
  26.125 -  have "a = (a - b) + b" by (simp add: add_assoc)
  26.126 +  have "a = (a - b) + b" by (simp add: add.assoc)
  26.127    also have "\<dots> = b" using `a - b = 0` by simp
  26.128    finally show "a = b" .
  26.129  next
  26.130 @@ -484,7 +492,7 @@
  26.131  next
  26.132    assume "a + b = 0"
  26.133    moreover have "a + (b + - b) = (a + b) + - b"
  26.134 -    by (simp only: add_assoc)
  26.135 +    by (simp only: add.assoc)
  26.136    ultimately show "a = - b" by simp
  26.137  qed
  26.138  
  26.139 @@ -502,15 +510,15 @@
  26.140  
  26.141  lemma minus_diff_eq [simp]:
  26.142    "- (a - b) = b - a"
  26.143 -  by (simp only: neg_eq_iff_add_eq_0 diff_conv_add_uminus add_assoc minus_add_cancel) simp
  26.144 +  by (simp only: neg_eq_iff_add_eq_0 diff_conv_add_uminus add.assoc minus_add_cancel) simp
  26.145  
  26.146  lemma add_diff_eq [algebra_simps, field_simps]:
  26.147    "a + (b - c) = (a + b) - c"
  26.148 -  by (simp only: diff_conv_add_uminus add_assoc)
  26.149 +  by (simp only: diff_conv_add_uminus add.assoc)
  26.150  
  26.151  lemma diff_add_eq_diff_diff_swap:
  26.152    "a - (b + c) = a - c - b"
  26.153 -  by (simp only: diff_conv_add_uminus add_assoc minus_add)
  26.154 +  by (simp only: diff_conv_add_uminus add.assoc minus_add)
  26.155  
  26.156  lemma diff_eq_eq [algebra_simps, field_simps]:
  26.157    "a - b = c \<longleftrightarrow> a = c + b"
  26.158 @@ -522,7 +530,7 @@
  26.159  
  26.160  lemma diff_diff_eq2 [algebra_simps, field_simps]:
  26.161    "a - (b - c) = (a + c) - b"
  26.162 -  by (simp only: diff_conv_add_uminus add_assoc) simp
  26.163 +  by (simp only: diff_conv_add_uminus add.assoc) simp
  26.164  
  26.165  lemma diff_eq_diff_eq:
  26.166    "a - b = c - d \<Longrightarrow> a = b \<longleftrightarrow> c = d"
  26.167 @@ -543,13 +551,13 @@
  26.168    fix a b c :: 'a
  26.169    assume "a + b = a + c"
  26.170    then have "- a + a + b = - a + a + c"
  26.171 -    by (simp only: add_assoc)
  26.172 +    by (simp only: add.assoc)
  26.173    then show "b = c" by simp
  26.174  qed
  26.175  
  26.176  lemma uminus_add_conv_diff [simp]:
  26.177    "- a + b = b - a"
  26.178 -  by (simp add: add_commute)
  26.179 +  by (simp add: add.commute)
  26.180  
  26.181  lemma minus_add_distrib [simp]:
  26.182    "- (a + b) = - a + - b"
  26.183 @@ -595,13 +603,13 @@
  26.184  
  26.185  lemma add_right_mono:
  26.186    "a \<le> b \<Longrightarrow> a + c \<le> b + c"
  26.187 -by (simp add: add_commute [of _ c] add_left_mono)
  26.188 +by (simp add: add.commute [of _ c] add_left_mono)
  26.189  
  26.190  text {* non-strict, in both arguments *}
  26.191  lemma add_mono:
  26.192    "a \<le> b \<Longrightarrow> c \<le> d \<Longrightarrow> a + c \<le> b + d"
  26.193    apply (erule add_right_mono [THEN order_trans])
  26.194 -  apply (simp add: add_commute add_left_mono)
  26.195 +  apply (simp add: add.commute add_left_mono)
  26.196    done
  26.197  
  26.198  end
  26.199 @@ -616,7 +624,7 @@
  26.200  
  26.201  lemma add_strict_right_mono:
  26.202    "a < b \<Longrightarrow> a + c < b + c"
  26.203 -by (simp add: add_commute [of _ c] add_strict_left_mono)
  26.204 +by (simp add: add.commute [of _ c] add_strict_left_mono)
  26.205  
  26.206  text{*Strict monotonicity in both arguments*}
  26.207  lemma add_strict_mono:
  26.208 @@ -665,7 +673,7 @@
  26.209  lemma add_less_imp_less_right:
  26.210    "a + c < b + c \<Longrightarrow> a < b"
  26.211  apply (rule add_less_imp_less_left [of c])
  26.212 -apply (simp add: add_commute)  
  26.213 +apply (simp add: add.commute)  
  26.214  done
  26.215  
  26.216  lemma add_less_cancel_left [simp]:
  26.217 @@ -682,7 +690,7 @@
  26.218  
  26.219  lemma add_le_cancel_right [simp]:
  26.220    "a + c \<le> b + c \<longleftrightarrow> a \<le> b"
  26.221 -  by (simp add: add_commute [of a c] add_commute [of b c])
  26.222 +  by (simp add: add.commute [of a c] add.commute [of b c])
  26.223  
  26.224  lemma add_le_imp_le_right:
  26.225    "a + c \<le> b + c \<Longrightarrow> a \<le> b"
  26.226 @@ -721,45 +729,45 @@
  26.227  
  26.228  lemma add_diff_assoc:
  26.229    "c + (b - a) = c + b - a"
  26.230 -  using `a \<le> b` by (auto simp add: le_iff_add add_left_commute [of c])
  26.231 +  using `a \<le> b` by (auto simp add: le_iff_add add.left_commute [of c])
  26.232  
  26.233  lemma add_diff_assoc2:
  26.234    "b - a + c = b + c - a"
  26.235 -  using `a \<le> b` by (auto simp add: le_iff_add add_assoc)
  26.236 +  using `a \<le> b` by (auto simp add: le_iff_add add.assoc)
  26.237  
  26.238  lemma diff_add_assoc:
  26.239    "c + b - a = c + (b - a)"
  26.240 -  using `a \<le> b` by (simp add: add_commute add_diff_assoc)
  26.241 +  using `a \<le> b` by (simp add: add.commute add_diff_assoc)
  26.242  
  26.243  lemma diff_add_assoc2:
  26.244    "b + c - a = b - a + c"
  26.245 -  using `a \<le> b`by (simp add: add_commute add_diff_assoc)
  26.246 +  using `a \<le> b`by (simp add: add.commute add_diff_assoc)
  26.247  
  26.248  lemma diff_diff_right:
  26.249    "c - (b - a) = c + a - b"
  26.250 -  by (simp add: add_diff_inverse add_diff_cancel_left [of a c "b - a", symmetric] add_commute)
  26.251 +  by (simp add: add_diff_inverse add_diff_cancel_left [of a c "b - a", symmetric] add.commute)
  26.252  
  26.253  lemma diff_add:
  26.254    "b - a + a = b"
  26.255 -  by (simp add: add_commute add_diff_inverse)
  26.256 +  by (simp add: add.commute add_diff_inverse)
  26.257  
  26.258  lemma le_add_diff:
  26.259    "c \<le> b + c - a"
  26.260 -  by (auto simp add: add_commute diff_add_assoc2 le_iff_add)
  26.261 +  by (auto simp add: add.commute diff_add_assoc2 le_iff_add)
  26.262  
  26.263  lemma le_imp_diff_is_add:
  26.264    "a \<le> b \<Longrightarrow> b - a = c \<longleftrightarrow> b = c + a"
  26.265 -  by (auto simp add: add_commute add_diff_inverse)
  26.266 +  by (auto simp add: add.commute add_diff_inverse)
  26.267  
  26.268  lemma le_diff_conv2:
  26.269    "c \<le> b - a \<longleftrightarrow> c + a \<le> b" (is "?P \<longleftrightarrow> ?Q")
  26.270  proof
  26.271    assume ?P
  26.272    then have "c + a \<le> b - a + a" by (rule add_right_mono)
  26.273 -  then show ?Q by (simp add: add_diff_inverse add_commute)
  26.274 +  then show ?Q by (simp add: add_diff_inverse add.commute)
  26.275  next
  26.276    assume ?Q
  26.277 -  then have "a + c \<le> a + (b - a)" by (simp add: add_diff_inverse add_commute)
  26.278 +  then have "a + c \<le> a + (b - a)" by (simp add: add_diff_inverse add.commute)
  26.279    then show ?P by simp
  26.280  qed
  26.281  
  26.282 @@ -860,7 +868,7 @@
  26.283  
  26.284  lemma add_increasing2:
  26.285    "0 \<le> c \<Longrightarrow> b \<le> a \<Longrightarrow> b \<le> a + c"
  26.286 -  by (simp add: add_increasing add_commute [of a])
  26.287 +  by (simp add: add_increasing add.commute [of a])
  26.288  
  26.289  lemma add_strict_increasing:
  26.290    "0 < a \<Longrightarrow> b \<le> c \<Longrightarrow> b < a + c"
  26.291 @@ -883,7 +891,7 @@
  26.292    fix a b c :: 'a
  26.293    assume "c + a \<le> c + b"
  26.294    hence "(-c) + (c + a) \<le> (-c) + (c + b)" by (rule add_left_mono)
  26.295 -  hence "((-c) + c) + a \<le> ((-c) + c) + b" by (simp only: add_assoc)
  26.296 +  hence "((-c) + c) + a \<le> ((-c) + c) + b" by (simp only: add.assoc)
  26.297    thus "a \<le> b" by simp
  26.298  qed
  26.299  
    27.1 --- a/src/HOL/Groups_Big.thy	Fri Jul 04 20:07:08 2014 +0200
    27.2 +++ b/src/HOL/Groups_Big.thy	Fri Jul 04 20:18:47 2014 +0200
    27.3 @@ -958,7 +958,7 @@
    27.4    shows "setsum (\<lambda>i. card {j\<in>T. R i j}) S = k * card T" (is "?l = ?r")
    27.5  proof-
    27.6    have "?l = setsum (\<lambda>i. k) T" by (rule setsum_multicount_gen) (auto simp: assms)
    27.7 -  also have "\<dots> = ?r" by (simp add: mult_commute)
    27.8 +  also have "\<dots> = ?r" by (simp add: mult.commute)
    27.9    finally show ?thesis by auto
   27.10  qed
   27.11  
    28.1 --- a/src/HOL/HOL.thy	Fri Jul 04 20:07:08 2014 +0200
    28.2 +++ b/src/HOL/HOL.thy	Fri Jul 04 20:18:47 2014 +0200
    28.3 @@ -977,10 +977,10 @@
    28.4    by blast
    28.5  
    28.6  lemma eq_ac:
    28.7 -  shows eq_commute: "(a=b) = (b=a)"
    28.8 -    and eq_left_commute: "(P=(Q=R)) = (Q=(P=R))"
    28.9 -    and eq_assoc: "((P=Q)=R) = (P=(Q=R))" by (iprover, blast+)
   28.10 -lemma neq_commute: "(a~=b) = (b~=a)" by iprover
   28.11 +  shows eq_commute: "a = b \<longleftrightarrow> b = a"
   28.12 +    and iff_left_commute: "(P \<longleftrightarrow> (Q \<longleftrightarrow> R)) \<longleftrightarrow> (Q \<longleftrightarrow> (P \<longleftrightarrow> R))"
   28.13 +    and iff_assoc: "((P \<longleftrightarrow> Q) \<longleftrightarrow> R) \<longleftrightarrow> (P \<longleftrightarrow> (Q \<longleftrightarrow> R))" by (iprover, blast+)
   28.14 +lemma neq_commute: "a \<noteq> b \<longleftrightarrow> b \<noteq> a" by iprover
   28.15  
   28.16  lemma conj_comms:
   28.17    shows conj_commute: "(P&Q) = (Q&P)"
    29.1 --- a/src/HOL/HOLCF/FOCUS/Buffer_adm.thy	Fri Jul 04 20:07:08 2014 +0200
    29.2 +++ b/src/HOL/HOLCF/FOCUS/Buffer_adm.thy	Fri Jul 04 20:18:47 2014 +0200
    29.3 @@ -123,7 +123,7 @@
    29.4  apply (rule allI)
    29.5  apply (induct_tac "i")
    29.6  apply ( simp)
    29.7 -apply (simp add: add_commute)
    29.8 +apply (simp add: add.commute)
    29.9  apply (intro strip)
   29.10  apply (subst BufAC_Cmt_F_def3)
   29.11  apply (drule_tac P="%x. x" in BufAC_Cmt_F_def3 [THEN subst])
    30.1 --- a/src/HOL/Hahn_Banach/Function_Norm.thy	Fri Jul 04 20:07:08 2014 +0200
    30.2 +++ b/src/HOL/Hahn_Banach/Function_Norm.thy	Fri Jul 04 20:18:47 2014 +0200
    30.3 @@ -141,7 +141,7 @@
    30.4              then show "0 \<le> inverse \<parallel>x\<parallel>" by (rule order_less_imp_le)
    30.5            qed
    30.6            also have "\<dots> = c * (\<parallel>x\<parallel> * inverse \<parallel>x\<parallel>)"
    30.7 -            by (rule Groups.mult_assoc)
    30.8 +            by (rule Groups.mult.assoc)
    30.9            also
   30.10            from gt have "\<parallel>x\<parallel> \<noteq> 0" by simp
   30.11            then have "\<parallel>x\<parallel> * inverse \<parallel>x\<parallel> = 1" by simp 
    31.1 --- a/src/HOL/Hahn_Banach/Vector_Space.thy	Fri Jul 04 20:07:08 2014 +0200
    31.2 +++ b/src/HOL/Hahn_Banach/Vector_Space.thy	Fri Jul 04 20:18:47 2014 +0200
    31.3 @@ -209,9 +209,9 @@
    31.4  proof
    31.5    from y have "y = 0 + y" by simp
    31.6    also from x y have "\<dots> = (- x + x) + y" by simp
    31.7 -  also from x y have "\<dots> = - x + (x + y)" by (simp add: add_assoc)
    31.8 +  also from x y have "\<dots> = - x + (x + y)" by (simp add: add.assoc)
    31.9    also assume "x + y = x + z"
   31.10 -  also from x z have "- x + (x + z) = - x + x + z" by (simp add: add_assoc)
   31.11 +  also from x z have "- x + (x + z) = - x + x + z" by (simp add: add.assoc)
   31.12    also from x z have "\<dots> = z" by simp
   31.13    finally show "y = z" .
   31.14  next
   31.15 @@ -228,7 +228,7 @@
   31.16    by (simp only: add_assoc [symmetric])
   31.17  
   31.18  lemma mult_left_commute: "x \<in> V \<Longrightarrow> a \<cdot> b \<cdot> x = b \<cdot> a \<cdot> x"
   31.19 -  by (simp add: mult_commute mult_assoc2)
   31.20 +  by (simp add: mult.commute mult_assoc2)
   31.21  
   31.22  lemma mult_zero_uniq:
   31.23    assumes x: "x \<in> V"  "x \<noteq> 0" and ax: "a \<cdot> x = 0"
    32.1 --- a/src/HOL/Hoare_Parallel/RG_Examples.thy	Fri Jul 04 20:07:08 2014 +0200
    32.2 +++ b/src/HOL/Hoare_Parallel/RG_Examples.thy	Fri Jul 04 20:18:47 2014 +0200
    32.3 @@ -52,7 +52,7 @@
    32.4     apply force
    32.5    apply(erule le_less_trans2) 
    32.6    apply(case_tac t,simp+)
    32.7 -  apply (simp add:add_commute)
    32.8 +  apply (simp add:add.commute)
    32.9    apply(simp add: add_le_mono)
   32.10  apply(rule Basic)
   32.11     apply simp
   32.12 @@ -61,7 +61,7 @@
   32.13      apply simp
   32.14     apply(erule le_less_trans2)
   32.15     apply(case_tac t,simp+)
   32.16 -   apply (simp add:add_commute)
   32.17 +   apply (simp add:add.commute)
   32.18     apply(rule add_le_mono, auto)
   32.19  done
   32.20  
    33.1 --- a/src/HOL/IMP/ACom.thy	Fri Jul 04 20:07:08 2014 +0200
    33.2 +++ b/src/HOL/IMP/ACom.thy	Fri Jul 04 20:18:47 2014 +0200
    33.3 @@ -104,7 +104,7 @@
    33.4  apply(induction c arbitrary: f p)
    33.5  apply (auto simp: anno_def nth_append nth_Cons numeral_eq_Suc shift_def
    33.6              split: nat.split)
    33.7 -  apply (metis add_Suc_right add_diff_inverse nat_add_commute)
    33.8 +  apply (metis add_Suc_right add_diff_inverse add.commute)
    33.9   apply(rule_tac f=f in arg_cong)
   33.10   apply arith
   33.11  apply (metis less_Suc_eq)
    34.1 --- a/src/HOL/IMP/Abs_Int0.thy	Fri Jul 04 20:07:08 2014 +0200
    34.2 +++ b/src/HOL/IMP/Abs_Int0.thy	Fri Jul 04 20:18:47 2014 +0200
    34.3 @@ -317,7 +317,7 @@
    34.4  "m_s S X = (\<Sum> x \<in> X. m(S x))"
    34.5  
    34.6  lemma m_s_h: "finite X \<Longrightarrow> m_s S X \<le> h * card X"
    34.7 -by(simp add: m_s_def) (metis nat_mult_commute of_nat_id setsum_bounded[OF h])
    34.8 +by(simp add: m_s_def) (metis mult.commute of_nat_id setsum_bounded[OF h])
    34.9  
   34.10  fun m_o :: "'av st option \<Rightarrow> vname set \<Rightarrow> nat" ("m\<^sub>o") where
   34.11  "m_o (Some S) X = m_s S X" |
    35.1 --- a/src/HOL/IMP/Abs_Int1.thy	Fri Jul 04 20:07:08 2014 +0200
    35.2 +++ b/src/HOL/IMP/Abs_Int1.thy	Fri Jul 04 20:18:47 2014 +0200
    35.3 @@ -109,7 +109,7 @@
    35.4  "m_s S X = (\<Sum> x \<in> X. m(fun S x))"
    35.5  
    35.6  lemma m_s_h: "finite X \<Longrightarrow> m_s S X \<le> h * card X"
    35.7 -by(simp add: m_s_def) (metis nat_mult_commute of_nat_id setsum_bounded[OF h])
    35.8 +by(simp add: m_s_def) (metis mult.commute of_nat_id setsum_bounded[OF h])
    35.9  
   35.10  definition m_o :: "'av st option \<Rightarrow> vname set \<Rightarrow> nat" ("m\<^sub>o") where
   35.11  "m_o opt X = (case opt of None \<Rightarrow> h * card X + 1 | Some S \<Rightarrow> m_s S X)"
    36.1 --- a/src/HOL/IMP/Abs_Int_Den/Abs_Int_den1_ivl.thy	Fri Jul 04 20:07:08 2014 +0200
    36.2 +++ b/src/HOL/IMP/Abs_Int_Den/Abs_Int_den1_ivl.thy	Fri Jul 04 20:18:47 2014 +0200
    36.3 @@ -193,7 +193,7 @@
    36.4  proof
    36.5    case goal1 thus ?case
    36.6      by(auto simp add: filter_plus_ivl_def)
    36.7 -      (metis rep_minus_ivl add_diff_cancel add_commute)+
    36.8 +      (metis rep_minus_ivl add_diff_cancel add.commute)+
    36.9  next
   36.10    case goal2 thus ?case
   36.11      by(cases a1, cases a2,
    37.1 --- a/src/HOL/IMP/Abs_Int_ITP/Abs_Int2_ivl_ITP.thy	Fri Jul 04 20:07:08 2014 +0200
    37.2 +++ b/src/HOL/IMP/Abs_Int_ITP/Abs_Int2_ivl_ITP.thy	Fri Jul 04 20:18:47 2014 +0200
    37.3 @@ -208,7 +208,7 @@
    37.4  next
    37.5    case goal2 thus ?case
    37.6      by(auto simp add: filter_plus_ivl_def)
    37.7 -      (metis gamma_minus_ivl add_diff_cancel add_commute)+
    37.8 +      (metis gamma_minus_ivl add_diff_cancel add.commute)+
    37.9  next
   37.10    case goal3 thus ?case
   37.11      by(cases a1, cases a2,
    38.1 --- a/src/HOL/Int.thy	Fri Jul 04 20:07:08 2014 +0200
    38.2 +++ b/src/HOL/Int.thy	Fri Jul 04 20:18:47 2014 +0200
    38.3 @@ -567,7 +567,7 @@
    38.4    "(1 + z + z < 0) = (z < (0::int))"
    38.5  proof (cases z)
    38.6    case (nonneg n)
    38.7 -  thus ?thesis by (simp add: linorder_not_less add_assoc add_increasing
    38.8 +  thus ?thesis by (simp add: linorder_not_less add.assoc add_increasing
    38.9                               le_imp_0_less [THEN order_less_imp_le])  
   38.10  next
   38.11    case (neg n)
   38.12 @@ -585,7 +585,7 @@
   38.13    case (nonneg n)
   38.14    have le: "0 \<le> z+z" by (simp add: nonneg add_increasing) 
   38.15    thus ?thesis using  le_imp_0_less [OF le]
   38.16 -    by (auto simp add: add_assoc) 
   38.17 +    by (auto simp add: add.assoc) 
   38.18  next
   38.19    case (neg n)
   38.20    show ?thesis
   38.21 @@ -594,7 +594,7 @@
   38.22      have "(0::int) < 1 + (int n + int n)"
   38.23        by (simp add: le_imp_0_less add_increasing) 
   38.24      also have "... = - (1 + z + z)" 
   38.25 -      by (simp add: neg add_assoc [symmetric]) 
   38.26 +      by (simp add: neg add.assoc [symmetric]) 
   38.27      also have "... = 0" by (simp add: eq) 
   38.28      finally have "0<0" ..
   38.29      thus False by blast
   38.30 @@ -1079,7 +1079,7 @@
   38.31  lemma zmult_eq_1_iff: "(m*n = (1::int)) = ((m = 1 & n = 1) | (m = -1 & n = -1))"
   38.32  apply (rule iffI) 
   38.33   apply (frule pos_zmult_eq_1_iff_lemma)
   38.34 - apply (simp add: mult_commute [of m]) 
   38.35 + apply (simp add: mult.commute [of m]) 
   38.36   apply (frule pos_zmult_eq_1_iff_lemma, auto) 
   38.37  done
   38.38  
   38.39 @@ -1238,7 +1238,7 @@
   38.40  lemma zdvd_antisym_nonneg:
   38.41      "0 <= m ==> 0 <= n ==> m dvd n ==> n dvd m ==> m = (n::int)"
   38.42    apply (simp add: dvd_def, auto)
   38.43 -  apply (auto simp add: mult_assoc zero_le_mult_iff zmult_eq_1_iff)
   38.44 +  apply (auto simp add: mult.assoc zero_le_mult_iff zmult_eq_1_iff)
   38.45    done
   38.46  
   38.47  lemma zdvd_antisym_abs: assumes "(a::int) dvd b" and "b dvd a" 
   38.48 @@ -1251,7 +1251,7 @@
   38.49    from `b dvd a` obtain k' where k':"a = b*k'" unfolding dvd_def by blast 
   38.50    from k k' have "a = a*k*k'" by simp
   38.51    with mult_cancel_left1[where c="a" and b="k*k'"]
   38.52 -  have kk':"k*k' = 1" using `a\<noteq>0` by (simp add: mult_assoc)
   38.53 +  have kk':"k*k' = 1" using `a\<noteq>0` by (simp add: mult.assoc)
   38.54    hence "k = 1 \<and> k' = 1 \<or> k = -1 \<and> k' = -1" by (simp add: zmult_eq_1_iff)
   38.55    thus ?thesis using k k' by auto
   38.56  qed
   38.57 @@ -1301,7 +1301,7 @@
   38.58  proof-
   38.59    from d obtain h where h: "k*n = k*m * h" unfolding dvd_def by blast
   38.60    {assume "n \<noteq> m*h" hence "k* n \<noteq> k* (m*h)" using kz by simp
   38.61 -    with h have False by (simp add: mult_assoc)}
   38.62 +    with h have False by (simp add: mult.assoc)}
   38.63    hence "n = m * h" by blast
   38.64    thus ?thesis by simp
   38.65  qed
    39.1 --- a/src/HOL/Isar_Examples/Fibonacci.thy	Fri Jul 04 20:07:08 2014 +0200
    39.2 +++ b/src/HOL/Isar_Examples/Fibonacci.thy	Fri Jul 04 20:18:47 2014 +0200
    39.3 @@ -92,7 +92,7 @@
    39.4  proof -
    39.5    assume "0 < n"
    39.6    then have "gcd (n * k + m) n = gcd n (m mod n)"
    39.7 -    by (simp add: gcd_non_0_nat add_commute)
    39.8 +    by (simp add: gcd_non_0_nat add.commute)
    39.9    also from `0 < n` have "\<dots> = gcd m n"
   39.10      by (simp add: gcd_non_0_nat)
   39.11    finally show ?thesis .
    40.1 --- a/src/HOL/Library/BigO.thy	Fri Jul 04 20:07:08 2014 +0200
    40.2 +++ b/src/HOL/Library/BigO.thy	Fri Jul 04 20:18:47 2014 +0200
    40.3 @@ -489,7 +489,7 @@
    40.4    shows "c \<noteq> 0 \<Longrightarrow> f \<in> O(\<lambda>x. c * f x)"
    40.5    apply (simp add: bigo_def)
    40.6    apply (rule_tac x = "abs (inverse c)" in exI)
    40.7 -  apply (simp add: abs_mult [symmetric] mult_assoc [symmetric])
    40.8 +  apply (simp add: abs_mult [symmetric] mult.assoc [symmetric])
    40.9    done
   40.10  
   40.11  lemma bigo_const_mult4:
   40.12 @@ -517,10 +517,10 @@
   40.13    apply (simp add: func_times)
   40.14    apply (auto intro!: simp add: bigo_def elt_set_times_def func_times)
   40.15    apply (rule_tac x = "\<lambda>y. inverse c * x y" in exI)
   40.16 -  apply (simp add: mult_assoc [symmetric] abs_mult)
   40.17 +  apply (simp add: mult.assoc [symmetric] abs_mult)
   40.18    apply (rule_tac x = "abs (inverse c) * ca" in exI)
   40.19    apply (rule allI)
   40.20 -  apply (subst mult_assoc)
   40.21 +  apply (subst mult.assoc)
   40.22    apply (rule mult_left_mono)
   40.23    apply (erule spec)
   40.24    apply force
   40.25 @@ -613,7 +613,7 @@
   40.26    apply (rule_tac x = c in exI)
   40.27    apply (rule allI)+
   40.28    apply (subst abs_mult)+
   40.29 -  apply (subst mult_left_commute)
   40.30 +  apply (subst mult.left_commute)
   40.31    apply (rule mult_left_mono)
   40.32    apply (erule spec)
   40.33    apply (rule abs_ge_zero)
    41.1 --- a/src/HOL/Library/Code_Target_Int.thy	Fri Jul 04 20:07:08 2014 +0200
    41.2 +++ b/src/HOL/Library/Code_Target_Int.thy	Fri Jul 04 20:18:47 2014 +0200
    41.3 @@ -103,7 +103,7 @@
    41.4    from mod_div_equality have *: "of_int k = of_int (k div 2 * 2 + k mod 2)" by simp
    41.5    show ?thesis
    41.6      by (simp add: Let_def divmod_int_mod_div of_int_add [symmetric])
    41.7 -      (simp add: * mult_commute)
    41.8 +      (simp add: * mult.commute)
    41.9  qed
   41.10  
   41.11  declare of_int_code_if [code]
    42.1 --- a/src/HOL/Library/Code_Target_Nat.thy	Fri Jul 04 20:07:08 2014 +0200
    42.2 +++ b/src/HOL/Library/Code_Target_Nat.thy	Fri Jul 04 20:18:47 2014 +0200
    42.3 @@ -112,7 +112,7 @@
    42.4    from mod_div_equality have *: "of_nat n = of_nat (n div 2 * 2 + n mod 2)" by simp
    42.5    show ?thesis
    42.6      by (simp add: Let_def divmod_nat_div_mod of_nat_add [symmetric])
    42.7 -      (simp add: * mult_commute of_nat_mult add_commute)
    42.8 +      (simp add: * mult.commute of_nat_mult add.commute)
    42.9  qed
   42.10  
   42.11  declare of_nat_code_if [code]
    43.1 --- a/src/HOL/Library/Convex.thy	Fri Jul 04 20:07:08 2014 +0200
    43.2 +++ b/src/HOL/Library/Convex.thy	Fri Jul 04 20:18:47 2014 +0200
    43.3 @@ -210,7 +210,7 @@
    43.4      have "(\<Sum>j \<in> {1..2}. ?u j *\<^sub>R ?x j) = \<mu> *\<^sub>R x + (1 - \<mu>) *\<^sub>R y"
    43.5        by auto
    43.6      then have "(1 - \<mu>) *\<^sub>R y + \<mu> *\<^sub>R x \<in> s"
    43.7 -      using s by (auto simp:add_commute)
    43.8 +      using s by (auto simp:add.commute)
    43.9    }
   43.10    then show "convex s"
   43.11      unfolding convex_alt by auto
   43.12 @@ -525,7 +525,7 @@
   43.13        using a_nonneg a1 asms by blast
   43.14      have "f (\<Sum> j \<in> insert i s. a j *\<^sub>R y j) = f ((\<Sum> j \<in> s. a j *\<^sub>R y j) + a i *\<^sub>R y i)"
   43.15        using setsum.insert[of s i "\<lambda> j. a j *\<^sub>R y j", OF `finite s` `i \<notin> s`] asms
   43.16 -      by (auto simp only:add_commute)
   43.17 +      by (auto simp only:add.commute)
   43.18      also have "\<dots> = f (((1 - a i) * inverse (1 - a i)) *\<^sub>R (\<Sum> j \<in> s. a j *\<^sub>R y j) + a i *\<^sub>R y i)"
   43.19        using i0 by auto
   43.20      also have "\<dots> = f ((1 - a i) *\<^sub>R (\<Sum> j \<in> s. (a j * inverse (1 - a i)) *\<^sub>R y j) + a i *\<^sub>R y i)"
   43.21 @@ -535,7 +535,7 @@
   43.22        by (auto simp: divide_inverse)
   43.23      also have "\<dots> \<le> (1 - a i) *\<^sub>R f ((\<Sum> j \<in> s. ?a j *\<^sub>R y j)) + a i * f (y i)"
   43.24        using conv[of "y i" "(\<Sum> j \<in> s. ?a j *\<^sub>R y j)" "a i", OF yai(1) asum yai(2) ai1]
   43.25 -      by (auto simp add:add_commute)
   43.26 +      by (auto simp add:add.commute)
   43.27      also have "\<dots> \<le> (1 - a i) * (\<Sum> j \<in> s. ?a j * f (y j)) + a i * f (y i)"
   43.28        using add_right_mono[OF mult_left_mono[of _ _ "1 - a i",
   43.29          OF asum_le less_imp_le[OF i0]], of "a i * f (y i)"] by simp
   43.30 @@ -768,7 +768,7 @@
   43.31      by auto
   43.32    then have f''0: "\<And>z::real. z > 0 \<Longrightarrow>
   43.33      DERIV (\<lambda> z. - 1 / (ln b * z)) z :> 1 / (ln b * z * z)"
   43.34 -    unfolding inverse_eq_divide by (auto simp add: mult_assoc)
   43.35 +    unfolding inverse_eq_divide by (auto simp add: mult.assoc)
   43.36    have f''_ge0: "\<And>z::real. z > 0 \<Longrightarrow> 1 / (ln b * z * z) \<ge> 0"
   43.37      using `b > 1` by (auto intro!:less_imp_le)
   43.38    from f''_ge0_imp_convex[OF pos_is_convex,
    44.1 --- a/src/HOL/Library/Extended_Nat.thy	Fri Jul 04 20:07:08 2014 +0200
    44.2 +++ b/src/HOL/Library/Extended_Nat.thy	Fri Jul 04 20:18:47 2014 +0200
    44.3 @@ -175,7 +175,7 @@
    44.4    by (simp_all add: eSuc_plus_1 add_ac)
    44.5  
    44.6  lemma iadd_Suc_right: "m + eSuc n = eSuc (m + n)"
    44.7 -  by (simp only: add_commute[of m] iadd_Suc)
    44.8 +  by (simp only: add.commute[of m] iadd_Suc)
    44.9  
   44.10  lemma iadd_is_0: "(m + n = (0::enat)) = (m = 0 \<and> n = 0)"
   44.11    by (cases m, cases n, simp_all add: zero_enat_def)
    45.1 --- a/src/HOL/Library/Extended_Real.thy	Fri Jul 04 20:07:08 2014 +0200
    45.2 +++ b/src/HOL/Library/Extended_Real.thy	Fri Jul 04 20:18:47 2014 +0200
    45.3 @@ -701,7 +701,7 @@
    45.4  lemma ereal_mult_strict_left_mono:
    45.5    "a < b \<Longrightarrow> 0 < c \<Longrightarrow> c < (\<infinity>::ereal) \<Longrightarrow> c * a < c * b"
    45.6    using ereal_mult_strict_right_mono
    45.7 -  by (simp add: mult_commute[of c])
    45.8 +  by (simp add: mult.commute[of c])
    45.9  
   45.10  lemma ereal_mult_right_mono:
   45.11    fixes a b c :: ereal
   45.12 @@ -717,7 +717,7 @@
   45.13    fixes a b c :: ereal
   45.14    shows "a \<le> b \<Longrightarrow> 0 \<le> c \<Longrightarrow> c * a \<le> c * b"
   45.15    using ereal_mult_right_mono
   45.16 -  by (simp add: mult_commute[of c])
   45.17 +  by (simp add: mult.commute[of c])
   45.18  
   45.19  lemma zero_less_one_ereal[simp]: "0 \<le> (1::ereal)"
   45.20    by (simp add: one_ereal_def zero_ereal_def)
    46.1 --- a/src/HOL/Library/Float.thy	Fri Jul 04 20:07:08 2014 +0200
    46.2 +++ b/src/HOL/Library/Float.thy	Fri Jul 04 20:18:47 2014 +0200
    46.3 @@ -844,7 +844,7 @@
    46.4      hence "1 \<le> real m * inverse ?S" using assms False powr_realpow[of 2 "nat (-e)"]
    46.5        by (auto simp: powr_minus)
    46.6      hence "1 * ?S \<le> real m * inverse ?S * ?S" by (rule mult_right_mono, auto)
    46.7 -    hence "?S \<le> real m" unfolding mult_assoc by auto
    46.8 +    hence "?S \<le> real m" unfolding mult.assoc by auto
    46.9      hence "?S \<le> m" unfolding real_of_int_le_iff[symmetric] by auto
   46.10      from this bitlen_bounds[OF `0 < m`, THEN conjunct2]
   46.11      have "nat (-e) < (nat (bitlen m))" unfolding power_strict_increasing_iff[OF `1 < 2`, symmetric] by (rule order_le_less_trans)
    47.1 --- a/src/HOL/Library/Formal_Power_Series.thy	Fri Jul 04 20:07:08 2014 +0200
    47.2 +++ b/src/HOL/Library/Formal_Power_Series.thy	Fri Jul 04 20:18:47 2014 +0200
    47.3 @@ -128,14 +128,14 @@
    47.4  proof
    47.5    fix a b c :: "'a fps"
    47.6    show "a + b + c = a + (b + c)"
    47.7 -    by (simp add: fps_ext add_assoc)
    47.8 +    by (simp add: fps_ext add.assoc)
    47.9  qed
   47.10  
   47.11  instance fps :: (ab_semigroup_add) ab_semigroup_add
   47.12  proof
   47.13    fix a b :: "'a fps"
   47.14    show "a + b = b + a"
   47.15 -    by (simp add: fps_ext add_commute)
   47.16 +    by (simp add: fps_ext add.commute)
   47.17  qed
   47.18  
   47.19  lemma fps_mult_assoc_lemma:
   47.20 @@ -143,7 +143,7 @@
   47.21      and f :: "nat \<Rightarrow> nat \<Rightarrow> nat \<Rightarrow> 'a::comm_monoid_add"
   47.22    shows "(\<Sum>j=0..k. \<Sum>i=0..j. f i (j - i) (n - j)) =
   47.23           (\<Sum>j=0..k. \<Sum>i=0..k - j. f j i (n - j - i))"
   47.24 -  by (induct k) (simp_all add: Suc_diff_le setsum.distrib add_assoc)
   47.25 +  by (induct k) (simp_all add: Suc_diff_le setsum.distrib add.assoc)
   47.26  
   47.27  instance fps :: (semiring_0) semigroup_mult
   47.28  proof
   47.29 @@ -155,7 +155,7 @@
   47.30            (\<Sum>j=0..n. \<Sum>i=0..n - j. a$j * b$i * c$(n - j - i))"
   47.31        by (rule fps_mult_assoc_lemma)
   47.32      then show "((a * b) * c) $ n = (a * (b * c)) $ n"
   47.33 -      by (simp add: fps_mult_nth setsum_right_distrib setsum_left_distrib mult_assoc)
   47.34 +      by (simp add: fps_mult_nth setsum_right_distrib setsum_left_distrib mult.assoc)
   47.35    qed
   47.36  qed
   47.37  
   47.38 @@ -174,7 +174,7 @@
   47.39      have "(\<Sum>i=0..n. a$i * b$(n - i)) = (\<Sum>i=0..n. a$(n - i) * b$i)"
   47.40        by (rule fps_mult_commute_lemma)
   47.41      then show "(a * b) $ n = (b * a) $ n"
   47.42 -      by (simp add: fps_mult_nth mult_commute)
   47.43 +      by (simp add: fps_mult_nth mult.commute)
   47.44    qed
   47.45  qed
   47.46  
   47.47 @@ -397,7 +397,7 @@
   47.48  
   47.49  lemma X_mult_right_nth[simp]:
   47.50      "((f :: 'a::comm_semiring_1 fps) * X) $n = (if n = 0 then 0 else f $ (n - 1))"
   47.51 -  by (metis X_mult_nth mult_commute)
   47.52 +  by (metis X_mult_nth mult.commute)
   47.53  
   47.54  lemma X_power_iff: "X^k = Abs_fps (\<lambda>n. if n = k then 1::'a::comm_ring_1 else 0)"
   47.55  proof (induct k)
   47.56 @@ -419,14 +419,14 @@
   47.57      "(X^k * (f :: 'a::comm_ring_1 fps)) $n = (if n < k then 0 else f $ (n - k))"
   47.58    apply (induct k arbitrary: n)
   47.59    apply simp
   47.60 -  unfolding power_Suc mult_assoc
   47.61 +  unfolding power_Suc mult.assoc
   47.62    apply (case_tac n)
   47.63    apply auto
   47.64    done
   47.65  
   47.66  lemma X_power_mult_right_nth:
   47.67      "((f :: 'a::comm_ring_1 fps) * X^k) $n = (if n < k then 0 else f $ (n - k))"
   47.68 -  by (metis X_power_mult_nth mult_commute)
   47.69 +  by (metis X_power_mult_nth mult.commute)
   47.70  
   47.71  
   47.72  subsection{* Formal Power series form a metric space *}
   47.73 @@ -666,7 +666,7 @@
   47.74    shows "inverse f * f = 1"
   47.75  proof -
   47.76    have c: "inverse f * f = f * inverse f"
   47.77 -    by (simp add: mult_commute)
   47.78 +    by (simp add: mult.commute)
   47.79    from f0 have ifn: "\<And>n. inverse f $ n = natfun_inverse f n"
   47.80      by (simp add: fps_inverse_def)
   47.81    from f0 have th0: "(inverse f * f) $ 0 = 1"
   47.82 @@ -809,7 +809,7 @@
   47.83        setsum (\<lambda>i. f $ (n + 1 - i) * g $ i) ?Zn1"
   47.84         by (rule setsum.reindex_bij_witness[where i="op - (n + 1)" and j="op - (n + 1)"]) auto
   47.85      have "(f * ?D g + ?D f * g)$n = (?D g * f + ?D f * g)$n"
   47.86 -      by (simp only: mult_commute)
   47.87 +      by (simp only: mult.commute)
   47.88      also have "\<dots> = (\<Sum>i = 0..n. ?g i)"
   47.89        by (simp add: fps_mult_nth setsum.distrib[symmetric])
   47.90      also have "\<dots> = setsum ?h {0..n+1}"
   47.91 @@ -948,7 +948,7 @@
   47.92  
   47.93  lemma fps_nth_deriv_mult_const_right[simp]:
   47.94    "fps_nth_deriv n (f * fps_const (c::'a::comm_ring_1)) = fps_nth_deriv n f * fps_const c"
   47.95 -  using fps_nth_deriv_linear[of n "c" f 0 0] by (simp add: mult_commute)
   47.96 +  using fps_nth_deriv_linear[of n "c" f 0 0] by (simp add: mult.commute)
   47.97  
   47.98  lemma fps_nth_deriv_setsum:
   47.99    "fps_nth_deriv n (setsum f S) = setsum (\<lambda>i. fps_nth_deriv n (f i :: 'a::comm_ring_1 fps)) S"
  47.100 @@ -1026,7 +1026,7 @@
  47.101        {
  47.102          assume m0: "m \<noteq> 0"
  47.103          have "a ^k $ m = (a^l * a) $m"
  47.104 -          by (simp add: k mult_commute)
  47.105 +          by (simp add: k mult.commute)
  47.106          also have "\<dots> = (\<Sum>i = 0..m. a ^ l $ i * a $ (m - i))"
  47.107            by (simp add: fps_mult_nth)
  47.108          also have "\<dots> = 0"
  47.109 @@ -1114,7 +1114,7 @@
  47.110        unfolding power_mult_distrib[symmetric]
  47.111        apply (rule ssubst[where t = "a * inverse a" and s= 1])
  47.112        apply simp_all
  47.113 -      apply (subst mult_commute)
  47.114 +      apply (subst mult.commute)
  47.115        apply (rule inverse_mult_eq_1[OF a0])
  47.116        done
  47.117    }
  47.118 @@ -1144,7 +1144,7 @@
  47.119    have "(inverse a)\<^sup>2 * fps_deriv a + fps_deriv (inverse a) = 0"
  47.120      unfolding power2_eq_square
  47.121      apply (simp add: field_simps)
  47.122 -    apply (simp add: mult_assoc[symmetric])
  47.123 +    apply (simp add: mult.assoc[symmetric])
  47.124      done
  47.125    then have "(inverse a)\<^sup>2 * fps_deriv a + fps_deriv (inverse a) - fps_deriv a * (inverse a)\<^sup>2 =
  47.126        0 - fps_deriv a * (inverse a)\<^sup>2"
  47.127 @@ -1194,7 +1194,7 @@
  47.128  lemma inverse_mult_eq_1':
  47.129    assumes f0: "f$0 \<noteq> (0::'a::field)"
  47.130    shows "f * inverse f= 1"
  47.131 -  by (metis mult_commute inverse_mult_eq_1 f0)
  47.132 +  by (metis mult.commute inverse_mult_eq_1 f0)
  47.133  
  47.134  lemma fps_divide_deriv:
  47.135    fixes a :: "'a::field fps"
  47.136 @@ -1398,7 +1398,7 @@
  47.137      by simp
  47.138    have "a /?X = ?X *  Abs_fps (\<lambda>n::nat. setsum (op $ a) {0..n}) * inverse ?X"
  47.139      using fps_divide_X_minus1_setsum_lemma[of a, symmetric] th0
  47.140 -    by (simp add: fps_divide_def mult_assoc)
  47.141 +    by (simp add: fps_divide_def mult.assoc)
  47.142    also have "\<dots> = (inverse ?X * ?X) * Abs_fps (\<lambda>n::nat. setsum (op $ a) {0..n}) "
  47.143      by (simp add: mult_ac)
  47.144    finally show ?thesis
  47.145 @@ -2289,14 +2289,14 @@
  47.146        done
  47.147      also have "\<dots> = setsum (\<lambda>i. of_nat (i + 1) * a$(i+1) * (setsum (\<lambda>j. (b^ i)$j * of_nat (n - j + 1) * b$(n - j + 1)) {0..n})) {0.. n}"
  47.148        unfolding fps_deriv_nth
  47.149 -      by (rule setsum.reindex_cong [of Suc]) (auto simp add: mult_assoc)
  47.150 +      by (rule setsum.reindex_cong [of Suc]) (auto simp add: mult.assoc)
  47.151      finally have th0: "(fps_deriv (a oo b))$n =
  47.152        setsum (\<lambda>i. of_nat (i + 1) * a$(i+1) * (setsum (\<lambda>j. (b^ i)$j * of_nat (n - j + 1) * b$(n - j + 1)) {0..n})) {0.. n}" .
  47.153  
  47.154      have "(((fps_deriv a) oo b) * (fps_deriv b))$n = setsum (\<lambda>i. (fps_deriv b)$ (n - i) * ((fps_deriv a) oo b)$i) {0..n}"
  47.155        unfolding fps_mult_nth by (simp add: mult_ac)
  47.156      also have "\<dots> = setsum (\<lambda>i. setsum (\<lambda>j. of_nat (n - i +1) * b$(n - i + 1) * of_nat (j + 1) * a$(j+1) * (b^j)$i) {0..n}) {0..n}"
  47.157 -      unfolding fps_deriv_nth fps_compose_nth setsum_right_distrib mult_assoc
  47.158 +      unfolding fps_deriv_nth fps_compose_nth setsum_right_distrib mult.assoc
  47.159        apply (rule setsum.cong)
  47.160        apply (rule refl)
  47.161        apply (rule setsum.mono_neutral_left)
  47.162 @@ -2503,7 +2503,7 @@
  47.163      apply (simp add: fps_mult_nth fps_compose_nth setsum_product)
  47.164      apply (rule setsum.cong)
  47.165      apply (rule refl)
  47.166 -    apply (simp add: setsum.cartesian_product mult_assoc)
  47.167 +    apply (simp add: setsum.cartesian_product mult.assoc)
  47.168      apply (rule setsum.mono_neutral_right[OF f])
  47.169      apply (simp add: subset_eq)
  47.170      apply presburger
  47.171 @@ -2689,11 +2689,11 @@
  47.172  qed
  47.173  
  47.174  lemma fps_const_mult_apply_left: "fps_const c * (a oo b) = (fps_const c * a) oo b"
  47.175 -  by (simp add: fps_eq_iff fps_compose_nth setsum_right_distrib mult_assoc)
  47.176 +  by (simp add: fps_eq_iff fps_compose_nth setsum_right_distrib mult.assoc)
  47.177  
  47.178  lemma fps_const_mult_apply_right:
  47.179    "(a oo b) * fps_const (c::'a::comm_semiring_1) = (fps_const c * a) oo b"
  47.180 -  by (auto simp add: fps_const_mult_apply_left mult_commute)
  47.181 +  by (auto simp add: fps_const_mult_apply_left mult.commute)
  47.182  
  47.183  lemma fps_compose_assoc:
  47.184    assumes c0: "c$0 = (0::'a::idom)"
  47.185 @@ -2704,11 +2704,11 @@
  47.186      fix n
  47.187      have "?l$n = (setsum (\<lambda>i. (fps_const (a$i) * b^i) oo c) {0..n})$n"
  47.188        by (simp add: fps_compose_nth fps_compose_power[OF c0] fps_const_mult_apply_left
  47.189 -        setsum_right_distrib mult_assoc fps_setsum_nth)
  47.190 +        setsum_right_distrib mult.assoc fps_setsum_nth)
  47.191      also have "\<dots> = ((setsum (\<lambda>i. fps_const (a$i) * b^i) {0..n}) oo c)$n"
  47.192        by (simp add: fps_compose_setsum_distrib)
  47.193      also have "\<dots> = ?r$n"
  47.194 -      apply (simp add: fps_compose_nth fps_setsum_nth setsum_left_distrib mult_assoc)
  47.195 +      apply (simp add: fps_compose_nth fps_setsum_nth setsum_left_distrib mult.assoc)
  47.196        apply (rule setsum.cong)
  47.197        apply (rule refl)
  47.198        apply (rule setsum.mono_neutral_right)
  47.199 @@ -3052,7 +3052,7 @@
  47.200      using a
  47.201      by (simp add: fps_const_inverse eq fps_divide_def fps_inverse_mult)
  47.202    then have "fps_deriv ?l = fps_deriv ?r"
  47.203 -    by (simp add: fps_deriv_L add_commute fps_divide_def divide_inverse)
  47.204 +    by (simp add: fps_deriv_L add.commute fps_divide_def divide_inverse)
  47.205    then show ?thesis unfolding fps_deriv_eq_iff
  47.206      by (simp add: L_nth fps_inv_def)
  47.207  qed
  47.208 @@ -3094,7 +3094,7 @@
  47.209    have x10: "?x1 $ 0 \<noteq> 0" by simp
  47.210    have "?l = ?r \<longleftrightarrow> inverse ?x1 * ?l = inverse ?x1 * ?r" by simp
  47.211    also have "\<dots> \<longleftrightarrow> ?da = (fps_const c * a) / ?x1"
  47.212 -    apply (simp only: fps_divide_def  mult_assoc[symmetric] inverse_mult_eq_1[OF x10])
  47.213 +    apply (simp only: fps_divide_def  mult.assoc[symmetric] inverse_mult_eq_1[OF x10])
  47.214      apply (simp add: field_simps)
  47.215      done
  47.216    finally have eq: "?l = ?r \<longleftrightarrow> ?lhs" by simp
  47.217 @@ -3119,7 +3119,7 @@
  47.218          case (Suc m)
  47.219          then show ?case unfolding th0
  47.220            apply (simp add: field_simps del: of_nat_Suc)
  47.221 -          unfolding mult_assoc[symmetric] gbinomial_mult_1
  47.222 +          unfolding mult.assoc[symmetric] gbinomial_mult_1
  47.223            apply (simp add: field_simps)
  47.224            done
  47.225        qed
  47.226 @@ -3135,12 +3135,12 @@
  47.227    {
  47.228      assume h: ?rhs
  47.229      have th00: "\<And>x y. x * (a$0 * y) = a$0 * (x*y)"
  47.230 -      by (simp add: mult_commute)
  47.231 +      by (simp add: mult.commute)
  47.232      have "?l = ?r"
  47.233        apply (subst h)
  47.234        apply (subst (2) h)
  47.235        apply (clarsimp simp add: fps_eq_iff field_simps)
  47.236 -      unfolding mult_assoc[symmetric] th00 gbinomial_mult_1
  47.237 +      unfolding mult.assoc[symmetric] th00 gbinomial_mult_1
  47.238        apply (simp add: field_simps gbinomial_mult_1)
  47.239        done
  47.240    }
  47.241 @@ -3181,7 +3181,7 @@
  47.242    have th: "?r$0 \<noteq> 0" by simp
  47.243    have th': "fps_deriv (inverse ?r) = fps_const (- 1) * inverse ?r / (1 + X)"
  47.244      by (simp add: fps_inverse_deriv[OF th] fps_divide_def
  47.245 -      power2_eq_square mult_commute fps_const_neg[symmetric] del: fps_const_neg)
  47.246 +      power2_eq_square mult.commute fps_const_neg[symmetric] del: fps_const_neg)
  47.247    have eq: "inverse ?r $ 0 = 1"
  47.248      by (simp add: fps_inverse_def)
  47.249    from iffD1[OF fps_binomial_ODE_unique[of "inverse (1 + X)" "- 1"] th'] eq
    48.1 --- a/src/HOL/Library/Fraction_Field.thy	Fri Jul 04 20:07:08 2014 +0200
    48.2 +++ b/src/HOL/Library/Fraction_Field.thy	Fri Jul 04 20:18:47 2014 +0200
    48.3 @@ -252,7 +252,7 @@
    48.4    assume "q \<noteq> 0"
    48.5    then show "inverse q * q = 1"
    48.6      by (cases q rule: Fract_cases_nonzero)
    48.7 -      (simp_all add: fract_expand eq_fract mult_commute)
    48.8 +      (simp_all add: fract_expand eq_fract mult.commute)
    48.9  next
   48.10    fix q r :: "'a fract"
   48.11    show "q / r = q * inverse r" by (simp add: divide_fract_def)
   48.12 @@ -398,7 +398,7 @@
   48.13      by (simp only: less_fract_def)
   48.14    show "q \<le> r \<or> r \<le> q"
   48.15      by (induct q, induct r)
   48.16 -       (simp add: mult_commute, rule linorder_linear)
   48.17 +       (simp add: mult.commute, rule linorder_linear)
   48.18  qed
   48.19  
   48.20  end
    49.1 --- a/src/HOL/Library/Fundamental_Theorem_Algebra.thy	Fri Jul 04 20:07:08 2014 +0200
    49.2 +++ b/src/HOL/Library/Fundamental_Theorem_Algebra.thy	Fri Jul 04 20:18:47 2014 +0200
    49.3 @@ -1006,9 +1006,9 @@
    49.4                apply (subst s)
    49.5                apply (subst r)
    49.6                apply (simp only: power_mult_distrib)
    49.7 -              apply (subst mult_assoc [where b=s])
    49.8 -              apply (subst mult_assoc [where a=u])
    49.9 -              apply (subst mult_assoc [where b=u, symmetric])
   49.10 +              apply (subst mult.assoc [where b=s])
   49.11 +              apply (subst mult.assoc [where a=u])
   49.12 +              apply (subst mult.assoc [where b=u, symmetric])
   49.13                apply (subst u [symmetric])
   49.14                apply (simp add: mult_ac power_add [symmetric])
   49.15                done
    50.1 --- a/src/HOL/Library/Inner_Product.thy	Fri Jul 04 20:07:08 2014 +0200
    50.2 +++ b/src/HOL/Library/Inner_Product.thy	Fri Jul 04 20:18:47 2014 +0200
    50.3 @@ -136,7 +136,7 @@
    50.4      by (simp add: real_sqrt_mult_distrib)
    50.5    then show "norm (a *\<^sub>R x) = \<bar>a\<bar> * norm x"
    50.6      unfolding norm_eq_sqrt_inner
    50.7 -    by (simp add: power2_eq_square mult_assoc)
    50.8 +    by (simp add: power2_eq_square mult.assoc)
    50.9  qed
   50.10  
   50.11  end
   50.12 @@ -209,11 +209,11 @@
   50.13  instance proof
   50.14    fix x y z r :: real
   50.15    show "inner x y = inner y x"
   50.16 -    unfolding inner_real_def by (rule mult_commute)
   50.17 +    unfolding inner_real_def by (rule mult.commute)
   50.18    show "inner (x + y) z = inner x z + inner y z"
   50.19      unfolding inner_real_def by (rule distrib_right)
   50.20    show "inner (scaleR r x) y = r * inner x y"
   50.21 -    unfolding inner_real_def real_scaleR_def by (rule mult_assoc)
   50.22 +    unfolding inner_real_def real_scaleR_def by (rule mult.assoc)
   50.23    show "0 \<le> inner x x"
   50.24      unfolding inner_real_def by simp
   50.25    show "inner x x = 0 \<longleftrightarrow> x = 0"
   50.26 @@ -233,7 +233,7 @@
   50.27  instance proof
   50.28    fix x y z :: complex and r :: real
   50.29    show "inner x y = inner y x"
   50.30 -    unfolding inner_complex_def by (simp add: mult_commute)
   50.31 +    unfolding inner_complex_def by (simp add: mult.commute)
   50.32    show "inner (x + y) z = inner x z + inner y z"
   50.33      unfolding inner_complex_def by (simp add: distrib_right)
   50.34    show "inner (scaleR r x) y = r * inner x y"
    51.1 --- a/src/HOL/Library/Lattice_Algebras.thy	Fri Jul 04 20:07:08 2014 +0200
    51.2 +++ b/src/HOL/Library/Lattice_Algebras.thy	Fri Jul 04 20:18:47 2014 +0200
    51.3 @@ -13,7 +13,7 @@
    51.4    apply (rule antisym)
    51.5    apply (simp_all add: le_infI)
    51.6    apply (rule add_le_imp_le_left [of "uminus a"])
    51.7 -  apply (simp only: add_assoc [symmetric], simp add: diff_le_eq add.commute)
    51.8 +  apply (simp only: add.assoc [symmetric], simp add: diff_le_eq add.commute)
    51.9    done
   51.10  
   51.11  lemma add_inf_distrib_right: "inf a b + c = inf (a + c) (b + c)"
   51.12 @@ -21,7 +21,7 @@
   51.13    have "c + inf a b = inf (c + a) (c + b)"
   51.14      by (simp add: add_inf_distrib_left)
   51.15    then show ?thesis
   51.16 -    by (simp add: add_commute)
   51.17 +    by (simp add: add.commute)
   51.18  qed
   51.19  
   51.20  end
   51.21 @@ -32,10 +32,10 @@
   51.22  lemma add_sup_distrib_left: "a + sup b c = sup (a + b) (a + c)"
   51.23    apply (rule antisym)
   51.24    apply (rule add_le_imp_le_left [of "uminus a"])
   51.25 -  apply (simp only: add_assoc [symmetric], simp)
   51.26 +  apply (simp only: add.assoc [symmetric], simp)
   51.27    apply (simp add: le_diff_eq add.commute)
   51.28    apply (rule le_supI)
   51.29 -  apply (rule add_le_imp_le_left [of "a"], simp only: add_assoc[symmetric], simp)+
   51.30 +  apply (rule add_le_imp_le_left [of "a"], simp only: add.assoc[symmetric], simp)+
   51.31    done
   51.32  
   51.33  lemma add_sup_distrib_right: "sup a b + c = sup (a + c) (b + c)"
   51.34 @@ -43,7 +43,7 @@
   51.35    have "c + sup a b = sup (c+a) (c+b)"
   51.36      by (simp add: add_sup_distrib_left)
   51.37    then show ?thesis
   51.38 -    by (simp add: add_commute)
   51.39 +    by (simp add: add.commute)
   51.40  qed
   51.41  
   51.42  end
   51.43 @@ -151,7 +151,7 @@
   51.44    then show ?r
   51.45      apply -
   51.46      apply (rule add_le_imp_le_right[of _ "uminus b" _])
   51.47 -    apply (simp add: add_assoc)
   51.48 +    apply (simp add: add.assoc)
   51.49      done
   51.50  next
   51.51    assume ?r
   51.52 @@ -243,7 +243,7 @@
   51.53    then have "a + a + - a = - a"
   51.54      by simp
   51.55    then have "a + (a + - a) = - a"
   51.56 -    by (simp only: add_assoc)
   51.57 +    by (simp only: add.assoc)
   51.58    then have a: "- a = a"
   51.59      by simp
   51.60    show "a = 0"
   51.61 @@ -309,7 +309,7 @@
   51.62  proof -
   51.63    from add_le_cancel_left [of "uminus a" "plus a a" zero]
   51.64    have "a \<le> - a \<longleftrightarrow> a + a \<le> 0"
   51.65 -    by (simp add: add_assoc[symmetric])
   51.66 +    by (simp add: add.assoc[symmetric])
   51.67    then show ?thesis
   51.68      by simp
   51.69  qed
   51.70 @@ -318,7 +318,7 @@
   51.71  proof -
   51.72    from add_le_cancel_left [of "uminus a" zero "plus a a"]
   51.73    have "- a \<le> a \<longleftrightarrow> 0 \<le> a + a"
   51.74 -    by (simp add: add_assoc[symmetric])
   51.75 +    by (simp add: add.assoc[symmetric])
   51.76    then show ?thesis
   51.77      by simp
   51.78  qed
    52.1 --- a/src/HOL/Library/ListVector.thy	Fri Jul 04 20:07:08 2014 +0200
    52.2 +++ b/src/HOL/Library/ListVector.thy	Fri Jul 04 20:18:47 2014 +0200
    52.3 @@ -94,7 +94,7 @@
    52.4  apply(simp)
    52.5  apply(case_tac zs)
    52.6   apply(simp)
    52.7 -apply(simp add: add_assoc)
    52.8 +apply(simp add: add.assoc)
    52.9  done
   52.10  
   52.11  subsection "Inner product"
   52.12 @@ -146,7 +146,7 @@
   52.13  apply simp
   52.14  apply(case_tac ys)
   52.15  apply (simp)
   52.16 -apply (simp add: distrib_left mult_assoc)
   52.17 +apply (simp add: distrib_left mult.assoc)
   52.18  done
   52.19  
   52.20  end
    53.1 --- a/src/HOL/Library/Multiset.thy	Fri Jul 04 20:07:08 2014 +0200
    53.2 +++ b/src/HOL/Library/Multiset.thy	Fri Jul 04 20:18:47 2014 +0200
    53.3 @@ -225,8 +225,8 @@
    53.4  (* shorter: by (simp add: multiset_eq_iff) fastforce *)
    53.5  proof
    53.6    assume ?rhs then show ?lhs
    53.7 -  by (auto simp add: add_assoc add_commute [of "{#b#}"])
    53.8 -    (drule sym, simp add: add_assoc [symmetric])
    53.9 +  by (auto simp add: add.assoc add.commute [of "{#b#}"])
   53.10 +    (drule sym, simp add: add.assoc [symmetric])
   53.11  next
   53.12    assume ?lhs
   53.13    show ?rhs
   53.14 @@ -1494,9 +1494,9 @@
   53.15      case (Suc i')
   53.16      with Cons show ?thesis
   53.17        apply simp
   53.18 -      apply (subst add_assoc)
   53.19 -      apply (subst add_commute [of "{#v#}" "{#x#}"])
   53.20 -      apply (subst add_assoc [symmetric])
   53.21 +      apply (subst add.assoc)
   53.22 +      apply (subst add.commute [of "{#v#}" "{#x#}"])
   53.23 +      apply (subst add.assoc [symmetric])
   53.24        apply simp
   53.25        apply (rule mset_le_multiset_union_diff_commute)
   53.26        apply (simp add: mset_le_single nth_mem_multiset_of)
   53.27 @@ -1597,7 +1597,7 @@
   53.28            with wf_hyp have "\<forall>M \<in> ?W. M + {#x#} \<in> ?W" by blast
   53.29            moreover from add have "M0 + K \<in> ?W" by simp
   53.30            ultimately have "(M0 + K) + {#x#} \<in> ?W" ..
   53.31 -          then show "M0 + (K + {#x#}) \<in> ?W" by (simp only: add_assoc)
   53.32 +          then show "M0 + (K + {#x#}) \<in> ?W" by (simp only: add.assoc)
   53.33          qed
   53.34          then show "N \<in> ?W" by (simp only: N)
   53.35        qed
   53.36 @@ -1652,7 +1652,7 @@
   53.37   apply (rule_tac x = I in exI)
   53.38   apply (simp (no_asm))
   53.39   apply (rule_tac x = "(K - {#a#}) + Ka" in exI)
   53.40 - apply (simp (no_asm_simp) add: add_assoc [symmetric])
   53.41 + apply (simp (no_asm_simp) add: add.assoc [symmetric])
   53.42   apply (drule_tac f = "\<lambda>M. M - {#a#}" and x="?S + ?T" in arg_cong)
   53.43   apply (simp add: diff_union_single_conv)
   53.44   apply (simp (no_asm_use) add: trans_def)
   53.45 @@ -1695,7 +1695,7 @@
   53.46      (I + {# x :# K. (x, a) \<in> r #}) + J') \<in> mult r")
   53.47   prefer 2
   53.48   apply force
   53.49 -apply (simp (no_asm_use) add: add_assoc [symmetric] mult_def)
   53.50 +apply (simp (no_asm_use) add: add.assoc [symmetric] mult_def)
   53.51  apply (erule trancl_trans)
   53.52  apply (rule r_into_trancl)
   53.53  apply (simp add: mult1_def set_of_def)
   53.54 @@ -1760,7 +1760,7 @@
   53.55  apply auto
   53.56  apply (rule_tac x = a in exI)
   53.57  apply (rule_tac x = "C + M0" in exI)
   53.58 -apply (simp add: add_assoc)
   53.59 +apply (simp add: add.assoc)
   53.60  done
   53.61  
   53.62  lemma union_less_mono2: "B \<subset># D ==> C + B \<subset># C + (D::'a::order multiset)"
   53.63 @@ -1771,8 +1771,8 @@
   53.64  done
   53.65  
   53.66  lemma union_less_mono1: "B \<subset># D ==> B + C \<subset># D + (C::'a::order multiset)"
   53.67 -apply (subst add_commute [of B C])
   53.68 -apply (subst add_commute [of D C])
   53.69 +apply (subst add.commute [of B C])
   53.70 +apply (subst add.commute [of D C])
   53.71  apply (erule union_less_mono2)
   53.72  done
   53.73  
   53.74 @@ -1941,13 +1941,13 @@
   53.75  lemmas multi_count_eq = multiset_eq_iff [symmetric]
   53.76  
   53.77  lemma union_commute: "M + N = N + (M::'a multiset)"
   53.78 -  by (fact add_commute)
   53.79 +  by (fact add.commute)
   53.80  
   53.81  lemma union_assoc: "(M + N) + K = M + (N + (K::'a multiset))"
   53.82 -  by (fact add_assoc)
   53.83 +  by (fact add.assoc)
   53.84  
   53.85  lemma union_lcomm: "M + (N + K) = N + (M + (K::'a multiset))"
   53.86 -  by (fact add_left_commute)
   53.87 +  by (fact add.left_commute)
   53.88  
   53.89  lemmas union_ac = union_assoc union_commute union_lcomm
   53.90  
    54.1 --- a/src/HOL/Library/Nat_Bijection.thy	Fri Jul 04 20:07:08 2014 +0200
    54.2 +++ b/src/HOL/Library/Nat_Bijection.thy	Fri Jul 04 20:18:47 2014 +0200
    54.3 @@ -61,7 +61,7 @@
    54.4    "prod_decode (triangle k + m) = prod_decode_aux k m"
    54.5  apply (induct k arbitrary: m)
    54.6  apply (simp add: prod_decode_def)
    54.7 -apply (simp only: triangle_Suc add_assoc)
    54.8 +apply (simp only: triangle_Suc add.assoc)
    54.9  apply (subst prod_decode_aux.simps, simp)
   54.10  done
   54.11  
   54.12 @@ -304,7 +304,7 @@
   54.13  apply (erule finite_induct, simp)
   54.14  apply (case_tac x)
   54.15  apply (simp add: even_nat_Suc_div_2 even_set_encode_iff vimage_Suc_insert_0)
   54.16 -apply (simp add: finite_vimageI add_commute vimage_Suc_insert_Suc)
   54.17 +apply (simp add: finite_vimageI add.commute vimage_Suc_insert_Suc)
   54.18  apply (simp add: set_encode_def finite_vimage_Suc_iff)
   54.19  done
   54.20  
   54.21 @@ -334,7 +334,7 @@
   54.22    "n \<notin> set_decode z \<Longrightarrow> set_decode (2 ^ n + z) = insert n (set_decode z)"
   54.23   apply (induct n arbitrary: z, simp_all)
   54.24    apply (rule set_eqI, induct_tac x, simp, simp add: even_nat_Suc_div_2)
   54.25 - apply (rule set_eqI, induct_tac x, simp, simp add: add_commute)
   54.26 + apply (rule set_eqI, induct_tac x, simp, simp add: add.commute)
   54.27  done
   54.28  
   54.29  lemma finite_set_decode [simp]: "finite (set_decode n)"
   54.30 @@ -377,7 +377,7 @@
   54.31        by (metis finite_set_decode set_decode_inverse)
   54.32    thus ?thesis using assms
   54.33      apply auto
   54.34 -    apply (simp add: set_encode_def nat_add_commute setsum.subset_diff)
   54.35 +    apply (simp add: set_encode_def add.commute setsum.subset_diff)
   54.36      done
   54.37    qed
   54.38    thus ?thesis
    55.1 --- a/src/HOL/Library/Polynomial.thy	Fri Jul 04 20:07:08 2014 +0200
    55.2 +++ b/src/HOL/Library/Polynomial.thy	Fri Jul 04 20:18:47 2014 +0200
    55.3 @@ -624,9 +624,9 @@
    55.4  instance proof
    55.5    fix p q r :: "'a poly"
    55.6    show "(p + q) + r = p + (q + r)"
    55.7 -    by (simp add: poly_eq_iff add_assoc)
    55.8 +    by (simp add: poly_eq_iff add.assoc)
    55.9    show "p + q = q + p"
   55.10 -    by (simp add: poly_eq_iff add_commute)
   55.11 +    by (simp add: poly_eq_iff add.commute)
   55.12    show "0 + p = p"
   55.13      by (simp add: poly_eq_iff)
   55.14  qed
   55.15 @@ -713,7 +713,7 @@
   55.16  lemma degree_add_eq_left:
   55.17    "degree q < degree p \<Longrightarrow> degree (p + q) = degree p"
   55.18    using degree_add_eq_right [of q p]
   55.19 -  by (simp add: add_commute)
   55.20 +  by (simp add: add.commute)
   55.21  
   55.22  lemma degree_minus [simp]: "degree (- p) = degree p"
   55.23    unfolding degree_def by simp
   55.24 @@ -824,7 +824,7 @@
   55.25    by (rule degree_le, simp add: coeff_eq_0)
   55.26  
   55.27  lemma smult_smult [simp]: "smult a (smult b p) = smult (a * b) p"
   55.28 -  by (rule poly_eqI, simp add: mult_assoc)
   55.29 +  by (rule poly_eqI, simp add: mult.assoc)
   55.30  
   55.31  lemma smult_0_right [simp]: "smult a 0 = 0"
   55.32    by (rule poly_eqI, simp)
    56.1 --- a/src/HOL/Library/Product_plus.thy	Fri Jul 04 20:07:08 2014 +0200
    56.2 +++ b/src/HOL/Library/Product_plus.thy	Fri Jul 04 20:18:47 2014 +0200
    56.3 @@ -81,10 +81,10 @@
    56.4  subsection {* Class instances *}
    56.5  
    56.6  instance prod :: (semigroup_add, semigroup_add) semigroup_add
    56.7 -  by default (simp add: prod_eq_iff add_assoc)
    56.8 +  by default (simp add: prod_eq_iff add.assoc)
    56.9  
   56.10  instance prod :: (ab_semigroup_add, ab_semigroup_add) ab_semigroup_add
   56.11 -  by default (simp add: prod_eq_iff add_commute)
   56.12 +  by default (simp add: prod_eq_iff add.commute)
   56.13  
   56.14  instance prod :: (monoid_add, monoid_add) monoid_add
   56.15    by default (simp_all add: prod_eq_iff)
    57.1 --- a/src/HOL/Library/RBT_Impl.thy	Fri Jul 04 20:07:08 2014 +0200
    57.2 +++ b/src/HOL/Library/RBT_Impl.thy	Fri Jul 04 20:18:47 2014 +0200
    57.3 @@ -1416,7 +1416,7 @@
    57.4          moreover note feven[unfolded feven_def]
    57.5            (* FIXME: why does by(rule feven[unfolded feven_def]) not work? *)
    57.6          ultimately have "P (2 * (n div 2)) kvs" by -
    57.7 -        thus ?thesis using True by (metis div_mod_equality' minus_nat.diff_0 nat_mult_commute)
    57.8 +        thus ?thesis using True by (metis div_mod_equality' minus_nat.diff_0 mult.commute)
    57.9        next
   57.10          case False note ge0
   57.11          moreover from "1.prems" have n2: "n div 2 \<le> length kvs" by simp
   57.12 @@ -1462,7 +1462,7 @@
   57.13          moreover note geven[unfolded geven_def]
   57.14          ultimately have "Q (2 * (n div 2)) kvs" by -
   57.15          thus ?thesis using True 
   57.16 -          by(metis div_mod_equality' minus_nat.diff_0 nat_mult_commute)
   57.17 +          by(metis div_mod_equality' minus_nat.diff_0 mult.commute)
   57.18        next
   57.19          case False note ge0
   57.20          moreover from "2.prems" have n2: "n div 2 \<le> length kvs" by simp
    58.1 --- a/src/HOL/Library/Saturated.thy	Fri Jul 04 20:07:08 2014 +0200
    58.2 +++ b/src/HOL/Library/Saturated.thy	Fri Jul 04 20:18:47 2014 +0200
    58.3 @@ -61,7 +61,7 @@
    58.4    less_sat_def: "x < y \<longleftrightarrow> nat_of x < nat_of y"
    58.5  
    58.6  instance
    58.7 -by default (auto simp add: less_eq_sat_def less_sat_def not_le sat_eq_iff min.coboundedI1 nat_mult_commute)
    58.8 +by default (auto simp add: less_eq_sat_def less_sat_def not_le sat_eq_iff min.coboundedI1 mult.commute)
    58.9  
   58.10  end
   58.11  
   58.12 @@ -117,14 +117,14 @@
   58.13        case True thus ?thesis by (simp add: sat_eq_iff)
   58.14      next
   58.15        case False with `a \<noteq> 0` show ?thesis
   58.16 -        by (simp add: sat_eq_iff nat_mult_min_left nat_mult_min_right mult_assoc min.assoc min.absorb2)
   58.17 +        by (simp add: sat_eq_iff nat_mult_min_left nat_mult_min_right mult.assoc min.assoc min.absorb2)
   58.18      qed
   58.19    qed
   58.20  next
   58.21    fix a :: "('a::len) sat"
   58.22    show "1 * a = a"
   58.23      apply (simp add: sat_eq_iff)
   58.24 -    apply (metis One_nat_def len_gt_0 less_Suc0 less_zeroE linorder_not_less min.absorb_iff1 min_nat_of_len_of nat_mult_1_right nat_mult_commute)
   58.25 +    apply (metis One_nat_def len_gt_0 less_Suc0 less_zeroE linorder_not_less min.absorb_iff1 min_nat_of_len_of nat_mult_1_right mult.commute)
   58.26      done
   58.27  next
   58.28    fix a b c :: "('a::len) sat"
   58.29 @@ -143,7 +143,7 @@
   58.30  begin
   58.31  
   58.32  instance
   58.33 -by default (auto simp add: less_eq_sat_def less_sat_def not_le sat_eq_iff min.coboundedI1 nat_mult_commute)
   58.34 +by default (auto simp add: less_eq_sat_def less_sat_def not_le sat_eq_iff min.coboundedI1 mult.commute)
   58.35  
   58.36  end
   58.37  
    59.1 --- a/src/HOL/Library/Set_Algebras.thy	Fri Jul 04 20:07:08 2014 +0200
    59.2 +++ b/src/HOL/Library/Set_Algebras.thy	Fri Jul 04 20:18:47 2014 +0200
    59.3 @@ -108,7 +108,7 @@
    59.4    done
    59.5  
    59.6  lemma set_plus_rearrange2: "(a::'a::semigroup_add) +o (b +o C) = (a + b) +o C"
    59.7 -  by (auto simp add: elt_set_plus_def add_assoc)
    59.8 +  by (auto simp add: elt_set_plus_def add.assoc)
    59.9  
   59.10  lemma set_plus_rearrange3: "((a::'a::semigroup_add) +o B) + C = a +o (B + C)"
   59.11    apply (auto simp add: elt_set_plus_def set_plus_def)
   59.12 @@ -216,7 +216,7 @@
   59.13  
   59.14  lemma set_times_rearrange2:
   59.15    "(a::'a::semigroup_mult) *o (b *o C) = (a * b) *o C"
   59.16 -  by (auto simp add: elt_set_times_def mult_assoc)
   59.17 +  by (auto simp add: elt_set_times_def mult.assoc)
   59.18  
   59.19  lemma set_times_rearrange3:
   59.20    "((a::'a::semigroup_mult) *o B) * C = a *o (B * C)"
    60.1 --- a/src/HOL/Limits.thy	Fri Jul 04 20:07:08 2014 +0200
    60.2 +++ b/src/HOL/Limits.thy	Fri Jul 04 20:18:47 2014 +0200
    60.3 @@ -702,7 +702,7 @@
    60.4        by (intro mult_mono' order_refl norm_g norm_ge_zero
    60.5                  mult_nonneg_nonneg K elim)
    60.6      also have "\<dots> = norm (f x) * (B * K)"
    60.7 -      by (rule mult_assoc)
    60.8 +      by (rule mult.assoc)
    60.9      finally show "norm (f x ** g x) \<le> norm (f x) * (B * K)" .
   60.10    qed
   60.11    with f show ?thesis
   60.12 @@ -716,7 +716,7 @@
   60.13    apply (rule add_left)
   60.14    apply (rule scaleR_right)
   60.15    apply (rule scaleR_left)
   60.16 -  apply (subst mult_commute)
   60.17 +  apply (subst mult.commute)
   60.18    using bounded by fast
   60.19  
   60.20  lemma (in bounded_bilinear) Bfun_prod_Zfun:
   60.21 @@ -1273,7 +1273,7 @@
   60.22  
   60.23  lemma LIMSEQ_linear: "\<lbrakk> X ----> x ; l > 0 \<rbrakk> \<Longrightarrow> (\<lambda> n. X (n * l)) ----> x"
   60.24    unfolding tendsto_def eventually_sequentially
   60.25 -  by (metis div_le_dividend div_mult_self1_is_m le_trans nat_mult_commute)
   60.26 +  by (metis div_le_dividend div_mult_self1_is_m le_trans mult.commute)
   60.27  
   60.28  lemma Bseq_inverse_lemma:
   60.29    fixes x :: "'a::real_normed_div_algebra"
   60.30 @@ -1530,7 +1530,7 @@
   60.31  lemma LIM_offset_zero:
   60.32    fixes a :: "'a::real_normed_vector"
   60.33    shows "f -- a --> L \<Longrightarrow> (\<lambda>h. f (a + h)) -- 0 --> L"
   60.34 -by (drule_tac k="a" in LIM_offset, simp add: add_commute)
   60.35 +by (drule_tac k="a" in LIM_offset, simp add: add.commute)
   60.36  
   60.37  lemma LIM_offset_zero_cancel:
   60.38    fixes a :: "'a::real_normed_vector"
    61.1 --- a/src/HOL/List.thy	Fri Jul 04 20:07:08 2014 +0200
    61.2 +++ b/src/HOL/List.thy	Fri Jul 04 20:18:47 2014 +0200
    61.3 @@ -3846,7 +3846,7 @@
    61.4  lemma append_replicate_commute:
    61.5    "replicate n x @ replicate k x = replicate k x @ replicate n x"
    61.6  apply (simp add: replicate_add [THEN sym])
    61.7 -apply (simp add: add_commute)
    61.8 +apply (simp add: add.commute)
    61.9  done
   61.10  
   61.11  text{* Courtesy of Andreas Lochbihler: *}
   61.12 @@ -4192,14 +4192,14 @@
   61.13  lemma sublist_shift_lemma:
   61.14       "map fst [p<-zip xs [i..<i + length xs] . snd p : A] =
   61.15        map fst [p<-zip xs [0..<length xs] . snd p + i : A]"
   61.16 -by (induct xs rule: rev_induct) (simp_all add: add_commute)
   61.17 +by (induct xs rule: rev_induct) (simp_all add: add.commute)
   61.18  
   61.19  lemma sublist_append:
   61.20       "sublist (l @ l') A = sublist l A @ sublist l' {j. j + length l : A}"
   61.21  apply (unfold sublist_def)
   61.22  apply (induct l' rule: rev_induct, simp)
   61.23  apply (simp add: upt_add_eq_append[of 0] sublist_shift_lemma)
   61.24 -apply (simp add: add_commute)
   61.25 +apply (simp add: add.commute)
   61.26  done
   61.27  
   61.28  lemma sublist_Cons:
    62.1 --- a/src/HOL/Matrix_LP/Matrix.thy	Fri Jul 04 20:07:08 2014 +0200
    62.2 +++ b/src/HOL/Matrix_LP/Matrix.thy	Fri Jul 04 20:18:47 2014 +0200
    62.3 @@ -1508,7 +1508,7 @@
    62.4    show "A + B + C = A + (B + C)"    
    62.5      apply (simp add: plus_matrix_def)
    62.6      apply (rule combine_matrix_assoc[simplified associative_def, THEN spec, THEN spec, THEN spec])
    62.7 -    apply (simp_all add: add_assoc)
    62.8 +    apply (simp_all add: add.assoc)
    62.9      done
   62.10    show "0 + A = A"
   62.11      apply (simp add: plus_matrix_def)
   62.12 @@ -1528,7 +1528,7 @@
   62.13    show "A + B = B + A"
   62.14      apply (simp add: plus_matrix_def)
   62.15      apply (rule combine_matrix_commute[simplified commutative_def, THEN spec, THEN spec])
   62.16 -    apply (simp_all add: add_commute)
   62.17 +    apply (simp_all add: add.commute)
   62.18      done
   62.19    show "0 + A = A"
   62.20      apply (simp add: plus_matrix_def)
   62.21 @@ -1689,7 +1689,7 @@
   62.22  lemma transpose_matrix_mult: "transpose_matrix ((A::('a::comm_ring) matrix)*B) = (transpose_matrix B) * (transpose_matrix A)"
   62.23  apply (simp add: times_matrix_def)
   62.24  apply (subst transpose_mult_matrix)
   62.25 -apply (simp_all add: mult_commute)
   62.26 +apply (simp_all add: mult.commute)
   62.27  done
   62.28  
   62.29  lemma transpose_matrix_add: "transpose_matrix ((A::('a::monoid_add) matrix)+B) = transpose_matrix A + transpose_matrix B"
   62.30 @@ -1731,7 +1731,7 @@
   62.31      apply (insert assms)
   62.32      apply (frule right_inverse_matrix_dim)
   62.33      by (simp add: right_inverse_matrix_def)
   62.34 -  also have "\<dots> = (Y * A) * X" by (simp add: mult_assoc)
   62.35 +  also have "\<dots> = (Y * A) * X" by (simp add: mult.assoc)
   62.36    also have "\<dots> = X" 
   62.37      apply (insert assms)
   62.38      apply (frule left_inverse_matrix_dim)
    63.1 --- a/src/HOL/Metis_Examples/Big_O.thy	Fri Jul 04 20:07:08 2014 +0200
    63.2 +++ b/src/HOL/Metis_Examples/Big_O.thy	Fri Jul 04 20:18:47 2014 +0200
    63.3 @@ -309,7 +309,7 @@
    63.4  apply (erule_tac x = x in allE)+
    63.5  apply (subgoal_tac "c * ca * abs (f x * g x) = (c * abs(f x)) * (ca * abs (g x))")
    63.6   apply (metis (no_types) abs_ge_zero abs_mult mult_mono')
    63.7 -by (metis mult_assoc mult_left_commute abs_of_pos mult_left_commute abs_mult)
    63.8 +by (metis mult.assoc mult.left_commute abs_of_pos mult.left_commute abs_mult)
    63.9  
   63.10  lemma bigo_mult2 [intro]: "f *o O(g) <= O(f * g)"
   63.11  by (metis bigo_mult bigo_refl set_times_mono3 subset_trans)
   63.12 @@ -421,7 +421,7 @@
   63.13  
   63.14  lemma bigo_const_mult3: "(c\<Colon>'a\<Colon>linordered_field) ~= 0 \<Longrightarrow> f : O(\<lambda>x. c * f x)"
   63.15  apply (simp add: bigo_def)
   63.16 -by (metis (no_types) abs_mult mult_assoc mult_1 order_refl left_inverse)
   63.17 +by (metis (no_types) abs_mult mult.assoc mult_1 order_refl left_inverse)
   63.18  
   63.19  lemma bigo_const_mult4:
   63.20  "(c\<Colon>'a\<Colon>linordered_field) \<noteq> 0 \<Longrightarrow> O(f) \<le> O(\<lambda>x. c * f x)"
   63.21 @@ -444,7 +444,7 @@
   63.22    apply (rule_tac [2] ext)
   63.23     prefer 2
   63.24     apply simp
   63.25 -  apply (simp add: mult_assoc [symmetric] abs_mult)
   63.26 +  apply (simp add: mult.assoc [symmetric] abs_mult)
   63.27    (* couldn't get this proof without the step above *)
   63.28  proof -
   63.29    fix g :: "'b \<Rightarrow> 'a" and d :: 'a
   63.30 @@ -530,7 +530,7 @@
   63.31   apply (rule abs_ge_zero)
   63.32  apply (unfold bigo_def)
   63.33  apply (auto simp add: abs_mult)
   63.34 -by (metis abs_ge_zero mult_left_commute mult_left_mono)
   63.35 +by (metis abs_ge_zero mult.left_commute mult_left_mono)
   63.36  
   63.37  lemma bigo_setsum4: "f =o g +o O(h) \<Longrightarrow>
   63.38      (\<lambda>x. SUM y : A x. l x y * f(k x y)) =o
   63.39 @@ -710,6 +710,6 @@
   63.40  lemma bigo_lesso5: "f <o g =o O(h) \<Longrightarrow> \<exists>C. \<forall>x. f x <= g x + C * abs (h x)"
   63.41  apply (simp only: lesso_def bigo_alt_def)
   63.42  apply clarsimp
   63.43 -by (metis add_commute diff_le_eq)
   63.44 +by (metis add.commute diff_le_eq)
   63.45  
   63.46  end
    64.1 --- a/src/HOL/Metis_Examples/Binary_Tree.thy	Fri Jul 04 20:07:08 2014 +0200
    64.2 +++ b/src/HOL/Metis_Examples/Binary_Tree.thy	Fri Jul 04 20:18:47 2014 +0200
    64.3 @@ -66,7 +66,7 @@
    64.4    qed
    64.5  next
    64.6    case (Br a t1 t2) thus ?case
    64.7 -    by (metis n_leaves.simps(2) nat_add_commute reflect.simps(2))
    64.8 +    by (metis n_leaves.simps(2) add.commute reflect.simps(2))
    64.9  qed
   64.10  
   64.11  lemma n_nodes_reflect: "n_nodes (reflect t) = n_nodes t"
   64.12 @@ -74,7 +74,7 @@
   64.13    case Lf thus ?case by (metis reflect.simps(1))
   64.14  next
   64.15    case (Br a t1 t2) thus ?case
   64.16 -    by (metis add_commute n_nodes.simps(2) reflect.simps(2))
   64.17 +    by (metis add.commute n_nodes.simps(2) reflect.simps(2))
   64.18  qed
   64.19  
   64.20  lemma depth_reflect: "depth (reflect t) = depth t"
    65.1 --- a/src/HOL/MicroJava/Comp/CorrComp.thy	Fri Jul 04 20:07:08 2014 +0200
    65.2 +++ b/src/HOL/MicroJava/Comp/CorrComp.thy	Fri Jul 04 20:18:47 2014 +0200
    65.3 @@ -137,7 +137,7 @@
    65.4  apply (simp only: append_assoc)
    65.5  apply (erule thin_rl, erule thin_rl)
    65.6  apply (drule_tac x="pre @ instrs0" in spec)
    65.7 -apply (simp add: add_assoc)
    65.8 +apply (simp add: add.assoc)
    65.9  done
   65.10  
   65.11  lemma progression_refl: 
   65.12 @@ -196,7 +196,7 @@
   65.13  apply simp
   65.14  apply (erule thin_rl, erule thin_rl)
   65.15  apply (drule_tac x="pre @ instr # instrs0" in spec)
   65.16 -apply (simp add: add_assoc)
   65.17 +apply (simp add: add.assoc)
   65.18  done
   65.19  
   65.20  
    66.1 --- a/src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy	Fri Jul 04 20:07:08 2014 +0200
    66.2 +++ b/src/HOL/Multivariate_Analysis/Cartesian_Euclidean_Space.thy	Fri Jul 04 20:18:47 2014 +0200
    66.3 @@ -183,13 +183,13 @@
    66.4  subsection {* Some frequently useful arithmetic lemmas over vectors. *}
    66.5  
    66.6  instance vec :: (semigroup_mult, finite) semigroup_mult
    66.7 -  by default (vector mult_assoc)
    66.8 +  by default (vector mult.assoc)
    66.9  
   66.10  instance vec :: (monoid_mult, finite) monoid_mult
   66.11    by default vector+
   66.12  
   66.13  instance vec :: (ab_semigroup_mult, finite) ab_semigroup_mult
   66.14 -  by default (vector mult_commute)
   66.15 +  by default (vector mult.commute)
   66.16  
   66.17  instance vec :: (comm_monoid_mult, finite) comm_monoid_mult
   66.18    by default vector
   66.19 @@ -254,7 +254,7 @@
   66.20  instance vec :: (ring_char_0, finite) ring_char_0 ..
   66.21  
   66.22  lemma vector_smult_assoc: "a *s (b *s x) = ((a::'a::semigroup_mult) * b) *s x"
   66.23 -  by (vector mult_assoc)
   66.24 +  by (vector mult.assoc)
   66.25  lemma vector_sadd_rdistrib: "((a::'a::semiring) + b) *s x = a *s x + b *s x"
   66.26    by (vector field_simps)
   66.27  lemma vector_add_ldistrib: "(c::'a::semiring) *s (x + y) = c *s x + c *s y"
   66.28 @@ -380,14 +380,14 @@
   66.29    done
   66.30  
   66.31  lemma matrix_mul_assoc: "A ** (B ** C) = (A ** B) ** C"
   66.32 -  apply (vector matrix_matrix_mult_def setsum_right_distrib setsum_left_distrib mult_assoc)
   66.33 +  apply (vector matrix_matrix_mult_def setsum_right_distrib setsum_left_distrib mult.assoc)
   66.34    apply (subst setsum.commute)
   66.35    apply simp
   66.36    done
   66.37  
   66.38  lemma matrix_vector_mul_assoc: "A *v (B *v x) = (A ** B) *v x"
   66.39    apply (vector matrix_matrix_mult_def matrix_vector_mult_def
   66.40 -    setsum_right_distrib setsum_left_distrib mult_assoc)
   66.41 +    setsum_right_distrib setsum_left_distrib mult.assoc)
   66.42    apply (subst setsum.commute)
   66.43    apply simp
   66.44    done
   66.45 @@ -399,7 +399,7 @@
   66.46  
   66.47  lemma matrix_transpose_mul:
   66.48      "transpose(A ** B) = transpose B ** transpose (A::'a::comm_semiring_1^_^_)"
   66.49 -  by (simp add: matrix_matrix_mult_def transpose_def vec_eq_iff mult_commute)
   66.50 +  by (simp add: matrix_matrix_mult_def transpose_def vec_eq_iff mult.commute)
   66.51  
   66.52  lemma matrix_eq:
   66.53    fixes A B :: "'a::semiring_1 ^ 'n ^ 'm"
   66.54 @@ -452,7 +452,7 @@
   66.55  
   66.56  lemma matrix_mult_vsum:
   66.57    "(A::'a::comm_semiring_1^'n^'m) *v x = setsum (\<lambda>i. (x$i) *s column i A) (UNIV:: 'n set)"
   66.58 -  by (simp add: matrix_vector_mult_def vec_eq_iff column_def mult_commute)
   66.59 +  by (simp add: matrix_vector_mult_def vec_eq_iff column_def mult.commute)
   66.60  
   66.61  lemma vector_componentwise:
   66.62    "(x::'a::ring_1^'n) = (\<chi> j. \<Sum>i\<in>UNIV. (x$i) * (axis i 1 :: 'a^'n) $ j)"
   66.63 @@ -498,7 +498,7 @@
   66.64  lemma matrix_works:
   66.65    assumes lf: "linear f"
   66.66    shows "matrix f *v x = f (x::real ^ 'n)"
   66.67 -  apply (simp add: matrix_def matrix_vector_mult_def vec_eq_iff mult_commute)
   66.68 +  apply (simp add: matrix_def matrix_vector_mult_def vec_eq_iff mult.commute)
   66.69    apply clarify
   66.70    apply (rule linear_componentwise[OF lf, symmetric])
   66.71    done
   66.72 @@ -518,7 +518,7 @@
   66.73  
   66.74  lemma matrix_vector_column:
   66.75    "(A::'a::comm_semiring_1^'n^_) *v x = setsum (\<lambda>i. (x$i) *s ((transpose A)$i)) (UNIV:: 'n set)"
   66.76 -  by (simp add: matrix_vector_mult_def transpose_def vec_eq_iff mult_commute)
   66.77 +  by (simp add: matrix_vector_mult_def transpose_def vec_eq_iff mult.commute)
   66.78  
   66.79  lemma adjoint_matrix: "adjoint(\<lambda>x. (A::real^'n^'m) *v x) = (\<lambda>x. transpose A *v x)"
   66.80    apply (rule adjoint_unique)
    67.1 --- a/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy	Fri Jul 04 20:07:08 2014 +0200
    67.2 +++ b/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy	Fri Jul 04 20:18:47 2014 +0200
    67.3 @@ -3283,7 +3283,7 @@
    67.4        by (auto intro!:arg_cong[where f=norm] simp add: algebra_simps)
    67.5      also have "\<dots> < d"
    67.6        using as[unfolded dist_norm] and `e > 0`
    67.7 -      by (auto simp add:pos_divide_less_eq[OF `e > 0`] mult_commute)
    67.8 +      by (auto simp add:pos_divide_less_eq[OF `e > 0`] mult.commute)
    67.9      finally have "y \<in> S"
   67.10        apply (subst *)
   67.11        apply (rule assms(1)[unfolded convex_alt,rule_format])
   67.12 @@ -5923,7 +5923,7 @@
   67.13          by (auto simp: inner_simps)
   67.14        then have "1 \<ge> inverse d * (x \<bullet> i - y \<bullet> i)" "1 \<ge> inverse d * (y \<bullet> i - x \<bullet> i)"
   67.15          apply (rule_tac[!] mult_left_le_imp_le[OF _ assms])
   67.16 -        unfolding mult_assoc[symmetric]
   67.17 +        unfolding mult.assoc[symmetric]
   67.18          using assms
   67.19          by (auto simp add: field_simps)
   67.20        then have "inverse d * (x \<bullet> i * 2) \<le> 2 + inverse d * (y \<bullet> i * 2)"
   67.21 @@ -6493,7 +6493,7 @@
   67.22        by (auto intro!:arg_cong[where f=norm] simp add: algebra_simps)
   67.23      also have "\<dots> < d"
   67.24        using as[unfolded dist_norm] and `e > 0`
   67.25 -      by (auto simp add:pos_divide_less_eq[OF `e > 0`] mult_commute)
   67.26 +      by (auto simp add:pos_divide_less_eq[OF `e > 0`] mult.commute)
   67.27      finally show "y \<in> s"
   67.28        apply (subst *)
   67.29        apply (rule assms(1)[unfolded convex_alt,rule_format])
    68.1 --- a/src/HOL/Multivariate_Analysis/Derivative.thy	Fri Jul 04 20:07:08 2014 +0200
    68.2 +++ b/src/HOL/Multivariate_Analysis/Derivative.thy	Fri Jul 04 20:18:47 2014 +0200
    68.3 @@ -127,7 +127,7 @@
    68.4    "(f has_field_derivative D) (at a within s) \<longleftrightarrow> ((\<lambda>z. (f z - f a) / (z - a)) ---> D) (at a within s)"
    68.5  proof -
    68.6    have 1: "\<And>w y. ~(w = a) ==> y / (w - a) - D = (y - (w - a)*D)/(w - a)"
    68.7 -    by (metis divide_diff_eq_iff eq_iff_diff_eq_0 mult_commute)
    68.8 +    by (metis divide_diff_eq_iff eq_iff_diff_eq_0 mult.commute)
    68.9    show ?thesis
   68.10      apply (simp add: has_field_derivative_def has_derivative_within bounded_linear_mult_right)
   68.11      apply (simp add: LIM_zero_iff [where l = D, symmetric])
    69.1 --- a/src/HOL/Multivariate_Analysis/Determinants.thy	Fri Jul 04 20:07:08 2014 +0200
    69.2 +++ b/src/HOL/Multivariate_Analysis/Determinants.thy	Fri Jul 04 20:18:47 2014 +0200
    69.3 @@ -98,7 +98,7 @@
    69.4  lemma trace_mul_sym: "trace ((A::'a::comm_semiring_1^'n^'m) ** B) = trace (B**A)"
    69.5    apply (simp add: trace_def matrix_matrix_mult_def)
    69.6    apply (subst setsum.commute)
    69.7 -  apply (simp add: mult_commute)
    69.8 +  apply (simp add: mult.commute)
    69.9    done
   69.10  
   69.11  text {* Definition of determinant. *}
   69.12 @@ -294,7 +294,7 @@
   69.13    fixes A :: "'a::comm_ring_1^'n^'n"
   69.14    assumes p: "p permutes (UNIV :: 'n::finite set)"
   69.15    shows "det (\<chi> i. A$p i :: 'a^'n^'n) = of_int (sign p) * det A"
   69.16 -  apply (simp add: det_def setsum_right_distrib mult_assoc[symmetric])
   69.17 +  apply (simp add: det_def setsum_right_distrib mult.assoc[symmetric])
   69.18    apply (subst sum_permutations_compose_right[OF p])
   69.19  proof (rule setsum.cong)
   69.20    let ?U = "UNIV :: 'n set"
   69.21 @@ -318,7 +318,7 @@
   69.22      by blast
   69.23    show "of_int (sign (q \<circ> p)) * setprod (\<lambda>i. A$ p i$ (q \<circ> p) i) ?U =
   69.24      of_int (sign p) * of_int (sign q) * setprod (\<lambda>i. A$i$q i) ?U"
   69.25 -    by (simp only: thp sign_compose[OF qp pp] mult_commute of_int_mult)
   69.26 +    by (simp only: thp sign_compose[OF qp pp] mult.commute of_int_mult)
   69.27  qed rule
   69.28  
   69.29  lemma det_permute_columns:
   69.30 @@ -819,7 +819,7 @@
   69.31          unfolding permutation_permutes by auto
   69.32        have th00: "of_int (sign p) * of_int (sign p) = (1::'a)"
   69.33          "\<And>a. of_int (sign p) * (of_int (sign p) * a) = a"
   69.34 -        unfolding mult_assoc[symmetric]
   69.35 +        unfolding mult.assoc[symmetric]
   69.36          unfolding of_int_mult[symmetric]
   69.37          by (simp_all add: sign_idempotent)
   69.38        have ths: "?s q = ?s p * ?s (q \<circ> inv p)"
   69.39 @@ -891,7 +891,7 @@
   69.40        by blast
   69.41      have *: "\<And>(a::real^'n) b. a + b = 0 \<Longrightarrow> -a = b"
   69.42        apply (drule_tac f="op + (- a)" in cong[OF refl])
   69.43 -      apply (simp only: ab_left_minus add_assoc[symmetric])
   69.44 +      apply (simp only: ab_left_minus add.assoc[symmetric])
   69.45        apply simp
   69.46        done
   69.47      from c ci
   69.48 @@ -958,7 +958,7 @@
   69.49      apply (subst U)
   69.50      unfolding setsum.insert[OF fUk kUk]
   69.51      apply (subst th00)
   69.52 -    unfolding add_assoc
   69.53 +    unfolding add.assoc
   69.54      apply (subst det_row_add)
   69.55      unfolding thd0
   69.56      unfolding det_row_mul
   69.57 @@ -1278,10 +1278,10 @@
   69.58    by (fact setprod_singleton_nat_seg)
   69.59  
   69.60  lemma setprod_2: "setprod f {(1::nat)..2} = f 1 * f 2"
   69.61 -  by (simp add: eval_nat_numeral setprod_numseg mult_commute)
   69.62 +  by (simp add: eval_nat_numeral setprod_numseg mult.commute)
   69.63  
   69.64  lemma setprod_3: "setprod f {(1::nat)..3} = f 1 * f 2 * f 3"
   69.65 -  by (simp add: eval_nat_numeral setprod_numseg mult_commute)
   69.66 +  by (simp add: eval_nat_numeral setprod_numseg mult.commute)
   69.67  
   69.68  lemma det_1: "det (A::'a::comm_ring_1^1^1) = A$1$1"
   69.69    by (simp add: det_def sign_id)
    70.1 --- a/src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy	Fri Jul 04 20:07:08 2014 +0200
    70.2 +++ b/src/HOL/Multivariate_Analysis/Finite_Cartesian_Product.thy	Fri Jul 04 20:18:47 2014 +0200
    70.3 @@ -95,10 +95,10 @@
    70.4    unfolding uminus_vec_def by simp
    70.5  
    70.6  instance vec :: (semigroup_add, finite) semigroup_add
    70.7 -  by default (simp add: vec_eq_iff add_assoc)
    70.8 +  by default (simp add: vec_eq_iff add.assoc)
    70.9  
   70.10  instance vec :: (ab_semigroup_add, finite) ab_semigroup_add
   70.11 -  by default (simp add: vec_eq_iff add_commute)
   70.12 +  by default (simp add: vec_eq_iff add.commute)
   70.13  
   70.14  instance vec :: (monoid_add, finite) monoid_add
   70.15    by default (simp_all add: vec_eq_iff)
    71.1 --- a/src/HOL/Multivariate_Analysis/Integration.thy	Fri Jul 04 20:07:08 2014 +0200
    71.2 +++ b/src/HOL/Multivariate_Analysis/Integration.thy	Fri Jul 04 20:18:47 2014 +0200
    71.3 @@ -4926,7 +4926,7 @@
    71.4    apply (rule order_trans[OF mult_left_mono])
    71.5    apply (rule assms)
    71.6    apply (rule setsum_abs_ge_zero)
    71.7 -  apply (subst mult_commute)
    71.8 +  apply (subst mult.commute)
    71.9    apply (rule mult_left_mono)
   71.10    apply (rule order_trans[of _ "setsum content p"])
   71.11    apply (rule eq_refl)
   71.12 @@ -4961,7 +4961,7 @@
   71.13      apply (rule mult_left_mono[OF _ abs_ge_zero, of _ e])
   71.14      defer
   71.15      unfolding setsum_left_distrib[symmetric]
   71.16 -    apply (subst mult_commute)
   71.17 +    apply (subst mult.commute)
   71.18      apply (rule mult_left_mono)
   71.19      apply (rule order_trans[of _ "setsum (content \<circ> snd) p"])
   71.20      apply (rule eq_refl)
   71.21 @@ -6072,7 +6072,7 @@
   71.22        proof -
   71.23          case goal1
   71.24          then show ?case
   71.25 -          apply (subst mult_commute, subst pos_le_divide_eq[symmetric])
   71.26 +          apply (subst mult.commute, subst pos_le_divide_eq[symmetric])
   71.27            using d(2)[rule_format,of "q i" i]
   71.28            using q[rule_format]
   71.29            apply (auto simp add: field_simps)
   71.30 @@ -8349,7 +8349,7 @@
   71.31        then show "norm (f c) * norm (c - t) < e / 3"
   71.32          using False
   71.33          apply -
   71.34 -        apply (subst mult_commute)
   71.35 +        apply (subst mult.commute)
   71.36          apply (subst pos_less_divide_eq[symmetric])
   71.37          apply auto
   71.38          done
   71.39 @@ -11081,7 +11081,7 @@
   71.40      show ?case
   71.41        apply (rule le_less_trans[OF norm_triangle_sub[of ig sg]])
   71.42        apply (subst real_sum_of_halves[of e,symmetric])
   71.43 -      unfolding add_assoc[symmetric]
   71.44 +      unfolding add.assoc[symmetric]
   71.45        apply (rule add_le_less_mono)
   71.46        defer
   71.47        apply (subst norm_minus_commute)
    72.1 --- a/src/HOL/Multivariate_Analysis/Linear_Algebra.thy	Fri Jul 04 20:07:08 2014 +0200
    72.2 +++ b/src/HOL/Multivariate_Analysis/Linear_Algebra.thy	Fri Jul 04 20:18:47 2014 +0200
    72.3 @@ -425,7 +425,7 @@
    72.4        unfolding linear_setsum[OF lf]
    72.5        by (simp add: linear_cmul[OF lf])
    72.6      finally show "f x \<bullet> y = x \<bullet> ?w"
    72.7 -      by (simp add: inner_setsum_left inner_setsum_right mult_commute)
    72.8 +      by (simp add: inner_setsum_left inner_setsum_right mult.commute)
    72.9    qed
   72.10    then show ?thesis
   72.11      unfolding adjoint_def choice_iff
   72.12 @@ -848,7 +848,7 @@
   72.13          from h have "(x + y) \<in> span_induct_alt_help S"
   72.14            apply (induct rule: span_induct_alt_help.induct)
   72.15            apply simp
   72.16 -          unfolding add_assoc
   72.17 +          unfolding add.assoc
   72.18            apply (rule span_induct_alt_help_S)
   72.19            apply assumption
   72.20            apply simp
   72.21 @@ -1083,7 +1083,7 @@
   72.22        also have "\<dots> = (\<Sum>v\<in>S. u v *\<^sub>R v) + c *\<^sub>R x"
   72.23          by (simp add: setsum.remove [OF fS xS] algebra_simps)
   72.24        also have "\<dots> = c*\<^sub>R x + y"
   72.25 -        by (simp add: add_commute u)
   72.26 +        by (simp add: add.commute u)
   72.27        finally have "setsum (\<lambda>v. ?u v *\<^sub>R v) ?S = c*\<^sub>R x + y" .
   72.28        then show ?thesis using th0 by blast
   72.29      next
   72.30 @@ -1095,7 +1095,7 @@
   72.31          apply auto
   72.32          done
   72.33        show ?thesis using fS xS th0
   72.34 -        by (simp add: th00 add_commute cong del: if_weak_cong)
   72.35 +        by (simp add: th00 add.commute cong del: if_weak_cong)
   72.36      qed
   72.37      then show "?h (c*\<^sub>R x + y)"
   72.38        by fast
   72.39 @@ -1472,7 +1472,7 @@
   72.40        from Basis_le_norm[OF i, of x]
   72.41        show "norm (?g i) \<le> norm (f i) * norm x"
   72.42          unfolding norm_scaleR
   72.43 -        apply (subst mult_commute)
   72.44 +        apply (subst mult.commute)
   72.45          apply (rule mult_mono)
   72.46          apply (auto simp add: field_simps)
   72.47          done
   72.48 @@ -1494,7 +1494,7 @@
   72.49      have "\<exists>B. \<forall>x. norm (f x) \<le> B * norm x"
   72.50        using `linear f` by (rule linear_bounded)
   72.51      then show "\<exists>K. \<forall>x. norm (f x) \<le> norm x * K"
   72.52 -      by (simp add: mult_commute)
   72.53 +      by (simp add: mult.commute)
   72.54    qed
   72.55  next
   72.56    assume "bounded_linear f"
   72.57 @@ -1511,7 +1511,7 @@
   72.58      using lf unfolding linear_conv_bounded_linear
   72.59      by (rule bounded_linear.pos_bounded)
   72.60    then show ?thesis
   72.61 -    by (simp only: mult_commute)
   72.62 +    by (simp only: mult.commute)
   72.63  qed
   72.64  
   72.65  lemma bounded_linearI':
    73.1 --- a/src/HOL/Multivariate_Analysis/Operator_Norm.thy	Fri Jul 04 20:07:08 2014 +0200
    73.2 +++ b/src/HOL/Multivariate_Analysis/Operator_Norm.thy	Fri Jul 04 20:18:47 2014 +0200
    73.3 @@ -48,7 +48,7 @@
    73.4      using f.nonneg_bounded by auto
    73.5    then have "\<forall>x. norm (f x) / norm x \<le> b"
    73.6      by (clarify, case_tac "x = 0",
    73.7 -      simp_all add: f.zero pos_divide_le_eq mult_commute)
    73.8 +      simp_all add: f.zero pos_divide_le_eq mult.commute)
    73.9    then have "bdd_above (range (\<lambda>x. norm (f x) / norm x))"
   73.10      unfolding bdd_above_def by fast
   73.11    with UNIV_I show ?thesis
   73.12 @@ -110,7 +110,7 @@
   73.13    also have "onorm f * norm (g x) \<le> onorm f * (onorm g * norm x)"
   73.14      by (rule mult_left_mono [OF onorm [OF g] onorm_pos_le [OF f]])
   73.15    finally show "norm ((f \<circ> g) x) \<le> onorm f * onorm g * norm x"
   73.16 -    by (simp add: mult_assoc)
   73.17 +    by (simp add: mult.assoc)
   73.18  qed
   73.19  
   73.20  lemma onorm_scaleR_lemma:
   73.21 @@ -124,7 +124,7 @@
   73.22    have "\<bar>r\<bar> * norm (f x) \<le> \<bar>r\<bar> * (onorm f * norm x)"
   73.23      by (intro mult_left_mono onorm abs_ge_zero f)
   73.24    then show "norm (r *\<^sub>R f x) \<le> \<bar>r\<bar> * onorm f * norm x"
   73.25 -    by (simp only: norm_scaleR mult_assoc)
   73.26 +    by (simp only: norm_scaleR mult.assoc)
   73.27  qed
   73.28  
   73.29  lemma onorm_scaleR:
   73.30 @@ -142,7 +142,7 @@
   73.31      then have "onorm (\<lambda>x. inverse r *\<^sub>R r *\<^sub>R f x) \<le> \<bar>inverse r\<bar> * onorm (\<lambda>x. r *\<^sub>R f x)"
   73.32        by (rule onorm_scaleR_lemma)
   73.33      with `r \<noteq> 0` show "\<bar>r\<bar> * onorm f \<le> onorm (\<lambda>x. r *\<^sub>R f x)"
   73.34 -      by (simp add: inverse_eq_divide pos_le_divide_eq mult_commute)
   73.35 +      by (simp add: inverse_eq_divide pos_le_divide_eq mult.commute)
   73.36    qed
   73.37  qed (simp add: onorm_zero)
   73.38  
    74.1 --- a/src/HOL/Multivariate_Analysis/PolyRoots.thy	Fri Jul 04 20:07:08 2014 +0200
    74.2 +++ b/src/HOL/Multivariate_Analysis/PolyRoots.thy	Fri Jul 04 20:18:47 2014 +0200
    74.3 @@ -21,7 +21,7 @@
    74.4   shows   "(\<Sum>i\<le>n. x^i) = (if x = 1 then of_nat(n + 1) else (1 - x^Suc n) / (1 - x))"
    74.5  using setsum_gp_basic[of x n]
    74.6  apply (simp add: real_of_nat_def)
    74.7 -by (metis eq_iff_diff_eq_0 mult_commute nonzero_eq_divide_eq)
    74.8 +by (metis eq_iff_diff_eq_0 mult.commute nonzero_eq_divide_eq)
    74.9  
   74.10  lemma setsum_power_shift:
   74.11    fixes x :: "'a::{comm_ring,monoid_mult}"
   74.12 @@ -41,7 +41,7 @@
   74.13    shows "(1 - x) * (\<Sum>i=m..n. x^i) = x^m - x^Suc n"
   74.14  proof -
   74.15    have  "(1 - x) * (\<Sum>i=m..n. x^i) = x^m * (1 - x) * (\<Sum>i\<le>n-m. x^i)"
   74.16 -    by (metis ab_semigroup_mult_class.mult_ac(1) assms mult_commute setsum_power_shift)
   74.17 +    by (metis ab_semigroup_mult_class.mult_ac(1) assms mult.commute setsum_power_shift)
   74.18    also have "... =x^m * (1 - x^Suc(n-m))"
   74.19      by (metis ab_semigroup_mult_class.mult_ac(1) setsum_gp_basic)
   74.20    also have "... = x^m - x^Suc n"
   74.21 @@ -58,7 +58,7 @@
   74.22                  else (x^m - x^Suc n) / (1 - x))"
   74.23  using setsum_gp_multiplied [of m n x] 
   74.24  apply (auto simp: real_of_nat_def)
   74.25 -by (metis eq_iff_diff_eq_0 mult_commute nonzero_divide_eq_eq)
   74.26 +by (metis eq_iff_diff_eq_0 mult.commute nonzero_divide_eq_eq)
   74.27  
   74.28  lemma setsum_gp_offset:
   74.29    fixes x :: "'a::{comm_ring,division_ring_inverse_zero}"
   74.30 @@ -133,7 +133,7 @@
   74.31  proof (induction n)
   74.32    case 0
   74.33    show ?case 
   74.34 -    by (rule exI [where x="norm (c 0) / e"]) (auto simp: mult_commute pos_divide_le_eq assms)
   74.35 +    by (rule exI [where x="norm (c 0) / e"]) (auto simp: mult.commute pos_divide_le_eq assms)
   74.36  next
   74.37    case (Suc n)
   74.38    then obtain M where M: "\<forall>z. M \<le> norm z \<longrightarrow> norm (\<Sum>i\<le>n. c i * z^i) \<le> e * norm z ^ Suc n" ..
   74.39 @@ -144,7 +144,7 @@
   74.40      then have norm1: "0 < norm z" "M \<le> norm z" "(e + norm (c (Suc n))) / e \<le> norm z"
   74.41        by auto
   74.42      then have norm2: "(e + norm (c (Suc n))) \<le> e * norm z"  "(norm z * norm z ^ n) > 0"
   74.43 -      apply (metis assms less_divide_eq mult_commute not_le) 
   74.44 +      apply (metis assms less_divide_eq mult.commute not_le) 
   74.45        using norm1 apply (metis mult_pos_pos zero_less_power)
   74.46        done
   74.47      have "e * (norm z * norm z ^ n) + norm (c (Suc n) * (z * z ^ n)) =
   74.48 @@ -162,7 +162,7 @@
   74.49  qed
   74.50  
   74.51  lemma norm_lemma_xy: "\<lbrakk>abs b + 1 \<le> norm(y) - a; norm(x) \<le> a\<rbrakk> \<Longrightarrow> b \<le> norm(x + y)"
   74.52 -  by (metis abs_add_one_not_less_self add_commute diff_le_eq dual_order.trans le_less_linear 
   74.53 +  by (metis abs_add_one_not_less_self add.commute diff_le_eq dual_order.trans le_less_linear 
   74.54           norm_diff_ineq)
   74.55  
   74.56  lemma polyfun_extremal:
    75.1 --- a/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy	Fri Jul 04 20:07:08 2014 +0200
    75.2 +++ b/src/HOL/Multivariate_Analysis/Topology_Euclidean_Space.thy	Fri Jul 04 20:18:47 2014 +0200
    75.3 @@ -2725,7 +2725,7 @@
    75.4  
    75.5  lemma bounded_any_center: "bounded S \<longleftrightarrow> (\<exists>e. \<forall>y\<in>S. dist a y \<le> e)"
    75.6    unfolding bounded_def
    75.7 -  by auto (metis add_commute add_le_cancel_right dist_commute dist_triangle_le)
    75.8 +  by auto (metis add.commute add_le_cancel_right dist_commute dist_triangle_le)
    75.9  
   75.10  lemma bounded_iff: "bounded S \<longleftrightarrow> (\<exists>a. \<forall>x\<in>S. norm x \<le> a)"
   75.11    unfolding bounded_any_center [where a=0]
   75.12 @@ -2859,7 +2859,7 @@
   75.13    then show ?thesis
   75.14      unfolding bounded_pos
   75.15      apply (rule_tac x="b*B" in exI)
   75.16 -    using b B by (auto simp add: mult_commute)
   75.17 +    using b B by (auto simp add: mult.commute)
   75.18  qed
   75.19  
   75.20  lemma bounded_scaling:
   75.21 @@ -2901,7 +2901,7 @@
   75.22  
   75.23  lemma bounded_imp_bdd_below: "bounded S \<Longrightarrow> bdd_below (S :: real set)"
   75.24    by (auto simp: bounded_def bdd_below_def dist_real_def)
   75.25 -     (metis abs_le_D1 add_commute diff_le_eq)
   75.26 +     (metis abs_le_D1 add.commute diff_le_eq)
   75.27  
   75.28  (* TODO: remove the following lemmas about Inf and Sup, is now in conditionally complete lattice *)
   75.29  
   75.30 @@ -6801,7 +6801,7 @@
   75.31      then have "y \<in> (\<lambda>x. m *\<^sub>R x + c) ` cbox a b"
   75.32        unfolding image_iff Bex_def mem_box
   75.33        apply (intro exI[where x="(1 / m) *\<^sub>R (y - c)"])
   75.34 -      apply (auto simp add: pos_le_divide_eq pos_divide_le_eq mult_commute diff_le_iff inner_distrib inner_diff_left)
   75.35 +      apply (auto simp add: pos_le_divide_eq pos_divide_le_eq mult.commute diff_le_iff inner_distrib inner_diff_left)
   75.36        done
   75.37    }
   75.38    moreover
   75.39 @@ -6811,7 +6811,7 @@
   75.40      then have "y \<in> (\<lambda>x. m *\<^sub>R x + c) ` cbox a b"
   75.41        unfolding image_iff Bex_def mem_box
   75.42        apply (intro exI[where x="(1 / m) *\<^sub>R (y - c)"])
   75.43 -      apply (auto simp add: neg_le_divide_eq neg_divide_le_eq mult_commute diff_le_iff inner_distrib inner_diff_left)
   75.44 +      apply (auto simp add: neg_le_divide_eq neg_divide_le_eq mult.commute diff_le_iff inner_distrib inner_diff_left)
   75.45        done
   75.46    }
   75.47    ultimately show ?thesis using False by (auto simp: cbox_def)
   75.48 @@ -7175,7 +7175,7 @@
   75.49        then show "norm (f b) / norm b * norm x \<le> norm (f x)"
   75.50          using b[THEN bspec[where x="(norm a / norm x) *\<^sub>R x"]]
   75.51          unfolding f.scaleR and ba using `x\<noteq>0` `a\<noteq>0`
   75.52 -        by (auto simp add: mult_commute pos_le_divide_eq pos_divide_le_eq)
   75.53 +        by (auto simp add: mult.commute pos_le_divide_eq pos_divide_le_eq)
   75.54      qed
   75.55    }
   75.56    ultimately show ?thesis by auto
   75.57 @@ -7406,7 +7406,7 @@
   75.58      proof (cases "d = 0")
   75.59        case True
   75.60        have *: "\<And>x. ((1 - c) * x \<le> 0) = (x \<le> 0)" using `1 - c > 0`
   75.61 -        by (metis mult_zero_left mult_commute real_mult_le_cancel_iff1)
   75.62 +        by (metis mult_zero_left mult.commute real_mult_le_cancel_iff1)
   75.63        from True have "\<And>n. z n = z0" using cf_z2[of 0] and c unfolding z_def
   75.64          by (simp add: *)
   75.65        then show ?thesis using `e>0` by auto
   75.66 @@ -7431,12 +7431,12 @@
   75.67          have "dist (z m) (z n) \<le> c ^ n * d * (1 - c ^ (m - n)) / (1 - c)"
   75.68            using cf_z2[of n "m - n"] and `m>n`
   75.69            unfolding pos_le_divide_eq[OF `1-c>0`]
   75.70 -          by (auto simp add: mult_commute dist_commute)
   75.71 +          by (auto simp add: mult.commute dist_commute)
   75.72          also have "\<dots> \<le> c ^ N * d * (1 - c ^ (m - n)) / (1 - c)"
   75.73            using mult_right_mono[OF * order_less_imp_le[OF **]]
   75.74 -          unfolding mult_assoc by auto
   75.75 +          unfolding mult.assoc by auto
   75.76          also have "\<dots> < (e * (1 - c) / d) * d * (1 - c ^ (m - n)) / (1 - c)"
   75.77 -          using mult_strict_right_mono[OF N **] unfolding mult_assoc by auto
   75.78 +          using mult_strict_right_mono[OF N **] unfolding mult.assoc by auto
   75.79          also have "\<dots> = e * (1 - c ^ (m - n))"
   75.80            using c and `d>0` and `1 - c > 0` by auto
   75.81          also have "\<dots> \<le> e" using c and `1 - c ^ (m - n) > 0` and `e>0`
    76.1 --- a/src/HOL/NSA/CLim.thy	Fri Jul 04 20:07:08 2014 +0200
    76.2 +++ b/src/HOL/NSA/CLim.thy	Fri Jul 04 20:18:47 2014 +0200
    76.3 @@ -22,7 +22,7 @@
    76.4  lemma all_shift: "(\<forall>x::'a::comm_ring_1. P x) = (\<forall>x. P (x-a))";
    76.5  apply auto 
    76.6  apply (drule_tac x="x+a" in spec) 
    76.7 -apply (simp add: add_assoc) 
    76.8 +apply (simp add: add.assoc) 
    76.9  done
   76.10  
   76.11  lemma complex_add_minus_iff [simp]: "(x + - a = (0::complex)) = (x=a)"
   76.12 @@ -142,7 +142,7 @@
   76.13  apply (drule_tac [2] DERIV_ident [THEN DERIV_mult])
   76.14  apply (auto simp add: distrib_right real_of_nat_Suc)
   76.15  apply (case_tac "n")
   76.16 -apply (auto simp add: mult_ac add_commute)
   76.17 +apply (auto simp add: mult_ac add.commute)
   76.18  done
   76.19  
   76.20  text{*Nonstandard version*}
    77.1 --- a/src/HOL/NSA/Examples/NSPrimes.thy	Fri Jul 04 20:07:08 2014 +0200
    77.2 +++ b/src/HOL/NSA/Examples/NSPrimes.thy	Fri Jul 04 20:18:47 2014 +0200
    77.3 @@ -274,7 +274,7 @@
    77.4  apply (subgoal_tac "k \<notin> hypnat_of_nat ` {p. prime p}")
    77.5  apply (force simp add: starprime_def, safe)
    77.6  apply (drule_tac x = x in bspec, auto)
    77.7 -apply (metis add_commute hdvd_diff hdvd_one_eq_one hypnat_diff_add_inverse2 hypnat_one_not_prime)
    77.8 +apply (metis add.commute hdvd_diff hdvd_one_eq_one hypnat_diff_add_inverse2 hypnat_one_not_prime)
    77.9  done
   77.10  
   77.11  end
    78.1 --- a/src/HOL/NSA/HDeriv.thy	Fri Jul 04 20:07:08 2014 +0200
    78.2 +++ b/src/HOL/NSA/HDeriv.thy	Fri Jul 04 20:18:47 2014 +0200
    78.3 @@ -133,7 +133,7 @@
    78.4  apply (auto simp add: nsderiv_def)
    78.5  apply (rule ccontr, drule_tac x = h in bspec)
    78.6  apply (drule_tac [2] c = h in approx_mult1)
    78.7 -apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD] simp add: mult_assoc)
    78.8 +apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD] simp add: mult.assoc)
    78.9  done
   78.10  
   78.11  text{*Differentiability implies continuity
   78.12 @@ -143,15 +143,15 @@
   78.13  apply (drule approx_minus_iff [THEN iffD1])
   78.14  apply (drule hypreal_not_eq_minus_iff [THEN iffD1])
   78.15  apply (drule_tac x = "xa - star_of x" in bspec)
   78.16 - prefer 2 apply (simp add: add_assoc [symmetric])
   78.17 -apply (auto simp add: mem_infmal_iff [symmetric] add_commute)
   78.18 + prefer 2 apply (simp add: add.assoc [symmetric])
   78.19 +apply (auto simp add: mem_infmal_iff [symmetric] add.commute)
   78.20  apply (drule_tac c = "xa - star_of x" in approx_mult1)
   78.21  apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD]
   78.22 -            simp add: mult_assoc nonzero_mult_divide_cancel_right)
   78.23 +            simp add: mult.assoc nonzero_mult_divide_cancel_right)
   78.24  apply (drule_tac x3=D in
   78.25             HFinite_star_of [THEN [2] Infinitesimal_HFinite_mult,
   78.26               THEN mem_infmal_iff [THEN iffD1]])
   78.27 -apply (auto simp add: mult_commute
   78.28 +apply (auto simp add: mult.commute
   78.29              intro: approx_trans approx_minus_iff [THEN iffD2])
   78.30  done
   78.31  
   78.32 @@ -189,7 +189,7 @@
   78.33        ==> x - y \<approx> 0"
   78.34  apply (simp add: nonzero_divide_eq_eq)
   78.35  apply (auto intro!: Infinitesimal_HFinite_mult2 HFinite_add
   78.36 -            simp add: mult_assoc mem_infmal_iff [symmetric])
   78.37 +            simp add: mult.assoc mem_infmal_iff [symmetric])
   78.38  apply (erule Infinitesimal_subset_HFinite [THEN subsetD])
   78.39  done
   78.40  
   78.41 @@ -206,14 +206,14 @@
   78.42  apply (drule_tac
   78.43       approx_minus_iff [THEN iffD2, THEN bex_Infinitesimal_iff2 [THEN iffD2]])
   78.44  apply (auto intro!: approx_add_mono1
   78.45 -            simp add: distrib_right distrib_left mult_commute add_assoc)
   78.46 +            simp add: distrib_right distrib_left mult.commute add.assoc)
   78.47  apply (rule_tac b1 = "star_of Db * star_of (f x)"
   78.48 -         in add_commute [THEN subst])
   78.49 +         in add.commute [THEN subst])
   78.50  apply (auto intro!: Infinitesimal_add_approx_self2 [THEN approx_sym]
   78.51                      Infinitesimal_add Infinitesimal_mult
   78.52                      Infinitesimal_star_of_mult
   78.53                      Infinitesimal_star_of_mult2
   78.54 -          simp add: add_assoc [symmetric])
   78.55 +          simp add: add.assoc [symmetric])
   78.56  done
   78.57  
   78.58  text{*Multiplying by a constant*}
   78.59 @@ -309,7 +309,7 @@
   78.60  proof -
   78.61    assume z: "z \<noteq> 0"
   78.62    have "x * y = x * (inverse z * z) * y" by (simp add: z)
   78.63 -  thus ?thesis by (simp add: mult_assoc)
   78.64 +  thus ?thesis by (simp add: mult.assoc)
   78.65  qed
   78.66  
   78.67  text{*This proof uses both definitions of differentiability.*}
   78.68 @@ -373,7 +373,7 @@
   78.69  subsubsection {* Equivalence of NS and Standard definitions *}
   78.70  
   78.71  lemma divideR_eq_divide: "x /\<^sub>R y = x / y"
   78.72 -by (simp add: divide_inverse mult_commute)
   78.73 +by (simp add: divide_inverse mult.commute)
   78.74  
   78.75  text{*Now equivalence between NSDERIV and DERIV*}
   78.76  lemma NSDERIV_DERIV_iff: "(NSDERIV f x :> D) = (DERIV f x :> D)"
   78.77 @@ -403,7 +403,7 @@
   78.78  lemma CARAT_NSDERIV: "NSDERIV f x :> l ==>
   78.79        \<exists>g. (\<forall>z. f z - f x = g z * (z-x)) & isNSCont g x & g x = l"
   78.80  by (auto simp add: NSDERIV_DERIV_iff isNSCont_isCont_iff CARAT_DERIV
   78.81 -                   mult_commute)
   78.82 +                   mult.commute)
   78.83  
   78.84  lemma hypreal_eq_minus_iff3: "(x = y + z) = (x + -z = (y::hypreal))"
   78.85  by auto
    79.1 --- a/src/HOL/NSA/HLim.thy	Fri Jul 04 20:07:08 2014 +0200
    79.2 +++ b/src/HOL/NSA/HLim.thy	Fri Jul 04 20:18:47 2014 +0200
    79.3 @@ -95,7 +95,7 @@
    79.4  
    79.5  lemma NSLIM_zero_cancel: "(%x. f(x) - l) -- x --NS> 0 ==> f -- x --NS> l"
    79.6  apply (drule_tac g = "%x. l" and m = l in NSLIM_add)
    79.7 -apply (auto simp add: add_assoc)
    79.8 +apply (auto simp add: add.assoc)
    79.9  done
   79.10  
   79.11  lemma NSLIM_const_not_eq:
   79.12 @@ -243,10 +243,10 @@
   79.13  apply (drule_tac [2] x = "- star_of a + x" in spec, safe, simp)
   79.14  apply (erule mem_infmal_iff [THEN iffD2, THEN Infinitesimal_add_approx_self [THEN approx_sym]])
   79.15  apply (erule_tac [3] approx_minus_iff2 [THEN iffD1])
   79.16 - prefer 2 apply (simp add: add_commute)
   79.17 + prefer 2 apply (simp add: add.commute)
   79.18  apply (rule_tac x = x in star_cases)
   79.19  apply (rule_tac [2] x = x in star_cases)
   79.20 -apply (auto simp add: starfun star_of_def star_n_minus star_n_add add_assoc star_n_zero_num)
   79.21 +apply (auto simp add: starfun star_of_def star_n_minus star_n_add add.assoc star_n_zero_num)
   79.22  done
   79.23  
   79.24  lemma NSLIM_isCont_iff: "(f -- a --NS> f a) = ((%h. f(a + h)) -- 0 --NS> f a)"
    80.1 --- a/src/HOL/NSA/HTranscendental.thy	Fri Jul 04 20:07:08 2014 +0200
    80.2 +++ b/src/HOL/NSA/HTranscendental.thy	Fri Jul 04 20:18:47 2014 +0200
    80.3 @@ -254,7 +254,7 @@
    80.4  apply (drule_tac x = x in bspec, auto)
    80.5  apply (drule_tac c = x in approx_mult1)
    80.6  apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD] 
    80.7 -            simp add: mult_assoc)
    80.8 +            simp add: mult.assoc)
    80.9  apply (rule approx_add_right_cancel [where d="-1"])
   80.10  apply (rule approx_sym [THEN [2] approx_trans2])
   80.11  apply (auto simp add: mem_infmal_iff)
   80.12 @@ -424,7 +424,7 @@
   80.13  apply (drule bspec [where x = x], auto)
   80.14  apply (drule approx_mult1 [where c = x])
   80.15  apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD]
   80.16 -           simp add: mult_assoc)
   80.17 +           simp add: mult.assoc)
   80.18  done
   80.19  
   80.20  lemma HFinite_cos [simp]: "sumhr (0, whn, %n. cos_coeff n * x ^ n) \<in> HFinite"
   80.21 @@ -448,7 +448,7 @@
   80.22  apply auto
   80.23  apply (drule approx_mult1 [where c = x])
   80.24  apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD]
   80.25 -            simp add: mult_assoc)
   80.26 +            simp add: mult.assoc)
   80.27  apply (rule approx_add_right_cancel [where d = "-1"])
   80.28  apply simp
   80.29  done
   80.30 @@ -463,7 +463,7 @@
   80.31  apply (drule bspec [where x = x], auto)
   80.32  apply (drule approx_mult1 [where c = x])
   80.33  apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD]
   80.34 -             simp add: mult_assoc)
   80.35 +             simp add: mult.assoc)
   80.36  done
   80.37  
   80.38  lemma STAR_sin_cos_Infinitesimal_mult:
   80.39 @@ -481,7 +481,7 @@
   80.40       "N \<in> HNatInfinite  
   80.41        ==> hypreal_of_real a =  
   80.42            hypreal_of_hypnat N * (inverse(hypreal_of_hypnat N) * hypreal_of_real a)"
   80.43 -by (simp add: mult_assoc [symmetric] zero_less_HNatInfinite)
   80.44 +by (simp add: mult.assoc [symmetric] zero_less_HNatInfinite)
   80.45  
   80.46  lemma STAR_sin_Infinitesimal_divide:
   80.47       "[|x \<in> Infinitesimal; x \<noteq> 0 |] ==> ( *f* sin) x/x @= 1"
   80.48 @@ -535,7 +535,7 @@
   80.49        ==> hypreal_of_hypnat n *  
   80.50            ( *f* sin) (hypreal_of_real pi/(hypreal_of_hypnat n))  
   80.51            @= hypreal_of_real pi"
   80.52 -apply (rule mult_commute [THEN subst])
   80.53 +apply (rule mult.commute [THEN subst])
   80.54  apply (erule STAR_sin_pi_divide_HNatInfinite_approx_pi)
   80.55  done
   80.56  
   80.57 @@ -564,7 +564,7 @@
   80.58  apply (auto simp add: starfun_mult [symmetric] starfunNat_real_of_nat divide_inverse)
   80.59  apply (rule_tac f1 = inverse in starfun_o2 [THEN subst])
   80.60  apply (auto dest: STAR_sin_pi_divide_HNatInfinite_approx_pi 
   80.61 -            simp add: starfunNat_real_of_nat mult_commute divide_inverse)
   80.62 +            simp add: starfunNat_real_of_nat mult.commute divide_inverse)
   80.63  done
   80.64  
   80.65  lemma NSLIMSEQ_cos_one: "(%n. cos (pi / real n))----NS> 1"
   80.66 @@ -587,7 +587,7 @@
   80.67       "x \<in> Infinitesimal ==> ( *f* cos) x @= 1 - x\<^sup>2"
   80.68  apply (rule STAR_cos_Infinitesimal [THEN approx_trans])
   80.69  apply (auto simp add: Infinitesimal_approx_minus [symmetric] 
   80.70 -            add_assoc [symmetric] numeral_2_eq_2)
   80.71 +            add.assoc [symmetric] numeral_2_eq_2)
   80.72  done
   80.73  
   80.74  lemma STAR_cos_Infinitesimal_approx2:
    81.1 --- a/src/HOL/NSA/HyperNat.thy	Fri Jul 04 20:07:08 2014 +0200
    81.2 +++ b/src/HOL/NSA/HyperNat.thy	Fri Jul 04 20:18:47 2014 +0200
    81.3 @@ -124,7 +124,7 @@
    81.4  done
    81.5  
    81.6  lemma hypnat_add_self_not_less: "~ (x + y < (x::hypnat))"
    81.7 -by (simp add: linorder_not_le [symmetric] add_commute [of x]) 
    81.8 +by (simp add: linorder_not_le [symmetric] add.commute [of x]) 
    81.9  
   81.10  lemma hypnat_diff_split:
   81.11      "P(a - b::hypnat) = ((a<b --> P 0) & (ALL d. a = b + d --> P d))"
   81.12 @@ -164,9 +164,9 @@
   81.13  lemma of_nat_eq_add [rule_format]:
   81.14       "\<forall>d::hypnat. of_nat m = of_nat n + d --> d \<in> range of_nat"
   81.15  apply (induct n) 
   81.16 -apply (auto simp add: add_assoc) 
   81.17 +apply (auto simp add: add.assoc) 
   81.18  apply (case_tac x) 
   81.19 -apply (auto simp add: add_commute [of 1]) 
   81.20 +apply (auto simp add: add.commute [of 1]) 
   81.21  done
   81.22  
   81.23  lemma Nats_diff [simp]: "[|a \<in> Nats; b \<in> Nats|] ==> (a-b :: hypnat) \<in> Nats"
    82.1 --- a/src/HOL/NSA/NSA.thy	Fri Jul 04 20:07:08 2014 +0200
    82.2 +++ b/src/HOL/NSA/NSA.thy	Fri Jul 04 20:18:47 2014 +0200
    82.3 @@ -430,7 +430,7 @@
    82.4  apply (drule_tac x="r / \<bar>star_of a\<bar>" in bspec)
    82.5  apply (simp add: Reals_eq_Standard)
    82.6  apply simp
    82.7 -apply (simp add: hnorm_scaleR pos_less_divide_eq mult_commute)
    82.8 +apply (simp add: hnorm_scaleR pos_less_divide_eq mult.commute)
    82.9  done
   82.10  
   82.11  lemma Compl_HFinite: "- HFinite = HInfinite"
   82.12 @@ -473,11 +473,11 @@
   82.13  lemma HInfinite_add_ge_zero:
   82.14       "[|(x::hypreal) \<in> HInfinite; 0 \<le> y; 0 \<le> x|] ==> (x + y): HInfinite"
   82.15  by (auto intro!: hypreal_add_zero_less_le_mono
   82.16 -       simp add: abs_if add_commute add_nonneg_nonneg HInfinite_def)
   82.17 +       simp add: abs_if add.commute add_nonneg_nonneg HInfinite_def)
   82.18  
   82.19  lemma HInfinite_add_ge_zero2:
   82.20       "[|(x::hypreal) \<in> HInfinite; 0 \<le> y; 0 \<le> x|] ==> (y + x): HInfinite"
   82.21 -by (auto intro!: HInfinite_add_ge_zero simp add: add_commute)
   82.22 +by (auto intro!: HInfinite_add_ge_zero simp add: add.commute)
   82.23  
   82.24  lemma HInfinite_add_gt_zero:
   82.25       "[|(x::hypreal) \<in> HInfinite; 0 < y; 0 < x|] ==> (x + y): HInfinite"
   82.26 @@ -621,13 +621,13 @@
   82.27  by (simp add: approx_def)
   82.28  
   82.29  lemma approx_minus_iff2: " (x @= y) = (-y + x @= 0)"
   82.30 -by (simp add: approx_def add_commute)
   82.31 +by (simp add: approx_def add.commute)
   82.32  
   82.33  lemma approx_refl [iff]: "x @= x"
   82.34  by (simp add: approx_def Infinitesimal_def)
   82.35  
   82.36  lemma hypreal_minus_distrib1: "-(y + -(x::'a::ab_group_add)) = x + -y"
   82.37 -by (simp add: add_commute)
   82.38 +by (simp add: add.commute)
   82.39  
   82.40  lemma approx_sym: "x @= y ==> y @= x"
   82.41  apply (simp add: approx_def)
   82.42 @@ -688,7 +688,7 @@
   82.43  lemma approx_minus: "a @= b ==> -a @= -b"
   82.44  apply (rule approx_minus_iff [THEN iffD2, THEN approx_sym])
   82.45  apply (drule approx_minus_iff [THEN iffD1])
   82.46 -apply (simp add: add_commute)
   82.47 +apply (simp add: add.commute)
   82.48  done
   82.49  
   82.50  lemma approx_minus2: "-a @= -b ==> a @= b"
   82.51 @@ -746,17 +746,17 @@
   82.52  lemma Infinitesimal_add_approx: "[| y \<in> Infinitesimal; x + y = z |] ==> x @= z"
   82.53  apply (rule bex_Infinitesimal_iff [THEN iffD1])
   82.54  apply (drule Infinitesimal_minus_iff [THEN iffD2])
   82.55 -apply (auto simp add: add_assoc [symmetric])
   82.56 +apply (auto simp add: add.assoc [symmetric])
   82.57  done
   82.58  
   82.59  lemma Infinitesimal_add_approx_self: "y \<in> Infinitesimal ==> x @= x + y"
   82.60  apply (rule bex_Infinitesimal_iff [THEN iffD1])
   82.61  apply (drule Infinitesimal_minus_iff [THEN iffD2])
   82.62 -apply (auto simp add: add_assoc [symmetric])
   82.63 +apply (auto simp add: add.assoc [symmetric])
   82.64  done
   82.65  
   82.66  lemma Infinitesimal_add_approx_self2: "y \<in> Infinitesimal ==> x @= y + x"
   82.67 -by (auto dest: Infinitesimal_add_approx_self simp add: add_commute)
   82.68 +by (auto dest: Infinitesimal_add_approx_self simp add: add.commute)
   82.69  
   82.70  lemma Infinitesimal_add_minus_approx_self: "y \<in> Infinitesimal ==> x @= x + -y"
   82.71  by (blast intro!: Infinitesimal_add_approx_self Infinitesimal_minus_iff [THEN iffD2])
   82.72 @@ -770,7 +770,7 @@
   82.73       "[| y \<in> Infinitesimal; x @= z + y|] ==> x @= z"
   82.74  apply (drule_tac x = z in Infinitesimal_add_approx_self2 [THEN approx_sym])
   82.75  apply (erule approx_trans3 [THEN approx_sym])
   82.76 -apply (simp add: add_commute)
   82.77 +apply (simp add: add.commute)
   82.78  apply (erule approx_sym)
   82.79  done
   82.80  
   82.81 @@ -781,7 +781,7 @@
   82.82  
   82.83  lemma approx_add_right_cancel: "b + d @= c + d ==> b @= c"
   82.84  apply (rule approx_add_left_cancel)
   82.85 -apply (simp add: add_commute)
   82.86 +apply (simp add: add.commute)
   82.87  done
   82.88  
   82.89  lemma approx_add_mono1: "b @= c ==> d + b @= d + c"
   82.90 @@ -790,19 +790,19 @@
   82.91  done
   82.92  
   82.93  lemma approx_add_mono2: "b @= c ==> b + a @= c + a"
   82.94 -by (simp add: add_commute approx_add_mono1)
   82.95 +by (simp add: add.commute approx_add_mono1)
   82.96  
   82.97  lemma approx_add_left_iff [simp]: "(a + b @= a + c) = (b @= c)"
   82.98  by (fast elim: approx_add_left_cancel approx_add_mono1)
   82.99  
  82.100  lemma approx_add_right_iff [simp]: "(b + a @= c + a) = (b @= c)"
  82.101 -by (simp add: add_commute)
  82.102 +by (simp add: add.commute)
  82.103  
  82.104  lemma approx_HFinite: "[| x \<in> HFinite; x @= y |] ==> y \<in> HFinite"
  82.105  apply (drule bex_Infinitesimal_iff2 [THEN iffD2], safe)
  82.106  apply (drule Infinitesimal_subset_HFinite [THEN subsetD, THEN HFinite_minus_iff [THEN iffD2]])
  82.107  apply (drule HFinite_add)
  82.108 -apply (auto simp add: add_assoc)
  82.109 +apply (auto simp add: add.assoc)
  82.110  done
  82.111  
  82.112  lemma approx_star_of_HFinite: "x @= star_of D ==> x \<in> HFinite"
  82.113 @@ -851,7 +851,7 @@
  82.114  lemma approx_SReal_mult_cancel_zero:
  82.115       "[| (a::hypreal) \<in> Reals; a \<noteq> 0; a*x @= 0 |] ==> x @= 0"
  82.116  apply (drule Reals_inverse [THEN SReal_subset_HFinite [THEN subsetD]])
  82.117 -apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric])
  82.118 +apply (auto dest: approx_mult2 simp add: mult.assoc [symmetric])
  82.119  done
  82.120  
  82.121  lemma approx_mult_SReal1: "[| (a::hypreal) \<in> Reals; x @= 0 |] ==> x*a @= 0"
  82.122 @@ -867,7 +867,7 @@
  82.123  lemma approx_SReal_mult_cancel:
  82.124       "[| (a::hypreal) \<in> Reals; a \<noteq> 0; a* w @= a*z |] ==> w @= z"
  82.125  apply (drule Reals_inverse [THEN SReal_subset_HFinite [THEN subsetD]])
  82.126 -apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric])
  82.127 +apply (auto dest: approx_mult2 simp add: mult.assoc [symmetric])
  82.128  done
  82.129  
  82.130  lemma approx_SReal_mult_cancel_iff1 [simp]:
  82.131 @@ -991,7 +991,7 @@
  82.132    shows "[| y \<noteq> 0;  y \<in> Infinitesimal;  x/y \<in> HFinite |]
  82.133           ==> x \<in> Infinitesimal"
  82.134  apply (drule Infinitesimal_HFinite_mult2, assumption)
  82.135 -apply (simp add: divide_inverse mult_assoc)
  82.136 +apply (simp add: divide_inverse mult.assoc)
  82.137  done
  82.138  
  82.139  lemma Infinitesimal_SReal_divide:
  82.140 @@ -1161,7 +1161,7 @@
  82.141  
  82.142  lemma lemma_minus_le_zero: "t \<le> t + -r ==> r \<le> (0::hypreal)"
  82.143  apply (drule_tac c = "-t" in add_left_mono)
  82.144 -apply (auto simp add: add_assoc [symmetric])
  82.145 +apply (auto simp add: add.assoc [symmetric])
  82.146  done
  82.147  
  82.148  lemma lemma_st_part_le2:
  82.149 @@ -1352,7 +1352,7 @@
  82.150  apply (drule HFinite_inverse2)+
  82.151  apply (drule approx_mult2, assumption, auto)
  82.152  apply (drule_tac c = "inverse x" in approx_mult1, assumption)
  82.153 -apply (auto intro: approx_sym simp add: mult_assoc)
  82.154 +apply (auto intro: approx_sym simp add: mult.assoc)
  82.155  done
  82.156  
  82.157  (*Used for NSLIM_inverse, NSLIMSEQ_inverse*)
  82.158 @@ -1372,7 +1372,7 @@
  82.159    shows
  82.160       "[| x \<in> HFinite - Infinitesimal;
  82.161           h \<in> Infinitesimal |] ==> inverse(h + x) @= inverse x"
  82.162 -apply (rule add_commute [THEN subst])
  82.163 +apply (rule add.commute [THEN subst])
  82.164  apply (blast intro: inverse_add_Infinitesimal_approx)
  82.165  done
  82.166  
  82.167 @@ -1392,7 +1392,7 @@
  82.168  apply (auto intro: Infinitesimal_mult)
  82.169  apply (rule ccontr, frule Infinitesimal_inverse_HFinite)
  82.170  apply (frule not_Infinitesimal_not_zero)
  82.171 -apply (auto dest: Infinitesimal_HFinite_mult simp add: mult_assoc)
  82.172 +apply (auto dest: Infinitesimal_HFinite_mult simp add: mult.assoc)
  82.173  done
  82.174  declare Infinitesimal_square_iff [symmetric, simp]
  82.175  
  82.176 @@ -1414,7 +1414,7 @@
  82.177  apply safe
  82.178  apply (frule HFinite_inverse, assumption)
  82.179  apply (drule not_Infinitesimal_not_zero)
  82.180 -apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric])
  82.181 +apply (auto dest: approx_mult2 simp add: mult.assoc [symmetric])
  82.182  done
  82.183  
  82.184  lemma approx_HFinite_mult_cancel_iff1:
  82.185 @@ -1432,7 +1432,7 @@
  82.186  lemma HInfinite_HFinite_add:
  82.187       "[| x \<in> HInfinite; y \<in> HFinite |] ==> x + y \<in> HInfinite"
  82.188  apply (rule_tac y = "-y" in HInfinite_HFinite_add_cancel)
  82.189 -apply (auto simp add: add_assoc HFinite_minus_iff)
  82.190 +apply (auto simp add: add.assoc HFinite_minus_iff)
  82.191  done
  82.192  
  82.193  lemma HInfinite_ge_HInfinite:
  82.194 @@ -1454,7 +1454,7 @@
  82.195  apply (frule HFinite_Infinitesimal_not_zero)
  82.196  apply (drule HFinite_not_Infinitesimal_inverse)
  82.197  apply (safe, drule HFinite_mult)
  82.198 -apply (auto simp add: mult_assoc HFinite_HInfinite_iff)
  82.199 +apply (auto simp add: mult.assoc HFinite_HInfinite_iff)
  82.200  done
  82.201  
  82.202  lemma HInfinite_HFinite_not_Infinitesimal_mult2:
  82.203 @@ -1466,7 +1466,7 @@
  82.204  apply (drule HFinite_not_Infinitesimal_inverse)
  82.205  apply (safe, drule_tac x="inverse y" in HFinite_mult)
  82.206  apply assumption
  82.207 -apply (auto simp add: mult_assoc [symmetric] HFinite_HInfinite_iff)
  82.208 +apply (auto simp add: mult.assoc [symmetric] HFinite_HInfinite_iff)
  82.209  done
  82.210  
  82.211  lemma HInfinite_gt_SReal:
  82.212 @@ -1634,7 +1634,7 @@
  82.213  lemma Infinitesimal_add_hrabs_hypreal_of_real_less2:
  82.214       "[| x \<in> Infinitesimal;  abs(hypreal_of_real r) < hypreal_of_real y |]
  82.215        ==> abs (x + hypreal_of_real r) < hypreal_of_real y"
  82.216 -apply (rule add_commute [THEN subst])
  82.217 +apply (rule add.commute [THEN subst])
  82.218  apply (erule Infinitesimal_add_hrabs_hypreal_of_real_less, assumption)
  82.219  done
  82.220  
  82.221 @@ -1684,14 +1684,14 @@
  82.222  lemma Infinitesimal_square_cancel2 [simp]:
  82.223       "(x::hypreal)*x + y*y \<in> Infinitesimal ==> y*y \<in> Infinitesimal"
  82.224  apply (rule Infinitesimal_square_cancel)
  82.225 -apply (rule add_commute [THEN subst])
  82.226 +apply (rule add.commute [THEN subst])
  82.227  apply (simp (no_asm))
  82.228  done
  82.229  
  82.230  lemma HFinite_square_cancel2 [simp]:
  82.231    "(x::hypreal)*x + y*y \<in> HFinite ==> y*y \<in> HFinite"
  82.232  apply (rule HFinite_square_cancel)
  82.233 -apply (rule add_commute [THEN subst])
  82.234 +apply (rule add.commute [THEN subst])
  82.235  apply (simp (no_asm))
  82.236  done
  82.237  
  82.238 @@ -2143,7 +2143,7 @@
  82.239  apply (subst pos_less_divide_eq, assumption)
  82.240  apply (subst pos_less_divide_eq)
  82.241   apply (simp add: real_of_nat_Suc_gt_zero)
  82.242 -apply (simp add: mult_commute)
  82.243 +apply (simp add: mult.commute)
  82.244  done
  82.245  
  82.246  lemma finite_inverse_real_of_posnat_gt_real:
    83.1 --- a/src/HOL/NSA/NSCA.thy	Fri Jul 04 20:07:08 2014 +0200
    83.2 +++ b/src/HOL/NSA/NSCA.thy	Fri Jul 04 20:18:47 2014 +0200
    83.3 @@ -137,7 +137,7 @@
    83.4  lemma approx_SComplex_mult_cancel_zero:
    83.5       "[| a \<in> SComplex; a \<noteq> 0; a*x @= 0 |] ==> x @= 0"
    83.6  apply (drule Standard_inverse [THEN Standard_subset_HFinite [THEN subsetD]])
    83.7 -apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric])
    83.8 +apply (auto dest: approx_mult2 simp add: mult.assoc [symmetric])
    83.9  done
   83.10  
   83.11  lemma approx_mult_SComplex1: "[| a \<in> SComplex; x @= 0 |] ==> x*a @= 0"
   83.12 @@ -153,7 +153,7 @@
   83.13  lemma approx_SComplex_mult_cancel:
   83.14       "[| a \<in> SComplex; a \<noteq> 0; a* w @= a*z |] ==> w @= z"
   83.15  apply (drule Standard_inverse [THEN Standard_subset_HFinite [THEN subsetD]])
   83.16 -apply (auto dest: approx_mult2 simp add: mult_assoc [symmetric])
   83.17 +apply (auto dest: approx_mult2 simp add: mult.assoc [symmetric])
   83.18  done
   83.19  
   83.20  lemma approx_SComplex_mult_cancel_iff1 [simp]:
    84.1 --- a/src/HOL/NSA/StarDef.thy	Fri Jul 04 20:07:08 2014 +0200
    84.2 +++ b/src/HOL/NSA/StarDef.thy	Fri Jul 04 20:18:47 2014 +0200
    84.3 @@ -766,16 +766,16 @@
    84.4  subsection {* Ordered group classes *}
    84.5  
    84.6  instance star :: (semigroup_add) semigroup_add
    84.7 -by (intro_classes, transfer, rule add_assoc)
    84.8 +by (intro_classes, transfer, rule add.assoc)
    84.9  
   84.10  instance star :: (ab_semigroup_add) ab_semigroup_add
   84.11 -by (intro_classes, transfer, rule add_commute)
   84.12 +by (intro_classes, transfer, rule add.commute)
   84.13  
   84.14  instance star :: (semigroup_mult) semigroup_mult
   84.15 -by (intro_classes, transfer, rule mult_assoc)
   84.16 +by (intro_classes, transfer, rule mult.assoc)
   84.17  
   84.18  instance star :: (ab_semigroup_mult) ab_semigroup_mult
   84.19 -by (intro_classes, transfer, rule mult_commute)
   84.20 +by (intro_classes, transfer, rule mult.commute)
   84.21  
   84.22  instance star :: (comm_monoid_add) comm_monoid_add
   84.23  by (intro_classes, transfer, rule comm_monoid_add_class.add_0)
    85.1 --- a/src/HOL/Nat.thy	Fri Jul 04 20:07:08 2014 +0200
    85.2 +++ b/src/HOL/Nat.thy	Fri Jul 04 20:18:47 2014 +0200
    85.3 @@ -244,10 +244,10 @@
    85.4    by (induct m) simp_all
    85.5  
    85.6  lemma mult_Suc_right [simp]: "m * Suc n = m + (m * n)"
    85.7 -  by (induct m) (simp_all add: add_left_commute)
    85.8 +  by (induct m) (simp_all add: add.left_commute)
    85.9  
   85.10  lemma add_mult_distrib: "(m + n) * k = (m * k) + ((n * k)::nat)"
   85.11 -  by (induct m) (simp_all add: add_assoc)
   85.12 +  by (induct m) (simp_all add: add.assoc)
   85.13  
   85.14  instance proof
   85.15    fix n m q :: nat
   85.16 @@ -263,20 +263,15 @@
   85.17  
   85.18  subsubsection {* Addition *}
   85.19  
   85.20 -lemma nat_add_assoc: "(m + n) + k = m + ((n + k)::nat)"
   85.21 -  by (rule add_assoc)
   85.22 -
   85.23 -lemma nat_add_commute: "m + n = n + (m::nat)"
   85.24 -  by (rule add_commute)
   85.25 +lemma nat_add_left_cancel:
   85.26 +  fixes k m n :: nat
   85.27 +  shows "k + m = k + n \<longleftrightarrow> m = n"
   85.28 +  by (fact add_left_cancel)
   85.29  
   85.30 -lemma nat_add_left_commute: "x + (y + z) = y + ((x + z)::nat)"
   85.31 -  by (rule add_left_commute)
   85.32 -
   85.33 -lemma nat_add_left_cancel [simp]: "(k + m = k + n) = (m = (n::nat))"
   85.34 -  by (rule add_left_cancel)
   85.35 -
   85.36 -lemma nat_add_right_cancel [simp]: "(m + k = n + k) = (m=(n::nat))"
   85.37 -  by (rule add_right_cancel)
   85.38 +lemma nat_add_right_cancel:
   85.39 +  fixes k m n :: nat
   85.40 +  shows "m + k = n + k \<longleftrightarrow> m = n"
   85.41 +  by (fact add_right_cancel)
   85.42  
   85.43  text {* Reasoning about @{text "m + 0 = 0"}, etc. *}
   85.44  
   85.45 @@ -315,31 +310,31 @@
   85.46  subsubsection {* Difference *}
   85.47  
   85.48  lemma diff_self_eq_0 [simp]: "(m\<Colon>nat) - m = 0"
   85.49 -  by (induct m) simp_all
   85.50 +  by (fact diff_cancel)
   85.51  
   85.52  lemma diff_diff_left: "(i::nat) - j - k = i - (j + k)"
   85.53 -  by (induct i j rule: diff_induct) simp_all
   85.54 +  by (fact diff_diff_add)
   85.55  
   85.56  lemma Suc_diff_diff [simp]: "(Suc m - n) - Suc k = m - n - k"
   85.57    by (simp add: diff_diff_left)
   85.58  
   85.59  lemma diff_commute: "(i::nat) - j - k = i - k - j"
   85.60 -  by (simp add: diff_diff_left add_commute)
   85.61 +  by (fact diff_right_commute)
   85.62  
   85.63  lemma diff_add_inverse: "(n + m) - n = (m::nat)"
   85.64 -  by (induct n) simp_all
   85.65 +  by (fact add_diff_cancel_left')
   85.66  
   85.67  lemma diff_add_inverse2: "(m + n) - n = (m::nat)"
   85.68 -  by (simp add: diff_add_inverse add_commute [of m n])
   85.69 +  by (fact add_diff_cancel_right')
   85.70  
   85.71  lemma diff_cancel: "(k + m) - (k + n) = m - (n::nat)"
   85.72 -  by (induct k) simp_all
   85.73 +  by (fact comm_monoid_diff_class.add_diff_cancel_left)
   85.74  
   85.75  lemma diff_cancel2: "(m + k) - (n + k) = m - (n::nat)"
   85.76 -  by (simp add: diff_cancel add_commute)
   85.77 +  by (fact add_diff_cancel_right)
   85.78  
   85.79  lemma diff_add_0: "n - (n + m) = (0::nat)"
   85.80 -  by (induct n) simp_all
   85.81 +  by (fact diff_add_zero)
   85.82  
   85.83  lemma diff_Suc_1 [simp]: "Suc n - 1 = n"
   85.84    unfolding One_nat_def by simp
   85.85 @@ -350,20 +345,14 @@
   85.86  by (induct m n rule: diff_induct) (simp_all add: diff_cancel)
   85.87  
   85.88  lemma diff_mult_distrib2: "k * ((m::nat) - n) = (k * m) - (k * n)"
   85.89 -by (simp add: diff_mult_distrib mult_commute [of k])
   85.90 +by (simp add: diff_mult_distrib mult.commute [of k])
   85.91    -- {* NOT added as rewrites, since sometimes they are used from right-to-left *}
   85.92  
   85.93  
   85.94  subsubsection {* Multiplication *}
   85.95  
   85.96 -lemma nat_mult_assoc: "(m * n) * k = m * ((n * k)::nat)"
   85.97 -  by (rule mult_assoc)
   85.98 -
   85.99 -lemma nat_mult_commute: "m * n = n * (m::nat)"
  85.100 -  by (rule mult_commute)
  85.101 -
  85.102  lemma add_mult_distrib2: "k * (m + n) = (k * m) + ((k * n)::nat)"
  85.103 -  by (rule distrib_left)
  85.104 +  by (fact distrib_left)
  85.105  
  85.106  lemma mult_is_0 [simp]: "((m::nat) * n = 0) = (m=0 | n=0)"
  85.107    by (induct m) auto
  85.108 @@ -402,7 +391,7 @@
  85.109  qed
  85.110  
  85.111  lemma mult_cancel2 [simp]: "(m * k = n * k) = (m = n | (k = (0::nat)))"
  85.112 -  by (simp add: mult_commute)
  85.113 +  by (simp add: mult.commute)
  85.114  
  85.115  lemma Suc_mult_cancel1: "(Suc k * m = Suc k * n) = (m = n)"
  85.116    by (subst mult_cancel1) simp
  85.117 @@ -950,7 +939,7 @@
  85.118    next
  85.119      case (Suc k)
  85.120      have "0 + i < Suc k + i" by (rule add_less_mono1) simp
  85.121 -    hence "i < Suc (i + k)" by (simp add: add_commute)
  85.122 +    hence "i < Suc (i + k)" by (simp add: add.commute)
  85.123      from trans[OF this lessI Suc step]
  85.124      show ?case by simp
  85.125    qed
  85.126 @@ -1036,7 +1025,7 @@
  85.127  by (insert add_right_mono [of 0 m n], simp)
  85.128  
  85.129  lemma le_add1: "n \<le> ((n + m)::nat)"
  85.130 -by (simp add: add_commute, rule le_add2)
  85.131 +by (simp add: add.commute, rule le_add2)
  85.132  
  85.133  lemma less_add_Suc1: "i < Suc (i + m)"
  85.134  by (rule le_less_trans, rule le_add1, rule lessI)
  85.135 @@ -1071,7 +1060,7 @@
  85.136  done
  85.137  
  85.138  lemma not_add_less2 [iff]: "~ (j + i < (i::nat))"
  85.139 -by (simp add: add_commute)
  85.140 +by (simp add: add.commute)
  85.141  
  85.142  lemma add_leD1: "m + k \<le> n ==> m \<le> (n::nat)"
  85.143  apply (rule order_trans [of _ "m+k"])
  85.144 @@ -1079,7 +1068,7 @@
  85.145  done
  85.146  
  85.147  lemma add_leD2: "m + k \<le> n ==> k \<le> (n::nat)"
  85.148 -apply (simp add: add_commute)
  85.149 +apply (simp add: add.commute)
  85.150  apply (erule add_leD1)
  85.151  done
  85.152  
  85.153 @@ -1103,7 +1092,7 @@
  85.154  by (simp add: add_diff_inverse linorder_not_less)
  85.155  
  85.156  lemma le_add_diff_inverse2 [simp]: "n \<le> m ==> (m - n) + n = (m::nat)"
  85.157 -by (simp add: add_commute)
  85.158 +by (simp add: add.commute)
  85.159  
  85.160  lemma Suc_diff_le: "n \<le> m ==> Suc m - n = Suc (m - n)"
  85.161  by (induct m n rule: diff_induct) simp_all
  85.162 @@ -1135,7 +1124,7 @@
  85.163  by (induct j k rule: diff_induct) simp_all
  85.164  
  85.165  lemma diff_add_assoc2: "k \<le> (j::nat) ==> (j + i) - k = (j - k) + i"
  85.166 -by (simp add: add_commute diff_add_assoc)
  85.167 +by (simp add: add.commute diff_add_assoc)
  85.168  
  85.169  lemma le_imp_diff_is_add: "i \<le> (j::nat) ==> (j - i = k) = (j = k + i)"
  85.170  by (auto simp add: diff_add_inverse2)
  85.171 @@ -1233,7 +1222,7 @@
  85.172    done
  85.173  
  85.174  lemma mult_less_cancel1 [simp]: "(k * (m::nat) < k * n) = (0 < k & m < n)"
  85.175 -by (simp add: mult_commute [of k])
  85.176 +by (simp add: mult.commute [of k])
  85.177  
  85.178  lemma mult_le_cancel1 [simp]: "(k * (m::nat) \<le> k * n) = (0 < k --> m \<le> n)"
  85.179  by (simp add: linorder_not_less [symmetric], auto)
  85.180 @@ -1435,7 +1424,7 @@
  85.181      by (induct n) simp_all
  85.182    from this [of 0] have "of_nat_aux (\<lambda>i. i + 1) n 1 = of_nat_aux (\<lambda>i. i + 1) n 0 + 1"
  85.183      by simp
  85.184 -  with Suc show ?case by (simp add: add_commute)
  85.185 +  with Suc show ?case by (simp add: add.commute)
  85.186  qed
  85.187  
  85.188  end
  85.189 @@ -1693,13 +1682,13 @@
  85.190  by arith
  85.191  
  85.192  lemma le_diff_conv2: "k \<le> j ==> (i \<le> j-k) = (i+k \<le> (j::nat))"
  85.193 -by arith
  85.194 +  by (fact le_diff_conv2) -- {* FIXME delete *}
  85.195  
  85.196  lemma diff_diff_cancel [simp]: "i \<le> (n::nat) ==> n - (n - i) = i"
  85.197  by arith
  85.198  
  85.199  lemma le_add_diff: "k \<le> (n::nat) ==> m \<le> n + m - k"
  85.200 -by arith
  85.201 +  by (fact le_add_diff) -- {* FIXME delete *}
  85.202  
  85.203  (*Replaces the previous diff_less and le_diff_less, which had the stronger
  85.204    second premise n\<le>m*)
  85.205 @@ -1847,7 +1836,7 @@
  85.206  
  85.207  lemma dvd_antisym: "[| m dvd n; n dvd m |] ==> m = (n::nat)"
  85.208    unfolding dvd_def
  85.209 -  by (force dest: mult_eq_self_implies_10 simp add: mult_assoc)
  85.210 +  by (force dest: mult_eq_self_implies_10 simp add: mult.assoc)
  85.211  
  85.212  text {* @{term "op dvd"} is a partial order *}
  85.213  
  85.214 @@ -1890,7 +1879,7 @@
  85.215    done
  85.216  
  85.217  lemma dvd_mult_cancel2: "0<m ==> (n*m dvd m) = (n = (1::nat))"
  85.218 -  apply (subst mult_commute)
  85.219 +  apply (subst mult.commute)
  85.220    apply (erule dvd_mult_cancel1)
  85.221    done
  85.222  
  85.223 @@ -1940,7 +1929,7 @@
  85.224    fixes m n q :: nat
  85.225    assumes "m dvd q"
  85.226    shows "m dvd n + q \<longleftrightarrow> m dvd n"
  85.227 -  using assms by (simp add: dvd_plus_eq_right add_commute [of n])
  85.228 +  using assms by (simp add: dvd_plus_eq_right add.commute [of n])
  85.229  
  85.230  lemma less_eq_dvd_minus:
  85.231    fixes m n :: nat
  85.232 @@ -1949,7 +1938,7 @@
  85.233  proof -
  85.234    from assms have "n = m + (n - m)" by simp
  85.235    then obtain q where "n = m + q" ..
  85.236 -  then show ?thesis by (simp add: dvd_reduce add_commute [of m])
  85.237 +  then show ?thesis by (simp add: dvd_reduce add.commute [of m])
  85.238  qed
  85.239  
  85.240  lemma dvd_minus_self:
  85.241 @@ -1966,7 +1955,7 @@
  85.242      by (auto elim: dvd_plusE)
  85.243    also from assms have "\<dots> \<longleftrightarrow> m dvd r * m + n - q" by simp
  85.244    also from assms have "\<dots> \<longleftrightarrow> m dvd (r * m - q) + n" by simp
  85.245 -  also have "\<dots> \<longleftrightarrow> m dvd n + (r * m - q)" by (simp add: add_commute)
  85.246 +  also have "\<dots> \<longleftrightarrow> m dvd n + (r * m - q)" by (simp add: add.commute)
  85.247    finally show ?thesis .
  85.248  qed
  85.249  
    86.1 --- a/src/HOL/Nominal/Examples/Standardization.thy	Fri Jul 04 20:07:08 2014 +0200
    86.2 +++ b/src/HOL/Nominal/Examples/Standardization.thy	Fri Jul 04 20:18:47 2014 +0200
    86.3 @@ -213,7 +213,7 @@
    86.4      prefer 2
    86.5      apply (erule allE, erule impE, rule refl, erule spec)
    86.6      apply simp
    86.7 -    apply (simp only: foldl_conv_fold add_commute fold_plus_listsum_rev)
    86.8 +    apply (simp only: foldl_conv_fold add.commute fold_plus_listsum_rev)
    86.9      apply (fastforce simp add: listsum_map_remove1)
   86.10    apply clarify
   86.11    apply (subgoal_tac "\<exists>y::name. y \<sharp> (x, u, z)")
   86.12 @@ -235,7 +235,7 @@
   86.13     prefer 2
   86.14     apply blast
   86.15    apply simp
   86.16 -  apply (simp only: foldl_conv_fold add_commute fold_plus_listsum_rev)
   86.17 +  apply (simp only: foldl_conv_fold add.commute fold_plus_listsum_rev)
   86.18    apply (fastforce simp add: listsum_map_remove1)
   86.19    done
   86.20  
    87.1 --- a/src/HOL/NthRoot.thy	Fri Jul 04 20:07:08 2014 +0200
    87.2 +++ b/src/HOL/NthRoot.thy	Fri Jul 04 20:18:47 2014 +0200
    87.3 @@ -222,7 +222,7 @@
    87.4             simp: sgn_zero_iff sgn_mult power_mult[symmetric] abs_mult power_mult_distrib abs_sgn_eq)
    87.5  
    87.6  lemma real_root_commute: "root m (root n x) = root n (root m x)"
    87.7 -  by (simp add: real_root_mult_exp [symmetric] mult_commute)
    87.8 +  by (simp add: real_root_mult_exp [symmetric] mult.commute)
    87.9  
   87.10  text {* Monotonicity in first argument *}
   87.11  
   87.12 @@ -432,7 +432,7 @@
   87.13    from n obtain m where m: "n = 2 * m"
   87.14      unfolding even_mult_two_ex ..
   87.15    from m have "sqrt (2 ^ n) = sqrt ((2 ^ m)\<^sup>2)"
   87.16 -    by (simp only: power_mult[symmetric] mult_commute)
   87.17 +    by (simp only: power_mult[symmetric] mult.commute)
   87.18    then show ?thesis
   87.19      using m by simp
   87.20  qed
   87.21 @@ -512,7 +512,7 @@
   87.22    proof (rule right_inverse_eq [THEN iffD1, THEN sym]) 
   87.23      show "sqrt x / x \<noteq> 0" by (simp add: divide_inverse nneg nz) 
   87.24      show "inverse (sqrt x) / (sqrt x / x) = 1"
   87.25 -      by (simp add: divide_inverse mult_assoc [symmetric] 
   87.26 +      by (simp add: divide_inverse mult.assoc [symmetric] 
   87.27                    power2_eq_square [symmetric] real_inv_sqrt_pow2 pos nz) 
   87.28    qed
   87.29  qed
   87.30 @@ -603,7 +603,7 @@
   87.31    "sqrt ((a + c)\<^sup>2 + (b + d)\<^sup>2) \<le> sqrt (a\<^sup>2 + b\<^sup>2) + sqrt (c\<^sup>2 + d\<^sup>2)"
   87.32  apply (rule power2_le_imp_le, simp)
   87.33  apply (simp add: power2_sum)
   87.34 -apply (simp only: mult_assoc distrib_left [symmetric])
   87.35 +apply (simp only: mult.assoc distrib_left [symmetric])
   87.36  apply (rule mult_left_mono)
   87.37  apply (rule power2_le_imp_le)
   87.38  apply (simp add: power2_sum power_mult_distrib)
    88.1 --- a/src/HOL/Num.thy	Fri Jul 04 20:07:08 2014 +0200
    88.2 +++ b/src/HOL/Num.thy	Fri Jul 04 20:18:47 2014 +0200
    88.3 @@ -254,8 +254,8 @@
    88.4  lemma one_plus_numeral_commute: "1 + numeral x = numeral x + 1"
    88.5    apply (induct x)
    88.6    apply simp
    88.7 -  apply (simp add: add_assoc [symmetric], simp add: add_assoc)
    88.8 -  apply (simp add: add_assoc [symmetric], simp add: add_assoc)
    88.9 +  apply (simp add: add.assoc [symmetric], simp add: add.assoc)
   88.10 +  apply (simp add: add.assoc [symmetric], simp add: add.assoc)
   88.11    done
   88.12  
   88.13  lemma numeral_inc: "numeral (inc x) = numeral x + 1"
   88.14 @@ -264,7 +264,7 @@
   88.15    have "numeral x + (1 + numeral x) + 1 = numeral x + (numeral x + 1) + 1"
   88.16      by (simp only: one_plus_numeral_commute)
   88.17    with Bit1 show ?case
   88.18 -    by (simp add: add_assoc)
   88.19 +    by (simp add: add.assoc)
   88.20  qed simp_all
   88.21  
   88.22  declare numeral.simps [simp del]
   88.23 @@ -350,7 +350,7 @@
   88.24  
   88.25  lemma numeral_add: "numeral (m + n) = numeral m + numeral n"
   88.26    by (induct n rule: num_induct)
   88.27 -     (simp_all only: numeral_One add_One add_inc numeral_inc add_assoc)
   88.28 +     (simp_all only: numeral_One add_One add_inc numeral_inc add.assoc)
   88.29  
   88.30  lemma numeral_plus_numeral: "numeral m + numeral n = numeral (m + n)"
   88.31    by (rule numeral_add [symmetric])
   88.32 @@ -397,20 +397,20 @@
   88.33    apply simp
   88.34    apply (rule_tac a=x in add_left_imp_eq)
   88.35    apply (rule_tac a=x in add_right_imp_eq)
   88.36 -  apply (simp add: add_assoc)
   88.37 -  apply (simp add: add_assoc [symmetric], simp add: add_assoc)
   88.38 +  apply (simp add: add.assoc)
   88.39 +  apply (simp add: add.assoc [symmetric], simp add: add.assoc)
   88.40    apply (rule_tac a=x in add_left_imp_eq)
   88.41    apply (rule_tac a=x in add_right_imp_eq)
   88.42 -  apply (simp add: add_assoc)
   88.43 -  apply (simp add: add_assoc, simp add: add_assoc [symmetric])
   88.44 +  apply (simp add: add.assoc)
   88.45 +  apply (simp add: add.assoc, simp add: add.assoc [symmetric])
   88.46    done
   88.47  
   88.48  lemma is_num_add_left_commute:
   88.49    "\<lbrakk>is_num x; is_num y\<rbrakk> \<Longrightarrow> x + (y + z) = y + (x + z)"
   88.50 -  by (simp only: add_assoc [symmetric] is_num_add_commute)
   88.51 +  by (simp only: add.assoc [symmetric] is_num_add_commute)
   88.52  
   88.53  lemmas is_num_normalize =
   88.54 -  add_assoc is_num_add_commute is_num_add_left_commute
   88.55 +  add.assoc is_num_add_commute is_num_add_left_commute
   88.56    is_num.intros is_num_numeral
   88.57    minus_add
   88.58  
   88.59 @@ -1172,7 +1172,7 @@
   88.60    minus_zero left_minus right_minus
   88.61    mult_1_left mult_1_right
   88.62    mult_minus_left mult_minus_right
   88.63 -  minus_add_distrib minus_minus mult_assoc
   88.64 +  minus_add_distrib minus_minus mult.assoc
   88.65  
   88.66  lemmas of_nat_simps =
   88.67    of_nat_0 of_nat_1 of_nat_Suc of_nat_add of_nat_mult
   88.68 @@ -1225,20 +1225,20 @@
   88.69  
   88.70  lemma add_numeral_left [simp]:
   88.71    "numeral v + (numeral w + z) = (numeral(v + w) + z)"
   88.72 -  by (simp_all add: add_assoc [symmetric])
   88.73 +  by (simp_all add: add.assoc [symmetric])
   88.74  
   88.75  lemma add_neg_numeral_left [simp]:
   88.76    "numeral v + (- numeral w + y) = (sub v w + y)"
   88.77    "- numeral v + (numeral w + y) = (sub w v + y)"
   88.78    "- numeral v + (- numeral w + y) = (- numeral(v + w) + y)"
   88.79 -  by (simp_all add: add_assoc [symmetric])
   88.80 +  by (simp_all add: add.assoc [symmetric])
   88.81  
   88.82  lemma mult_numeral_left [simp]:
   88.83    "numeral v * (numeral w * z) = (numeral(v * w) * z :: 'a::semiring_numeral)"
   88.84    "- numeral v * (numeral w * y) = (- numeral(v * w) * y :: 'b::ring_1)"
   88.85    "numeral v * (- numeral w * y) = (- numeral(v * w) * y :: 'b::ring_1)"
   88.86    "- numeral v * (- numeral w * y) = (numeral(v * w) * y :: 'b::ring_1)"
   88.87 -  by (simp_all add: mult_assoc [symmetric])
   88.88 +  by (simp_all add: mult.assoc [symmetric])
   88.89  
   88.90  hide_const (open) One Bit0 Bit1 BitM inc pow sqr sub dbl dbl_inc dbl_dec
   88.91  
    89.1 --- a/src/HOL/Number_Theory/Binomial.thy	Fri Jul 04 20:07:08 2014 +0200
    89.2 +++ b/src/HOL/Number_Theory/Binomial.thy	Fri Jul 04 20:18:47 2014 +0200
    89.3 @@ -33,7 +33,7 @@
    89.4  lemma choose_reduce_nat: 
    89.5    "0 < (n::nat) \<Longrightarrow> 0 < k \<Longrightarrow>
    89.6      (n choose k) = ((n - 1) choose k) + ((n - 1) choose (k - 1))"
    89.7 -  by (metis Suc_diff_1 binomial.simps(2) nat_add_commute neq0_conv)
    89.8 +  by (metis Suc_diff_1 binomial.simps(2) add.commute neq0_conv)
    89.9  
   89.10  lemma binomial_eq_0: "n < k \<Longrightarrow> n choose k = 0"
   89.11    by (induct n arbitrary: k) auto
   89.12 @@ -356,7 +356,7 @@
   89.13    assumes kn: "k \<le> n"
   89.14    shows "pochhammer (b - of_nat k + 1) k = ((- 1) ^ k :: 'a::comm_ring_1) * pochhammer (- b) k"
   89.15    unfolding pochhammer_minus[OF kn, where b=b]
   89.16 -  unfolding mult_assoc[symmetric]
   89.17 +  unfolding mult.assoc[symmetric]
   89.18    unfolding power_add[symmetric]
   89.19    by simp
   89.20  
   89.21 @@ -461,7 +461,7 @@
   89.22        apply (simp add: pochhammer_Suc_setprod fact_altdef_nat h
   89.23          of_nat_setprod setprod.distrib[symmetric] eq' del: One_nat_def power_Suc)
   89.24        unfolding setprod.union_disjoint[OF th0, unfolded eq3, of "of_nat:: nat \<Rightarrow> 'a"] eq[unfolded h]
   89.25 -      unfolding mult_assoc[symmetric]
   89.26 +      unfolding mult.assoc[symmetric]
   89.27        unfolding setprod.distrib[symmetric]
   89.28        apply simp
   89.29        apply (intro setprod.reindex_bij_witness[where i="op - n" and j="op - n"])
   89.30 @@ -494,7 +494,7 @@
   89.31  
   89.32  lemma gbinomial_mult_1':
   89.33      "(a gchoose n) * a = of_nat n * (a gchoose n) + of_nat (Suc n) * (a gchoose (Suc n))"
   89.34 -  by (simp add: mult_commute gbinomial_mult_1)
   89.35 +  by (simp add: mult.commute gbinomial_mult_1)
   89.36  
   89.37  lemma gbinomial_Suc:
   89.38      "a gchoose (Suc k) = (setprod (\<lambda>i. a - of_nat i) {0 .. k}) / of_nat (fact (Suc k))"
   89.39 @@ -509,7 +509,7 @@
   89.40    "((a::'a::field_char_0) gchoose (Suc k)) * (of_nat (fact (Suc k)) :: 'a) =
   89.41      (setprod (\<lambda>i. a - of_nat i) {0 .. k})"
   89.42    using gbinomial_mult_fact[of k a]
   89.43 -  by (subst mult_commute)
   89.44 +  by (subst mult.commute)
   89.45  
   89.46  
   89.47  lemma gbinomial_Suc_Suc:
   89.48 @@ -531,8 +531,8 @@
   89.49      unfolding gbinomial_mult_fact'
   89.50      apply (subst fact_Suc)
   89.51      unfolding of_nat_mult
   89.52 -    apply (subst mult_commute)
   89.53 -    unfolding mult_assoc
   89.54 +    apply (subst mult.commute)
   89.55 +    unfolding mult.assoc
   89.56      unfolding gbinomial_mult_fact
   89.57      apply (simp add: field_simps)
   89.58      done
   89.59 @@ -597,7 +597,7 @@
   89.60      from assms have "n * i \<ge> i * k" by simp
   89.61      then have "n * k - n * i \<le> n * k - i * k" by arith
   89.62      then have "n * (k - i) \<le> (n - i) * k"
   89.63 -      by (simp add: diff_mult_distrib2 nat_mult_commute)
   89.64 +      by (simp add: diff_mult_distrib2 mult.commute)
   89.65      then have "of_nat n * of_nat (k - i) \<le> of_nat (n - i) * (of_nat k :: 'a)"
   89.66        unfolding of_nat_mult[symmetric] of_nat_le_iff .
   89.67      with assms show "of_nat n / of_nat k \<le> of_nat (n - i) / (of_nat (k - i) :: 'a)"
   89.68 @@ -634,20 +634,20 @@
   89.69    also have "... = fact (m+r+k) div (fact r * (fact k * fact m))"
   89.70      apply (subst div_mult_div_if_dvd)
   89.71      apply (auto simp: fact_fact_dvd_fact)
   89.72 -    apply (metis ab_semigroup_add_class.add_ac(1) add_commute fact_fact_dvd_fact)
   89.73 +    apply (metis ab_semigroup_add_class.add_ac(1) add.commute fact_fact_dvd_fact)
   89.74      done
   89.75    also have "... = (fact (m+r+k) * fact (m+r)) div (fact r * (fact k * fact m) * fact (m+r))"
   89.76      apply (subst div_mult_div_if_dvd [symmetric])
   89.77      apply (auto simp: fact_fact_dvd_fact)
   89.78 -    apply (metis dvd_trans dvd.dual_order.refl fact_fact_dvd_fact mult_dvd_mono mult_left_commute)
   89.79 +    apply (metis dvd_trans dvd.dual_order.refl fact_fact_dvd_fact mult_dvd_mono mult.left_commute)
   89.80      done
   89.81    also have "... = (fact (m+r+k) div (fact k * fact (m+r)) * (fact (m+r) div (fact r * fact m)))"
   89.82      apply (subst div_mult_div_if_dvd)
   89.83      apply (auto simp: fact_fact_dvd_fact)
   89.84 -    apply(metis mult_left_commute)
   89.85 +    apply(metis mult.left_commute)
   89.86      done
   89.87    finally show ?thesis
   89.88 -    by (simp add: binomial_altdef_nat mult_commute)
   89.89 +    by (simp add: binomial_altdef_nat mult.commute)
   89.90  qed
   89.91  
   89.92  lemma choose_mult:
    90.1 --- a/src/HOL/Number_Theory/Cong.thy	Fri Jul 04 20:07:08 2014 +0200
    90.2 +++ b/src/HOL/Number_Theory/Cong.thy	Fri Jul 04 20:18:47 2014 +0200
    90.3 @@ -275,11 +275,11 @@
    90.4  
    90.5  lemma cong_mult_lcancel_nat:
    90.6      "coprime k (m::nat) \<Longrightarrow> [k * a = k * b ] (mod m) = [a = b] (mod m)"
    90.7 -  by (simp add: mult_commute cong_mult_rcancel_nat)
    90.8 +  by (simp add: mult.commute cong_mult_rcancel_nat)
    90.9  
   90.10  lemma cong_mult_lcancel_int:
   90.11      "coprime k (m::int) \<Longrightarrow> [k * a = k * b] (mod m) = [a = b] (mod m)"
   90.12 -  by (simp add: mult_commute cong_mult_rcancel_int)
   90.13 +  by (simp add: mult.commute cong_mult_rcancel_int)
   90.14  
   90.15  (* was zcong_zgcd_zmult_zmod *)
   90.16  lemma coprime_cong_mult_int:
   90.17 @@ -321,7 +321,7 @@
   90.18    proof (cases "b \<le> a")
   90.19      case True
   90.20      then show ?rhs using eqm
   90.21 -      by (metis cong_altdef_nat dvd_def le_add_diff_inverse add_0_right mult_0 mult_commute)
   90.22 +      by (metis cong_altdef_nat dvd_def le_add_diff_inverse add_0_right mult_0 mult.commute)
   90.23    next
   90.24      case False
   90.25      then show ?rhs using eqm 
   90.26 @@ -333,7 +333,7 @@
   90.27  next
   90.28    assume ?rhs
   90.29    then show ?lhs
   90.30 -    by (metis cong_nat_def mod_mult_self2 nat_mult_commute)
   90.31 +    by (metis cong_nat_def mod_mult_self2 mult.commute)
   90.32  qed
   90.33  
   90.34  lemma cong_gcd_eq_int: "[(a::int) = b] (mod m) \<Longrightarrow> gcd a m = gcd b m"
   90.35 @@ -467,18 +467,18 @@
   90.36    apply force
   90.37    apply (cases "a = 0", simp add: cong_0_1_nat)
   90.38    apply (rule iffI)
   90.39 -  apply (metis cong_to_1_nat dvd_def monoid_mult_class.mult.right_neutral mult_commute mult_eq_if)
   90.40 +  apply (metis cong_to_1_nat dvd_def monoid_mult_class.mult.right_neutral mult.commute mult_eq_if)
   90.41    apply (metis cong_add_lcancel_0_nat cong_mult_self_nat)
   90.42    done
   90.43  
   90.44  lemma cong_le_nat: "(y::nat) <= x \<Longrightarrow> [x = y] (mod n) \<longleftrightarrow> (\<exists>q. x = q * n + y)"
   90.45 -  by (metis cong_altdef_nat Nat.le_imp_diff_is_add dvd_def nat_mult_commute)
   90.46 +  by (metis cong_altdef_nat Nat.le_imp_diff_is_add dvd_def mult.commute)
   90.47  
   90.48  lemma cong_solve_nat: "(a::nat) \<noteq> 0 \<Longrightarrow> EX x. [a * x = gcd a n] (mod n)"
   90.49    apply (cases "n = 0")
   90.50    apply force
   90.51    apply (frule bezout_nat [of a n], auto)
   90.52 -  by (metis cong_add_rcancel_0_nat cong_mult_self_nat mult_commute)
   90.53 +  by (metis cong_add_rcancel_0_nat cong_mult_self_nat mult.commute)
   90.54  
   90.55  lemma cong_solve_int: "(a::int) \<noteq> 0 \<Longrightarrow> EX x. [a * x = gcd a n] (mod n)"
   90.56    apply (cases "n = 0")
   90.57 @@ -487,7 +487,7 @@
   90.58    apply (rule_tac x = "-1" in exI)
   90.59    apply auto
   90.60    apply (insert bezout_int [of a n], auto)
   90.61 -  by (metis cong_iff_lin_int mult_commute)
   90.62 +  by (metis cong_iff_lin_int mult.commute)
   90.63  
   90.64  lemma cong_solve_dvd_nat:
   90.65    assumes a: "(a::nat) \<noteq> 0" and b: "gcd a n dvd d"
   90.66 @@ -603,9 +603,9 @@
   90.67    from cong_solve_coprime_nat [OF b] obtain x2 where two: "[m2 * x2 = 1] (mod m1)"
   90.68      by auto
   90.69    have "[m1 * x1 = 0] (mod m1)"
   90.70 -    by (subst mult_commute, rule cong_mult_self_nat)
   90.71 +    by (subst mult.commute, rule cong_mult_self_nat)
   90.72    moreover have "[m2 * x2 = 0] (mod m2)"
   90.73 -    by (subst mult_commute, rule cong_mult_self_nat)
   90.74 +    by (subst mult.commute, rule cong_mult_self_nat)
   90.75    moreover note one two
   90.76    ultimately show ?thesis by blast
   90.77  qed
   90.78 @@ -622,9 +622,9 @@
   90.79    from cong_solve_coprime_int [OF b] obtain x2 where two: "[m2 * x2 = 1] (mod m1)"
   90.80      by auto
   90.81    have "[m1 * x1 = 0] (mod m1)"
   90.82 -    by (subst mult_commute, rule cong_mult_self_int)
   90.83 +    by (subst mult.commute, rule cong_mult_self_int)
   90.84    moreover have "[m2 * x2 = 0] (mod m2)"
   90.85 -    by (subst mult_commute, rule cong_mult_self_int)
   90.86 +    by (subst mult.commute, rule cong_mult_self_int)
   90.87    moreover note one two
   90.88    ultimately show ?thesis by blast
   90.89  qed
   90.90 @@ -729,7 +729,7 @@
   90.91      apply (rule cong_trans_nat)
   90.92      prefer 2
   90.93      apply (rule `[y = u2] (mod m2)`)
   90.94 -    apply (subst mult_commute)
   90.95 +    apply (subst mult.commute)
   90.96      apply (rule cong_modulus_mult_nat)
   90.97      apply (rule cong_mod_nat)
   90.98      using nz apply auto
   90.99 @@ -778,7 +778,7 @@
  90.100      by auto
  90.101    moreover have "[(PROD j : A - {i}. m j) * x = 0]
  90.102      (mod (PROD j : A - {i}. m j))"
  90.103 -    by (subst mult_commute, rule cong_mult_self_nat)
  90.104 +    by (subst mult.commute, rule cong_mult_self_nat)
  90.105    ultimately show "\<exists>a. [a = 1] (mod m i) \<and> [a = 0]
  90.106        (mod setprod m (A - {i}))"
  90.107      by blast
  90.108 @@ -835,7 +835,7 @@
  90.109           [x = y] (mod (PROD i:A. m i))"
  90.110    apply (induct set: finite)
  90.111    apply auto
  90.112 -  apply (metis coprime_cong_mult_nat nat_mult_commute setprod_coprime_nat)
  90.113 +  apply (metis coprime_cong_mult_nat mult.commute setprod_coprime_nat)
  90.114    done
  90.115  
  90.116  lemma chinese_remainder_unique_nat:
    91.1 --- a/src/HOL/Number_Theory/Eratosthenes.thy	Fri Jul 04 20:07:08 2014 +0200
    91.2 +++ b/src/HOL/Number_Theory/Eratosthenes.thy	Fri Jul 04 20:18:47 2014 +0200
    91.3 @@ -50,7 +50,7 @@
    91.4  
    91.5  lemma in_numbers_of_marks_eq:
    91.6    "m \<in> numbers_of_marks n bs \<longleftrightarrow> m \<in> {n..<n + length bs} \<and> bs ! (m - n)"
    91.7 -  by (simp add: numbers_of_marks_def in_set_enumerate_eq image_iff add_commute)
    91.8 +  by (simp add: numbers_of_marks_def in_set_enumerate_eq image_iff add.commute)
    91.9  
   91.10  lemma sorted_list_of_set_numbers_of_marks:
   91.11    "sorted_list_of_set (numbers_of_marks n bs) = map fst (filter snd (enumerate n bs))"
   91.12 @@ -141,7 +141,7 @@
   91.13          by (simp add: div_mod_equality' [symmetric])
   91.14      }
   91.15      then have "w dvd v + w + r + (w - v mod w) \<longleftrightarrow> w dvd m + w + r + (w - m mod w)"
   91.16 -      by (simp add: add_assoc add_left_commute [of m] add_left_commute [of v]
   91.17 +      by (simp add: add.assoc add.left_commute [of m] add.left_commute [of v]
   91.18          dvd_plus_eq_left dvd_plus_eq_right)
   91.19      moreover from q have "Suc q = m + w + r" by (simp add: w_def)
   91.20      moreover from q have "Suc (Suc q) = v + w + r" by (simp add: v_def w_def)
    92.1 --- a/src/HOL/Number_Theory/Fib.thy	Fri Jul 04 20:07:08 2014 +0200
    92.2 +++ b/src/HOL/Number_Theory/Fib.thy	Fri Jul 04 20:18:47 2014 +0200
    92.3 @@ -60,7 +60,7 @@
    92.4  lemma coprime_fib_Suc_nat: "coprime (fib (n::nat)) (fib (Suc n))"
    92.5    apply (induct n rule: fib.induct)
    92.6    apply auto
    92.7 -  apply (metis gcd_add1_nat nat_add_commute)
    92.8 +  apply (metis gcd_add1_nat add.commute)
    92.9    done
   92.10  
   92.11  lemma gcd_fib_add: "gcd (fib m) (fib (n + m)) = gcd (fib m) (fib n)"
   92.12 @@ -68,7 +68,7 @@
   92.13    apply (cases m)
   92.14    apply (auto simp add: fib_add)
   92.15    apply (subst gcd_commute_nat)
   92.16 -  apply (subst mult_commute)
   92.17 +  apply (subst mult.commute)
   92.18    apply (metis coprime_fib_Suc_nat gcd_add_mult_nat gcd_mult_cancel_nat gcd_nat.commute)
   92.19    done
   92.20  
    93.1 --- a/src/HOL/Number_Theory/Gauss.thy	Fri Jul 04 20:07:08 2014 +0200
    93.2 +++ b/src/HOL/Number_Theory/Gauss.thy	Fri Jul 04 20:18:47 2014 +0200
    93.3 @@ -260,11 +260,11 @@
    93.4    fix y::int and z::int
    93.5    assume "p - (y*a) mod p = (z*a) mod p"
    93.6    then have "[(y*a) mod p + (z*a) mod p = 0] (mod p)"
    93.7 -    by (metis add_commute diff_eq_eq dvd_refl cong_int_def dvd_eq_mod_eq_0 mod_0)
    93.8 +    by (metis add.commute diff_eq_eq dvd_refl cong_int_def dvd_eq_mod_eq_0 mod_0)
    93.9    moreover have "[y * a = (y*a) mod p] (mod p)"
   93.10      by (metis cong_int_def mod_mod_trivial)
   93.11    ultimately have "[a * (y + z) = 0] (mod p)"
   93.12 -    by (metis cong_int_def mod_add_left_eq mod_add_right_eq mult_commute ring_class.ring_distribs(1))
   93.13 +    by (metis cong_int_def mod_add_left_eq mod_add_right_eq mult.commute ring_class.ring_distribs(1))
   93.14    with p_prime a_nonzero p_a_relprime
   93.15    have a: "[y + z = 0] (mod p)"
   93.16      by (metis cong_prime_prod_zero_int)
   93.17 @@ -319,19 +319,19 @@
   93.18  subsection {* Gauss' Lemma *}
   93.19  
   93.20  lemma aux: "setprod id A * -1 ^ card E * a ^ card A * -1 ^ card E = setprod id A * a ^ card A"
   93.21 -by (metis (no_types) minus_minus mult_commute mult_left_commute power_minus power_one)
   93.22 +by (metis (no_types) minus_minus mult.commute mult.left_commute power_minus power_one)
   93.23  
   93.24  theorem pre_gauss_lemma:
   93.25    "[a ^ nat((int p - 1) div 2) = (-1) ^ (card E)] (mod p)"
   93.26  proof -
   93.27    have "[setprod id A = setprod id F * setprod id D](mod p)"
   93.28 -    by (auto simp add: prod_D_F_eq_prod_A mult_commute cong del:setprod.cong)
   93.29 +    by (auto simp add: prod_D_F_eq_prod_A mult.commute cong del:setprod.cong)
   93.30    then have "[setprod id A = ((-1)^(card E) * setprod id E) * setprod id D] (mod p)"
   93.31      apply (rule cong_trans_int)
   93.32      apply (metis cong_scalar_int prod_F_zcong)
   93.33      done
   93.34    then have "[setprod id A = ((-1)^(card E) * setprod id C)] (mod p)"
   93.35 -    by (metis C_prod_eq_D_times_E mult_commute mult_left_commute)
   93.36 +    by (metis C_prod_eq_D_times_E mult.commute mult.left_commute)
   93.37    then have "[setprod id A = ((-1)^(card E) * setprod id B)] (mod p)"
   93.38      by (rule cong_trans_int) (metis C_B_zcong_prod cong_scalar2_int)
   93.39    then have "[setprod id A = ((-1)^(card E) *
   93.40 @@ -349,7 +349,7 @@
   93.41    then have "[setprod id A = ((-1)^(card E) * a^(card A) *
   93.42        setprod id A)](mod p)"
   93.43      apply (rule cong_trans_int)
   93.44 -    apply (simp add: cong_scalar2_int cong_scalar_int finite_A setprod_constant mult_assoc)
   93.45 +    apply (simp add: cong_scalar2_int cong_scalar_int finite_A setprod_constant mult.assoc)
   93.46      done
   93.47    then have a: "[setprod id A * (-1)^(card E) =
   93.48        ((-1)^(card E) * a^(card A) * setprod id A * (-1)^(card E))](mod p)"
   93.49 @@ -357,7 +357,7 @@
   93.50    then have "[setprod id A * (-1)^(card E) = setprod id A *
   93.51        (-1)^(card E) * a^(card A) * (-1)^(card E)](mod p)"
   93.52      apply (rule cong_trans_int)
   93.53 -    apply (simp add: a mult_commute mult_left_commute)
   93.54 +    apply (simp add: a mult.commute mult.left_commute)
   93.55      done
   93.56    then have "[setprod id A * (-1)^(card E) = setprod id A * a^(card A)](mod p)"
   93.57      apply (rule cong_trans_int)
    94.1 --- a/src/HOL/Number_Theory/Pocklington.thy	Fri Jul 04 20:07:08 2014 +0200
    94.2 +++ b/src/HOL/Number_Theory/Pocklington.thy	Fri Jul 04 20:18:47 2014 +0200
    94.3 @@ -264,7 +264,7 @@
    94.4            mod_div_equality[of "(n - 1)" m, symmetric]
    94.5          by (simp add:power_add[symmetric] cong_nat_def th3 del: One_nat_def)
    94.6        have th1: "[a ^ ((n - 1) mod m) = 1] (mod n)"
    94.7 -        by (metis cong_mult_rcancel_nat nat_mult_commute th2 yn)
    94.8 +        by (metis cong_mult_rcancel_nat mult.commute th2 yn)
    94.9        from m(4)[rule_format, OF th0] nm1
   94.10          less_trans[OF mod_less_divisor[OF m(1), of "n - 1"] m(2)] th1
   94.11        have False by blast }
   94.12 @@ -385,7 +385,7 @@
   94.13      from H have onz: "?o \<noteq> 0" by (simp add: ord_eq_0)
   94.14      hence op: "?o > 0" by simp
   94.15      from mod_div_equality[of d "ord n a"] lh
   94.16 -    have "[a^(?o*?q + ?r) = 1] (mod n)" by (simp add: cong_nat_def mult_commute)
   94.17 +    have "[a^(?o*?q + ?r) = 1] (mod n)" by (simp add: cong_nat_def mult.commute)
   94.18      hence "[(a^?o)^?q * (a^?r) = 1] (mod n)"
   94.19        by (simp add: cong_nat_def power_mult[symmetric] power_add[symmetric])
   94.20      hence th: "[a^?r = 1] (mod n)"
   94.21 @@ -493,7 +493,7 @@
   94.22          from H[rule_format, of d] h d have "d = 1" by blast}
   94.23        moreover
   94.24        {assume h: "e\<^sup>2 \<le> n"
   94.25 -        from e have "e dvd n" unfolding dvd_def by (simp add: mult_commute)
   94.26 +        from e have "e dvd n" unfolding dvd_def by (simp add: mult.commute)
   94.27          with H[rule_format, of e] h have "e=1" by simp
   94.28          with e have "d = n" by simp}
   94.29        ultimately have "d=1 \<or> d=n"  by blast}
   94.30 @@ -552,7 +552,7 @@
   94.31    hence "a ^ (r * q) + p * 0 = 1 + p * (l*k)" by (simp add: mult_ac)
   94.32    hence odq: "ord p (a^r) dvd q"
   94.33      unfolding ord_divides[symmetric] power_mult[symmetric]
   94.34 -    by (metis an cong_dvd_modulus_nat mult_commute nqr pn) 
   94.35 +    by (metis an cong_dvd_modulus_nat mult.commute nqr pn) 
   94.36    from odq[unfolded dvd_def] obtain d where d: "q = ord p (a^r) * d" by blast
   94.37    {assume d1: "d \<noteq> 1"
   94.38      obtain P where P: "prime P" "P dvd d"
   94.39 @@ -564,9 +564,9 @@
   94.40        by (metis zero_not_prime_nat) 
   94.41      from P(2) obtain t where t: "d = P*t" unfolding dvd_def by blast
   94.42      from d s t P0  have s': "ord p (a^r) * t = s"
   94.43 -      by (metis mult_commute mult_cancel1 nat_mult_assoc) 
   94.44 +      by (metis mult.commute mult_cancel1 mult.assoc) 
   94.45      have "ord p (a^r) * t*r = r * ord p (a^r) * t"
   94.46 -      by (metis mult_assoc mult_commute)
   94.47 +      by (metis mult.assoc mult.commute)
   94.48      hence exps: "a^(ord p (a^r) * t*r) = ((a ^ r) ^ ord p (a^r)) ^ t"
   94.49        by (simp only: power_mult)
   94.50      then have th: "[((a ^ r) ^ ord p (a^r)) ^ t= 1] (mod p)"
   94.51 @@ -597,7 +597,7 @@
   94.52      by (metis p01(1)) 
   94.53    from p0 d have "p + q * 0 = 1 + q * d" by simp
   94.54    then show ?thesis
   94.55 -    by (metis cong_iff_lin_nat mult_commute)
   94.56 +    by (metis cong_iff_lin_nat mult.commute)
   94.57  qed
   94.58  
   94.59  theorem pocklington:
   94.60 @@ -767,7 +767,7 @@
   94.61        by auto
   94.62      from div_mult1_eq[of r q p] p(2)
   94.63      have eq1: "r* (q div p) = (n - 1) div p"
   94.64 -      unfolding qrn[symmetric] dvd_eq_mod_eq_0 by (simp add: mult_commute)
   94.65 +      unfolding qrn[symmetric] dvd_eq_mod_eq_0 by (simp add: mult.commute)
   94.66      have ath: "\<And>a (b::nat). a <= b \<Longrightarrow> a \<noteq> 0 ==> 1 <= a \<and> 1 <= b" by arith
   94.67      {assume "a ^ ((n - 1) div p) mod n = 0"
   94.68        then obtain s where s: "a ^ ((n - 1) div p) = n*s"
   94.69 @@ -779,7 +779,7 @@
   94.70        with eq0 have "a^ (n - 1) = (n*s)^p"
   94.71          by (simp add: power_mult[symmetric])
   94.72        hence "1 = (n*s)^(Suc (p - 1)) mod n" using bqn p01 by simp
   94.73 -      also have "\<dots> = 0" by (simp add: mult_assoc)
   94.74 +      also have "\<dots> = 0" by (simp add: mult.assoc)
   94.75        finally have False by simp }
   94.76        then have th11: "a ^ ((n - 1) div p) mod n \<noteq> 0" by auto
   94.77      have th1: "[a ^ ((n - 1) div p) mod n = a ^ ((n - 1) div p)] (mod n)"
    95.1 --- a/src/HOL/Number_Theory/Primes.thy	Fri Jul 04 20:07:08 2014 +0200
    95.2 +++ b/src/HOL/Number_Theory/Primes.thy	Fri Jul 04 20:18:47 2014 +0200
    95.3 @@ -106,7 +106,7 @@
    95.4  lemma not_prime_eq_prod_nat: "(n::nat) > 1 \<Longrightarrow> ~ prime n \<Longrightarrow>
    95.5      EX m k. n = m * k & 1 < m & m < n & 1 < k & k < n"
    95.6    unfolding prime_nat_def dvd_def apply auto
    95.7 -  by (metis mult_commute linorder_neq_iff linorder_not_le mult_1
    95.8 +  by (metis mult.commute linorder_neq_iff linorder_not_le mult_1
    95.9        n_less_n_mult_m one_le_mult_iff less_imp_le_nat)
   95.10  
   95.11  lemma prime_dvd_power_nat: "prime p \<Longrightarrow> p dvd x^n \<Longrightarrow> p dvd x"
   95.12 @@ -209,7 +209,7 @@
   95.13        from coprime_dvd_mult_nat[OF pnb pab] have ?thesis by blast }
   95.14      moreover
   95.15      { assume pb: "p dvd b"
   95.16 -      have pnba: "p^n dvd b*a" using pab by (simp add: mult_commute)
   95.17 +      have pnba: "p^n dvd b*a" using pab by (simp add: mult.commute)
   95.18        from coprime_common_divisor_nat [OF ab, of p] pb p have "\<not> p dvd a"
   95.19          by auto
   95.20        with p have "coprime a p"
   95.21 @@ -323,7 +323,7 @@
   95.22    moreover 
   95.23    {assume px: "p dvd y"
   95.24      then obtain d where d: "y = p*d" unfolding dvd_def by blast
   95.25 -    from Suc.prems d  have "p*d*x = p^Suc k" by (simp add: mult_commute)
   95.26 +    from Suc.prems d  have "p*d*x = p^Suc k" by (simp add: mult.commute)
   95.27      hence th: "d*x = p^k" using p0 by simp
   95.28      from Suc.hyps[OF th] obtain i j where ij: "d = p^i" "x = p^j" by blast
   95.29      with d have "y = p^Suc i" by simp 
   95.30 @@ -355,7 +355,7 @@
   95.31    shows "d dvd p^k \<longleftrightarrow> (\<exists> i. i \<le> k \<and> d = p ^i)"
   95.32  proof
   95.33    assume H: "d dvd p^k" then obtain e where e: "d*e = p^k" 
   95.34 -    unfolding dvd_def  apply (auto simp add: mult_commute) by blast
   95.35 +    unfolding dvd_def  apply (auto simp add: mult.commute) by blast
   95.36    from prime_power_mult[OF p e] obtain i j where ij: "d = p^i" "e=p^j" by blast
   95.37    from e ij have "p^(i + j) = p^k" by (simp add: power_add)
   95.38    hence "i + j = k" using p prime_gt_1_nat power_inject_exp[of p "i+j" k] by simp 
    96.1 --- a/src/HOL/Number_Theory/Residues.thy	Fri Jul 04 20:07:08 2014 +0200
    96.2 +++ b/src/HOL/Number_Theory/Residues.thy	Fri Jul 04 20:18:47 2014 +0200
    96.3 @@ -65,7 +65,7 @@
    96.4    apply (rule comm_monoid)
    96.5    apply (unfold R_def residue_ring_def, auto)
    96.6    apply (subst mod_add_eq [symmetric])
    96.7 -  apply (subst mult_commute)
    96.8 +  apply (subst mult.commute)
    96.9    apply (subst mod_mult_right_eq [symmetric])
   96.10    apply (simp add: field_simps)
   96.11    done
   96.12 @@ -105,7 +105,7 @@
   96.13    apply auto
   96.14    apply (metis invertible_coprime_int)
   96.15    apply (subst (asm) coprime_iff_invertible'_int)
   96.16 -  apply (auto simp add: cong_int_def mult_commute)
   96.17 +  apply (auto simp add: cong_int_def mult.commute)
   96.18    done
   96.19  
   96.20  lemma res_neg_eq: "\<ominus> x = (- x) mod m"
   96.21 @@ -120,7 +120,7 @@
   96.22    apply auto
   96.23    apply (subgoal_tac "y mod m = - x mod m")
   96.24    apply simp
   96.25 -  apply (metis minus_add_cancel mod_mult_self1 mult_commute)
   96.26 +  apply (metis minus_add_cancel mod_mult_self1 mult.commute)
   96.27    done
   96.28  
   96.29  lemma finite [iff]: "finite (carrier R)"
   96.30 @@ -159,7 +159,7 @@
   96.31    apply (insert m_gt_one)
   96.32    apply (induct n)
   96.33    apply (auto simp add: nat_pow_def one_cong)
   96.34 -  apply (metis mult_commute mult_cong)
   96.35 +  apply (metis mult.commute mult_cong)
   96.36    done
   96.37  
   96.38  lemma neg_cong: "\<ominus> (x mod m) = (- x) mod m"
   96.39 @@ -196,7 +196,7 @@
   96.40  
   96.41  lemma one_eq_neg_one: "\<one> = \<ominus> \<one> \<Longrightarrow> m = 2"
   96.42    apply (simp add: res_one_eq res_neg_eq)
   96.43 -  apply (metis add_commute add_diff_cancel mod_mod_trivial one_add_one uminus_add_conv_diff
   96.44 +  apply (metis add.commute add_diff_cancel mod_mod_trivial one_add_one uminus_add_conv_diff
   96.45              zero_neq_one zmod_zminus1_eq_if)
   96.46    done
   96.47  
    97.1 --- a/src/HOL/Old_Number_Theory/Euler.thy	Fri Jul 04 20:07:08 2014 +0200
    97.2 +++ b/src/HOL/Old_Number_Theory/Euler.thy	Fri Jul 04 20:18:47 2014 +0200
    97.3 @@ -148,7 +148,7 @@
    97.4                     b = "x * (a * MultInv p x)" and
    97.5                     c = "a * (x * MultInv p x)" in  zcong_trans, force)
    97.6    apply (frule_tac p = p and x = x in MultInv_prop2, auto)
    97.7 -apply (metis StandardRes_SRStar_prop3 mult_1_right mult_commute zcong_sym zcong_zmult_prop1)
    97.8 +apply (metis StandardRes_SRStar_prop3 mult_1_right mult.commute zcong_sym zcong_zmult_prop1)
    97.9    apply (auto simp add: mult_ac)
   97.10    done
   97.11  
    98.1 --- a/src/HOL/Old_Number_Theory/Factorization.thy	Fri Jul 04 20:07:08 2014 +0200
    98.2 +++ b/src/HOL/Old_Number_Theory/Factorization.thy	Fri Jul 04 20:18:47 2014 +0200
    98.3 @@ -68,7 +68,7 @@
    98.4  
    98.5  lemma prod_append: "prod (xs @ ys) = prod xs * prod ys"
    98.6    apply (induct xs)
    98.7 -   apply (simp_all add: mult_assoc)
    98.8 +   apply (simp_all add: mult.assoc)
    98.9    done
   98.10  
   98.11  lemma prod_xy_prod:
    99.1 --- a/src/HOL/Old_Number_Theory/Fib.thy	Fri Jul 04 20:07:08 2014 +0200
    99.2 +++ b/src/HOL/Old_Number_Theory/Fib.thy	Fri Jul 04 20:18:47 2014 +0200
    99.3 @@ -106,7 +106,7 @@
    99.4    apply (case_tac m)
    99.5     apply simp 
    99.6    apply (simp add: fib_add)
    99.7 -  apply (simp add: add_commute gcd_non_0 [OF fib_Suc_gr_0])
    99.8 +  apply (simp add: add.commute gcd_non_0 [OF fib_Suc_gr_0])
    99.9    apply (simp add: gcd_non_0 [OF fib_Suc_gr_0, symmetric])
   99.10    apply (simp add: gcd_fib_Suc_eq_1 gcd_mult_cancel)
   99.11    done
   100.1 --- a/src/HOL/Old_Number_Theory/Gauss.thy	Fri Jul 04 20:07:08 2014 +0200
   100.2 +++ b/src/HOL/Old_Number_Theory/Gauss.thy	Fri Jul 04 20:18:47 2014 +0200
   100.3 @@ -342,7 +342,7 @@
   100.4      apply (elim zcong_trans)
   100.5      by (simp only: zcong_refl)
   100.6    also have "y * a + ya * a = a * (y + ya)"
   100.7 -    by (simp add: distrib_left mult_commute)
   100.8 +    by (simp add: distrib_left mult.commute)
   100.9    finally have "[a * (y + ya) = 0] (mod p)" .
  100.10    with p_prime a_nonzero zcong_zprime_prod_zero [of p a "y + ya"]
  100.11      p_a_relprime
  100.12 @@ -428,7 +428,7 @@
  100.13    also have "setprod uminus E = (setprod id E) * (-1)^(card E)"
  100.14      using finite_E by (induct set: finite) auto
  100.15    then have "setprod uminus E = (-1) ^ (card E) * (setprod id E)"
  100.16 -    by (simp add: mult_commute)
  100.17 +    by (simp add: mult.commute)
  100.18    with two show ?thesis
  100.19      by simp
  100.20  qed
  100.21 @@ -443,7 +443,7 @@
  100.22    "[a ^ nat((p - 1) div 2) = (-1) ^ (card E)] (mod p)"
  100.23  proof -
  100.24    have "[setprod id A = setprod id F * setprod id D](mod p)"
  100.25 -    by (auto simp add: prod_D_F_eq_prod_A mult_commute cong del:setprod.cong)
  100.26 +    by (auto simp add: prod_D_F_eq_prod_A mult.commute cong del:setprod.cong)
  100.27    then have "[setprod id A = ((-1)^(card E) * setprod id E) *
  100.28        setprod id D] (mod p)"
  100.29      apply (rule zcong_trans)
  100.30 @@ -452,7 +452,7 @@
  100.31    then have "[setprod id A = ((-1)^(card E) * setprod id C)] (mod p)"
  100.32      apply (rule zcong_trans)
  100.33      apply (insert C_prod_eq_D_times_E, erule subst)
  100.34 -    apply (subst mult_assoc, auto)
  100.35 +    apply (subst mult.assoc, auto)
  100.36      done
  100.37    then have "[setprod id A = ((-1)^(card E) * setprod id B)] (mod p)"
  100.38      apply (rule zcong_trans)
  100.39 @@ -473,7 +473,7 @@
  100.40    then have "[setprod id A = ((-1)^(card E) * a^(card A) *
  100.41        setprod id A)](mod p)"
  100.42      apply (rule zcong_trans)
  100.43 -    apply (simp add: zcong_scalar2 zcong_scalar finite_A setprod_constant mult_assoc)
  100.44 +    apply (simp add: zcong_scalar2 zcong_scalar finite_A setprod_constant mult.assoc)
  100.45      done
  100.46    then have a: "[setprod id A * (-1)^(card E) =
  100.47        ((-1)^(card E) * a^(card A) * setprod id A * (-1)^(card E))](mod p)"
  100.48 @@ -481,7 +481,7 @@
  100.49    then have "[setprod id A * (-1)^(card E) = setprod id A *
  100.50        (-1)^(card E) * a^(card A) * (-1)^(card E)](mod p)"
  100.51      apply (rule zcong_trans)
  100.52 -    apply (simp add: a mult_commute mult_left_commute)
  100.53 +    apply (simp add: a mult.commute mult.left_commute)
  100.54      done
  100.55    then have "[setprod id A * (-1)^(card E) = setprod id A *
  100.56        a^(card A)](mod p)"
   101.1 --- a/src/HOL/Old_Number_Theory/Int2.thy	Fri Jul 04 20:07:08 2014 +0200
   101.2 +++ b/src/HOL/Old_Number_Theory/Int2.thy	Fri Jul 04 20:18:47 2014 +0200
   101.3 @@ -269,7 +269,7 @@
   101.4  
   101.5  lemma aux___3: "[j * k = a] (mod p) ==> [(MultInv p j) * j * k =
   101.6       (MultInv p j) * a] (mod p)"
   101.7 -  by (auto simp add: mult_assoc zcong_scalar2)
   101.8 +  by (auto simp add: mult.assoc zcong_scalar2)
   101.9  
  101.10  lemma aux___4: "[|2 < p; zprime p; ~([j = 0](mod p));
  101.11      [(MultInv p j) * j * k = (MultInv p j) * a] (mod p) |]
   102.1 --- a/src/HOL/Old_Number_Theory/IntPrimes.thy	Fri Jul 04 20:07:08 2014 +0200
   102.2 +++ b/src/HOL/Old_Number_Theory/IntPrimes.thy	Fri Jul 04 20:18:47 2014 +0200
   102.3 @@ -93,7 +93,7 @@
   102.4    apply (simp add: zgcd_greatest_iff)
   102.5    apply (rule_tac n = k in zrelprime_zdvd_zmult)
   102.6     prefer 2
   102.7 -   apply (simp add: mult_commute)
   102.8 +   apply (simp add: mult.commute)
   102.9    apply (metis zgcd_1 zgcd_commute zgcd_left_commute)
  102.10    done
  102.11  
  102.12 @@ -142,7 +142,7 @@
  102.13      "[a = b] (mod m) ==> [c = d] (mod m) ==> [a * c = b * d] (mod m)"
  102.14    apply (rule_tac b = "b * c" in zcong_trans)
  102.15     apply (unfold zcong_def)
  102.16 -  apply (metis right_diff_distrib dvd_mult mult_commute)
  102.17 +  apply (metis right_diff_distrib dvd_mult mult.commute)
  102.18    apply (metis right_diff_distrib dvd_mult)
  102.19    done
  102.20  
  102.21 @@ -165,7 +165,7 @@
  102.22      apply (rule_tac [3] s = "a * a - 1 + p * (1 - a)" in subst)
  102.23       prefer 4
  102.24       apply (simp add: zdvd_reduce)
  102.25 -    apply (simp_all add: left_diff_distrib mult_commute right_diff_distrib)
  102.26 +    apply (simp_all add: left_diff_distrib mult.commute right_diff_distrib)
  102.27    done
  102.28  
  102.29  lemma zcong_cancel:
  102.30 @@ -188,7 +188,7 @@
  102.31  lemma zcong_cancel2:
  102.32    "0 \<le> m ==>
  102.33      zgcd k m = 1 ==> [k * a = k * b] (mod m) = [a = b] (mod m)"
  102.34 -  by (simp add: mult_commute zcong_cancel)
  102.35 +  by (simp add: mult.commute zcong_cancel)
  102.36  
  102.37  lemma zcong_zgcd_zmult_zmod:
  102.38    "[a = b] (mod m) ==> [a = b] (mod n) ==> zgcd m n = 1
  102.39 @@ -197,9 +197,9 @@
  102.40    apply (subgoal_tac "m dvd n * ka")
  102.41     apply (subgoal_tac "m dvd ka")
  102.42      apply (case_tac [2] "0 \<le> ka")
  102.43 -  apply (metis dvd_mult_div_cancel dvd_refl dvd_mult_left mult_commute zrelprime_zdvd_zmult)
  102.44 -  apply (metis abs_dvd_iff abs_of_nonneg add_0 zgcd_0_left zgcd_commute zgcd_zadd_zmult zgcd_zdvd_zgcd_zmult zgcd_zmult_distrib2_abs mult_1_right mult_commute)
  102.45 -  apply (metis mult_le_0_iff  zdvd_mono zdvd_mult_cancel dvd_triv_left zero_le_mult_iff order_antisym linorder_linear order_refl mult_commute zrelprime_zdvd_zmult)
  102.46 +  apply (metis dvd_mult_div_cancel dvd_refl dvd_mult_left mult.commute zrelprime_zdvd_zmult)
  102.47 +  apply (metis abs_dvd_iff abs_of_nonneg add_0 zgcd_0_left zgcd_commute zgcd_zadd_zmult zgcd_zdvd_zgcd_zmult zgcd_zmult_distrib2_abs mult_1_right mult.commute)
  102.48 +  apply (metis mult_le_0_iff  zdvd_mono zdvd_mult_cancel dvd_triv_left zero_le_mult_iff order_antisym linorder_linear order_refl mult.commute zrelprime_zdvd_zmult)
  102.49    apply (metis dvd_triv_left)
  102.50    done
  102.51  
  102.52 @@ -208,7 +208,7 @@
  102.53      a < m ==> 0 \<le> b ==> b < m ==> [a = b] (mod m) ==> a = b"
  102.54    apply (unfold zcong_def dvd_def, auto)
  102.55    apply (drule_tac f = "\<lambda>z. z mod m" in arg_cong)
  102.56 -  apply (metis diff_add_cancel mod_pos_pos_trivial add_0 add_commute zmod_eq_0_iff mod_add_right_eq)
  102.57 +  apply (metis diff_add_cancel mod_pos_pos_trivial add_0 add.commute zmod_eq_0_iff mod_add_right_eq)
  102.58    done
  102.59  
  102.60  lemma zcong_square_zless:
  102.61 @@ -261,7 +261,7 @@
  102.62    apply (rule_tac m = m in zcong_zmod_aux)
  102.63    apply (rule trans)
  102.64     apply (rule_tac [2] k = m and m = "a div m - b div m" in zdvd_reduce)
  102.65 -  apply (simp add: add_commute)
  102.66 +  apply (simp add: add.commute)
  102.67    done
  102.68  
  102.69  lemma zcong_zmod_eq: "0 < m ==> [a = b] (mod m) = (a mod m = b mod m)"
  102.70 @@ -341,14 +341,14 @@
  102.71  lemma xzgcda_linear_aux1:
  102.72    "(a - r * b) * m + (c - r * d) * (n::int) =
  102.73     (a * m + c * n) - r * (b * m + d * n)"
  102.74 -  by (simp add: left_diff_distrib distrib_left mult_assoc)
  102.75 +  by (simp add: left_diff_distrib distrib_left mult.assoc)
  102.76  
  102.77  lemma xzgcda_linear_aux2:
  102.78    "r' = s' * m + t' * n ==> r = s * m + t * n
  102.79      ==> (r' mod r) = (s' - (r' div r) * s) * m + (t' - (r' div r) * t) * (n::int)"
  102.80    apply (rule trans)
  102.81     apply (rule_tac [2] xzgcda_linear_aux1 [symmetric])
  102.82 -  apply (simp add: eq_diff_eq mult_commute)
  102.83 +  apply (simp add: eq_diff_eq mult.commute)
  102.84    done
  102.85  
  102.86  lemma order_le_neq_implies_less: "(x::'a::order) \<le> y ==> x \<noteq> y ==> x < y"
  102.87 @@ -391,7 +391,7 @@
  102.88     prefer 2
  102.89     apply simp
  102.90    apply (unfold zcong_def)
  102.91 -  apply (simp (no_asm) add: mult_commute)
  102.92 +  apply (simp (no_asm) add: mult.commute)
  102.93    done
  102.94  
  102.95  lemma zcong_lineq_unique:
  102.96 @@ -407,7 +407,7 @@
  102.97    apply (cut_tac a = a and n = n in zcong_lineq_ex, auto)
  102.98    apply (rule_tac x = "x * b mod n" in exI, safe)
  102.99      apply (simp_all (no_asm_simp))
 102.100 -  apply (metis zcong_scalar zcong_zmod mod_mult_right_eq mult_1 mult_assoc)
 102.101 +  apply (metis zcong_scalar zcong_zmod mod_mult_right_eq mult_1 mult.assoc)
 102.102    done
 102.103  
 102.104  end
   103.1 --- a/src/HOL/Old_Number_Theory/Legacy_GCD.thy	Fri Jul 04 20:07:08 2014 +0200
   103.2 +++ b/src/HOL/Old_Number_Theory/Legacy_GCD.thy	Fri Jul 04 20:18:47 2014 +0200
   103.3 @@ -161,7 +161,7 @@
   103.4      apply (rule_tac n = k in relprime_dvd_mult)
   103.5       apply (simp add: gcd_assoc)
   103.6       apply (simp add: gcd_commute)
   103.7 -    apply (simp_all add: mult_commute)
   103.8 +    apply (simp_all add: mult.commute)
   103.9    done
  103.10  
  103.11  
  103.12 @@ -173,19 +173,19 @@
  103.13  lemma gcd_add2 [simp, algebra]: "gcd m (m + n) = gcd m n"
  103.14  proof -
  103.15    have "gcd m (m + n) = gcd (m + n) m" by (rule gcd_commute)
  103.16 -  also have "... = gcd (n + m) m" by (simp add: add_commute)
  103.17 +  also have "... = gcd (n + m) m" by (simp add: add.commute)
  103.18    also have "... = gcd n m" by simp
  103.19    also have  "... = gcd m n" by (rule gcd_commute)
  103.20    finally show ?thesis .
  103.21  qed
  103.22  
  103.23  lemma gcd_add2' [simp, algebra]: "gcd m (n + m) = gcd m n"
  103.24 -  apply (subst add_commute)
  103.25 +  apply (subst add.commute)
  103.26    apply (rule gcd_add2)
  103.27    done
  103.28  
  103.29  lemma gcd_add_mult[algebra]: "gcd m (k * m + n) = gcd m n"
  103.30 -  by (induct k) (simp_all add: add_assoc)
  103.31 +  by (induct k) (simp_all add: add.assoc)
  103.32  
  103.33  lemma gcd_dvd_prod: "gcd m n dvd m * n" 
  103.34    using mult_dvd_mono [of 1] by auto
  103.35 @@ -351,7 +351,7 @@
  103.36            hence "a * ((b - 1) * y) = d + (x*b*(b - 1) - d*b)" 
  103.37              by (simp only: diff_add_assoc[OF dble, of d, symmetric])
  103.38            hence "a * ((b - 1) * y) = b*(x*(b - 1) - d) + d"
  103.39 -            by (simp only: diff_mult_distrib2 add_commute mult_ac)
  103.40 +            by (simp only: diff_mult_distrib2 add.commute mult_ac)
  103.41            hence ?thesis using H(1,2)
  103.42              apply -
  103.43              apply (rule exI[where x=d], simp)
  103.44 @@ -374,7 +374,7 @@
  103.45    hence "a * x * k - b * y*k = d*k \<or> b * x * k - a * y*k = d*k" 
  103.46      by (algebra add: diff_mult_distrib)
  103.47    hence "a * (x * k) - b * (y*k) = ?g \<or> b * (x * k) - a * (y*k) = ?g" 
  103.48 -    by (simp add: k mult_assoc)
  103.49 +    by (simp add: k mult.assoc)
  103.50    thus ?thesis by blast
  103.51  qed
  103.52  
  103.53 @@ -392,7 +392,7 @@
  103.54  qed
  103.55  
  103.56  lemma gcd_mult_distrib: "gcd(a * c) (b * c) = c * gcd a b"
  103.57 -by(simp add: gcd_mult_distrib2 mult_commute)
  103.58 +by(simp add: gcd_mult_distrib2 mult.commute)
  103.59  
  103.60  lemma gcd_bezout: "(\<exists>x y. a * x - b * y = d \<or> b * x - a * y = d) \<longleftrightarrow> gcd a b dvd d"
  103.61    (is "?lhs \<longleftrightarrow> ?rhs")
  103.62 @@ -405,7 +405,7 @@
  103.63      hence "a * x*k - b * y*k = ?g*k \<or> b * x * k - a * y*k = ?g*k" 
  103.64        by (simp only: diff_mult_distrib)
  103.65      hence "a * (x*k) - b * (y*k) = d \<or> b * (x * k) - a * (y*k) = d"
  103.66 -      by (simp add: k[symmetric] mult_assoc)
  103.67 +      by (simp add: k[symmetric] mult.assoc)
  103.68      hence ?lhs by blast}
  103.69    moreover
  103.70    {fix x y assume H: "a * x - b * y = d \<or> b * x - a * y = d"
  103.71 @@ -426,7 +426,7 @@
  103.72  qed
  103.73  
  103.74  lemma gcd_mult': "gcd b (a * b) = b"
  103.75 -by (simp add: mult_commute[of a b]) 
  103.76 +by (simp add: mult.commute[of a b]) 
  103.77  
  103.78  lemma gcd_add: "gcd(a + b) b = gcd a b" 
  103.79    "gcd(b + a) b = gcd a b" "gcd a (a + b) = gcd a b" "gcd a (b + a) = gcd a b"
   104.1 --- a/src/HOL/Old_Number_Theory/Pocklington.thy	Fri Jul 04 20:07:08 2014 +0200
   104.2 +++ b/src/HOL/Old_Number_Theory/Pocklington.thy	Fri Jul 04 20:18:47 2014 +0200
   104.3 @@ -120,7 +120,7 @@
   104.4  
   104.5  lemma cong_mult_rcancel: assumes an: "coprime a n" and axy:"[x*a = y*a] (mod n)"
   104.6    shows "[x = y] (mod n)"
   104.7 -  using cong_mult_lcancel[OF an axy[unfolded mult_commute[of _a]]] .
   104.8 +  using cong_mult_lcancel[OF an axy[unfolded mult.commute[of _a]]] .
   104.9  
  104.10  lemma cong_refl: "[x = x] (mod n)" by (simp add: modeq_def)
  104.11  
  104.12 @@ -177,13 +177,13 @@
  104.13  proof
  104.14    assume H: "?rhs" from cong_mult[OF cong_refl[of a n] H] show ?lhs .
  104.15  next
  104.16 -  assume H: "?lhs" hence H': "[x*a = y*a] (mod n)" by (simp add: mult_commute)
  104.17 +  assume H: "?lhs" hence H': "[x*a = y*a] (mod n)" by (simp add: mult.commute)
  104.18    from cong_mult_rcancel[OF an H'] show ?rhs  .
  104.19  qed
  104.20  
  104.21  lemma cong_mult_rcancel_eq: assumes an: "coprime a n"
  104.22    shows "[x * a = y * a] (mod n) \<longleftrightarrow> [x = y] (mod n)"
  104.23 -using cong_mult_lcancel_eq[OF an, of x y] by (simp add: mult_commute)
  104.24 +using cong_mult_lcancel_eq[OF an, of x y] by (simp add: mult.commute)
  104.25  
  104.26  lemma cong_add_lcancel_eq: "[a + x = a + y] (mod n) \<longleftrightarrow> [x = y] (mod n)"
  104.27    by (simp add: nat_mod)
  104.28 @@ -358,7 +358,7 @@
  104.29    also have "\<dots> = m mod a" by (simp add: mod_mult2_eq)
  104.30    finally have th1: "[?w = m] (mod a)" by (simp add: modeq_def)
  104.31    from xq12(2) have "?w mod b = ((n + q2 * b) mod (a*b)) mod b" by simp
  104.32 -  also have "\<dots> = ((n + q2 * b) mod (b*a)) mod b" by (simp add: mult_commute)
  104.33 +  also have "\<dots> = ((n + q2 * b) mod (b*a)) mod b" by (simp add: mult.commute)
  104.34    also have "\<dots> = n mod b" by (simp add: mod_mult2_eq)
  104.35    finally have th2: "[?w = n] (mod b)" by (simp add: modeq_def)
  104.36    {fix y assume H: "y < a*b" "[y = m] (mod a)" "[y = n] (mod b)"
  104.37 @@ -638,7 +638,7 @@
  104.38        also have "[(\<Prod>i\<in>?S. ?h i) = ?P] (mod n)"
  104.39          using eq0 fS an by (simp add: setprod_def modeq_def)
  104.40        finally show "[?P*a^ (\<phi> n) = ?P*1] (mod n)"
  104.41 -        unfolding cardfS mult_commute[of ?P "a^ (card ?S)"]
  104.42 +        unfolding cardfS mult.commute[of ?P "a^ (card ?S)"]
  104.43            nproduct_cmul[OF fS, symmetric] mult_1_right by simp
  104.44      qed
  104.45      from cong_mult_lcancel[OF nP Paphi] have ?thesis . }
  104.46 @@ -856,7 +856,7 @@
  104.47      from H have onz: "?o \<noteq> 0" by (simp add: ord_eq_0)
  104.48      hence op: "?o > 0" by simp
  104.49      from mod_div_equality[of d "ord n a"] lh
  104.50 -    have "[a^(?o*?q + ?r) = 1] (mod n)" by (simp add: modeq_def mult_commute)
  104.51 +    have "[a^(?o*?q + ?r) = 1] (mod n)" by (simp add: modeq_def mult.commute)
  104.52      hence "[(a^?o)^?q * (a^?r) = 1] (mod n)"
  104.53        by (simp add: modeq_def power_mult[symmetric] power_add[symmetric])
  104.54      hence th: "[a^?r = 1] (mod n)"
  104.55 @@ -964,7 +964,7 @@
  104.56          from H[rule_format, of d] h d have "d = 1" by blast}
  104.57        moreover
  104.58        {assume h: "e\<^sup>2 \<le> n"
  104.59 -        from e have "e dvd n" unfolding dvd_def by (simp add: mult_commute)
  104.60 +        from e have "e dvd n" unfolding dvd_def by (simp add: mult.commute)
  104.61          with H[rule_format, of e] h have "e=1" by simp
  104.62          with e have "d = n" by simp}
  104.63        ultimately have "d=1 \<or> d=n"  by blast}
  104.64 @@ -1231,7 +1231,7 @@
  104.65      from prime_ge_2[OF p(1)] have p01: "p \<noteq> 0" "p \<noteq> 1" "p =Suc(p - 1)" by arith+
  104.66      from div_mult1_eq[of r q p] p(2)
  104.67      have eq1: "r* (q div p) = (n - 1) div p"
  104.68 -      unfolding qrn[symmetric] dvd_eq_mod_eq_0 by (simp add: mult_commute)
  104.69 +      unfolding qrn[symmetric] dvd_eq_mod_eq_0 by (simp add: mult.commute)
  104.70      have ath: "\<And>a (b::nat). a <= b \<Longrightarrow> a \<noteq> 0 ==> 1 <= a \<and> 1 <= b" by arith
  104.71      from n0 have n00: "n \<noteq> 0" by arith
  104.72      from mod_le[OF n00]
  104.73 @@ -1246,7 +1246,7 @@
  104.74        with eq0 have "a^ (n - 1) = (n*s)^p"
  104.75          by (simp add: power_mult[symmetric])
  104.76        hence "1 = (n*s)^(Suc (p - 1)) mod n" using bqn p01 by simp
  104.77 -      also have "\<dots> = 0" by (simp add: mult_assoc)
  104.78 +      also have "\<dots> = 0" by (simp add: mult.assoc)
  104.79        finally have False by simp }
  104.80        then have th11: "a ^ ((n - 1) div p) mod n \<noteq> 0" by auto
  104.81      have th1: "[a ^ ((n - 1) div p) mod n = a ^ ((n - 1) div p)] (mod n)"
   105.1 --- a/src/HOL/Old_Number_Theory/Primes.thy	Fri Jul 04 20:07:08 2014 +0200
   105.2 +++ b/src/HOL/Old_Number_Theory/Primes.thy	Fri Jul 04 20:18:47 2014 +0200
   105.3 @@ -108,7 +108,7 @@
   105.4  
   105.5  declare nat_mult_dvd_cancel_disj[presburger]
   105.6  lemma nat_mult_dvd_cancel_disj'[presburger]: 
   105.7 -  "(m\<Colon>nat)*k dvd n*k \<longleftrightarrow> k = 0 \<or> m dvd n" unfolding mult_commute[of m k] mult_commute[of n k] by presburger 
   105.8 +  "(m\<Colon>nat)*k dvd n*k \<longleftrightarrow> k = 0 \<or> m dvd n" unfolding mult.commute[of m k] mult.commute[of n k] by presburger 
   105.9  
  105.10  lemma divides_mul_l: "(a::nat) dvd b ==> (c * a) dvd (c * b)"
  105.11    by presburger
  105.12 @@ -120,7 +120,7 @@
  105.13  lemma divides_div_not: "(x::nat) = (q * n) + r \<Longrightarrow> 0 < r \<Longrightarrow> r < n ==> ~(n dvd x)"
  105.14  proof(auto simp add: dvd_def)
  105.15    fix k assume H: "0 < r" "r < n" "q * n + r = n * k"
  105.16 -  from H(3) have r: "r = n* (k -q)" by(simp add: diff_mult_distrib2 mult_commute)
  105.17 +  from H(3) have r: "r = n* (k -q)" by(simp add: diff_mult_distrib2 mult.commute)
  105.18    {assume "k - q = 0" with r H(1) have False by simp}
  105.19    moreover
  105.20    {assume "k - q \<noteq> 0" with r have "r \<ge> n" by auto
  105.21 @@ -186,7 +186,7 @@
  105.22  using coprime_def gcd_bezout by auto
  105.23  
  105.24  lemma coprime_divprod: "d dvd a * b  \<Longrightarrow> coprime d a \<Longrightarrow> d dvd b"
  105.25 -  using relprime_dvd_mult_iff[of d a b] by (auto simp add: coprime_def mult_commute)
  105.26 +  using relprime_dvd_mult_iff[of d a b] by (auto simp add: coprime_def mult.commute)
  105.27  
  105.28  lemma coprime_1[simp]: "coprime a 1" by (simp add: coprime_def)
  105.29  lemma coprime_1'[simp]: "coprime 1 a" by (simp add: coprime_def)
  105.30 @@ -205,7 +205,7 @@
  105.31      from bezout_gcd_strong[OF az, of b] 
  105.32      obtain x y where xy: "a*x = b*y + ?g" by blast
  105.33      from xy a b have "?g * a'*x = ?g * (b'*y + 1)" by (simp add: algebra_simps)
  105.34 -    hence "?g * (a'*x) = ?g * (b'*y + 1)" by (simp add: mult_assoc)
  105.35 +    hence "?g * (a'*x) = ?g * (b'*y + 1)" by (simp add: mult.assoc)
  105.36      hence "a'*x = (b'*y + 1)"
  105.37        by (simp only: nat_mult_eq_cancel1[OF z']) 
  105.38      hence "a'*x - b'*y = 1" by simp
  105.39 @@ -296,7 +296,7 @@
  105.40        using z by auto 
  105.41      then have "a^n * x - b^n * y = ?g^n \<or> b^n * x - a^n * y = ?g^n"
  105.42        using z ab'' by (simp only: power_mult_distrib[symmetric] 
  105.43 -        diff_mult_distrib2 mult_assoc[symmetric])
  105.44 +        diff_mult_distrib2 mult.assoc[symmetric])
  105.45      hence  ?thesis by blast }
  105.46    ultimately show ?thesis by blast
  105.47  qed
  105.48 @@ -334,7 +334,7 @@
  105.49      from ab'(1) have "a' dvd a"  unfolding dvd_def by blast  
  105.50      with dc have th0: "a' dvd b*c" using dvd_trans[of a' a "b*c"] by simp
  105.51      from dc ab'(1,2) have "a'*?g dvd (b'*?g) *c" by auto
  105.52 -    hence "?g*a' dvd ?g * (b' * c)" by (simp add: mult_assoc)
  105.53 +    hence "?g*a' dvd ?g * (b' * c)" by (simp add: mult.assoc)
  105.54      with z have th_1: "a' dvd b'*c" by simp
  105.55      from coprime_divprod[OF th_1 ab'(3)] have thc: "a' dvd c" . 
  105.56      from ab' have "a = ?g*a'" by algebra
  105.57 @@ -355,11 +355,11 @@
  105.58      from gcd_coprime_exists[OF z] 
  105.59      obtain a' b' where ab': "a = a' * ?g" "b = b' * ?g" "coprime a' b'" by blast
  105.60      from ab have "(a' * ?g) ^ n dvd (b' * ?g)^n" by (simp add: ab'(1,2)[symmetric])
  105.61 -    hence "?g^n*a'^n dvd ?g^n *b'^n" by (simp only: power_mult_distrib mult_commute)
  105.62 +    hence "?g^n*a'^n dvd ?g^n *b'^n" by (simp only: power_mult_distrib mult.commute)
  105.63      with zn z n have th0:"a'^n dvd b'^n" by (auto simp add: nat_power_eq_0_iff)
  105.64      have "a' dvd a'^n" by (simp add: m)
  105.65      with th0 have "a' dvd b'^n" using dvd_trans[of a' "a'^n" "b'^n"] by simp
  105.66 -    hence th1: "a' dvd b'^m * b'" by (simp add: m mult_commute)
  105.67 +    hence th1: "a' dvd b'^m * b'" by (simp add: m mult.commute)
  105.68      from coprime_divprod[OF th1 coprime_exp[OF ab'(3), of m]]
  105.69      have "a' dvd b'" .
  105.70      hence "a'*?g dvd b'*?g" by simp
  105.71 @@ -372,7 +372,7 @@
  105.72  proof-
  105.73    from mr nr obtain m' n' where m': "r = m*m'" and n': "r = n*n'"
  105.74      unfolding dvd_def by blast
  105.75 -  from mr n' have "m dvd n'*n" by (simp add: mult_commute)
  105.76 +  from mr n' have "m dvd n'*n" by (simp add: mult.commute)
  105.77    hence "m dvd n'" using relprime_dvd_mult_iff[OF mn[unfolded coprime_def]] by simp
  105.78    then obtain k where k: "n' = m*k" unfolding dvd_def by blast
  105.79    from n' k show ?thesis unfolding dvd_def by auto
  105.80 @@ -609,7 +609,7 @@
  105.81      have "p dvd a \<or> p dvd b" .
  105.82      moreover
  105.83      {assume pa: "p dvd a"
  105.84 -      have pnba: "p^n dvd b*a" using pab by (simp add: mult_commute)
  105.85 +      have pnba: "p^n dvd b*a" using pab by (simp add: mult.commute)
  105.86        from coprime_prime[OF ab, of p] p pa have "\<not> p dvd b" by blast
  105.87        with prime_coprime[OF p, of b] b 
  105.88        have cpb: "coprime b p" using coprime_commute by blast 
  105.89 @@ -618,7 +618,7 @@
  105.90        from coprime_divprod[OF pnba pnb] have ?thesis by blast }
  105.91      moreover
  105.92      {assume pb: "p dvd b"
  105.93 -      have pnba: "p^n dvd b*a" using pab by (simp add: mult_commute)
  105.94 +      have pnba: "p^n dvd b*a" using pab by (simp add: mult.commute)
  105.95        from coprime_prime[OF ab, of p] p pb have "\<not> p dvd a" by blast
  105.96        with prime_coprime[OF p, of a] a
  105.97        have cpb: "coprime a p" using coprime_commute by blast 
  105.98 @@ -632,7 +632,7 @@
  105.99  lemma nat_mult_eq_one: "(n::nat) * m = 1 \<longleftrightarrow> n = 1 \<and> m = 1" (is "?lhs \<longleftrightarrow> ?rhs")
 105.100  proof
 105.101    assume H: "?lhs"
 105.102 -  hence "n dvd 1" "m dvd 1" unfolding dvd_def by (auto simp add: mult_commute)
 105.103 +  hence "n dvd 1" "m dvd 1" unfolding dvd_def by (auto simp add: mult.commute)
 105.104    thus ?rhs by auto
 105.105  next
 105.106    assume ?rhs then show ?lhs by auto
 105.107 @@ -705,7 +705,7 @@
 105.108        from coprime_lmul2 [OF H(2)[unfolded k coprime_commute[of "p^n*k" a]]]
 105.109        have kb: "coprime k a" by (simp add: coprime_commute) 
 105.110        from H(3) l k pn0 n have kbln: "k * a = l ^ n" 
 105.111 -        by (simp add: power_mult_distrib mult_commute)
 105.112 +        by (simp add: power_mult_distrib mult.commute)
 105.113        from H(1)[rule_format, OF lc kb kbln]
 105.114        obtain r s where rs: "k = r ^n" "a = s^n" by blast
 105.115        from k rs(1) have "b = (p*r)^n" by (simp add: power_mult_distrib)
 105.116 @@ -772,7 +772,7 @@
 105.117    moreover 
 105.118    {assume px: "p dvd y"
 105.119      then obtain d where d: "y = p*d" unfolding dvd_def by blast
 105.120 -    from Suc.prems d  have "p*d*x = p^Suc k" by (simp add: mult_commute)
 105.121 +    from Suc.prems d  have "p*d*x = p^Suc k" by (simp add: mult.commute)
 105.122      hence th: "d*x = p^k" using p0 by simp
 105.123      from Suc.hyps[OF th] obtain i j where ij: "d = p^i" "x = p^j" by blast
 105.124      with d have "y = p^Suc i" by simp 
 105.125 @@ -800,7 +800,7 @@
 105.126    shows "d dvd p^k \<longleftrightarrow> (\<exists> i. i \<le> k \<and> d = p ^i)"
 105.127  proof
 105.128    assume H: "d dvd p^k" then obtain e where e: "d*e = p^k" 
 105.129 -    unfolding dvd_def  apply (auto simp add: mult_commute) by blast
 105.130 +    unfolding dvd_def  apply (auto simp add: mult.commute) by blast
 105.131    from prime_power_mult[OF p e] obtain i j where ij: "d = p^i" "e=p^j" by blast
 105.132    from prime_ge_2[OF p] have p1: "p > 1" by arith
 105.133    from e ij have "p^(i + j) = p^k" by (simp add: power_add)
   106.1 --- a/src/HOL/Old_Number_Theory/Quadratic_Reciprocity.thy	Fri Jul 04 20:07:08 2014 +0200
   106.2 +++ b/src/HOL/Old_Number_Theory/Quadratic_Reciprocity.thy	Fri Jul 04 20:18:47 2014 +0200
   106.3 @@ -22,7 +22,7 @@
   106.4    from finite_A have "a * setsum id A = setsum (%x. a * x) A"
   106.5      by (auto simp add: setsum_const_mult id_def)
   106.6    also have "setsum (%x. a * x) = setsum (%x. x * a)"
   106.7 -    by (auto simp add: mult_commute)
   106.8 +    by (auto simp add: mult.commute)
   106.9    also have "setsum (%x. x * a) A = setsum id B"
  106.10      by (simp add: B_def setsum.reindex [OF inj_on_xa_A])
  106.11    also have "... = setsum (%x. p * (x div p) + StandardRes p x) B"
   107.1 --- a/src/HOL/Old_Number_Theory/WilsonBij.thy	Fri Jul 04 20:07:08 2014 +0200
   107.2 +++ b/src/HOL/Old_Number_Theory/WilsonBij.thy	Fri Jul 04 20:18:47 2014 +0200
   107.3 @@ -207,7 +207,7 @@
   107.4  
   107.5  lemma reciP_sym: "zprime p ==> symP (reciR p)"
   107.6    apply (unfold reciR_def symP_def)
   107.7 -  apply (simp add: mult_commute)
   107.8 +  apply (simp add: mult.commute)
   107.9    apply auto
  107.10    done
  107.11  
  107.12 @@ -234,7 +234,7 @@
  107.13      apply (subst setprod.insert)
  107.14        apply (auto simp add: fin_bijER)
  107.15    apply (subgoal_tac "zcong ((a * b) * \<Prod>A) (1 * 1) p")
  107.16 -   apply (simp add: mult_assoc)
  107.17 +   apply (simp add: mult.assoc)
  107.18    apply (rule zcong_zmult)
  107.19     apply auto
  107.20    done
   108.1 --- a/src/HOL/Old_Number_Theory/WilsonRuss.thy	Fri Jul 04 20:07:08 2014 +0200
   108.2 +++ b/src/HOL/Old_Number_Theory/WilsonRuss.thy	Fri Jul 04 20:18:47 2014 +0200
   108.3 @@ -256,7 +256,7 @@
   108.4        apply (subgoal_tac [5]
   108.5          "zcong (a * inv p a * (\<Prod>x\<in>wset (a - 1) p. x)) (1 * 1) p")
   108.6         prefer 5
   108.7 -       apply (simp add: mult_assoc)
   108.8 +       apply (simp add: mult.assoc)
   108.9        apply (rule_tac [5] zcong_zmult)
  108.10         apply (rule_tac [5] inv_is_inv)
  108.11           apply (tactic "clarify_tac @{context} 4")
   109.1 --- a/src/HOL/Power.thy	Fri Jul 04 20:07:08 2014 +0200
   109.2 +++ b/src/HOL/Power.thy	Fri Jul 04 20:18:47 2014 +0200
   109.3 @@ -53,7 +53,7 @@
   109.4  
   109.5  lemma power_commutes:
   109.6    "a ^ n * a = a * a ^ n"
   109.7 -  by (induct n) (simp_all add: mult_assoc)
   109.8 +  by (induct n) (simp_all add: mult.assoc)
   109.9  
  109.10  lemma power_Suc2:
  109.11    "a ^ Suc n = a ^ n * a"
  109.12 @@ -71,11 +71,11 @@
  109.13    by (simp add: numeral_2_eq_2)
  109.14  
  109.15  lemma power3_eq_cube: "a ^ 3 = a * a * a"
  109.16 -  by (simp add: numeral_3_eq_3 mult_assoc)
  109.17 +  by (simp add: numeral_3_eq_3 mult.assoc)
  109.18  
  109.19  lemma power_even_eq:
  109.20    "a ^ (2 * n) = (a ^ n)\<^sup>2"
  109.21 -  by (subst mult_commute) (simp add: power_mult)
  109.22 +  by (subst mult.commute) (simp add: power_mult)
  109.23  
  109.24  lemma power_odd_eq:
  109.25    "a ^ Suc (2*n) = a * (a ^ n)\<^sup>2"
  109.26 @@ -88,7 +88,7 @@
  109.27  lemma power_numeral_odd:
  109.28    "z ^ numeral (Num.Bit1 w) = (let w = z ^ (numeral w) in z * w * w)"
  109.29    unfolding numeral_Bit1 One_nat_def add_Suc_right add_0_right
  109.30 -  unfolding power_Suc power_add Let_def mult_assoc ..
  109.31 +  unfolding power_Suc power_add Let_def mult.assoc ..
  109.32  
  109.33  lemma funpow_times_power:
  109.34    "(times x ^^ f x) = times (x ^ f x)"
  109.35 @@ -100,7 +100,7 @@
  109.36    with Suc have "n = g x" by simp
  109.37    with Suc have "times x ^^ g x = times (x ^ g x)" by simp
  109.38    moreover from Suc g_def have "f x = g x + 1" by simp
  109.39 -  ultimately show ?case by (simp add: power_add funpow_add fun_eq_iff mult_assoc)
  109.40 +  ultimately show ?case by (simp add: power_add funpow_add fun_eq_iff mult.assoc)
  109.41  qed
  109.42  
  109.43  end
  109.44 @@ -197,7 +197,7 @@
  109.45    case 0 show ?case by simp
  109.46  next
  109.47    case (Suc n) then show ?case
  109.48 -    by (simp del: power_Suc add: power_Suc2 mult_assoc)
  109.49 +    by (simp del: power_Suc add: power_Suc2 mult.assoc)
  109.50  qed
  109.51  
  109.52  lemma power_minus_Bit0:
  109.53 @@ -626,7 +626,7 @@
  109.54  lemma power2_diff:
  109.55    fixes x y :: "'a::comm_ring_1"
  109.56    shows "(x - y)\<^sup>2 = x\<^sup>2 + y\<^sup>2 - 2 * x * y"
  109.57 -  by (simp add: ring_distribs power2_eq_square mult_2) (rule mult_commute)
  109.58 +  by (simp add: ring_distribs power2_eq_square mult_2) (rule mult.commute)
  109.59  
  109.60  lemma power_0_Suc [simp]:
  109.61    "(0::'a::{power, semiring_0}) ^ Suc n = 0"
   110.1 --- a/src/HOL/Presburger.thy	Fri Jul 04 20:07:08 2014 +0200
   110.2 +++ b/src/HOL/Presburger.thy	Fri Jul 04 20:18:47 2014 +0200
   110.3 @@ -54,8 +54,8 @@
   110.4    "(d::'a::{comm_ring,Rings.dvd}) dvd D \<Longrightarrow> \<forall>x k. (\<not>d dvd x + t) = (\<not>d dvd (x - k*D) + t)"
   110.5    "\<forall>x k. F = F"
   110.6  apply (auto elim!: dvdE simp add: algebra_simps)
   110.7 -unfolding mult_assoc [symmetric] distrib_right [symmetric] left_diff_distrib [symmetric]
   110.8 -unfolding dvd_def mult_commute [of d] 
   110.9 +unfolding mult.assoc [symmetric] distrib_right [symmetric] left_diff_distrib [symmetric]
  110.10 +unfolding dvd_def mult.commute [of d] 
  110.11  by auto
  110.12  
  110.13  subsection{* The A and B sets *}
   111.1 --- a/src/HOL/Probability/Bochner_Integration.thy	Fri Jul 04 20:07:08 2014 +0200
   111.2 +++ b/src/HOL/Probability/Bochner_Integration.thy	Fri Jul 04 20:18:47 2014 +0200
   111.3 @@ -743,7 +743,7 @@
   111.4    finally have s_fin: "(\<integral>\<^sup>+x. norm (s i x) \<partial>M) < \<infinity>" .
   111.5  
   111.6    have "(\<integral>\<^sup>+ x. norm (f x) \<partial>M) \<le> (\<integral>\<^sup>+ x. ereal (norm (f x - s i x)) + ereal (norm (s i x)) \<partial>M)"
   111.7 -    by (auto intro!: nn_integral_mono) (metis add_commute norm_triangle_sub)
   111.8 +    by (auto intro!: nn_integral_mono) (metis add.commute norm_triangle_sub)
   111.9    also have "\<dots> = (\<integral>\<^sup>+x. norm (f x - s i x) \<partial>M) + (\<integral>\<^sup>+x. norm (s i x) \<partial>M)"
  111.10      by (rule nn_integral_add) auto
  111.11    also have "\<dots> < \<infinity>"
  111.12 @@ -779,7 +779,7 @@
  111.13             (auto intro: s simple_bochner_integrable_compose2)
  111.14        also have "\<dots> \<le> (\<integral>\<^sup>+x. ereal (norm (f x - s n x)) + norm (f x) \<partial>M)"
  111.15          by (auto intro!: nn_integral_mono)
  111.16 -           (metis add_commute norm_minus_commute norm_triangle_sub)
  111.17 +           (metis add.commute norm_minus_commute norm_triangle_sub)
  111.18        also have "\<dots> = ?t n" 
  111.19          by (rule nn_integral_add) auto
  111.20        finally show "norm (?s n) \<le> ?t n" .
   112.1 --- a/src/HOL/Probability/Convolution.thy	Fri Jul 04 20:07:08 2014 +0200
   112.2 +++ b/src/HOL/Probability/Convolution.thy	Fri Jul 04 20:18:47 2014 +0200
   112.3 @@ -66,7 +66,7 @@
   112.4    apply (subst nn_integral_indicator[symmetric], simp)
   112.5    apply (subst nn_integral_convolution, 
   112.6          auto intro!: borel_measurable_indicator borel_measurable_indicator' convolution_finite)+
   112.7 -  by (rule nn_integral_cong)+ (auto simp: semigroup_add_class.add_assoc)
   112.8 +  by (rule nn_integral_cong)+ (auto simp: semigroup_add_class.add.assoc)
   112.9  
  112.10  lemma convolution_emeasure_3':
  112.11    assumes [simp, measurable]:"A \<in> sets borel"
  112.12 @@ -96,7 +96,7 @@
  112.13    have "emeasure (M \<star> N) A = \<integral>\<^sup>+x. \<integral>\<^sup>+y. indicator A (x + y) \<partial>N \<partial>M" by (auto intro!: convolution_emeasure')
  112.14    also have "... = \<integral>\<^sup>+x. \<integral>\<^sup>+y. (\<lambda>(x,y). indicator A (x + y)) (x, y) \<partial>N \<partial>M" by (auto intro!: nn_integral_cong)
  112.15    also have "... = \<integral>\<^sup>+y. \<integral>\<^sup>+x. (\<lambda>(x,y). indicator A (x + y)) (x, y) \<partial>M \<partial>N" by (rule Fubini[symmetric]) simp
  112.16 -  also have "... = emeasure (N \<star> M) A" by (auto intro!: nn_integral_cong simp: add_commute convolution_emeasure')
  112.17 +  also have "... = emeasure (N \<star> M) A" by (auto intro!: nn_integral_cong simp: add.commute convolution_emeasure')
  112.18    finally show "emeasure (M \<star> N) A = emeasure (N \<star> M) A" by simp
  112.19  qed
  112.20  
   113.1 --- a/src/HOL/Probability/Distributions.thy	Fri Jul 04 20:07:08 2014 +0200
   113.2 +++ b/src/HOL/Probability/Distributions.thy	Fri Jul 04 20:18:47 2014 +0200
   113.3 @@ -865,7 +865,7 @@
   113.4      proof (subst nn_integral_FTC_atLeast)
   113.5        have "((\<lambda>a. - (exp (- (a\<^sup>2 * (1 + s\<^sup>2))) / (2 + 2 * s\<^sup>2))) ---> (- (0 / (2 + 2 * s\<^sup>2)))) at_top"
   113.6          apply (intro tendsto_intros filterlim_compose[OF exp_at_bot] filterlim_compose[OF filterlim_uminus_at_bot_at_top])
   113.7 -        apply (subst mult_commute)         
   113.8 +        apply (subst mult.commute)         
   113.9          apply (auto intro!: filterlim_tendsto_pos_mult_at_top
  113.10                              filterlim_at_top_mult_at_top[OF filterlim_ident filterlim_ident] 
  113.11                      simp: add_pos_nonneg  power2_eq_square add_nonneg_eq_0_iff)
   114.1 --- a/src/HOL/Probability/Finite_Product_Measure.thy	Fri Jul 04 20:07:08 2014 +0200
   114.2 +++ b/src/HOL/Probability/Finite_Product_Measure.thy	Fri Jul 04 20:18:47 2014 +0200
   114.3 @@ -643,7 +643,7 @@
   114.4        using E by (subst insert) (auto intro!: setprod.cong)
   114.5      also have "(\<Prod>j\<in>I. if j \<in> J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j))) *
   114.6         emeasure (M i) (if i \<in> J then E i else space (M i)) = (\<Prod>j\<in>insert i I. ?f J E j)"
   114.7 -      using insert by (auto simp: mult_commute intro!: arg_cong2[where f="op *"] setprod.cong)
   114.8 +      using insert by (auto simp: mult.commute intro!: arg_cong2[where f="op *"] setprod.cong)
   114.9      also have "\<dots> = (\<Prod>j\<in>J \<union> ?I. ?f J E j)"
  114.10        using insert(1,2) J E by (intro setprod.mono_neutral_right) auto
  114.11      finally show "?\<mu> ?p = \<dots>" .
   115.1 --- a/src/HOL/Probability/Independent_Family.thy	Fri Jul 04 20:07:08 2014 +0200
   115.2 +++ b/src/HOL/Probability/Independent_Family.thy	Fri Jul 04 20:18:47 2014 +0200
   115.3 @@ -1301,7 +1301,7 @@
   115.4  unfolding indep_var_def
   115.5  proof -
   115.6    have *: "(\<lambda>\<omega>. X1 \<omega> * X2 \<omega>) = (\<lambda>\<omega>. \<Prod>i\<in>UNIV. (case_bool X1 X2 i \<omega>))"
   115.7 -    by (simp add: UNIV_bool mult_commute)
   115.8 +    by (simp add: UNIV_bool mult.commute)
   115.9    have **: "(\<lambda> _. borel) = case_bool borel borel"
  115.10      by (rule ext, metis (full_types) bool.simps(3) bool.simps(4))
  115.11    show ?eq
  115.12 @@ -1310,7 +1310,7 @@
  115.13      apply (auto)
  115.14      apply (subst **, subst indep_var_def [symmetric], rule assms)
  115.15      apply (simp split: bool.split add: assms)
  115.16 -    by (simp add: UNIV_bool mult_commute)
  115.17 +    by (simp add: UNIV_bool mult.commute)
  115.18    show ?int
  115.19      apply (subst *)
  115.20      apply (rule indep_vars_integrable)
   116.1 --- a/src/HOL/Probability/Infinite_Product_Measure.thy	Fri Jul 04 20:07:08 2014 +0200
   116.2 +++ b/src/HOL/Probability/Infinite_Product_Measure.thy	Fri Jul 04 20:18:47 2014 +0200
   116.3 @@ -565,7 +565,7 @@
   116.4    also have "emeasure S ?E = (\<Prod>j\<in>J \<inter> {..<i}. emeasure M (E j))"
   116.5      using J by (intro emeasure_PiM_emb) simp_all
   116.6    also have "(\<Prod>j\<in>J \<inter> {..<i}. emeasure M (E j)) * (\<Prod>j\<in>J - (J \<inter> {..<i}). emeasure M (E j)) = (\<Prod>j\<in>J. emeasure M (E j))"
   116.7 -    by (subst mult_commute) (auto simp: J setprod.subset_diff[symmetric])
   116.8 +    by (subst mult.commute) (auto simp: J setprod.subset_diff[symmetric])
   116.9    finally show "emeasure ?D ?X = (\<Prod>j\<in>J. emeasure M (E j))" .
  116.10  qed simp_all
  116.11  
   117.1 --- a/src/HOL/Probability/Lebesgue_Measure.thy	Fri Jul 04 20:07:08 2014 +0200
   117.2 +++ b/src/HOL/Probability/Lebesgue_Measure.thy	Fri Jul 04 20:18:47 2014 +0200
   117.3 @@ -1080,7 +1080,7 @@
   117.4        by (auto intro: continuous_at_imp_continuous_on)
   117.5    qed simp
   117.6    then show ?thesis
   117.7 -    by (auto simp: mult_commute)
   117.8 +    by (auto simp: mult.commute)
   117.9  qed
  117.10  
  117.11  text {*
  117.12 @@ -1160,7 +1160,7 @@
  117.13      using cont by (intro continuous_at_imp_continuous_on) auto
  117.14    show ?has ?eq
  117.15      using has_bochner_integral_FTC_Icc[OF `a \<le> b` 1 2] integral_FTC_Icc[OF `a \<le> b` 1 2]
  117.16 -    by (auto simp: mult_commute)
  117.17 +    by (auto simp: mult.commute)
  117.18  qed
  117.19  
  117.20  lemma nn_integral_FTC_atLeast:
   118.1 --- a/src/HOL/Probability/Nonnegative_Lebesgue_Integration.thy	Fri Jul 04 20:07:08 2014 +0200
   118.2 +++ b/src/HOL/Probability/Nonnegative_Lebesgue_Integration.thy	Fri Jul 04 20:18:47 2014 +0200
   118.3 @@ -614,7 +614,7 @@
   118.4      using f by (intro simple_function_partition) auto
   118.5    also have "\<dots> = c * integral\<^sup>S M f"
   118.6      using f unfolding simple_integral_def
   118.7 -    by (subst setsum_ereal_right_distrib) (auto simp: emeasure_nonneg mult_assoc Int_def conj_commute)
   118.8 +    by (subst setsum_ereal_right_distrib) (auto simp: emeasure_nonneg mult.assoc Int_def conj_commute)
   118.9    finally show ?thesis .
  118.10  qed
  118.11  
  118.12 @@ -1129,7 +1129,7 @@
  118.13  lemma nn_integral_multc:
  118.14    assumes "f \<in> borel_measurable M" "0 \<le> c"
  118.15    shows "(\<integral>\<^sup>+ x. f x * c \<partial>M) = integral\<^sup>N M f * c"
  118.16 -  unfolding mult_commute[of _ c] nn_integral_cmult[OF assms] by simp
  118.17 +  unfolding mult.commute[of _ c] nn_integral_cmult[OF assms] by simp
  118.18  
  118.19  lemma nn_integral_indicator[simp]:
  118.20    "A \<in> sets M \<Longrightarrow> (\<integral>\<^sup>+ x. indicator A x\<partial>M) = (emeasure M) A"
   119.1 --- a/src/HOL/Probability/Sigma_Algebra.thy	Fri Jul 04 20:07:08 2014 +0200
   119.2 +++ b/src/HOL/Probability/Sigma_Algebra.thy	Fri Jul 04 20:18:47 2014 +0200
   119.3 @@ -830,11 +830,11 @@
   119.4        case 0 show ?case by simp
   119.5      next
   119.6        case (Suc m) thus ?case
   119.7 -        by (metis Suc_eq_plus1 assms nat_add_commute nat_add_left_commute subset_trans)
   119.8 +        by (metis Suc_eq_plus1 assms add.commute add.left_commute subset_trans)
   119.9      qed
  119.10    }
  119.11    hence "!!m n. m < n \<Longrightarrow> A m \<subseteq> A n"
  119.12 -    by (metis add_commute le_add_diff_inverse nat_less_le)
  119.13 +    by (metis add.commute le_add_diff_inverse nat_less_le)
  119.14    thus ?thesis
  119.15      by (auto simp add: disjoint_family_on_def)
  119.16        (metis insert_absorb insert_subset le_SucE le_antisym not_leE)
   120.1 --- a/src/HOL/Proofs/Extraction/Euclid.thy	Fri Jul 04 20:07:08 2014 +0200
   120.2 +++ b/src/HOL/Proofs/Extraction/Euclid.thy	Fri Jul 04 20:18:47 2014 +0200
   120.3 @@ -114,12 +114,12 @@
   120.4      assume "m \<le> n"
   120.5      with `0 < m` have "m dvd fact n" by (rule Suc)
   120.6      then have "m dvd (fact n * Suc n)" by (rule dvd_mult2)
   120.7 -    then show ?thesis by (simp add: mult_commute)
   120.8 +    then show ?thesis by (simp add: mult.commute)
   120.9    next
  120.10      assume "m = Suc n"
  120.11      then have "m dvd (fact n * Suc n)"
  120.12        by (auto intro: dvdI simp: mult_ac)
  120.13 -    then show ?thesis by (simp add: mult_commute)
  120.14 +    then show ?thesis by (simp add: mult.commute)
  120.15    qed
  120.16  qed
  120.17  
   121.1 --- a/src/HOL/Proofs/Extraction/Greatest_Common_Divisor.thy	Fri Jul 04 20:07:08 2014 +0200
   121.2 +++ b/src/HOL/Proofs/Extraction/Greatest_Common_Divisor.thy	Fri Jul 04 20:18:47 2014 +0200
   121.3 @@ -39,7 +39,7 @@
   121.4        by iprover
   121.5      have mn: "Suc m < n" by (rule 1)
   121.6      from h1 h1' h2' Suc have "k * (m1 * q + r1) = n" 
   121.7 -      by (simp add: add_mult_distrib2 nat_mult_assoc [symmetric])
   121.8 +      by (simp add: add_mult_distrib2 mult.assoc [symmetric])
   121.9      moreover have "\<And>l l1 l2. l * l1 = n \<Longrightarrow> l * l2 = Suc m \<Longrightarrow> l \<le> k"
  121.10      proof -
  121.11        fix l l1 l2
   122.1 --- a/src/HOL/Proofs/Lambda/ListApplication.thy	Fri Jul 04 20:07:08 2014 +0200
   122.2 +++ b/src/HOL/Proofs/Lambda/ListApplication.thy	Fri Jul 04 20:18:47 2014 +0200
   122.3 @@ -110,7 +110,7 @@
   122.4      prefer 2
   122.5      apply (erule allE, erule mp, rule refl)
   122.6     apply simp
   122.7 -   apply (simp only: foldl_conv_fold add_commute fold_plus_listsum_rev)
   122.8 +   apply (simp only: foldl_conv_fold add.commute fold_plus_listsum_rev)
   122.9     apply (fastforce simp add: listsum_map_remove1)
  122.10    apply clarify
  122.11    apply (rule assms)
  122.12 @@ -126,7 +126,7 @@
  122.13    apply (rule le_imp_less_Suc)
  122.14    apply (rule trans_le_add1)
  122.15    apply (rule trans_le_add2)
  122.16 -  apply (simp only: foldl_conv_fold add_commute fold_plus_listsum_rev)
  122.17 +  apply (simp only: foldl_conv_fold add.commute fold_plus_listsum_rev)
  122.18    apply (simp add: member_le_listsum_nat)
  122.19    done
  122.20  
   123.1 --- a/src/HOL/Quotient_Examples/Int_Pow.thy	Fri Jul 04 20:07:08 2014 +0200
   123.2 +++ b/src/HOL/Quotient_Examples/Int_Pow.thy	Fri Jul 04 20:18:47 2014 +0200
   123.3 @@ -53,7 +53,7 @@
   123.4  proof (cases "m\<ge>n")
   123.5    have [simp]: "a \<in> carrier G" using `a \<in> _` by (rule Units_closed)
   123.6    case True
   123.7 -    then obtain k where *:"m = k + n" and **:"m = n + k" by (metis Nat.le_iff_add nat_add_commute)
   123.8 +    then obtain k where *:"m = k + n" and **:"m = n + k" by (metis Nat.le_iff_add add.commute)
   123.9      have "a (^) (m::nat) \<otimes> inv (a (^) (n::nat)) = a (^) k"
  123.10        using * by (auto simp add: nat_pow_mult[symmetric] m_assoc)
  123.11      also have "\<dots> = inv (a (^) n) \<otimes> a (^) m"
  123.12 @@ -63,7 +63,7 @@
  123.13    have [simp]: "a \<in> carrier G" using `a \<in> _` by (rule Units_closed)
  123.14    case False
  123.15      then obtain k where *:"n = k + m" and **:"n = m + k" 
  123.16 -      by (metis Nat.le_iff_add nat_add_commute nat_le_linear)
  123.17 +      by (metis Nat.le_iff_add add.commute nat_le_linear)
  123.18      have "a (^) (m::nat) \<otimes> inv (a (^) (n::nat)) = inv(a (^) k)"
  123.19        using * by (auto simp add: nat_pow_mult[symmetric] m_assoc[symmetric] inv_mult_units)
  123.20      also have "\<dots> = inv (a (^) n) \<otimes> a (^) m"
  123.21 @@ -86,7 +86,7 @@
  123.22  proof(cases "b\<ge>c")
  123.23    have [simp]: "a \<in> carrier G" using `a \<in> _` by (rule Units_closed)
  123.24    case True
  123.25 -    then obtain n where "b = n + c" by (metis Nat.le_iff_add nat_add_commute)
  123.26 +    then obtain n where "b = n + c" by (metis Nat.le_iff_add add.commute)
  123.27      then have "d = n + e" using eq by arith
  123.28      from `b = _` have "a (^) b \<otimes> inv (a (^) c) = a (^) n" 
  123.29        by (auto simp add: nat_pow_mult[symmetric] m_assoc)
  123.30 @@ -96,7 +96,7 @@
  123.31  next
  123.32    have [simp]: "a \<in> carrier G" using `a \<in> _` by (rule Units_closed)
  123.33    case False
  123.34 -    then obtain n where "c = n + b" by (metis Nat.le_iff_add nat_add_commute nat_le_linear)
  123.35 +    then obtain n where "c = n + b" by (metis Nat.le_iff_add add.commute nat_le_linear)
  123.36      then have "e = n + d" using eq by arith
  123.37      from `c = _` have "a (^) b \<otimes> inv (a (^) c) = inv (a (^) n)" 
  123.38        by (auto simp add: nat_pow_mult[symmetric] m_assoc[symmetric] inv_mult_units)
   124.1 --- a/src/HOL/Quotient_Examples/Quotient_Rat.thy	Fri Jul 04 20:07:08 2014 +0200
   124.2 +++ b/src/HOL/Quotient_Examples/Quotient_Rat.thy	Fri Jul 04 20:18:47 2014 +0200
   124.3 @@ -41,14 +41,14 @@
   124.4    "times_rat_raw (a :: int, b :: int) (c, d) = (a * c, b * d)"
   124.5  
   124.6  quotient_definition
   124.7 -  "(op *) :: (rat \<Rightarrow> rat \<Rightarrow> rat)" is times_rat_raw by (auto simp add: mult_assoc mult_left_commute)
   124.8 +  "(op *) :: (rat \<Rightarrow> rat \<Rightarrow> rat)" is times_rat_raw by (auto simp add: mult.assoc mult.left_commute)
   124.9  
  124.10  fun plus_rat_raw where
  124.11    "plus_rat_raw (a :: int, b :: int) (c, d) = (a * d + c * b, b * d)"
  124.12  
  124.13  quotient_definition
  124.14    "(op +) :: (rat \<Rightarrow> rat \<Rightarrow> rat)" is plus_rat_raw 
  124.15 -  by (auto simp add: mult_commute mult_left_commute int_distrib(2))
  124.16 +  by (auto simp add: mult.commute mult.left_commute int_distrib(2))
  124.17  
  124.18  fun uminus_rat_raw where
  124.19    "uminus_rat_raw (a :: int, b :: int) = (-a, b)"
  124.20 @@ -78,13 +78,13 @@
  124.21      have "a * f * b * f * d * d \<le> e * b * b * f * d * d" using le nz(2)
  124.22        by (metis linorder_le_cases mult_right_mono mult_right_mono_neg)
  124.23      then have "c * f * f * d * (b * b) \<le> e * f * d * d * (b * b)" using eq
  124.24 -      by (metis (no_types) mult_assoc mult_commute)
  124.25 +      by (metis (no_types) mult.assoc mult.commute)
  124.26      then have "c * f * f * d \<le> e * f * d * d" using b2
  124.27        by (metis leD linorder_le_less_linear mult_strict_right_mono)
  124.28      then have "c * f * f * d * h * h \<le> e * f * d * d * h * h" using nz(4)
  124.29        by (metis linorder_le_cases mult_right_mono mult_right_mono_neg)
  124.30      then have "c * h * (d * h) * (f * f) \<le> g * d * (d * h) * (f * f)" using eq
  124.31 -      by (metis (no_types) mult_assoc mult_commute)
  124.32 +      by (metis (no_types) mult.assoc mult.commute)
  124.33      then have "c * h * (d * h) \<le> g * d * (d * h)" using f2
  124.34        by (metis leD linorder_le_less_linear mult_strict_right_mono)
  124.35    }
  124.36 @@ -128,7 +128,7 @@
  124.37    show "1 * a = a"
  124.38      by partiality_descending auto
  124.39    show "a + b + c = a + (b + c)"
  124.40 -    by partiality_descending (auto simp add: mult_commute distrib_left)
  124.41 +    by partiality_descending (auto simp add: mult.commute distrib_left)
  124.42    show "a + b = b + a"
  124.43      by partiality_descending auto
  124.44    show "0 + a = a"
  124.45 @@ -138,7 +138,7 @@
  124.46    show "a - b = a + - b"
  124.47      by (simp add: minus_rat_def)
  124.48    show "(a + b) * c = a * c + b * c"
  124.49 -    by partiality_descending (auto simp add: mult_commute distrib_left)
  124.50 +    by partiality_descending (auto simp add: mult.commute distrib_left)
  124.51    show "(0 :: rat) \<noteq> (1 :: rat)"
  124.52      by partiality_descending auto
  124.53  qed
  124.54 @@ -167,7 +167,7 @@
  124.55    "rat_inverse_raw (a :: int, b :: int) = (if a = 0 then (0, 1) else (b, a))"
  124.56  
  124.57  quotient_definition
  124.58 -  "inverse :: rat \<Rightarrow> rat" is rat_inverse_raw by (force simp add: mult_commute)
  124.59 +  "inverse :: rat \<Rightarrow> rat" is rat_inverse_raw by (force simp add: mult.commute)
  124.60  
  124.61  definition
  124.62    divide_rat_def: "q / r = q * inverse (r::rat)"
  124.63 @@ -194,7 +194,7 @@
  124.64    {
  124.65      assume "q \<le> r" and "r \<le> s"
  124.66      then show "q \<le> s"
  124.67 -    proof (partiality_descending, auto simp add: mult_assoc[symmetric])
  124.68 +    proof (partiality_descending, auto simp add: mult.assoc[symmetric])
  124.69        fix a b c d e f :: int
  124.70        assume nz: "b \<noteq> 0" "d \<noteq> 0" "f \<noteq> 0"
  124.71        then have d2: "d * d > 0"
  124.72 @@ -220,9 +220,9 @@
  124.73      show "q \<le> q" by partiality_descending auto
  124.74      show "(q < r) = (q \<le> r \<and> \<not> r \<le> q)"
  124.75        unfolding less_rat_def
  124.76 -      by partiality_descending (auto simp add: le_less mult_commute)
  124.77 +      by partiality_descending (auto simp add: le_less mult.commute)
  124.78      show "q \<le> r \<or> r \<le> q"
  124.79 -      by partiality_descending (auto simp add: mult_commute linorder_linear)
  124.80 +      by partiality_descending (auto simp add: mult.commute linorder_linear)
  124.81    }
  124.82  qed
  124.83  
  124.84 @@ -232,25 +232,25 @@
  124.85  proof
  124.86    fix q r s :: rat
  124.87    show "q \<le> r ==> s + q \<le> s + r"
  124.88 -  proof (partiality_descending, auto simp add: algebra_simps, simp add: mult_assoc[symmetric])
  124.89 +  proof (partiality_descending, auto simp add: algebra_simps, simp add: mult.assoc[symmetric])
  124.90      fix a b c d e :: int
  124.91      assume "e \<noteq> 0"
  124.92      then have e2: "e * e > 0"
  124.93        by (metis linorder_neqE_linordered_idom mult_eq_0_iff not_square_less_zero)
  124.94        assume "a * b * d * d \<le> b * b * c * d"
  124.95        then show "a * b * d * d * e * e * e * e \<le> b * b * c * d * e * e * e * e"
  124.96 -        using e2 by (metis comm_mult_left_mono mult_commute linorder_le_cases
  124.97 +        using e2 by (metis comm_mult_left_mono mult.commute linorder_le_cases
  124.98            mult_left_mono_neg)
  124.99      qed
 124.100    show "q < r ==> 0 < s ==> s * q < s * r" unfolding less_rat_def
 124.101 -    proof (partiality_descending, auto simp add: algebra_simps, simp add: mult_assoc[symmetric])
 124.102 +    proof (partiality_descending, auto simp add: algebra_simps, simp add: mult.assoc[symmetric])
 124.103      fix a b c d e f :: int
 124.104      assume a: "e \<noteq> 0" "f \<noteq> 0" "0 \<le> e * f" "a * b * d * d \<le> b * b * c * d"
 124.105      have "a * b * d * d * (e * f) \<le> b * b * c * d * (e * f)" using a
 124.106        by (simp add: mult_right_mono)
 124.107      then show "a * b * d * d * e * f * f * f \<le> b * b * c * d * e * f * f * f"
 124.108 -      by (simp add: mult_assoc[symmetric]) (metis a(3) comm_mult_left_mono
 124.109 -        mult_commute mult_left_mono_neg zero_le_mult_iff)
 124.110 +      by (simp add: mult.assoc[symmetric]) (metis a(3) comm_mult_left_mono
 124.111 +        mult.commute mult_left_mono_neg zero_le_mult_iff)
 124.112    qed
 124.113    show "\<exists>z. r \<le> of_int z"
 124.114      unfolding of_int_rat
 124.115 @@ -258,7 +258,7 @@
 124.116      fix a b :: int
 124.117      assume "b \<noteq> 0"
 124.118      then have "a * b \<le> (a div b + 1) * b * b"
 124.119 -      by (metis mult_commute div_mult_self1_is_id less_int_def linorder_le_cases zdiv_mono1 zdiv_mono1_neg zle_add1_eq_le)
 124.120 +      by (metis mult.commute div_mult_self1_is_id less_int_def linorder_le_cases zdiv_mono1 zdiv_mono1_neg zle_add1_eq_le)
 124.121      then show "\<exists>z\<Colon>int. a * b \<le> z * b * b" by auto
 124.122    qed
 124.123  qed
   125.1 --- a/src/HOL/Rat.thy	Fri Jul 04 20:07:08 2014 +0200
   125.2 +++ b/src/HOL/Rat.thy	Fri Jul 04 20:18:47 2014 +0200
   125.3 @@ -76,7 +76,7 @@
   125.4      by (simp add: dvd_div_mult_self)
   125.5    with `b \<noteq> 0` have "?b \<noteq> 0" by auto
   125.6    from `q = Fract a b` `b \<noteq> 0` `?b \<noteq> 0` have q: "q = Fract ?a ?b"
   125.7 -    by (simp add: eq_rat dvd_div_mult mult_commute [of a])
   125.8 +    by (simp add: eq_rat dvd_div_mult mult.commute [of a])
   125.9    from `b \<noteq> 0` have coprime: "coprime ?a ?b"
  125.10      by (auto intro: div_gcd_coprime_int)
  125.11    show C proof (cases "b > 0")
  125.12 @@ -156,7 +156,7 @@
  125.13  
  125.14  lift_definition inverse_rat :: "rat \<Rightarrow> rat"
  125.15    is "\<lambda>x. if fst x = 0 then (0, 1) else (snd x, fst x)"
  125.16 -  by (auto simp add: mult_commute)
  125.17 +  by (auto simp add: mult.commute)
  125.18  
  125.19  lemma inverse_rat [simp]: "inverse (Fract a b) = Fract b a"
  125.20    by transfer simp
  125.21 @@ -254,7 +254,7 @@
  125.22    moreover have "b div gcd a b * gcd a b = b"
  125.23      by (rule dvd_div_mult_self) simp
  125.24    ultimately have "b div gcd a b \<noteq> 0" by auto
  125.25 -  with False show ?thesis by (simp add: eq_rat dvd_div_mult mult_commute [of a])
  125.26 +  with False show ?thesis by (simp add: eq_rat dvd_div_mult mult.commute [of a])
  125.27  qed
  125.28  
  125.29  definition normalize :: "int \<times> int \<Rightarrow> int \<times> int" where
  125.30 @@ -274,7 +274,7 @@
  125.31      with assms show "p * s = q * r" by (auto simp add: mult_ac sgn_times sgn_0_0)
  125.32    qed
  125.33    from assms show ?thesis
  125.34 -    by (auto simp add: normalize_def Let_def dvd_div_div_eq_mult mult_commute sgn_times split: if_splits intro: aux)
  125.35 +    by (auto simp add: normalize_def Let_def dvd_div_div_eq_mult mult.commute sgn_times split: if_splits intro: aux)
  125.36  qed
  125.37  
  125.38  lemma normalize_eq: "normalize (a, b) = (p, q) \<Longrightarrow> Fract p q = Fract a b"
   126.1 --- a/src/HOL/Real.thy	Fri Jul 04 20:07:08 2014 +0200
   126.2 +++ b/src/HOL/Real.thy	Fri Jul 04 20:18:47 2014 +0200
   126.3 @@ -412,7 +412,7 @@
   126.4  
   126.5  lift_definition times_real :: "real \<Rightarrow> real \<Rightarrow> real" is "\<lambda>X Y n. X n * Y n"
   126.6    unfolding realrel_def mult_diff_mult
   126.7 -  by (subst (4) mult_commute, simp only: cauchy_mult vanishes_add
   126.8 +  by (subst (4) mult.commute, simp only: cauchy_mult vanishes_add
   126.9      vanishes_mult_bounded cauchy_imp_bounded simp_thms)
  126.10  
  126.11  lift_definition inverse_real :: "real \<Rightarrow> real"
  126.12 @@ -812,7 +812,7 @@
  126.13  
  126.14    have twos: "\<And>y r :: rat. 0 < r \<Longrightarrow> \<exists>n. y / 2 ^ n < r"
  126.15      apply (simp add: divide_less_eq)
  126.16 -    apply (subst mult_commute)
  126.17 +    apply (subst mult.commute)
  126.18      apply (frule_tac y=y in ex_less_of_nat_mult)
  126.19      apply clarify
  126.20      apply (rule_tac x=n in exI)
   127.1 --- a/src/HOL/Real_Vector_Spaces.thy	Fri Jul 04 20:07:08 2014 +0200
   127.2 +++ b/src/HOL/Real_Vector_Spaces.thy	Fri Jul 04 20:18:47 2014 +0200
   127.3 @@ -57,7 +57,7 @@
   127.4  
   127.5  lemma scale_left_commute:
   127.6    "scale a (scale b x) = scale b (scale a x)"
   127.7 -by (simp add: mult_commute)
   127.8 +by (simp add: mult.commute)
   127.9  
  127.10  lemma scale_zero_left [simp]: "scale 0 x = 0"
  127.11    and scale_minus_left [simp]: "scale (- a) x = - (scale a x)"
  127.12 @@ -255,7 +255,7 @@
  127.13  by (simp add: of_real_def scaleR_left_diff_distrib)
  127.14  
  127.15  lemma of_real_mult [simp]: "of_real (x * y) = of_real x * of_real y"
  127.16 -by (simp add: of_real_def mult_commute)
  127.17 +by (simp add: of_real_def mult.commute)
  127.18  
  127.19  lemma of_real_setsum[simp]: "of_real (setsum f s) = (\<Sum>x\<in>s. of_real (f x))"
  127.20    by (induct s rule: infinite_finite_induct) auto
  127.21 @@ -1171,7 +1171,7 @@
  127.22  lemma sgn_mult:
  127.23    fixes x y :: "'a::real_normed_div_algebra"
  127.24    shows "sgn (x * y) = sgn x * sgn y"
  127.25 -by (simp add: sgn_div_norm norm_mult mult_commute)
  127.26 +by (simp add: sgn_div_norm norm_mult mult.commute)
  127.27  
  127.28  lemma real_sgn_eq: "sgn (x::real) = x / \<bar>x\<bar>"
  127.29  by (simp add: sgn_div_norm divide_inverse)
  127.30 @@ -1387,7 +1387,7 @@
  127.31        also have "\<dots> \<le> (norm x * Kg) * Kf"
  127.32          using g Kf [THEN order_less_imp_le] by (rule mult_right_mono)
  127.33        also have "(norm x * Kg) * Kf = norm x * (Kg * Kf)"
  127.34 -        by (rule mult_assoc)
  127.35 +        by (rule mult.assoc)
  127.36        finally show "norm (f (g x)) \<le> norm x * (Kg * Kf)" .
  127.37      qed
  127.38    qed
   128.1 --- a/src/HOL/Rings.thy	Fri Jul 04 20:07:08 2014 +0200
   128.2 +++ b/src/HOL/Rings.thy	Fri Jul 04 20:18:47 2014 +0200
   128.3 @@ -144,7 +144,7 @@
   128.4  proof -
   128.5    from assms obtain v where "b = a * v" by (auto elim!: dvdE)
   128.6    moreover from assms obtain w where "c = b * w" by (auto elim!: dvdE)
   128.7 -  ultimately have "c = a * (v * w)" by (simp add: mult_assoc)
   128.8 +  ultimately have "c = a * (v * w)" by (simp add: mult.assoc)
   128.9    then show ?thesis ..
  128.10  qed
  128.11  
  128.12 @@ -160,10 +160,10 @@
  128.13  by (auto intro!: dvdI)
  128.14  
  128.15  lemma dvd_mult[simp]: "a dvd c \<Longrightarrow> a dvd (b * c)"
  128.16 -by (auto intro!: mult_left_commute dvdI elim!: dvdE)
  128.17 +by (auto intro!: mult.left_commute dvdI elim!: dvdE)
  128.18  
  128.19  lemma dvd_mult2[simp]: "a dvd b \<Longrightarrow> a dvd (b * c)"
  128.20 -  apply (subst mult_commute)
  128.21 +  apply (subst mult.commute)
  128.22    apply (erule dvd_mult)
  128.23    done
  128.24  
  128.25 @@ -185,7 +185,7 @@
  128.26  qed
  128.27  
  128.28  lemma dvd_mult_left: "a * b dvd c \<Longrightarrow> a dvd c"
  128.29 -by (simp add: dvd_def mult_assoc, blast)
  128.30 +by (simp add: dvd_def mult.assoc, blast)
  128.31  
  128.32  lemma dvd_mult_right: "a * b dvd c \<Longrightarrow> b dvd c"
  128.33    unfolding mult_ac [of a] by (rule dvd_mult_left)
  128.34 @@ -684,7 +684,7 @@
  128.35    fix a b c :: 'a
  128.36    assume "a \<le> b" "0 \<le> c"
  128.37    thus "c * a \<le> c * b" by (rule comm_mult_left_mono)
  128.38 -  thus "a * c \<le> b * c" by (simp only: mult_commute)
  128.39 +  thus "a * c \<le> b * c" by (simp only: mult.commute)
  128.40  qed
  128.41  
  128.42  end
  128.43 @@ -707,7 +707,7 @@
  128.44    fix a b c :: 'a
  128.45    assume "a < b" "0 < c"
  128.46    thus "c * a < c * b" by (rule comm_mult_strict_left_mono)
  128.47 -  thus "a * c < b * c" by (simp only: mult_commute)
  128.48 +  thus "a * c < b * c" by (simp only: mult.commute)
  128.49  qed
  128.50  
  128.51  subclass ordered_cancel_comm_semiring
   129.1 --- a/src/HOL/Set_Interval.thy	Fri Jul 04 20:07:08 2014 +0200
   129.2 +++ b/src/HOL/Set_Interval.thy	Fri Jul 04 20:18:47 2014 +0200
   129.3 @@ -1480,7 +1480,7 @@
   129.4  lemma setsum_nat_group: "(\<Sum>m<n::nat. setsum f {m * k ..< m*k + k}) = setsum f {..< n * k}"
   129.5    apply (subgoal_tac "k = 0 | 0 < k", auto)
   129.6    apply (induct "n")
   129.7 -  apply (simp_all add: setsum_add_nat_ivl add_commute atLeast0LessThan[symmetric])
   129.8 +  apply (simp_all add: setsum_add_nat_ivl add.commute atLeast0LessThan[symmetric])
   129.9    done
  129.10  
  129.11  subsection{* Shifting bounds *}
  129.12 @@ -1524,14 +1524,14 @@
  129.13      by (rule IH)
  129.14    also have "f 0 + (\<Sum>i\<le>n. f (Suc i)) + f (Suc (Suc n)) =
  129.15               f 0 + ((\<Sum>i\<le>n. f (Suc i)) + f (Suc (Suc n)))"
  129.16 -    by (rule add_assoc)
  129.17 +    by (rule add.assoc)
  129.18    also have "(\<Sum>i\<le>n. f (Suc i)) + f (Suc (Suc n)) = (\<Sum>i\<le>Suc n. f (Suc i))"
  129.19      by (rule setsum_atMost_Suc [symmetric])
  129.20    finally show ?case .
  129.21  qed
  129.22  
  129.23  lemma setsum_last_plus: fixes n::nat shows "m <= n \<Longrightarrow> (\<Sum>i = m..n. f i) = f n + (\<Sum>i = m..<n. f i)"
  129.24 -  by (cases n) (auto simp: atLeastLessThanSuc_atLeastAtMost add_commute)
  129.25 +  by (cases n) (auto simp: atLeastLessThanSuc_atLeastAtMost add.commute)
  129.26  
  129.27  lemma setsum_Suc_diff:
  129.28    fixes f :: "nat \<Rightarrow> 'a::ab_group_add"
  129.29 @@ -1608,7 +1608,7 @@
  129.30    also from ngt1
  129.31    have "2*?n*a + d*2*(\<Sum>i\<in>{1..n - 1}. ?I i) = (2*?n*a + d*?I (n - 1)*?I n)"
  129.32      by (simp only: mult_ac gauss_sum [of "n - 1"], unfold One_nat_def)
  129.33 -       (simp add:  mult_ac trans [OF add_commute of_nat_Suc [symmetric]])
  129.34 +       (simp add:  mult_ac trans [OF add.commute of_nat_Suc [symmetric]])
  129.35    finally show ?thesis
  129.36      unfolding mult_2 by (simp add: algebra_simps)
  129.37  next
   130.1 --- a/src/HOL/String.thy	Fri Jul 04 20:07:08 2014 +0200
   130.2 +++ b/src/HOL/String.thy	Fri Jul 04 20:18:47 2014 +0200
   130.3 @@ -269,7 +269,7 @@
   130.4  lemma nibble_of_nat_of_char_div_16:
   130.5    "nibble_of_nat (nat_of_char c div 16) = (case c of Char x y \<Rightarrow> x)"
   130.6    by (cases c)
   130.7 -    (simp add: nat_of_char_def add_commute nat_of_nibble_less_16)
   130.8 +    (simp add: nat_of_char_def add.commute nat_of_nibble_less_16)
   130.9  
  130.10  lemma nibble_of_nat_nat_of_char:
  130.11    "nibble_of_nat (nat_of_char c) = (case c of Char x y \<Rightarrow> y)"
  130.12 @@ -279,7 +279,7 @@
  130.13      by (simp add: nibble_of_nat_mod_16)
  130.14    then have "nibble_of_nat (nat_of_nibble y + nat_of_nibble x * 16) = y"
  130.15      by (simp only: nibble_of_nat_mod_16)
  130.16 -  with Char show ?thesis by (simp add: nat_of_char_def add_commute)
  130.17 +  with Char show ?thesis by (simp add: nat_of_char_def add.commute)
  130.18  qed
  130.19  
  130.20  code_datatype Char -- {* drop case certificate for char *}
  130.21 @@ -303,7 +303,7 @@
  130.22    have "n mod 256 = 16 * (n div 16 mod 16) + n mod 16" by simp
  130.23    then show ?thesis
  130.24      by (simp add: char_of_nat_def enum_char_product_enum_nibble card_UNIV_nibble
  130.25 -      card_UNIV_length_enum [symmetric] nibble_of_nat_def product_nth add_commute)
  130.26 +      card_UNIV_length_enum [symmetric] nibble_of_nat_def product_nth add.commute)
  130.27  qed
  130.28  
  130.29  lemma char_of_nat_of_char [simp]:
   131.1 --- a/src/HOL/Tools/numeral_simprocs.ML	Fri Jul 04 20:07:08 2014 +0200
   131.2 +++ b/src/HOL/Tools/numeral_simprocs.ML	Fri Jul 04 20:18:47 2014 +0200
   131.3 @@ -227,7 +227,7 @@
   131.4  
   131.5  (*combine unary minus with numeric literals, however nested within a product*)
   131.6  val mult_minus_simps =
   131.7 -    [@{thm mult_assoc}, @{thm minus_mult_right}, @{thm minus_mult_commute}];
   131.8 +    [@{thm mult.assoc}, @{thm minus_mult_right}, @{thm minus_mult_commute}];
   131.9  
  131.10  val norm_ss1 =
  131.11    simpset_of (put_simpset num_ss @{context}
  131.12 @@ -719,7 +719,7 @@
  131.13             @{thm diff_conv_add_uminus}, @{thm "minus_divide_left"},
  131.14             @{thm "add_divide_distrib"} RS sym,
  131.15             @{thm field_divide_inverse} RS sym, @{thm inverse_divide}, 
  131.16 -           Conv.fconv_rule (Conv.arg_conv (Conv.arg1_conv (Conv.rewr_conv (mk_meta_eq @{thm mult_commute}))))   
  131.17 +           Conv.fconv_rule (Conv.arg_conv (Conv.arg1_conv (Conv.rewr_conv (mk_meta_eq @{thm mult.commute}))))   
  131.18             (@{thm field_divide_inverse} RS sym)]
  131.19  
  131.20  val field_comp_ss =
   132.1 --- a/src/HOL/Transcendental.thy	Fri Jul 04 20:07:08 2014 +0200
   132.2 +++ b/src/HOL/Transcendental.thy	Fri Jul 04 20:18:47 2014 +0200
   132.3 @@ -61,7 +61,7 @@
   132.4    also have "... = y * ((x - y) * (\<Sum>p<Suc n. (x ^ p) * y ^ (n - p))) + (x - y) * (x * x ^ n)"
   132.5      by (simp only: Suc)
   132.6    also have "... = (x - y) * (y * (\<Sum>p<Suc n. (x ^ p) * y ^ (n - p))) + (x - y) * (x * x ^ n)"
   132.7 -    by (simp only: mult_left_commute)
   132.8 +    by (simp only: mult.left_commute)
   132.9    also have "... = (x - y) * (\<Sum>p<Suc (Suc n). x ^ p * y ^ (Suc n - p))"
  132.10      by (simp add: field_simps Suc_diff_le setsum_left_distrib setsum_right_distrib)
  132.11    finally show ?case .
  132.12 @@ -128,7 +128,7 @@
  132.13      also have "\<dots> = K * norm (z ^ n) * (inverse (norm (x ^ n)) * norm (x ^ n))"
  132.14        by (simp add: x_neq_0)
  132.15      also have "\<dots> = K * norm (z ^ n) * inverse (norm (x ^ n)) * norm (x ^ n)"
  132.16 -      by (simp only: mult_assoc)
  132.17 +      by (simp only: mult.assoc)
  132.18      finally show "norm (norm (f n * z ^ n)) \<le>
  132.19                    K * norm (z ^ n) * inverse (norm (x ^ n))"
  132.20        by (simp add: mult_le_cancel_right x_neq_0)
  132.21 @@ -145,7 +145,7 @@
  132.22      thus "summable (\<lambda>n. K * norm (z ^ n) * inverse (norm (x ^ n)))"
  132.23        using x_neq_0
  132.24        by (simp add: norm_mult nonzero_norm_inverse power_mult_distrib
  132.25 -                    power_inverse norm_power mult_assoc)
  132.26 +                    power_inverse norm_power mult.assoc)
  132.27    qed
  132.28    ultimately show "summable (\<lambda>n. norm (f n * z ^ n))"
  132.29      by (rule summable_comparison_test)
  132.30 @@ -469,10 +469,10 @@
  132.31            (z + h) ^ q * z ^ (n - 2 - q))" (is "?lhs = ?rhs")
  132.32    apply (subgoal_tac "h * ?lhs = h * ?rhs", simp add: h)
  132.33    apply (simp add: right_diff_distrib diff_divide_distrib h)
  132.34 -  apply (simp add: mult_assoc [symmetric])
  132.35 +  apply (simp add: mult.assoc [symmetric])
  132.36    apply (cases "n", simp)
  132.37    apply (simp add: lemma_realpow_diff_sumr2 h
  132.38 -                   right_diff_distrib [symmetric] mult_assoc
  132.39 +                   right_diff_distrib [symmetric] mult.assoc
  132.40                del: power_Suc setsum_lessThan_Suc of_nat_Suc)
  132.41    apply (subst lemma_realpow_rev_sumr)
  132.42    apply (subst sumr_diff_mult_const2)
  132.43 @@ -483,7 +483,7 @@
  132.44    apply (clarify)
  132.45    apply (simp add: setsum_right_distrib lemma_realpow_diff_sumr2 mult_ac
  132.46                del: setsum_lessThan_Suc power_Suc)
  132.47 -  apply (subst mult_assoc [symmetric], subst power_add [symmetric])
  132.48 +  apply (subst mult.assoc [symmetric], subst power_add [symmetric])
  132.49    apply (simp add: mult_ac)
  132.50    done
  132.51  
  132.52 @@ -508,7 +508,7 @@
  132.53    have "norm (((z + h) ^ n - z ^ n) / h - of_nat n * z ^ (n - Suc 0)) =
  132.54          norm (\<Sum>p<n - Suc 0. \<Sum>q<n - Suc 0 - p.
  132.55            (z + h) ^ q * z ^ (n - 2 - q)) * norm h"
  132.56 -    by (metis (lifting, no_types) lemma_termdiff2 [OF 1] mult_commute norm_mult)
  132.57 +    by (metis (lifting, no_types) lemma_termdiff2 [OF 1] mult.commute norm_mult)
  132.58    also have "\<dots> \<le> of_nat n * (of_nat (n - Suc 0) * K ^ (n - 2)) * norm h"
  132.59    proof (rule mult_right_mono [OF _ norm_ge_zero])
  132.60      from norm_ge_zero 2 have K: "0 \<le> K"
  132.61 @@ -530,7 +530,7 @@
  132.62        done
  132.63    qed
  132.64    also have "\<dots> = of_nat n * of_nat (n - Suc 0) * K ^ (n - 2) * norm h"
  132.65 -    by (simp only: mult_assoc)
  132.66 +    by (simp only: mult.assoc)
  132.67    finally show ?thesis .
  132.68  qed
  132.69  
  132.70 @@ -638,9 +638,9 @@
  132.71        by (rule order_le_less_trans)
  132.72      show "norm (c n * (((x + h) ^ n - x ^ n) / h - of_nat n * x ^ (n - Suc 0)))
  132.73            \<le> norm (c n) * of_nat n * of_nat (n - Suc 0) * r ^ (n - 2) * norm h"
  132.74 -      apply (simp only: norm_mult mult_assoc)
  132.75 +      apply (simp only: norm_mult mult.assoc)
  132.76        apply (rule mult_left_mono [OF _ norm_ge_zero])
  132.77 -      apply (simp add: mult_assoc [symmetric])
  132.78 +      apply (simp add: mult.assoc [symmetric])
  132.79        apply (metis h lemma_termdiff3 less_eq_real_def r1 xh)
  132.80        done
  132.81    qed
  132.82 @@ -797,7 +797,7 @@
  132.83      also have "\<dots> \<le> ?diff_part + \<bar> (\<Sum>n. ?diff (n + ?N) x) - (\<Sum> n. f' x0 (n + ?N)) \<bar>"
  132.84        unfolding suminf_split_initial_segment[OF all_smbl, where k="?N"]
  132.85        unfolding suminf_diff[OF div_shft_smbl ign[OF `summable (f' x0)`]]
  132.86 -      apply (subst (5) add_commute)
  132.87 +      apply (subst (5) add.commute)
  132.88        by (rule abs_triangle_ineq)
  132.89      also have "\<dots> \<le> ?diff_part + ?L_part + ?f'_part"
  132.90        using abs_triangle_ineq4 by auto
  132.91 @@ -877,7 +877,7 @@
  132.92                unfolding abs_mult[symmetric] by auto
  132.93            qed
  132.94            also have "\<dots> = \<bar>f n * real (Suc n) * R' ^ n\<bar> * \<bar>x - y\<bar>"
  132.95 -            unfolding abs_mult mult_assoc[symmetric] by algebra
  132.96 +            unfolding abs_mult mult.assoc[symmetric] by algebra
  132.97            finally show ?thesis .
  132.98          qed
  132.99        }
 132.100 @@ -900,7 +900,7 @@
 132.101              unfolding real_norm_def abs_mult
 132.102              by (rule mult_right_mono) (auto simp add: le[unfolded mult_1_right])
 132.103          qed (rule powser_insidea[OF converges[OF `R' \<in> {-R <..< R}`] `norm x < norm R'`])
 132.104 -        from this[THEN summable_mult2[where c=x], unfolded mult_assoc, unfolded mult_commute]
 132.105 +        from this[THEN summable_mult2[where c=x], unfolded mult.assoc, unfolded mult.commute]
 132.106          show "summable (?f x)" by auto
 132.107        }
 132.108        show "summable (?f' x0)"
 132.109 @@ -984,7 +984,7 @@
 132.110  
 132.111  lemma exp_fdiffs:
 132.112        "diffs (\<lambda>n. inverse(real (fact n))) = (\<lambda>n. inverse(real (fact n)))"
 132.113 -  by (simp add: diffs_def mult_assoc [symmetric] real_of_nat_def of_nat_mult
 132.114 +  by (simp add: diffs_def mult.assoc [symmetric] real_of_nat_def of_nat_mult
 132.115          del: mult_Suc of_nat_Suc)
 132.116  
 132.117  lemma diffs_of_real: "diffs (\<lambda>n. of_real (f n)) = (\<lambda>n. of_real (diffs f n))"
 132.118 @@ -1132,7 +1132,7 @@
 132.119    by simp
 132.120  
 132.121  lemma exp_real_of_nat_mult: "exp(real n * x) = exp(x) ^ n"
 132.122 -  by (induct n) (auto simp add: real_of_nat_Suc distrib_left exp_add mult_commute)
 132.123 +  by (induct n) (auto simp add: real_of_nat_Suc distrib_left exp_add mult.commute)
 132.124  
 132.125  text {* Strict monotonicity of exponential. *}
 132.126  
 132.127 @@ -1824,7 +1824,7 @@
 132.128    by (simp add: powr_def)
 132.129  
 132.130  lemma powr_powr_swap: "(x powr a) powr b = (x powr b) powr a"
 132.131 -  by (simp add: powr_powr mult_commute)
 132.132 +  by (simp add: powr_powr mult.commute)
 132.133  
 132.134  lemma powr_minus: "x powr (-a) = inverse (x powr a)"
 132.135    by (simp add: powr_def exp_minus [symmetric])
 132.136 @@ -2006,7 +2006,7 @@
 132.137  by(simp add: root_powr_inverse ln_powr)
 132.138  
 132.139  lemma ln_sqrt: "0 < x \<Longrightarrow> ln (sqrt x) = ln x / 2"
 132.140 -  by (simp add: ln_powr powr_numeral ln_powr[symmetric] mult_commute)
 132.141 +  by (simp add: ln_powr powr_numeral ln_powr[symmetric] mult.commute)
 132.142  
 132.143  lemma log_root: "\<lbrakk> n > 0; a > 0 \<rbrakk> \<Longrightarrow> log b (root n a) =  log b a / n"
 132.144  by(simp add: log_def ln_root)
 132.145 @@ -2078,7 +2078,7 @@
 132.146    unfolding powr_def exp_inj_iff by simp
 132.147  
 132.148  lemma ln_powr_bound: "1 <= x ==> 0 < a ==> ln x <= (x powr a) / a"
 132.149 -  by (metis less_eq_real_def ln_less_self mult_imp_le_div_pos ln_powr mult_commute 
 132.150 +  by (metis less_eq_real_def ln_less_self mult_imp_le_div_pos ln_powr mult.commute 
 132.151              order.strict_trans2 powr_gt_zero zero_less_one)
 132.152  
 132.153  lemma ln_powr_bound2:
 132.154 @@ -2339,7 +2339,7 @@
 132.155  qed
 132.156  
 132.157  lemma sin_cos_squared_add2 [simp]: "(cos x)\<^sup>2 + (sin x)\<^sup>2 = 1"
 132.158 -  by (subst add_commute, rule sin_cos_squared_add)
 132.159 +  by (subst add.commute, rule sin_cos_squared_add)
 132.160  
 132.161  lemma sin_cos_squared_add3 [simp]: "cos x * cos x + sin x * sin x = 1"
 132.162    using sin_cos_squared_add2 [unfolded power2_eq_square] .
 132.163 @@ -2422,13 +2422,13 @@
 132.164    using sin_add [of x "- y"] by simp
 132.165  
 132.166  lemma sin_diff2: "sin (x - y) = cos y * sin x - sin y * cos x"
 132.167 -  by (simp add: sin_diff mult_commute)
 132.168 +  by (simp add: sin_diff mult.commute)
 132.169  
 132.170  lemma cos_diff: "cos (x - y) = cos x * cos y + sin x * sin y"
 132.171    using cos_add [of x "- y"] by simp
 132.172  
 132.173  lemma cos_diff2: "cos (x - y) = cos y * cos x + sin y * sin x"
 132.174 -  by (simp add: cos_diff mult_commute)
 132.175 +  by (simp add: cos_diff mult.commute)
 132.176  
 132.177  lemma sin_double [simp]: "sin(2 * x) = 2* sin x * cos x"
 132.178    using sin_add [where x=x and y=x] by simp
 132.179 @@ -2567,7 +2567,7 @@
 132.180      note *** = this
 132.181      have [simp]: "\<And>x y::real. 0 < x - y \<longleftrightarrow> y < x" by arith
 132.182      from ** show ?thesis by (rule sumr_pos_lt_pair)
 132.183 -      (simp add: divide_inverse mult_assoc [symmetric] ***)
 132.184 +      (simp add: divide_inverse mult.assoc [symmetric] ***)
 132.185    qed
 132.186    ultimately have "0 < (\<Sum>n. - (-1 ^ n * 2 ^ (2 * n) / real (fact (2 * n))))"
 132.187      by (rule order_less_trans)
 132.188 @@ -2681,13 +2681,13 @@
 132.189    by (induct n) (auto simp add: real_of_nat_Suc distrib_right)
 132.190  
 132.191  lemma cos_npi2 [simp]: "cos (pi * real n) = -1 ^ n"
 132.192 -  by (metis cos_npi mult_commute)
 132.193 +  by (metis cos_npi mult.commute)
 132.194  
 132.195  lemma sin_npi [simp]: "sin (real (n::nat) * pi) = 0"
 132.196    by (induct n) (auto simp add: real_of_nat_Suc distrib_right)
 132.197  
 132.198  lemma sin_npi2 [simp]: "sin (pi * real (n::nat)) = 0"
 132.199 -  by (simp add: mult_commute [of pi])
 132.200 +  by (simp add: mult.commute [of pi])
 132.201  
 132.202  lemma cos_two_pi [simp]: "cos (2 * pi) = 1"
 132.203    by (simp add: cos_double)
 132.204 @@ -2785,7 +2785,7 @@
 132.205  apply (cut_tac y="-y" in cos_total, simp) apply simp
 132.206  apply (erule ex1E)
 132.207  apply (rule_tac a = "x - (pi/2)" in ex1I)
 132.208 -apply (simp (no_asm) add: add_assoc)
 132.209 +apply (simp (no_asm) add: add.assoc)
 132.210  apply (rotate_tac 3)
 132.211  apply (drule_tac x = "xa + pi/2" in spec, safe, simp_all add: cos_add)
 132.212  done
 132.213 @@ -3023,7 +3023,7 @@
 132.214    apply (auto simp add: divide_inverse)
 132.215    apply (rule mult_pos_pos)
 132.216    apply (subgoal_tac [3] "0 < sin e & 0 < cos e")
 132.217 -  apply (auto intro: cos_gt_zero sin_gt_zero2 simp add: mult_commute)
 132.218 +  apply (auto intro: cos_gt_zero sin_gt_zero2 simp add: mult.commute)
 132.219    done
 132.220  
 132.221  lemma tan_total_pos: "0 \<le> y ==> \<exists>x. 0 \<le> x & x < pi/2 & tan x = y"
 132.222 @@ -3321,7 +3321,7 @@
 132.223    apply (rule_tac c1 = "(cos x)\<^sup>2" in mult_right_cancel [THEN iffD1])
 132.224    apply (auto dest: field_power_not_zero
 132.225            simp add: power_mult_distrib distrib_right power_divide tan_def
 132.226 -                    mult_assoc power_inverse [symmetric])
 132.227 +                    mult.assoc power_inverse [symmetric])
 132.228    done
 132.229  
 132.230  lemma arctan_less_iff: "arctan x < arctan y \<longleftrightarrow> x < y"
 132.231 @@ -3559,11 +3559,11 @@
 132.232      by (auto simp add: algebra_simps sin_add)
 132.233    thus ?thesis
 132.234      by (simp add: real_of_nat_Suc distrib_right add_divide_distrib
 132.235 -                  mult_commute [of pi])
 132.236 +                  mult.commute [of pi])
 132.237  qed
 132.238  
 132.239  lemma cos_2npi [simp]: "cos (2 * real (n::nat) * pi) = 1"
 132.240 -  by (simp add: cos_double mult_assoc power_add [symmetric] numeral_2_eq_2)
 132.241 +  by (simp add: cos_double mult.assoc power_add [symmetric] numeral_2_eq_2)
 132.242  
 132.243  lemma cos_3over2_pi [simp]: "cos (3 / 2 * pi) = 0"
 132.244    apply (subgoal_tac "cos (pi + pi/2) = 0", simp)
 132.245 @@ -3571,7 +3571,7 @@
 132.246    done
 132.247  
 132.248  lemma sin_2npi [simp]: "sin (2 * real (n::nat) * pi) = 0"
 132.249 -  by (auto simp add: mult_assoc)
 132.250 +  by (auto simp add: mult.assoc)
 132.251  
 132.252  lemma sin_3over2_pi [simp]: "sin (3 / 2 * pi) = - 1"
 132.253    apply (subgoal_tac "sin (pi + pi/2) = - 1", simp)
 132.254 @@ -3771,14 +3771,14 @@
 132.255      next
 132.256        fix x :: real
 132.257        assume "(\<lambda> n. if even n then f (n div 2) else 0) sums x"
 132.258 -      from LIMSEQ_linear[OF this[unfolded sums_def] pos2, unfolded sum_split_even_odd[unfolded mult_commute]]
 132.259 +      from LIMSEQ_linear[OF this[unfolded sums_def] pos2, unfolded sum_split_even_odd[unfolded mult.commute]]
 132.260        show "f sums x" unfolding sums_def by auto
 132.261      qed
 132.262      hence "op sums f = op sums (\<lambda> n. if even n then f (n div 2) else 0)" ..
 132.263    } note sums_even = this
 132.264  
 132.265    have Int_eq: "(\<Sum>n. ?f n * real (Suc n) * x^n) = ?Int"
 132.266 -    unfolding if_eq mult_commute[of _ 2] suminf_def sums_even[of "\<lambda> n. -1 ^ n * x ^ (2 * n)", symmetric]
 132.267 +    unfolding if_eq mult.commute[of _ 2] suminf_def sums_even[of "\<lambda> n. -1 ^ n * x ^ (2 * n)", symmetric]
 132.268      by auto
 132.269  
 132.270    {
 132.271 @@ -3858,7 +3858,7 @@
 132.272              hence "(\<lambda> n. (- (x\<^sup>2)) ^ n) sums (1 / (1 - (- (x\<^sup>2))))"
 132.273                unfolding real_norm_def[symmetric] by (rule geometric_sums)
 132.274              hence "(?c' x) sums (1 / (1 - (- (x\<^sup>2))))"
 132.275 -              unfolding power_mult_distrib[symmetric] power_mult nat_mult_commute[of _ 2] by auto
 132.276 +              unfolding power_mult_distrib[symmetric] power_mult mult.commute[of _ 2] by auto
 132.277              hence suminf_c'_eq_geom: "inverse (1 + x\<^sup>2) = suminf (?c' x)"
 132.278                using sums_unique unfolding inverse_eq_divide by auto
 132.279              have "DERIV (\<lambda> x. suminf (?c x)) x :> (inverse (1 + x\<^sup>2))"
   133.1 --- a/src/HOL/Word/Misc_Numeric.thy	Fri Jul 04 20:07:08 2014 +0200
   133.2 +++ b/src/HOL/Word/Misc_Numeric.thy	Fri Jul 04 20:18:47 2014 +0200
   133.3 @@ -25,7 +25,7 @@
   133.4  lemma emep1:
   133.5    fixes n d :: int
   133.6    shows "even n \<Longrightarrow> even d \<Longrightarrow> 0 \<le> d \<Longrightarrow> (n + 1) mod d = (n mod d) + 1"
   133.7 -  by (auto simp add: pos_zmod_mult_2 add_commute even_equiv_def)
   133.8 +  by (auto simp add: pos_zmod_mult_2 add.commute even_equiv_def)
   133.9  
  133.10  lemma int_mod_ge:
  133.11    "a < n \<Longrightarrow> 0 < (n :: int) \<Longrightarrow> a \<le> a mod n"
  133.12 @@ -63,7 +63,7 @@
  133.13  lemma p1mod22k:
  133.14    fixes b :: int
  133.15    shows "(2 * b + 1) mod (2 * 2 ^ n) = 2 * (b mod 2 ^ n) + 1"
  133.16 -  by (simp add: p1mod22k' add_commute)
  133.17 +  by (simp add: p1mod22k' add.commute)
  133.18  
  133.19  lemma int_mod_lem: 
  133.20    "(0 :: int) < n ==> (0 <= b & b < n) = (b mod n = b)"
   134.1 --- a/src/HOL/Word/Word.thy	Fri Jul 04 20:07:08 2014 +0200
   134.2 +++ b/src/HOL/Word/Word.thy	Fri Jul 04 20:18:47 2014 +0200
   134.3 @@ -1753,7 +1753,7 @@
   134.4     prefer 2 
   134.5     apply (insert uint_range' [of s])[1]
   134.6     apply arith
   134.7 -  apply (drule add_commute [THEN xtr1])
   134.8 +  apply (drule add.commute [THEN xtr1])
   134.9    apply (simp add: diff_less_eq [symmetric])
  134.10    apply (drule less_le_mult)
  134.11     apply arith
  134.12 @@ -2161,7 +2161,7 @@
  134.13    "a div b * b \<le> (a::nat)"
  134.14    using gt_or_eq_0 [of b]
  134.15    apply (rule disjE)
  134.16 -   apply (erule xtr4 [OF thd mult_commute])
  134.17 +   apply (erule xtr4 [OF thd mult.commute])
  134.18    apply clarsimp
  134.19    done
  134.20  
  134.21 @@ -2921,7 +2921,7 @@
  134.22    apply (unfold shiftr_def)
  134.23    apply (induct "n")
  134.24     apply simp
  134.25 -  apply (simp add: shiftr1_div_2 mult_commute
  134.26 +  apply (simp add: shiftr1_div_2 mult.commute
  134.27                     zdiv_zmult2_eq [symmetric])
  134.28    done
  134.29  
  134.30 @@ -2929,7 +2929,7 @@
  134.31    apply (unfold sshiftr_def)
  134.32    apply (induct "n")
  134.33     apply simp
  134.34 -  apply (simp add: sshiftr1_div_2 mult_commute
  134.35 +  apply (simp add: sshiftr1_div_2 mult.commute
  134.36                     zdiv_zmult2_eq [symmetric])
  134.37    done
  134.38  
  134.39 @@ -3731,7 +3731,7 @@
  134.40    apply (clarsimp simp: word_ubin.eq_norm nth_bintr word_size split: prod.splits)
  134.41    apply (drule bin_nth_split)
  134.42    apply safe
  134.43 -       apply (simp_all add: add_commute)
  134.44 +       apply (simp_all add: add.commute)
  134.45     apply (erule bin_nth_uint_imp)+
  134.46    done
  134.47  
  134.48 @@ -3895,7 +3895,7 @@
  134.49  
  134.50  lemma foldl_eq_foldr:
  134.51    "foldl op + x xs = foldr op + (x # xs) (0 :: 'a :: comm_monoid_add)" 
  134.52 -  by (induct xs arbitrary: x) (auto simp add : add_assoc)
  134.53 +  by (induct xs arbitrary: x) (auto simp add : add.assoc)
  134.54  
  134.55  lemmas test_bit_cong = arg_cong [where f = "test_bit", THEN fun_cong]
  134.56  
  134.57 @@ -3935,7 +3935,7 @@
  134.58  
  134.59  (* alternative proof of word_rcat_rsplit *)
  134.60  lemmas tdle = iffD2 [OF split_div_lemma refl, THEN conjunct1] 
  134.61 -lemmas dtle = xtr4 [OF tdle mult_commute]
  134.62 +lemmas dtle = xtr4 [OF tdle mult.commute]
  134.63  
  134.64  lemma word_rcat_rsplit: "word_rcat (word_rsplit w) = w"
  134.65    apply (rule word_eqI)
  134.66 @@ -3959,7 +3959,7 @@
  134.67    fixes n::nat
  134.68    shows "0 < n \<Longrightarrow> (k * n + m) div n = m div n + k"
  134.69    and   "(k * n + m) mod n = m mod n"
  134.70 -  by (auto simp: add_commute)
  134.71 +  by (auto simp: add.commute)
  134.72  
  134.73  lemma word_rsplit_rcat_size [OF refl]:
  134.74    "word_rcat (ws :: 'a :: len word list) = frcw \<Longrightarrow> 
   135.1 --- a/src/HOL/Word/WordBitwise.thy	Fri Jul 04 20:07:08 2014 +0200
   135.2 +++ b/src/HOL/Word/WordBitwise.thy	Fri Jul 04 20:18:47 2014 +0200
   135.3 @@ -306,7 +306,7 @@
   135.4  
   135.5    show ?case
   135.6      using Cons
   135.7 -    apply (simp add: trans [OF of_bl_append add_commute]
   135.8 +    apply (simp add: trans [OF of_bl_append add.commute]
   135.9                       rbl_mul_simps rbl_word_plus'
  135.10                       Cons.hyps distrib_right mult_bit
  135.11                       shiftl rbl_shiftl)
   136.1 --- a/src/HOL/Word/Word_Miscellaneous.thy	Fri Jul 04 20:07:08 2014 +0200
   136.2 +++ b/src/HOL/Word/Word_Miscellaneous.thy	Fri Jul 04 20:18:47 2014 +0200
   136.3 @@ -146,14 +146,14 @@
   136.4  
   136.5  lemma emep1:
   136.6    "even n ==> even d ==> 0 <= d ==> (n + 1) mod (d :: int) = (n mod d) + 1"
   136.7 -  apply (simp add: add_commute)
   136.8 +  apply (simp add: add.commute)
   136.9    apply (safe dest!: even_equiv_def [THEN iffD1])
  136.10    apply (subst pos_zmod_mult_2)
  136.11     apply arith
  136.12    apply (simp add: mod_mult_mult1)
  136.13   done
  136.14  
  136.15 -lemmas eme1p = emep1 [simplified add_commute]
  136.16 +lemmas eme1p = emep1 [simplified add.commute]
  136.17  
  136.18  lemma le_diff_eq': "(a \<le> c - b) = (b + a \<le> (c::int))" by arith
  136.19  
  136.20 @@ -187,9 +187,9 @@
  136.21  lemmas iszero_minus = trans [THEN trans,
  136.22    OF iszero_def neg_equal_0_iff_equal iszero_def [symmetric]]
  136.23  
  136.24 -lemmas zadd_diff_inverse = trans [OF diff_add_cancel [symmetric] add_commute]
  136.25 +lemmas zadd_diff_inverse = trans [OF diff_add_cancel [symmetric] add.commute]
  136.26  
  136.27 -lemmas add_diff_cancel2 = add_commute [THEN diff_eq_eq [THEN iffD2]]
  136.28 +lemmas add_diff_cancel2 = add.commute [THEN diff_eq_eq [THEN iffD2]]
  136.29  
  136.30  lemmas rdmods [symmetric] = mod_minus_eq
  136.31    mod_diff_left_eq mod_diff_right_eq mod_add_left_eq
  136.32 @@ -296,13 +296,13 @@
  136.33    "a + b = c + d ==> 
  136.34     a >= c & b <= d | a <= c & b >= (d :: nat)" by arith
  136.35  
  136.36 -lemmas pl_pl_rels' = add_commute [THEN [2] trans, THEN pl_pl_rels]
  136.37 +lemmas pl_pl_rels' = add.commute [THEN [2] trans, THEN pl_pl_rels]
  136.38  
  136.39  lemma minus_eq: "(m - k = m) = (k = 0 | m = (0 :: nat))"  by arith
  136.40  
  136.41  lemma pl_pl_mm: "(a :: nat) + b = c + d ==> a - c = d - b"  by arith
  136.42  
  136.43 -lemmas pl_pl_mm' = add_commute [THEN [2] trans, THEN pl_pl_mm]
  136.44 +lemmas pl_pl_mm' = add.commute [THEN [2] trans, THEN pl_pl_mm]
  136.45  
  136.46  lemmas dme = box_equals [OF div_mod_equality add_0_right add_0_right]
  136.47  lemmas dtle = xtr3 [OF dme [symmetric] le_add1]
  136.48 @@ -341,7 +341,7 @@
  136.49     apply clarsimp
  136.50    apply clarify
  136.51    apply (cases "b > 0")
  136.52 -   apply (drule mult_commute [THEN xtr1])
  136.53 +   apply (drule mult.commute [THEN xtr1])
  136.54     apply (frule (1) td_gal_lt [THEN iffD1])
  136.55     apply (clarsimp simp: le_simps)
  136.56     apply (rule mult_div_cancel [THEN [2] xtr4])
   137.1 --- a/src/HOL/ex/Adhoc_Overloading_Examples.thy	Fri Jul 04 20:07:08 2014 +0200
   137.2 +++ b/src/HOL/ex/Adhoc_Overloading_Examples.thy	Fri Jul 04 20:18:47 2014 +0200
   137.3 @@ -211,7 +211,7 @@
   137.4    apply default
   137.5    unfolding permute_perm_def
   137.6    apply simp
   137.7 -  apply (simp only: diff_conv_add_uminus minus_add add_assoc)
   137.8 +  apply (simp only: diff_conv_add_uminus minus_add add.assoc)
   137.9    done
  137.10  
  137.11  text {*Permuting functions.*}
   138.1 --- a/src/HOL/ex/Dedekind_Real.thy	Fri Jul 04 20:07:08 2014 +0200
   138.2 +++ b/src/HOL/ex/Dedekind_Real.thy	Fri Jul 04 20:18:47 2014 +0200
   138.3 @@ -229,7 +229,7 @@
   138.4  lemma preal_add_commute: "(x::preal) + y = y + x"
   138.5  apply (unfold preal_add_def add_set_def)
   138.6  apply (rule_tac f = Abs_preal in arg_cong)
   138.7 -apply (force simp add: add_commute)
   138.8 +apply (force simp add: add.commute)
   138.9  done
  138.10  
  138.11  text{*Lemmas for proving that addition of two positive reals gives
  138.12 @@ -344,7 +344,7 @@
  138.13  lemma preal_mult_commute: "(x::preal) * y = y * x"
  138.14  apply (unfold preal_mult_def mult_set_def)
  138.15  apply (rule_tac f = Abs_preal in arg_cong)
  138.16 -apply (force simp add: mult_commute)
  138.17 +apply (force simp add: mult.commute)
  138.18  done
  138.19  
  138.20  text{*Multiplication of two positive reals gives a positive real.*}
  138.21 @@ -420,7 +420,7 @@
  138.22      show "\<exists>y'\<in>B. z = (z/y) * y'"
  138.23      proof
  138.24        show "z = (z/y)*y"
  138.25 -        by (simp add: divide_inverse mult_commute [of y] mult_assoc
  138.26 +        by (simp add: divide_inverse mult.commute [of y] mult.assoc
  138.27                        order_less_imp_not_eq2)
  138.28        show "y \<in> B" by fact
  138.29      qed
  138.30 @@ -501,7 +501,7 @@
  138.31          show "\<exists>v'\<in>A. x = (x / v) * v'"
  138.32          proof
  138.33            show "x = (x/v)*v"
  138.34 -            by (simp add: divide_inverse mult_assoc vpos
  138.35 +            by (simp add: divide_inverse mult.assoc vpos
  138.36                            order_less_imp_not_eq2)
  138.37            show "v \<in> A" by fact
  138.38          qed
  138.39 @@ -550,7 +550,7 @@
  138.40    have cpos: "0 < ?c"
  138.41      by (simp add: zero_less_divide_iff zero_less_mult_iff pos_add_strict)
  138.42    show "a * d + b * e = ?c * (d + e)"
  138.43 -    by (simp add: divide_inverse mult_assoc order_less_imp_not_eq2)
  138.44 +    by (simp add: divide_inverse mult.assoc order_less_imp_not_eq2)
  138.45    show "?c \<in> Rep_preal w"
  138.46    proof (cases rule: linorder_le_cases)
  138.47      assume "a \<le> b"
  138.48 @@ -777,7 +777,7 @@
  138.49      qed
  138.50      hence "y < r" by simp
  138.51      with ypos have  dless: "?d < (r * ?d)/y"
  138.52 -      by (simp add: pos_less_divide_eq mult_commute [of ?d]
  138.53 +      by (simp add: pos_less_divide_eq mult.commute [of ?d]
  138.54                      mult_strict_right_mono dpos)
  138.55      have "r + ?d < r*x"
  138.56      proof -
  138.57 @@ -826,10 +826,10 @@
  138.58      show "x/u < x/r" using xpos upos rpos
  138.59        by (simp add: divide_inverse mult_less_cancel_left rless) 
  138.60      show "inverse (x / r) \<notin> Rep_preal R" using notin
  138.61 -      by (simp add: divide_inverse mult_commute) 
  138.62 +      by (simp add: divide_inverse mult.commute) 
  138.63      show "u \<in> Rep_preal R" by (rule u) 
  138.64      show "x = x / u * u" using upos 
  138.65 -      by (simp add: divide_inverse mult_commute) 
  138.66 +      by (simp add: divide_inverse mult.commute) 
  138.67    qed
  138.68  qed
  138.69  
  138.70 @@ -1284,9 +1284,9 @@
  138.71  lemma real_add_congruent2_lemma:
  138.72       "[|a + ba = aa + b; ab + bc = ac + bb|]
  138.73        ==> a + ab + (ba + bc) = aa + ac + (b + (bb::preal))"
  138.74 -apply (simp add: add_assoc)
  138.75 -apply (rule add_left_commute [of ab, THEN ssubst])
  138.76 -apply (simp add: add_assoc [symmetric])
  138.77 +apply (simp add: add.assoc)
  138.78 +apply (rule add.left_commute [of ab, THEN ssubst])
  138.79 +apply (simp add: add.assoc [symmetric])
  138.80  apply (simp add: add_ac)
  138.81  done
  138.82  
  138.83 @@ -1305,7 +1305,7 @@
  138.84  lemma real_minus: "- Abs_Real(realrel``{(x,y)}) = Abs_Real(realrel `` {(y,x)})"
  138.85  proof -
  138.86    have "(\<lambda>(x,y). {Abs_Real (realrel``{(y,x)})}) respects realrel"
  138.87 -    by (auto simp add: congruent_def add_commute) 
  138.88 +    by (auto simp add: congruent_def add.commute) 
  138.89    thus ?thesis
  138.90      by (simp add: real_minus_def UN_equiv_class [OF equiv_realrel])
  138.91  qed
  138.92 @@ -1314,13 +1314,13 @@
  138.93  proof
  138.94    fix x y z :: real
  138.95    show "(x + y) + z = x + (y + z)"
  138.96 -    by (cases x, cases y, cases z, simp add: real_add add_assoc)
  138.97 +    by (cases x, cases y, cases z, simp add: real_add add.assoc)
  138.98    show "x + y = y + x"
  138.99 -    by (cases x, cases y, simp add: real_add add_commute)
 138.100 +    by (cases x, cases y, simp add: real_add add.commute)
 138.101    show "0 + x = x"
 138.102      by (cases x, simp add: real_add real_zero_def add_ac)
 138.103    show "- x + x = 0"
 138.104 -    by (cases x, simp add: real_minus real_add real_zero_def add_commute)
 138.105 +    by (cases x, simp add: real_minus real_add real_zero_def add.commute)
 138.106    show "x - y = x + - y"
 138.107      by (simp add: real_diff_def)
 138.108  qed
 138.109 @@ -1332,9 +1332,9 @@
 138.110       "!!(x1::preal). [| x1 + y2 = x2 + y1 |] ==>
 138.111            x * x1 + y * y1 + (x * y2 + y * x2) =
 138.112            x * x2 + y * y2 + (x * y1 + y * x1)"
 138.113 -apply (simp add: add_left_commute add_assoc [symmetric])
 138.114 -apply (simp add: add_assoc distrib_left [symmetric])
 138.115 -apply (simp add: add_commute)
 138.116 +apply (simp add: add.left_commute add.assoc [symmetric])
 138.117 +apply (simp add: add.assoc distrib_left [symmetric])
 138.118 +apply (simp add: add.commute)
 138.119  done
 138.120  
 138.121  lemma real_mult_congruent2:
 138.122 @@ -1343,7 +1343,7 @@
 138.123            { Abs_Real (realrel``{(x1*x2 + y1*y2, x1*y2+y1*x2)}) }) p2) p1)
 138.124       respects2 realrel"
 138.125  apply (rule congruent2_commuteI [OF equiv_realrel], clarify)
 138.126 -apply (simp add: mult_commute add_commute)
 138.127 +apply (simp add: mult.commute add.commute)
 138.128  apply (auto simp add: real_mult_congruent2_lemma)
 138.129  done
 138.130  
 138.131 @@ -1393,7 +1393,7 @@
 138.132  subsection {* Inverse and Division *}
 138.133  
 138.134  lemma real_zero_iff: "Abs_Real (realrel `` {(x, x)}) = 0"
 138.135 -by (simp add: real_zero_def add_commute)
 138.136 +by (simp add: real_zero_def add.commute)
 138.137  
 138.138  text{*Instead of using an existential quantifier and constructing the inverse
 138.139  within the proof, we could define the inverse explicitly.*}
 138.140 @@ -1416,8 +1416,8 @@
 138.141  apply (drule real_mult_inverse_left_ex, safe)
 138.142  apply (rule theI, assumption, rename_tac z)
 138.143  apply (subgoal_tac "(z * x) * y = z * (x * y)")
 138.144 -apply (simp add: mult_commute)
 138.145 -apply (rule mult_assoc)
 138.146 +apply (simp add: mult.commute)
 138.147 +apply (rule mult.assoc)
 138.148  done
 138.149  
 138.150  
 138.151 @@ -1510,7 +1510,7 @@
 138.152  apply (cases x, cases y) 
 138.153  apply (auto simp add: real_le real_zero_def real_diff_def real_add real_minus
 138.154                        add_ac)
 138.155 -apply (simp_all add: add_assoc [symmetric])
 138.156 +apply (simp_all add: add.assoc [symmetric])
 138.157  done
 138.158  
 138.159  lemma real_add_left_mono: 
 138.160 @@ -1591,7 +1591,7 @@
 138.161  apply (simp add: real_of_preal_def real_zero_def, cases x)
 138.162  apply (auto simp add: real_minus add_ac)
 138.163  apply (cut_tac x = xa and y = y in linorder_less_linear)
 138.164 -apply (auto dest!: less_add_left_Ex simp add: add_assoc [symmetric])
 138.165 +apply (auto dest!: less_add_left_Ex simp add: add.assoc [symmetric])
 138.166  done
 138.167  
 138.168  lemma real_of_preal_leD:
   139.1 --- a/src/HOL/ex/Gauge_Integration.thy	Fri Jul 04 20:07:08 2014 +0200
   139.2 +++ b/src/HOL/ex/Gauge_Integration.thy	Fri Jul 04 20:18:47 2014 +0200
   139.3 @@ -510,9 +510,9 @@
   139.4  next
   139.5    case False
   139.6    then have "inverse (z - x) * (f z - f x - f' x * (z - x)) = (f z - f x) / (z - x) - f' x"
   139.7 -    apply (subst mult_commute)
   139.8 +    apply (subst mult.commute)
   139.9      apply (simp add: left_diff_distrib)
  139.10 -    apply (simp add: mult_assoc divide_inverse)
  139.11 +    apply (simp add: mult.assoc divide_inverse)
  139.12      apply (simp add: ring_distribs)
  139.13      done
  139.14    moreover from False `\<bar>z - x\<bar> < s` have "\<bar>(f z - f x) / (z - x) - f' x\<bar> < e / 2"
   140.1 --- a/src/HOL/ex/ThreeDivides.thy	Fri Jul 04 20:07:08 2014 +0200
   140.2 +++ b/src/HOL/ex/ThreeDivides.thy	Fri Jul 04 20:18:47 2014 +0200
   140.3 @@ -88,7 +88,7 @@
   140.4  lemma three_divs_1:
   140.5    fixes D :: "nat \<Rightarrow> nat"
   140.6    shows "3 dvd (\<Sum>x<nd. D x * (10^x - 1))"
   140.7 -  by (subst nat_mult_commute, rule div_sum) (simp add: three_divs_0 [simplified])
   140.8 +  by (subst mult.commute, rule div_sum) (simp add: three_divs_0 [simplified])
   140.9  
  140.10  text {* Using lemmas @{text "digit_diff_split"} and 
  140.11  @{text "three_divs_1"} we now prove the following lemma.