[STATEMENT]
lemma l2norm_diff:
  assumes "f square_integrable S" "g square_integrable S"
  shows "l2norm S (\<lambda>x. f x - g x) = l2norm S (\<lambda>x. g x - f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l2norm S (\<lambda>x. f x - g x) = l2norm S (\<lambda>x. g x - f x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. l2norm S (\<lambda>x. f x - g x) = l2norm S (\<lambda>x. g x - f x)
[PROOF STEP]
have "(\<lambda>x. f x - g x) square_integrable S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x - g x) square_integrable S
[PROOF STEP]
using assms square_integrable_diff
[PROOF STATE]
proof (prove)
using this:
f square_integrable S
g square_integrable S
\<lbrakk>?f square_integrable ?S; ?g square_integrable ?S\<rbrakk> \<Longrightarrow> (\<lambda>x. ?f x - ?g x) square_integrable ?S

goal (1 subgoal):
 1. (\<lambda>x. f x - g x) square_integrable S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x - g x) square_integrable S

goal (1 subgoal):
 1. l2norm S (\<lambda>x. f x - g x) = l2norm S (\<lambda>x. g x - f x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. f x - g x) square_integrable S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x - g x) square_integrable S

goal (1 subgoal):
 1. l2norm S (\<lambda>x. f x - g x) = l2norm S (\<lambda>x. g x - f x)
[PROOF STEP]
using l2norm_neg [of "\<lambda>x. f x - g x" S]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x - g x) square_integrable S
(\<lambda>x. f x - g x) square_integrable S \<Longrightarrow> l2norm S (\<lambda>x. - (f x - g x)) = l2norm S (\<lambda>x. f x - g x)

goal (1 subgoal):
 1. l2norm S (\<lambda>x. f x - g x) = l2norm S (\<lambda>x. g x - f x)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
l2norm S (\<lambda>x. f x - g x) = l2norm S (\<lambda>x. g x - f x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma forall_nat_expansion:
  \<open>(\<forall>n \<ge> (n\<^sub>0::nat). P n) = (P n\<^sub>0 \<and> (\<forall>n \<ge> Suc n\<^sub>0. P n))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n\<ge>Suc n\<^sub>0. P n))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n\<ge>Suc n\<^sub>0. P n))
[PROOF STEP]
have \<open>(\<forall>n \<ge> (n\<^sub>0::nat). P n) = (\<forall>n. (n = n\<^sub>0 \<or> n > n\<^sub>0) \<longrightarrow> P n)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (\<forall>n. n = n\<^sub>0 \<or> n\<^sub>0 < n \<longrightarrow> P n)
[PROOF STEP]
using le_less
[PROOF STATE]
proof (prove)
using this:
(?x \<le> ?y) = (?x < ?y \<or> ?x = ?y)

goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (\<forall>n. n = n\<^sub>0 \<or> n\<^sub>0 < n \<longrightarrow> P n)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<forall>n\<ge>n\<^sub>0. P n) = (\<forall>n. n = n\<^sub>0 \<or> n\<^sub>0 < n \<longrightarrow> P n)

goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n\<ge>Suc n\<^sub>0. P n))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<forall>n\<ge>n\<^sub>0. P n) = (\<forall>n. n = n\<^sub>0 \<or> n\<^sub>0 < n \<longrightarrow> P n)

goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n\<ge>Suc n\<^sub>0. P n))
[PROOF STEP]
have \<open>... = (P n\<^sub>0 \<and> (\<forall>n > n\<^sub>0. P n))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>n. n = n\<^sub>0 \<or> n\<^sub>0 < n \<longrightarrow> P n) = (P n\<^sub>0 \<and> (\<forall>n>n\<^sub>0. P n))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<forall>n. n = n\<^sub>0 \<or> n\<^sub>0 < n \<longrightarrow> P n) = (P n\<^sub>0 \<and> (\<forall>n>n\<^sub>0. P n))

goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n\<ge>Suc n\<^sub>0. P n))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n>n\<^sub>0. P n))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n>n\<^sub>0. P n))

goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n\<ge>Suc n\<^sub>0. P n))
[PROOF STEP]
using Suc_le_eq
[PROOF STATE]
proof (prove)
using this:
(\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n>n\<^sub>0. P n))
(Suc ?m \<le> ?n) = (?m < ?n)

goal (1 subgoal):
 1. (\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n\<ge>Suc n\<^sub>0. P n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<forall>n\<ge>n\<^sub>0. P n) = (P n\<^sub>0 \<and> (\<forall>n\<ge>Suc n\<^sub>0. P n))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prime_power_not_one:
  assumes "prime p" "k > 0"
  shows   "p ^ k \<noteq> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p ^ k \<noteq> (1::'a)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p ^ k = (1::'a) \<Longrightarrow> False
[PROOF STEP]
assume "p ^ k = 1"
[PROOF STATE]
proof (state)
this:
p ^ k = (1::'a)

goal (1 subgoal):
 1. p ^ k = (1::'a) \<Longrightarrow> False
[PROOF STEP]
hence "is_unit (p ^ k)"
[PROOF STATE]
proof (prove)
using this:
p ^ k = (1::'a)

goal (1 subgoal):
 1. is_unit (p ^ k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
is_unit (p ^ k)

goal (1 subgoal):
 1. p ^ k = (1::'a) \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
is_unit (p ^ k)

goal (1 subgoal):
 1. False
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_unit (p ^ k)
prime p
0 < k

goal (1 subgoal):
 1. False
[PROOF STEP]
by (simp add: is_unit_power_iff)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trace_adjoint_eq_u:
  fixes A :: "complex mat"
  shows "trace (A * adjoint A) = (\<Sum> i \<in> {0 ..< dim_row A}. \<Sum> j \<in> {0 ..< dim_col A}. (norm(A $$ (i,j)))\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)
[PROOF STEP]
have "trace (A * adjoint A) = (\<Sum> i \<in> {0 ..< dim_row A}. row A i \<bullet> conjugate (row A i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trace (A * adjoint A) = (\<Sum>i = 0..<dim_row A. inner_prod (row A i) (row A i))
[PROOF STEP]
by (simp add: trace_def cmod_def adjoint_def scalar_prod_def)
[PROOF STATE]
proof (state)
this:
trace (A * adjoint A) = (\<Sum>i = 0..<dim_row A. inner_prod (row A i) (row A i))

goal (1 subgoal):
 1. trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
trace (A * adjoint A) = (\<Sum>i = 0..<dim_row A. inner_prod (row A i) (row A i))

goal (1 subgoal):
 1. trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)
[PROOF STEP]
have "\<dots> = (\<Sum> i \<in> {0 ..< dim_row A}. \<Sum> j \<in> {0 ..< dim_col A}. (norm(A $$ (i,j)))\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_row A. inner_prod (row A i) (row A i)) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)
[PROOF STEP]
proof (simp add: scalar_prod_def cmod_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_row A. \<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Re (A $$ (x, xa))))\<^sup>2) + (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Im (A $$ (x, xa))))\<^sup>2)
[PROOF STEP]
have cnjmul: "\<forall> i ia. A $$ (i, ia) * cnj (A $$ (i, ia)) =
                   ((complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i ia. A $$ (i, ia) * cnj (A $$ (i, ia)) = (complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2
[PROOF STEP]
by (simp add: complex_mult_cnj)
[PROOF STATE]
proof (state)
this:
\<forall>i ia. A $$ (i, ia) * cnj (A $$ (i, ia)) = (complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_row A. \<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Re (A $$ (x, xa))))\<^sup>2) + (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Im (A $$ (x, xa))))\<^sup>2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i ia. A $$ (i, ia) * cnj (A $$ (i, ia)) = (complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2
[PROOF STEP]
have "\<forall> i. (\<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) =
                      (\<Sum>ia = 0..<dim_col A.  ((complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2))"
[PROOF STATE]
proof (prove)
using this:
\<forall>i ia. A $$ (i, ia) * cnj (A $$ (i, ia)) = (complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2

goal (1 subgoal):
 1. \<forall>i. (\<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>ia = 0..<dim_col A. (complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i. (\<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>ia = 0..<dim_col A. (complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2)

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_row A. \<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Re (A $$ (x, xa))))\<^sup>2) + (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Im (A $$ (x, xa))))\<^sup>2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i. (\<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>ia = 0..<dim_col A. (complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2)
[PROOF STEP]
show"(\<Sum>i = 0..<dim_row A. \<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) =
        (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Re (A $$ (x, xa))))\<^sup>2) +
        (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Im (A $$ (x, xa))))\<^sup>2)"
[PROOF STATE]
proof (prove)
using this:
\<forall>i. (\<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>ia = 0..<dim_col A. (complex_of_real (Re (A $$ (i, ia))))\<^sup>2 + (complex_of_real (Im (A $$ (i, ia))))\<^sup>2)

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_row A. \<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Re (A $$ (x, xa))))\<^sup>2) + (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Im (A $$ (x, xa))))\<^sup>2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_row A. \<Sum>ia = 0..<dim_col A. A $$ (i, ia) * cnj (A $$ (i, ia))) = (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Re (A $$ (x, xa))))\<^sup>2) + (\<Sum>x = 0..<dim_row A. \<Sum>xa = 0..<dim_col A. (complex_of_real (Im (A $$ (x, xa))))\<^sup>2)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_row A. inner_prod (row A i) (row A i)) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)

goal (1 subgoal):
 1. trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)

goal (1 subgoal):
 1. trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
trace (A * adjoint A) = complex_of_real (\<Sum>i = 0..<dim_row A. \<Sum>j = 0..<dim_col A. (cmod (A $$ (i, j)))\<^sup>2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma falling_fact_pochhammer: "prod (\<lambda>i. a - int i) {0..<k} = (- 1) ^ k * pochhammer (- a) k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
have eq: "z ^ Suc n * prod f {0..n} = prod (\<lambda>x. z * f x) {0..n}" for z::int and n f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z ^ Suc n * prod f {0..n} = (\<Prod>x = 0..n. z * f x)
[PROOF STEP]
by (induct n) (simp_all add: ac_simps)
[PROOF STATE]
proof (state)
this:
?z ^ Suc ?n * prod ?f {0..?n} = (\<Prod>x = 0..?n. ?z * ?f x)

goal (1 subgoal):
 1. (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
proof (cases k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. k = 0 \<Longrightarrow> (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
 2. \<And>nat. k = Suc nat \<Longrightarrow> (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
k = 0

goal (2 subgoals):
 1. k = 0 \<Longrightarrow> (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
 2. \<And>nat. k = Suc nat \<Longrightarrow> (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
k = 0

goal (1 subgoal):
 1. (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
by (simp add: pochhammer_minus)
[PROOF STATE]
proof (state)
this:
(\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k

goal (1 subgoal):
 1. \<And>nat. k = Suc nat \<Longrightarrow> (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. k = Suc nat \<Longrightarrow> (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
k = Suc n

goal (1 subgoal):
 1. \<And>nat. k = Suc nat \<Longrightarrow> (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
k = Suc n

goal (1 subgoal):
 1. (\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k
[PROOF STEP]
by (simp only: pochhammer_prod atLeastLessThanSuc_atLeastAtMost
          prod.atLeast_Suc_atMost_Suc_shift eq flip: power_mult_distrib) (simp add: of_nat_diff)
[PROOF STATE]
proof (state)
this:
(\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Prod>i = 0..<k. a - int i) = (- 1) ^ k * pochhammer (- a) k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem doublep_infinite_params:
  \<open>infinite (- (\<Union>p \<in> psubst (\<lambda>n::nat. 2 * n) ` S. params p))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite (- \<Union> (params ` psubst ((*) 2) ` S))
[PROOF STEP]
proof (rule infinite_super)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?S \<subseteq> - \<Union> (params ` psubst ((*) 2) ` S)
 2. infinite ?S
[PROOF STEP]
show \<open>infinite (range (\<lambda>n::nat. 2 * n + 1))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite (range (\<lambda>n. 2 * n + 1))
[PROOF STEP]
using inj_onI Suc_1 Suc_mult_cancel1 add_right_imp_eq finite_imageD infinite_UNIV_char_0
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. \<lbrakk>x \<in> ?A; y \<in> ?A; ?f x = ?f y\<rbrakk> \<Longrightarrow> x = y) \<Longrightarrow> inj_on ?f ?A
Suc 1 = 2
(Suc ?k * ?m = Suc ?k * ?n) = (?m = ?n)
?b + ?a = ?c + ?a \<Longrightarrow> ?b = ?c
\<lbrakk>finite (?f ` ?A); inj_on ?f ?A\<rbrakk> \<Longrightarrow> finite ?A
infinite UNIV

goal (1 subgoal):
 1. infinite (range (\<lambda>n. 2 * n + 1))
[PROOF STEP]
by (metis (no_types, lifting))
[PROOF STATE]
proof (state)
this:
infinite (range (\<lambda>n. 2 * n + 1))

goal (1 subgoal):
 1. range (\<lambda>n. 2 * n + 1) \<subseteq> - \<Union> (params ` psubst ((*) 2) ` S)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. range (\<lambda>n. 2 * n + 1) \<subseteq> - \<Union> (params ` psubst ((*) 2) ` S)
[PROOF STEP]
have \<open>\<And>m n. Suc (2 * m) \<noteq> 2 * n\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>m n. Suc (2 * m) \<noteq> 2 * n
[PROOF STEP]
by arith
[PROOF STATE]
proof (state)
this:
Suc (2 * ?m) \<noteq> 2 * ?n

goal (1 subgoal):
 1. range (\<lambda>n. 2 * n + 1) \<subseteq> - \<Union> (params ` psubst ((*) 2) ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Suc (2 * ?m) \<noteq> 2 * ?n
[PROOF STEP]
show \<open>range (\<lambda>n. 2 * n + 1)
    \<subseteq> - (\<Union>p::(nat, 'a) form \<in> psubst (\<lambda>n . 2 * n) ` S. params p)\<close>
[PROOF STATE]
proof (prove)
using this:
Suc (2 * ?m) \<noteq> 2 * ?n

goal (1 subgoal):
 1. range (\<lambda>n. 2 * n + 1) \<subseteq> - \<Union> (params ` psubst ((*) 2) ` S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
range (\<lambda>n. 2 * n + 1) \<subseteq> - \<Union> (params ` psubst ((*) 2) ` S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ivl_integral_has_vderiv_on_compact_interval:
  fixes f :: "real \<Rightarrow> 'a::banach"
  assumes "continuous_on A f"
    and "c \<in> A" "is_interval A" "compact A"
  shows "((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A
[PROOF STEP]
have "A = {Inf A .. Sup A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A = {Inf A..Sup A}
[PROOF STEP]
by (rule compact_interval_eq_Inf_Sup) (use assms in auto)
[PROOF STATE]
proof (state)
this:
A = {Inf A..Sup A}

goal (1 subgoal):
 1. ((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
A = {Inf A..Sup A}

goal (1 subgoal):
 1. ((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A
[PROOF STEP]
have "\<dots> = closed_segment (Inf A) (Sup A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {Inf A..Sup A} = closed_segment (Inf A) (Sup A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
continuous_on A f
c \<in> A
is_interval A
compact A

goal (1 subgoal):
 1. {Inf A..Sup A} = closed_segment (Inf A) (Sup A)
[PROOF STEP]
by (auto simp add: closed_segment_eq_real_ivl
        intro!: cInf_le_cSup bounded_imp_bdd_below bounded_imp_bdd_above compact_imp_bounded)
[PROOF STATE]
proof (state)
this:
{Inf A..Sup A} = closed_segment (Inf A) (Sup A)

goal (1 subgoal):
 1. ((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
A = closed_segment (Inf A) (Sup A)
[PROOF STEP]
have *: "A = closed_segment (Inf A) (Sup A)"
[PROOF STATE]
proof (prove)
using this:
A = closed_segment (Inf A) (Sup A)

goal (1 subgoal):
 1. A = closed_segment (Inf A) (Sup A)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
A = closed_segment (Inf A) (Sup A)

goal (1 subgoal):
 1. ((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A
[PROOF STEP]
apply (subst *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>u. ivl_integral c u f) has_vderiv_on f) (closed_segment (Inf A) (Sup A))
[PROOF STEP]
apply (rule ivl_integral_has_vderiv_on_subset_segment)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. continuous_on (closed_segment (Inf A) (Sup A)) f
 2. c \<in> closed_segment (Inf A) (Sup A)
[PROOF STEP]
unfolding *[symmetric]
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. continuous_on A f
 2. c \<in> A
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
((\<lambda>u. ivl_integral c u f) has_vderiv_on f) A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sin_cube_plus_cos_cube_gt_zero_iff':
  "(sin x ^ 3 + cos x ^ 3 > 0) = (sin (x + pi/4) > 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 < sin x ^ 3 + cos x ^ 3) = (0 < sin (x + pi / 4))
[PROOF STEP]
by (smt (verit, best) mult_pos_pos real_sqrt_gt_0_iff
      sin_cube_plus_cos_cube_gt_zero_iff sin_plus_cos_eq_45 zero_less_mult_pos)


[STATEMENT]
lemma suminf_geometric: "norm c < 1 \<Longrightarrow> suminf (\<lambda>n. c^n) = 1 / (1 - c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm c < 1 \<Longrightarrow> (\<Sum>n. c ^ n) = (1::'a) / ((1::'a) - c)
[PROOF STEP]
by (rule sums_unique[symmetric]) (rule geometric_sums)


[STATEMENT]
theorem machin: "pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
have "\<bar>1 / 5\<bar> < (1 :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>1 / 5\<bar> < 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>1 / 5\<bar> < 1

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
from arctan_add[OF less_imp_le[OF this] this]
[PROOF STATE]
proof (chain)
picking this:
arctan (1 / 5) + arctan (1 / 5) = arctan ((1 / 5 + 1 / 5) / (1 - 1 / 5 * (1 / 5)))
[PROOF STEP]
have "2 * arctan (1 / 5) = arctan (5 / 12)"
[PROOF STATE]
proof (prove)
using this:
arctan (1 / 5) + arctan (1 / 5) = arctan ((1 / 5 + 1 / 5) / (1 - 1 / 5 * (1 / 5)))

goal (1 subgoal):
 1. 2 * arctan (1 / 5) = arctan (5 / 12)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 * arctan (1 / 5) = arctan (5 / 12)

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
2 * arctan (1 / 5) = arctan (5 / 12)

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
have "\<bar>5 / 12\<bar> < (1 :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>5 / 12\<bar> < 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>5 / 12\<bar> < 1

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
from arctan_add[OF less_imp_le[OF this] this]
[PROOF STATE]
proof (chain)
picking this:
arctan (5 / 12) + arctan (5 / 12) = arctan ((5 / 12 + 5 / 12) / (1 - 5 / 12 * (5 / 12)))
[PROOF STEP]
have "2 * arctan (5 / 12) = arctan (120 / 119)"
[PROOF STATE]
proof (prove)
using this:
arctan (5 / 12) + arctan (5 / 12) = arctan ((5 / 12 + 5 / 12) / (1 - 5 / 12 * (5 / 12)))

goal (1 subgoal):
 1. 2 * arctan (5 / 12) = arctan (120 / 119)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 * arctan (5 / 12) = arctan (120 / 119)

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
2 * arctan (5 / 12) = arctan (120 / 119)

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
have "\<bar>1\<bar> \<le> (1::real)" and "\<bar>1 / 239\<bar> < (1::real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>1\<bar> \<le> 1 &&& \<bar>1 / 239\<bar> < 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>1\<bar> \<le> 1
\<bar>1 / 239\<bar> < 1

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
from arctan_add[OF this]
[PROOF STATE]
proof (chain)
picking this:
arctan 1 + arctan (1 / 239) = arctan ((1 + 1 / 239) / (1 - 1 * (1 / 239)))
[PROOF STEP]
have "arctan 1 + arctan (1 / 239) = arctan (120 / 119)"
[PROOF STATE]
proof (prove)
using this:
arctan 1 + arctan (1 / 239) = arctan ((1 + 1 / 239) / (1 - 1 * (1 / 239)))

goal (1 subgoal):
 1. arctan 1 + arctan (1 / 239) = arctan (120 / 119)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
arctan 1 + arctan (1 / 239) = arctan (120 / 119)

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
2 * arctan (1 / 5) = arctan (5 / 12)
2 * arctan (5 / 12) = arctan (120 / 119)
arctan 1 + arctan (1 / 239) = arctan (120 / 119)
[PROOF STEP]
have "arctan 1 + arctan (1 / 239) = 4 * arctan (1 / 5)"
[PROOF STATE]
proof (prove)
using this:
2 * arctan (1 / 5) = arctan (5 / 12)
2 * arctan (5 / 12) = arctan (120 / 119)
arctan 1 + arctan (1 / 239) = arctan (120 / 119)

goal (1 subgoal):
 1. arctan 1 + arctan (1 / 239) = 4 * arctan (1 / 5)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
arctan 1 + arctan (1 / 239) = 4 * arctan (1 / 5)

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
arctan 1 + arctan (1 / 239) = 4 * arctan (1 / 5)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
arctan 1 + arctan (1 / 239) = 4 * arctan (1 / 5)

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
unfolding arctan_one
[PROOF STATE]
proof (prove)
using this:
pi / 4 + arctan (1 / 239) = 4 * arctan (1 / 5)

goal (1 subgoal):
 1. pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)
[PROOF STEP]
by algebra
[PROOF STATE]
proof (state)
this:
pi / 4 = 4 * arctan (1 / 5) - arctan (1 / 239)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma homotopic_paths_linear:
  fixes g h :: "real \<Rightarrow> 'a::real_normed_vector"
  assumes "path g" "path h" "pathstart h = pathstart g" "pathfinish h = pathfinish g"
          "\<And>t. t \<in> {0..1} \<Longrightarrow> closed_segment (g t) (h t) \<subseteq> S"
    shows "homotopic_paths S g h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homotopic_paths S g h
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
path g
path h
pathstart h = pathstart g
pathfinish h = pathfinish g
?t \<in> {0..1} \<Longrightarrow> closed_segment (g ?t) (h ?t) \<subseteq> S

goal (1 subgoal):
 1. homotopic_paths S g h
[PROOF STEP]
unfolding path_def
[PROOF STATE]
proof (prove)
using this:
continuous_on {0..1} g
continuous_on {0..1} h
pathstart h = pathstart g
pathfinish h = pathfinish g
?t \<in> {0..1} \<Longrightarrow> closed_segment (g ?t) (h ?t) \<subseteq> S

goal (1 subgoal):
 1. homotopic_paths S g h
[PROOF STEP]
apply (simp add: closed_segment_def pathstart_def pathfinish_def homotopic_paths_def homotopic_with_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_on {0..1} g; continuous_on {0..1} h; h 0 = g 0; h 1 = g 1; \<And>t. 0 \<le> t \<and> t \<le> 1 \<Longrightarrow> {(1 - u) *\<^sub>R g t + u *\<^sub>R h t |u. 0 \<le> u \<and> u \<le> 1} \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>ha. continuous_on ({0..1} \<times> {0..1}) ha \<and> ha ` ({0..1} \<times> {0..1}) \<subseteq> S \<and> (\<forall>x. ha (0, x) = g x) \<and> (\<forall>x. ha (1, x) = h x) \<and> (\<forall>t\<in>{0..1}. ha (t, 0) = g 0 \<and> ha (t, 1) = g 1)
[PROOF STEP]
apply (rule_tac x="\<lambda>y. ((1 - (fst y)) *\<^sub>R (g \<circ> snd) y + (fst y) *\<^sub>R (h \<circ> snd) y)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_on {0..1} g; continuous_on {0..1} h; h 0 = g 0; h 1 = g 1; \<And>t. 0 \<le> t \<and> t \<le> 1 \<Longrightarrow> {(1 - u) *\<^sub>R g t + u *\<^sub>R h t |u. 0 \<le> u \<and> u \<le> 1} \<subseteq> S\<rbrakk> \<Longrightarrow> continuous_on ({0..1} \<times> {0..1}) (\<lambda>y. (1 - fst y) *\<^sub>R (g \<circ> snd) y + fst y *\<^sub>R (h \<circ> snd) y) \<and> (\<lambda>y. (1 - fst y) *\<^sub>R (g \<circ> snd) y + fst y *\<^sub>R (h \<circ> snd) y) ` ({0..1} \<times> {0..1}) \<subseteq> S \<and> (\<forall>x. (1 - fst (0, x)) *\<^sub>R (g \<circ> snd) (0, x) + fst (0, x) *\<^sub>R (h \<circ> snd) (0, x) = g x) \<and> (\<forall>x. (1 - fst (1, x)) *\<^sub>R (g \<circ> snd) (1, x) + fst (1, x) *\<^sub>R (h \<circ> snd) (1, x) = h x) \<and> (\<forall>t\<in>{0..1}. (1 - fst (t, 0)) *\<^sub>R (g \<circ> snd) (t, 0) + fst (t, 0) *\<^sub>R (h \<circ> snd) (t, 0) = g 0 \<and> (1 - fst (t, 1)) *\<^sub>R (g \<circ> snd) (t, 1) + fst (t, 1) *\<^sub>R (h \<circ> snd) (t, 1) = g 1)
[PROOF STEP]
apply (intro conjI subsetI continuous_intros; force)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma complex_quadratic_equation_monic_only_two_roots:
  fixes \<xi> :: complex
  assumes "\<xi>\<^sup>2 + b * \<xi> + c = 0"
  shows "\<xi> = (-b + ccsqrt(b\<^sup>2 - 4*c)) / 2 \<or> \<xi> = (-b - ccsqrt(b\<^sup>2 - 4*c)) / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<xi>\<^sup>2 + b * \<xi> + c = 0

goal (1 subgoal):
 1. \<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<xi>\<^sup>2 + b * \<xi> + c = 0 \<Longrightarrow> \<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
\<xi>\<^sup>2 + b * \<xi> + c = 0
[PROOF STEP]
have "(2 * (\<xi> + b/2))\<^sup>2 = b\<^sup>2 - 4*c"
[PROOF STATE]
proof (prove)
using this:
\<xi>\<^sup>2 + b * \<xi> + c = 0

goal (1 subgoal):
 1. (2 * (\<xi> + b / 2))\<^sup>2 = b\<^sup>2 - 4 * c
[PROOF STEP]
by (simp add: power2_eq_square field_simps)
       (metis (no_types, lifting) distrib_right_numeral mult.assoc mult_zero_left)
[PROOF STATE]
proof (state)
this:
(2 * (\<xi> + b / 2))\<^sup>2 = b\<^sup>2 - 4 * c

goal (1 subgoal):
 1. \<xi>\<^sup>2 + b * \<xi> + c = 0 \<Longrightarrow> \<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2
[PROOF STEP]
hence "2 * (\<xi> + b/2) = ccsqrt (b\<^sup>2 - 4*c) \<or> 2 * (\<xi> + b/2) = - ccsqrt (b\<^sup>2 - 4*c)"
[PROOF STATE]
proof (prove)
using this:
(2 * (\<xi> + b / 2))\<^sup>2 = b\<^sup>2 - 4 * c

goal (1 subgoal):
 1. 2 * (\<xi> + b / 2) = ccsqrt (b\<^sup>2 - 4 * c) \<or> 2 * (\<xi> + b / 2) = - ccsqrt (b\<^sup>2 - 4 * c)
[PROOF STEP]
using ccsqrt[of "(2 * (\<xi> + b / 2))" "b\<^sup>2 - 4 * c"]
[PROOF STATE]
proof (prove)
using this:
(2 * (\<xi> + b / 2))\<^sup>2 = b\<^sup>2 - 4 * c
2 * (\<xi> + b / 2) * (2 * (\<xi> + b / 2)) = b\<^sup>2 - 4 * c \<Longrightarrow> 2 * (\<xi> + b / 2) = ccsqrt (b\<^sup>2 - 4 * c) \<or> 2 * (\<xi> + b / 2) = - ccsqrt (b\<^sup>2 - 4 * c)

goal (1 subgoal):
 1. 2 * (\<xi> + b / 2) = ccsqrt (b\<^sup>2 - 4 * c) \<or> 2 * (\<xi> + b / 2) = - ccsqrt (b\<^sup>2 - 4 * c)
[PROOF STEP]
by (simp add: power2_eq_square)
[PROOF STATE]
proof (state)
this:
2 * (\<xi> + b / 2) = ccsqrt (b\<^sup>2 - 4 * c) \<or> 2 * (\<xi> + b / 2) = - ccsqrt (b\<^sup>2 - 4 * c)

goal (1 subgoal):
 1. \<xi>\<^sup>2 + b * \<xi> + c = 0 \<Longrightarrow> \<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
2 * (\<xi> + b / 2) = ccsqrt (b\<^sup>2 - 4 * c) \<or> 2 * (\<xi> + b / 2) = - ccsqrt (b\<^sup>2 - 4 * c)

goal (1 subgoal):
 1. \<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2
[PROOF STEP]
using mult_cancel_right[of "b + \<xi> * 2" 2 "ccsqrt (b\<^sup>2 - 4*c)"]
[PROOF STATE]
proof (prove)
using this:
2 * (\<xi> + b / 2) = ccsqrt (b\<^sup>2 - 4 * c) \<or> 2 * (\<xi> + b / 2) = - ccsqrt (b\<^sup>2 - 4 * c)
((b + \<xi> * 2) * 2 = ccsqrt (b\<^sup>2 - 4 * c) * 2) = (2 = 0 \<or> b + \<xi> * 2 = ccsqrt (b\<^sup>2 - 4 * c))

goal (1 subgoal):
 1. \<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2
[PROOF STEP]
using mult_cancel_right[of "b + \<xi> * 2" 2 "-ccsqrt (b\<^sup>2 - 4*c)"]
[PROOF STATE]
proof (prove)
using this:
2 * (\<xi> + b / 2) = ccsqrt (b\<^sup>2 - 4 * c) \<or> 2 * (\<xi> + b / 2) = - ccsqrt (b\<^sup>2 - 4 * c)
((b + \<xi> * 2) * 2 = ccsqrt (b\<^sup>2 - 4 * c) * 2) = (2 = 0 \<or> b + \<xi> * 2 = ccsqrt (b\<^sup>2 - 4 * c))
((b + \<xi> * 2) * 2 = - ccsqrt (b\<^sup>2 - 4 * c) * 2) = (2 = 0 \<or> b + \<xi> * 2 = - ccsqrt (b\<^sup>2 - 4 * c))

goal (1 subgoal):
 1. \<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2
[PROOF STEP]
by (auto simp add: field_simps) (metis add_diff_cancel diff_minus_eq_add minus_diff_eq)
[PROOF STATE]
proof (state)
this:
\<xi> = (- b + ccsqrt (b\<^sup>2 - 4 * c)) / 2 \<or> \<xi> = (- b - ccsqrt (b\<^sup>2 - 4 * c)) / 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma floor_zero [simp]: "\<lfloor>0\<rfloor> = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lfloor>0::'a\<rfloor> = 0
[PROOF STEP]
using floor_of_int [of 0]
[PROOF STATE]
proof (prove)
using this:
\<lfloor>of_int 0\<rfloor> = 0

goal (1 subgoal):
 1. \<lfloor>0::'a\<rfloor> = 0
[PROOF STEP]
by simp


[STATEMENT]
lemma bag_of_nths_Un_Int:
     "bag_of (nths l (A Un B)) + bag_of (nths l (A Int B)) =
      bag_of (nths l A) + bag_of (nths l B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset (nths l (A \<union> B)) + mset (nths l (A \<inter> B)) = mset (nths l A) + mset (nths l B)
[PROOF STEP]
apply (subgoal_tac "A Int B Int {..<length l} =
                    (A Int {..<length l}) Int (B Int {..<length l}) ")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. A \<inter> B \<inter> {..<length l} = A \<inter> {..<length l} \<inter> (B \<inter> {..<length l}) \<Longrightarrow> mset (nths l (A \<union> B)) + mset (nths l (A \<inter> B)) = mset (nths l A) + mset (nths l B)
 2. A \<inter> B \<inter> {..<length l} = A \<inter> {..<length l} \<inter> (B \<inter> {..<length l})
[PROOF STEP]
apply (simp add: bag_of_nths Int_Un_distrib2 sum.union_inter, blast)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma prod_fact: "real (\<Prod> {1..<1 + k}) = fact (k :: nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (\<Prod>{1..<1 + k}) = fact k
[PROOF STEP]
by (simp add: fact_prod atLeastLessThanSuc_atLeastAtMost)