equal
deleted
inserted
replaced
231 for a :: "nat \<Rightarrow> 'a::real_normed_div_algebra" |
231 for a :: "nat \<Rightarrow> 'a::real_normed_div_algebra" |
232 using powser_sums_zero sums_unique2 by blast |
232 using powser_sums_zero sums_unique2 by blast |
233 |
233 |
234 text \<open> |
234 text \<open> |
235 Power series has a circle or radius of convergence: if it sums for \<open>x\<close>, |
235 Power series has a circle or radius of convergence: if it sums for \<open>x\<close>, |
236 then it sums absolutely for \<open>z\<close> with @{term "\<bar>z\<bar> < \<bar>x\<bar>"}.\<close> |
236 then it sums absolutely for \<open>z\<close> with \<^term>\<open>\<bar>z\<bar> < \<bar>x\<bar>\<close>.\<close> |
237 |
237 |
238 lemma powser_insidea: |
238 lemma powser_insidea: |
239 fixes x z :: "'a::real_normed_div_algebra" |
239 fixes x z :: "'a::real_normed_div_algebra" |
240 assumes 1: "summable (\<lambda>n. f n * x^n)" |
240 assumes 1: "summable (\<lambda>n. f n * x^n)" |
241 and 2: "norm z < norm x" |
241 and 2: "norm z < norm x" |
1547 qed simp |
1547 qed simp |
1548 |
1548 |
1549 |
1549 |
1550 subsubsection \<open>Properties of the Exponential Function on Reals\<close> |
1550 subsubsection \<open>Properties of the Exponential Function on Reals\<close> |
1551 |
1551 |
1552 text \<open>Comparisons of @{term "exp x"} with zero.\<close> |
1552 text \<open>Comparisons of \<^term>\<open>exp x\<close> with zero.\<close> |
1553 |
1553 |
1554 text \<open>Proof: because every exponential can be seen as a square.\<close> |
1554 text \<open>Proof: because every exponential can be seen as a square.\<close> |
1555 lemma exp_ge_zero [simp]: "0 \<le> exp x" |
1555 lemma exp_ge_zero [simp]: "0 \<le> exp x" |
1556 for x :: real |
1556 for x :: real |
1557 proof - |
1557 proof - |
1633 |
1633 |
1634 lemma exp_inj_iff [iff]: "exp x = exp y \<longleftrightarrow> x = y" |
1634 lemma exp_inj_iff [iff]: "exp x = exp y \<longleftrightarrow> x = y" |
1635 for x y :: real |
1635 for x y :: real |
1636 by (simp add: order_eq_iff) |
1636 by (simp add: order_eq_iff) |
1637 |
1637 |
1638 text \<open>Comparisons of @{term "exp x"} with one.\<close> |
1638 text \<open>Comparisons of \<^term>\<open>exp x\<close> with one.\<close> |
1639 |
1639 |
1640 lemma one_less_exp_iff [simp]: "1 < exp x \<longleftrightarrow> 0 < x" |
1640 lemma one_less_exp_iff [simp]: "1 < exp x \<longleftrightarrow> 0 < x" |
1641 for x :: real |
1641 for x :: real |
1642 using exp_less_cancel_iff [where x = 0 and y = x] by simp |
1642 using exp_less_cancel_iff [where x = 0 and y = x] by simp |
1643 |
1643 |
2392 qed |
2392 qed |
2393 |
2393 |
2394 subsection\<open>The general logarithm\<close> |
2394 subsection\<open>The general logarithm\<close> |
2395 |
2395 |
2396 definition log :: "real \<Rightarrow> real \<Rightarrow> real" |
2396 definition log :: "real \<Rightarrow> real \<Rightarrow> real" |
2397 \<comment> \<open>logarithm of @{term x} to base @{term a}\<close> |
2397 \<comment> \<open>logarithm of \<^term>\<open>x\<close> to base \<^term>\<open>a\<close>\<close> |
2398 where "log a x = ln x / ln a" |
2398 where "log a x = ln x / ln a" |
2399 |
2399 |
2400 lemma tendsto_log [tendsto_intros]: |
2400 lemma tendsto_log [tendsto_intros]: |
2401 "(f \<longlongrightarrow> a) F \<Longrightarrow> (g \<longlongrightarrow> b) F \<Longrightarrow> 0 < a \<Longrightarrow> a \<noteq> 1 \<Longrightarrow> 0 < b \<Longrightarrow> |
2401 "(f \<longlongrightarrow> a) F \<Longrightarrow> (g \<longlongrightarrow> b) F \<Longrightarrow> 0 < a \<Longrightarrow> a \<noteq> 1 \<Longrightarrow> 0 < b \<Longrightarrow> |
2402 ((\<lambda>x. log (f x) (g x)) \<longlongrightarrow> log a b) F" |
2402 ((\<lambda>x. log (f x) (g x)) \<longlongrightarrow> log a b) F" |
3594 subsection \<open>The Constant Pi\<close> |
3594 subsection \<open>The Constant Pi\<close> |
3595 |
3595 |
3596 definition pi :: real |
3596 definition pi :: real |
3597 where "pi = 2 * (THE x. 0 \<le> x \<and> x \<le> 2 \<and> cos x = 0)" |
3597 where "pi = 2 * (THE x. 0 \<le> x \<and> x \<le> 2 \<and> cos x = 0)" |
3598 |
3598 |
3599 text \<open>Show that there's a least positive @{term x} with @{term "cos x = 0"}; |
3599 text \<open>Show that there's a least positive \<^term>\<open>x\<close> with \<^term>\<open>cos x = 0\<close>; |
3600 hence define pi.\<close> |
3600 hence define pi.\<close> |
3601 |
3601 |
3602 lemma sin_paired: "(\<lambda>n. (- 1) ^ n / (fact (2 * n + 1)) * x ^ (2 * n + 1)) sums sin x" |
3602 lemma sin_paired: "(\<lambda>n. (- 1) ^ n / (fact (2 * n + 1)) * x ^ (2 * n + 1)) sums sin x" |
3603 for x :: real |
3603 for x :: real |
3604 proof - |
3604 proof - |
4007 lemma sin_pi_divide_n_gt_0: |
4007 lemma sin_pi_divide_n_gt_0: |
4008 assumes "2 \<le> n" |
4008 assumes "2 \<le> n" |
4009 shows "0 < sin (pi / real n)" |
4009 shows "0 < sin (pi / real n)" |
4010 by (rule sin_gt_zero) (use assms in \<open>simp_all add: divide_simps\<close>) |
4010 by (rule sin_gt_zero) (use assms in \<open>simp_all add: divide_simps\<close>) |
4011 |
4011 |
4012 text\<open>Proof resembles that of \<open>cos_is_zero\<close> but with @{term pi} for the upper bound\<close> |
4012 text\<open>Proof resembles that of \<open>cos_is_zero\<close> but with \<^term>\<open>pi\<close> for the upper bound\<close> |
4013 lemma cos_total: |
4013 lemma cos_total: |
4014 assumes y: "-1 \<le> y" "y \<le> 1" |
4014 assumes y: "-1 \<le> y" "y \<le> 1" |
4015 shows "\<exists>!x. 0 \<le> x \<and> x \<le> pi \<and> cos x = y" |
4015 shows "\<exists>!x. 0 \<le> x \<and> x \<le> pi \<and> cos x = y" |
4016 proof (rule ex_ex1I) |
4016 proof (rule ex_ex1I) |
4017 show "\<exists>x::real. 0 \<le> x \<and> x \<le> pi \<and> cos x = y" |
4017 show "\<exists>x::real. 0 \<le> x \<and> x \<le> pi \<and> cos x = y" |