[STATEMENT]
lemma iLastStrong_iff : "(\<ominus>\<^sub>S t t0 I. P t) = ((\<ominus> t t0 I. P t) \<and> (I \<down>< t0 \<noteq> {}) \<and> t0 \<in> I)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. iLastStrong t0 I P = (iLast t0 I P \<and> I \<down>< t0 \<noteq> {} \<and> t0 \<in> I)
[PROOF STEP]
apply (unfold iTL_defs)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>t\<in>{iprev t0 I} \<down>< t0. P t) = (P (iprev t0 I) \<and> I \<down>< t0 \<noteq> {} \<and> t0 \<in> I)
[PROOF STEP]
apply (simp add: iprev_singleton_cut_less_not_empty_iff[symmetric] cut_less_singleton)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma continuous_rhs_comp[continuous_intros]:
  assumes [continuous_intros]: "continuous_on S g"
  assumes [continuous_intros]: "continuous_on S h"
  assumes "g ` S \<subseteq> T"
  assumes "h ` S \<subseteq> X"
  shows "continuous_on S (\<lambda>x. f (g x) (h x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on S (\<lambda>x. f (g x) (h x))
[PROOF STEP]
using continuous_on_compose_Pair[OF continuous assms(1,2)] assms(3,4)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>c. c \<in> S \<Longrightarrow> g c \<in> T; \<And>c. c \<in> S \<Longrightarrow> h c \<in> X\<rbrakk> \<Longrightarrow> continuous_on S (\<lambda>c. f (g c) (h c))
g ` S \<subseteq> T
h ` S \<subseteq> X

goal (1 subgoal):
 1. continuous_on S (\<lambda>x. f (g x) (h x))
[PROOF STEP]
by auto


[STATEMENT]
lemma sin_npi_int [simp]: "sin (pi * of_int n) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sin (pi * real_of_int n) = 0
[PROOF STEP]
by (simp add: sin_zero_iff_int2)


[STATEMENT]
lemma sgn_ipoly_add_rat[simp]:
  "sgn (ipoly (poly_add_rat r p) (x::'a::linordered_field)) = sgn (ipoly p (x - of_rat r))" (is "sgn ?l = sgn ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn (ipoly (poly_add_rat r p) x) = sgn (ipoly p (x - of_rat r))
[PROOF STEP]
using ipoly_add_rat_pos_neg[of r p x]
[PROOF STATE]
proof (prove)
using this:
(ipoly (poly_add_rat r p) x < (0::'a)) = (ipoly p (x - of_rat r) < (0::'a))
((0::'a) < ipoly (poly_add_rat r p) x) = ((0::'a) < ipoly p (x - of_rat r))

goal (1 subgoal):
 1. sgn (ipoly (poly_add_rat r p) x) = sgn (ipoly p (x - of_rat r))
[PROOF STEP]
by (cases ?r "0::'a" rule: linorder_cases,auto simp:  sgn_1_pos sgn_1_neg sgn_eq_0_iff)


[STATEMENT]
lemma mset_subset_add_iff2:
  "i \<le> (j::nat) \<Longrightarrow> (repeat_mset i u + m \<subset># repeat_mset j u + n) = (m \<subset># repeat_mset (j-i) u + n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i \<le> j \<Longrightarrow> (repeat_mset i u + m \<subset># repeat_mset j u + n) = (m \<subset># repeat_mset (j - i) u + n)
[PROOF STEP]
unfolding subset_mset_def repeat_mset_iterate_add
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i \<le> j \<Longrightarrow> (iterate_add i u + m \<subseteq># iterate_add j u + n \<and> iterate_add i u + m \<noteq> iterate_add j u + n) = (m \<subseteq># iterate_add (j - i) u + n \<and> m \<noteq> iterate_add (j - i) u + n)
[PROOF STEP]
by (simp add: iterate_add_eq_add_iff2 mset_subseteq_add_iff2[unfolded repeat_mset_iterate_add])


[STATEMENT]
lemma conv_radius_ratio_limit:
  fixes f :: "nat \<Rightarrow> 'a :: {banach,real_normed_div_algebra}"
  assumes "c' = ereal c"
  assumes nz:  "eventually (\<lambda>n. f n \<noteq> 0) sequentially"
  assumes lim: "(\<lambda>n. norm (f n) / norm (f (Suc n))) \<longlonglongrightarrow> c"
  shows   "conv_radius f = c'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius f = c'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
c' = ereal c
\<forall>\<^sub>F n in sequentially. f n \<noteq> (0::'a)
(\<lambda>n. norm (f n) / norm (f (Suc n))) \<longlonglongrightarrow> c

goal (1 subgoal):
 1. conv_radius f = c'
[PROOF STEP]
by (intro conv_radius_ratio_limit_ereal) simp_all


[STATEMENT]
lemma quartic:
  "(y::real)^3 - b * y^2 + (a * c - 4 * d) * y - a^2 * d + 4 * b * d - c^2 = 0 \<and>
    R^2 = a^2 / 4 - b + y \<and>
    s^2 = y^2 - 4 * d \<and>
    (D^2 = (if R = 0 then 3 * a^2 / 4 - 2 * b + 2 * s
                     else 3 * a^2 / 4 - R^2 - 2 * b + (4 * a * b - 8 * c - a^3) / (4 * R))) \<and>
    (E^2 = (if R = 0 then 3 * a^2 / 4 - 2 * b - 2 * s
                     else 3 * a^2 / 4 - R^2 - 2 * b - (4 * a * b - 8 * c - a^3) / (4 * R)))
  \<Longrightarrow> x^4 + a * x^3 + b * x^2 + c * x + d = 0 \<longleftrightarrow>
      x = -a / 4 + R / 2 + D / 2 \<or>
      x = -a / 4 + R / 2 - D / 2 \<or>
      x = -a / 4 - R / 2 + E / 2 \<or>
      x = -a / 4 - R / 2 - E / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y ^ 3 - b * y\<^sup>2 + (a * c - 4 * d) * y - a\<^sup>2 * d + 4 * b * d - c\<^sup>2 = 0 \<and> R\<^sup>2 = a\<^sup>2 / 4 - b + y \<and> s\<^sup>2 = y\<^sup>2 - 4 * d \<and> D\<^sup>2 = (if R = 0 then 3 * a\<^sup>2 / 4 - 2 * b + 2 * s else 3 * a\<^sup>2 / 4 - R\<^sup>2 - 2 * b + (4 * a * b - 8 * c - a ^ 3) / (4 * R)) \<and> E\<^sup>2 = (if R = 0 then 3 * a\<^sup>2 / 4 - 2 * b - 2 * s else 3 * a\<^sup>2 / 4 - R\<^sup>2 - 2 * b - (4 * a * b - 8 * c - a ^ 3) / (4 * R)) \<Longrightarrow> (x ^ 4 + a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = - a / 4 + R / 2 + D / 2 \<or> x = - a / 4 + R / 2 - D / 2 \<or> x = - a / 4 - R / 2 + E / 2 \<or> x = - a / 4 - R / 2 - E / 2)
[PROOF STEP]
apply (cases "R = 0")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>y ^ 3 - b * y\<^sup>2 + (a * c - 4 * d) * y - a\<^sup>2 * d + 4 * b * d - c\<^sup>2 = 0 \<and> R\<^sup>2 = a\<^sup>2 / 4 - b + y \<and> s\<^sup>2 = y\<^sup>2 - 4 * d \<and> D\<^sup>2 = (if R = 0 then 3 * a\<^sup>2 / 4 - 2 * b + 2 * s else 3 * a\<^sup>2 / 4 - R\<^sup>2 - 2 * b + (4 * a * b - 8 * c - a ^ 3) / (4 * R)) \<and> E\<^sup>2 = (if R = 0 then 3 * a\<^sup>2 / 4 - 2 * b - 2 * s else 3 * a\<^sup>2 / 4 - R\<^sup>2 - 2 * b - (4 * a * b - 8 * c - a ^ 3) / (4 * R)); R = 0\<rbrakk> \<Longrightarrow> (x ^ 4 + a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = - a / 4 + R / 2 + D / 2 \<or> x = - a / 4 + R / 2 - D / 2 \<or> x = - a / 4 - R / 2 + E / 2 \<or> x = - a / 4 - R / 2 - E / 2)
 2. \<lbrakk>y ^ 3 - b * y\<^sup>2 + (a * c - 4 * d) * y - a\<^sup>2 * d + 4 * b * d - c\<^sup>2 = 0 \<and> R\<^sup>2 = a\<^sup>2 / 4 - b + y \<and> s\<^sup>2 = y\<^sup>2 - 4 * d \<and> D\<^sup>2 = (if R = 0 then 3 * a\<^sup>2 / 4 - 2 * b + 2 * s else 3 * a\<^sup>2 / 4 - R\<^sup>2 - 2 * b + (4 * a * b - 8 * c - a ^ 3) / (4 * R)) \<and> E\<^sup>2 = (if R = 0 then 3 * a\<^sup>2 / 4 - 2 * b - 2 * s else 3 * a\<^sup>2 / 4 - R\<^sup>2 - 2 * b - (4 * a * b - 8 * c - a ^ 3) / (4 * R)); R \<noteq> 0\<rbrakk> \<Longrightarrow> (x ^ 4 + a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = - a / 4 + R / 2 + D / 2 \<or> x = - a / 4 + R / 2 - D / 2 \<or> x = - a / 4 - R / 2 + E / 2 \<or> x = - a / 4 - R / 2 - E / 2)
[PROOF STEP]
apply (simp_all add: field_simps divide_minus_left[symmetric] del: divide_minus_left)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a * (c * y) + (y ^ 3 + b * (d * 4)) = c\<^sup>2 + (b * y\<^sup>2 + (d * a\<^sup>2 + d * (y * 4))) \<and> b * 4 = a\<^sup>2 + y * 4 \<and> s\<^sup>2 + d * 4 = y\<^sup>2 \<and> b * 8 + 4 * D\<^sup>2 = s * 8 + 3 * a\<^sup>2 \<and> b * 8 + (s * 8 + 4 * E\<^sup>2) = 3 * a\<^sup>2; R = 0\<rbrakk> \<Longrightarrow> (d + (c * x + (x ^ 4 + (a * x ^ 3 + b * x\<^sup>2))) = 0) = (a + x * 4 = D * 2 \<or> D * 4 + x * 8 = - (a * 2) \<or> a + x * 4 = E * 2 \<or> E * 4 + x * 8 = - (a * 2))
 2. \<lbrakk>a * (c * y) + (y ^ 3 + b * (d * 4)) = c\<^sup>2 + (b * y\<^sup>2 + (d * a\<^sup>2 + d * (y * 4))) \<and> b * 4 + 4 * R\<^sup>2 = a\<^sup>2 + y * 4 \<and> s\<^sup>2 + d * 4 = y\<^sup>2 \<and> c * 32 + (4 * a ^ 3 + (R * (b * 32) + (R * (D\<^sup>2 * 16) + R * (R\<^sup>2 * 16)))) = a * (b * 16) + R * (12 * a\<^sup>2) \<and> a * (b * 16) + (R * (b * 32) + (R * (E\<^sup>2 * 16) + R * (R\<^sup>2 * 16))) = c * 32 + (4 * a ^ 3 + R * (12 * a\<^sup>2)); R \<noteq> 0\<rbrakk> \<Longrightarrow> (d + (c * x + (x ^ 4 + (a * x ^ 3 + b * x\<^sup>2))) = 0) = (a + x * 4 = D * 2 + R * 2 \<or> a * 2 + (D * 4 + x * 8) = R * 4 \<or> a * 2 + (R * 4 + x * 8) = E * 4 \<or> E * 8 + (R * 8 + x * 16) = - (a * 4))
[PROOF STEP]
apply algebra
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a * (c * y) + (y ^ 3 + b * (d * 4)) = c\<^sup>2 + (b * y\<^sup>2 + (d * a\<^sup>2 + d * (y * 4))) \<and> b * 4 + 4 * R\<^sup>2 = a\<^sup>2 + y * 4 \<and> s\<^sup>2 + d * 4 = y\<^sup>2 \<and> c * 32 + (4 * a ^ 3 + (R * (b * 32) + (R * (D\<^sup>2 * 16) + R * (R\<^sup>2 * 16)))) = a * (b * 16) + R * (12 * a\<^sup>2) \<and> a * (b * 16) + (R * (b * 32) + (R * (E\<^sup>2 * 16) + R * (R\<^sup>2 * 16))) = c * 32 + (4 * a ^ 3 + R * (12 * a\<^sup>2)); R \<noteq> 0\<rbrakk> \<Longrightarrow> (d + (c * x + (x ^ 4 + (a * x ^ 3 + b * x\<^sup>2))) = 0) = (a + x * 4 = D * 2 + R * 2 \<or> a * 2 + (D * 4 + x * 8) = R * 4 \<or> a * 2 + (R * 4 + x * 8) = E * 4 \<or> E * 8 + (R * 8 + x * 16) = - (a * 4))
[PROOF STEP]
apply algebra
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done