# HG changeset patch # User paulson # Date 1385298382 0 # Node ID 07864001495d8a5a6cbbc33f0f19e274855853b8 # Parent 002b8729f22802d984a6255f267d8ed0ceb6a7c6 cleaned up some messy proofs diff -r 002b8729f228 -r 07864001495d src/HOL/Transcendental.thy --- a/src/HOL/Transcendental.thy Sun Nov 24 00:31:50 2013 +0000 +++ b/src/HOL/Transcendental.thy Sun Nov 24 13:06:22 2013 +0000 @@ -33,24 +33,31 @@ shows "x ^ (Suc n) - y ^ (Suc n) = (x - y) * (\p=0..p=0..p=0..p = 0..p=0..p=0..p=0..n. of_nat n * c(n) * (x ^ (n - Suc 0))) sums (\n. (diffs c)(n) * (x ^ n))" unfolding diffs_def - apply (drule summable_sums) - apply (rule sums_Suc_imp, simp_all) - done + by (simp add: summable_sums sums_Suc_imp) lemma lemma_termdiff1: fixes z :: "'a :: {monoid_mult,comm_ring}" shows @@ -482,10 +484,7 @@ have "norm (((z + h) ^ n - z ^ n) / h - of_nat n * z ^ (n - Suc 0)) = norm (\p = 0..q = 0.. \ of_nat n * (of_nat (n - Suc 0) * K ^ (n - 2)) * norm h" proof (rule mult_right_mono [OF _ norm_ge_zero]) from norm_ge_zero 2 have K: "0 \ K" @@ -3705,8 +3704,8 @@ assumes "\x\ < 1" shows "x\<^sup>2 < 1" proof - - from mult_left_mono[OF less_imp_le[OF `\x\ < 1`] abs_ge_zero[of x]] - have "\x\<^sup>2\ < 1" using `\x\ < 1` unfolding numeral_2_eq_2 power_Suc2 by auto + have "\x\<^sup>2\ < 1" + by (metis abs_power2 assms pos2 power2_abs power_0 power_strict_decreasing zero_eq_power2 zero_less_abs_iff) thus ?thesis using zero_le_power2 by auto qed @@ -3867,7 +3866,7 @@ moreover have "suminf (?c x) - arctan x = suminf (?c (-\x\)) - arctan (-\x\)" by (rule suminf_eq_arctan_bounded[where x="x" and a="-\x\" and b="\x\"]) - (simp_all only: `\x\ < r` `-\x\ < \x\` neg_less_iff_less) + (simp_all only: `\x\ < r` `-\x\ < \x\` neg_less_iff_less) ultimately show ?thesis using suminf_arctan_zero by auto qed @@ -4085,28 +4084,28 @@ lemmas sin_arccos_lemma1 = sin_arccos_abs [OF cos_x_y_le_one] -lemma polar_ex1: "0 < y \ \r a. x = r * cos a & y = r * sin a" - apply (rule_tac x = "sqrt (x\<^sup>2 + y\<^sup>2)" in exI) - apply (rule_tac x = "arccos (x / sqrt (x\<^sup>2 + y\<^sup>2))" in exI) - apply (simp add: cos_arccos_lemma1) - apply (simp add: sin_arccos_lemma1) - apply (simp add: power_divide) - apply (simp add: real_sqrt_mult [symmetric]) - apply (simp add: right_diff_distrib) - done - -lemma polar_ex2: "y < 0 ==> \r a. x = r * cos a & y = r * sin a" - using polar_ex1 [where x=x and y="-y"] - apply simp - apply clarify - apply (metis cos_minus minus_minus minus_mult_right sin_minus) - done - lemma polar_Ex: "\r a. x = r * cos a & y = r * sin a" - apply (rule_tac x=0 and y=y in linorder_cases) - apply (erule polar_ex1) - apply (rule_tac x=x in exI, rule_tac x=0 in exI, simp) - apply (erule polar_ex2) - done +proof - + have polar_ex1: "\y. 0 < y \ \r a. x = r * cos a & y = r * sin a" + apply (rule_tac x = "sqrt (x\<^sup>2 + y\<^sup>2)" in exI) + apply (rule_tac x = "arccos (x / sqrt (x\<^sup>2 + y\<^sup>2))" in exI) + apply (simp add: cos_arccos_lemma1 sin_arccos_lemma1 power_divide + real_sqrt_mult [symmetric] right_diff_distrib) + done + show ?thesis + proof (cases "0::real" y rule: linorder_cases) + case less + then show ?thesis by (rule polar_ex1) + next + case equal + then show ?thesis + by (force simp add: intro!: cos_zero sin_zero) + next + case greater + then show ?thesis + using polar_ex1 [where y="-y"] + by auto (metis cos_minus minus_minus minus_mult_right sin_minus) + qed +qed end