diff -r 340738057c8c -r a6479cb85944 src/HOL/Multivariate_Analysis/Derivative.thy --- a/src/HOL/Multivariate_Analysis/Derivative.thy Mon Feb 22 14:37:56 2016 +0000 +++ b/src/HOL/Multivariate_Analysis/Derivative.thy Tue Feb 23 15:47:39 2016 +0000 @@ -1697,15 +1697,15 @@ also continuous. So if we know for some other reason that the inverse function exists, it's OK.\ -lemma has_derivative_locally_injective: +proposition has_derivative_locally_injective: fixes f :: "'n::euclidean_space \ 'm::euclidean_space" assumes "a \ s" - and "open s" - and "bounded_linear g'" - and "g' \ f' a = id" - and "\x\s. (f has_derivative f' x) (at x)" - and "\e>0. \d>0. \x. dist a x < d \ onorm (\v. f' x v - f' a v) < e" - obtains t where "a \ t" "open t" "\x\t. \x'\t. f x' = f x \ x' = x" + and "open s" + and "bounded_linear g'" + and "g' \ f' a = id" + and "\x. x \ s \ (f has_derivative f' x) (at x)" + and "\e. e > 0 \ \d>0. \x. dist a x < d \ onorm (\v. f' x v - f' a v) < e" + obtains r where "r > 0" "ball a r \ s" "inj_on f (ball a r)" proof - interpret bounded_linear g' using assms by auto @@ -1738,9 +1738,11 @@ using real_lbound_gt_zero[OF d1(1) d2(1)] by blast show ?thesis proof - show "a \ ball a d" - using d by auto - show "\x\ball a d. \x'\ball a d. f x' = f x \ x' = x" + show "0 < d" by (fact d) + show "ball a d \ s" + using \d < d2\ \ball a d2 \ s\ by auto + show "inj_on f (ball a d)" + unfolding inj_on_def proof (intro strip) fix x y assume as: "x \ ball a d" "y \ ball a d" "f x = f y" @@ -1749,7 +1751,7 @@ unfolding ph_def o_def unfolding diff using f'g' - by (auto simp add: algebra_simps) + by (auto simp: algebra_simps) have "norm (ph x - ph y) \ (1 / 2) * norm (x - y)" apply (rule differentiable_bound[OF convex_ball _ _ as(1-2), where f'="\x v. v - g'(f' x v)"]) apply (rule_tac[!] ballI) @@ -1788,7 +1790,7 @@ using d1(2)[of u] using onorm_neg[where f="\x. f' u x - f' a x"] using d and u and onorm_pos_le[OF assms(3)] - apply (auto simp add: algebra_simps) + apply (auto simp: algebra_simps) done also have "\ \ 1 / 2" unfolding k_def by auto @@ -1804,7 +1806,7 @@ ultimately show "x = y" unfolding norm_minus_commute by auto qed - qed auto + qed qed