[STATEMENT]
lemma closed_rel_add:
  assumes "(r, s) \<in> carrier rel" and "(r', s') \<in> carrier rel"
  shows "(s' \<otimes> r \<oplus> s \<otimes> r', s \<otimes> s') \<in> carrier rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (s' \<otimes> r \<oplus> s \<otimes> r', s \<otimes> s') \<in> carrier rel
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (s' \<otimes> r \<oplus> s \<otimes> r', s \<otimes> s') \<in> carrier rel
[PROOF STEP]
have "s \<otimes> s' \<in> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s \<otimes> s' \<in> S
[PROOF STEP]
using assms rel_def submonoid.m_closed
[PROOF STATE]
proof (prove)
using this:
(r, s) \<in> carrier rel
(r', s') \<in> carrier rel
rel \<equiv> \<lparr>carrier = carrier R \<times> S, eq = \<lambda>(r, s) (r', s'). \<exists>t\<in>S. t \<otimes> (s' \<otimes> r \<ominus> s \<otimes> r') = \<zero>\<rparr>
\<lbrakk>Localization.submonoid ?M ?S; ?x \<in> ?S; ?y \<in> ?S\<rbrakk> \<Longrightarrow> ?x \<otimes>\<^bsub>?M\<^esub> ?y \<in> ?S

goal (1 subgoal):
 1. s \<otimes> s' \<in> S
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
s \<otimes> s' \<in> S

goal (1 subgoal):
 1. (s' \<otimes> r \<oplus> s \<otimes> r', s \<otimes> s') \<in> carrier rel
[PROOF STEP]
have "s' \<otimes> r \<oplus> s \<otimes> r' \<in> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s' \<otimes> r \<oplus> s \<otimes> r' \<in> carrier R
[PROOF STEP]
using assms rel_def
[PROOF STATE]
proof (prove)
using this:
(r, s) \<in> carrier rel
(r', s') \<in> carrier rel
rel \<equiv> \<lparr>carrier = carrier R \<times> S, eq = \<lambda>(r, s) (r', s'). \<exists>t\<in>S. t \<otimes> (s' \<otimes> r \<ominus> s \<otimes> r') = \<zero>\<rparr>

goal (1 subgoal):
 1. s' \<otimes> r \<oplus> s \<otimes> r' \<in> carrier R
[PROOF STEP]
by (metis (no_types, lifting) add.m_closed mem_Sigma_iff monoid.m_closed monoid_axioms
        partial_object.select_convs(1) rev_subsetD subset)
[PROOF STATE]
proof (state)
this:
s' \<otimes> r \<oplus> s \<otimes> r' \<in> carrier R

goal (1 subgoal):
 1. (s' \<otimes> r \<oplus> s \<otimes> r', s \<otimes> s') \<in> carrier rel
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
s' \<otimes> r \<oplus> s \<otimes> r' \<in> carrier R

goal (1 subgoal):
 1. (s' \<otimes> r \<oplus> s \<otimes> r', s \<otimes> s') \<in> carrier rel
[PROOF STEP]
using rel_def
[PROOF STATE]
proof (prove)
using this:
s' \<otimes> r \<oplus> s \<otimes> r' \<in> carrier R
rel \<equiv> \<lparr>carrier = carrier R \<times> S, eq = \<lambda>(r, s) (r', s'). \<exists>t\<in>S. t \<otimes> (s' \<otimes> r \<ominus> s \<otimes> r') = \<zero>\<rparr>

goal (1 subgoal):
 1. (s' \<otimes> r \<oplus> s \<otimes> r', s \<otimes> s') \<in> carrier rel
[PROOF STEP]
by (simp add: \<open>s \<otimes> s' \<in> S\<close>)
[PROOF STATE]
proof (state)
this:
(s' \<otimes> r \<oplus> s \<otimes> r', s \<otimes> s') \<in> carrier rel

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma conv_abscissa_add_leI:
  "conv_abscissa (f :: 'a :: dirichlet_series fds) \<le> d \<Longrightarrow> conv_abscissa g \<le> d \<Longrightarrow>
     conv_abscissa (f + g) \<le> d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>conv_abscissa f \<le> d; conv_abscissa g \<le> d\<rbrakk> \<Longrightarrow> conv_abscissa (f + g) \<le> d
[PROOF STEP]
using conv_abscissa_add_le[of f g]
[PROOF STATE]
proof (prove)
using this:
conv_abscissa (f + g) \<le> max (conv_abscissa f) (conv_abscissa g)

goal (1 subgoal):
 1. \<lbrakk>conv_abscissa f \<le> d; conv_abscissa g \<le> d\<rbrakk> \<Longrightarrow> conv_abscissa (f + g) \<le> d
[PROOF STEP]
by (auto simp: le_max_iff_disj)


[STATEMENT]
lemma decrease_set:
  assumes "\<forall>x::'a . Q x \<longrightarrow> P x"
      and "P w"
      and "\<not> Q w"
    shows "card { x . Q x } < card { x . P x }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {x. Q x} < card {x. P x}
[PROOF STEP]
by (metis Collect_mono assms card_seteq finite mem_Collect_eq not_le)


[STATEMENT]
lemma sets_D: "sets D = sets (stream_space (\<Pi>\<^sub>M s\<in>UNIV. count_space UNIV))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (stream_space (Pi\<^sub>M UNIV (\<lambda>x. measure_pmf (K x)))) = sets (stream_space (Pi\<^sub>M UNIV (\<lambda>s. count_space UNIV)))
[PROOF STEP]
by (intro sets_stream_space_cong sets_PiM_cong) simp_all


[STATEMENT]
lemma if_then_1_else_0:
  "((if P then 1 else 0) = (0 :: machine_word)) = (\<not> P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((if P then 1 else 0) = 0) = (\<not> P)
[PROOF STEP]
by simp


[STATEMENT]
lemma uncountable_gcard: "small X \<Longrightarrow> uncountable X \<longleftrightarrow> gcard X > \<aleph>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small X \<Longrightarrow> uncountable X = (\<aleph>0 < gcard X)
[PROOF STEP]
by (simp add: Card_is_Ord Ord_not_le countable_iff_g_le_Aleph0)


[STATEMENT]
lemma mat_mult_scalar: "A ** B = mk_mat (\<lambda> i j. scalar_product (row i A) (column j B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A ** B = local.mk_mat (\<lambda>i j. scalar_product (row i A) (column j B))
[PROOF STEP]
unfolding vec_eq_iff matrix_matrix_mult_def scalar_product_def mk_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i ia. (\<chi>i j. \<Sum>k\<in>UNIV. A $h i $h k * B $h k $h j) $h i $h ia = (\<chi>i j. \<Sum>ia\<in>UNIV. row i A $h ia * column j B $h ia) $h i $h ia
[PROOF STEP]
by (auto simp: row_def column_def)


[STATEMENT]
lemma IDFT_lower:
  "IDFT (2 * m) a i =
  IDFT m (%i. a (2 * i)) i +
  (1 / root (2 * m)) ^ i * IDFT m (%i. a (2 * i + 1)) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IDFT (2 * m) a i = IDFT m (\<lambda>i. a (2 * i)) i + (1 / FFT.root (2 * m)) ^ i * IDFT m (\<lambda>i. a (2 * i + 1)) i
[PROOF STEP]
proof (unfold IDFT_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>k = 0..<2 * m. a k / FFT.root (2 * m) ^ (i * k)) = (\<Sum>k = 0..<m. a (2 * k) / FFT.root m ^ (i * k)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>k = 0..<m. a (2 * k + 1) / FFT.root m ^ (i * k))
[PROOF STEP]
have "(\<Sum>j = 0..<2 * m. a j / root (2 * m) ^ (i * j)) =
    (\<Sum>j = 0..<m. a (2 * j) / root (2 * m) ^ (i * (2 * j))) +
    (\<Sum>j = 0..<m. a (2 * j + 1) / root (2 * m) ^ (i * (2 * j + 1)))"
    (is "?s = _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<2 * m. a j / FFT.root (2 * m) ^ (i * j)) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root (2 * m) ^ (i * (2 * j))) + (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root (2 * m) ^ (i * (2 * j + 1)))
[PROOF STEP]
by (simp add: sum_splice)
[PROOF STATE]
proof (state)
this:
(\<Sum>j = 0..<2 * m. a j / FFT.root (2 * m) ^ (i * j)) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root (2 * m) ^ (i * (2 * j))) + (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root (2 * m) ^ (i * (2 * j + 1)))

goal (1 subgoal):
 1. (\<Sum>k = 0..<2 * m. a k / FFT.root (2 * m) ^ (i * k)) = (\<Sum>k = 0..<m. a (2 * k) / FFT.root m ^ (i * k)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>k = 0..<m. a (2 * k + 1) / FFT.root m ^ (i * k))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>j = 0..<2 * m. a j / FFT.root (2 * m) ^ (i * j)) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root (2 * m) ^ (i * (2 * j))) + (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root (2 * m) ^ (i * (2 * j + 1)))

goal (1 subgoal):
 1. (\<Sum>k = 0..<2 * m. a k / FFT.root (2 * m) ^ (i * k)) = (\<Sum>k = 0..<m. a (2 * k) / FFT.root m ^ (i * k)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>k = 0..<m. a (2 * k + 1) / FFT.root m ^ (i * k))
[PROOF STEP]
have "... = (\<Sum>j = 0..<m. a (2 * j) / root m ^ (i * j)) +
    (1 / root (2 * m)) ^ i *
    (\<Sum>j = 0..<m. a (2 * j + 1) / root m ^ (i * j))"
    (is "_ = ?t")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. a (2 * j) / FFT.root (2 * m) ^ (i * (2 * j))) + (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root (2 * m) ^ (i * (2 * j + 1))) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root m ^ (i * j)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root m ^ (i * j))
[PROOF STEP]
txt \<open>First pair of sums\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. a (2 * j) / FFT.root (2 * m) ^ (i * (2 * j))) + (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root (2 * m) ^ (i * (2 * j + 1))) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root m ^ (i * j)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root m ^ (i * j))
[PROOF STEP]
apply (simp add: root_cancel1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. a (Suc (2 * j)) / FFT.root (2 * m) ^ (i + i * (2 * j))) = (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (Suc (2 * j)) / FFT.root m ^ (i * j))
[PROOF STEP]
txt \<open>Second pair of sums\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. a (Suc (2 * j)) / FFT.root (2 * m) ^ (i + i * (2 * j))) = (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (Suc (2 * j)) / FFT.root m ^ (i * j))
[PROOF STEP]
apply (simp add: sum_distrib_left)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. a (Suc (2 * j)) / FFT.root (2 * m) ^ (i + i * (2 * j))) = (\<Sum>n = 0..<m. (1 / FFT.root (2 * m)) ^ i * a (Suc (2 * n)) / FFT.root m ^ (i * n))
[PROOF STEP]
apply (simp add: power_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. a (Suc (2 * j)) / (FFT.root (2 * m) ^ i * FFT.root (2 * m) ^ (i * (2 * j)))) = (\<Sum>n = 0..<m. (1 / FFT.root (2 * m)) ^ i * a (Suc (2 * n)) / FFT.root m ^ (i * n))
[PROOF STEP]
apply (simp add: power_divide root_nonzero)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. a (Suc (2 * j)) / (FFT.root (2 * m) ^ i * FFT.root (2 * m) ^ (i * (2 * j)))) = (\<Sum>n = 0..<m. a (Suc (2 * n)) / (FFT.root (2 * m) ^ i * FFT.root m ^ (i * n)))
[PROOF STEP]
apply (simp add: root_cancel1)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(\<Sum>j = 0..<m. a (2 * j) / FFT.root (2 * m) ^ (i * (2 * j))) + (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root (2 * m) ^ (i * (2 * j + 1))) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root m ^ (i * j)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root m ^ (i * j))

goal (1 subgoal):
 1. (\<Sum>k = 0..<2 * m. a k / FFT.root (2 * m) ^ (i * k)) = (\<Sum>k = 0..<m. a (2 * k) / FFT.root m ^ (i * k)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>k = 0..<m. a (2 * k + 1) / FFT.root m ^ (i * k))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>j = 0..<2 * m. a j / FFT.root (2 * m) ^ (i * j)) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root m ^ (i * j)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root m ^ (i * j))
[PROOF STEP]
show "?s = ?t"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>j = 0..<2 * m. a j / FFT.root (2 * m) ^ (i * j)) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root m ^ (i * j)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root m ^ (i * j))

goal (1 subgoal):
 1. (\<Sum>j = 0..<2 * m. a j / FFT.root (2 * m) ^ (i * j)) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root m ^ (i * j)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root m ^ (i * j))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>j = 0..<2 * m. a j / FFT.root (2 * m) ^ (i * j)) = (\<Sum>j = 0..<m. a (2 * j) / FFT.root m ^ (i * j)) + (1 / FFT.root (2 * m)) ^ i * (\<Sum>j = 0..<m. a (2 * j + 1) / FFT.root m ^ (i * j))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma measurable_bounded_by_integrable_imp_lebesgue_integrable:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  assumes f: "f \<in> borel_measurable (lebesgue_on S)" and g: "integrable (lebesgue_on S) g"
    and normf: "\<And>x. x \<in> S \<Longrightarrow> norm(f x) \<le> g x" and S: "S \<in> sets lebesgue"
  shows "integrable (lebesgue_on S) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on S) f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. integrable (lebesgue_on S) f
[PROOF STEP]
have "f absolutely_integrable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f absolutely_integrable_on S
[PROOF STEP]
by (metis (no_types) S absolutely_integrable_integrable_bound f g integrable_on_lebesgue_on measurable_bounded_by_integrable_imp_integrable normf)
[PROOF STATE]
proof (state)
this:
f absolutely_integrable_on S

goal (1 subgoal):
 1. integrable (lebesgue_on S) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f absolutely_integrable_on S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on S

goal (1 subgoal):
 1. integrable (lebesgue_on S) f
[PROOF STEP]
by (simp add: S integrable_restrict_space set_integrable_def)
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on S) f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pos_mult_pos:"\<lbrakk> 0 < (r::nat); 0 < s\<rbrakk> \<Longrightarrow> 0 < r * s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < r; 0 < s\<rbrakk> \<Longrightarrow> 0 < r * s
[PROOF STEP]
by simp


[STATEMENT]
lemma infinity_eq_eSuc_iff: "\<infinity> = eSuc n \<longleftrightarrow> n = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<infinity> = eSuc n) = (n = \<infinity>)
[PROOF STEP]
by(cases n)(simp_all add: zero_enat_def eSuc_enat)


[STATEMENT]
lemma cubic:
  assumes a0: "a \<noteq> 0"
  shows
    "let
      p = (3 * a * c - b^2) / (9 * a^2);
      q = (9 * a * b * c - 2 * b^3 - 27 * a^2 * d) / (54 * a^3);
      s = csqrt(q^2 + p^3);
      s1 = (if p = 0 then ccbrt(2 * q) else ccbrt(q + s));
      s2 = -s1 * (1 + \<i> * csqrt 3) / 2;
      s3 = -s1 * (1 - \<i> * csqrt 3) / 2
     in
      if p = 0 then
        a * x^3 + b * x^2 + c * x + d = 0 \<longleftrightarrow>
          x = s1 - b / (3 * a) \<or>
          x = s2 - b / (3 * a) \<or>
          x = s3 - b / (3 * a)
      else
        s1 \<noteq> 0 \<and>
          (a * x^3 + b * x^2 + c * x + d = 0 \<longleftrightarrow>
            x = s1 - p / s1 - b / (3 * a) \<or>
            x = s2 - p / s2 - b / (3 * a) \<or>
            x = s3 - p / s3 - b / (3 * a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
let ?p = "(3 * a * c - b^2) / (9 * a^2)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
let ?q = "(9 * a * b * c - 2 * b^3 - 27 * a^2 * d) / (54 * a^3)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
let ?s = "csqrt (?q^2 + ?p^3)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
let ?s1 = "if ?p = 0 then ccbrt(2 * ?q) else ccbrt(?q + ?s)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
let ?s2 = "- ?s1 * (1 + \<i> * csqrt 3) / 2"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
let ?s3 = "- ?s1 * (1 - \<i> * csqrt 3) / 2"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
let ?y = "x + b / (3 * a)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
from a0
[PROOF STATE]
proof (chain)
picking this:
a \<noteq> 0
[PROOF STEP]
have zero: "9 * a^2 \<noteq> 0" "a^3 * 54 \<noteq> 0" "(a * 3) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
a \<noteq> 0

goal (1 subgoal):
 1. 9 * a\<^sup>2 \<noteq> 0 &&& a ^ 3 * 54 \<noteq> 0 &&& a * 3 \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
9 * a\<^sup>2 \<noteq> 0
a ^ 3 * 54 \<noteq> 0
a * 3 \<noteq> 0

goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
have eq: "a * x^3 + b * x^2 + c * x + d = 0 \<longleftrightarrow> ?y^3 + 3 * ?p * ?y - 2 * ?q = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0)
[PROOF STEP]
by (rule cubic_reduction) (auto simp add: field_simps zero a0)
[PROOF STATE]
proof (state)
this:
(a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0)

goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
have "csqrt 3^2 = 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (csqrt 3)\<^sup>2 = 3
[PROOF STEP]
by (rule power2_csqrt)
[PROOF STATE]
proof (state)
this:
(csqrt 3)\<^sup>2 = 3

goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(csqrt 3)\<^sup>2 = 3
[PROOF STEP]
have th0:
    "?s^2 = ?q^2 + ?p ^ 3 \<and> ?s1^ 3 = (if ?p = 0 then 2 * ?q else ?q + ?s) \<and>
      ?s2 = - ?s1 * (1 + \<i> * csqrt 3) / 2 \<and>
      ?s3 = - ?s1 * (1 - \<i> * csqrt 3) / 2 \<and>
      \<i>^2 + 1 = 0 \<and> csqrt 3^2 = 3"
[PROOF STATE]
proof (prove)
using this:
(csqrt 3)\<^sup>2 = 3

goal (1 subgoal):
 1. (csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))\<^sup>2 = ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3 \<and> (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) ^ 3 = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) else (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3)) \<and> - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<and> - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 \<and> \<i>\<^sup>2 + 1 = 0 \<and> (csqrt 3)\<^sup>2 = 3
[PROOF STEP]
using zero
[PROOF STATE]
proof (prove)
using this:
(csqrt 3)\<^sup>2 = 3
9 * a\<^sup>2 \<noteq> 0
a ^ 3 * 54 \<noteq> 0
a * 3 \<noteq> 0

goal (1 subgoal):
 1. (csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))\<^sup>2 = ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3 \<and> (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) ^ 3 = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) else (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3)) \<and> - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<and> - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 \<and> \<i>\<^sup>2 + 1 = 0 \<and> (csqrt 3)\<^sup>2 = 3
[PROOF STEP]
by (simp add: field_simps ccbrt)
[PROOF STATE]
proof (state)
this:
(csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))\<^sup>2 = ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3 \<and> (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) ^ 3 = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) else (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3)) \<and> - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<and> - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 \<and> \<i>\<^sup>2 + 1 = 0 \<and> (csqrt 3)\<^sup>2 = 3

goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
from cubic_basic[OF th0, of ?y]
[PROOF STATE]
proof (chain)
picking this:
if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2))

goal (1 subgoal):
 1. let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))
[PROOF STEP]
apply (simp only: Let_def eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2)) \<Longrightarrow> if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - b / (3 * a) \<or> x = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - b / (3 * a) \<or> x = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - b / (3 * a)) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - b / (3 * a) \<or> x = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) - b / (3 * a) \<or> x = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) - b / (3 * a))
[PROOF STEP]
using zero
[PROOF STATE]
proof (prove)
using this:
9 * a\<^sup>2 \<noteq> 0
a ^ 3 * 54 \<noteq> 0
a * 3 \<noteq> 0

goal (1 subgoal):
 1. if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2)) \<Longrightarrow> if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - b / (3 * a) \<or> x = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - b / (3 * a) \<or> x = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - b / (3 * a)) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - b / (3 * a) \<or> x = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) - b / (3 * a) \<or> x = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) - b / (3 * a))
[PROOF STEP]
apply (simp add: field_simps ccbrt)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>if a * (c * 3) = b\<^sup>2 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2)); a \<noteq> 0\<rbrakk> \<Longrightarrow> (a * (c * 3) = b\<^sup>2 \<longrightarrow> (4 * b ^ 3 + (d * (a\<^sup>2 * 54) + 2 * (b + a * (x * 3)) ^ 3) = a * (b * (c * 18))) = (b + a * (x * 3) = a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54))) \<or> b * 2 + (a * (x * 6) + \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))))) = - (a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))) \<or> b * 2 + (a * (x * 6) + a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))) = \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54))))))) \<and> (a * (c * 3) \<noteq> b\<^sup>2 \<longrightarrow> ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)) \<noteq> 0 \<and> (a * (b * (c * (a ^ 6 * 486))) + (a * (d * (a ^ 7 * 1458)) + (a * (b ^ 3 * (a ^ 5 * 108)) + (a * (a * (c * (x * (a ^ 6 * 1458)))) + a * (a ^ 5 * (54 * (b + a * (x * 3)) ^ 3))))) = b * (b\<^sup>2 * (a ^ 6 * 162)) + (a * (a * (b * (c * (a ^ 5 * 486)))) + a * (x * (b\<^sup>2 * (a ^ 6 * 486))))) = (b + (a * (x * 3) + (a * (a * (c * 9)) - a * (3 * b\<^sup>2)) / (9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) = a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))) \<or> b * 2 + (a * (x * 6) + (\<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) + (a * (a * (c * 36)) - a * (12 * b\<^sup>2)) / (- (9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))) - \<i> * (9 * (a\<^sup>2 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))))) = - (a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))) \<or> b * 2 + (a * (x * 6) + (a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))) + (a * (a * (c * 36)) - a * (12 * b\<^sup>2)) / (\<i> * (9 * (a\<^sup>2 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) - 9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))) = \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))))
[PROOF STEP]
using zero
[PROOF STATE]
proof (prove)
using this:
9 * a\<^sup>2 \<noteq> 0
a ^ 3 * 54 \<noteq> 0
a * 3 \<noteq> 0

goal (1 subgoal):
 1. \<lbrakk>if a * (c * 3) = b\<^sup>2 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2)); a \<noteq> 0\<rbrakk> \<Longrightarrow> (a * (c * 3) = b\<^sup>2 \<longrightarrow> (4 * b ^ 3 + (d * (a\<^sup>2 * 54) + 2 * (b + a * (x * 3)) ^ 3) = a * (b * (c * 18))) = (b + a * (x * 3) = a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54))) \<or> b * 2 + (a * (x * 6) + \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))))) = - (a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))) \<or> b * 2 + (a * (x * 6) + a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))) = \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54))))))) \<and> (a * (c * 3) \<noteq> b\<^sup>2 \<longrightarrow> ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)) \<noteq> 0 \<and> (a * (b * (c * (a ^ 6 * 486))) + (a * (d * (a ^ 7 * 1458)) + (a * (b ^ 3 * (a ^ 5 * 108)) + (a * (a * (c * (x * (a ^ 6 * 1458)))) + a * (a ^ 5 * (54 * (b + a * (x * 3)) ^ 3))))) = b * (b\<^sup>2 * (a ^ 6 * 162)) + (a * (a * (b * (c * (a ^ 5 * 486)))) + a * (x * (b\<^sup>2 * (a ^ 6 * 486))))) = (b + (a * (x * 3) + (a * (a * (c * 9)) - a * (3 * b\<^sup>2)) / (9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) = a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))) \<or> b * 2 + (a * (x * 6) + (\<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) + (a * (a * (c * 36)) - a * (12 * b\<^sup>2)) / (- (9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))) - \<i> * (9 * (a\<^sup>2 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))))) = - (a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))) \<or> b * 2 + (a * (x * 6) + (a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))) + (a * (a * (c * 36)) - a * (12 * b\<^sup>2)) / (\<i> * (9 * (a\<^sup>2 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) - 9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))) = \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))))
[PROOF STEP]
apply (cases "a * (c * 3) = b^2")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>if a * (c * 3) = b\<^sup>2 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2)); a \<noteq> 0; 9 * a\<^sup>2 \<noteq> 0; a ^ 3 * 54 \<noteq> 0; a * 3 \<noteq> 0; a * (c * 3) = b\<^sup>2\<rbrakk> \<Longrightarrow> (a * (c * 3) = b\<^sup>2 \<longrightarrow> (4 * b ^ 3 + (d * (a\<^sup>2 * 54) + 2 * (b + a * (x * 3)) ^ 3) = a * (b * (c * 18))) = (b + a * (x * 3) = a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54))) \<or> b * 2 + (a * (x * 6) + \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))))) = - (a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))) \<or> b * 2 + (a * (x * 6) + a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))) = \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54))))))) \<and> (a * (c * 3) \<noteq> b\<^sup>2 \<longrightarrow> ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)) \<noteq> 0 \<and> (a * (b * (c * (a ^ 6 * 486))) + (a * (d * (a ^ 7 * 1458)) + (a * (b ^ 3 * (a ^ 5 * 108)) + (a * (a * (c * (x * (a ^ 6 * 1458)))) + a * (a ^ 5 * (54 * (b + a * (x * 3)) ^ 3))))) = b * (b\<^sup>2 * (a ^ 6 * 162)) + (a * (a * (b * (c * (a ^ 5 * 486)))) + a * (x * (b\<^sup>2 * (a ^ 6 * 486))))) = (b + (a * (x * 3) + (a * (a * (c * 9)) - a * (3 * b\<^sup>2)) / (9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) = a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))) \<or> b * 2 + (a * (x * 6) + (\<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) + (a * (a * (c * 36)) - a * (12 * b\<^sup>2)) / (- (9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))) - \<i> * (9 * (a\<^sup>2 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))))) = - (a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))) \<or> b * 2 + (a * (x * 6) + (a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))) + (a * (a * (c * 36)) - a * (12 * b\<^sup>2)) / (\<i> * (9 * (a\<^sup>2 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) - 9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))) = \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))))
 2. \<lbrakk>if a * (c * 3) = b\<^sup>2 then ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2) else (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<noteq> 0 \<and> ((x + b / (3 * a)) ^ 3 + 3 * ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) * (x + b / (3 * a)) - 2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3)) = 0) = (x + b / (3 * a) = (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 + \<i> * csqrt 3) / 2) \<or> x + b / (3 * a) = - (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2 - (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) / (- (if (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2) = 0 then ccbrt (2 * ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))) else ccbrt ((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3) + csqrt (((9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3))\<^sup>2 + ((3 * a * c - b\<^sup>2) / (9 * a\<^sup>2)) ^ 3))) * (1 - \<i> * csqrt 3) / 2)); a \<noteq> 0; 9 * a\<^sup>2 \<noteq> 0; a ^ 3 * 54 \<noteq> 0; a * 3 \<noteq> 0; a * (c * 3) \<noteq> b\<^sup>2\<rbrakk> \<Longrightarrow> (a * (c * 3) = b\<^sup>2 \<longrightarrow> (4 * b ^ 3 + (d * (a\<^sup>2 * 54) + 2 * (b + a * (x * 3)) ^ 3) = a * (b * (c * 18))) = (b + a * (x * 3) = a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54))) \<or> b * 2 + (a * (x * 6) + \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))))) = - (a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))) \<or> b * 2 + (a * (x * 6) + a * (3 * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54)))) = \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 18)) - (4 * b ^ 3 + d * (a\<^sup>2 * 54))) / (a ^ 3 * 54))))))) \<and> (a * (c * 3) \<noteq> b\<^sup>2 \<longrightarrow> ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)) \<noteq> 0 \<and> (a * (b * (c * (a ^ 6 * 486))) + (a * (d * (a ^ 7 * 1458)) + (a * (b ^ 3 * (a ^ 5 * 108)) + (a * (a * (c * (x * (a ^ 6 * 1458)))) + a * (a ^ 5 * (54 * (b + a * (x * 3)) ^ 3))))) = b * (b\<^sup>2 * (a ^ 6 * 162)) + (a * (a * (b * (c * (a ^ 5 * 486)))) + a * (x * (b\<^sup>2 * (a ^ 6 * 486))))) = (b + (a * (x * 3) + (a * (a * (c * 9)) - a * (3 * b\<^sup>2)) / (9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) = a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))) \<or> b * 2 + (a * (x * 6) + (\<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) + (a * (a * (c * 36)) - a * (12 * b\<^sup>2)) / (- (9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))) - \<i> * (9 * (a\<^sup>2 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))))) = - (a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))) \<or> b * 2 + (a * (x * 6) + (a * (3 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))) + (a * (a * (c * 36)) - a * (12 * b\<^sup>2)) / (\<i> * (9 * (a\<^sup>2 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54))))) - 9 * (a\<^sup>2 * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))) = \<i> * (a * (3 * (complex_of_real (sqrt 3) * ccbrt ((a * (b * (c * 9)) + a ^ 3 * (54 * csqrt ((4 * (a * (c * 3) - b\<^sup>2) ^ 3 + (a * (b * (c * 9)) - (2 * b ^ 3 + d * (a\<^sup>2 * 27)))\<^sup>2) / (a ^ 6 * 2916))) - (2 * b ^ 3 + d * (a\<^sup>2 * 27))) / (a ^ 3 * 54)))))))
[PROOF STEP]
apply (simp_all add: field_simps)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
let p = (3 * a * c - b\<^sup>2) / (9 * a\<^sup>2); q = (9 * a * b * c - 2 * b ^ 3 - 27 * a\<^sup>2 * d) / (54 * a ^ 3); s = csqrt (q\<^sup>2 + p ^ 3); s1 = if p = 0 then ccbrt (2 * q) else ccbrt (q + s); s2 = - s1 * (1 + \<i> * csqrt 3) / 2; s3 = - s1 * (1 - \<i> * csqrt 3) / 2 in if p = 0 then (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - b / (3 * a) \<or> x = s2 - b / (3 * a) \<or> x = s3 - b / (3 * a)) else s1 \<noteq> 0 \<and> (a * x ^ 3 + b * x\<^sup>2 + c * x + d = 0) = (x = s1 - p / s1 - b / (3 * a) \<or> x = s2 - p / s2 - b / (3 * a) \<or> x = s3 - p / s3 - b / (3 * a))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma power2_eq_square_octo: "x ^ 2 = (x * x :: octo)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>2 = x * x
[PROOF STEP]
by (simp add: numeral_2_eq_2 times_octo_def)


[STATEMENT]
lemma Ipoly_interval_args_inc_mono:
  fixes p::"'a::{real_normed_algebra, linear_continuum_topology, linordered_idom} poly"
    and   I::"'a interval list" and J::"'a interval list"
  assumes "num_params p \<le> length I"
  assumes "I all_subset J"
  shows "set_of (Ipoly I (map_poly interval_of p)) \<subseteq> set_of (Ipoly J (map_poly interval_of p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_of (Ipoly I (map_poly interval_of p)) \<subseteq> set_of (Ipoly J (map_poly interval_of p))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
num_params p \<le> length I
I all_subset J

goal (1 subgoal):
 1. set_of (Ipoly I (map_poly interval_of p)) \<subseteq> set_of (Ipoly J (map_poly interval_of p))
[PROOF STEP]
by (induction p)
    (simp_all add: set_of_add_inc set_of_sub_inc set_of_mul_inc set_of_neg_inc set_of_pow_inc)