[STATEMENT]
lemma principal_dchar_sum_bound':
  "(\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / k) x - Ln x) \<in> O(\<lambda>_. 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - Ln (complex_of_real x)) \<in> O(\<lambda>_. 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - Ln (complex_of_real x)) \<in> O(\<lambda>_. 1)
[PROOF STEP]
have "(\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / k) x -
               (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (ln p / p))) \<in> O(\<lambda>_. 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<in> O(\<lambda>_. 1)
[PROOF STEP]
proof (intro bigoI[of _ 3] eventually_mono[OF eventually_gt_at_top[of 0]], goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1
[PROOF STEP]
case (1 x)
[PROOF STATE]
proof (state)
this:
0 < x

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1
[PROOF STEP]
have "norm (complex_of_real (\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / k) -
                of_real (\<Sum>p | prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}. ln p / p)) \<le> 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (complex_of_real (\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / real k) - complex_of_real (\<Sum>x\<in>{p. prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}}. ln (real x) / real x)) \<le> 3
[PROOF STEP]
unfolding of_real_diff [symmetric] norm_of_real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>(\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / real k) - (\<Sum>x\<in>{p. prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}}. ln (real x) / real x)\<bar> \<le> 3
[PROOF STEP]
by (rule Mertens_mangoldt_versus_ln[where n = "nat \<lfloor>x\<rfloor>"])
         (insert n, auto simp: Suc_le_eq le_nat_iff le_floor_iff intro!: Nat.gr0I)
[PROOF STATE]
proof (state)
this:
cmod (complex_of_real (\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / real k) - complex_of_real (\<Sum>x\<in>{p. prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}}. ln (real x) / real x)) \<le> 3

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod (complex_of_real (\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / real k) - complex_of_real (\<Sum>x\<in>{p. prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}}. ln (real x) / real x)) \<le> 3

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1
[PROOF STEP]
have "complex_of_real (\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / k) =
                 sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / k) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / real k) = sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x
[PROOF STEP]
unfolding sum_upto_def of_real_sum
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x\<in>{k. real k \<le> x \<and> coprime k n}. complex_of_real (mangoldt x / real x)) = (\<Sum>k\<in>{i. 0 < i \<and> real i \<le> x}. \<chi>\<^sub>0 k * mangoldt k / of_nat k)
[PROOF STEP]
using n
[PROOF STATE]
proof (prove)
using this:
1 < n

goal (1 subgoal):
 1. (\<Sum>x\<in>{k. real k \<le> x \<and> coprime k n}. complex_of_real (mangoldt x / real x)) = (\<Sum>k\<in>{i. 0 < i \<and> real i \<le> x}. \<chi>\<^sub>0 k * mangoldt k / of_nat k)
[PROOF STEP]
by (intro sum.mono_neutral_cong_left) (auto simp: principal_dchar_def intro!: Nat.gr0I)
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / real k) = sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>k | real k \<le> x \<and> coprime k n. mangoldt k / real k) = sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1
[PROOF STEP]
have "complex_of_real (\<Sum>p | prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}. ln p / p) =
                 (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (ln p / p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (\<Sum>x\<in>{p. prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}}. ln (real x) / real x) = (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))
[PROOF STEP]
unfolding of_real_sum
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x\<in>{p. prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}}. complex_of_real (ln (real x) / real x)) = (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))
[PROOF STEP]
by (intro sum.mono_neutral_cong_left)
         (auto simp: principal_dchar_def le_nat_iff le_floor_iff prime_gt_0_nat
               intro!: finite_subset[of _ "{..nat \<lfloor>x\<rfloor>}"])
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>x\<in>{p. prime p \<and> p \<in> {k. real k \<le> x \<and> coprime k n}}. ln (real x) / real x) = (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))

goal (1 subgoal):
 1. \<And>x. 0 < x \<Longrightarrow> cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3

goal (1 subgoal):
 1. cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cmod (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<le> 3 * cmod 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p))) \<in> O(\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - Ln (complex_of_real x)) \<in> O(\<lambda>_. 1)
[PROOF STEP]
from sum_in_bigo(1)[OF principal_dchar_sum_bound this]
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p)) - Ln (complex_of_real x) + (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p)))) \<in> O(\<lambda>_. 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p)) - Ln (complex_of_real x) + (sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - (\<Sum>p | prime p \<and> real p \<le> x. \<chi>\<^sub>0 p * (Ln (of_nat p) / of_nat p)))) \<in> O(\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - Ln (complex_of_real x)) \<in> O(\<lambda>_. 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. sum_upto (\<lambda>k. \<chi>\<^sub>0 k * mangoldt k / of_nat k) x - Ln (complex_of_real x)) \<in> O(\<lambda>_. 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma less_Suc_unat_less_bound:
  "n < Suc (unat (x :: 'a :: len word)) \<Longrightarrow> n < 2 ^ LENGTH('a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < Suc (unat x) \<Longrightarrow> n < 2 ^ LENGTH('a)
[PROOF STEP]
by (auto elim!: order_less_le_trans intro: Suc_leI)


[STATEMENT]
lemma vangle_scales:
  assumes "0 < c"
  shows "vangle (c *\<^sub>R v\<^sub>1) v\<^sub>2 = vangle v\<^sub>1 v\<^sub>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vangle (c *\<^sub>R v\<^sub>1) v\<^sub>2 = vangle v\<^sub>1 v\<^sub>2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < c

goal (1 subgoal):
 1. vangle (c *\<^sub>R v\<^sub>1) v\<^sub>2 = vangle v\<^sub>1 v\<^sub>2
[PROOF STEP]
unfolding vangle_def
[PROOF STATE]
proof (prove)
using this:
0 < c

goal (1 subgoal):
 1. (if c *\<^sub>R v\<^sub>1 = (0::'a) \<or> v\<^sub>2 = (0::'a) then pi / 2 else arccos (c *\<^sub>R v\<^sub>1 \<bullet> v\<^sub>2 / (norm (c *\<^sub>R v\<^sub>1) * norm v\<^sub>2))) = (if v\<^sub>1 = (0::'a) \<or> v\<^sub>2 = (0::'a) then pi / 2 else arccos (v\<^sub>1 \<bullet> v\<^sub>2 / (norm v\<^sub>1 * norm v\<^sub>2)))
[PROOF STEP]
by auto


[STATEMENT]
lemma phi': "phi n z = (\<Sum>(x,y)\<in>(Inv (fst z) (s_A n)). (if (fst (snd z))!(index init y) then 2 else 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)
[PROOF STEP]
have "phi n z = phi n (fst z, (fst(snd z),snd(snd z)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> n z = \<phi> n (fst z, fst (snd z), snd (snd z))
[PROOF STEP]
by (metis prod.collapse)
[PROOF STATE]
proof (state)
this:
\<phi> n z = \<phi> n (fst z, fst (snd z), snd (snd z))

goal (1 subgoal):
 1. \<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<phi> n z = \<phi> n (fst z, fst (snd z), snd (snd z))

goal (1 subgoal):
 1. \<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)
[PROOF STEP]
have "\<dots> = (\<Sum>(x,y)\<in>(Inv (fst z) (s_A n)). (if (fst (snd z))!(index init y) then 2 else 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> n (fst z, fst (snd z), snd (snd z)) = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)
[PROOF STEP]
by(simp del: prod.collapse)
[PROOF STATE]
proof (state)
this:
\<phi> n (fst z, fst (snd z), snd (snd z)) = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)

goal (1 subgoal):
 1. \<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)

goal (1 subgoal):
 1. \<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<phi> n z = (\<Sum>(x, y)\<in>Inv (fst z) (s_A n). if fst (snd z) ! index init y then 2 else 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma assoc'_naturality:
    assumes "arr f0" and "arr f1" and "arr f2"
    shows "((f0 \<otimes> f1) \<otimes> f2) \<cdot> \<a>\<^sup>-\<^sup>1[dom f0, dom f1, dom f2] =
           \<a>\<^sup>-\<^sup>1[cod f0, cod f1, cod f2] \<cdot> (f0 \<otimes> f1 \<otimes> f2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((f0 \<otimes> f1) \<otimes> f2) \<cdot> \<a>\<^sup>-\<^sup>1[local.dom f0, local.dom f1, local.dom f2] = \<a>\<^sup>-\<^sup>1[cod f0, cod f1, cod f2] \<cdot> (f0 \<otimes> f1 \<otimes> f2)
[PROOF STEP]
using assms \<alpha>'.naturality
[PROOF STATE]
proof (prove)
using this:
arr f0
arr f1
arr f2
CCC.arr ?f \<Longrightarrow> \<alpha>' (CCC.cod ?f) \<cdot> T.ToCT ?f = T.ToTC ?f \<cdot> \<alpha>' (CCC.dom ?f)

goal (1 subgoal):
 1. ((f0 \<otimes> f1) \<otimes> f2) \<cdot> \<a>\<^sup>-\<^sup>1[local.dom f0, local.dom f1, local.dom f2] = \<a>\<^sup>-\<^sup>1[cod f0, cod f1, cod f2] \<cdot> (f0 \<otimes> f1 \<otimes> f2)
[PROOF STEP]
by auto


[STATEMENT]
lemma is_solution_in_cone:
  assumes "t \<in> T"
  assumes sol: "(x solves_ode f) (closed_segment t0 t) Y" and iv: "x t0 = x0"
  shows "x t \<in> cball x0 (B * abs (t - t0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x t \<in> cball x0 (B * \<bar>t - t0\<bar>)
[PROOF STEP]
using solves_odeD[OF sol] \<open>t \<in> T\<close>
[PROOF STATE]
proof (prove)
using this:
(x has_vderiv_on (\<lambda>t. f t (x t))) {t0--t}
?t \<in> {t0--t} \<Longrightarrow> x ?t \<in> Y
t \<in> T

goal (1 subgoal):
 1. x t \<in> cball x0 (B * \<bar>t - t0\<bar>)
[PROOF STEP]
by (intro solves_in_cone)
    (auto intro!: assms vderiv_on_continuous_on segment_open_subset_closed
      intro: has_vderiv_on_subset simp: initial_time_in)


[STATEMENT]
lemma Exp_Exp_Gen_inj2:
  "Exp (Exp Gen X) X' = Exp Z Y' \<Longrightarrow>
  (Y' = X \<and> Z = Exp Gen X') \<or> (Y' = X' \<and> Z = Exp Gen X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Exp (Exp Gen X) X' = Exp Z Y' \<Longrightarrow> Y' = X \<and> Z = Exp Gen X' \<or> Y' = X' \<and> Z = Exp Gen X
[PROOF STEP]
apply (transfer, auto)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>X X' Z Y'. \<lbrakk>eq (cExp (cExp cGen X) X') (cExp Z Y'); \<not> eq Y' X'\<rbrakk> \<Longrightarrow> eq Y' X
 2. \<And>X X' Z Y'. \<lbrakk>eq (cExp (cExp cGen X) X') (cExp Z Y'); \<not> eq Y' X'\<rbrakk> \<Longrightarrow> eq Z (cExp cGen X')
 3. \<And>X X' Z Y'. \<lbrakk>eq (cExp (cExp cGen X) X') (cExp Z Y'); \<not> eq Z (cExp cGen X)\<rbrakk> \<Longrightarrow> eq Y' X
 4. \<And>X X' Z Y'. \<lbrakk>eq (cExp (cExp cGen X) X') (cExp Z Y'); \<not> eq Z (cExp cGen X)\<rbrakk> \<Longrightarrow> eq Z (cExp cGen X')
[PROOF STEP]
apply (drule eq_expexpgen, auto)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma PR_TAG_intro_prio1:
  fixes f :: "real \<Rightarrow> real"
  shows
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow> PR_TAG (\<lambda>x. f x = 0) = (\<lambda>x. poly p x = 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow> PR_TAG (\<lambda>x. f x \<noteq> 0) = (\<lambda>x. poly p x \<noteq> 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow> PR_TAG (\<lambda>x. 0 = f x) = (\<lambda>x. poly p x = 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow> PR_TAG (\<lambda>x. 0 \<noteq> f x) = (\<lambda>x. poly p x \<noteq> 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow> PR_TAG (\<lambda>x. f x \<ge> 0) = (\<lambda>x. poly p x \<ge> 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow> PR_TAG (\<lambda>x. f x > 0) = (\<lambda>x. poly p x > 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow> PR_TAG (\<lambda>x. f x \<le> 0) = (\<lambda>x. poly (-p) x \<ge> 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow> PR_TAG (\<lambda>x. f x < 0) = (\<lambda>x. poly (-p) x > 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow>
       PR_TAG (\<lambda>x. 0 \<le> f x) = (\<lambda>x. poly (-p) x \<le> 0)"
  "PR_TAG f = (\<lambda>x. poly p x) \<Longrightarrow>
       PR_TAG (\<lambda>x. 0 < f x) = (\<lambda>x. poly (-p) x < 0)"
  "PR_TAG f = (\<lambda>x. poly p x)
       \<Longrightarrow> PR_TAG (\<lambda>x. a * f x) = (\<lambda>x. poly (smult a p) x)"
  "PR_TAG f = (\<lambda>x. poly p x)
       \<Longrightarrow> PR_TAG (\<lambda>x. f x * a) = (\<lambda>x. poly (smult a p) x)"
  "PR_TAG f = (\<lambda>x. poly p x)
       \<Longrightarrow> PR_TAG (\<lambda>x. f x / a) = (\<lambda>x. poly (smult (inverse a) p) x)"
  "PR_TAG (\<lambda>x. x^n :: real) = (\<lambda>x. poly (monom 1 n) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (((PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x = 0) = (\<lambda>x. poly p x = 0)) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x \<noteq> 0) = (\<lambda>x. poly p x \<noteq> 0)) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. 0 = f x) = (\<lambda>x. poly p x = 0))) &&& ((PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. 0 \<noteq> f x) = (\<lambda>x. poly p x \<noteq> 0)) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. 0 \<le> f x) = (\<lambda>x. 0 \<le> poly p x))) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. 0 < f x) = (\<lambda>x. 0 < poly p x)) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x \<le> 0) = (\<lambda>x. 0 \<le> poly (- p) x))) &&& ((PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x < 0) = (\<lambda>x. 0 < poly (- p) x)) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. 0 \<le> f x) = (\<lambda>x. poly (- p) x \<le> 0)) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. 0 < f x) = (\<lambda>x. poly (- p) x < 0))) &&& ((PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. a * f x) = poly (smult a p)) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x * a) = poly (smult a p))) &&& (PR_TAG f = poly p \<Longrightarrow> PR_TAG (\<lambda>x. f x / a) = poly (smult (inverse a) p)) &&& PR_TAG (\<lambda>x. x ^ n) = poly (monom 1 n)
[PROOF STEP]
by (simp_all add: PR_TAG_def field_simps poly_monom)


[STATEMENT]
lemma bet2_le2__le:
  assumes "Bet a P b" and
    "Bet A Q B" and
    "P a Le Q A" and
    "P b Le Q B"
  shows "a b Le A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a b Le A B
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> a b Le A B
 2. \<not> ?P \<Longrightarrow> a b Le A B
[PROOF STEP]
assume "A = Q"
[PROOF STATE]
proof (state)
this:
A = Q

goal (2 subgoals):
 1. ?P \<Longrightarrow> a b Le A B
 2. \<not> ?P \<Longrightarrow> a b Le A B
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
A = Q

goal (1 subgoal):
 1. a b Le A B
[PROOF STEP]
using assms(3) assms(4) le_diff
[PROOF STATE]
proof (prove)
using this:
A = Q
P a Le Q A
P b Le Q B
\<lbrakk>?A \<noteq> ?B; ?A ?B Le ?C ?D\<rbrakk> \<Longrightarrow> ?C \<noteq> ?D

goal (1 subgoal):
 1. a b Le A B
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
a b Le A B

goal (1 subgoal):
 1. A \<noteq> Q \<Longrightarrow> a b Le A B
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A \<noteq> Q \<Longrightarrow> a b Le A B
[PROOF STEP]
assume "\<not> A = Q"
[PROOF STATE]
proof (state)
this:
A \<noteq> Q

goal (1 subgoal):
 1. A \<noteq> Q \<Longrightarrow> a b Le A B
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
A \<noteq> Q

goal (1 subgoal):
 1. a b Le A B
[PROOF STEP]
using assms(1) assms(2) assms(3) assms(4) bet2_le2__le_R1 bet2_le2__le_R2
[PROOF STATE]
proof (prove)
using this:
A \<noteq> Q
Bet a P b
Bet A Q B
P a Le Q A
P b Le Q B
\<lbrakk>Bet ?a ?P ?b; Bet ?A ?Q ?B; ?P ?a Le ?Q ?A; ?P ?b Le ?Q ?B; ?B = ?Q\<rbrakk> \<Longrightarrow> ?a ?b Le ?A ?B
\<lbrakk>Bet ?a ?Po ?b; Bet ?A ?PO ?B; ?Po ?a Le ?PO ?A; ?Po ?b Le ?PO ?B; ?A \<noteq> ?PO; ?B \<noteq> ?PO\<rbrakk> \<Longrightarrow> ?a ?b Le ?A ?B

goal (1 subgoal):
 1. a b Le A B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a b Le A B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma min_product_set_subseteq:
  "finite X \<Longrightarrow> x \<in> \<Otimes>\<^sub>m X \<Longrightarrow> A \<in> X \<Longrightarrow> \<exists>a \<in> A. a |\<subseteq>| x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite X; x \<in> \<Otimes>\<^sub>m X; A \<in> X\<rbrakk> \<Longrightarrow> \<exists>a\<in>A. a |\<subseteq>| x
[PROOF STEP]
by (induction X rule: finite_induct) (blast, metis finite_insert insert_absorb min_product_set_insert min_product_subseteq)


[STATEMENT]
theorem budan_fourier_gt:
  assumes "p\<noteq>0"
  shows "changes_gt_der a p \<ge> proots_count p {x. a< x} \<and>
          even (changes_gt_der a p - proots_count p {x. a< x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
define ps where "ps=pders p"
[PROOF STATE]
proof (state)
this:
ps = pders p

goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
obtain ub where ub_root:"\<forall>p\<in>set ps. \<forall>x. poly p x = 0 \<longrightarrow> x < ub"
    and ub_sgn:"\<forall>x\<ge>ub. \<forall>p\<in>set ps. sgn (poly p x) = sgn_pos_inf p"
    and "a < ub"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>ub. \<lbrakk>\<forall>p\<in>set ps. \<forall>x. poly p x = 0 \<longrightarrow> x < ub; \<forall>x\<ge>ub. \<forall>p\<in>set ps. sgn (poly p x) = sgn_pos_inf p; a < ub\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using root_list_ub[of ps a] set_pders_nzero[OF \<open>p\<noteq>0\<close>,folded ps_def]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<notin> set ps; \<And>ub. \<lbrakk>\<forall>p\<in>set ps. \<forall>x. poly p x = 0 \<longrightarrow> x < ub; \<forall>x\<ge>ub. \<forall>p\<in>set ps. sgn (poly p x) = sgn_pos_inf p; a < ub\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
?q \<in> set ps \<Longrightarrow> ?q \<noteq> 0

goal (1 subgoal):
 1. (\<And>ub. \<lbrakk>\<forall>p\<in>set ps. \<forall>x. poly p x = 0 \<longrightarrow> x < ub; \<forall>x\<ge>ub. \<forall>p\<in>set ps. sgn (poly p x) = sgn_pos_inf p; a < ub\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>set ps. \<forall>x. poly p x = 0 \<longrightarrow> x < ub
\<forall>x\<ge>ub. \<forall>p\<in>set ps. sgn (poly p x) = sgn_pos_inf p
a < ub

goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
have "proots_count p {x. a< x} = proots_count p {x. a< x \<and> x \<le> ub}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}
[PROOF STEP]
have "p\<in>set ps"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<in> set ps
[PROOF STEP]
unfolding ps_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<in> set (pders p)
[PROOF STEP]
by (simp add: assms pders.simps)
[PROOF STATE]
proof (state)
this:
p \<in> set ps

goal (1 subgoal):
 1. proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p \<in> set ps
[PROOF STEP]
have "proots_within p {x. a< x} = proots_within p {x. a< x \<and> x\<le>ub}"
[PROOF STATE]
proof (prove)
using this:
p \<in> set ps

goal (1 subgoal):
 1. proots_within p {x. a < x} = proots_within p {x. a < x \<and> x \<le> ub}
[PROOF STEP]
using ub_root
[PROOF STATE]
proof (prove)
using this:
p \<in> set ps
\<forall>p\<in>set ps. \<forall>x. poly p x = 0 \<longrightarrow> x < ub

goal (1 subgoal):
 1. proots_within p {x. a < x} = proots_within p {x. a < x \<and> x \<le> ub}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
proots_within p {x. a < x} = proots_within p {x. a < x \<and> x \<le> ub}

goal (1 subgoal):
 1. proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
proots_within p {x. a < x} = proots_within p {x. a < x \<and> x \<le> ub}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
proots_within p {x. a < x} = proots_within p {x. a < x \<and> x \<le> ub}

goal (1 subgoal):
 1. proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}
[PROOF STEP]
unfolding proots_count_def
[PROOF STATE]
proof (prove)
using this:
proots_within p {x. a < x} = proots_within p {x. a < x \<and> x \<le> ub}

goal (1 subgoal):
 1. (\<Sum>r\<in>proots_within p (Collect ((<) a)). order r p) = (\<Sum>r\<in>proots_within p {x. a < x \<and> x \<le> ub}. order r p)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}

goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}

goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
have "changes_gt_der a p = changes_itv_der a ub p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. changes_gt_der a p = changes_itv_der a ub p
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. changes_gt_der a p = changes_itv_der a ub p
[PROOF STEP]
have "map (sgn \<circ> (\<lambda>p. poly p ub)) ps = map sgn_pos_inf ps"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map (sgn \<circ> (\<lambda>p. poly p ub)) ps = map sgn_pos_inf ps
[PROOF STEP]
using ub_sgn[THEN spec,of ub,simplified]
[PROOF STATE]
proof (prove)
using this:
\<forall>p\<in>set ps. sgn (poly p ub) = sgn_pos_inf p

goal (1 subgoal):
 1. map (sgn \<circ> (\<lambda>p. poly p ub)) ps = map sgn_pos_inf ps
[PROOF STEP]
by (metis (mono_tags, lifting) comp_def list.map_cong0)
[PROOF STATE]
proof (state)
this:
map (sgn \<circ> (\<lambda>p. poly p ub)) ps = map sgn_pos_inf ps

goal (1 subgoal):
 1. changes_gt_der a p = changes_itv_der a ub p
[PROOF STEP]
hence "changes_poly_at ps ub=changes_poly_pos_inf ps"
[PROOF STATE]
proof (prove)
using this:
map (sgn \<circ> (\<lambda>p. poly p ub)) ps = map sgn_pos_inf ps

goal (1 subgoal):
 1. changes_poly_at ps ub = changes_poly_pos_inf ps
[PROOF STEP]
unfolding changes_poly_pos_inf_def changes_poly_at_def
[PROOF STATE]
proof (prove)
using this:
map (sgn \<circ> (\<lambda>p. poly p ub)) ps = map sgn_pos_inf ps

goal (1 subgoal):
 1. changes (map (\<lambda>p. poly p ub) ps) = changes (map sgn_pos_inf ps)
[PROOF STEP]
by (subst changes_map_sgn_eq,metis map_map)
[PROOF STATE]
proof (state)
this:
changes_poly_at ps ub = changes_poly_pos_inf ps

goal (1 subgoal):
 1. changes_gt_der a p = changes_itv_der a ub p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
changes_poly_at ps ub = changes_poly_pos_inf ps
[PROOF STEP]
have "changes_poly_at ps ub=0"
[PROOF STATE]
proof (prove)
using this:
changes_poly_at ps ub = changes_poly_pos_inf ps

goal (1 subgoal):
 1. changes_poly_at ps ub = 0
[PROOF STEP]
unfolding ps_def
[PROOF STATE]
proof (prove)
using this:
changes_poly_at (pders p) ub = changes_poly_pos_inf (pders p)

goal (1 subgoal):
 1. changes_poly_at (pders p) ub = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
changes_poly_at ps ub = 0

goal (1 subgoal):
 1. changes_gt_der a p = changes_itv_der a ub p
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
changes_poly_at ps ub = 0

goal (1 subgoal):
 1. changes_gt_der a p = changes_itv_der a ub p
[PROOF STEP]
unfolding changes_gt_der_def changes_itv_der_def ps_def
[PROOF STATE]
proof (prove)
using this:
changes_poly_at (pders p) ub = 0

goal (1 subgoal):
 1. changes_poly_at (pders p) a = (let ps = pders p in changes_poly_at ps a - changes_poly_at ps ub)
[PROOF STEP]
by (simp add:Let_def)
[PROOF STATE]
proof (state)
this:
changes_gt_der a p = changes_itv_der a ub p

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
changes_gt_der a p = changes_itv_der a ub p

goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
changes_gt_der a p = changes_itv_der a ub p

goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
have "proots_count p {x. a < x \<and> x \<le> ub} \<le> changes_itv_der a ub p \<and>
      even (changes_itv_der a ub p - proots_count p {x. a < x \<and> x \<le> ub})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (proots_count p {x. a < x \<and> x \<le> ub}) \<le> changes_itv_der a ub p \<and> even (changes_itv_der a ub p - int (proots_count p {x. a < x \<and> x \<le> ub}))
[PROOF STEP]
using budan_fourier_interval[OF \<open>a<ub\<close> \<open>p\<noteq>0\<close>]
[PROOF STATE]
proof (prove)
using this:
int (proots_count p {x. a < x \<and> x \<le> ub}) \<le> changes_itv_der a ub p \<and> even (changes_itv_der a ub p - int (proots_count p {x. a < x \<and> x \<le> ub}))

goal (1 subgoal):
 1. int (proots_count p {x. a < x \<and> x \<le> ub}) \<le> changes_itv_der a ub p \<and> even (changes_itv_der a ub p - int (proots_count p {x. a < x \<and> x \<le> ub}))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
int (proots_count p {x. a < x \<and> x \<le> ub}) \<le> changes_itv_der a ub p \<and> even (changes_itv_der a ub p - int (proots_count p {x. a < x \<and> x \<le> ub}))

goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}
changes_gt_der a p = changes_itv_der a ub p
int (proots_count p {x. a < x \<and> x \<le> ub}) \<le> changes_itv_der a ub p \<and> even (changes_itv_der a ub p - int (proots_count p {x. a < x \<and> x \<le> ub}))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
proots_count p {x. a < x} = proots_count p {x. a < x \<and> x \<le> ub}
changes_gt_der a p = changes_itv_der a ub p
int (proots_count p {x. a < x \<and> x \<le> ub}) \<le> changes_itv_der a ub p \<and> even (changes_itv_der a ub p - int (proots_count p {x. a < x \<and> x \<le> ub}))

goal (1 subgoal):
 1. int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
int (proots_count p {x. a < x}) \<le> changes_gt_der a p \<and> even (changes_gt_der a p - int (proots_count p {x. a < x}))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma l11_62_existence_bis:
  assumes "\<not> Coplanar A B C P"
  shows "\<exists> X. X OrthAt A B C X P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>X. X OrthAt A B C X P
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>X. X OrthAt A B C X P
[PROOF STEP]
obtain X where P1: "Coplanar A B C X \<and> (\<forall> E. Coplanar A B C E \<longrightarrow> Per E X P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X. Coplanar A B C X \<and> (\<forall>E. Coplanar A B C E \<longrightarrow> Per E X P) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using l11_62_existence
[PROOF STATE]
proof (prove)
using this:
\<exists>D. Coplanar ?A ?B ?C D \<and> (\<forall>E. Coplanar ?A ?B ?C E \<longrightarrow> Per E D ?P)

goal (1 subgoal):
 1. (\<And>X. Coplanar A B C X \<and> (\<forall>E. Coplanar A B C E \<longrightarrow> Per E X P) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar A B C X \<and> (\<forall>E. Coplanar A B C E \<longrightarrow> Per E X P)

goal (1 subgoal):
 1. \<exists>X. X OrthAt A B C X P
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Coplanar A B C X \<and> (\<forall>E. Coplanar A B C E \<longrightarrow> Per E X P)
[PROOF STEP]
have P2: "X \<noteq> P"
[PROOF STATE]
proof (prove)
using this:
Coplanar A B C X \<and> (\<forall>E. Coplanar A B C E \<longrightarrow> Per E X P)

goal (1 subgoal):
 1. X \<noteq> P
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Coplanar A B C X \<and> (\<forall>E. Coplanar A B C E \<longrightarrow> Per E X P)
\<not> Coplanar A B C P

goal (1 subgoal):
 1. X \<noteq> P
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
X \<noteq> P

goal (1 subgoal):
 1. \<exists>X. X OrthAt A B C X P
[PROOF STEP]
have P3: "\<not> Col A B C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col A B C
[PROOF STEP]
using assms ncop__ncol
[PROOF STATE]
proof (prove)
using this:
\<not> Coplanar A B C P
\<not> Coplanar ?A ?B ?C ?D \<Longrightarrow> \<not> Col ?A ?B ?C

goal (1 subgoal):
 1. \<not> Col A B C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> Col A B C

goal (1 subgoal):
 1. \<exists>X. X OrthAt A B C X P
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> Col A B C

goal (1 subgoal):
 1. \<exists>X. X OrthAt A B C X P
[PROOF STEP]
using P1 P2 P3 orth_at_chara
[PROOF STATE]
proof (prove)
using this:
\<not> Col A B C
Coplanar A B C X \<and> (\<forall>E. Coplanar A B C E \<longrightarrow> Per E X P)
X \<noteq> P
\<not> Col A B C
(?X OrthAt ?A ?B ?C ?X ?P) = (\<not> Col ?A ?B ?C \<and> ?X \<noteq> ?P \<and> Coplanar ?A ?B ?C ?X \<and> (\<forall>D. Coplanar ?A ?B ?C D \<longrightarrow> Per D ?X ?P))

goal (1 subgoal):
 1. \<exists>X. X OrthAt A B C X P
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>X. X OrthAt A B C X P

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma incseqD: "incseq f \<Longrightarrow> i \<le> j \<Longrightarrow> f i \<le> f j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>incseq f; i \<le> j\<rbrakk> \<Longrightarrow> f i \<le> f j
[PROOF STEP]
by (auto simp: incseq_def)


[STATEMENT]
lemma vid_onE[elim!]:
  assumes "x \<in>\<^sub>\<circ> vid_on A" and "\<exists>a\<in>\<^sub>\<circ>A. x = \<langle>a, a\<rangle> \<Longrightarrow> P"
  shows P
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in>\<^sub>\<circ> vid_on A
\<exists>a\<in>elts A. x = \<langle>a, a\<rangle> \<Longrightarrow> P

goal (1 subgoal):
 1. P
[PROOF STEP]
unfolding vid_on_def
[PROOF STATE]
proof (prove)
using this:
x \<in>\<^sub>\<circ> set {\<langle>a, a\<rangle> |a. a \<in>\<^sub>\<circ> A}
\<exists>a\<in>elts A. x = \<langle>a, a\<rangle> \<Longrightarrow> P

goal (1 subgoal):
 1. P
[PROOF STEP]
by auto


[STATEMENT]
lemma ex_in_inf:
  fixes   A::"'x set"
  assumes at: "at TYPE('x)"
  and     fs: "finite A"
  obtains c::"'x" where "c\<notin>A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>c. c \<notin> A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>c. c \<notin> A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from  fs at4[OF at]
[PROOF STATE]
proof (chain)
picking this:
finite A
infinite UNIV
[PROOF STEP]
have "infinite ((UNIV::'x set) - A)"
[PROOF STATE]
proof (prove)
using this:
finite A
infinite UNIV

goal (1 subgoal):
 1. infinite (UNIV - A)
[PROOF STEP]
by (simp add: Diff_infinite_finite)
[PROOF STATE]
proof (state)
this:
infinite (UNIV - A)

goal (1 subgoal):
 1. (\<And>c. c \<notin> A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
hence "((UNIV::'x set) - A) \<noteq> ({}::'x set)"
[PROOF STATE]
proof (prove)
using this:
infinite (UNIV - A)

goal (1 subgoal):
 1. UNIV - A \<noteq> {}
[PROOF STEP]
by (force simp only:)
[PROOF STATE]
proof (state)
this:
UNIV - A \<noteq> {}

goal (1 subgoal):
 1. (\<And>c. c \<notin> A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
UNIV - A \<noteq> {}
[PROOF STEP]
obtain c::"'x" where "c\<in>((UNIV::'x set) - A)"
[PROOF STATE]
proof (prove)
using this:
UNIV - A \<noteq> {}

goal (1 subgoal):
 1. (\<And>c. c \<in> UNIV - A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
c \<in> UNIV - A

goal (1 subgoal):
 1. (\<And>c. c \<notin> A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
c \<in> UNIV - A
[PROOF STEP]
have "c\<notin>A"
[PROOF STATE]
proof (prove)
using this:
c \<in> UNIV - A

goal (1 subgoal):
 1. c \<notin> A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c \<notin> A

goal (1 subgoal):
 1. (\<And>c. c \<notin> A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
c \<notin> A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
c \<notin> A

goal (1 subgoal):
 1. thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma  product_target_split:
  assumes "target (q1,q2) p = (q1',q2')"
  shows "target q1 (left_path p) = q1'"
    and "target q2 (right_path p) = q2'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. target q1 (left_path p) = q1' &&& target q2 (right_path p) = q2'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
target (q1, q2) p = (q1', q2')

goal (1 subgoal):
 1. target q1 (left_path p) = q1' &&& target q2 (right_path p) = q2'
[PROOF STEP]
by (induction p arbitrary: q1 q2; force)+


[STATEMENT]
lemma lipschitz_on_nonneg:
  "0 \<le> L" if "L-lipschitz_on X f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> L
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
L-lipschitz_on X f

goal (1 subgoal):
 1. 0 \<le> L
[PROOF STEP]
by (auto simp: lipschitz_on_def)


[STATEMENT]
theorem c_drop_is_pr: "c_drop \<in> PrimRec2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c_drop \<in> PrimRec2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c_drop \<in> PrimRec2
[PROOF STEP]
have "(\<lambda> x. x) \<in> PrimRec1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x) \<in> PrimRec1
[PROOF STEP]
by (rule pr_id1_1)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. x) \<in> PrimRec1

goal (1 subgoal):
 1. c_drop \<in> PrimRec2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>x. x) \<in> PrimRec1

goal (1 subgoal):
 1. c_drop \<in> PrimRec2
[PROOF STEP]
from c_tl_is_pr
[PROOF STATE]
proof (chain)
picking this:
c_tl \<in> PrimRec1
[PROOF STEP]
have "(\<lambda> x y z. c_tl y) \<in> PrimRec3"
[PROOF STATE]
proof (prove)
using this:
c_tl \<in> PrimRec1

goal (1 subgoal):
 1. (\<lambda>x y z. c_tl y) \<in> PrimRec3
[PROOF STEP]
by prec
[PROOF STATE]
proof (state)
this:
(\<lambda>x y z. c_tl y) \<in> PrimRec3

goal (1 subgoal):
 1. c_drop \<in> PrimRec2
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. x) \<in> PrimRec1
(\<lambda>x y z. c_tl y) \<in> PrimRec3
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. x) \<in> PrimRec1
(\<lambda>x y z. c_tl y) \<in> PrimRec3

goal (1 subgoal):
 1. c_drop \<in> PrimRec2
[PROOF STEP]
by (simp add: c_drop_def pr_rec)
[PROOF STATE]
proof (state)
this:
c_drop \<in> PrimRec2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma flists_nonempty: "\<exists> xs. xs \<in> flists A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>xs. xs \<in> flists A
[PROOF STEP]
apply (simp add: flists_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>xs. distinct xs \<and> finset xs = A
[PROOF STEP]
apply (metis Abs_fset_cases Abs_fset_inverse finite_distinct_list finite_fset finset.rep_eq)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma restrict_restrict[simp]: "restrict (restrict f A) B = restrict f (A \<inter> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. restrict (restrict f A) B = restrict f (A \<inter> B)
[PROOF STEP]
unfolding restrict_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> B then if x \<in> A then f x else undefined else undefined) = (\<lambda>x. if x \<in> A \<inter> B then f x else undefined)
[PROOF STEP]
by (simp add: fun_eq_iff)


[STATEMENT]
lemma inf_one_vector:
  "one_vector x \<Longrightarrow> one_vector y \<Longrightarrow> one_vector (x \<sqinter> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>one_vector x; one_vector y\<rbrakk> \<Longrightarrow> one_vector (x \<sqinter> y)
[PROOF STEP]
by (meson order.trans inf.boundedI mult_right_sub_dist_inf_left mult_right_sub_dist_inf_right one_vector_def)


[STATEMENT]
lemma funpow_diff:
  assumes "inj p" and "i \<le> j" "(p ^^ i) a = (p ^^ j) a" shows "(p ^^ (j - i)) a = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p ^^ (j - i)) a = a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (p ^^ (j - i)) a = a
[PROOF STEP]
have "(p ^^ i) ((p ^^ (j - i)) a) = (p ^^ i) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p ^^ i) ((p ^^ (j - i)) a) = (p ^^ i) a
[PROOF STEP]
using assms(2-3)
[PROOF STATE]
proof (prove)
using this:
i \<le> j
(p ^^ i) a = (p ^^ j) a

goal (1 subgoal):
 1. (p ^^ i) ((p ^^ (j - i)) a) = (p ^^ i) a
[PROOF STEP]
by (metis (no_types) add_diff_inverse_nat funpow_add not_le o_def)
[PROOF STATE]
proof (state)
this:
(p ^^ i) ((p ^^ (j - i)) a) = (p ^^ i) a

goal (1 subgoal):
 1. (p ^^ (j - i)) a = a
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(p ^^ i) ((p ^^ (j - i)) a) = (p ^^ i) a

goal (1 subgoal):
 1. (p ^^ (j - i)) a = a
[PROOF STEP]
unfolding inj_eq[OF inj_fn[OF assms(1)], of i]
[PROOF STATE]
proof (prove)
using this:
(p ^^ (j - i)) a = a

goal (1 subgoal):
 1. (p ^^ (j - i)) a = a
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(p ^^ (j - i)) a = a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Sup_atom: "x \<noteq> \<bottom> \<Longrightarrow> (\<forall>Y. (\<exists>y \<in> Y. x \<le> y) = (x \<le> \<Squnion>Y)) \<Longrightarrow> atom x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<noteq> \<bottom>; \<forall>Y. (\<exists>y\<in>Y. x \<le> y) = (x \<le> \<Squnion> Y)\<rbrakk> \<Longrightarrow> atom x
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>x \<noteq> \<bottom>; \<forall>Y. (\<exists>y\<in>Y. x \<le> y) = (x \<le> \<Squnion> Y)\<rbrakk> \<Longrightarrow> atom x
[PROOF STEP]
assume h1: "x \<noteq> \<bottom>"
  and h2: "\<forall>Y. (\<exists>y \<in> Y. x \<le> y) = (x \<le> \<Squnion>Y)"
[PROOF STATE]
proof (state)
this:
x \<noteq> \<bottom>
\<forall>Y. (\<exists>y\<in>Y. x \<le> y) = (x \<le> \<Squnion> Y)

goal (1 subgoal):
 1. \<lbrakk>x \<noteq> \<bottom>; \<forall>Y. (\<exists>y\<in>Y. x \<le> y) = (x \<le> \<Squnion> Y)\<rbrakk> \<Longrightarrow> atom x
[PROOF STEP]
hence "\<forall>y z. (x \<le> y \<or> x \<le> z) = (x \<le> y \<squnion> z)"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> \<bottom>
\<forall>Y. (\<exists>y\<in>Y. x \<le> y) = (x \<le> \<Squnion> Y)

goal (1 subgoal):
 1. \<forall>y z. (x \<le> y \<or> x \<le> z) = (x \<le> y \<squnion> z)
[PROOF STEP]
by (smt insert_iff sup_Sup sup_bot.right_neutral)
[PROOF STATE]
proof (state)
this:
\<forall>y z. (x \<le> y \<or> x \<le> z) = (x \<le> y \<squnion> z)

goal (1 subgoal):
 1. \<lbrakk>x \<noteq> \<bottom>; \<forall>Y. (\<exists>y\<in>Y. x \<le> y) = (x \<le> \<Squnion> Y)\<rbrakk> \<Longrightarrow> atom x
[PROOF STEP]
thus "atom x"
[PROOF STATE]
proof (prove)
using this:
\<forall>y z. (x \<le> y \<or> x \<le> z) = (x \<le> y \<squnion> z)

goal (1 subgoal):
 1. atom x
[PROOF STEP]
by (simp add: h1 sup_atom)
[PROOF STATE]
proof (state)
this:
atom x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Max_pos_neg_less_multiset:
  assumes max: "Max_mset C = Pos A" and neg: "Neg A \<in># D"
  shows "C < D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C < D
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. C < D
[PROOF STEP]
have "Max_mset C < Neg A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Max_mset C < Neg A
[PROOF STEP]
using max
[PROOF STATE]
proof (prove)
using this:
Max_mset C = Pos A

goal (1 subgoal):
 1. Max_mset C < Neg A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Max_mset C < Neg A

goal (1 subgoal):
 1. C < D
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Max_mset C < Neg A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Max_mset C < Neg A

goal (1 subgoal):
 1. C < D
[PROOF STEP]
using neg
[PROOF STATE]
proof (prove)
using this:
Max_mset C < Neg A
Neg A \<in># D

goal (1 subgoal):
 1. C < D
[PROOF STEP]
by (metis (no_types) Max_less_iff empty_iff ex_gt_imp_less_multiset finite_set_mset)
[PROOF STATE]
proof (state)
this:
C < D

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sublist_list_is_Nil_conv: "
  (sublist_list xs ys = []) = (ys = [])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sublist_list xs ys = []) = (ys = [])
[PROOF STEP]
apply (rule iffI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. sublist_list xs ys = [] \<Longrightarrow> ys = []
 2. ys = [] \<Longrightarrow> sublist_list xs ys = []
[PROOF STEP]
apply (rule ccontr)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>sublist_list xs ys = []; ys \<noteq> []\<rbrakk> \<Longrightarrow> False
 2. ys = [] \<Longrightarrow> sublist_list xs ys = []
[PROOF STEP]
apply (clarsimp simp: neq_Nil_conv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ys = [] \<Longrightarrow> sublist_list xs ys = []
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cltn2_transpose_transpose: "cltn2_transpose (cltn2_transpose A) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cltn2_transpose (cltn2_transpose A) = A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cltn2_transpose (cltn2_transpose A) = A
[PROOF STEP]
from cltn2_rep_invertible
[PROOF STATE]
proof (chain)
picking this:
invertible (cltn2_rep ?A)
[PROOF STEP]
have "invertible (cltn2_rep A)"
[PROOF STATE]
proof (prove)
using this:
invertible (cltn2_rep ?A)

goal (1 subgoal):
 1. invertible (cltn2_rep A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
invertible (cltn2_rep A)

goal (1 subgoal):
 1. cltn2_transpose (cltn2_transpose A) = A
[PROOF STEP]
with transpose_invertible
[PROOF STATE]
proof (chain)
picking this:
invertible ?A \<Longrightarrow> invertible (Finite_Cartesian_Product.transpose ?A)
invertible (cltn2_rep A)
[PROOF STEP]
have "invertible (transpose (cltn2_rep A))"
[PROOF STATE]
proof (prove)
using this:
invertible ?A \<Longrightarrow> invertible (Finite_Cartesian_Product.transpose ?A)
invertible (cltn2_rep A)

goal (1 subgoal):
 1. invertible (Finite_Cartesian_Product.transpose (cltn2_rep A))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
invertible (Finite_Cartesian_Product.transpose (cltn2_rep A))

goal (1 subgoal):
 1. cltn2_transpose (cltn2_transpose A) = A
[PROOF STEP]
with cltn2_transpose_abs [of "transpose (cltn2_rep A)"]
[PROOF STATE]
proof (chain)
picking this:
invertible (Finite_Cartesian_Product.transpose (cltn2_rep A)) \<Longrightarrow> cltn2_transpose (cltn2_abs (Finite_Cartesian_Product.transpose (cltn2_rep A))) = cltn2_abs (Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)))
invertible (Finite_Cartesian_Product.transpose (cltn2_rep A))
[PROOF STEP]
have
    "cltn2_transpose (cltn2_transpose A) = cltn2_abs (transpose (transpose (cltn2_rep A)))"
[PROOF STATE]
proof (prove)
using this:
invertible (Finite_Cartesian_Product.transpose (cltn2_rep A)) \<Longrightarrow> cltn2_transpose (cltn2_abs (Finite_Cartesian_Product.transpose (cltn2_rep A))) = cltn2_abs (Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)))
invertible (Finite_Cartesian_Product.transpose (cltn2_rep A))

goal (1 subgoal):
 1. cltn2_transpose (cltn2_transpose A) = cltn2_abs (Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)))
[PROOF STEP]
unfolding cltn2_transpose_def [of A]
[PROOF STATE]
proof (prove)
using this:
invertible (Finite_Cartesian_Product.transpose (cltn2_rep A)) \<Longrightarrow> cltn2_transpose (cltn2_abs (Finite_Cartesian_Product.transpose (cltn2_rep A))) = cltn2_abs (Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)))
invertible (Finite_Cartesian_Product.transpose (cltn2_rep A))

goal (1 subgoal):
 1. cltn2_transpose (cltn2_abs (Finite_Cartesian_Product.transpose (cltn2_rep A))) = cltn2_abs (Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cltn2_transpose (cltn2_transpose A) = cltn2_abs (Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)))

goal (1 subgoal):
 1. cltn2_transpose (cltn2_transpose A) = A
[PROOF STEP]
with cltn2_abs_rep and transpose_transpose [of "cltn2_rep A"]
[PROOF STATE]
proof (chain)
picking this:
cltn2_abs (cltn2_rep ?A) = ?A
Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)) = cltn2_rep A
cltn2_transpose (cltn2_transpose A) = cltn2_abs (Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)))
[PROOF STEP]
show "cltn2_transpose (cltn2_transpose A) = A"
[PROOF STATE]
proof (prove)
using this:
cltn2_abs (cltn2_rep ?A) = ?A
Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)) = cltn2_rep A
cltn2_transpose (cltn2_transpose A) = cltn2_abs (Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose (cltn2_rep A)))

goal (1 subgoal):
 1. cltn2_transpose (cltn2_transpose A) = A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cltn2_transpose (cltn2_transpose A) = A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma map_filter_Nil :
  "List.map_filter f1' xs = [] \<longleftrightarrow> (\<forall> x \<in> list.set xs . f1' x = None)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (List.map_filter f1' xs = []) = (\<forall>x\<in>set xs. f1' x = None)
[PROOF STEP]
unfolding map_filter_alt_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map the (filter (\<lambda>x. x \<noteq> None) (map f1' xs)) = []) = (\<forall>x\<in>set xs. f1' x = None)
[PROOF STEP]
by (induction xs; auto)


[STATEMENT]
lemma poly_inf_0_iff[simp]:
    "poly_inf p = 0 \<longleftrightarrow> p = 0" "poly_neg_inf p = 0 \<longleftrightarrow> p = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (poly_inf p = (0::'a)) = (p = 0) &&& (poly_neg_inf p = (0::'a)) = (p = 0)
[PROOF STEP]
by (auto simp: poly_inf_def poly_neg_inf_def sgn_zero_iff)


[STATEMENT]
lemma Arg_exp_diff_2pi: "\<exists>k. Im z - of_int k * (2 * pi) = Arg (exp z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k. Im z - real_of_int k * (2 * pi) = Arg (exp z)
[PROOF STEP]
using is_Arg_exp_diff_2pi [OF is_Arg_Arg]
[PROOF STATE]
proof (prove)
using this:
exp ?z \<noteq> 0 \<Longrightarrow> \<exists>k. Im ?z - real_of_int k * (2 * pi) = Arg (exp ?z)

goal (1 subgoal):
 1. \<exists>k. Im z - real_of_int k * (2 * pi) = Arg (exp z)
[PROOF STEP]
by auto


[STATEMENT]
lemma LCons_llist_of_stream [simp]: "LCons x (llist_of_stream xs) = llist_of_stream (x ## xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LCons x (llist_of_stream xs) = llist_of_stream (x ## xs)
[PROOF STEP]
by(rule sym)(simp add: llist_of_stream_def)


[STATEMENT]
lemma set_iterator_genord_sng_correct :
  "set_iterator_genord (set_iterator_sng (x::'a)) {x} R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_iterator_genord (set_iterator_sng x) {x} R
[PROOF STEP]
apply (rule set_iterator_genord.intro)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>l0. distinct l0 \<and> {x} = set l0 \<and> sorted_wrt R l0 \<and> set_iterator_sng x = foldli l0
[PROOF STEP]
apply (rule exI[where x="[x]"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct [x] \<and> {x} = set [x] \<and> sorted_wrt R [x] \<and> set_iterator_sng x = foldli [x]
[PROOF STEP]
apply (simp add: set_iterator_sng_foldli_conv)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma suffix_stutter_equiv:
  assumes f: "stutter_sampler f \<sigma>"
  shows "suffix (f n) \<sigma> \<approx> suffix n (\<sigma> \<circ> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]
[PROOF STEP]
from f
[PROOF STATE]
proof (chain)
picking this:
stutter_sampler f \<sigma>
[PROOF STEP]
have "stutter_sampler (\<lambda>k. f (n+k) - f n) (\<sigma>[f n ..])"
[PROOF STATE]
proof (prove)
using this:
stutter_sampler f \<sigma>

goal (1 subgoal):
 1. stutter_sampler (\<lambda>k. f (n + k) - f n) \<sigma> [f n..]
[PROOF STEP]
by (rule stutter_sampler_suffix)
[PROOF STATE]
proof (state)
this:
stutter_sampler (\<lambda>k. f (n + k) - f n) \<sigma> [f n..]

goal (1 subgoal):
 1. \<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
stutter_sampler (\<lambda>k. f (n + k) - f n) \<sigma> [f n..]

goal (1 subgoal):
 1. \<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]
[PROOF STEP]
have "stutter_sampler id ((\<sigma> \<circ> f)[n ..])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stutter_sampler id \<sigma> \<circ> f [n..]
[PROOF STEP]
by (rule id_stutter_sampler)
[PROOF STATE]
proof (state)
this:
stutter_sampler id \<sigma> \<circ> f [n..]

goal (1 subgoal):
 1. \<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
stutter_sampler id \<sigma> \<circ> f [n..]

goal (1 subgoal):
 1. \<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]
[PROOF STEP]
have "(\<sigma>[f n ..]) \<circ> (\<lambda>k. f (n+k) - f n) = ((\<sigma> \<circ> f)[n ..]) \<circ> id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<sigma> [f n..] \<circ> (\<lambda>k. f (n + k) - f n) = \<sigma> \<circ> f [n..] \<circ> id
[PROOF STEP]
proof (rule ext, auto)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<sigma> (f n + (f (n + x) - f n)) = \<sigma> (f (n + x))
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<sigma> (f n + (f (n + x) - f n)) = \<sigma> (f (n + x))
[PROOF STEP]
from f[THEN stutter_sampler_mono, THEN strict_mono_mono]
[PROOF STATE]
proof (chain)
picking this:
mono f
[PROOF STEP]
have "f n \<le> f (n+i)"
[PROOF STATE]
proof (prove)
using this:
mono f

goal (1 subgoal):
 1. f n \<le> f (n + i)
[PROOF STEP]
by (rule monoD) simp
[PROOF STATE]
proof (state)
this:
f n \<le> f (n + i)

goal (1 subgoal):
 1. \<And>x. \<sigma> (f n + (f (n + x) - f n)) = \<sigma> (f (n + x))
[PROOF STEP]
thus "\<sigma> (f n + (f (n+i) - f n)) = \<sigma> (f (n+i))"
[PROOF STATE]
proof (prove)
using this:
f n \<le> f (n + i)

goal (1 subgoal):
 1. \<sigma> (f n + (f (n + i) - f n)) = \<sigma> (f (n + i))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<sigma> (f n + (f (n + i) - f n)) = \<sigma> (f (n + i))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<sigma> [f n..] \<circ> (\<lambda>k. f (n + k) - f n) = \<sigma> \<circ> f [n..] \<circ> id

goal (1 subgoal):
 1. \<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
stutter_sampler (\<lambda>k. f (n + k) - f n) \<sigma> [f n..]
stutter_sampler id \<sigma> \<circ> f [n..]
\<sigma> [f n..] \<circ> (\<lambda>k. f (n + k) - f n) = \<sigma> \<circ> f [n..] \<circ> id
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
stutter_sampler (\<lambda>k. f (n + k) - f n) \<sigma> [f n..]
stutter_sampler id \<sigma> \<circ> f [n..]
\<sigma> [f n..] \<circ> (\<lambda>k. f (n + k) - f n) = \<sigma> \<circ> f [n..] \<circ> id

goal (1 subgoal):
 1. \<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]
[PROOF STEP]
by (rule stutter_equivI)
[PROOF STATE]
proof (state)
this:
\<sigma> [f n..] \<approx> \<sigma> \<circ> f [n..]

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mk_cycles_awalk_cost:
  assumes "awalk u p u"
  shows "awalk_cost c (mk_cycles_path n p) = n * awalk_cost c p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. awalk_cost c (mk_cycles_path n p) = real n * awalk_cost c p
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
awalk u p u

goal (1 subgoal):
 1. awalk_cost c (mk_cycles_path n p) = real n * awalk_cost c p
[PROOF STEP]
proof (induct rule: mk_cycles_path.induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>ca. awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path 0 ca) = real 0 * awalk_cost c ca
 2. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
awalk u c_ u

goal (2 subgoals):
 1. \<And>ca. awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path 0 ca) = real 0 * awalk_cost c ca
 2. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. awalk_cost c (mk_cycles_path 0 c_) = real 0 * awalk_cost c c_
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
awalk_cost c (mk_cycles_path 0 c_) = real 0 * awalk_cost c c_

goal (1 subgoal):
 1. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
case (2 n p)
[PROOF STATE]
proof (state)
this:
awalk u p u \<Longrightarrow> awalk_cost c (mk_cycles_path n p) = real n * awalk_cost c p
awalk u p u

goal (1 subgoal):
 1. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
have "awalk_cost c (mk_cycles_path (Suc n) p)
      = awalk_cost c (p @ (mk_cycles_path n p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. awalk_cost c (mk_cycles_path (Suc n) p) = awalk_cost c (p @ mk_cycles_path n p)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
awalk_cost c (mk_cycles_path (Suc n) p) = awalk_cost c (p @ mk_cycles_path n p)

goal (1 subgoal):
 1. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
awalk_cost c (mk_cycles_path (Suc n) p) = awalk_cost c (p @ mk_cycles_path n p)

goal (1 subgoal):
 1. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
have "\<dots> = awalk_cost c p + real n * awalk_cost c p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
proof (cases n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
 2. \<And>nat. n = Suc nat \<Longrightarrow> awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
 2. \<And>nat. n = Suc nat \<Longrightarrow> awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
case (Suc n')
[PROOF STATE]
proof (state)
this:
n = Suc n'

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = Suc n'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = Suc n'

goal (1 subgoal):
 1. awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
n = Suc n'
awalk u p u \<Longrightarrow> awalk_cost c (mk_cycles_path n p) = real n * awalk_cost c p
awalk u p u

goal (1 subgoal):
 1. awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p

goal (1 subgoal):
 1. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
awalk_cost c (p @ mk_cycles_path n p) = awalk_cost c p + real n * awalk_cost c p

goal (1 subgoal):
 1. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
have "\<dots> = real (Suc n) * awalk_cost c p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. awalk_cost c p + real n * awalk_cost c p = real (Suc n) * awalk_cost c p
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
awalk_cost c p + real n * awalk_cost c p = real (Suc n) * awalk_cost c p

goal (1 subgoal):
 1. \<And>n ca. \<lbrakk>awalk u ca u \<Longrightarrow> awalk_cost c (mk_cycles_path n ca) = real n * awalk_cost c ca; awalk u ca u\<rbrakk> \<Longrightarrow> awalk_cost c (mk_cycles_path (Suc n) ca) = real (Suc n) * awalk_cost c ca
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
awalk_cost c (mk_cycles_path (Suc n) p) = real (Suc n) * awalk_cost c p
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
awalk_cost c (mk_cycles_path (Suc n) p) = real (Suc n) * awalk_cost c p

goal (1 subgoal):
 1. awalk_cost c (mk_cycles_path (Suc n) p) = real (Suc n) * awalk_cost c p
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
awalk_cost c (mk_cycles_path (Suc n) p) = real (Suc n) * awalk_cost c p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ennreal_divide_self[simp]: "a \<noteq> 0 \<Longrightarrow> a < top \<Longrightarrow> a / a = (1::ennreal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<noteq> 0; a < top\<rbrakk> \<Longrightarrow> a / a = 1
[PROOF STEP]
by (metis mult_1 mult_divide_eq_ennreal top.not_eq_extremum)


[STATEMENT]
lemma fds_nth_mult_const_right [simp]: "fds_nth (f * fds_const c) n = fds_nth f n * c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth (f * fds_const c) n = fds_nth f n * c
[PROOF STEP]
by (cases "n = 0") (simp_all add: fds_nth_mult fds_const_def)


[STATEMENT]
lemma unity_root_eqD:
 assumes gr: "k > 0"
 assumes eq: "unity_root k i = unity_root k j"
 shows "i mod k = j mod k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
let ?arg1 = "(2*pi*i/k)* \<i>"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
let ?arg2 = "(2*pi*j/k)* \<i>"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
from eq unity_root_conv_exp
[PROOF STATE]
proof (chain)
picking this:
unity_root k i = unity_root k j
unity_root ?k ?n = exp (complex_of_real (2 * pi * real_of_int ?n / real ?k) * \<i>)
[PROOF STEP]
have "exp ?arg1 = exp ?arg2"
[PROOF STATE]
proof (prove)
using this:
unity_root k i = unity_root k j
unity_root ?k ?n = exp (complex_of_real (2 * pi * real_of_int ?n / real ?k) * \<i>)

goal (1 subgoal):
 1. exp (complex_of_real (2 * pi * real_of_int i / real k) * \<i>) = exp (complex_of_real (2 * pi * real_of_int j / real k) * \<i>)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
exp (complex_of_real (2 * pi * real_of_int i / real k) * \<i>) = exp (complex_of_real (2 * pi * real_of_int j / real k) * \<i>)

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
from this exp_eq
[PROOF STATE]
proof (chain)
picking this:
exp (complex_of_real (2 * pi * real_of_int i / real k) * \<i>) = exp (complex_of_real (2 * pi * real_of_int j / real k) * \<i>)
(exp ?w = exp ?z) = (\<exists>n. ?w = ?z + complex_of_real (real_of_int (2 * n) * pi) * \<i>)
[PROOF STEP]
obtain n :: int where "?arg1 = ?arg2 +(2*n*pi)*\<i>"
[PROOF STATE]
proof (prove)
using this:
exp (complex_of_real (2 * pi * real_of_int i / real k) * \<i>) = exp (complex_of_real (2 * pi * real_of_int j / real k) * \<i>)
(exp ?w = exp ?z) = (\<exists>n. ?w = ?z + complex_of_real (real_of_int (2 * n) * pi) * \<i>)

goal (1 subgoal):
 1. (\<And>n. complex_of_real (2 * pi * real_of_int i / real k) * \<i> = complex_of_real (2 * pi * real_of_int j / real k) * \<i> + complex_of_real (real_of_int (2 * n) * pi) * \<i> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
complex_of_real (2 * pi * real_of_int i / real k) * \<i> = complex_of_real (2 * pi * real_of_int j / real k) * \<i> + complex_of_real (real_of_int (2 * n) * pi) * \<i>

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
complex_of_real (2 * pi * real_of_int i / real k) * \<i> = complex_of_real (2 * pi * real_of_int j / real k) * \<i> + complex_of_real (real_of_int (2 * n) * pi) * \<i>
[PROOF STEP]
have e1: "?arg1 - ?arg2 = 2*n*pi*\<i>"
[PROOF STATE]
proof (prove)
using this:
complex_of_real (2 * pi * real_of_int i / real k) * \<i> = complex_of_real (2 * pi * real_of_int j / real k) * \<i> + complex_of_real (real_of_int (2 * n) * pi) * \<i>

goal (1 subgoal):
 1. complex_of_real (2 * pi * real_of_int i / real k) * \<i> - complex_of_real (2 * pi * real_of_int j / real k) * \<i> = complex_of_real (real_of_int (2 * n) * pi) * \<i>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (2 * pi * real_of_int i / real k) * \<i> - complex_of_real (2 * pi * real_of_int j / real k) * \<i> = complex_of_real (real_of_int (2 * n) * pi) * \<i>

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
have e2: "?arg1 - ?arg2 = 2*(i-j)*(1/k)*pi*\<i>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (2 * pi * real_of_int i / real k) * \<i> - complex_of_real (2 * pi * real_of_int j / real k) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * (1 / real k) * pi) * \<i>
[PROOF STEP]
by (auto simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
complex_of_real (2 * pi * real_of_int i / real k) * \<i> - complex_of_real (2 * pi * real_of_int j / real k) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * (1 / real k) * pi) * \<i>

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
from e1 e2
[PROOF STATE]
proof (chain)
picking this:
complex_of_real (2 * pi * real_of_int i / real k) * \<i> - complex_of_real (2 * pi * real_of_int j / real k) * \<i> = complex_of_real (real_of_int (2 * n) * pi) * \<i>
complex_of_real (2 * pi * real_of_int i / real k) * \<i> - complex_of_real (2 * pi * real_of_int j / real k) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * (1 / real k) * pi) * \<i>
[PROOF STEP]
have "2*n*pi*\<i> = 2*(i-j)*(1/k)*pi*\<i>"
[PROOF STATE]
proof (prove)
using this:
complex_of_real (2 * pi * real_of_int i / real k) * \<i> - complex_of_real (2 * pi * real_of_int j / real k) * \<i> = complex_of_real (real_of_int (2 * n) * pi) * \<i>
complex_of_real (2 * pi * real_of_int i / real k) * \<i> - complex_of_real (2 * pi * real_of_int j / real k) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * (1 / real k) * pi) * \<i>

goal (1 subgoal):
 1. complex_of_real (real_of_int (2 * n) * pi) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * (1 / real k) * pi) * \<i>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (real_of_int (2 * n) * pi) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * (1 / real k) * pi) * \<i>

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
complex_of_real (real_of_int (2 * n) * pi) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * (1 / real k) * pi) * \<i>
[PROOF STEP]
have "2*n*k*pi*\<i> = 2*(i-j)*pi*\<i>"
[PROOF STATE]
proof (prove)
using this:
complex_of_real (real_of_int (2 * n) * pi) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * (1 / real k) * pi) * \<i>

goal (1 subgoal):
 1. complex_of_real (real_of_int (2 * n * int k) * pi) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * pi) * \<i>
[PROOF STEP]
by (simp add: divide_simps \<open>k > 0\<close>)(simp add: field_simps)
[PROOF STATE]
proof (state)
this:
complex_of_real (real_of_int (2 * n * int k) * pi) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * pi) * \<i>

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
complex_of_real (real_of_int (2 * n * int k) * pi) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * pi) * \<i>
[PROOF STEP]
have "2*n*k = 2*(i-j)"
[PROOF STATE]
proof (prove)
using this:
complex_of_real (real_of_int (2 * n * int k) * pi) * \<i> = complex_of_real (real_of_int (2 * (i - j)) * pi) * \<i>

goal (1 subgoal):
 1. 2 * n * int k = 2 * (i - j)
[PROOF STEP]
by (meson complex_i_not_zero mult_cancel_right of_int_eq_iff of_real_eq_iff pi_neq_zero)
[PROOF STATE]
proof (state)
this:
2 * n * int k = 2 * (i - j)

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
2 * n * int k = 2 * (i - j)
[PROOF STEP]
have "n*k = i-j"
[PROOF STATE]
proof (prove)
using this:
2 * n * int k = 2 * (i - j)

goal (1 subgoal):
 1. n * int k = i - j
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
n * int k = i - j

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n * int k = i - j
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n * int k = i - j

goal (1 subgoal):
 1. i mod int k = j mod int k
[PROOF STEP]
by Groebner_Basis.algebra
[PROOF STATE]
proof (state)
this:
i mod int k = j mod int k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma incomparable_empty[simp, intro]: "incomparable {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. incomparable {}
[PROOF STEP]
unfolding incomparable_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>{}. \<forall>y\<in>{}. x \<noteq> y \<longrightarrow> \<not> x < y \<and> \<not> y < x
[PROOF STEP]
by auto


[STATEMENT]
lemma
  iIN_mirror_elem: "mirror_elem x [n\<dots>,d] = n + n + d - x" and
  iTILL_mirror_elem: "mirror_elem x [\<dots>n] = n - x" and
  iMODb_mirror_elem: "mirror_elem x [r, mod m, c] = r + r + m * c - x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mirror_elem x [n\<dots>,d] = n + n + d - x &&& mirror_elem x [\<dots>n] = n - x &&& mirror_elem x [ r, mod m, c ] = r + r + m * c - x
[PROOF STEP]
by (simp add: mirror_elem_def nat_mirror_def iT_Min iT_Max)+


[STATEMENT]
lemma iT_Plus_neg_iTrigger_conv: "(P t1. t1 \<T> t2 (I \<oplus>- k). Q t2) = (P (t1 - k). t1 \<T> t2 (I \<down>\<ge> k). Q (t2 - k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P t1. t1 \<T> t2 I \<oplus>- k. Q t2) = (P (t1 - k). t1 \<T> t2 I \<down>\<ge> k. Q (t2 - k))
[PROOF STEP]
by (simp add: iTrigger_iWeakSince_conv iT_Plus_neg_iWeakSince_conv)


[STATEMENT]
lemma blinfun_compose_assoc: "F o\<^sub>L G o\<^sub>L H = F o\<^sub>L (G o\<^sub>L H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F o\<^sub>L G o\<^sub>L H = F o\<^sub>L (G o\<^sub>L H)
[PROOF STEP]
using blinfun_apply_inject
[PROOF STATE]
proof (prove)
using this:
(blinfun_apply ?x = blinfun_apply ?y) = (?x = ?y)

goal (1 subgoal):
 1. F o\<^sub>L G o\<^sub>L H = F o\<^sub>L (G o\<^sub>L H)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma divide_inf_right [simp]:
  assumes "z \<noteq> \<infinity>\<^sub>h"
  shows "z :\<^sub>h \<infinity>\<^sub>h = 0\<^sub>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z :\<^sub>h \<infinity>\<^sub>h = 0\<^sub>h
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
z \<noteq> \<infinity>\<^sub>h

goal (1 subgoal):
 1. z :\<^sub>h \<infinity>\<^sub>h = 0\<^sub>h
[PROOF STEP]
unfolding divide_def
[PROOF STATE]
proof (prove)
using this:
z \<noteq> \<infinity>\<^sub>h

goal (1 subgoal):
 1. z *\<^sub>h reciprocal \<infinity>\<^sub>h = 0\<^sub>h
[PROOF STEP]
by simp


[STATEMENT]
lemma search:
  assumes dec: "\<And>x::nat. P x \<or> \<not> P x"
  shows "(\<exists>x<y. P x) \<or> \<not> (\<exists>x<y. P x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x<y. P x) \<or> \<not> (\<exists>x<y. P x)
[PROOF STEP]
proof (induct y)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<exists>x<0. P x) \<or> \<not> (\<exists>x<0. P x)
 2. \<And>y. (\<exists>x<y. P x) \<or> \<not> (\<exists>x<y. P x) \<Longrightarrow> (\<exists>x<Suc y. P x) \<or> \<not> (\<exists>x<Suc y. P x)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. (\<exists>x<0. P x) \<or> \<not> (\<exists>x<0. P x)
 2. \<And>y. (\<exists>x<y. P x) \<or> \<not> (\<exists>x<y. P x) \<Longrightarrow> (\<exists>x<Suc y. P x) \<or> \<not> (\<exists>x<Suc y. P x)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x<0. P x) \<or> \<not> (\<exists>x<0. P x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<exists>x<0. P x) \<or> \<not> (\<exists>x<0. P x)

goal (1 subgoal):
 1. \<And>y. (\<exists>x<y. P x) \<or> \<not> (\<exists>x<y. P x) \<Longrightarrow> (\<exists>x<Suc y. P x) \<or> \<not> (\<exists>x<Suc y. P x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. (\<exists>x<y. P x) \<or> \<not> (\<exists>x<y. P x) \<Longrightarrow> (\<exists>x<Suc y. P x) \<or> \<not> (\<exists>x<Suc y. P x)
[PROOF STEP]
case (Suc z)
[PROOF STATE]
proof (state)
this:
(\<exists>x<z. P x) \<or> \<not> (\<exists>x<z. P x)

goal (1 subgoal):
 1. \<And>y. (\<exists>x<y. P x) \<or> \<not> (\<exists>x<y. P x) \<Longrightarrow> (\<exists>x<Suc y. P x) \<or> \<not> (\<exists>x<Suc y. P x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<exists>x<z. P x) \<or> \<not> (\<exists>x<z. P x)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(\<exists>x<z. P x) \<or> \<not> (\<exists>x<z. P x)

goal (1 subgoal):
 1. (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>x<z. P x \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
 2. \<not> (\<exists>x<z. P x) \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
assume "\<exists>x<z. P x"
[PROOF STATE]
proof (state)
this:
\<exists>x<z. P x

goal (2 subgoals):
 1. \<exists>x<z. P x \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
 2. \<not> (\<exists>x<z. P x) \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>x<z. P x
[PROOF STEP]
obtain x where le: "x < z" and P: "P x"
[PROOF STATE]
proof (prove)
using this:
\<exists>x<z. P x

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x < z; P x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by iprover
[PROOF STATE]
proof (state)
this:
x < z
P x

goal (2 subgoals):
 1. \<exists>x<z. P x \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
 2. \<not> (\<exists>x<z. P x) \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
from le
[PROOF STATE]
proof (chain)
picking this:
x < z
[PROOF STEP]
have "x < Suc z"
[PROOF STATE]
proof (prove)
using this:
x < z

goal (1 subgoal):
 1. x < Suc z
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x < Suc z

goal (2 subgoals):
 1. \<exists>x<z. P x \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
 2. \<not> (\<exists>x<z. P x) \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
with P
[PROOF STATE]
proof (chain)
picking this:
P x
x < Suc z
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P x
x < Suc z

goal (1 subgoal):
 1. (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
by iprover
[PROOF STATE]
proof (state)
this:
(\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)

goal (1 subgoal):
 1. \<not> (\<exists>x<z. P x) \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<exists>x<z. P x) \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
assume nex: "\<not> (\<exists>x<z. P x)"
[PROOF STATE]
proof (state)
this:
\<not> (\<exists>x<z. P x)

goal (1 subgoal):
 1. \<not> (\<exists>x<z. P x) \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
from dec
[PROOF STATE]
proof (chain)
picking this:
P ?x \<or> \<not> P ?x
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P ?x \<or> \<not> P ?x

goal (1 subgoal):
 1. (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P ?x1 \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
 2. \<not> P ?x1 \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
assume P: "P z"
[PROOF STATE]
proof (state)
this:
P z

goal (2 subgoals):
 1. P ?x1 \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
 2. \<not> P ?x1 \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
have "z < Suc z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z < Suc z
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
z < Suc z

goal (2 subgoals):
 1. P ?x1 \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
 2. \<not> P ?x1 \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
with P
[PROOF STATE]
proof (chain)
picking this:
P z
z < Suc z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P z
z < Suc z

goal (1 subgoal):
 1. (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
by iprover
[PROOF STATE]
proof (state)
this:
(\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)

goal (1 subgoal):
 1. \<not> P z \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> P z \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
assume nP: "\<not> P z"
[PROOF STATE]
proof (state)
this:
\<not> P z

goal (1 subgoal):
 1. \<not> P z \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
have "\<not> (\<exists>x<Suc z. P x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>x<Suc z. P x \<Longrightarrow> False
[PROOF STEP]
assume "\<exists>x<Suc z. P x"
[PROOF STATE]
proof (state)
this:
\<exists>x<Suc z. P x

goal (1 subgoal):
 1. \<exists>x<Suc z. P x \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>x<Suc z. P x
[PROOF STEP]
obtain x where le: "x < Suc z" and P: "P x"
[PROOF STATE]
proof (prove)
using this:
\<exists>x<Suc z. P x

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x < Suc z; P x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by iprover
[PROOF STATE]
proof (state)
this:
x < Suc z
P x

goal (1 subgoal):
 1. \<exists>x<Suc z. P x \<Longrightarrow> False
[PROOF STEP]
have "x < z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < z
[PROOF STEP]
proof (cases "x = z")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = z \<Longrightarrow> x < z
 2. x \<noteq> z \<Longrightarrow> x < z
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = z

goal (2 subgoals):
 1. x = z \<Longrightarrow> x < z
 2. x \<noteq> z \<Longrightarrow> x < z
[PROOF STEP]
with nP and P
[PROOF STATE]
proof (chain)
picking this:
\<not> P z
P x
x = z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> P z
P x
x = z

goal (1 subgoal):
 1. x < z
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x < z

goal (1 subgoal):
 1. x \<noteq> z \<Longrightarrow> x < z
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> z \<Longrightarrow> x < z
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> z

goal (1 subgoal):
 1. x \<noteq> z \<Longrightarrow> x < z
[PROOF STEP]
with le
[PROOF STATE]
proof (chain)
picking this:
x < Suc z
x \<noteq> z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x < Suc z
x \<noteq> z

goal (1 subgoal):
 1. x < z
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x < z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x < z

goal (1 subgoal):
 1. \<exists>x<Suc z. P x \<Longrightarrow> False
[PROOF STEP]
with P
[PROOF STATE]
proof (chain)
picking this:
P x
x < z
[PROOF STEP]
have "\<exists>x<z. P x"
[PROOF STATE]
proof (prove)
using this:
P x
x < z

goal (1 subgoal):
 1. \<exists>x<z. P x
[PROOF STEP]
by iprover
[PROOF STATE]
proof (state)
this:
\<exists>x<z. P x

goal (1 subgoal):
 1. \<exists>x<Suc z. P x \<Longrightarrow> False
[PROOF STEP]
with nex
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<exists>x<z. P x)
\<exists>x<z. P x
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> (\<exists>x<z. P x)
\<exists>x<z. P x

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> (\<exists>x<Suc z. P x)

goal (1 subgoal):
 1. \<not> P z \<Longrightarrow> (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<not> (\<exists>x<Suc z. P x)

goal (1 subgoal):
 1. (\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)
[PROOF STEP]
by iprover
[PROOF STATE]
proof (state)
this:
(\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>x<Suc z. P x) \<or> \<not> (\<exists>x<Suc z. P x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tllist_all2_tlengthD: "tllist_all2 P Q xs ys \<Longrightarrow> tlength xs = tlength ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tllist_all2 P Q xs ys \<Longrightarrow> tlength xs = tlength ys
[PROOF STEP]
by(transfer)(auto dest: llist_all2_llengthD)


[STATEMENT]
lemma fls_inverse_minus [simp]: "inverse (-f) = -inverse (f :: 'a :: division_ring fls)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (- f) = - inverse f
[PROOF STEP]
using fls_lr_inverse_minus(2)[of f]
[PROOF STATE]
proof (prove)
using this:
fls_right_inverse (- f) (- ?x) = - fls_right_inverse f ?x

goal (1 subgoal):
 1. inverse (- f) = - inverse f
[PROOF STEP]
by (simp add: fls_inverse_def')


[STATEMENT]
lemma finite_multisets:
  assumes "finite A"
  shows "finite {M. set_mset M \<subseteq> A \<and> size M = k}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {M. set_mset M \<subseteq> A \<and> size M = k}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. finite {M. set_mset M \<subseteq> A \<and> size M = k}
[PROOF STEP]
proof (induct A k rule: finite_set_and_nat_induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>A. finite A \<Longrightarrow> finite {M. set_mset M \<subseteq> A \<and> size M = 0}
 2. \<And>k. finite {M. set_mset M \<subseteq> {} \<and> size M = k}
 3. \<And>A k x. \<lbrakk>finite A; x \<notin> A; finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}; finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}\<rbrakk> \<Longrightarrow> finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
case zero
[PROOF STATE]
proof (state)
this:
finite A_

goal (3 subgoals):
 1. \<And>A. finite A \<Longrightarrow> finite {M. set_mset M \<subseteq> A \<and> size M = 0}
 2. \<And>k. finite {M. set_mset M \<subseteq> {} \<and> size M = k}
 3. \<And>A k x. \<lbrakk>finite A; x \<notin> A; finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}; finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}\<rbrakk> \<Longrightarrow> finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
finite A_
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite A_

goal (1 subgoal):
 1. finite {M. set_mset M \<subseteq> A_ \<and> size M = 0}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {M. set_mset M \<subseteq> A_ \<and> size M = 0}

goal (2 subgoals):
 1. \<And>k. finite {M. set_mset M \<subseteq> {} \<and> size M = k}
 2. \<And>A k x. \<lbrakk>finite A; x \<notin> A; finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}; finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}\<rbrakk> \<Longrightarrow> finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>k. finite {M. set_mset M \<subseteq> {} \<and> size M = k}
 2. \<And>A k x. \<lbrakk>finite A; x \<notin> A; finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}; finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}\<rbrakk> \<Longrightarrow> finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>k. finite {M. set_mset M \<subseteq> {} \<and> size M = k}
 2. \<And>A k x. \<lbrakk>finite A; x \<notin> A; finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}; finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}\<rbrakk> \<Longrightarrow> finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {M. set_mset M \<subseteq> {} \<and> size M = k_}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {M. set_mset M \<subseteq> {} \<and> size M = k_}

goal (1 subgoal):
 1. \<And>A k x. \<lbrakk>finite A; x \<notin> A; finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}; finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}\<rbrakk> \<Longrightarrow> finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A k x. \<lbrakk>finite A; x \<notin> A; finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}; finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}\<rbrakk> \<Longrightarrow> finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
case (step A k x)
[PROOF STATE]
proof (state)
this:
finite A
x \<notin> A
finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}
finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}

goal (1 subgoal):
 1. \<And>A k x. \<lbrakk>finite A; x \<notin> A; finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}; finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}\<rbrakk> \<Longrightarrow> finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
finite A
x \<notin> A
finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}
finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite A
x \<notin> A
finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}
finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}

goal (1 subgoal):
 1. finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
using set_of_multisets_eq[OF \<open>x \<notin> A\<close>]
[PROOF STATE]
proof (prove)
using this:
finite A
x \<notin> A
finite {M. set_mset M \<subseteq> A \<and> size M = Suc k}
finite {M. set_mset M \<subseteq> insert x A \<and> size M = k}
{M. set_mset M \<subseteq> insert x A \<and> size M = Suc ?k} = {M. set_mset M \<subseteq> A \<and> size M = Suc ?k} \<union> (\<lambda>M. M + {#x#}) ` {M. set_mset M \<subseteq> insert x A \<and> size M = ?k}

goal (1 subgoal):
 1. finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite {M. set_mset M \<subseteq> insert x A \<and> size M = Suc k}

goal:
No subgoals!
[PROOF STEP]
qed