diff -r eb93cca4589a -r eb25bddf6a22 src/HOL/Multivariate_Analysis/Linear_Algebra.thy --- a/src/HOL/Multivariate_Analysis/Linear_Algebra.thy Thu Sep 26 16:33:32 2013 -0700 +++ b/src/HOL/Multivariate_Analysis/Linear_Algebra.thy Thu Sep 26 16:33:34 2013 -0700 @@ -193,7 +193,7 @@ lemma setsum_group: assumes fS: "finite S" and fT: "finite T" and fST: "f ` S \ T" - shows "setsum (\y. setsum g {x. x\ S \ f x = y}) T = setsum g S" + shows "setsum (\y. setsum g {x. x \ S \ f x = y}) T = setsum g S" apply (subst setsum_image_gen[OF fS, of g f]) apply (rule setsum_mono_zero_right[OF fT fST]) apply (auto intro: setsum_0') @@ -475,7 +475,7 @@ assumes lf: "linear f" shows "linear (adjoint f)" by (simp add: lf linear_iff euclidean_eq_iff[where 'a='n] euclidean_eq_iff[where 'a='m] - adjoint_clauses[OF lf] inner_simps) + adjoint_clauses[OF lf] inner_distrib) lemma adjoint_adjoint: fixes f:: "'n::euclidean_space \ 'm::euclidean_space" @@ -1505,13 +1505,9 @@ apply (simp add: inner_Basis inner_setsum_right eq_commute) done -lemma span_Basis[simp]: "span Basis = (UNIV :: 'a::euclidean_space set)" - apply (subst span_finite) - apply simp - apply (safe intro!: UNIV_I) - apply (rule_tac x="inner x" in exI) - apply (simp add: euclidean_representation) - done +lemma span_Basis [simp]: "span Basis = UNIV" + unfolding span_finite [OF finite_Basis] + by (fast intro: euclidean_representation) lemma in_span_Basis: "x \ span Basis" unfolding span_Basis .. @@ -1566,70 +1562,33 @@ fixes f:: "'a::euclidean_space \ 'b::real_normed_vector" assumes lf: "linear f" shows "\B. \x. norm (f x) \ B * norm x" -proof - +proof let ?B = "\b\Basis. norm (f b)" - { + show "\x. norm (f x) \ ?B * norm x" + proof fix x :: 'a let ?g = "\b. (x \ b) *\<^sub>R f b" have "norm (f x) = norm (f (\b\Basis. (x \ b) *\<^sub>R b))" unfolding euclidean_representation .. also have "\ = norm (setsum ?g Basis)" - using linear_setsum[OF lf finite_Basis, of "\b. (x \ b) *\<^sub>R b", unfolded o_def] linear_cmul[OF lf] - by auto + by (simp add: linear_setsum [OF lf] linear_cmul [OF lf]) finally have th0: "norm (f x) = norm (setsum ?g Basis)" . - { + have th: "\b\Basis. norm (?g b) \ norm (f b) * norm x" + proof fix i :: 'a assume i: "i \ Basis" from Basis_le_norm[OF i, of x] - have "norm (?g i) \ norm (f i) * norm x" + show "norm (?g i) \ norm (f i) * norm x" unfolding norm_scaleR apply (subst mult_commute) apply (rule mult_mono) apply (auto simp add: field_simps) done - } - then have th: "\b\Basis. norm (?g b) \ norm (f b) * norm x" - by metis + qed from setsum_norm_le[of _ ?g, OF th] - have "norm (f x) \ ?B * norm x" + show "norm (f x) \ ?B * norm x" unfolding th0 setsum_left_distrib by metis - } - then show ?thesis by blast -qed - -lemma linear_bounded_pos: - fixes f:: "'a::euclidean_space \ 'b::real_normed_vector" - assumes lf: "linear f" - shows "\B > 0. \x. norm (f x) \ B * norm x" -proof - - from linear_bounded[OF lf] obtain B where - B: "\x. norm (f x) \ B * norm x" by blast - let ?K = "\B\ + 1" - have Kp: "?K > 0" by arith - { - assume C: "B < 0" - def One \ "\Basis ::'a" - then have "One \ 0" - unfolding euclidean_eq_iff[where 'a='a] - by (simp add: inner_setsum_left inner_Basis setsum_cases) - then have "norm One > 0" by auto - with C have "B * norm One < 0" - by (simp add: mult_less_0_iff) - with B[rule_format, of One] norm_ge_zero[of "f One"] - have False by simp - } - then have Bp: "B \ 0" - by (metis not_leE) - { - fix x::"'a" - have "norm (f x) \ ?K * norm x" - using B[rule_format, of x] norm_ge_zero[of x] norm_ge_zero[of "f x"] Bp - apply (auto simp add: field_simps split add: abs_split) - apply (erule order_trans, simp) - done - } - then show ?thesis - using Kp by blast + qed qed lemma linear_conv_bounded_linear: @@ -1637,16 +1596,9 @@ shows "linear f \ bounded_linear f" proof assume "linear f" + then interpret f: linear f . show "bounded_linear f" proof - fix x y - show "f (x + y) = f x + f y" - using `linear f` unfolding linear_iff by simp - next - fix r x - show "f (scaleR r x) = scaleR r (f x)" - using `linear f` unfolding linear_iff by simp - next have "\B. \x. norm (f x) \ B * norm x" using `linear f` by (rule linear_bounded) then show "\K. \x. norm (f x) \ norm x * K" @@ -1655,7 +1607,19 @@ next assume "bounded_linear f" then interpret f: bounded_linear f . - show "linear f" by (simp add: f.add f.scaleR linear_iff) + show "linear f" .. +qed + +lemma linear_bounded_pos: + fixes f:: "'a::euclidean_space \ 'b::real_normed_vector" + assumes lf: "linear f" + shows "\B > 0. \x. norm (f x) \ B * norm x" +proof - + have "\B > 0. \x. norm (f x) \ norm x * B" + using lf unfolding linear_conv_bounded_linear + by (rule bounded_linear.pos_bounded) + then show ?thesis + by (simp only: mult_commute) qed lemma bounded_linearI': @@ -1694,30 +1658,6 @@ done qed -lemma bilinear_bounded_pos: - fixes h:: "'a::euclidean_space \ 'b::euclidean_space \ 'c::real_normed_vector" - assumes bh: "bilinear h" - shows "\B > 0. \x y. norm (h x y) \ B * norm x * norm y" -proof - - from bilinear_bounded[OF bh] obtain B where - B: "\x y. norm (h x y) \ B * norm x * norm y" by blast - let ?K = "\B\ + 1" - have Kp: "?K > 0" by arith - have KB: "B < ?K" by arith - { - fix x :: 'a - fix y :: 'b - from KB Kp have "B * norm x * norm y \ ?K * norm x * norm y" - apply - - apply (rule mult_right_mono, rule mult_right_mono) - apply auto - done - then have "norm (h x y) \ ?K * norm x * norm y" - using B[rule_format, of x y] by simp - } - with Kp show ?thesis by blast -qed - lemma bilinear_conv_bounded_bilinear: fixes h :: "'a::euclidean_space \ 'b::euclidean_space \ 'c::real_normed_vector" shows "bilinear h \ bounded_bilinear h" @@ -1756,6 +1696,18 @@ using h.bounded_linear_left h.bounded_linear_right by simp qed +lemma bilinear_bounded_pos: + fixes h:: "'a::euclidean_space \ 'b::euclidean_space \ 'c::real_normed_vector" + assumes bh: "bilinear h" + shows "\B > 0. \x y. norm (h x y) \ B * norm x * norm y" +proof - + have "\B > 0. \x y. norm (h x y) \ norm x * norm y * B" + using bh [unfolded bilinear_conv_bounded_bilinear] + by (rule bounded_bilinear.pos_bounded) + then show ?thesis + by (simp only: mult_ac) +qed + subsection {* We continue. *}