# HG changeset patch # User nipkow # Date 1537825783 -7200 # Node ID 5ed7206dbf184ff85a9d48de49027e91f4b4b919 # Parent 765ff343a7aa6dfa10fa8c696ec34ff40c2985f0# Parent 5f83db57e8c290d4f4b00cf182bb81fa6e8b1e42 merged diff -r 765ff343a7aa -r 5ed7206dbf18 NEWS --- a/NEWS Mon Sep 24 22:10:24 2018 +0200 +++ b/NEWS Mon Sep 24 23:49:43 2018 +0200 @@ -12,6 +12,9 @@ * Old-style inner comments (* ... *) within the term language are no longer supported (legacy feature in Isabelle2018). +* Infix operators that begin or end with a "*" can now be paranthesized +without additional spaces, eg "(*)" instead of "( * )". + *** Isar *** diff -r 765ff343a7aa -r 5ed7206dbf18 src/Doc/Isar_Ref/Inner_Syntax.thy --- a/src/Doc/Isar_Ref/Inner_Syntax.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/Doc/Isar_Ref/Inner_Syntax.thy Mon Sep 24 23:49:43 2018 +0200 @@ -443,9 +443,7 @@ The alternative notation \<^verbatim>\(\\sy\\<^verbatim>\)\ is introduced in addition. Thus any infix operator may be written in prefix form (as in Haskell), independently of - the number of arguments in the term. To avoid conflict with the comment brackets - \<^verbatim>\(*\ and \<^verbatim>\*)\, infix operators that begin or end with a \<^verbatim>\*\ require - extra spaces, e.g. \<^verbatim>\( * )\. + the number of arguments. \ diff -r 765ff343a7aa -r 5ed7206dbf18 src/Doc/Locales/Examples3.thy --- a/src/Doc/Locales/Examples3.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/Doc/Locales/Examples3.thy Mon Sep 24 23:49:43 2018 +0200 @@ -416,7 +416,7 @@ using non_neg by unfold_locales (rule mult_left_mono) text \While the proof of the previous interpretation - is straightforward from monotonicity lemmas for~@{term "( * )"}, the + is straightforward from monotonicity lemmas for~@{term "(*)"}, the second proof follows a useful pattern.\ sublocale %visible non_negative \ lattice_end "(\)" "\i. n * i" diff -r 765ff343a7aa -r 5ed7206dbf18 src/Doc/Main/Main_Doc.thy --- a/src/Doc/Main/Main_Doc.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/Doc/Main/Main_Doc.thy Mon Sep 24 23:49:43 2018 +0200 @@ -339,7 +339,7 @@ \begin{tabular}{@ {} lllllll @ {}} @{term "(+) :: nat \ nat \ nat"} & @{term "(-) :: nat \ nat \ nat"} & -@{term "( * ) :: nat \ nat \ nat"} & +@{term "(*) :: nat \ nat \ nat"} & @{term "(^) :: nat \ nat \ nat"} & @{term "(div) :: nat \ nat \ nat"}& @{term "(mod) :: nat \ nat \ nat"}& @@ -367,7 +367,7 @@ @{term "(+) :: int \ int \ int"} & @{term "(-) :: int \ int \ int"} & @{term "uminus :: int \ int"} & -@{term "( * ) :: int \ int \ int"} & +@{term "(*) :: int \ int \ int"} & @{term "(^) :: int \ nat \ int"} & @{term "(div) :: int \ int \ int"}& @{term "(mod) :: int \ int \ int"}& diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Algebra/IntRing.thy --- a/src/HOL/Algebra/IntRing.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Algebra/IntRing.thy Mon Sep 24 23:49:43 2018 +0200 @@ -20,7 +20,7 @@ subsection \\\\: The Set of Integers as Algebraic Structure\ abbreviation int_ring :: "int ring" ("\") - where "int_ring \ \carrier = UNIV, mult = ( * ), one = 1, zero = 0, add = (+)\" + where "int_ring \ \carrier = UNIV, mult = (*), one = 1, zero = 0, add = (+)\" lemma int_Zcarr [intro!, simp]: "k \ carrier \" by simp diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Algebra/Sym_Groups.thy --- a/src/HOL/Algebra/Sym_Groups.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Algebra/Sym_Groups.thy Mon Sep 24 23:49:43 2018 +0200 @@ -13,7 +13,7 @@ where "sym_group n = \ carrier = { p. p permutes {1..n} }, mult = (\), one = id \" definition sign_img :: "int monoid" - where "sign_img = \ carrier = { -1, 1 }, mult = ( * ), one = 1 \" + where "sign_img = \ carrier = { -1, 1 }, mult = (*), one = 1 \" lemma sym_group_is_group: "group (sym_group n)" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Algebra/UnivPoly.thy --- a/src/HOL/Algebra/UnivPoly.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Algebra/UnivPoly.thy Mon Sep 24 23:49:43 2018 +0200 @@ -1806,7 +1806,7 @@ definition INTEG :: "int ring" - where "INTEG = \carrier = UNIV, mult = ( * ), one = 1, zero = 0, add = (+)\" + where "INTEG = \carrier = UNIV, mult = (*), one = 1, zero = 0, add = (+)\" lemma INTEG_cring: "cring INTEG" by (unfold INTEG_def) (auto intro!: cringI abelian_groupI comm_monoidI diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Ball_Volume.thy --- a/src/HOL/Analysis/Ball_Volume.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Ball_Volume.thy Mon Sep 24 23:49:43 2018 +0200 @@ -147,7 +147,7 @@ (auto simp: mult_ac ennreal_mult' [symmetric] indicator_def intro!: nn_integral_cong) also have "(\\<^sup>+ (y::real). indicator {-r..r} y * (sqrt (r ^ 2 - y ^ 2)) ^ card A \lborel) = (\\<^sup>+ (y::real). r ^ card A * indicator {-1..1} y * (sqrt (1 - y ^ 2)) ^ card A - \(distr lborel borel (( * ) (1/r))))" using \r > 0\ + \(distr lborel borel ((*) (1/r))))" using \r > 0\ by (subst nn_integral_distr) (auto simp: indicator_def field_simps real_sqrt_divide intro!: nn_integral_cong) also have "\ = (\\<^sup>+ x. ennreal (r ^ Suc (card A)) * diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Bochner_Integration.thy --- a/src/HOL/Analysis/Bochner_Integration.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Bochner_Integration.thy Mon Sep 24 23:49:43 2018 +0200 @@ -1856,7 +1856,7 @@ have sf[measurable]: "\i. simple_function M (s' i)" unfolding s'_def using s(1) - by (intro simple_function_compose2[where h="( *\<^sub>R)"] simple_function_indicator) auto + by (intro simple_function_compose2[where h="(*\<^sub>R)"] simple_function_indicator) auto { fix i have "\z. {y. s' i z = y \ y \ s' i ` space M \ y \ 0 \ z \ space M} = diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Bounded_Linear_Function.thy --- a/src/HOL/Analysis/Bounded_Linear_Function.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Bounded_Linear_Function.thy Mon Sep 24 23:49:43 2018 +0200 @@ -697,7 +697,7 @@ by transfer (rule bounded_bilinear.flip[OF bounded_bilinear_inner]) -lift_definition blinfun_scaleR_right::"real \ 'a \\<^sub>L 'a::real_normed_vector" is "( *\<^sub>R)" +lift_definition blinfun_scaleR_right::"real \ 'a \\<^sub>L 'a::real_normed_vector" is "(*\<^sub>R)" by (rule bounded_linear_scaleR_right) declare blinfun_scaleR_right.rep_eq[simp] @@ -713,7 +713,7 @@ by transfer (rule bounded_bilinear.flip[OF bounded_bilinear_scaleR]) -lift_definition blinfun_mult_right::"'a \ 'a \\<^sub>L 'a::real_normed_algebra" is "( * )" +lift_definition blinfun_mult_right::"'a \ 'a \\<^sub>L 'a::real_normed_algebra" is "(*)" by (rule bounded_linear_mult_right) declare blinfun_mult_right.rep_eq[simp] diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Cartesian_Euclidean_Space.thy --- a/src/HOL/Analysis/Cartesian_Euclidean_Space.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Cartesian_Euclidean_Space.thy Mon Sep 24 23:49:43 2018 +0200 @@ -203,7 +203,7 @@ lemma%important matrix_adjoint: assumes lf: "linear (f :: real^'n \ real ^'m)" shows "matrix(adjoint f) = transpose(matrix f)" proof%unimportant - - have "matrix(adjoint f) = matrix(adjoint (( *v) (matrix f)))" + have "matrix(adjoint f) = matrix(adjoint ((*v) (matrix f)))" by (simp add: lf) also have "\ = transpose(matrix f)" unfolding adjoint_matrix matrix_of_matrix_vector_mul @@ -212,14 +212,14 @@ finally show ?thesis . qed -lemma%unimportant matrix_vector_mul_bounded_linear[intro, simp]: "bounded_linear (( *v) A)" for A :: "'a::{euclidean_space,real_algebra_1}^'n^'m" +lemma%unimportant matrix_vector_mul_bounded_linear[intro, simp]: "bounded_linear ((*v) A)" for A :: "'a::{euclidean_space,real_algebra_1}^'n^'m" using matrix_vector_mul_linear[of A] by (simp add: linear_conv_bounded_linear linear_matrix_vector_mul_eq) lemma%unimportant (* FIX ME needs name*) fixes A :: "'a::{euclidean_space,real_algebra_1}^'n^'m" - shows matrix_vector_mult_linear_continuous_at [continuous_intros]: "isCont (( *v) A) z" - and matrix_vector_mult_linear_continuous_on [continuous_intros]: "continuous_on S (( *v) A)" + shows matrix_vector_mult_linear_continuous_at [continuous_intros]: "isCont ((*v) A) z" + and matrix_vector_mult_linear_continuous_on [continuous_intros]: "continuous_on S ((*v) A)" by (simp_all add: linear_continuous_at linear_continuous_on) lemma%unimportant scalar_invertible: @@ -293,24 +293,24 @@ lemma%important norm_column_le_onorm: fixes A :: "real^'n^'m" - shows "norm(column i A) \ onorm(( *v) A)" + shows "norm(column i A) \ onorm((*v) A)" proof%unimportant - have "norm (\ j. A $ j $ i) \ norm (A *v axis i 1)" by (simp add: matrix_mult_dot cart_eq_inner_axis) - also have "\ \ onorm (( *v) A)" + also have "\ \ onorm ((*v) A)" using onorm [OF matrix_vector_mul_bounded_linear, of A "axis i 1"] by auto - finally have "norm (\ j. A $ j $ i) \ onorm (( *v) A)" . + finally have "norm (\ j. A $ j $ i) \ onorm ((*v) A)" . then show ?thesis unfolding column_def . qed lemma%important matrix_component_le_onorm: fixes A :: "real^'n^'m" - shows "\A $ i $ j\ \ onorm(( *v) A)" + shows "\A $ i $ j\ \ onorm((*v) A)" proof%unimportant - have "\A $ i $ j\ \ norm (\ n. (A $ n $ j))" by (metis (full_types, lifting) component_le_norm_cart vec_lambda_beta) - also have "\ \ onorm (( *v) A)" + also have "\ \ onorm ((*v) A)" by (metis (no_types) column_def norm_column_le_onorm) finally show ?thesis . qed @@ -322,7 +322,7 @@ lemma%important onorm_le_matrix_component_sum: fixes A :: "real^'n^'m" - shows "onorm(( *v) A) \ (\i\UNIV. \j\UNIV. \A $ i $ j\)" + shows "onorm((*v) A) \ (\i\UNIV. \j\UNIV. \A $ i $ j\)" proof%unimportant (rule onorm_le) fix x have "norm (A *v x) \ (\i\UNIV. \(A *v x) $ i\)" @@ -345,7 +345,7 @@ lemma%important onorm_le_matrix_component: fixes A :: "real^'n^'m" assumes "\i j. abs(A$i$j) \ B" - shows "onorm(( *v) A) \ real (CARD('m)) * real (CARD('n)) * B" + shows "onorm((*v) A) \ real (CARD('m)) * real (CARD('n)) * B" proof%unimportant (rule onorm_le) fix x :: "real^'n::_" have "norm (A *v x) \ (\i\UNIV. \(A *v x) $ i\)" @@ -403,13 +403,13 @@ by (auto simp: lambda_skolem Bex_def) show ?thesis proof - have "onorm (( *v) (A - B)) \ real CARD('m) * real CARD('n) * + have "onorm ((*v) (A - B)) \ real CARD('m) * real CARD('n) * (e / (2 * real CARD('m) * real CARD('n)))" apply (rule onorm_le_matrix_component) using Bclo by (simp add: abs_minus_commute less_imp_le) also have "\ < e" using \0 < e\ by (simp add: divide_simps) - finally show "onorm (( *v) (A - B)) < e" . + finally show "onorm ((*v) (A - B)) < e" . qed (use B in auto) qed @@ -778,7 +778,7 @@ where "finite s" "cbox (x - (\ i. d)) (x + (\ i. d)) = convex hull s" proof%unimportant - from assms obtain s where "finite s" - and "cbox (x - sum (( *\<^sub>R) d) Basis) (x + sum (( *\<^sub>R) d) Basis) = convex hull s" + and "cbox (x - sum ((*\<^sub>R) d) Basis) (x + sum ((*\<^sub>R) d) Basis) = convex hull s" by (rule cube_convex_hull) with that[of s] show thesis by (simp add: const_vector_cart) @@ -982,11 +982,11 @@ using basis_exists [of "span(rows A)"] by metis with span_subspace have eq: "span B = span(rows A)" by auto - then have inj: "inj_on (( *v) A) (span B)" + then have inj: "inj_on ((*v) A) (span B)" by (simp add: inj_on_def matrix_vector_mul_injective_on_rowspace) - then have ind: "independent (( *v) A ` B)" + then have ind: "independent ((*v) A ` B)" by (rule linear_independent_injective_image [OF Finite_Cartesian_Product.matrix_vector_mul_linear \independent B\]) - have "dim (span (rows A)) \ card (( *v) A ` B)" + have "dim (span (rows A)) \ card ((*v) A ` B)" unfolding B(2)[symmetric] using inj by (auto simp: card_image inj_on_subset span_superset) @@ -1017,7 +1017,7 @@ lemma%unimportant columns_image_basis: fixes A :: "real^'n^'m" - shows "columns A = ( *v) A ` (range (\i. axis i 1))" + shows "columns A = (*v) A ` (range (\i. axis i 1))" by (force simp: columns_def matrix_vector_mult_basis [symmetric]) lemma%important rank_dim_range: @@ -1025,7 +1025,7 @@ shows "rank A = dim(range (\x. A *v x))" unfolding column_rank_def proof%unimportant (rule span_eq_dim) - have "span (columns A) \ span (range (( *v) A))" (is "?l \ ?r") + have "span (columns A) \ span (range ((*v) A))" (is "?l \ ?r") by (simp add: columns_image_basis image_subsetI span_mono) then show "?l = ?r" by (metis (no_types, lifting) image_subset_iff matrix_vector_mult_in_columnspace @@ -1040,13 +1040,13 @@ lemma%unimportant full_rank_injective: fixes A :: "real^'n^'m" - shows "rank A = CARD('n) \ inj (( *v) A)" + shows "rank A = CARD('n) \ inj ((*v) A)" by (simp add: matrix_left_invertible_injective [symmetric] matrix_left_invertible_span_rows row_rank_def dim_eq_full [symmetric] card_cart_basis vec.dimension_def) lemma%unimportant full_rank_surjective: fixes A :: "real^'n^'m" - shows "rank A = CARD('m) \ surj (( *v) A)" + shows "rank A = CARD('m) \ surj ((*v) A)" by (simp add: matrix_right_invertible_surjective [symmetric] left_invertible_transpose [symmetric] matrix_left_invertible_injective full_rank_injective [symmetric] rank_transpose) @@ -1055,7 +1055,7 @@ lemma%unimportant less_rank_noninjective: fixes A :: "real^'n^'m" - shows "rank A < CARD('n) \ \ inj (( *v) A)" + shows "rank A < CARD('n) \ \ inj ((*v) A)" using less_le rank_bound by (auto simp: full_rank_injective [symmetric]) lemma%unimportant matrix_nonfull_linear_equations_eq: @@ -1071,7 +1071,7 @@ fixes A :: "real^'n^'m" and B :: "real^'p^'n" shows "rank(A ** B) \ rank B" proof%unimportant - - have "rank(A ** B) \ dim (( *v) A ` range (( *v) B))" + have "rank(A ** B) \ dim ((*v) A ` range ((*v) B))" by (auto simp: rank_dim_range image_comp o_def matrix_vector_mul_assoc) also have "\ \ rank B" by (simp add: rank_dim_range dim_image_le) @@ -1137,7 +1137,7 @@ lemma has_derivative_vector_1: assumes der_g: "(g has_derivative (\x. x * g' a)) (at a within S)" - shows "((\x. vec (g (x $ 1))) has_derivative ( *\<^sub>R) (g' a)) + shows "((\x. vec (g (x $ 1))) has_derivative (*\<^sub>R) (g' a)) (at ((vec a)::real^1) within vec ` S)" using der_g apply (auto simp: Deriv.has_derivative_within bounded_linear_scaleR_right norm_vector_1) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Cartesian_Space.thy --- a/src/HOL/Analysis/Cartesian_Space.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Cartesian_Space.thy Mon Sep 24 23:49:43 2018 +0200 @@ -20,7 +20,7 @@ unfolding cart_basis_def Setcompr_eq_image by (rule card_image) (auto simp: inj_on_def axis_eq_axis) -interpretation vec: vector_space "( *s) " +interpretation vec: vector_space "(*s) " by unfold_locales (vector algebra_simps)+ lemma%unimportant independent_cart_basis: @@ -90,11 +90,11 @@ qed (*Some interpretations:*) -interpretation vec: finite_dimensional_vector_space "( *s)" "cart_basis" +interpretation vec: finite_dimensional_vector_space "(*s)" "cart_basis" by (unfold_locales, auto simp add: finite_cart_basis independent_cart_basis span_cart_basis) lemma%unimportant matrix_vector_mul_linear_gen[intro, simp]: - "Vector_Spaces.linear ( *s) ( *s) (( *v) A)" + "Vector_Spaces.linear (*s) (*s) ((*v) A)" by unfold_locales (vector matrix_vector_mult_def sum.distrib algebra_simps)+ @@ -108,10 +108,10 @@ lemma%important linear_componentwise: fixes f:: "'a::field ^'m \ 'a ^ 'n" - assumes lf: "Vector_Spaces.linear ( *s) ( *s) f" + assumes lf: "Vector_Spaces.linear (*s) (*s) f" shows "(f x)$j = sum (\i. (x$i) * (f (axis i 1)$j)) (UNIV :: 'm set)" (is "?lhs = ?rhs") proof%unimportant - - interpret lf: Vector_Spaces.linear "( *s)" "( *s)" f + interpret lf: Vector_Spaces.linear "(*s)" "(*s)" f using lf . let ?M = "(UNIV :: 'm set)" let ?N = "(UNIV :: 'n set)" @@ -123,13 +123,13 @@ unfolding basis_expansion by auto qed -interpretation vec: Vector_Spaces.linear "( *s)" "( *s)" "( *v) A" +interpretation vec: Vector_Spaces.linear "(*s)" "(*s)" "(*v) A" using matrix_vector_mul_linear_gen. -interpretation vec: finite_dimensional_vector_space_pair "( *s)" cart_basis "( *s)" cart_basis .. +interpretation vec: finite_dimensional_vector_space_pair "(*s)" cart_basis "(*s)" cart_basis .. lemma%unimportant matrix_works: - assumes lf: "Vector_Spaces.linear ( *s) ( *s) f" + assumes lf: "Vector_Spaces.linear (*s) (*s) f" shows "matrix f *v x = f (x::'a::field ^ 'n)" apply (simp add: matrix_def matrix_vector_mult_def vec_eq_iff mult.commute) apply clarify @@ -140,8 +140,8 @@ by (simp add: matrix_eq matrix_works) lemma%unimportant matrix_compose_gen: - assumes lf: "Vector_Spaces.linear ( *s) ( *s) (f::'a::{field}^'n \ 'a^'m)" - and lg: "Vector_Spaces.linear ( *s) ( *s) (g::'a^'m \ 'a^_)" + assumes lf: "Vector_Spaces.linear (*s) (*s) (f::'a::{field}^'n \ 'a^'m)" + and lg: "Vector_Spaces.linear (*s) (*s) (g::'a^'m \ 'a^_)" shows "matrix (g o f) = matrix g ** matrix f" using lf lg Vector_Spaces.linear_compose[OF lf lg] matrix_works[OF Vector_Spaces.linear_compose[OF lf lg]] by (simp add: matrix_eq matrix_works matrix_vector_mul_assoc[symmetric] o_def) @@ -161,11 +161,11 @@ by (metis matrix_transpose_mul transpose_mat transpose_transpose) lemma%unimportant linear_matrix_vector_mul_eq: - "Vector_Spaces.linear ( *s) ( *s) f \ linear (f :: real^'n \ real ^'m)" + "Vector_Spaces.linear (*s) (*s) f \ linear (f :: real^'n \ real ^'m)" by (simp add: scalar_mult_eq_scaleR linear_def) lemma%unimportant matrix_vector_mul[simp]: - "Vector_Spaces.linear ( *s) ( *s) g \ (\y. matrix g *v y) = g" + "Vector_Spaces.linear (*s) (*s) g \ (\y. matrix g *v y) = g" "linear f \ (\x. matrix f *v x) = f" "bounded_linear f \ (\x. matrix f *v x) = f" for f :: "real^'n \ real ^'m" @@ -173,20 +173,20 @@ lemma%important matrix_left_invertible_injective: fixes A :: "'a::field^'n^'m" - shows "(\B. B ** A = mat 1) \ inj (( *v) A)" + shows "(\B. B ** A = mat 1) \ inj ((*v) A)" proof%unimportant safe fix B assume B: "B ** A = mat 1" - show "inj (( *v) A)" + show "inj ((*v) A)" unfolding inj_on_def by (metis B matrix_vector_mul_assoc matrix_vector_mul_lid) next - assume "inj (( *v) A)" + assume "inj ((*v) A)" from vec.linear_injective_left_inverse[OF matrix_vector_mul_linear_gen this] - obtain g where "Vector_Spaces.linear ( *s) ( *s) g" and g: "g \ ( *v) A = id" + obtain g where "Vector_Spaces.linear (*s) (*s) g" and g: "g \ (*v) A = id" by blast have "matrix g ** A = mat 1" - by (metis matrix_vector_mul_linear_gen \Vector_Spaces.linear ( *s) ( *s) g\ g matrix_compose_gen + by (metis matrix_vector_mul_linear_gen \Vector_Spaces.linear (*s) (*s) g\ g matrix_compose_gen matrix_eq matrix_id_mat_1 matrix_vector_mul(1)) then show "\B. B ** A = mat 1" by metis @@ -206,11 +206,11 @@ { fix x :: "'a ^ 'm" have "A *v (B *v x) = x" by (simp add: matrix_vector_mul_assoc AB) } - hence "surj (( *v) A)" unfolding surj_def by metis } + hence "surj ((*v) A)" unfolding surj_def by metis } moreover - { assume sf: "surj (( *v) A)" + { assume sf: "surj ((*v) A)" from vec.linear_surjective_right_inverse[OF _ this] - obtain g:: "'a ^'m \ 'a ^'n" where g: "Vector_Spaces.linear ( *s) ( *s) g" "( *v) A \ g = id" + obtain g:: "'a ^'m \ 'a ^'n" where g: "Vector_Spaces.linear (*s) (*s) g" "(*v) A \ g = id" by blast have "A ** (matrix g) = mat 1" @@ -339,11 +339,11 @@ proof%unimportant - { fix A A' :: "'a ^'n^'n" assume AA': "A ** A' = mat 1" - have sA: "surj (( *v) A)" + have sA: "surj ((*v) A)" using AA' matrix_right_invertible_surjective by auto from vec.linear_surjective_isomorphism[OF matrix_vector_mul_linear_gen sA] obtain f' :: "'a ^'n \ 'a ^'n" - where f': "Vector_Spaces.linear ( *s) ( *s) f'" "\x. f' (A *v x) = x" "\x. A *v f' x = x" by blast + where f': "Vector_Spaces.linear (*s) (*s) f'" "\x. f' (A *v x) = x" "\x. A *v f' x = x" by blast have th: "matrix f' ** A = mat 1" by (simp add: matrix_eq matrix_works[OF f'(1)] matrix_vector_mul_assoc[symmetric] f'(2)[rule_format]) @@ -448,13 +448,13 @@ finally show ?thesis . qed -interpretation vector_space_over_itself: vector_space "( *) :: 'a::field => 'a => 'a" +interpretation vector_space_over_itself: vector_space "(*) :: 'a::field => 'a => 'a" by unfold_locales (simp_all add: algebra_simps) lemmas [simp del] = vector_space_over_itself.scale_scale interpretation vector_space_over_itself: finite_dimensional_vector_space - "( *) :: 'a::field => 'a => 'a" "{1}" + "(*) :: 'a::field => 'a => 'a" "{1}" by unfold_locales (auto simp: vector_space_over_itself.span_singleton) lemma dimension_eq_1[code_unfold]: "vector_space_over_itself.dimension TYPE('a::field)= 1" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Cauchy_Integral_Theorem.thy --- a/src/HOL/Analysis/Cauchy_Integral_Theorem.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Cauchy_Integral_Theorem.thy Mon Sep 24 23:49:43 2018 +0200 @@ -228,7 +228,7 @@ lemma continuous_on_joinpaths_D1: "continuous_on {0..1} (g1 +++ g2) \ continuous_on {0..1} g1" - apply (rule continuous_on_eq [of _ "(g1 +++ g2) \ (( *)(inverse 2))"]) + apply (rule continuous_on_eq [of _ "(g1 +++ g2) \ ((*)(inverse 2))"]) apply (rule continuous_intros | simp)+ apply (auto elim!: continuous_on_subset simp: joinpaths_def) done @@ -251,13 +251,13 @@ show ?thesis unfolding piecewise_differentiable_on_def proof (intro exI conjI ballI cont) - show "finite (insert 1 ((( *)2) ` S))" + show "finite (insert 1 (((*)2) ` S))" by (simp add: \finite S\) - show "g1 differentiable at x within {0..1}" if "x \ {0..1} - insert 1 (( *) 2 ` S)" for x + show "g1 differentiable at x within {0..1}" if "x \ {0..1} - insert 1 ((*) 2 ` S)" for x proof (rule_tac d="dist (x/2) (1/2)" in differentiable_transform_within) have "g1 +++ g2 differentiable at (x / 2) within {0..1/2}" by (rule differentiable_subset [OF S [of "x/2"]] | use that in force)+ - then show "g1 +++ g2 \ ( *) (inverse 2) differentiable at x within {0..1}" + then show "g1 +++ g2 \ (*) (inverse 2) differentiable at x within {0..1}" by (auto intro: differentiable_chain_within) qed (use that in \auto simp: joinpaths_def\) qed @@ -598,49 +598,49 @@ and co12: "continuous_on ({0..1} - S) (\x. vector_derivative (g1 +++ g2) (at x))" and g12D: "\x\{0..1} - S. g1 +++ g2 differentiable at x" using assms by (auto simp: piecewise_C1_differentiable_on_def C1_differentiable_on_eq) - have g1D: "g1 differentiable at x" if "x \ {0..1} - insert 1 (( *) 2 ` S)" for x + have g1D: "g1 differentiable at x" if "x \ {0..1} - insert 1 ((*) 2 ` S)" for x proof (rule differentiable_transform_within) - show "g1 +++ g2 \ ( *) (inverse 2) differentiable at x" + show "g1 +++ g2 \ (*) (inverse 2) differentiable at x" using that g12D apply (simp only: joinpaths_def) by (rule differentiable_chain_at derivative_intros | force)+ show "\x'. \dist x' x < dist (x/2) (1/2)\ - \ (g1 +++ g2 \ ( *) (inverse 2)) x' = g1 x'" + \ (g1 +++ g2 \ (*) (inverse 2)) x' = g1 x'" using that by (auto simp: dist_real_def joinpaths_def) qed (use that in \auto simp: dist_real_def\) - have [simp]: "vector_derivative (g1 \ ( *) 2) (at (x/2)) = 2 *\<^sub>R vector_derivative g1 (at x)" - if "x \ {0..1} - insert 1 (( *) 2 ` S)" for x + have [simp]: "vector_derivative (g1 \ (*) 2) (at (x/2)) = 2 *\<^sub>R vector_derivative g1 (at x)" + if "x \ {0..1} - insert 1 ((*) 2 ` S)" for x apply (subst vector_derivative_chain_at) using that apply (rule derivative_eq_intros g1D | simp)+ done have "continuous_on ({0..1/2} - insert (1/2) S) (\x. vector_derivative (g1 +++ g2) (at x))" using co12 by (rule continuous_on_subset) force - then have coDhalf: "continuous_on ({0..1/2} - insert (1/2) S) (\x. vector_derivative (g1 \ ( *)2) (at x))" + then have coDhalf: "continuous_on ({0..1/2} - insert (1/2) S) (\x. vector_derivative (g1 \ (*)2) (at x))" proof (rule continuous_on_eq [OF _ vector_derivative_at]) - show "(g1 +++ g2 has_vector_derivative vector_derivative (g1 \ ( *) 2) (at x)) (at x)" + show "(g1 +++ g2 has_vector_derivative vector_derivative (g1 \ (*) 2) (at x)) (at x)" if "x \ {0..1/2} - insert (1/2) S" for x proof (rule has_vector_derivative_transform_within) - show "(g1 \ ( *) 2 has_vector_derivative vector_derivative (g1 \ ( *) 2) (at x)) (at x)" + show "(g1 \ (*) 2 has_vector_derivative vector_derivative (g1 \ (*) 2) (at x)) (at x)" using that by (force intro: g1D differentiable_chain_at simp: vector_derivative_works [symmetric]) - show "\x'. \dist x' x < dist x (1/2)\ \ (g1 \ ( *) 2) x' = (g1 +++ g2) x'" + show "\x'. \dist x' x < dist x (1/2)\ \ (g1 \ (*) 2) x' = (g1 +++ g2) x'" using that by (auto simp: dist_norm joinpaths_def) qed (use that in \auto simp: dist_norm\) qed - have "continuous_on ({0..1} - insert 1 (( *) 2 ` S)) - ((\x. 1/2 * vector_derivative (g1 \ ( *)2) (at x)) \ ( *)(1/2))" + have "continuous_on ({0..1} - insert 1 ((*) 2 ` S)) + ((\x. 1/2 * vector_derivative (g1 \ (*)2) (at x)) \ (*)(1/2))" apply (rule continuous_intros)+ using coDhalf apply (simp add: scaleR_conv_of_real image_set_diff image_image) done - then have con_g1: "continuous_on ({0..1} - insert 1 (( *) 2 ` S)) (\x. vector_derivative g1 (at x))" + then have con_g1: "continuous_on ({0..1} - insert 1 ((*) 2 ` S)) (\x. vector_derivative g1 (at x))" by (rule continuous_on_eq) (simp add: scaleR_conv_of_real) have "continuous_on {0..1} g1" using continuous_on_joinpaths_D1 assms piecewise_C1_differentiable_on_def by blast with \finite S\ show ?thesis apply (clarsimp simp add: piecewise_C1_differentiable_on_def C1_differentiable_on_eq) - apply (rule_tac x="insert 1 ((( *)2)`S)" in exI) + apply (rule_tac x="insert 1 (((*)2)`S)" in exI) apply (simp add: g1D con_g1) done qed @@ -959,7 +959,7 @@ apply (rule piecewise_C1_differentiable_compose) using assms apply (auto simp: valid_path_def piecewise_C1_differentiable_on_def continuous_on_joinpaths) - apply (force intro: finite_vimageI [where h = "( *)2"] inj_onI) + apply (force intro: finite_vimageI [where h = "(*)2"] inj_onI) done moreover have "(g2 \ (\x. 2*x-1)) piecewise_C1_differentiable_on {1/2..1}" apply (rule piecewise_C1_differentiable_compose) @@ -1030,9 +1030,9 @@ apply (auto simp: algebra_simps vector_derivative_works) done have "((\x. f ((g1 +++ g2) x) * vector_derivative (g1 +++ g2) (at x)) has_integral i1) {0..1/2}" - apply (rule has_integral_spike_finite [OF _ _ i1, of "insert (1/2) (( *)2 -` s1)"]) + apply (rule has_integral_spike_finite [OF _ _ i1, of "insert (1/2) ((*)2 -` s1)"]) using s1 - apply (force intro: finite_vimageI [where h = "( *)2"] inj_onI) + apply (force intro: finite_vimageI [where h = "(*)2"] inj_onI) apply (clarsimp simp add: joinpaths_def scaleR_conv_of_real mult_ac g1) done moreover have "((\x. f ((g1 +++ g2) x) * vector_derivative (g1 +++ g2) (at x)) has_integral i2) {1/2..1}" @@ -1608,7 +1608,7 @@ by (simp add: has_vector_derivative_def scaleR_conv_of_real) have "(f has_field_derivative (f' (g x))) (at (g x) within g ` {a..b})" using assms by (metis a atLeastAtMost_iff b DERIV_subset image_subset_iff less_eq_real_def) - then have fdiff: "(f has_derivative ( *) (f' (g x))) (at (g x) within g ` {a..b})" + then have fdiff: "(f has_derivative (*) (f' (g x))) (at (g x) within g ` {a..b})" by (simp add: has_field_derivative_def) have "((\x. f (g x)) has_vector_derivative f' (g x) * vector_derivative g (at x within {a..b})) (at x within {a..b})" using diff_chain_within [OF gdiff fdiff] @@ -6158,9 +6158,9 @@ case 0 then show ?case by simp next case (Suc n z) - have holo0: "f holomorphic_on ( *) u ` S" + have holo0: "f holomorphic_on (*) u ` S" by (meson fg f holomorphic_on_subset image_subset_iff) - have holo2: "(deriv ^^ n) f holomorphic_on ( * ) u ` S" + have holo2: "(deriv ^^ n) f holomorphic_on (*) u ` S" by (meson f fg holomorphic_higher_deriv holomorphic_on_subset image_subset_iff T) have holo3: "(\z. u ^ n * (deriv ^^ n) f (u * z)) holomorphic_on S" by (intro holo2 holomorphic_on_compose [where g="(deriv ^^ n) f", unfolded o_def] holomorphic_intros) @@ -6182,7 +6182,7 @@ apply (blast intro: fg) done also have "\ = u * u ^ n * deriv ((deriv ^^ n) f) (u * z)" - apply (subst complex_derivative_chain [where g = "(deriv ^^ n) f" and f = "( *) u", unfolded o_def]) + apply (subst complex_derivative_chain [where g = "(deriv ^^ n) f" and f = "(*) u", unfolded o_def]) apply (rule derivative_intros) using Suc.prems field_differentiable_def f fg has_field_derivative_higher_deriv T apply blast apply (simp add: deriv_linear) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Change_Of_Vars.thy --- a/src/HOL/Analysis/Change_Of_Vars.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Change_Of_Vars.thy Mon Sep 24 23:49:43 2018 +0200 @@ -186,7 +186,7 @@ qed lemma%unimportant matrix_vector_mult_matrix_matrix_mult_compose: - "( *v) (A ** B) = ( *v) A \ ( *v) B" + "(*v) (A ** B) = (*v) A \ (*v) B" by (auto simp: matrix_vector_mul_assoc) lemma%unimportant induct_linear_elementary: @@ -199,17 +199,17 @@ and idplus: "\m n::'n. m \ n \ P(\x. \ i. if i = m then x$m + x$n else x$i)" shows "P f" proof - - have "P (( *v) A)" for A + have "P ((*v) A)" for A proof (rule induct_matrix_elementary_alt) fix A B - assume "P (( *v) A)" and "P (( *v) B)" - then show "P (( *v) (A ** B))" + assume "P ((*v) A)" and "P ((*v) B)" + then show "P ((*v) (A ** B))" by (auto simp add: matrix_vector_mult_matrix_matrix_mult_compose matrix_vector_mul_linear intro!: comp) next fix A :: "real^'n^'n" and i assume "row i A = 0" - show "P (( *v) A)" + show "P ((*v) A)" using matrix_vector_mul_linear by (rule zeroes[where i=i]) (metis \row i A = 0\ inner_zero_left matrix_vector_mul_component row_def vec_lambda_eta) @@ -218,9 +218,9 @@ assume 0: "\i j. i \ j \ A $ i $ j = 0" have "A $ i $ i * x $ i = (\j\UNIV. A $ i $ j * x $ j)" for x and i :: "'n" by (simp add: 0 comm_monoid_add_class.sum.remove [where x=i]) - then have "(\x. \ i. A $ i $ i * x $ i) = (( *v) A)" + then have "(\x. \ i. A $ i $ i * x $ i) = ((*v) A)" by (auto simp: 0 matrix_vector_mult_def) - then show "P (( *v) A)" + then show "P ((*v) A)" using const [of "\i. A $ i $ i"] by simp next fix m n :: "'n" @@ -229,9 +229,9 @@ (\j\UNIV. if j = Fun.swap m n id i then x $ j else 0)" for i and x :: "real^'n" unfolding swap_def by (rule sum.cong) auto - have "(\x::real^'n. \ i. x $ Fun.swap m n id i) = (( *v) (\ i j. if i = Fun.swap m n id j then 1 else 0))" + have "(\x::real^'n. \ i. x $ Fun.swap m n id i) = ((*v) (\ i j. if i = Fun.swap m n id j then 1 else 0))" by (auto simp: mat_def matrix_vector_mult_def eq if_distrib [of "\x. x * y" for y] cong: if_cong) - with swap [OF \m \ n\] show "P (( *v) (\ i j. mat 1 $ i $ Fun.swap m n id j))" + with swap [OF \m \ n\] show "P ((*v) (\ i j. mat 1 $ i $ Fun.swap m n id j))" by (simp add: mat_def matrix_vector_mult_def) next fix m n :: "'n" @@ -239,10 +239,10 @@ then have "x $ m + x $ n = (\j\UNIV. of_bool (j = n \ m = j) * x $ j)" for x :: "real^'n" by (auto simp: of_bool_def if_distrib [of "\x. x * y" for y] sum.remove cong: if_cong) then have "(\x::real^'n. \ i. if i = m then x $ m + x $ n else x $ i) = - (( *v) (\ i j. of_bool (i = m \ j = n \ i = j)))" + ((*v) (\ i j. of_bool (i = m \ j = n \ i = j)))" unfolding matrix_vector_mult_def of_bool_def by (auto simp: vec_eq_iff if_distrib [of "\x. x * y" for y] cong: if_cong) - then show "P (( *v) (\ i j. of_bool (i = m \ j = n \ i = j)))" + then show "P ((*v) (\ i j. of_bool (i = m \ j = n \ i = j)))" using idplus [OF \m \ n\] by simp qed then show ?thesis @@ -1496,21 +1496,21 @@ \ sum ?h {k \ \. \k\ \ 2 ^ (2*n)}" by (rule sum_mono) (simp add: indicator_def divide_simps) next - have \: "?a = (\k \ ( *)2 ` {k \ \. \k\ \ 2 ^ (2*n)}. + have \: "?a = (\k \ (*)2 ` {k \ \. \k\ \ 2 ^ (2*n)}. k/2 ^ Suc n * indicator {y. k/2 ^ Suc n \ f y \ f y < (k+1)/2 ^ Suc n} x)" by (auto simp: inj_on_def field_simps comm_monoid_add_class.sum.reindex) have \: "sum ?h {k \ \. \k\ \ 2 ^ (2*n)} = (\k \ (\x. 2*x + 1) ` {k \ \. \k\ \ 2 ^ (2*n)}. k/2 ^ Suc n * indicator {y. k/2 ^ Suc n \ f y \ f y < (k+1)/2 ^ Suc n} x)" by (auto simp: inj_on_def field_simps comm_monoid_add_class.sum.reindex) - have 0: "( *) 2 ` {k \ \. P k} \ (\x. 2 * x + 1) ` {k \ \. P k} = {}" for P :: "real \ bool" + have 0: "(*) 2 ` {k \ \. P k} \ (\x. 2 * x + 1) ` {k \ \. P k} = {}" for P :: "real \ bool" proof - have "2 * i \ 2 * j + 1" for i j :: int by arith thus ?thesis unfolding Ints_def by auto (use of_int_eq_iff in fastforce) qed have "?a + sum ?h {k \ \. \k\ \ 2 ^ (2*n)} - = (\k \ ( *)2 ` {k \ \. \k\ \ 2 ^ (2*n)} \ (\x. 2*x + 1) ` {k \ \. \k\ \ 2 ^ (2*n)}. + = (\k \ (*)2 ` {k \ \. \k\ \ 2 ^ (2*n)} \ (\x. 2*x + 1) ` {k \ \. \k\ \ 2 ^ (2*n)}. k/2 ^ Suc n * indicator {y. k/2 ^ Suc n \ f y \ f y < (k+1)/2 ^ Suc n} x)" unfolding \ \ using finite_abs_int_segment [of "2 ^ (2*n)"] @@ -1519,7 +1519,7 @@ proof (rule sum_mono2) show "finite {k::real. k \ \ \ \k\ \ 2 ^ (2 * Suc n)}" by (rule finite_abs_int_segment) - show "( *) 2 ` {k::real. k \ \ \ \k\ \ 2^(2*n)} \ (\x. 2*x + 1) ` {k \ \. \k\ \ 2^(2*n)} \ {k \ \. \k\ \ 2 ^ (2 * Suc n)}" + show "(*) 2 ` {k::real. k \ \ \ \k\ \ 2^(2*n)} \ (\x. 2*x + 1) ` {k \ \. \k\ \ 2^(2*n)} \ {k \ \. \k\ \ 2 ^ (2 * Suc n)}" apply auto using one_le_power [of "2::real" "2*n"] by linarith have *: "\x \ (S \ T) - U; \x. x \ S \ x \ U; \x. x \ T \ x \ U\ \ P x" for S T U P @@ -1535,7 +1535,7 @@ qed then show "0 \ b/2 ^ Suc n * indicator {y. b/2 ^ Suc n \ f y \ f y < (b + 1)/2 ^ Suc n} x" if "b \ {k \ \. \k\ \ 2 ^ (2 * Suc n)} - - (( *) 2 ` {k \ \. \k\ \ 2 ^ (2*n)} \ (\x. 2*x + 1) ` {k \ \. \k\ \ 2 ^ (2*n)})" for b + ((*) 2 ` {k \ \. \k\ \ 2 ^ (2*n)} \ (\x. 2*x + 1) ` {k \ \. \k\ \ 2 ^ (2*n)})" for b using that by (simp add: indicator_def divide_simps) qed finally show "?a + sum ?h {k \ \. \k\ \ 2 ^ (2*n)} \ ?b" . @@ -2121,8 +2121,8 @@ moreover interpret linear "f' x" by fact have "(matrix (f' x) - B) *v w = 0" for w - proof (rule lemma_partial_derivatives [of "( *v) (matrix (f' x) - B)"]) - show "linear (( *v) (matrix (f' x) - B))" + proof (rule lemma_partial_derivatives [of "(*v) (matrix (f' x) - B)"]) + show "linear ((*v) (matrix (f' x) - B))" by (rule matrix_vector_mul_linear) have "((\y. ((f x + f' x (y - x)) - f y) /\<^sub>R norm (y - x)) \ 0) (at x within S)" using tendsto_minus [OF lim_df] by (simp add: algebra_simps divide_simps) @@ -2141,19 +2141,19 @@ proof (rule eventually_sequentiallyI) fix k :: "nat" assume "0 \ k" - have "0 \ onorm (( *v) (A k - B))" + have "0 \ onorm ((*v) (A k - B))" using matrix_vector_mul_bounded_linear by (rule onorm_pos_le) - then show "norm (onorm (( *v) (A k - B))) \ (\i\UNIV. \j\UNIV. \(A k - B) $ i $ j\)" + then show "norm (onorm ((*v) (A k - B))) \ (\i\UNIV. \j\UNIV. \(A k - B) $ i $ j\)" by (simp add: onorm_le_matrix_component_sum del: vector_minus_component) qed next show "?g \ 0" using B Lim_null tendsto_rabs_zero_iff by (fastforce intro!: tendsto_null_sum) qed - with \e > 0\ obtain p where "\n. n \ p \ \onorm (( *v) (A n - B))\ < e/2" + with \e > 0\ obtain p where "\n. n \ p \ \onorm ((*v) (A n - B))\ < e/2" unfolding lim_sequentially by (metis diff_zero dist_real_def divide_pos_pos zero_less_numeral) - then have pqe2: "\onorm (( *v) (A (p + q) - B))\ < e/2" (*17 [`abs (onorm (\y. A (p + q) ** y - B ** y)) < e / &2`]*) + then have pqe2: "\onorm ((*v) (A (p + q) - B))\ < e/2" (*17 [`abs (onorm (\y. A (p + q) ** y - B ** y)) < e / &2`]*) using le_add1 by blast show "\d>0. \y\S. y \ x \ norm (y - x) < d \ inverse (norm (y - x)) * norm (f y + B *v x - (f x + B *v y)) < e" @@ -2196,12 +2196,12 @@ by (simp add: algebra_simps diff lin_df matrix_vector_mul_linear scalar_mult_eq_scaleR) qed qed (use x in \simp; auto simp: not_less\) - ultimately have "f' x = ( *v) B" + ultimately have "f' x = (*v) B" by (force simp: algebra_simps scalar_mult_eq_scaleR) show "matrix (f' x) $ m $ n \ b" proof (rule tendsto_upperbound [of "\i. (A i $ m $ n)" _ sequentially]) show "(\i. A i $ m $ n) \ matrix (f' x) $ m $ n" - by (simp add: B \f' x = ( *v) B\) + by (simp add: B \f' x = (*v) B\) show "\\<^sub>F i in sequentially. A i $ m $ n \ b" by (simp add: Ab less_eq_real_def) qed auto @@ -2214,7 +2214,7 @@ using f [OF \x \ S\] unfolding Deriv.has_derivative_at_within Lim_within by (auto simp: field_simps dest: spec [of _ "e/2"]) let ?A = "matrix(f' x) - (\ i j. if i = m \ j = n then e / 4 else 0)" - obtain B where BRats: "\i j. B$i$j \ \" and Bo_e6: "onorm(( *v) (?A - B)) < e/6" + obtain B where BRats: "\i j. B$i$j \ \" and Bo_e6: "onorm((*v) (?A - B)) < e/6" using matrix_rational_approximation \e > 0\ by (metis zero_less_divide_iff zero_less_numeral) show "\d>0. \A. A $ m $ n < b \ (\i j. A $ i $ j \ \) \ @@ -2224,7 +2224,7 @@ by (rule \d>0\) show "B $ m $ n < b" proof - - have "\matrix (( *v) (?A - B)) $ m $ n\ \ onorm (( *v) (?A - B))" + have "\matrix ((*v) (?A - B)) $ m $ n\ \ onorm ((*v) (?A - B))" using component_le_onorm [OF matrix_vector_mul_linear, of _ m n] by metis then show ?thesis using b Bo_e6 by simp @@ -3805,12 +3805,12 @@ let ?drop = "(\x::real^1. x $ 1)" have S': "?lift ` S \ sets lebesgue" by (auto intro: differentiable_image_in_sets_lebesgue [OF S] differentiable_vec) - have "((\x. vec (g (x $ 1))) has_derivative ( *\<^sub>R) (g' z)) (at (vec z) within ?lift ` S)" + have "((\x. vec (g (x $ 1))) has_derivative (*\<^sub>R) (g' z)) (at (vec z) within ?lift ` S)" if "z \ S" for z using der_g [OF that] by (simp add: has_vector_derivative_def has_derivative_vector_1) then have der': "\x. x \ ?lift ` S \ - (?lift \ g \ ?drop has_derivative ( *\<^sub>R) (g' (?drop x))) (at x within ?lift ` S)" + (?lift \ g \ ?drop has_derivative (*\<^sub>R) (g' (?drop x))) (at x within ?lift ` S)" by (auto simp: o_def) have inj': "inj_on (vec \ g \ ?drop) (vec ` S)" using inj by (simp add: inj_on_def) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Complex_Analysis_Basics.thy --- a/src/HOL/Analysis/Complex_Analysis_Basics.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Complex_Analysis_Basics.thy Mon Sep 24 23:49:43 2018 +0200 @@ -16,7 +16,7 @@ lemma has_derivative_mult_right: fixes c:: "'a :: real_normed_algebra" - shows "((( * ) c) has_derivative (( * ) c)) F" + shows "(((*) c) has_derivative ((*) c)) F" by (rule has_derivative_mult_right [OF has_derivative_ident]) lemma has_derivative_of_real[derivative_intros, simp]: @@ -25,7 +25,7 @@ lemma has_vector_derivative_real_field: "DERIV f (of_real a) :> f' \ ((\x. f (of_real x)) has_vector_derivative f') (at a within s)" - using has_derivative_compose[of of_real of_real a _ f "( * ) f'"] + using has_derivative_compose[of of_real of_real a _ f "(*) f'"] by (simp add: scaleR_conv_of_real ac_simps has_vector_derivative_def has_field_derivative_def) lemmas has_vector_derivative_real_complex = has_vector_derivative_real_field @@ -59,10 +59,10 @@ shows "vector_derivative (\z. cnj (f z)) (at x) = cnj (vector_derivative f (at x))" using assms by (intro vector_derivative_cnj_within) auto -lemma lambda_zero: "(\h::'a::mult_zero. 0) = ( * ) 0" +lemma lambda_zero: "(\h::'a::mult_zero. 0) = (*) 0" by auto -lemma lambda_one: "(\x::'a::monoid_mult. x) = ( * ) 1" +lemma lambda_one: "(\x::'a::monoid_mult. x) = (*) 1" by auto lemma uniformly_continuous_on_cmul_right [continuous_intros]: @@ -283,7 +283,7 @@ lemma holomorphic_cong: "s = t ==> (\x. x \ s \ f x = g x) \ f holomorphic_on s \ g holomorphic_on t" by (metis holomorphic_transform) -lemma holomorphic_on_linear [simp, holomorphic_intros]: "(( * ) c) holomorphic_on s" +lemma holomorphic_on_linear [simp, holomorphic_intros]: "((*) c) holomorphic_on s" unfolding holomorphic_on_def by (metis field_differentiable_linear) lemma holomorphic_on_const [simp, holomorphic_intros]: "(\z. c) holomorphic_on s" @@ -572,7 +572,7 @@ finally show ?thesis . qed -lemma analytic_on_linear [analytic_intros,simp]: "(( * ) c) analytic_on S" +lemma analytic_on_linear [analytic_intros,simp]: "((*) c) analytic_on S" by (auto simp add: analytic_on_holomorphic) lemma analytic_on_const [analytic_intros,simp]: "(\z. c) analytic_on S" @@ -905,9 +905,9 @@ by (intro has_field_derivative_series[of S f f' g' x0] assms A has_field_derivative_at_within) then obtain g where g: "\x. x \ S \ (\n. f n x) sums g x" "\x. x \ S \ (g has_field_derivative g' x) (at x within S)" by blast - from g(2)[OF x] have g': "(g has_derivative ( * ) (g' x)) (at x)" + from g(2)[OF x] have g': "(g has_derivative (*) (g' x)) (at x)" by (simp add: has_field_derivative_def S) - have "((\x. \n. f n x) has_derivative ( * ) (g' x)) (at x)" + have "((\x. \n. f n x) has_derivative (*) (g' x)) (at x)" by (rule has_derivative_transform_within_open[OF g' \open S\ x]) (insert g, auto simp: sums_iff) thus "(\x. \n. f n x) field_differentiable (at x)" unfolding differentiable_def diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Conformal_Mappings.thy --- a/src/HOL/Analysis/Conformal_Mappings.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Conformal_Mappings.thy Mon Sep 24 23:49:43 2018 +0200 @@ -1133,10 +1133,10 @@ done with \e>0\ show ?thesis by force qed - have "inj (( * ) (deriv f \))" + have "inj ((*) (deriv f \))" using dnz by simp - then obtain g' where g': "linear g'" "g' \ ( * ) (deriv f \) = id" - using linear_injective_left_inverse [of "( * ) (deriv f \)"] + then obtain g' where g': "linear g'" "g' \ (*) (deriv f \) = id" + using linear_injective_left_inverse [of "(*) (deriv f \)"] by (auto simp: linear_times) show ?thesis apply (rule has_derivative_locally_injective [OF S, where f=f and f' = "\z h. deriv f z * h" and g' = g']) @@ -2083,10 +2083,10 @@ apply (simp add: C_def False fo) apply (simp add: derivative_intros dfa complex_derivative_chain) done - have sb1: "( * ) (C * r) ` (\z. f (a + of_real r * z) / (C * r)) ` ball 0 1 + have sb1: "(*) (C * r) ` (\z. f (a + of_real r * z) / (C * r)) ` ball 0 1 \ f ` ball a r" using \0 < r\ by (auto simp: dist_norm norm_mult C_def False) - have sb2: "ball (C * r * b) r' \ ( * ) (C * r) ` ball b t" + have sb2: "ball (C * r * b) r' \ (*) (C * r) ` ball b t" if "1 / 12 < t" for b t proof - have *: "r * cmod (deriv f a) / 12 \ r * (t * cmod (deriv f a))" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Connected.thy --- a/src/HOL/Analysis/Connected.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Connected.thy Mon Sep 24 23:49:43 2018 +0200 @@ -2257,14 +2257,14 @@ unfolding dist_norm using norm_scaleR[of c "(1 / c) *\<^sub>R y - x", unfolded scaleR_right_diff_distrib, unfolded scaleR_scaleR] assms(1) assms(1)[unfolded zero_less_abs_iff[symmetric]] by (simp del:zero_less_abs_iff) - then have "y \ ( *\<^sub>R) c ` s" - using rev_image_eqI[of "(1 / c) *\<^sub>R y" s y "( *\<^sub>R) c"] + then have "y \ (*\<^sub>R) c ` s" + using rev_image_eqI[of "(1 / c) *\<^sub>R y" s y "(*\<^sub>R) c"] using e[THEN spec[where x="(1 / c) *\<^sub>R y"]] using assms(1) unfolding dist_norm scaleR_scaleR by auto } - ultimately have "\e>0. \x'. dist x' (c *\<^sub>R x) < e \ x' \ ( *\<^sub>R) c ` s" + ultimately have "\e>0. \x'. dist x' (c *\<^sub>R x) < e \ x' \ (*\<^sub>R) c ` s" apply (rule_tac x="e * \c\" in exI, auto) done } @@ -2311,10 +2311,10 @@ proof - have *: "(\x. a + c *\<^sub>R x) = (\x. a + x) \ (\x. c *\<^sub>R x)" unfolding o_def .. - have "(+) a ` ( *\<^sub>R) c ` S = ((+) a \ ( *\<^sub>R) c) ` S" + have "(+) a ` (*\<^sub>R) c ` S = ((+) a \ (*\<^sub>R) c) ` S" by auto then show ?thesis - using assms open_translation[of "( *\<^sub>R) c ` S" a] + using assms open_translation[of "(*\<^sub>R) c ` S" a] unfolding * by auto qed @@ -2637,7 +2637,7 @@ assumes "compact s" shows "compact ((\x. a + c *\<^sub>R x) ` s)" proof - - have "(+) a ` ( *\<^sub>R) c ` s = (\x. a + c *\<^sub>R x) ` s" + have "(+) a ` (*\<^sub>R) c ` s = (\x. a + c *\<^sub>R x) ` s" by auto then show ?thesis using compact_translation[OF compact_scaling[OF assms], of a c] by auto @@ -3719,7 +3719,7 @@ assumes "c \ 0" shows "s homeomorphic ((\x. a + c *\<^sub>R x) ` s)" proof - - have *: "(+) a ` ( *\<^sub>R) c ` s = (\x. a + c *\<^sub>R x) ` s" by auto + have *: "(+) a ` (*\<^sub>R) c ` s = (\x. a + c *\<^sub>R x) ` s" by auto show ?thesis using homeomorphic_trans using homeomorphic_scaling[OF assms, of s] diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Convex_Euclidean_Space.thy --- a/src/HOL/Analysis/Convex_Euclidean_Space.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Convex_Euclidean_Space.thy Mon Sep 24 23:49:43 2018 +0200 @@ -664,7 +664,7 @@ assumes "convex S" shows "convex ((\x. a + c *\<^sub>R x) ` S)" proof - - have "(\x. a + c *\<^sub>R x) ` S = (+) a ` ( *\<^sub>R) c ` S" + have "(\x. a + c *\<^sub>R x) ` S = (+) a ` (*\<^sub>R) c ` S" by auto then show ?thesis using convex_translation[OF convex_scaling[OF assms], of a c] by auto @@ -1229,12 +1229,12 @@ lemma closure_scaleR: fixes S :: "'a::real_normed_vector set" - shows "(( *\<^sub>R) c) ` (closure S) = closure ((( *\<^sub>R) c) ` S)" + shows "((*\<^sub>R) c) ` (closure S) = closure (((*\<^sub>R) c) ` S)" proof - show "(( *\<^sub>R) c) ` (closure S) \ closure ((( *\<^sub>R) c) ` S)" + show "((*\<^sub>R) c) ` (closure S) \ closure (((*\<^sub>R) c) ` S)" using bounded_linear_scaleR_right by (rule closure_bounded_linear_image_subset) - show "closure ((( *\<^sub>R) c) ` S) \ (( *\<^sub>R) c) ` (closure S)" + show "closure (((*\<^sub>R) c) ` S) \ ((*\<^sub>R) c) ` (closure S)" by (intro closure_minimal image_mono closure_subset closed_scaling closed_closure) qed @@ -1945,7 +1945,7 @@ lemma cone_iff: assumes "S \ {}" - shows "cone S \ 0 \ S \ (\c. c > 0 \ (( *\<^sub>R) c) ` S = S)" + shows "cone S \ 0 \ S \ (\c. c > 0 \ ((*\<^sub>R) c) ` S = S)" proof - { assume "cone S" @@ -1955,7 +1955,7 @@ { fix x assume "x \ S" - then have "x \ (( *\<^sub>R) c) ` S" + then have "x \ ((*\<^sub>R) c) ` S" unfolding image_def using \cone S\ \c>0\ mem_cone[of S x "1/c"] exI[of "(\t. t \ S \ x = c *\<^sub>R t)" "(1 / c) *\<^sub>R x"] @@ -1964,19 +1964,19 @@ moreover { fix x - assume "x \ (( *\<^sub>R) c) ` S" + assume "x \ ((*\<^sub>R) c) ` S" then have "x \ S" using \cone S\ \c > 0\ unfolding cone_def image_def \c > 0\ by auto } - ultimately have "(( *\<^sub>R) c) ` S = S" by auto + ultimately have "((*\<^sub>R) c) ` S = S" by auto } - then have "0 \ S \ (\c. c > 0 \ (( *\<^sub>R) c) ` S = S)" + then have "0 \ S \ (\c. c > 0 \ ((*\<^sub>R) c) ` S = S)" using \cone S\ cone_contains_0[of S] assms by auto } moreover { - assume a: "0 \ S \ (\c. c > 0 \ (( *\<^sub>R) c) ` S = S)" + assume a: "0 \ S \ (\c. c > 0 \ ((*\<^sub>R) c) ` S = S)" { fix x assume "x \ S" @@ -2061,9 +2061,9 @@ then show ?thesis by auto next case False - then have "0 \ S \ (\c. c > 0 \ ( *\<^sub>R) c ` S = S)" + then have "0 \ S \ (\c. c > 0 \ (*\<^sub>R) c ` S = S)" using cone_iff[of S] assms by auto - then have "0 \ closure S \ (\c. c > 0 \ ( *\<^sub>R) c ` closure S = closure S)" + then have "0 \ closure S \ (\c. c > 0 \ (*\<^sub>R) c ` closure S = closure S)" using closure_subset by (auto simp: closure_scaleR) then show ?thesis using False cone_iff[of "closure S"] by auto @@ -5705,19 +5705,19 @@ then show ?thesis by auto next case False - then have *: "0 \ S \ (\c. c > 0 \ ( *\<^sub>R) c ` S = S)" + then have *: "0 \ S \ (\c. c > 0 \ (*\<^sub>R) c ` S = S)" using cone_iff[of S] assms by auto { fix c :: real assume "c > 0" - then have "( *\<^sub>R) c ` (convex hull S) = convex hull (( *\<^sub>R) c ` S)" + then have "(*\<^sub>R) c ` (convex hull S) = convex hull ((*\<^sub>R) c ` S)" using convex_hull_scaling[of _ S] by auto also have "\ = convex hull S" using * \c > 0\ by auto - finally have "( *\<^sub>R) c ` (convex hull S) = convex hull S" + finally have "(*\<^sub>R) c ` (convex hull S) = convex hull S" by auto } - then have "0 \ convex hull S" "\c. c > 0 \ (( *\<^sub>R) c ` (convex hull S)) = (convex hull S)" + then have "0 \ convex hull S" "\c. c > 0 \ ((*\<^sub>R) c ` (convex hull S)) = (convex hull S)" using * hull_subset[of S convex] by auto then show ?thesis using \S \ {}\ cone_iff[of "convex hull S"] by auto @@ -6403,7 +6403,7 @@ assume "y \ cbox (x - ?d) (x + ?d)" then have "inverse (2 * d) *\<^sub>R (y - (x - ?d)) \ cbox 0 (\Basis)" using assms by (simp add: mem_box field_simps inner_simps) - with \0 < d\ show "y \ (\y. x - sum (( *\<^sub>R) d) Basis + (2 * d) *\<^sub>R y) ` cbox 0 One" + with \0 < d\ show "y \ (\y. x - sum ((*\<^sub>R) d) Basis + (2 * d) *\<^sub>R y) ` cbox 0 One" by (auto intro: image_eqI[where x= "inverse (2 * d) *\<^sub>R (y - (x - ?d))"]) next fix y diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Derivative.thy --- a/src/HOL/Analysis/Derivative.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Derivative.thy Mon Sep 24 23:49:43 2018 +0200 @@ -52,7 +52,7 @@ lemma has_derivative_right: fixes f :: "real \ real" and y :: "real" - shows "(f has_derivative (( * ) y)) (at x within ({x <..} \ I)) \ + shows "(f has_derivative ((*) y)) (at x within ({x <..} \ I)) \ ((\t. (f x - f t) / (x - t)) \ y) (at x within ({x <..} \ I))" proof - have "((\t. (f t - (f x + y * (t - x))) / \t - x\) \ 0) (at x within ({x<..} \ I)) \ @@ -983,7 +983,7 @@ assumes "convex s" "\x. x \ s \ (f has_field_derivative 0) (at x within s)" shows "\c. \x\s. f (x) = (c :: 'a :: real_normed_field)" proof (rule has_derivative_zero_constant) - have A: "( * ) 0 = (\_. 0 :: 'a)" by (intro ext) simp + have A: "(*) 0 = (\_. 0 :: 'a)" by (intro ext) simp fix x assume "x \ s" thus "(f has_derivative (\h. 0)) (at x within s)" using assms(2)[of x] by (simp add: has_field_derivative_def A) qed fact @@ -1911,9 +1911,9 @@ then obtain g where g: "\x. x \ S \ (\n. f n x) sums g x" "\x. x \ S \ (g has_field_derivative g' x) (at x within S)" by blast from g[OF x] show "summable (\n. f n x)" by (auto simp: summable_def) - from g(2)[OF x] have g': "(g has_derivative ( * ) (g' x)) (at x)" + from g(2)[OF x] have g': "(g has_derivative (*) (g' x)) (at x)" by (simp add: has_field_derivative_def S) - have "((\x. \n. f n x) has_derivative ( * ) (g' x)) (at x)" + have "((\x. \n. f n x) has_derivative (*) (g' x)) (at x)" by (rule has_derivative_transform_within_open[OF g' \open S\ x]) (insert g, auto simp: sums_iff) thus "(\x. \n. f n x) differentiable (at x)" unfolding differentiable_def @@ -2218,7 +2218,7 @@ unfolding field_differentiable_def by (metis DERIV_subset top_greatest) -lemma field_differentiable_linear [simp,derivative_intros]: "(( * ) c) field_differentiable F" +lemma field_differentiable_linear [simp,derivative_intros]: "((*) c) field_differentiable F" unfolding field_differentiable_def has_field_derivative_def mult_commute_abs by (force intro: has_derivative_mult_right) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Determinants.thy --- a/src/HOL/Analysis/Determinants.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Determinants.thy Mon Sep 24 23:49:43 2018 +0200 @@ -452,7 +452,7 @@ lemma%unimportant matrix_id [simp]: "det (matrix id) = 1" by (simp add: matrix_id_mat_1) -lemma%important det_matrix_scaleR [simp]: "det (matrix ((( *\<^sub>R) r)) :: real^'n^'n) = r ^ CARD('n::finite)" +lemma%important det_matrix_scaleR [simp]: "det (matrix (((*\<^sub>R) r)) :: real^'n^'n) = r ^ CARD('n::finite)" apply (subst det_diagonal) apply (auto simp: matrix_def mat_def) apply (simp add: cart_eq_inner_axis inner_axis_axis) @@ -750,7 +750,7 @@ lemma%unimportant det_nz_iff_inj_gen: fixes f :: "'a::field^'n \ 'a::field^'n" - assumes "Vector_Spaces.linear ( *s) ( *s) f" + assumes "Vector_Spaces.linear (*s) (*s) f" shows "det (matrix f) \ 0 \ inj f" proof assume "det (matrix f) \ 0" @@ -780,22 +780,22 @@ lemma%important matrix_left_invertible_gen: fixes f :: "'a::field^'m \ 'a::field^'n" - assumes "Vector_Spaces.linear ( *s) ( *s) f" - shows "((\B. B ** matrix f = mat 1) \ (\g. Vector_Spaces.linear ( *s) ( *s) g \ g \ f = id))" + assumes "Vector_Spaces.linear (*s) (*s) f" + shows "((\B. B ** matrix f = mat 1) \ (\g. Vector_Spaces.linear (*s) (*s) g \ g \ f = id))" proof%unimportant safe fix B assume 1: "B ** matrix f = mat 1" - show "\g. Vector_Spaces.linear ( *s) ( *s) g \ g \ f = id" + show "\g. Vector_Spaces.linear (*s) (*s) g \ g \ f = id" proof (intro exI conjI) - show "Vector_Spaces.linear ( *s) ( *s) (\y. B *v y)" + show "Vector_Spaces.linear (*s) (*s) (\y. B *v y)" by simp - show "(( *v) B) \ f = id" + show "((*v) B) \ f = id" unfolding o_def by (metis assms 1 eq_id_iff matrix_vector_mul(1) matrix_vector_mul_assoc matrix_vector_mul_lid) qed next fix g - assume "Vector_Spaces.linear ( *s) ( *s) g" "g \ f = id" + assume "Vector_Spaces.linear (*s) (*s) g" "g \ f = id" then have "matrix g ** matrix f = mat 1" by (metis assms matrix_compose_gen matrix_id_mat_1) then show "\B. B ** matrix f = mat 1" .. @@ -808,22 +808,22 @@ lemma%unimportant matrix_right_invertible_gen: fixes f :: "'a::field^'m \ 'a^'n" - assumes "Vector_Spaces.linear ( *s) ( *s) f" - shows "((\B. matrix f ** B = mat 1) \ (\g. Vector_Spaces.linear ( *s) ( *s) g \ f \ g = id))" + assumes "Vector_Spaces.linear (*s) (*s) f" + shows "((\B. matrix f ** B = mat 1) \ (\g. Vector_Spaces.linear (*s) (*s) g \ f \ g = id))" proof safe fix B assume 1: "matrix f ** B = mat 1" - show "\g. Vector_Spaces.linear ( *s) ( *s) g \ f \ g = id" + show "\g. Vector_Spaces.linear (*s) (*s) g \ f \ g = id" proof (intro exI conjI) - show "Vector_Spaces.linear ( *s) ( *s) (( *v) B)" + show "Vector_Spaces.linear (*s) (*s) ((*v) B)" by simp - show "f \ ( *v) B = id" + show "f \ (*v) B = id" using 1 assms comp_apply eq_id_iff vec.linear_id matrix_id_mat_1 matrix_vector_mul_assoc matrix_works by (metis (no_types, hide_lams)) qed next fix g - assume "Vector_Spaces.linear ( *s) ( *s) g" and "f \ g = id" + assume "Vector_Spaces.linear (*s) (*s) g" and "f \ g = id" then have "matrix f ** matrix g = mat 1" by (metis assms matrix_compose_gen matrix_id_mat_1) then show "\B. matrix f ** B = mat 1" .. @@ -836,8 +836,8 @@ lemma%unimportant matrix_invertible_gen: fixes f :: "'a::field^'m \ 'a::field^'n" - assumes "Vector_Spaces.linear ( *s) ( *s) f" - shows "invertible (matrix f) \ (\g. Vector_Spaces.linear ( *s) ( *s) g \ f \ g = id \ g \ f = id)" + assumes "Vector_Spaces.linear (*s) (*s) f" + shows "invertible (matrix f) \ (\g. Vector_Spaces.linear (*s) (*s) g \ f \ g = id \ g \ f = id)" (is "?lhs = ?rhs") proof assume ?lhs then show ?rhs @@ -855,7 +855,7 @@ lemma%unimportant invertible_eq_bij: fixes m :: "'a::field^'m^'n" - shows "invertible m \ bij (( *v) m)" + shows "invertible m \ bij ((*v) m)" using matrix_invertible_gen[OF matrix_vector_mul_linear_gen, of m, simplified matrix_of_matrix_vector_mul] by (metis bij_betw_def left_right_inverse_eq matrix_vector_mul_linear_gen o_bij vec.linear_injective_left_inverse vec.linear_surjective_right_inverse) @@ -1028,7 +1028,7 @@ let ?m1 = "mat 1 :: real ^'n^'n" { assume ot: ?ot - from ot have lf: "Vector_Spaces.linear ( *s) ( *s) f" and fd: "\v w. f v \ f w = v \ w" + from ot have lf: "Vector_Spaces.linear (*s) (*s) f" and fd: "\v w. f v \ f w = v \ w" unfolding orthogonal_transformation_def orthogonal_matrix linear_def scalar_mult_eq_scaleR by blast+ { @@ -1052,7 +1052,7 @@ } moreover { - assume lf: "Vector_Spaces.linear ( *s) ( *s) f" and om: "orthogonal_matrix ?mf" + assume lf: "Vector_Spaces.linear (*s) (*s) f" and om: "orthogonal_matrix ?mf" from lf om have ?lhs unfolding orthogonal_matrix_def norm_eq orthogonal_transformation apply (simp only: matrix_works[OF lf, symmetric] dot_matrix_vector_mul) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Euclidean_Space.thy --- a/src/HOL/Analysis/Euclidean_Space.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Euclidean_Space.thy Mon Sep 24 23:49:43 2018 +0200 @@ -307,7 +307,7 @@ subsection \Locale instances\ lemma finite_dimensional_vector_space_euclidean: - "finite_dimensional_vector_space ( *\<^sub>R) Basis" + "finite_dimensional_vector_space (*\<^sub>R) Basis" proof unfold_locales show "finite (Basis::'a set)" by (metis finite_Basis) show "real_vector.independent (Basis::'a set)" @@ -318,20 +318,20 @@ apply (drule_tac f="inner a" in arg_cong) apply (simp add: inner_Basis inner_sum_right eq_commute) done - show "module.span ( *\<^sub>R) Basis = UNIV" + show "module.span (*\<^sub>R) Basis = UNIV" unfolding span_finite [OF finite_Basis] span_raw_def[symmetric] by (auto intro!: euclidean_representation[symmetric]) qed interpretation eucl?: finite_dimensional_vector_space "scaleR :: real => 'a => 'a::euclidean_space" "Basis" - rewrites "module.dependent ( *\<^sub>R) = dependent" - and "module.representation ( *\<^sub>R) = representation" - and "module.subspace ( *\<^sub>R) = subspace" - and "module.span ( *\<^sub>R) = span" - and "vector_space.extend_basis ( *\<^sub>R) = extend_basis" - and "vector_space.dim ( *\<^sub>R) = dim" - and "Vector_Spaces.linear ( *\<^sub>R) ( *\<^sub>R) = linear" - and "Vector_Spaces.linear ( * ) ( *\<^sub>R) = linear" + rewrites "module.dependent (*\<^sub>R) = dependent" + and "module.representation (*\<^sub>R) = representation" + and "module.subspace (*\<^sub>R) = subspace" + and "module.span (*\<^sub>R) = span" + and "vector_space.extend_basis (*\<^sub>R) = extend_basis" + and "vector_space.dim (*\<^sub>R) = dim" + and "Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) = linear" + and "Vector_Spaces.linear (*) (*\<^sub>R) = linear" and "finite_dimensional_vector_space.dimension Basis = DIM('a)" and "dimension = DIM('a)" by (auto simp add: dependent_raw_def representation_raw_def @@ -348,15 +348,15 @@ interpretation eucl?: finite_dimensional_vector_space_prod scaleR scaleR Basis Basis rewrites "Basis_pair = Basis" - and "module_prod.scale ( *\<^sub>R) ( *\<^sub>R) = (scaleR::_\_\('a \ 'b))" + and "module_prod.scale (*\<^sub>R) (*\<^sub>R) = (scaleR::_\_\('a \ 'b))" proof - - show "finite_dimensional_vector_space_prod ( *\<^sub>R) ( *\<^sub>R) Basis Basis" + show "finite_dimensional_vector_space_prod (*\<^sub>R) (*\<^sub>R) Basis Basis" by unfold_locales - interpret finite_dimensional_vector_space_prod "( *\<^sub>R)" "( *\<^sub>R)" "Basis::'a set" "Basis::'b set" + interpret finite_dimensional_vector_space_prod "(*\<^sub>R)" "(*\<^sub>R)" "Basis::'a set" "Basis::'b set" by fact show "Basis_pair = Basis" unfolding Basis_pair_def Basis_prod_def by auto - show "module_prod.scale ( *\<^sub>R) ( *\<^sub>R) = scaleR" + show "module_prod.scale (*\<^sub>R) (*\<^sub>R) = scaleR" by (fact module_prod_scale_eq_scaleR) qed diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Finite_Cartesian_Product.thy --- a/src/HOL/Analysis/Finite_Cartesian_Product.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Finite_Cartesian_Product.thy Mon Sep 24 23:49:43 2018 +0200 @@ -235,7 +235,7 @@ instantiation vec :: (times, finite) times begin -definition "( * ) \ (\ x y. (\ i. (x$i) * (y$i)))" +definition "(*) \ (\ x y. (\ i. (x$i) * (y$i)))" instance .. end @@ -961,7 +961,7 @@ lemma vec_eq[simp]: "(vec m = vec n) \ (m = n)" by (simp add: vec_eq_iff) -lemma Vector_Spaces_linear_vec [simp]: "Vector_Spaces.linear ( * ) vector_scalar_mult vec" +lemma Vector_Spaces_linear_vec [simp]: "Vector_Spaces.linear (*) vector_scalar_mult vec" by unfold_locales (vector algebra_simps)+ lemma vector_mul_eq_0[simp]: "(a *s x = 0) \ a = (0::'a::idom) \ x = 0" @@ -1161,7 +1161,7 @@ lemma%unimportant matrix_id_mat_1: "matrix id = mat 1" by (simp add: mat_def matrix_def axis_def) -lemma%unimportant matrix_scaleR: "(matrix (( *\<^sub>R) r)) = mat r" +lemma%unimportant matrix_scaleR: "(matrix ((*\<^sub>R) r)) = mat r" by (simp add: mat_def matrix_def axis_def if_distrib cong: if_cong) lemma%unimportant matrix_vector_mul_linear[intro, simp]: "linear (\x. A *v (x::'a::real_algebra_1 ^ _))" @@ -1218,7 +1218,7 @@ lemma%unimportant inj_matrix_vector_mult: fixes A::"'a::field^'n^'m" assumes "invertible A" - shows "inj (( *v) A)" + shows "inj ((*v) A)" by (metis assms inj_on_inverseI invertible_def matrix_vector_mul_assoc matrix_vector_mul_lid) lemma%important scalar_invertible: diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Finite_Product_Measure.thy --- a/src/HOL/Analysis/Finite_Product_Measure.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Finite_Product_Measure.thy Mon Sep 24 23:49:43 2018 +0200 @@ -929,7 +929,7 @@ using E by (subst insert) (auto intro!: prod.cong) also have "(\j\I. if j \ J - {i} then emeasure (M j) (E j) else emeasure (M j) (space (M j))) * emeasure (M i) (if i \ J then E i else space (M i)) = (\j\insert i I. ?f J E j)" - using insert by (auto simp: mult.commute intro!: arg_cong2[where f="( * )"] prod.cong) + using insert by (auto simp: mult.commute intro!: arg_cong2[where f="(*)"] prod.cong) also have "\ = (\j\J \ ?I. ?f J E j)" using insert(1,2) J E by (intro prod.mono_neutral_right) auto finally show "?\ ?p = \" . diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Further_Topology.thy --- a/src/HOL/Analysis/Further_Topology.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Further_Topology.thy Mon Sep 24 23:49:43 2018 +0200 @@ -3549,12 +3549,12 @@ by (intro conjI contg continuous_intros) show "(complex_of_real \ g) ` S \ \" by auto - show "continuous_on \ (exp \ ( * )\)" + show "continuous_on \ (exp \ (*)\)" by (intro continuous_intros) - show "(exp \ ( * )\) ` \ \ sphere 0 1" + show "(exp \ (*)\) ` \ \ sphere 0 1" by (auto simp: complex_is_Real_iff) qed (auto simp: convex_Reals convex_imp_contractible) - moreover have "\x. x \ S \ (exp \ ( * )\ \ (complex_of_real \ g)) x = f x" + moreover have "\x. x \ S \ (exp \ (*)\ \ (complex_of_real \ g)) x = f x" by (simp add: g) ultimately show ?lhs apply (rule_tac x=a in exI) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Gamma_Function.thy --- a/src/HOL/Analysis/Gamma_Function.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Gamma_Function.thy Mon Sep 24 23:49:43 2018 +0200 @@ -2049,7 +2049,7 @@ moreover from z double_in_nonpos_Ints_imp[of z] have "2 * z \ \\<^sub>\\<^sub>0" by auto hence "?g \ ?powr 2 (2*z) * Gamma z * Gamma (z+1/2) / Gamma (2*z)" - using LIMSEQ_subseq_LIMSEQ[OF Gamma_series'_LIMSEQ, of "( * )2" "2*z"] + using LIMSEQ_subseq_LIMSEQ[OF Gamma_series'_LIMSEQ, of "(*)2" "2*z"] by (intro tendsto_intros Gamma_series'_LIMSEQ) (simp_all add: o_def strict_mono_def Gamma_eq_zero_iff) ultimately have "?h \ ?powr 2 (2*z) * Gamma z * Gamma (z+1/2) / Gamma (2*z)" @@ -3131,10 +3131,10 @@ case True have "(\\<^sup>+t. ennreal (indicator {0..u} t * t powr (a - 1) * (u - t) powr (b - 1)) \lborel) = (\\<^sup>+t. ennreal (indicator {0..1} t * (u * t) powr (a - 1) * (u - u * t) powr (b - 1)) - \distr lborel borel (( * ) (1 / u)))" (is "_ = nn_integral _ ?f") + \distr lborel borel ((*) (1 / u)))" (is "_ = nn_integral _ ?f") using True by (subst nn_integral_distr) (auto simp: indicator_def field_simps intro!: nn_integral_cong) - also have "distr lborel borel (( * ) (1 / u)) = density lborel (\_. u)" + also have "distr lborel borel ((*) (1 / u)) = density lborel (\_. u)" using \u > 0\ by (subst lborel_distr_mult) auto also have "nn_integral \ ?f = (\\<^sup>+x. ennreal (indicator {0..1} x * (u * (u * x) powr (a - 1) * (u * (1 - x)) powr (b - 1))) \lborel)" using \u > 0\ diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Harmonic_Numbers.thy --- a/src/HOL/Analysis/Harmonic_Numbers.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Harmonic_Numbers.thy Mon Sep 24 23:49:43 2018 +0200 @@ -225,7 +225,7 @@ by (intro summable_Leibniz(1) decseq_imp_monoseq decseq_SucI) simp_all hence A: "(\n. \k (\k. (-1)^k / real_of_nat (Suc k))" by (simp add: summable_sums_iff divide_inverse sums_def) - from filterlim_compose[OF this filterlim_subseq[of "( * ) (2::nat)"]] + from filterlim_compose[OF this filterlim_subseq[of "(*) (2::nat)"]] have "(\n. \k<2*n. (-1)^k / real_of_nat (Suc k)) \ (\k. (-1)^k / real_of_nat (Suc k))" by (simp add: strict_mono_def) ultimately have "(\k. (- 1) ^ k / real_of_nat (Suc k)) = ln 2" by (intro LIMSEQ_unique) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Mon Sep 24 23:49:43 2018 +0200 @@ -5044,8 +5044,8 @@ using real_arch_simple by blast have "ball 0 B \ ?cube n" if n: "n \ N" for n proof - - have "sum (( *\<^sub>R) (- real n)) Basis \ i \ x \ i \ - x \ i \ sum (( *\<^sub>R) (real n)) Basis \ i" + have "sum ((*\<^sub>R) (- real n)) Basis \ i \ x \ i \ + x \ i \ sum ((*\<^sub>R) (real n)) Basis \ i" if "norm x < B" "i \ Basis" for x i::'n using Basis_le_norm[of i x] n N that by (auto simp add: field_simps sum_negf) then show ?thesis @@ -5080,7 +5080,7 @@ fix x :: 'n assume x: "x \ ball 0 B" have "\norm (0 - x) < B; i \ Basis\ - \ sum (( *\<^sub>R) (-n)) Basis \ i\ x \ i \ x \ i \ sum (( *\<^sub>R) n) Basis \ i" for i + \ sum ((*\<^sub>R) (-n)) Basis \ i\ x \ i \ x \ i \ sum ((*\<^sub>R) n) Basis \ i" for i using Basis_le_norm[of i x] n by (auto simp add: field_simps sum_negf) then show "x \ ?cube n" using x by (auto simp: mem_box dist_norm) @@ -6180,7 +6180,7 @@ and bou: "bounded (range(\k. integral S (f k)))" shows "g integrable_on S \ (\k. integral S (f k)) \ integral S g" proof - - have *: "range(\k. integral S (\x. - f k x)) = ( *\<^sub>R) (- 1) ` (range(\k. integral S (f k)))" + have *: "range(\k. integral S (\x. - f k x)) = (*\<^sub>R) (- 1) ` (range(\k. integral S (f k)))" by force have "(\x. - g x) integrable_on S \ (\k. integral S (\x. - f k x)) \ integral S (\x. - g x)" proof (rule monotone_convergence_increasing) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Homeomorphism.thy --- a/src/HOL/Analysis/Homeomorphism.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Homeomorphism.thy Mon Sep 24 23:49:43 2018 +0200 @@ -835,9 +835,9 @@ have "((sphere a r \ T) - {b}) homeomorphic (+) (-a) ` ((sphere a r \ T) - {b})" by (rule homeomorphic_translation) - also have "... homeomorphic ( *\<^sub>R) (inverse r) ` (+) (- a) ` (sphere a r \ T - {b})" + also have "... homeomorphic (*\<^sub>R) (inverse r) ` (+) (- a) ` (sphere a r \ T - {b})" by (metis \0 < r\ homeomorphic_scaling inverse_inverse_eq inverse_zero less_irrefl) - also have "... = sphere 0 1 \ (( *\<^sub>R) (inverse r) ` (+) (- a) ` T) - {(b - a) /\<^sub>R r}" + also have "... = sphere 0 1 \ ((*\<^sub>R) (inverse r) ` (+) (- a) ` T) - {(b - a) /\<^sub>R r}" using assms by (auto simp: dist_norm norm_minus_commute divide_simps) also have "... homeomorphic p" apply (rule homeomorphic_punctured_affine_sphere_affine_01) @@ -2210,26 +2210,26 @@ and pq'_eq: "\t. t \ {0..1} \ p (q' t) = (f \ g +++ reversepath g') t" using covering_space_lift_homotopic_path [OF cov homotopic_paths_sym [OF homS] \path q\ piq refl refl] by auto - have "q' t = (h \ ( *\<^sub>R) 2) t" if "0 \ t" "t \ 1/2" for t - proof (rule covering_space_lift_unique [OF cov, of q' 0 "h \ ( *\<^sub>R) 2" "{0..1/2}" "f \ g \ ( *\<^sub>R) 2" t]) - show "q' 0 = (h \ ( *\<^sub>R) 2) 0" + have "q' t = (h \ (*\<^sub>R) 2) t" if "0 \ t" "t \ 1/2" for t + proof (rule covering_space_lift_unique [OF cov, of q' 0 "h \ (*\<^sub>R) 2" "{0..1/2}" "f \ g \ (*\<^sub>R) 2" t]) + show "q' 0 = (h \ (*\<^sub>R) 2) 0" by (metis \pathstart q' = pathstart q\ comp_def g h pastq pathstart_def pth_4(2)) - show "continuous_on {0..1/2} (f \ g \ ( *\<^sub>R) 2)" + show "continuous_on {0..1/2} (f \ g \ (*\<^sub>R) 2)" apply (intro continuous_intros continuous_on_compose continuous_on_path [OF \path g\] continuous_on_subset [OF contf]) using g(2) path_image_def by fastforce+ - show "(f \ g \ ( *\<^sub>R) 2) ` {0..1/2} \ S" + show "(f \ g \ (*\<^sub>R) 2) ` {0..1/2} \ S" using g(2) path_image_def fim by fastforce - show "(h \ ( *\<^sub>R) 2) ` {0..1/2} \ C" + show "(h \ (*\<^sub>R) 2) ` {0..1/2} \ C" using h path_image_def by fastforce show "q' ` {0..1/2} \ C" using \path_image q' \ C\ path_image_def by fastforce - show "\x. x \ {0..1/2} \ (f \ g \ ( *\<^sub>R) 2) x = p (q' x)" + show "\x. x \ {0..1/2} \ (f \ g \ (*\<^sub>R) 2) x = p (q' x)" by (auto simp: joinpaths_def pq'_eq) - show "\x. x \ {0..1/2} \ (f \ g \ ( *\<^sub>R) 2) x = p ((h \ ( *\<^sub>R) 2) x)" + show "\x. x \ {0..1/2} \ (f \ g \ (*\<^sub>R) 2) x = p ((h \ (*\<^sub>R) 2) x)" by (simp add: phg) show "continuous_on {0..1/2} q'" by (simp add: continuous_on_path \path q'\) - show "continuous_on {0..1/2} (h \ ( *\<^sub>R) 2)" + show "continuous_on {0..1/2} (h \ (*\<^sub>R) 2)" apply (intro continuous_intros continuous_on_compose continuous_on_path [OF \path h\], force) done qed (use that in auto) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Inner_Product.thy --- a/src/HOL/Analysis/Inner_Product.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Inner_Product.thy Mon Sep 24 23:49:43 2018 +0200 @@ -277,7 +277,7 @@ instantiation real :: real_inner begin -definition inner_real_def [simp]: "inner = ( * )" +definition inner_real_def [simp]: "inner = (*)" instance proof diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Lebesgue_Measure.thy --- a/src/HOL/Analysis/Lebesgue_Measure.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Lebesgue_Measure.thy Mon Sep 24 23:49:43 2018 +0200 @@ -767,10 +767,10 @@ finally show "lebesgue = density (distr lebesgue lebesgue T) (\_. (\j\Basis. \c j\))" . qed -lemma lebesgue_measurable_scaling[measurable]: "( *\<^sub>R) x \ lebesgue \\<^sub>M lebesgue" +lemma lebesgue_measurable_scaling[measurable]: "(*\<^sub>R) x \ lebesgue \\<^sub>M lebesgue" proof cases assume "x = 0" - then have "( *\<^sub>R) x = (\x. 0::'a)" + then have "(*\<^sub>R) x = (\x. 0::'a)" by (auto simp: fun_eq_iff) then show ?thesis by auto next @@ -860,9 +860,9 @@ lemma lborel_distr_mult: assumes "(c::real) \ 0" - shows "distr lborel borel (( * ) c) = density lborel (\_. inverse \c\)" + shows "distr lborel borel ((*) c) = density lborel (\_. inverse \c\)" proof- - have "distr lborel borel (( * ) c) = distr lborel lborel (( * ) c)" by (simp cong: distr_cong) + have "distr lborel borel ((*) c) = distr lborel lborel ((*) c)" by (simp cong: distr_cong) also from assms have "... = density lborel (\_. inverse \c\)" by (subst lborel_real_affine[of "inverse c" 0]) (auto simp: o_def distr_density_distr) finally show ?thesis . @@ -870,13 +870,13 @@ lemma lborel_distr_mult': assumes "(c::real) \ 0" - shows "lborel = density (distr lborel borel (( * ) c)) (\_. \c\)" + shows "lborel = density (distr lborel borel ((*) c)) (\_. \c\)" proof- have "lborel = density lborel (\_. 1)" by (rule density_1[symmetric]) also from assms have "(\_. 1 :: ennreal) = (\_. inverse \c\ * \c\)" by (intro ext) simp also have "density lborel ... = density (density lborel (\_. inverse \c\)) (\_. \c\)" by (subst density_density_eq) (auto simp: ennreal_mult) - also from assms have "density lborel (\_. inverse \c\) = distr lborel borel (( * ) c)" + also from assms have "density lborel (\_. inverse \c\) = distr lborel borel ((*) c)" by (rule lborel_distr_mult[symmetric]) finally show ?thesis . qed @@ -1119,7 +1119,7 @@ let ?f = "\n. root DIM('a) (Suc n)" - have vimage_eq_image: "( *\<^sub>R) (?f n) -` S = ( *\<^sub>R) (1 / ?f n) ` S" for n + have vimage_eq_image: "(*\<^sub>R) (?f n) -` S = (*\<^sub>R) (1 / ?f n) ` S" for n apply safe subgoal for x by (rule image_eqI[of _ _ "?f n *\<^sub>R x"]) auto subgoal by auto @@ -1141,20 +1141,20 @@ by (intro summable_iff_suminf_neq_top) (auto simp add: inverse_eq_divide) then have "top * emeasure lebesgue S = (\n. (1 / ?f n)^DIM('a) * emeasure lebesgue S)" unfolding ennreal_suminf_multc eq by simp - also have "\ = (\n. emeasure lebesgue (( *\<^sub>R) (?f n) -` S))" + also have "\ = (\n. emeasure lebesgue ((*\<^sub>R) (?f n) -` S))" unfolding vimage_eq_image using emeasure_lebesgue_affine[of "1 / ?f n" 0 S for n] by simp - also have "\ = emeasure lebesgue (\n. ( *\<^sub>R) (?f n) -` S)" + also have "\ = emeasure lebesgue (\n. (*\<^sub>R) (?f n) -` S)" proof (intro suminf_emeasure) - show "disjoint_family (\n. ( *\<^sub>R) (?f n) -` S)" + show "disjoint_family (\n. (*\<^sub>R) (?f n) -` S)" unfolding disjoint_family_on_def proof safe fix m n :: nat and x assume "m \ n" "?f m *\<^sub>R x \ S" "?f n *\<^sub>R x \ S" with eq1[of "?f m / ?f n" "?f n *\<^sub>R x"] show "x \ {}" by auto qed - have "( *\<^sub>R) (?f i) -` S \ sets lebesgue" for i + have "(*\<^sub>R) (?f i) -` S \ sets lebesgue" for i using measurable_sets[OF lebesgue_measurable_scaling[of "?f i"] S] by auto - then show "range (\i. ( *\<^sub>R) (?f i) -` S) \ sets lebesgue" + then show "range (\i. (*\<^sub>R) (?f i) -` S) \ sets lebesgue" by auto qed also have "\ \ emeasure lebesgue (ball 0 M :: 'a set)" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy --- a/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Nonnegative_Lebesgue_Integration.thy Mon Sep 24 23:49:43 2018 +0200 @@ -279,7 +279,7 @@ lemmas simple_function_add[intro, simp] = simple_function_compose2[where h="(+)"] and simple_function_diff[intro, simp] = simple_function_compose2[where h="(-)"] and simple_function_uminus[intro, simp] = simple_function_compose[where g="uminus"] - and simple_function_mult[intro, simp] = simple_function_compose2[where h="( * )"] + and simple_function_mult[intro, simp] = simple_function_compose2[where h="(*)"] and simple_function_div[intro, simp] = simple_function_compose2[where h="(/)"] and simple_function_inverse[intro, simp] = simple_function_compose[where g="inverse"] and simple_function_max[intro, simp] = simple_function_compose2[where h=max] @@ -760,7 +760,7 @@ using assms by (intro simple_function_partition) auto also have "\ = (\y\(\x. (f x, indicator A x::ennreal))`space M. if snd y = 1 then fst y * emeasure M (f -` {fst y} \ space M \ A) else 0)" - by (auto simp: indicator_def split: if_split_asm intro!: arg_cong2[where f="( * )"] arg_cong2[where f=emeasure] sum.cong) + by (auto simp: indicator_def split: if_split_asm intro!: arg_cong2[where f="(*)"] arg_cong2[where f=emeasure] sum.cong) also have "\ = (\y\(\x. (f x, 1::ennreal))`A. fst y * emeasure M (f -` {fst y} \ space M \ A))" using assms by (subst sum.If_cases) (auto intro!: simple_functionD(1) simp: eq) also have "\ = (\y\fst`(\x. (f x, 1::ennreal))`A. y * emeasure M (f -` {y} \ space M \ A))" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Path_Connected.thy Mon Sep 24 23:49:43 2018 +0200 @@ -1737,7 +1737,7 @@ show ?thesis unfolding path_component_def proof (intro exI conjI) - have "continuous_on {0..1} (p \ (( *) y))" + have "continuous_on {0..1} (p \ ((*) y))" apply (rule continuous_intros)+ using p [unfolded path_def] y apply (auto simp: mult_le_one intro: continuous_on_subset [of _ p]) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Product_Vector.thy --- a/src/HOL/Analysis/Product_Vector.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Product_Vector.thy Mon Sep 24 23:49:43 2018 +0200 @@ -88,21 +88,21 @@ end -lemma module_prod_scale_eq_scaleR: "module_prod.scale ( *\<^sub>R) ( *\<^sub>R) = scaleR" +lemma module_prod_scale_eq_scaleR: "module_prod.scale (*\<^sub>R) (*\<^sub>R) = scaleR" apply (rule ext) apply (rule ext) apply (subst module_prod.scale_def) subgoal by unfold_locales by (simp add: scaleR_prod_def) interpretation real_vector?: vector_space_prod "scaleR::_\_\'a::real_vector" "scaleR::_\_\'b::real_vector" - rewrites "scale = (( *\<^sub>R)::_\_\('a \ 'b))" - and "module.dependent ( *\<^sub>R) = dependent" - and "module.representation ( *\<^sub>R) = representation" - and "module.subspace ( *\<^sub>R) = subspace" - and "module.span ( *\<^sub>R) = span" - and "vector_space.extend_basis ( *\<^sub>R) = extend_basis" - and "vector_space.dim ( *\<^sub>R) = dim" - and "Vector_Spaces.linear ( *\<^sub>R) ( *\<^sub>R) = linear" + rewrites "scale = ((*\<^sub>R)::_\_\('a \ 'b))" + and "module.dependent (*\<^sub>R) = dependent" + and "module.representation (*\<^sub>R) = representation" + and "module.subspace (*\<^sub>R) = subspace" + and "module.span (*\<^sub>R) = span" + and "vector_space.extend_basis (*\<^sub>R) = extend_basis" + and "vector_space.dim (*\<^sub>R) = dim" + and "Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) = linear" subgoal by unfold_locales subgoal by (fact module_prod_scale_eq_scaleR) unfolding dependent_raw_def representation_raw_def subspace_raw_def span_raw_def @@ -539,11 +539,11 @@ proof - interpret p1: Vector_Spaces.linear s1 scale "(\x. (x, 0))" by unfold_locales (auto simp: scale_def) - interpret pair1: finite_dimensional_vector_space_pair "( *a)" B1 scale Basis_pair + interpret pair1: finite_dimensional_vector_space_pair "(*a)" B1 scale Basis_pair by unfold_locales interpret p2: Vector_Spaces.linear s2 scale "(\x. (0, x))" by unfold_locales (auto simp: scale_def) - interpret pair2: finite_dimensional_vector_space_pair "( *b)" B2 scale Basis_pair + interpret pair2: finite_dimensional_vector_space_pair "(*b)" B2 scale Basis_pair by unfold_locales have ss: "p.subspace ((\x. (x, 0)) ` S)" "p.subspace (Pair 0 ` T)" by (rule p1.subspace_image p2.subspace_image assms)+ diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Riemann_Mapping.thy --- a/src/HOL/Analysis/Riemann_Mapping.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Riemann_Mapping.thy Mon Sep 24 23:49:43 2018 +0200 @@ -138,17 +138,17 @@ proof (intro bdd_aboveI exI ballI, clarify) show "norm (deriv f 0) \ 1 / r" if "f \ F" for f proof - - have r01: "( * ) (complex_of_real r) ` ball 0 1 \ S" + have r01: "(*) (complex_of_real r) ` ball 0 1 \ S" using that \r > 0\ by (auto simp: norm_mult r [THEN subsetD]) - then have "f holomorphic_on ( * ) (complex_of_real r) ` ball 0 1" + then have "f holomorphic_on (*) (complex_of_real r) ` ball 0 1" using holomorphic_on_subset [OF holF] by (simp add: that) then have holf: "f \ (\z. (r * z)) holomorphic_on (ball 0 1)" by (intro holomorphic_intros holomorphic_on_compose) - have f0: "(f \ ( * ) (complex_of_real r)) 0 = 0" + have f0: "(f \ (*) (complex_of_real r)) 0 = 0" using F_def that by auto have "f ` S \ ball 0 1" using F_def that by blast - with r01 have fr1: "\z. norm z < 1 \ norm ((f \ ( * )(of_real r))z) < 1" + with r01 have fr1: "\z. norm z < 1 \ norm ((f \ (*)(of_real r))z) < 1" by force have *: "((\w. f (r * w)) has_field_derivative deriv f (r * z) * r) (at z)" if "z \ ball 0 1" for z::complex @@ -162,7 +162,7 @@ using * [of 0] by simp have deq: "deriv (\x. f (complex_of_real r * x)) 0 = deriv f 0 * complex_of_real r" using DERIV_imp_deriv df0 by blast - have "norm (deriv (f \ ( * ) (complex_of_real r)) 0) \ 1" + have "norm (deriv (f \ (*) (complex_of_real r)) 0) \ 1" by (auto intro: Schwarz_Lemma [OF holf f0 fr1, of 0]) with \r > 0\ show ?thesis by (simp add: deq norm_mult divide_simps o_def) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/Starlike.thy --- a/src/HOL/Analysis/Starlike.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/Starlike.thy Mon Sep 24 23:49:43 2018 +0200 @@ -2902,22 +2902,22 @@ lemma rel_interior_scaleR: fixes S :: "'n::euclidean_space set" assumes "c \ 0" - shows "(( *\<^sub>R) c) ` (rel_interior S) = rel_interior ((( *\<^sub>R) c) ` S)" - using rel_interior_injective_linear_image[of "(( *\<^sub>R) c)" S] - linear_conv_bounded_linear[of "( *\<^sub>R) c"] linear_scaleR injective_scaleR[of c] assms + shows "((*\<^sub>R) c) ` (rel_interior S) = rel_interior (((*\<^sub>R) c) ` S)" + using rel_interior_injective_linear_image[of "((*\<^sub>R) c)" S] + linear_conv_bounded_linear[of "(*\<^sub>R) c"] linear_scaleR injective_scaleR[of c] assms by auto lemma rel_interior_convex_scaleR: fixes S :: "'n::euclidean_space set" assumes "convex S" - shows "(( *\<^sub>R) c) ` (rel_interior S) = rel_interior ((( *\<^sub>R) c) ` S)" + shows "((*\<^sub>R) c) ` (rel_interior S) = rel_interior (((*\<^sub>R) c) ` S)" by (metis assms linear_scaleR rel_interior_convex_linear_image) lemma convex_rel_open_scaleR: fixes S :: "'n::euclidean_space set" assumes "convex S" and "rel_open S" - shows "convex ((( *\<^sub>R) c) ` S) \ rel_open ((( *\<^sub>R) c) ` S)" + shows "convex (((*\<^sub>R) c) ` S) \ rel_open (((*\<^sub>R) c) ` S)" by (metis assms convex_scaling rel_interior_convex_scaleR rel_open_def) lemma convex_rel_open_finite_inter: @@ -3086,10 +3086,10 @@ by (simp add: rel_interior_empty cone_0) next case False - then have *: "0 \ S \ (\c. c > 0 \ ( *\<^sub>R) c ` S = S)" + then have *: "0 \ S \ (\c. c > 0 \ (*\<^sub>R) c ` S = S)" using cone_iff[of S] assms by auto then have *: "0 \ ({0} \ rel_interior S)" - and "\c. c > 0 \ ( *\<^sub>R) c ` ({0} \ rel_interior S) = ({0} \ rel_interior S)" + and "\c. c > 0 \ (*\<^sub>R) c ` ({0} \ rel_interior S) = ({0} \ rel_interior S)" by (auto simp add: rel_interior_scaleR) then show ?thesis using cone_iff[of "{0} \ rel_interior S"] by auto @@ -3099,7 +3099,7 @@ fixes S :: "'m::euclidean_space set" assumes "convex S" shows "(c, x) \ rel_interior (cone hull ({(1 :: real)} \ S)) \ - c > 0 \ x \ ((( *\<^sub>R) c) ` (rel_interior S))" + c > 0 \ x \ (((*\<^sub>R) c) ` (rel_interior S))" proof (cases "S = {}") case True then show ?thesis @@ -3132,9 +3132,9 @@ { fix c :: real assume "c > 0" - then have "f c = (( *\<^sub>R) c ` S)" + then have "f c = ((*\<^sub>R) c ` S)" using f_def cone_hull_expl[of "{1 :: real} \ S"] by auto - then have "rel_interior (f c) = ( *\<^sub>R) c ` rel_interior S" + then have "rel_interior (f c) = (*\<^sub>R) c ` rel_interior S" using rel_interior_convex_scaleR[of S c] assms by auto } then show ?thesis using * ** by auto @@ -8025,7 +8025,7 @@ by auto have "b \ (v - ?u) = 0" if "b \ B" for b using that \finite B\ - by (simp add: * algebra_simps inner_sum_right if_distrib [of "( *)v" for v] inner_commute cong: if_cong) + by (simp add: * algebra_simps inner_sum_right if_distrib [of "(*)v" for v] inner_commute cong: if_cong) then show "y \ (v - ?u) = 0" by (simp add: u inner_sum_left) qed diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Analysis/normarith.ML --- a/src/HOL/Analysis/normarith.ML Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Analysis/normarith.ML Mon Sep 24 23:49:43 2018 +0200 @@ -26,7 +26,7 @@ fun find_normedterms t acc = case Thm.term_of t of @{term "(+) :: real => _"}$_$_ => find_normedterms (Thm.dest_arg1 t) (find_normedterms (Thm.dest_arg t) acc) - | @{term "( * ) :: real => _"}$_$_ => + | @{term "(*) :: real => _"}$_$_ => if not (is_ratconst (Thm.dest_arg1 t)) then acc else augment_norm (dest_ratconst (Thm.dest_arg1 t) >= @0) (Thm.dest_arg t) acc @@ -83,7 +83,7 @@ fun replacenegnorms cv t = case Thm.term_of t of @{term "(+) :: real => _"}$_$_ => binop_conv (replacenegnorms cv) t -| @{term "( * ) :: real => _"}$_$_ => +| @{term "(*) :: real => _"}$_$_ => if dest_ratconst (Thm.dest_arg1 t) < @0 then arg_conv cv t else Thm.reflexive t | _ => Thm.reflexive t (* diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Binomial.thy --- a/src/HOL/Binomial.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Binomial.thy Mon Sep 24 23:49:43 2018 +0200 @@ -1299,7 +1299,7 @@ "n choose k = (if k > n then 0 else if 2 * k > n then n choose (n - k) - else (fold_atLeastAtMost_nat ( * ) (n - k + 1) n 1 div fact k))" + else (fold_atLeastAtMost_nat (*) (n - k + 1) n 1 div fact k))" proof - { assume "k \ n" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Computational_Algebra/Euclidean_Algorithm.thy --- a/src/HOL/Computational_Algebra/Euclidean_Algorithm.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Computational_Algebra/Euclidean_Algorithm.thy Mon Sep 24 23:49:43 2018 +0200 @@ -421,7 +421,7 @@ Euclidean_Algorithm.gcd Euclidean_Algorithm.lcm Euclidean_Algorithm.Gcd Euclidean_Algorithm.Lcm divide plus minus unit_factor normalize - rewrites "dvd.dvd ( * ) = Rings.dvd" + rewrites "dvd.dvd (*) = Rings.dvd" by (fact semiring_Gcd) (simp add: dvd.dvd_def dvd_def fun_eq_iff) show [simp]: "Euclidean_Algorithm.gcd = (gcd :: 'a \ _)" proof (rule ext)+ @@ -575,7 +575,7 @@ "Euclidean_Algorithm.gcd" "Euclidean_Algorithm.lcm" "Euclidean_Algorithm.Gcd" "Euclidean_Algorithm.Lcm" divide plus minus unit_factor normalize - rewrites "dvd.dvd ( * ) = Rings.dvd" + rewrites "dvd.dvd (*) = Rings.dvd" by (fact semiring_Gcd) (simp add: dvd.dvd_def dvd_def fun_eq_iff) show [simp]: "(Euclidean_Algorithm.gcd :: nat \ _) = gcd" proof (rule ext)+ @@ -612,7 +612,7 @@ "Euclidean_Algorithm.gcd" "Euclidean_Algorithm.lcm" "Euclidean_Algorithm.Gcd" "Euclidean_Algorithm.Lcm" divide plus minus unit_factor normalize - rewrites "dvd.dvd ( * ) = Rings.dvd" + rewrites "dvd.dvd (*) = Rings.dvd" by (fact semiring_Gcd) (simp add: dvd.dvd_def dvd_def fun_eq_iff) show [simp]: "(Euclidean_Algorithm.gcd :: int \ _) = gcd" proof (rule ext)+ diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Computational_Algebra/Formal_Power_Series.thy --- a/src/HOL/Computational_Algebra/Formal_Power_Series.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Computational_Algebra/Formal_Power_Series.thy Mon Sep 24 23:49:43 2018 +0200 @@ -78,7 +78,7 @@ instantiation fps :: ("{comm_monoid_add, times}") times begin - definition fps_times_def: "( * ) = (\f g. Abs_fps (\n. \i=0..n. f $ i * g $ (n - i)))" + definition fps_times_def: "(*) = (\f g. Abs_fps (\n. \i=0..n. f $ i * g $ (n - i)))" instance .. end @@ -2037,7 +2037,7 @@ (* If f reprents {a_n} and P is a polynomial, then P(xD) f represents {P(n) a_n}*) -definition "fps_XD = ( * ) fps_X \ fps_deriv" +definition "fps_XD = (*) fps_X \ fps_deriv" lemma fps_XD_add[simp]:"fps_XD (a + b) = fps_XD a + fps_XD (b :: 'a::comm_ring_1 fps)" by (simp add: fps_XD_def field_simps) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Computational_Algebra/Polynomial.thy --- a/src/HOL/Computational_Algebra/Polynomial.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Computational_Algebra/Polynomial.thy Mon Sep 24 23:49:43 2018 +0200 @@ -891,7 +891,7 @@ lemma smult_monom: "smult a (monom b n) = monom (a * b) n" by (induct n) (simp_all add: monom_0 monom_Suc) -lemma smult_Poly: "smult c (Poly xs) = Poly (map (( * ) c) xs)" +lemma smult_Poly: "smult c (Poly xs) = Poly (map ((*) c) xs)" by (auto simp: poly_eq_iff nth_default_def) lemma degree_smult_eq [simp]: "degree (smult a p) = (if a = 0 then 0 else degree p)" @@ -3811,10 +3811,10 @@ where "pseudo_divmod_main_list lc q r d (Suc n) = (let - rr = map (( * ) lc) r; + rr = map ((*) lc) r; a = hd r; - qqq = cCons a (map (( * ) lc) q); - rrr = tl (if a = 0 then rr else minus_poly_rev_list rr (map (( * ) a) d)) + qqq = cCons a (map ((*) lc) q); + rrr = tl (if a = 0 then rr else minus_poly_rev_list rr (map ((*) a) d)) in pseudo_divmod_main_list lc qqq rrr d n)" | "pseudo_divmod_main_list lc q r d 0 = (q, r)" @@ -3822,9 +3822,9 @@ where "pseudo_mod_main_list lc r d (Suc n) = (let - rr = map (( * ) lc) r; + rr = map ((*) lc) r; a = hd r; - rrr = tl (if a = 0 then rr else minus_poly_rev_list rr (map (( * ) a) d)) + rrr = tl (if a = 0 then rr else minus_poly_rev_list rr (map ((*) a) d)) in pseudo_mod_main_list lc rrr d n)" | "pseudo_mod_main_list lc r d 0 = r" @@ -3836,7 +3836,7 @@ (let a = hd r; qqq = cCons a q; - rr = tl (if a = 0 then r else minus_poly_rev_list r (map (( * ) a) d)) + rr = tl (if a = 0 then r else minus_poly_rev_list r (map ((*) a) d)) in divmod_poly_one_main_list qqq rr d n)" | "divmod_poly_one_main_list q r d 0 = (q, r)" @@ -3845,7 +3845,7 @@ "mod_poly_one_main_list r d (Suc n) = (let a = hd r; - rr = tl (if a = 0 then r else minus_poly_rev_list r (map (( * ) a) d)) + rr = tl (if a = 0 then r else minus_poly_rev_list r (map ((*) a) d)) in mod_poly_one_main_list rr d n)" | "mod_poly_one_main_list r d 0 = r" @@ -3866,7 +3866,7 @@ re = pseudo_mod_main_list (hd rq) (rev p) rq (1 + length p - length q) in rev re))" -lemma minus_zero_does_nothing: "minus_poly_rev_list x (map (( * ) 0) y) = x" +lemma minus_zero_does_nothing: "minus_poly_rev_list x (map ((*) 0) y) = x" for x :: "'a::ring list" by (induct x y rule: minus_poly_rev_list.induct) auto @@ -3874,8 +3874,8 @@ by (induct xs ys rule: minus_poly_rev_list.induct) auto lemma if_0_minus_poly_rev_list: - "(if a = 0 then x else minus_poly_rev_list x (map (( * ) a) y)) = - minus_poly_rev_list x (map (( * ) a) y)" + "(if a = 0 then x else minus_poly_rev_list x (map ((*) a) y)) = + minus_poly_rev_list x (map ((*) a) y)" for a :: "'a::ring" by(cases "a = 0") (simp_all add: minus_zero_does_nothing) @@ -3917,7 +3917,7 @@ lemma head_minus_poly_rev_list: "length d \ length r \ d \ [] \ - hd (minus_poly_rev_list (map (( * ) (last d)) r) (map (( * ) (hd r)) (rev d))) = 0" + hd (minus_poly_rev_list (map ((*) (last d)) r) (map ((*) (hd r)) (rev d))) = 0" for d r :: "'a::comm_ring list" proof (induct r) case Nil @@ -3927,7 +3927,7 @@ then show ?case by (cases "rev d") (simp_all add: ac_simps) qed -lemma Poly_map: "Poly (map (( * ) a) p) = smult a (Poly p)" +lemma Poly_map: "Poly (map ((*) a) p) = smult a (Poly p)" proof (induct p) case Nil then show ?case by simp @@ -3955,9 +3955,9 @@ with \d \ []\ have "r \ []" using Suc_leI length_greater_0_conv list.size(3) by fastforce let ?a = "(hd (rev r))" - let ?rr = "map (( * ) lc) (rev r)" - let ?rrr = "rev (tl (minus_poly_rev_list ?rr (map (( * ) ?a) (rev d))))" - let ?qq = "cCons ?a (map (( * ) lc) q)" + let ?rr = "map ((*) lc) (rev r)" + let ?rrr = "rev (tl (minus_poly_rev_list ?rr (map ((*) ?a) (rev d))))" + let ?qq = "cCons ?a (map ((*) lc) q)" from * Suc(3) have n: "n = (1 + length r - length d - 1)" by simp from * have rr_val:"(length ?rrr) = (length r - 1)" @@ -3990,12 +3990,12 @@ case 2 show ?case proof (subst Poly_on_rev_starting_with_0, goal_cases) - show "hd (minus_poly_rev_list (map (( * ) lc) (rev r)) (map (( * ) (hd (rev r))) (rev d))) = 0" + show "hd (minus_poly_rev_list (map ((*) lc) (rev r)) (map ((*) (hd (rev r))) (rev d))) = 0" by (fold lc, subst head_minus_poly_rev_list, insert * \d \ []\, auto) from * have "length d \ length r" by simp then show "smult lc (Poly r) - monom (coeff (Poly r) (length r - 1)) n * Poly d = - Poly (rev (minus_poly_rev_list (map (( * ) lc) (rev r)) (map (( * ) (hd (rev r))) (rev d))))" + Poly (rev (minus_poly_rev_list (map ((*) lc) (rev r)) (map ((*) (hd (rev r))) (rev d))))" by (fold rev_map) (auto simp add: n smult_monom_mult Poly_map hd_rev [symmetric] minus_poly_rev_list) qed @@ -4100,9 +4100,9 @@ let cf = coeffs f; ilc = inverse (last cg); - ch = map (( * ) ilc) cg; + ch = map ((*) ilc) cg; (q, r) = pseudo_divmod_main_list 1 [] (rev cf) (rev ch) (1 + length cf - length cg) - in (poly_of_list (map (( * ) ilc) q), poly_of_list (rev r)))" + in (poly_of_list (map ((*) ilc) q), poly_of_list (rev r)))" proof - note d = pdivmod_via_pseudo_divmod pseudo_divmod_impl pseudo_divmod_list_def show ?thesis @@ -4121,10 +4121,10 @@ have id2: "hd (rev (coeffs (smult ilc g))) = 1" by (subst hd_rev, insert id ilc, auto simp: coeffs_smult, subst last_map, auto simp: id ilc_def) have id3: "length (coeffs (smult ilc g)) = length (coeffs g)" - "rev (coeffs (smult ilc g)) = rev (map (( * ) ilc) (coeffs g))" + "rev (coeffs (smult ilc g)) = rev (map ((*) ilc) (coeffs g))" unfolding coeffs_smult using ilc by auto obtain q r where pair: - "pseudo_divmod_main_list 1 [] (rev (coeffs f)) (rev (map (( * ) ilc) (coeffs g))) + "pseudo_divmod_main_list 1 [] (rev (coeffs f)) (rev (map ((*) ilc) (coeffs g))) (1 + length (coeffs f) - length (coeffs g)) = (q, r)" by force show ?thesis @@ -4137,7 +4137,7 @@ lemma pseudo_divmod_main_list_1: "pseudo_divmod_main_list 1 = divmod_poly_one_main_list" proof (intro ext, goal_cases) case (1 q r d n) - have *: "map (( * ) 1) xs = xs" for xs :: "'a list" + have *: "map ((*) 1) xs = xs" for xs :: "'a list" by (induct xs) auto show ?case by (induct n arbitrary: q r d) (auto simp: * Let_def) @@ -4151,7 +4151,7 @@ in if cr = 0 then divide_poly_main_list lc (cCons cr q) (tl r) d n else let a = cr div lc; qq = cCons a q; - rr = minus_poly_rev_list r (map (( * ) a) d) + rr = minus_poly_rev_list r (map ((*) a) d) in if hd rr = 0 then divide_poly_main_list lc qq (tl rr) d n else [])" | "divide_poly_main_list lc q r d 0 = q" @@ -4161,7 +4161,7 @@ cr = hd r; a = cr div lc; qq = cCons a q; - rr = minus_poly_rev_list r (map (( * ) a) d) + rr = minus_poly_rev_list r (map ((*) a) d) in if hd rr = 0 then divide_poly_main_list lc qq (tl rr) d n else [])" by (simp add: Let_def minus_zero_does_nothing) @@ -4190,7 +4190,7 @@ let cf = coeffs f; ilc = inverse (last cg); - ch = map (( * ) ilc) cg; + ch = map ((*) ilc) cg; r = mod_poly_one_main_list (rev cf) (rev ch) (1 + length cf - length cg) in poly_of_list (rev r))" (is "_ = ?rhs") @@ -4209,9 +4209,9 @@ let cf = coeffs f; ilc = inverse (last cg); - ch = map (( * ) ilc) cg; + ch = map ((*) ilc) cg; q = fst (divmod_poly_one_main_list [] (rev cf) (rev ch) (1 + length cf - length cg)) - in poly_of_list ((map (( * ) ilc) q)))" + in poly_of_list ((map ((*) ilc) q)))" text \We do not declare the following lemma as code equation, since then polynomial division on non-fields will no longer be executable. However, a code-unfold is possible, since @@ -4259,7 +4259,7 @@ with r d have id: "?thesis \ Poly (divide_poly_main_list lc (cCons (lcr div lc) q) - (rev (rev (minus_poly_rev_list (rev rr) (rev (map (( * ) (lcr div lc)) dd))))) (rev d) n) = + (rev (rev (minus_poly_rev_list (rev rr) (rev (map ((*) (lcr div lc)) dd))))) (rev d) n) = divide_poly_main lc (monom 1 (Suc n) * Poly q + monom (lcr div lc) n) (Poly r - monom (lcr div lc) n * Poly d) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Decision_Procs/Algebra_Aux.thy --- a/src/HOL/Decision_Procs/Algebra_Aux.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Decision_Procs/Algebra_Aux.thy Mon Sep 24 23:49:43 2018 +0200 @@ -234,7 +234,7 @@ by (induct n) (simp_all add: m_ac) definition cring_class_ops :: "'a::comm_ring_1 ring" - where "cring_class_ops \ \carrier = UNIV, mult = ( * ), one = 1, zero = 0, add = (+)\" + where "cring_class_ops \ \carrier = UNIV, mult = (*), one = 1, zero = 0, add = (+)\" lemma cring_class: "cring cring_class_ops" apply unfold_locales diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Decision_Procs/Cooper.thy --- a/src/HOL/Decision_Procs/Cooper.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Decision_Procs/Cooper.thy Mon Sep 24 23:49:43 2018 +0200 @@ -2402,7 +2402,7 @@ @{code Add} (num_of_term vs t1, num_of_term vs t2) | num_of_term vs (@{term "(-) :: int \ int \ int"} $ t1 $ t2) = @{code Sub} (num_of_term vs t1, num_of_term vs t2) - | num_of_term vs (@{term "( * ) :: int \ int \ int"} $ t1 $ t2) = + | num_of_term vs (@{term "(*) :: int \ int \ int"} $ t1 $ t2) = (case try HOLogic.dest_number t1 of SOME (_, i) => @{code Mul} (@{code int_of_integer} i, num_of_term vs t2) | NONE => @@ -2455,7 +2455,7 @@ term_of_num vs t1 $ term_of_num vs t2 | term_of_num vs (@{code Sub} (t1, t2)) = @{term "(-) :: int \ int \ int"} $ term_of_num vs t1 $ term_of_num vs t2 - | term_of_num vs (@{code Mul} (i, t2)) = @{term "( * ) :: int \ int \ int"} $ + | term_of_num vs (@{code Mul} (i, t2)) = @{term "(*) :: int \ int \ int"} $ term_of_num vs (@{code C} i) $ term_of_num vs t2 | term_of_num vs (@{code CN} (n, i, t)) = term_of_num vs (@{code Add} (@{code Mul} (i, @{code Bound} n), t)); diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Decision_Procs/Ferrack.thy --- a/src/HOL/Decision_Procs/Ferrack.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Decision_Procs/Ferrack.thy Mon Sep 24 23:49:43 2018 +0200 @@ -2476,7 +2476,7 @@ @{code Add} (num_of_term vs t1, num_of_term vs t2) | num_of_term vs (@{term "(-) :: real \ real \ real"} $ t1 $ t2) = @{code Sub} (num_of_term vs t1, num_of_term vs t2) - | num_of_term vs (@{term "( * ) :: real \ real \ real"} $ t1 $ t2) = (case num_of_term vs t1 + | num_of_term vs (@{term "(*) :: real \ real \ real"} $ t1 $ t2) = (case num_of_term vs t1 of @{code C} i => @{code Mul} (i, num_of_term vs t2) | _ => error "num_of_term: unsupported multiplication") | num_of_term vs (@{term "real_of_int :: int \ real"} $ t') = @@ -2514,7 +2514,7 @@ term_of_num vs t1 $ term_of_num vs t2 | term_of_num vs (@{code Sub} (t1, t2)) = @{term "(-) :: real \ real \ real"} $ term_of_num vs t1 $ term_of_num vs t2 - | term_of_num vs (@{code Mul} (i, t2)) = @{term "( * ) :: real \ real \ real"} $ + | term_of_num vs (@{code Mul} (i, t2)) = @{term "(*) :: real \ real \ real"} $ term_of_num vs (@{code C} i) $ term_of_num vs t2 | term_of_num vs (@{code CN} (n, i, t)) = term_of_num vs (@{code Add} (@{code Mul} (i, @{code Bound} n), t)); diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Decision_Procs/MIR.thy --- a/src/HOL/Decision_Procs/MIR.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Decision_Procs/MIR.thy Mon Sep 24 23:49:43 2018 +0200 @@ -5579,7 +5579,7 @@ @{code Add} (num_of_term vs t1, num_of_term vs t2) | num_of_term vs (@{term "(-) :: real \ real \ real"} $ t1 $ t2) = @{code Sub} (num_of_term vs t1, num_of_term vs t2) - | num_of_term vs (@{term "( * ) :: real \ real \ real"} $ t1 $ t2) = + | num_of_term vs (@{term "(*) :: real \ real \ real"} $ t1 $ t2) = (case (num_of_term vs t1) of @{code C} i => @{code Mul} (i, num_of_term vs t2) | _ => error "num_of_term: unsupported Multiplication") @@ -5638,7 +5638,7 @@ term_of_num vs t1 $ term_of_num vs t2 | term_of_num vs (@{code Sub} (t1, t2)) = @{term "(-) :: real \ real \ real"} $ term_of_num vs t1 $ term_of_num vs t2 - | term_of_num vs (@{code Mul} (i, t2)) = @{term "( * ) :: real \ real \ real"} $ + | term_of_num vs (@{code Mul} (i, t2)) = @{term "(*) :: real \ real \ real"} $ term_of_num vs (@{code C} i) $ term_of_num vs t2 | term_of_num vs (@{code Floor} t) = @{term "of_int :: int \ real"} $ (@{term "floor :: real \ int"} $ term_of_num vs t) | term_of_num vs (@{code CN} (n, i, t)) = term_of_num vs (@{code Add} (@{code Mul} (i, @{code Bound} n), t)) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Decision_Procs/Polynomial_List.thy --- a/src/HOL/Decision_Procs/Polynomial_List.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Decision_Procs/Polynomial_List.thy Mon Sep 24 23:49:43 2018 +0200 @@ -186,7 +186,7 @@ by (cases "x = zero") (auto simp add: distrib_left ac_simps) qed -lemma (in comm_semiring_0) poly_cmult_map: "poly (map (( * ) c) p) x = c * poly p x" +lemma (in comm_semiring_0) poly_cmult_map: "poly (map ((*) c) p) x = c * poly p x" by (induct p) (auto simp add: distrib_left ac_simps) lemma (in comm_ring_1) poly_minus: "poly (-- p) x = - (poly p x)" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Deriv.thy --- a/src/HOL/Deriv.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Deriv.thy Mon Sep 24 23:49:43 2018 +0200 @@ -38,7 +38,7 @@ definition has_field_derivative :: "('a::real_normed_field \ 'a) \ 'a \ 'a filter \ bool" (infix "(has'_field'_derivative)" 50) - where "(f has_field_derivative D) F \ (f has_derivative ( * ) D) F" + where "(f has_field_derivative D) F \ (f has_derivative (*) D) F" lemma DERIV_cong: "(f has_field_derivative X) F \ X = Y \ (f has_field_derivative Y) F" by simp @@ -153,7 +153,7 @@ lemma field_has_derivative_at: fixes x :: "'a::real_normed_field" - shows "(f has_derivative ( * ) D) (at x) \ (\h. (f (x + h) - f x) / h) \0\ D" (is "?lhs = ?rhs") + shows "(f has_derivative (*) D) (at x) \ (\h. (f (x + h) - f x) / h) \0\ D" (is "?lhs = ?rhs") proof - have "?lhs = (\h. norm (f (x + h) - f x - D * h) / norm h) \0 \ 0" by (simp add: bounded_linear_mult_right has_derivative_at) @@ -648,7 +648,7 @@ by (rule has_derivative_eq_rhs[of f D]) (simp_all add: fun_eq_iff mult.commute) lemma has_field_derivative_imp_has_derivative: - "(f has_field_derivative D) F \ (f has_derivative ( * ) D) F" + "(f has_field_derivative D) F \ (f has_derivative (*) D) F" by (simp add: has_field_derivative_def) lemma DERIV_subset: @@ -675,7 +675,7 @@ assume "f differentiable at x within s" then obtain f' where *: "(f has_derivative f') (at x within s)" unfolding differentiable_def by auto - then obtain c where "f' = (( * ) c)" + then obtain c where "f' = ((*) c)" by (metis real_bounded_linear has_derivative_bounded_linear mult.commute fun_eq_iff) with * show "\D. (f has_real_derivative D) (at x within s)" unfolding has_field_derivative_def by auto @@ -702,7 +702,7 @@ lemma DERIV_def: "DERIV f x :> D \ (\h. (f (x + h) - f x) / h) \0\ D" unfolding field_has_derivative_at has_field_derivative_def has_field_derivative_iff .. -lemma mult_commute_abs: "(\x. x * c) = ( * ) c" +lemma mult_commute_abs: "(\x. x * c) = (*) c" for c :: "'a::ab_semigroup_mult" by (simp add: fun_eq_iff mult.commute) @@ -711,7 +711,7 @@ assumes "DERIV f (g x) :> f'" assumes "(g has_derivative g') (at x within s)" shows "((\x. f (g x)) has_derivative (\x. g' x * f')) (at x within s)" - using assms has_derivative_compose[of g g' x s f "( * ) f'"] + using assms has_derivative_compose[of g g' x s f "(*) f'"] by (auto simp: has_field_derivative_def ac_simps) @@ -896,7 +896,7 @@ ((\x. f x * c) has_field_derivative D * c) (at x within s)" using DERIV_cmult by (auto simp add: ac_simps) -lemma DERIV_cmult_Id [simp]: "(( * ) c has_field_derivative c) (at x within s)" +lemma DERIV_cmult_Id [simp]: "((*) c has_field_derivative c) (at x within s)" using DERIV_ident [THEN DERIV_cmult, where c = c and x = x] by simp lemma DERIV_cdivide: @@ -919,7 +919,7 @@ shows "((\x. inverse (f x)) has_field_derivative - (inverse (f x) * D * inverse (f x))) (at x within s)" proof - - have "(f has_derivative (\x. x * D)) = (f has_derivative ( * ) D)" + have "(f has_derivative (\x. x * D)) = (f has_derivative (*) D)" by (rule arg_cong [of "\x. x * D"]) (simp add: fun_eq_iff) with assms have "(f has_derivative (\x. x * D)) (at x within s)" by (auto dest!: has_field_derivative_imp_has_derivative) @@ -972,7 +972,7 @@ lemma DERIV_chain': "(f has_field_derivative D) (at x within s) \ DERIV g (f x) :> E \ ((\x. g (f x)) has_field_derivative E * D) (at x within s)" - using has_derivative_compose[of f "( * ) D" x s g "( * ) E"] + using has_derivative_compose[of f "(*) D" x s g "(*) E"] by (simp only: has_field_derivative_def mult_commute_abs ac_simps) corollary DERIV_chain2: "DERIV f (g x) :> Da \ (g has_field_derivative Db) (at x within s) \ @@ -990,7 +990,7 @@ "(f has_field_derivative Da) (at (g x) within (g ` s)) \ (g has_field_derivative Db) (at x within s) \ (f \ g has_field_derivative Da * Db) (at x within s)" - using has_derivative_in_compose [of g "( * ) Db" x s f "( * ) Da "] + using has_derivative_in_compose [of g "(*) Db" x s f "(*) Da "] by (simp add: has_field_derivative_def o_def mult_commute_abs ac_simps) (*These two are from HOL Light: HAS_COMPLEX_DERIVATIVE_CHAIN*) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Enum.thy --- a/src/HOL/Enum.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Enum.thy Mon Sep 24 23:49:43 2018 +0200 @@ -585,7 +585,7 @@ definition [simp]: "Groups.zero = a\<^sub>1" definition [simp]: "Groups.one = a\<^sub>1" definition [simp]: "(+) = (\_ _. a\<^sub>1)" -definition [simp]: "( * ) = (\_ _. a\<^sub>1)" +definition [simp]: "(*) = (\_ _. a\<^sub>1)" definition [simp]: "(mod) = (\_ _. a\<^sub>1)" definition [simp]: "abs = (\_. a\<^sub>1)" definition [simp]: "sgn = (\_. a\<^sub>1)" @@ -690,7 +690,7 @@ definition "(-) = ((+) :: finite_2 \ _)" definition "x * y = (case (x, y) of (a\<^sub>2, a\<^sub>2) \ a\<^sub>2 | _ \ a\<^sub>1)" definition "inverse = (\x :: finite_2. x)" -definition "divide = (( * ) :: finite_2 \ _)" +definition "divide = ((*) :: finite_2 \ _)" definition "x mod y = (case (x, y) of (a\<^sub>2, a\<^sub>1) \ a\<^sub>2 | _ \ a\<^sub>1)" definition "abs = (\x :: finite_2. x)" definition "sgn = (\x :: finite_2. x)" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Factorial.thy --- a/src/HOL/Factorial.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Factorial.thy Mon Sep 24 23:49:43 2018 +0200 @@ -403,13 +403,13 @@ subsection \Misc\ lemma fact_code [code]: - "fact n = (of_nat (fold_atLeastAtMost_nat (( * )) 2 n 1) :: 'a::semiring_char_0)" + "fact n = (of_nat (fold_atLeastAtMost_nat ((*)) 2 n 1) :: 'a::semiring_char_0)" proof - have "fact n = (of_nat (\{1..n}) :: 'a)" by (simp add: fact_prod) also have "\{1..n} = \{2..n}" by (intro prod.mono_neutral_right) auto - also have "\ = fold_atLeastAtMost_nat (( * )) 2 n 1" + also have "\ = fold_atLeastAtMost_nat ((*)) 2 n 1" by (simp add: prod_atLeastAtMost_code) finally show ?thesis . qed diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/GCD.thy --- a/src/HOL/GCD.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/GCD.thy Mon Sep 24 23:49:43 2018 +0200 @@ -976,25 +976,25 @@ lemma dvd_Gcd_iff: "x dvd Gcd A \ (\y\A. x dvd y)" by (blast dest: dvd_GcdD intro: Gcd_greatest) -lemma Gcd_mult: "Gcd (( *) c ` A) = normalize c * Gcd A" +lemma Gcd_mult: "Gcd ((*) c ` A) = normalize c * Gcd A" proof (cases "c = 0") case True then show ?thesis by auto next case [simp]: False - have "Gcd (( *) c ` A) div c dvd Gcd A" + have "Gcd ((*) c ` A) div c dvd Gcd A" by (intro Gcd_greatest, subst div_dvd_iff_mult) (auto intro!: Gcd_greatest Gcd_dvd simp: mult.commute[of _ c]) - then have "Gcd (( *) c ` A) dvd c * Gcd A" + then have "Gcd ((*) c ` A) dvd c * Gcd A" by (subst (asm) div_dvd_iff_mult) (auto intro: Gcd_greatest simp: mult_ac) also have "c * Gcd A = (normalize c * Gcd A) * unit_factor c" by (subst unit_factor_mult_normalize [symmetric]) (simp only: mult_ac) - also have "Gcd (( *) c ` A) dvd \ \ Gcd (( *) c ` A) dvd normalize c * Gcd A" + also have "Gcd ((*) c ` A) dvd \ \ Gcd ((*) c ` A) dvd normalize c * Gcd A" by (simp add: dvd_mult_unit_iff) - finally have "Gcd (( *) c ` A) dvd normalize c * Gcd A" . - moreover have "normalize c * Gcd A dvd Gcd (( *) c ` A)" + finally have "Gcd ((*) c ` A) dvd normalize c * Gcd A" . + moreover have "normalize c * Gcd A dvd Gcd ((*) c ` A)" by (intro Gcd_greatest) (auto intro: mult_dvd_mono Gcd_dvd) - ultimately have "normalize (Gcd (( *) c ` A)) = normalize (normalize c * Gcd A)" + ultimately have "normalize (Gcd ((*) c ` A)) = normalize (normalize c * Gcd A)" by (rule associatedI) then show ?thesis by (simp add: normalize_mult) @@ -1015,10 +1015,10 @@ lemma Lcm_mult: assumes "A \ {}" - shows "Lcm (( *) c ` A) = normalize c * Lcm A" + shows "Lcm ((*) c ` A) = normalize c * Lcm A" proof (cases "c = 0") case True - with assms have "( *) c ` A = {0}" + with assms have "(*) c ` A = {0}" by auto with True show ?thesis by auto next @@ -1027,23 +1027,23 @@ by blast have "c dvd c * x" by simp - also from x have "c * x dvd Lcm (( *) c ` A)" + also from x have "c * x dvd Lcm ((*) c ` A)" by (intro dvd_Lcm) auto - finally have dvd: "c dvd Lcm (( *) c ` A)" . - - have "Lcm A dvd Lcm (( *) c ` A) div c" + finally have dvd: "c dvd Lcm ((*) c ` A)" . + + have "Lcm A dvd Lcm ((*) c ` A) div c" by (intro Lcm_least dvd_mult_imp_div) (auto intro!: Lcm_least dvd_Lcm simp: mult.commute[of _ c]) - then have "c * Lcm A dvd Lcm (( *) c ` A)" + then have "c * Lcm A dvd Lcm ((*) c ` A)" by (subst (asm) dvd_div_iff_mult) (auto intro!: Lcm_least simp: mult_ac dvd) also have "c * Lcm A = (normalize c * Lcm A) * unit_factor c" by (subst unit_factor_mult_normalize [symmetric]) (simp only: mult_ac) - also have "\ dvd Lcm (( *) c ` A) \ normalize c * Lcm A dvd Lcm (( *) c ` A)" + also have "\ dvd Lcm ((*) c ` A) \ normalize c * Lcm A dvd Lcm ((*) c ` A)" by (simp add: mult_unit_dvd_iff) - finally have "normalize c * Lcm A dvd Lcm (( *) c ` A)" . - moreover have "Lcm (( *) c ` A) dvd normalize c * Lcm A" + finally have "normalize c * Lcm A dvd Lcm ((*) c ` A)" . + moreover have "Lcm ((*) c ` A) dvd normalize c * Lcm A" by (intro Lcm_least) (auto intro: mult_dvd_mono dvd_Lcm) - ultimately have "normalize (normalize c * Lcm A) = normalize (Lcm (( *) c ` A))" + ultimately have "normalize (normalize c * Lcm A) = normalize (Lcm ((*) c ` A))" by (rule associatedI) then show ?thesis by (simp add: normalize_mult) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Groups_List.thy --- a/src/HOL/Groups_List.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Groups_List.thy Mon Sep 24 23:49:43 2018 +0200 @@ -124,7 +124,7 @@ by (induct xss) simp_all lemma (in monoid_add) length_product_lists: - "length (product_lists xss) = foldr ( * ) (map length xss) 1" + "length (product_lists xss) = foldr (*) (map length xss) 1" proof (induct xss) case (Cons xs xss) then show ?case by (induct xs) (auto simp: length_concat o_def) qed simp diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Library/Code_Real_Approx_By_Float.thy --- a/src/HOL/Library/Code_Real_Approx_By_Float.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Library/Code_Real_Approx_By_Float.thy Mon Sep 24 23:49:43 2018 +0200 @@ -60,7 +60,7 @@ and (OCaml) "Pervasives.( +. )" code_printing - constant "( * ) :: real \ real \ real" \ + constant "(*) :: real \ real \ real" \ (SML) "Real.* ((_), (_))" and (OCaml) "Pervasives.( *. )" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Library/DAList_Multiset.thy --- a/src/HOL/Library/DAList_Multiset.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Library/DAList_Multiset.thy Mon Sep 24 23:49:43 2018 +0200 @@ -372,7 +372,7 @@ end -\ \we cannot use \\a n. (+) (a * n)\ for folding, since \( * )\ is not defined in \comm_monoid_add\\ +\ \we cannot use \\a n. (+) (a * n)\ for folding, since \(*)\ is not defined in \comm_monoid_add\\ lemma sum_mset_Bag[code]: "sum_mset (Bag ms) = DAList_Multiset.fold (\a n. (((+) a) ^^ n)) 0 ms" unfolding sum_mset.eq_fold apply (rule comp_fun_commute.DAList_Multiset_fold) @@ -380,8 +380,8 @@ apply (auto simp: ac_simps) done -\ \we cannot use \\a n. ( * ) (a ^ n)\ for folding, since \(^)\ is not defined in \comm_monoid_mult\\ -lemma prod_mset_Bag[code]: "prod_mset (Bag ms) = DAList_Multiset.fold (\a n. ((( * ) a) ^^ n)) 1 ms" +\ \we cannot use \\a n. (*) (a ^ n)\ for folding, since \(^)\ is not defined in \comm_monoid_mult\\ +lemma prod_mset_Bag[code]: "prod_mset (Bag ms) = DAList_Multiset.fold (\a n. (((*) a) ^^ n)) 1 ms" unfolding prod_mset.eq_fold apply (rule comp_fun_commute.DAList_Multiset_fold) apply unfold_locales diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Library/Discrete.thy --- a/src/HOL/Library/Discrete.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Library/Discrete.thy Mon Sep 24 23:49:43 2018 +0200 @@ -274,7 +274,7 @@ then have "q * Max {m. m * m \ n} = Max (times q ` {m. m * m \ n})" using sqrt_aux [of n] by (auto simp add: power2_eq_square intro: mono_Max_commute) then have "Max {m. m * m \ n} * q = Max (times q ` {m. m * m \ n})" by (simp add: ac_simps) - moreover have "finite (( * ) q ` {m. m * m \ n})" + moreover have "finite ((*) q ` {m. m * m \ n})" by (metis (mono_tags) finite_imageI finite_less_ub le_square) moreover have "\x. x * x \ n" by (metis \q * q \ n\) @@ -282,7 +282,7 @@ by simp (metis \q * q \ n\ le_cases mult_le_mono1 mult_le_mono2 order_trans) qed qed - then have "Max (( * ) (Max {m. m * m \ n}) ` {m. m * m \ n}) \ n" + then have "Max ((*) (Max {m. m * m \ n}) ` {m. m * m \ n}) \ n" apply (subst Max_le_iff) apply (metis (mono_tags) finite_imageI finite_less_ub le_square) apply auto diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Library/Extended_Nonnegative_Real.thy --- a/src/HOL/Library/Extended_Nonnegative_Real.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Library/Extended_Nonnegative_Real.thy Mon Sep 24 23:49:43 2018 +0200 @@ -262,7 +262,7 @@ lift_definition one_ennreal :: ennreal is 1 by simp lift_definition zero_ennreal :: ennreal is 0 by simp lift_definition plus_ennreal :: "ennreal \ ennreal \ ennreal" is "(+)" by simp -lift_definition times_ennreal :: "ennreal \ ennreal \ ennreal" is "( * )" by simp +lift_definition times_ennreal :: "ennreal \ ennreal \ ennreal" is "(*)" by simp instance by standard (transfer; auto simp: field_simps ereal_right_distrib)+ diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Library/Float.thy --- a/src/HOL/Library/Float.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Library/Float.thy Mon Sep 24 23:49:43 2018 +0200 @@ -202,7 +202,7 @@ lift_definition plus_float :: "float \ float \ float" is "(+)" by simp declare plus_float.rep_eq[simp] -lift_definition times_float :: "float \ float \ float" is "( * )" by simp +lift_definition times_float :: "float \ float \ float" is "(*)" by simp declare times_float.rep_eq[simp] lift_definition minus_float :: "float \ float \ float" is "(-)" by simp diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Library/ListVector.thy --- a/src/HOL/Library/ListVector.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Library/ListVector.thy Mon Sep 24 23:49:43 2018 +0200 @@ -13,7 +13,7 @@ text\Multiplication with a scalar:\ abbreviation scale :: "('a::times) \ 'a list \ 'a list" (infix "*\<^sub>s" 70) -where "x *\<^sub>s xs \ map (( * ) x) xs" +where "x *\<^sub>s xs \ map ((*) x) xs" lemma scale1[simp]: "(1::'a::monoid_mult) *\<^sub>s xs = xs" by (induct xs) simp_all diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Library/Sum_of_Squares/sum_of_squares.ML --- a/src/HOL/Library/Sum_of_Squares/sum_of_squares.ML Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Library/Sum_of_Squares/sum_of_squares.ML Mon Sep 24 23:49:43 2018 +0200 @@ -221,7 +221,7 @@ val neg_tm = \<^cterm>\uminus :: real \ _\ val add_tm = \<^cterm>\(+) :: real \ _\ val sub_tm = \<^cterm>\(-) :: real \ _\ - val mul_tm = \<^cterm>\( * ) :: real \ _\ + val mul_tm = \<^cterm>\(*) :: real \ _\ val inv_tm = \<^cterm>\inverse :: real \ _\ val div_tm = \<^cterm>\(/) :: real \ _\ val pow_tm = \<^cterm>\(^) :: real \ _\ @@ -862,7 +862,7 @@ Free (_, \<^typ>\real\) => if not (member (op aconvc) fvs tm) then (@1, tm) else raise Failure "substitutable_monomial" - | \<^term>\( * ) :: real \ _\ $ _ $ (Free _) => + | \<^term>\(*) :: real \ _\ $ _ $ (Free _) => if RealArith.is_ratconst (Thm.dest_arg1 tm) andalso not (member (op aconvc) fvs (Thm.dest_arg tm)) then (RealArith.dest_ratconst (Thm.dest_arg1 tm), Thm.dest_arg tm) @@ -899,7 +899,7 @@ val (c,v) = substitutable_monomial [] (Thm.dest_arg1(concl th)) val th1 = Drule.arg_cong_rule - (Thm.apply \<^cterm>\( * ) :: real \ _\ (RealArith.cterm_of_rat (Rat.inv c))) + (Thm.apply \<^cterm>\(*) :: real \ _\ (RealArith.cterm_of_rat (Rat.inv c))) (mk_meta_eq th) val th2 = fconv_rule (binop_conv (real_poly_mul_conv ctxt)) th1 in fconv_rule (arg_conv (real_poly_conv ctxt)) (isolate_variable v th2) end @@ -943,7 +943,7 @@ \<^term>\(=) :: real \ _\, \<^term>\(<) :: real \ _\, \<^term>\(\) :: real \ _\, \<^term>\(+) :: real \ _\, \<^term>\(-) :: real \ _\, - \<^term>\( * ) :: real \ _\, \<^term>\uminus :: real \ _\, + \<^term>\(*) :: real \ _\, \<^term>\uminus :: real \ _\, \<^term>\(/) :: real \ _\, \<^term>\inverse :: real \ _\, \<^term>\(^) :: real \ _\, \<^term>\abs :: real \ _\, \<^term>\min :: real \ _\, \<^term>\max :: real \ _\, diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Library/positivstellensatz.ML --- a/src/HOL/Library/positivstellensatz.ML Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Library/positivstellensatz.ML Mon Sep 24 23:49:43 2018 +0200 @@ -328,13 +328,13 @@ let val m' = FuncUtil.dest_monomial m val vps = fold_rev (fn (x,k) => cons (cterm_of_varpow x k)) m' [] - in foldr1 (fn (s, t) => Thm.apply (Thm.apply \<^cterm>\( * ) :: real \ _\ s) t) vps + in foldr1 (fn (s, t) => Thm.apply (Thm.apply \<^cterm>\(*) :: real \ _\ s) t) vps end fun cterm_of_cmonomial (m,c) = if FuncUtil.Ctermfunc.is_empty m then cterm_of_rat c else if c = @1 then cterm_of_monomial m - else Thm.apply (Thm.apply \<^cterm>\( * )::real \ _\ (cterm_of_rat c)) (cterm_of_monomial m); + else Thm.apply (Thm.apply \<^cterm>\(*)::real \ _\ (cterm_of_rat c)) (cterm_of_monomial m); fun cterm_of_poly p = if FuncUtil.Monomialfunc.is_empty p then \<^cterm>\0::real\ @@ -680,7 +680,7 @@ in if opr aconvc \<^cterm>\(+) :: real \ _\ then linear_add (lin_of_hol l) (lin_of_hol r) - else if opr aconvc \<^cterm>\( * ) :: real \ _\ + else if opr aconvc \<^cterm>\(*) :: real \ _\ andalso is_ratconst l then FuncUtil.Ctermfunc.onefunc (r, dest_ratconst l) else FuncUtil.Ctermfunc.onefunc (ct, @1) end diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Limits.thy --- a/src/HOL/Limits.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Limits.thy Mon Sep 24 23:49:43 2018 +0200 @@ -826,7 +826,7 @@ lemma continuous_on_mult_const [simp]: fixes c::"'a::real_normed_algebra" - shows "continuous_on s (( *) c)" + shows "continuous_on s ((*) c)" by (intro continuous_on_mult_left continuous_on_id) lemma tendsto_divide_zero: diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Matrix_LP/Matrix.thy --- a/src/HOL/Matrix_LP/Matrix.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Matrix_LP/Matrix.thy Mon Sep 24 23:49:43 2018 +0200 @@ -1487,7 +1487,7 @@ begin definition - times_matrix_def: "A * B = mult_matrix (( * )) (+) A B" + times_matrix_def: "A * B = mult_matrix ((*)) (+) A B" instance .. @@ -1795,7 +1795,7 @@ by (simp add: move_matrix_ortho[of "A*B"] move_matrix_col_mult move_matrix_row_mult) definition scalar_mult :: "('a::ring) \ 'a matrix \ 'a matrix" where - "scalar_mult a m == apply_matrix (( * ) a) m" + "scalar_mult a m == apply_matrix ((*) a) m" lemma scalar_mult_zero[simp]: "scalar_mult y 0 = 0" by (simp add: scalar_mult_def) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Modules.thy --- a/src/HOL/Modules.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Modules.thy Mon Sep 24 23:49:43 2018 +0200 @@ -878,9 +878,9 @@ lemma module_hom_compose_scale: "module_hom s1 s2 (\x. s2 (f x) (c))" - if "module_hom s1 ( *) f" + if "module_hom s1 (*) f" proof - - interpret mh: module_hom s1 "( *)" f by fact + interpret mh: module_hom s1 "(*)" f by fact show ?thesis by unfold_locales (simp_all add: mh.add mh.scale m2.scale_left_distrib) qed @@ -913,7 +913,7 @@ using module_axioms module_hom_iff scale_left_commute scale_right_distrib by blast lemma module_hom_scale_left[simp]: - "module_hom ( *) scale (\r. scale r x)" + "module_hom (*) scale (\r. scale r x)" by unfold_locales (auto simp: algebra_simps) lemma module_hom_id: "module_hom scale scale id" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Nonstandard_Analysis/HDeriv.thy --- a/src/HOL/Nonstandard_Analysis/HDeriv.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Nonstandard_Analysis/HDeriv.thy Mon Sep 24 23:49:43 2018 +0200 @@ -223,7 +223,7 @@ lemma NSDERIV_Id [simp]: "NSDERIV (\x. x) x :> 1" by (simp add: NSDERIV_NSLIM_iff NSLIM_def del: divide_self_if) -lemma NSDERIV_cmult_Id [simp]: "NSDERIV (( * ) c) x :> c" +lemma NSDERIV_cmult_Id [simp]: "NSDERIV ((*) c) x :> c" using NSDERIV_Id [THEN NSDERIV_cmult] by simp lemma NSDERIV_inverse: diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Nonstandard_Analysis/StarDef.thy --- a/src/HOL/Nonstandard_Analysis/StarDef.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Nonstandard_Analysis/StarDef.thy Mon Sep 24 23:49:43 2018 +0200 @@ -413,7 +413,7 @@ instantiation star :: (times) times begin - definition star_mult_def: "(( * )) \ *f2* (( * ))" + definition star_mult_def: "((*)) \ *f2* ((*))" instance .. end diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Number_Theory/Pocklington.thy --- a/src/HOL/Number_Theory/Pocklington.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Number_Theory/Pocklington.thy Mon Sep 24 23:49:43 2018 +0200 @@ -731,7 +731,7 @@ (* FIXME some overlap with material in UniqueFactorization, class unique_factorization *) -definition "primefact ps n \ foldr ( * ) ps 1 = n \ (\p\ set ps. prime p)" +definition "primefact ps n \ foldr (*) ps 1 = n \ (\p\ set ps. prime p)" lemma primefact: fixes n :: nat @@ -743,8 +743,8 @@ from assms have "n = prod_mset (prime_factorization n)" by (simp add: prod_mset_prime_factorization) also have "\ = prod_mset (mset xs)" by (simp add: xs) - also have "\ = foldr ( * ) xs 1" by (induct xs) simp_all - finally have "foldr ( * ) xs 1 = n" .. + also have "\ = foldr (*) xs 1" by (induct xs) simp_all + finally have "foldr (*) xs 1 = n" .. moreover from xs have "\p\#mset xs. prime p" by auto ultimately have "primefact xs n" by (auto simp: primefact_def) then show ?thesis .. @@ -763,10 +763,10 @@ next case (Cons q qs) from Cons.prems[unfolded primefact_def] - have q: "prime q" "q * foldr ( * ) qs 1 = n" "\p \set qs. prime p" - and p: "prime p" "p dvd q * foldr ( * ) qs 1" + have q: "prime q" "q * foldr (*) qs 1 = n" "\p \set qs. prime p" + and p: "prime p" "p dvd q * foldr (*) qs 1" by simp_all - consider "p dvd q" | "p dvd foldr ( * ) qs 1" + consider "p dvd q" | "p dvd foldr (*) qs 1" by (metis p prime_dvd_mult_eq_nat) then show ?case proof cases @@ -776,19 +776,19 @@ then show ?thesis by simp next case prem: 2 - from q(3) have pqs: "primefact qs (foldr ( * ) qs 1)" + from q(3) have pqs: "primefact qs (foldr (*) qs 1)" by (simp add: primefact_def) from Cons.hyps[OF pqs p(1) prem] show ?thesis by simp qed qed -lemma primefact_variant: "primefact ps n \ foldr ( * ) ps 1 = n \ list_all prime ps" +lemma primefact_variant: "primefact ps n \ foldr (*) ps 1 = n \ list_all prime ps" by (auto simp add: primefact_def list_all_iff) text \Variant of Lucas theorem.\ lemma lucas_primefact: assumes n: "n \ 2" and an: "[a^(n - 1) = 1] (mod n)" - and psn: "foldr ( * ) ps 1 = n - 1" + and psn: "foldr (*) ps 1 = n - 1" and psp: "list_all (\p. prime p \ \ [a^((n - 1) div p) = 1] (mod n)) ps" shows "prime n" proof - @@ -806,7 +806,7 @@ text \Variant of Pocklington theorem.\ lemma pocklington_primefact: assumes n: "n \ 2" and qrn: "q*r = n - 1" and nq2: "n \ q\<^sup>2" - and arnb: "(a^r) mod n = b" and psq: "foldr ( * ) ps 1 = q" + and arnb: "(a^r) mod n = b" and psq: "foldr (*) ps 1 = q" and bqn: "(b^q) mod n = 1" and psp: "list_all (\p. prime p \ coprime ((b^(q div p)) mod n - 1) n) ps" shows "prime n" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Number_Theory/Totient.thy --- a/src/HOL/Number_Theory/Totient.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Number_Theory/Totient.thy Mon Sep 24 23:49:43 2018 +0200 @@ -239,11 +239,11 @@ assumes "prime p" shows "totient (p ^ Suc n) = p ^ n * (p - 1)" proof - - from assms have "totient (p ^ Suc n) = card ({0<..p ^ Suc n} - ( * ) p ` {0<..p ^ n})" + from assms have "totient (p ^ Suc n) = card ({0<..p ^ Suc n} - (*) p ` {0<..p ^ n})" unfolding totient_def by (subst totatives_prime_power_Suc) simp_all - also from assms have "\ = p ^ Suc n - card (( * ) p ` {0<..p^n})" + also from assms have "\ = p ^ Suc n - card ((*) p ` {0<..p^n})" by (subst card_Diff_subset) (auto intro: prime_gt_0_nat) - also from assms have "card (( * ) p ` {0<..p^n}) = p ^ n" + also from assms have "card ((*) p ` {0<..p^n}) = p ^ n" by (subst card_image) (auto simp: inj_on_def) also have "p ^ Suc n - p ^ n = p ^ n * (p - 1)" by (simp add: algebra_simps) finally show ?thesis . diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Probability/Independent_Family.thy --- a/src/HOL/Probability/Independent_Family.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Probability/Independent_Family.thy Mon Sep 24 23:49:43 2018 +0200 @@ -1165,7 +1165,7 @@ also have "...= prob (X -` A \ space M) * prob (Y -` B \ space M)" by (auto intro!: indep_varD[where Ma=N and Mb=N]) also have "... = \

(x in M. X x \ A) * \

(x in M. Y x \ B)" - by (auto intro!: arg_cong2[where f= "( * )"] arg_cong[where f= prob]) + by (auto intro!: arg_cong2[where f= "(*)"] arg_cong[where f= prob]) finally show ?thesis . qed diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Probability/PMF_Impl.thy --- a/src/HOL/Probability/PMF_Impl.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Probability/PMF_Impl.thy Mon Sep 24 23:49:43 2018 +0200 @@ -231,7 +231,7 @@ qualified lemma mapping_of_bind_pmf: assumes "finite (set_pmf p)" shows "mapping_of_pmf (bind_pmf p f) = - fold_combine_plus (\x. Mapping.map_values (\_. ( * ) (pmf p x)) + fold_combine_plus (\x. Mapping.map_values (\_. (*) (pmf p x)) (mapping_of_pmf (f x))) (set_pmf p)" using assms by (intro mapping_of_pmfI') @@ -268,7 +268,7 @@ lemma bind_pmf_aux_code_aux: assumes "finite A" shows "bind_pmf_aux p f A = - fold_combine_plus (\x. Mapping.map_values (\_. ( * ) (pmf p x)) + fold_combine_plus (\x. Mapping.map_values (\_. (*) (pmf p x)) (mapping_of_pmf (f x))) A" (is "?lhs = ?rhs") proof (intro mapping_eqI'[where d = 0]) fix x assume "x \ Mapping.keys ?lhs" @@ -287,7 +287,7 @@ lemma bind_pmf_aux_code [code]: "bind_pmf_aux p f (set xs) = - fold_combine_plus (\x. Mapping.map_values (\_. ( * ) (pmf p x)) + fold_combine_plus (\x. Mapping.map_values (\_. (*) (pmf p x)) (mapping_of_pmf (f x))) (set xs)" by (rule bind_pmf_aux_code_aux) simp_all diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Quotient_Examples/Quotient_Int.thy --- a/src/HOL/Quotient_Examples/Quotient_Int.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Quotient_Examples/Quotient_Int.thy Mon Sep 24 23:49:43 2018 +0200 @@ -78,7 +78,7 @@ done quotient_definition - "(( * )) :: (int \ int \ int)" is "times_int_raw" + "((*)) :: (int \ int \ int)" is "times_int_raw" apply(rule equivp_transp[OF int_equivp]) apply(rule times_int_raw_fst) apply(assumption) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Quotient_Examples/Quotient_Rat.thy --- a/src/HOL/Quotient_Examples/Quotient_Rat.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Quotient_Examples/Quotient_Rat.thy Mon Sep 24 23:49:43 2018 +0200 @@ -41,7 +41,7 @@ "times_rat_raw (a :: int, b :: int) (c, d) = (a * c, b * d)" quotient_definition - "(( * )) :: (rat \ rat \ rat)" is times_rat_raw by (auto simp add: mult.assoc mult.left_commute) + "((*)) :: (rat \ rat \ rat)" is times_rat_raw by (auto simp add: mult.assoc mult.left_commute) fun plus_rat_raw where "plus_rat_raw (a :: int, b :: int) (c, d) = (a * d + c * b, b * d)" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Real.thy --- a/src/HOL/Real.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Real.thy Mon Sep 24 23:49:43 2018 +0200 @@ -32,7 +32,7 @@ for x :: "'a::cancel_semigroup_add" by (meson add_left_imp_eq injI) -lemma inj_mult_left [simp]: "inj (( * ) x) \ x \ 0" +lemma inj_mult_left [simp]: "inj ((*) x) \ x \ 0" for x :: "'a::idom" by (metis injI mult_cancel_left the_inv_f_f zero_neq_one) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Real_Asymp/Multiseries_Expansion.thy --- a/src/HOL/Real_Asymp/Multiseries_Expansion.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Real_Asymp/Multiseries_Expansion.thy Mon Sep 24 23:49:43 2018 +0200 @@ -603,7 +603,7 @@ hence "(\n. (-(x^2))^n) sums (1 / (1 - (-(x^2))))" by (intro geometric_sums) simp_all also have "1 - (-(x^2)) = 1 + x^2" by simp also have "(\n. (-(x^2))^n) = (\n. ?f (2*n))" by (auto simp: fun_eq_iff power_minus' power_mult) - also have "range (( *) (2::nat)) = {n. even n}" + also have "range ((*) (2::nat)) = {n. even n}" by (auto elim!: evenE) hence "(\n. ?f (2*n)) sums (1 / (1 + x^2)) \ ?f sums (1 / (1 + x^2))" by (intro sums_mono_reindex) (simp_all add: strict_mono_Suc_iff) @@ -1225,11 +1225,11 @@ | (xs, MSLNil) \ MSLNil | (MSLCons x xs, MSLCons y ys) \ MSLCons (fst x * fst y, snd x + snd y) - (plus_ms_aux (mslmap (map_prod (( *) (fst x)) ((+) (snd x))) ys) + (plus_ms_aux (mslmap (map_prod ((*) (fst x)) ((+) (snd x))) ys) (times_ms_aux xs (MSLCons y ys))))" definition scale_shift_ms_aux :: "('a :: times \ real) \ ('a \ real) msllist \ ('a \ real) msllist" where - "scale_shift_ms_aux = (\(a,b) xs. mslmap (map_prod (( *) a) ((+) b)) xs)" + "scale_shift_ms_aux = (\(a,b) xs. mslmap (map_prod ((*) a) ((+) b)) xs)" lemma times_ms_aux_altdef: "times_ms_aux xs ys = @@ -1282,7 +1282,7 @@ qed lemma scale_shift_ms_aux_conv_mslmap: - "scale_shift_ms_aux x = mslmap (map_prod (( *) (fst x)) ((+) (snd x)))" + "scale_shift_ms_aux x = mslmap (map_prod ((*) (fst x)) ((+) (snd x)))" by (rule ext) (simp add: scale_shift_ms_aux_def map_prod_def case_prod_unfold) fun inverse_ms_aux :: "('a :: multiseries \ real) msllist \ ('a \ real) msllist" where @@ -2525,7 +2525,7 @@ have "times_ms_aux (MSLCons (const_expansion 1, 0) MSLNil) xs = xs" for xs :: "('a \ real) msllist" proof (coinduction arbitrary: xs rule: msllist.coinduct_upto) case Eq_real_prod_msllist - have "map_prod (( *) (const_expansion 1 :: 'a)) ((+) (0::real)) = (\x. x)" + have "map_prod ((*) (const_expansion 1 :: 'a)) ((+) (0::real)) = (\x. x)" by (rule ext) (simp add: map_prod_def times_const_expansion_1 case_prod_unfold) moreover have "mslmap \ = (\x. x)" by (rule ext) (simp add: msllist.map_ident) ultimately have "scale_shift_ms_aux (const_expansion 1 :: 'a, 0) = (\x. x)" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Real_Asymp/Real_Asymp_Approx.thy --- a/src/HOL/Real_Asymp/Real_Asymp_Approx.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Real_Asymp/Real_Asymp_Approx.thy Mon Sep 24 23:49:43 2018 +0200 @@ -39,7 +39,7 @@ fun eval_nat (@{term "(+) :: nat => _"} $ a $ b) = bin (op +) (a, b) | eval_nat (@{term "(-) :: nat => _"} $ a $ b) = bin (clamp o op -) (a, b) - | eval_nat (@{term "( * ) :: nat => _"} $ a $ b) = bin (op *) (a, b) + | eval_nat (@{term "(*) :: nat => _"} $ a $ b) = bin (op *) (a, b) | eval_nat (@{term "(div) :: nat => _"} $ a $ b) = bin Int.div (a, b) | eval_nat (@{term "(^) :: nat => _"} $ a $ b) = bin (fn (a,b) => Integer.pow a b) (a, b) | eval_nat (t as (@{term "numeral :: _ => nat"} $ _)) = snd (HOLogic.dest_number t) @@ -65,7 +65,7 @@ fun eval (@{term "(+) :: real => _"} $ a $ b) = eval a + eval b | eval (@{term "(-) :: real => _"} $ a $ b) = eval a - eval b - | eval (@{term "( * ) :: real => _"} $ a $ b) = eval a * eval b + | eval (@{term "(*) :: real => _"} $ a $ b) = eval a * eval b | eval (@{term "(/) :: real => _"} $ a $ b) = let val a = eval a; val b = eval b in if Real.==(b, Real.fromInt 0) then nan else a / b diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Real_Asymp/exp_log_expression.ML --- a/src/HOL/Real_Asymp/exp_log_expression.ML Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Real_Asymp/exp_log_expression.ML Mon Sep 24 23:49:43 2018 +0200 @@ -257,7 +257,7 @@ | expr_to_term' (Add (a, b)) = @{term "(+) :: real => _"} $ expr_to_term' a $ expr_to_term' b | expr_to_term' (Mult (a, b)) = - @{term "( *) :: real => _"} $ expr_to_term' a $ expr_to_term' b + @{term "(*) :: real => _"} $ expr_to_term' a $ expr_to_term' b | expr_to_term' (Minus (a, b)) = @{term "(-) :: real => _"} $ expr_to_term' a $ expr_to_term' b | expr_to_term' (Div (a, b)) = @@ -354,7 +354,7 @@ Add (reify' s, reify' t) | reify'' (@{term "(-) :: real => _"} $ s $ t) = Minus (reify' s, reify' t) - | reify'' (@{term "( *) :: real => _"} $ s $ t) = + | reify'' (@{term "(*) :: real => _"} $ s $ t) = Mult (reify' s, reify' t) | reify'' (@{term "(/) :: real => _"} $ s $ t) = Div (reify' s, reify' t) @@ -435,7 +435,7 @@ Add (reify'' s, reify'' t) | reify'' (@{term "(-) :: real => _"} $ s $ t) = Minus (reify'' s, reify'' t) - | reify'' (@{term "( *) :: real => _"} $ s $ t) = + | reify'' (@{term "(*) :: real => _"} $ s $ t) = Mult (reify'' s, reify'' t) | reify'' (@{term "(/) :: real => _"} $ s $ t) = Div (reify'' s, reify'' t) @@ -509,7 +509,7 @@ "(" ^ simple_print_const a ^ "+" ^ simple_print_const b ^ ")" | simple_print_const (@{term "(-) :: real => _"} $ a $ b) = "(" ^ simple_print_const a ^ "-" ^ simple_print_const b ^ ")" - | simple_print_const (@{term "( * ) :: real => _"} $ a $ b) = + | simple_print_const (@{term "(*) :: real => _"} $ a $ b) = "(" ^ simple_print_const a ^ "*" ^ simple_print_const b ^ ")" | simple_print_const (@{term "inverse :: real => _"} $ a) = "(1 / " ^ simple_print_const a ^ ")" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Real_Asymp/multiseries_expansion.ML --- a/src/HOL/Real_Asymp/multiseries_expansion.ML Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Real_Asymp/multiseries_expansion.ML Mon Sep 24 23:49:43 2018 +0200 @@ -2262,7 +2262,7 @@ else if b aconv @{term "\_::real. -1 :: real"} then Term.betapply (@{term "\(f::real\real) x. -f x"}, a) else - Abs ("x", @{typ real}, @{term "( *) :: real => _"} $ + Abs ("x", @{typ real}, @{term "(*) :: real => _"} $ (Term.betapply (a, Bound 0)) $ (Term.betapply (b, Bound 0))) fun mk_powr b e = diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Real_Vector_Spaces.thy --- a/src/HOL/Real_Vector_Spaces.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Real_Vector_Spaces.thy Mon Sep 24 23:49:43 2018 +0200 @@ -53,8 +53,8 @@ end global_interpretation real_vector?: vector_space "scaleR :: real \ 'a \ 'a::real_vector" - rewrites "Vector_Spaces.linear ( *\<^sub>R) ( *\<^sub>R) = linear" - and "Vector_Spaces.linear ( *) ( *\<^sub>R) = linear" + rewrites "Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) = linear" + and "Vector_Spaces.linear (*) (*\<^sub>R) = linear" defines dependent_raw_def: dependent = real_vector.dependent and representation_raw_def: representation = real_vector.representation and subspace_raw_def: subspace = real_vector.subspace @@ -82,8 +82,8 @@ abbreviation "independent x \ \ dependent x" global_interpretation real_vector?: vector_space_pair "scaleR::_\_\'a::real_vector" "scaleR::_\_\'b::real_vector" - rewrites "Vector_Spaces.linear ( *\<^sub>R) ( *\<^sub>R) = linear" - and "Vector_Spaces.linear ( *) ( *\<^sub>R) = linear" + rewrites "Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) = linear" + and "Vector_Spaces.linear (*) (*\<^sub>R) = linear" defines construct_raw_def: construct = real_vector.construct apply unfold_locales unfolding linear_def real_scaleR_def @@ -1316,7 +1316,7 @@ corollary real_linearD: fixes f :: "real \ real" - assumes "linear f" obtains c where "f = ( *) c" + assumes "linear f" obtains c where "f = (*) c" by (rule linear_imp_scaleR [OF assms]) (force simp: scaleR_conv_of_real) lemma linear_times_of_real: "linear (\x. a * of_real x)" @@ -1439,7 +1439,7 @@ lemma comp1: assumes "bounded_linear g" - shows "bounded_bilinear (\x. ( **) (g x))" + shows "bounded_bilinear (\x. (**) (g x))" proof unfold_locales interpret g: bounded_linear g by fact show "\a a' b. g (a + a') ** b = g a ** b + g a' ** b" @@ -1537,7 +1537,7 @@ qed qed -lemma bounded_bilinear_mult: "bounded_bilinear (( *) :: 'a \ 'a \ 'a::real_normed_algebra)" +lemma bounded_bilinear_mult: "bounded_bilinear ((*) :: 'a \ 'a \ 'a::real_normed_algebra)" apply (rule bounded_bilinear.intro) apply (auto simp: algebra_simps) apply (rule_tac x=1 in exI) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/SMT.thy --- a/src/HOL/SMT.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/SMT.thy Mon Sep 24 23:49:43 2018 +0200 @@ -134,7 +134,7 @@ lemma Suc_as_int: "Suc = (\a. nat (int a + 1))" by (rule ext) simp lemma nat_plus_as_int: "(+) = (\a b. nat (int a + int b))" by (rule ext)+ simp lemma nat_minus_as_int: "(-) = (\a b. nat (int a - int b))" by (rule ext)+ simp -lemma nat_times_as_int: "( * ) = (\a b. nat (int a * int b))" by (simp add: nat_mult_distrib) +lemma nat_times_as_int: "(*) = (\a b. nat (int a * int b))" by (simp add: nat_mult_distrib) lemma nat_div_as_int: "(div) = (\a b. nat (int a div int b))" by (simp add: nat_div_distrib) lemma nat_mod_as_int: "(mod) = (\a b. nat (int a mod int b))" by (simp add: nat_mod_distrib) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/SMT_Examples/boogie.ML --- a/src/HOL/SMT_Examples/boogie.ML Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/SMT_Examples/boogie.ML Mon Sep 24 23:49:43 2018 +0200 @@ -139,7 +139,7 @@ parse_bin_expr cx (mk_binary @{term "(<=) :: int => _"} o swap) ls | parse_expr cx (["+"] :: ls) = parse_bin_expr cx (mk_binary @{term "(+) :: int => _"}) ls | parse_expr cx (["-"] :: ls) = parse_bin_expr cx (mk_binary @{term "(-) :: int => _"}) ls - | parse_expr cx (["*"] :: ls) = parse_bin_expr cx (mk_binary @{term "( * ) :: int => _"}) ls + | parse_expr cx (["*"] :: ls) = parse_bin_expr cx (mk_binary @{term "(*) :: int => _"}) ls | parse_expr cx (["/"] :: ls) = parse_bin_expr cx (mk_binary @{term boogie_div}) ls | parse_expr cx (["%"] :: ls) = parse_bin_expr cx (mk_binary @{term boogie_mod}) ls | parse_expr cx (["select", n] :: ls) = diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Set_Interval.thy --- a/src/HOL/Set_Interval.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Set_Interval.thy Mon Sep 24 23:49:43 2018 +0200 @@ -1015,12 +1015,12 @@ context linordered_field begin lemma image_mult_atLeastAtMost [simp]: - "(( * ) d ` {a..b}) = {d*a..d*b}" if "d>0" + "((*) d ` {a..b}) = {d*a..d*b}" if "d>0" using that by (auto simp: field_simps mult_le_cancel_right intro: rev_image_eqI [where x="x/d" for x]) lemma image_mult_atLeastAtMost_if: - "( * ) c ` {x .. y} = + "(*) c ` {x .. y} = (if c > 0 then {c * x .. c * y} else if x \ y then {c * y .. c * x} else {})" proof - consider "c < 0" "x \ y" | "c = 0" "x \ y" | "c > 0" "x \ y" | "x > y" @@ -1028,7 +1028,7 @@ then show ?thesis proof cases case 1 - have "( * ) c ` {x .. y} = uminus ` ( * ) (- c) ` {x .. y}" + have "(*) c ` {x .. y} = uminus ` (*) (- c) ` {x .. y}" by (simp add: image_image) also have "\ = {c * y .. c * x}" using \c < 0\ @@ -1049,7 +1049,7 @@ else if 0 \ m then {m*a + c .. m *b + c} else {m*b + c .. m*a + c})" proof - - have "(\x. m*x + c) = ((\x. x + c) o ( * ) m)" + have "(\x. m*x + c) = ((\x. x + c) o (*) m)" unfolding image_comp[symmetric] by (simp add: o_def) then show ?thesis @@ -2474,7 +2474,7 @@ lemma prod_atLeastAtMost_code: "prod f {a..b} = fold_atLeastAtMost_nat (\a acc. f a * acc) a b 1" proof - - have "comp_fun_commute (\a. ( * ) (f a))" + have "comp_fun_commute (\a. (*) (f a))" by unfold_locales (auto simp: o_def mult_ac) thus ?thesis by (simp add: prod.eq_fold fold_atLeastAtMost_nat o_def) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/TLA/Intensional.thy --- a/src/HOL/TLA/Intensional.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/TLA/Intensional.thy Mon Sep 24 23:49:43 2018 +0200 @@ -119,7 +119,7 @@ "_liftIf" == "_lift3 (CONST If)" "_liftPlus" == "_lift2 (+)" "_liftMinus" == "_lift2 (-)" - "_liftTimes" == "_lift2 (( * ))" + "_liftTimes" == "_lift2 ((*))" "_liftDiv" == "_lift2 (div)" "_liftMod" == "_lift2 (mod)" "_liftLess" == "_lift2 (<)" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Tools/Qelim/cooper.ML --- a/src/HOL/Tools/Qelim/cooper.ML Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Tools/Qelim/cooper.ML Mon Sep 24 23:49:43 2018 +0200 @@ -23,7 +23,7 @@ val allowed_consts = [@{term "(+) :: int => _"}, @{term "(+) :: nat => _"}, @{term "(-) :: int => _"}, @{term "(-) :: nat => _"}, - @{term "( * ) :: int => _"}, @{term "( * ) :: nat => _"}, + @{term "(*) :: int => _"}, @{term "(*) :: nat => _"}, @{term "(div) :: int => _"}, @{term "(div) :: nat => _"}, @{term "(mod) :: int => _"}, @{term "(mod) :: nat => _"}, @{term HOL.conj}, @{term HOL.disj}, @{term HOL.implies}, @@ -171,7 +171,7 @@ val infDFalse = Thm.instantiate' [] [SOME false_tm] infDP; val cadd = @{cterm "(+) :: int => _"} -val cmulC = @{cterm "( * ) :: int => _"} +val cmulC = @{cterm "(*) :: int => _"} val cminus = @{cterm "(-) :: int => _"} val cone = @{cterm "1 :: int"} val [addC, mulC, subC] = map Thm.term_of [cadd, cmulC, cminus] @@ -662,7 +662,7 @@ | term_of_num vs (Proc.Sub (t1, t2)) = @{term "(-) :: int => _"} $ term_of_num vs t1 $ term_of_num vs t2 | term_of_num vs (Proc.Mul (i, t2)) = - @{term "( * ) :: int => _"} $ HOLogic.mk_number HOLogic.intT (Proc.integer_of_int i) $ term_of_num vs t2 + @{term "(*) :: int => _"} $ HOLogic.mk_number HOLogic.intT (Proc.integer_of_int i) $ term_of_num vs t2 | term_of_num vs (Proc.CN (n, i, t')) = term_of_num vs (Proc.Add (Proc.Mul (i, Proc.Bound n), t')); @@ -765,7 +765,7 @@ if not (member (op =) [HOLogic.intT, HOLogic.natT, HOLogic.boolT] (Thm.typ_of_cterm t)) then false else case Thm.term_of t of - c$l$r => if member (op =) [@{term"( * )::int => _"}, @{term"( * )::nat => _"}] c + c$l$r => if member (op =) [@{term"(*)::int => _"}, @{term"(*)::nat => _"}] c then not (isnum l orelse isnum r) else not (member (op aconv) cts c) | c$_ => not (member (op aconv) cts c) diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Types_To_Sets/Examples/Linear_Algebra_On.thy --- a/src/HOL/Types_To_Sets/Examples/Linear_Algebra_On.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Types_To_Sets/Examples/Linear_Algebra_On.thy Mon Sep 24 23:49:43 2018 +0200 @@ -61,13 +61,13 @@ definition dependent :: "'b set \ bool" where dependent_on_def: "dependent s \ (\t u. finite t \ t \ s \ (sum (\v. u v *s v) t = 0 \ (\v\t. u v \ 0)))" -lemma implicit_subspace_with[implicit_ab_group_add]: "subspace_with (+) 0 ( *s) = subspace" +lemma implicit_subspace_with[implicit_ab_group_add]: "subspace_with (+) 0 (*s) = subspace" unfolding subspace_on_def subspace_with_def .. -lemma implicit_dependent_with[implicit_ab_group_add]: "dependent_with (+) 0 ( *s) = dependent" +lemma implicit_dependent_with[implicit_ab_group_add]: "dependent_with (+) 0 (*s) = dependent" unfolding dependent_on_def dependent_with_def sum_with .. -lemma implicit_span_with[implicit_ab_group_add]: "span_with (+) 0 ( *s) = span" +lemma implicit_span_with[implicit_ab_group_add]: "span_with (+) 0 (*s) = span" unfolding span_on_def span_with_def sum_with .. end @@ -109,7 +109,7 @@ then card (SOME b. b \ S \ \ dependent b \ span b = span V) else 0)" -lemma implicit_dim_with[implicit_ab_group_add]: "dim_on_with S (+) 0 ( *s) = dim" +lemma implicit_dim_with[implicit_ab_group_add]: "dim_on_with S (+) 0 (*s) = dim" unfolding dim_on_with_def dim_def implicit_ab_group_add .. end diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Vector_Spaces.thy --- a/src/HOL/Vector_Spaces.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Vector_Spaces.thy Mon Sep 24 23:49:43 2018 +0200 @@ -77,10 +77,10 @@ lemma linear_imp_scale: fixes D::"'a \ 'b" - assumes "linear ( *) scale D" + assumes "linear (*) scale D" obtains d where "D = (\x. scale x d)" proof - - interpret linear "( *)" scale D by fact + interpret linear "(*)" scale D by fact show ?thesis by (metis mult.commute mult.left_neutral scale that) qed @@ -806,7 +806,7 @@ lemma in_span_in_range_construct: "x \ range (construct B f)" if i: "vs1.independent B" and x: "x \ vs2.span (f ` B)" proof - - interpret linear "( *a)" "( *b)" "construct B f" + interpret linear "(*a)" "(*b)" "construct B f" using i by (rule linear_construct) obtain bb :: "('b \ 'c) \ ('b \ 'c) \ 'b set \ 'b" where "\x0 x1 x2. (\v4. v4 \ x2 \ x1 v4 \ x0 v4) = (bb x0 x1 x2 \ x2 \ x1 (bb x0 x1 x2) \ x0 (bb x0 x1 x2))" @@ -853,7 +853,7 @@ have fB: "vs2.independent (f ` B)" using independent_injective_image[OF B f] . let ?g = "p.construct (f ` B) (the_inv_into B f)" - show "linear ( *b) ( *a) ?g" + show "linear (*b) (*a) ?g" by (rule p.linear_construct[OF fB]) have "?g b \ vs1.span (the_inv_into B f ` f ` B)" for b by (intro p.construct_in_span fB) @@ -864,13 +864,13 @@ by (auto simp: V_eq) have "(?g \ f) v = id v" if "v \ vs1.span B" for v proof (rule vector_space_pair.linear_eq_on[where x=v]) - show "vector_space_pair ( *a) ( *a)" by unfold_locales - show "linear ( *a) ( *a) (?g \ f)" - proof (rule Vector_Spaces.linear_compose[of _ "( *b)"]) - show "linear ( *a) ( *b) f" + show "vector_space_pair (*a) (*a)" by unfold_locales + show "linear (*a) (*a) (?g \ f)" + proof (rule Vector_Spaces.linear_compose[of _ "(*b)"]) + show "linear (*a) (*b) f" by unfold_locales qed fact - show "linear ( *a) ( *a) id" by (rule vs1.linear_id) + show "linear (*a) (*a) id" by (rule vs1.linear_id) show "v \ vs1.span B" by fact show "b \ B \ (p.construct (f ` B) (the_inv_into B f) \ f) b = id b" for b by (simp add: p.construct_basis fB the_inv_into_f_f inj_on_subset[OF f vs1.span_superset]) @@ -895,7 +895,7 @@ proof (intro exI ballI conjI) interpret p: vector_space_pair s2 s1 by unfold_locales let ?g = "p.construct C g" - show "linear ( *b) ( *a) ?g" + show "linear (*b) (*a) ?g" by (rule p.linear_construct[OF C]) have "?g v \ vs1.span (g ` C)" for v by (rule p.construct_in_span[OF C]) @@ -903,10 +903,10 @@ finally show "?g ` UNIV \ V" by auto have "(f \ ?g) v = id v" if v: "v \ f ` V" for v proof (rule vector_space_pair.linear_eq_on[where x=v]) - show "vector_space_pair ( *b) ( *b)" by unfold_locales - show "linear ( *b) ( *b) (f \ ?g)" - by (rule Vector_Spaces.linear_compose[of _ "( *a)"]) fact+ - show "linear ( *b) ( *b) id" by (rule vs2.linear_id) + show "vector_space_pair (*b) (*b)" by unfold_locales + show "linear (*b) (*b) (f \ ?g)" + by (rule Vector_Spaces.linear_compose[of _ "(*a)"]) fact+ + show "linear (*b) (*b) id" by (rule vs2.linear_id) have "vs2.span (f ` B) = vs2.span C" using fB_C vs2.span_mono[of C "f ` B"] vs2.span_minimal[of "f`B" "vs2.span C"] by auto diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/Word/Word.thy --- a/src/HOL/Word/Word.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/Word/Word.thy Mon Sep 24 23:49:43 2018 +0200 @@ -273,7 +273,7 @@ lift_definition uminus_word :: "'a word \ 'a word" is uminus by (auto simp add: bintrunc_mod2p intro: mod_minus_cong) -lift_definition times_word :: "'a word \ 'a word \ 'a word" is "( * )" +lift_definition times_word :: "'a word \ 'a word \ 'a word" is "(*)" by (auto simp add: bintrunc_mod2p intro: mod_mult_cong) definition word_div_def: "a div b = word_of_int (uint a div uint b)" diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/ex/LocaleTest2.thy --- a/src/HOL/ex/LocaleTest2.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/ex/LocaleTest2.thy Mon Sep 24 23:49:43 2018 +0200 @@ -738,7 +738,7 @@ locale Dgrp = Dmonoid + - assumes unit [intro, simp]: "Dmonoid.unit (( ** )) one x" + assumes unit [intro, simp]: "Dmonoid.unit ((**)) one x" begin diff -r 765ff343a7aa -r 5ed7206dbf18 src/HOL/ex/Transfer_Int_Nat.thy --- a/src/HOL/ex/Transfer_Int_Nat.thy Mon Sep 24 22:10:24 2018 +0200 +++ b/src/HOL/ex/Transfer_Int_Nat.thy Mon Sep 24 23:49:43 2018 +0200 @@ -38,7 +38,7 @@ lemma ZN_add [transfer_rule]: "(ZN ===> ZN ===> ZN) (+) (+)" unfolding rel_fun_def ZN_def by simp -lemma ZN_mult [transfer_rule]: "(ZN ===> ZN ===> ZN) (( * )) (( * ))" +lemma ZN_mult [transfer_rule]: "(ZN ===> ZN ===> ZN) ((*)) ((*))" unfolding rel_fun_def ZN_def by simp definition tsub :: "int \ int \ int" diff -r 765ff343a7aa -r 5ed7206dbf18 src/Pure/Syntax/mixfix.ML --- a/src/Pure/Syntax/mixfix.ML Mon Sep 24 22:10:24 2018 +0200 +++ b/src/Pure/Syntax/mixfix.ML Mon Sep 24 23:49:43 2018 +0200 @@ -172,12 +172,8 @@ val binder_name = suffix "_binder"; fun mk_prefix sy = - let - fun star1 sys = (fst(hd sys) = "*"); - val sy' = Input.source_explode (Input.reset_pos sy); - val lpar = Symbol_Pos.explode0 ("'(" ^ (if star1 sy' then " " else "")); - val rpar = Symbol_Pos.explode0 ((if star1(rev sy') then " " else "") ^ "')") - in lpar @ sy' @ rpar end + let val sy' = Input.source_explode (Input.reset_pos sy); + in Symbol_Pos.explode0 "'(" @ sy' @ Symbol_Pos.explode0 "')" end fun syn_ext_consts logical_types const_decls = let