diff -r 7b1179be2ac5 -r 8f97d8caabfd src/HOL/Multivariate_Analysis/Derivative.thy --- a/src/HOL/Multivariate_Analysis/Derivative.thy Tue Mar 02 11:07:17 2010 +0100 +++ b/src/HOL/Multivariate_Analysis/Derivative.thy Tue Mar 02 21:32:37 2010 +0100 @@ -12,6 +12,9 @@ (* Because I do not want to type this all the time *) lemmas linear_linear = linear_conv_bounded_linear[THEN sym] +(** move this **) +declare norm_vec1[simp] + subsection {* Derivatives *} text {* The definition is slightly tricky since we make it work over @@ -612,7 +615,7 @@ finally have "\(f (x + c *\<^sub>R basis j) - f x - D *v (c *\<^sub>R basis j)) $ k\ \ \D $ k $ j\ / 2 * \c\" by simp hence "\f (x + c *\<^sub>R basis j) $ k - f x $ k - c * D $ k $ j\ \ \D $ k $ j\ / 2 * \c\" unfolding vector_component_simps matrix_vector_mul_component unfolding smult_conv_scaleR[symmetric] - unfolding dot_rmult dot_basis unfolding smult_conv_scaleR by simp } note * = this + unfolding inner_simps dot_basis smult_conv_scaleR by simp } note * = this have "x + d *\<^sub>R basis j \ ball x e" "x - d *\<^sub>R basis j \ ball x e" unfolding mem_ball vector_dist_norm using norm_basis[of j] d by auto hence **:"((f (x - d *\<^sub>R basis j))$k \ (f x)$k \ (f (x + d *\<^sub>R basis j))$k \ (f x)$k) \ @@ -702,20 +705,17 @@ subsection {* A nice generalization (see Havin's proof of 5.19 from Rudin's book). *} -lemma inner_eq_dot: fixes a::"real^'n" - shows "a \ b = inner a b" unfolding inner_vector_def dot_def by auto - lemma mvt_general: fixes f::"real\real^'n" assumes "ax\{a<..x\{a<.. norm(f'(x) (b - a))" proof- have "\x\{a<.. (f b - f a) \ f) b - (op \ (f b - f a) \ f) a = (f b - f a) \ f' x (b - a)" - apply(rule mvt) apply(rule assms(1))unfolding inner_eq_dot apply(rule continuous_on_inner continuous_on_intros assms(2))+ + apply(rule mvt) apply(rule assms(1)) apply(rule continuous_on_inner continuous_on_intros assms(2))+ unfolding o_def apply(rule,rule has_derivative_lift_dot) using assms(3) by auto then guess x .. note x=this show ?thesis proof(cases "f a = f b") case False have "norm (f b - f a) * norm (f b - f a) = norm (f b - f a)^2" by(simp add:class_semiring.semiring_rules) - also have "\ = (f b - f a) \ (f b - f a)" unfolding norm_pow_2 .. - also have "\ = (f b - f a) \ f' x (b - a)" using x by auto + also have "\ = (f b - f a) \ (f b - f a)" unfolding power2_norm_eq_inner .. + also have "\ = (f b - f a) \ f' x (b - a)" using x unfolding inner_simps by auto also have "\ \ norm (f b - f a) * norm (f' x (b - a))" by(rule norm_cauchy_schwarz) finally show ?thesis using False x(1) by(auto simp add: real_mult_left_cancel) next case True thus ?thesis using assms(1) apply(rule_tac x="(a + b) /2" in bexI) by auto qed qed @@ -751,9 +751,6 @@ also have "\ \ B * norm(y - x)" apply(rule **) using * and u by auto finally show ?thesis by(auto simp add:norm_minus_commute) qed -(** move this **) -declare norm_vec1[simp] - lemma onorm_vec1: fixes f::"real \ real" shows "onorm (\x. vec1 (f (dest_vec1 x))) = onorm f" proof- have "\x::real^1. norm x = 1 \ x\{vec1 -1, vec1 (1::real)}" unfolding forall_vec1 by(auto simp add:Cart_eq)