663 unfolding differentiable_def using mono deriv by auto |
663 unfolding differentiable_def using mono deriv by auto |
664 with frechet_derivative_at[OF deriv, symmetric] |
664 with frechet_derivative_at[OF deriv, symmetric] |
665 have "\<forall>i<DIM('a). f' (basis i) = 0" |
665 have "\<forall>i<DIM('a). f' (basis i) = 0" |
666 by (simp add: euclidean_eq[of _ "0::'a"]) |
666 by (simp add: euclidean_eq[of _ "0::'a"]) |
667 with derivative_is_linear[OF deriv, THEN linear_componentwise, of _ 0] |
667 with derivative_is_linear[OF deriv, THEN linear_componentwise, of _ 0] |
668 show ?thesis by (simp add: ext_iff) |
668 show ?thesis by (simp add: fun_eq_iff) |
669 qed |
669 qed |
670 |
670 |
671 lemma rolle: fixes f::"real\<Rightarrow>real" |
671 lemma rolle: fixes f::"real\<Rightarrow>real" |
672 assumes "a < b" "f a = f b" "continuous_on {a..b} f" |
672 assumes "a < b" "f a = f b" "continuous_on {a..b} f" |
673 "\<forall>x\<in>{a<..<b}. (f has_derivative f'(x)) (at x)" |
673 "\<forall>x\<in>{a<..<b}. (f has_derivative f'(x)) (at x)" |
946 |
946 |
947 lemma right_inverse_linear: fixes f::"'a::euclidean_space => 'a" |
947 lemma right_inverse_linear: fixes f::"'a::euclidean_space => 'a" |
948 assumes lf: "linear f" and gf: "f o g = id" |
948 assumes lf: "linear f" and gf: "f o g = id" |
949 shows "linear g" |
949 shows "linear g" |
950 proof- |
950 proof- |
951 from gf have fi: "surj f" apply (auto simp add: surj_def o_def id_def ext_iff) |
951 from gf have fi: "surj f" apply (auto simp add: surj_def o_def id_def fun_eq_iff) |
952 by metis |
952 by metis |
953 from linear_surjective_isomorphism[OF lf fi] |
953 from linear_surjective_isomorphism[OF lf fi] |
954 obtain h:: "'a => 'a" where |
954 obtain h:: "'a => 'a" where |
955 h: "linear h" "\<forall>x. h (f x) = x" "\<forall>x. f (h x) = x" by blast |
955 h: "linear h" "\<forall>x. h (f x) = x" "\<forall>x. f (h x) = x" by blast |
956 have "h = g" apply (rule ext) using gf h(2,3) |
956 have "h = g" apply (rule ext) using gf h(2,3) |
957 apply (simp add: o_def id_def ext_iff) |
957 apply (simp add: o_def id_def fun_eq_iff) |
958 by metis |
958 by metis |
959 with h(1) show ?thesis by blast |
959 with h(1) show ?thesis by blast |
960 qed |
960 qed |
961 |
961 |
962 lemma has_derivative_inverse_strong: fixes f::"'n::ordered_euclidean_space \<Rightarrow> 'n" |
962 lemma has_derivative_inverse_strong: fixes f::"'n::ordered_euclidean_space \<Rightarrow> 'n" |
1266 shows "f' = f''" |
1266 shows "f' = f''" |
1267 proof- |
1267 proof- |
1268 have "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
1268 have "(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
1269 using assms [unfolded has_vector_derivative_def] |
1269 using assms [unfolded has_vector_derivative_def] |
1270 by (rule frechet_derivative_unique_at) |
1270 by (rule frechet_derivative_unique_at) |
1271 thus ?thesis unfolding ext_iff by auto |
1271 thus ?thesis unfolding fun_eq_iff by auto |
1272 qed |
1272 qed |
1273 |
1273 |
1274 lemma vector_derivative_unique_within_closed_interval: fixes f::"real \<Rightarrow> 'n::ordered_euclidean_space" |
1274 lemma vector_derivative_unique_within_closed_interval: fixes f::"real \<Rightarrow> 'n::ordered_euclidean_space" |
1275 assumes "a < b" "x \<in> {a..b}" |
1275 assumes "a < b" "x \<in> {a..b}" |
1276 "(f has_vector_derivative f') (at x within {a..b})" |
1276 "(f has_vector_derivative f') (at x within {a..b})" |
1277 "(f has_vector_derivative f'') (at x within {a..b})" shows "f' = f''" proof- |
1277 "(f has_vector_derivative f'') (at x within {a..b})" shows "f' = f''" proof- |
1278 have *:"(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
1278 have *:"(\<lambda>x. x *\<^sub>R f') = (\<lambda>x. x *\<^sub>R f'')" |
1279 apply(rule frechet_derivative_unique_within_closed_interval[of "a" "b"]) |
1279 apply(rule frechet_derivative_unique_within_closed_interval[of "a" "b"]) |
1280 using assms(3-)[unfolded has_vector_derivative_def] using assms(1-2) by auto |
1280 using assms(3-)[unfolded has_vector_derivative_def] using assms(1-2) by auto |
1281 show ?thesis proof(rule ccontr) assume "f' \<noteq> f''" moreover |
1281 show ?thesis proof(rule ccontr) assume "f' \<noteq> f''" moreover |
1282 hence "(\<lambda>x. x *\<^sub>R f') 1 = (\<lambda>x. x *\<^sub>R f'') 1" using * by (auto simp: ext_iff) |
1282 hence "(\<lambda>x. x *\<^sub>R f') 1 = (\<lambda>x. x *\<^sub>R f'') 1" using * by (auto simp: fun_eq_iff) |
1283 ultimately show False unfolding o_def by auto qed qed |
1283 ultimately show False unfolding o_def by auto qed qed |
1284 |
1284 |
1285 lemma vector_derivative_at: |
1285 lemma vector_derivative_at: |
1286 shows "(f has_vector_derivative f') (at x) \<Longrightarrow> vector_derivative f (at x) = f'" |
1286 shows "(f has_vector_derivative f') (at x) \<Longrightarrow> vector_derivative f (at x) = f'" |
1287 apply(rule vector_derivative_unique_at) defer apply assumption |
1287 apply(rule vector_derivative_unique_at) defer apply assumption |