equal
deleted
inserted
replaced
891 |
891 |
892 let ?r = "r / (3 * real ?N)" |
892 let ?r = "r / (3 * real ?N)" |
893 from \<open>0 < r\<close> have "0 < ?r" by simp |
893 from \<open>0 < r\<close> have "0 < ?r" by simp |
894 |
894 |
895 let ?s = "\<lambda>n. SOME s. 0 < s \<and> (\<forall> x. x \<noteq> 0 \<and> \<bar> x \<bar> < s \<longrightarrow> \<bar> ?diff n x - f' x0 n \<bar> < ?r)" |
895 let ?s = "\<lambda>n. SOME s. 0 < s \<and> (\<forall> x. x \<noteq> 0 \<and> \<bar> x \<bar> < s \<longrightarrow> \<bar> ?diff n x - f' x0 n \<bar> < ?r)" |
896 def S' \<equiv> "Min (?s ` {..< ?N })" |
896 define S' where "S' = Min (?s ` {..< ?N })" |
897 |
897 |
898 have "0 < S'" unfolding S'_def |
898 have "0 < S'" unfolding S'_def |
899 proof (rule iffD2[OF Min_gr_iff]) |
899 proof (rule iffD2[OF Min_gr_iff]) |
900 show "\<forall>x \<in> (?s ` {..< ?N }). 0 < x" |
900 show "\<forall>x \<in> (?s ` {..< ?N }). 0 < x" |
901 proof |
901 proof |
909 have "0 < ?s n" by (rule someI2[where a=s]) (auto simp add: s_bound simp del: of_nat_Suc) |
909 have "0 < ?s n" by (rule someI2[where a=s]) (auto simp add: s_bound simp del: of_nat_Suc) |
910 thus "0 < x" unfolding \<open>x = ?s n\<close> . |
910 thus "0 < x" unfolding \<open>x = ?s n\<close> . |
911 qed |
911 qed |
912 qed auto |
912 qed auto |
913 |
913 |
914 def S \<equiv> "min (min (x0 - a) (b - x0)) S'" |
914 define S where "S = min (min (x0 - a) (b - x0)) S'" |
915 hence "0 < S" and S_a: "S \<le> x0 - a" and S_b: "S \<le> b - x0" |
915 hence "0 < S" and S_a: "S \<le> x0 - a" and S_b: "S \<le> b - x0" |
916 and "S \<le> S'" using x0_in_I and \<open>0 < S'\<close> |
916 and "S \<le> S'" using x0_in_I and \<open>0 < S'\<close> |
917 by auto |
917 by auto |
918 |
918 |
919 { |
919 { |
2246 |
2246 |
2247 lemma DERIV_log: |
2247 lemma DERIV_log: |
2248 assumes "x > 0" |
2248 assumes "x > 0" |
2249 shows "DERIV (\<lambda>y. log b y) x :> 1 / (ln b * x)" |
2249 shows "DERIV (\<lambda>y. log b y) x :> 1 / (ln b * x)" |
2250 proof - |
2250 proof - |
2251 def lb \<equiv> "1 / ln b" |
2251 define lb where "lb = 1 / ln b" |
2252 moreover have "DERIV (\<lambda>y. lb * ln y) x :> lb / x" |
2252 moreover have "DERIV (\<lambda>y. lb * ln y) x :> lb / x" |
2253 using \<open>x > 0\<close> by (auto intro!: derivative_eq_intros) |
2253 using \<open>x > 0\<close> by (auto intro!: derivative_eq_intros) |
2254 ultimately show ?thesis |
2254 ultimately show ?thesis |
2255 by (simp add: log_def) |
2255 by (simp add: log_def) |
2256 qed |
2256 qed |
4767 |
4767 |
4768 lemma tendsto_arctan_at_top: "(arctan \<longlongrightarrow> (pi/2)) at_top" |
4768 lemma tendsto_arctan_at_top: "(arctan \<longlongrightarrow> (pi/2)) at_top" |
4769 proof (rule tendstoI) |
4769 proof (rule tendstoI) |
4770 fix e :: real |
4770 fix e :: real |
4771 assume "0 < e" |
4771 assume "0 < e" |
4772 def y \<equiv> "pi/2 - min (pi/2) e" |
4772 define y where "y = pi/2 - min (pi/2) e" |
4773 then have y: "0 \<le> y" "y < pi/2" "pi/2 \<le> e + y" |
4773 then have y: "0 \<le> y" "y < pi/2" "pi/2 \<le> e + y" |
4774 using \<open>0 < e\<close> by auto |
4774 using \<open>0 < e\<close> by auto |
4775 |
4775 |
4776 show "eventually (\<lambda>x. dist (arctan x) (pi / 2) < e) at_top" |
4776 show "eventually (\<lambda>x. dist (arctan x) (pi / 2) < e) at_top" |
4777 proof (intro eventually_at_top_dense[THEN iffD2] exI allI impI) |
4777 proof (intro eventually_at_top_dense[THEN iffD2] exI allI impI) |