src/HOL/Transcendental.thy
changeset 56181 2aa0b19e74f3
parent 56167 ac8098b0e458
child 56193 c726ecfb22b6
equal deleted inserted replaced
56180:fae7a45d0fef 56181:2aa0b19e74f3
  1381         by (auto simp add: power_mult_distrib[symmetric] summable_geometric[OF `norm (-x) < 1`])
  1381         by (auto simp add: power_mult_distrib[symmetric] summable_geometric[OF `norm (-x) < 1`])
  1382     qed
  1382     qed
  1383     hence "DERIV (\<lambda>x. suminf (?f x)) (x - 1) :> suminf (?f' x)"
  1383     hence "DERIV (\<lambda>x. suminf (?f x)) (x - 1) :> suminf (?f' x)"
  1384       unfolding One_nat_def by auto
  1384       unfolding One_nat_def by auto
  1385     hence "DERIV (\<lambda>x. suminf (?f (x - 1))) x :> suminf (?f' x)"
  1385     hence "DERIV (\<lambda>x. suminf (?f (x - 1))) x :> suminf (?f' x)"
  1386       unfolding DERIV_iff repos .
  1386       unfolding deriv_def repos .
  1387     ultimately have "DERIV (\<lambda>x. ln x - suminf (?f (x - 1))) x :> (suminf (?f' x) - suminf (?f' x))"
  1387     ultimately have "DERIV (\<lambda>x. ln x - suminf (?f (x - 1))) x :> (suminf (?f' x) - suminf (?f' x))"
  1388       by (rule DERIV_diff)
  1388       by (rule DERIV_diff)
  1389     thus "DERIV (\<lambda>x. ln x - suminf (?f (x - 1))) x :> 0" by auto
  1389     thus "DERIV (\<lambda>x. ln x - suminf (?f (x - 1))) x :> 0" by auto
  1390   qed (auto simp add: assms)
  1390   qed (auto simp add: assms)
  1391   thus ?thesis by auto
  1391   thus ?thesis by auto
  2483     by (rule IVT2, simp_all)
  2483     by (rule IVT2, simp_all)
  2484 next
  2484 next
  2485   fix x y
  2485   fix x y
  2486   assume x: "0 \<le> x \<and> x \<le> 2 \<and> cos x = 0"
  2486   assume x: "0 \<le> x \<and> x \<le> 2 \<and> cos x = 0"
  2487   assume y: "0 \<le> y \<and> y \<le> 2 \<and> cos y = 0"
  2487   assume y: "0 \<le> y \<and> y \<le> 2 \<and> cos y = 0"
  2488   have [simp]: "\<forall>x. cos differentiable x"
  2488   have [simp]: "\<forall>x. cos differentiable (at x)"
  2489     unfolding differentiable_def by (auto intro: DERIV_cos)
  2489     unfolding real_differentiable_def by (auto intro: DERIV_cos)
  2490   from x y show "x = y"
  2490   from x y show "x = y"
  2491     apply (cut_tac less_linear [of x y], auto)
  2491     apply (cut_tac less_linear [of x y], auto)
  2492     apply (drule_tac f = cos in Rolle)
  2492     apply (drule_tac f = cos in Rolle)
  2493     apply (drule_tac [5] f = cos in Rolle)
  2493     apply (drule_tac [5] f = cos in Rolle)
  2494     apply (auto dest!: DERIV_cos [THEN DERIV_unique])
  2494     apply (auto dest!: DERIV_cos [THEN DERIV_unique])
  2659     by (rule IVT2, simp_all add: y)
  2659     by (rule IVT2, simp_all add: y)
  2660 next
  2660 next
  2661   fix a b
  2661   fix a b
  2662   assume a: "0 \<le> a \<and> a \<le> pi \<and> cos a = y"
  2662   assume a: "0 \<le> a \<and> a \<le> pi \<and> cos a = y"
  2663   assume b: "0 \<le> b \<and> b \<le> pi \<and> cos b = y"
  2663   assume b: "0 \<le> b \<and> b \<le> pi \<and> cos b = y"
  2664   have [simp]: "\<forall>x. cos differentiable x"
  2664   have [simp]: "\<forall>x. cos differentiable (at x)"
  2665     unfolding differentiable_def by (auto intro: DERIV_cos)
  2665     unfolding real_differentiable_def by (auto intro: DERIV_cos)
  2666   from a b show "a = b"
  2666   from a b show "a = b"
  2667     apply (cut_tac less_linear [of a b], auto)
  2667     apply (cut_tac less_linear [of a b], auto)
  2668     apply (drule_tac f = cos in Rolle)
  2668     apply (drule_tac f = cos in Rolle)
  2669     apply (drule_tac [5] f = cos in Rolle)
  2669     apply (drule_tac [5] f = cos in Rolle)
  2670     apply (auto dest!: DERIV_cos [THEN DERIV_unique])
  2670     apply (auto dest!: DERIV_cos [THEN DERIV_unique])
  2947   apply (subgoal_tac [2] "\<exists>z. y < z & z < xa & DERIV tan z :> 0")
  2947   apply (subgoal_tac [2] "\<exists>z. y < z & z < xa & DERIV tan z :> 0")
  2948   apply (subgoal_tac "\<exists>z. xa < z & z < y & DERIV tan z :> 0")
  2948   apply (subgoal_tac "\<exists>z. xa < z & z < y & DERIV tan z :> 0")
  2949   apply (rule_tac [4] Rolle)
  2949   apply (rule_tac [4] Rolle)
  2950   apply (rule_tac [2] Rolle)
  2950   apply (rule_tac [2] Rolle)
  2951   apply (auto del: exI intro!: DERIV_tan DERIV_isCont exI
  2951   apply (auto del: exI intro!: DERIV_tan DERIV_isCont exI
  2952               simp add: differentiable_def)
  2952               simp add: real_differentiable_def)
  2953   txt{*Now, simulate TRYALL*}
  2953   txt{*Now, simulate TRYALL*}
  2954   apply (rule_tac [!] DERIV_tan asm_rl)
  2954   apply (rule_tac [!] DERIV_tan asm_rl)
  2955   apply (auto dest!: DERIV_unique [OF _ DERIV_tan]
  2955   apply (auto dest!: DERIV_unique [OF _ DERIV_tan]
  2956               simp add: cos_gt_zero_pi [THEN less_imp_neq, THEN not_sym])
  2956               simp add: cos_gt_zero_pi [THEN less_imp_neq, THEN not_sym])
  2957   done
  2957   done