[STATEMENT]
lemma abs_conv_abscissa_completely_multiplicative_log_deriv:
  fixes f :: "'a :: dirichlet_series fds"
  assumes "completely_multiplicative_function (fds_nth f)" "fds_nth f 1 \<noteq> 0"
  shows   "abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
have "fds_deriv f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_deriv f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
completely_multiplicative_function (fds_nth f)
fds_nth f 1 \<noteq> (0::'a)

goal (1 subgoal):
 1. fds_deriv f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * f
[PROOF STEP]
by (subst completely_multiplicative_fds_deriv') simp_all
[PROOF STATE]
proof (state)
this:
fds_deriv f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * f

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_deriv f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * f

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
have "\<dots> / f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * (f * inverse f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - fds (\<lambda>n. fds_nth f n * mangoldt n) * f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * (f * inverse f)
[PROOF STEP]
by (simp add: divide_fds_def)
[PROOF STATE]
proof (state)
this:
- fds (\<lambda>n. fds_nth f n * mangoldt n) * f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * (f * inverse f)

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- fds (\<lambda>n. fds_nth f n * mangoldt n) * f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * (f * inverse f)

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
have "f * inverse f = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f * inverse f = 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
completely_multiplicative_function (fds_nth f)
fds_nth f 1 \<noteq> (0::'a)

goal (1 subgoal):
 1. f * inverse f = 1
[PROOF STEP]
by (intro fds_right_inverse)
[PROOF STATE]
proof (state)
this:
f * inverse f = 1

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
fds_deriv f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * 1
[PROOF STEP]
have "fds_deriv f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n)"
[PROOF STATE]
proof (prove)
using this:
fds_deriv f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n) * 1

goal (1 subgoal):
 1. fds_deriv f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fds_deriv f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n)

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fds_deriv f / f = - fds (\<lambda>n. fds_nth f n * mangoldt n)

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
have "abs_conv_abscissa \<dots> =
               abs_conv_abscissa (fds (\<lambda>n. fds_nth f n * mangoldt n))"
    (is "_ = abs_conv_abscissa ?f")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa (- fds (\<lambda>n. fds_nth f n * mangoldt n)) = abs_conv_abscissa (fds (\<lambda>n. fds_nth f n * mangoldt n))
[PROOF STEP]
by (rule abs_conv_abscissa_minus)
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa (- fds (\<lambda>n. fds_nth f n * mangoldt n)) = abs_conv_abscissa (fds (\<lambda>n. fds_nth f n * mangoldt n))

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa (- fds (\<lambda>n. fds_nth f n * mangoldt n)) = abs_conv_abscissa (fds (\<lambda>n. fds_nth f n * mangoldt n))

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
have "\<dots> \<le> abs_conv_abscissa f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abs_conv_abscissa (fds (\<lambda>n. fds_nth f n * mangoldt n)) \<le> abs_conv_abscissa f
[PROOF STEP]
proof (rule abs_conv_abscissa_leI, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c'. abs_conv_abscissa f < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges (fds (\<lambda>n. fds_nth f n * mangoldt n)) s
[PROOF STEP]
case (1 c)
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa f < ereal c

goal (1 subgoal):
 1. \<And>c'. abs_conv_abscissa f < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges (fds (\<lambda>n. fds_nth f n * mangoldt n)) s
[PROOF STEP]
have "fds_abs_converges ?f (of_real c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_abs_converges (fds (\<lambda>n. fds_nth f n * mangoldt n)) (of_real c)
[PROOF STEP]
unfolding fds_abs_converges_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c)))
[PROOF STEP]
proof (rule summable_comparison_test_ev)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>\<^sub>F n in sequentially. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> ?g n
 2. summable ?g
[PROOF STEP]
from 1
[PROOF STATE]
proof (chain)
picking this:
abs_conv_abscissa f < ereal c
[PROOF STEP]
have "fds_abs_converges (fds_deriv f) (of_real c)"
[PROOF STATE]
proof (prove)
using this:
abs_conv_abscissa f < ereal c

goal (1 subgoal):
 1. fds_abs_converges (fds_deriv f) (of_real c)
[PROOF STEP]
by (intro fds_abs_converges) (auto simp: abs_conv_abscissa_deriv)
[PROOF STATE]
proof (state)
this:
fds_abs_converges (fds_deriv f) (of_real c)

goal (2 subgoals):
 1. \<forall>\<^sub>F n in sequentially. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> ?g n
 2. summable ?g
[PROOF STEP]
thus "summable (\<lambda>n. \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c :: 'a)))"
[PROOF STATE]
proof (prove)
using this:
fds_abs_converges (fds_deriv f) (of_real c)

goal (1 subgoal):
 1. summable (\<lambda>n. \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c)))
[PROOF STEP]
by (simp add: fds_abs_converges_def fds_deriv_def fds_nth_fds'
                      scaleR_conv_of_real powr_minus norm_mult norm_divide norm_nat_power)
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c)))

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
show "\<forall>\<^sub>F n in sequentially.
              norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n /
                 nat_power n (of_real c)))
              \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c) :: 'a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
using eventually_gt_at_top[of 0]
[PROOF STATE]
proof (prove)
using this:
eventually ((<) (0::?'b1)) at_top

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
case (elim n)
[PROOF STATE]
proof (state)
this:
0 < n

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
have "norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n /
                  nat_power n (of_real c))) =
                norm (fds_nth f n) * mangoldt n / real n powr c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) = norm (fds_nth f n) * mangoldt n / real n powr c
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) = norm (fds_nth f n) * mangoldt n / real n powr c
[PROOF STEP]
by (simp add: fds_nth_fds' norm_mult norm_divide
                                   norm_nat_power abs_mult mangoldt_nonneg)
[PROOF STATE]
proof (state)
this:
norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) = norm (fds_nth f n) * mangoldt n / real n powr c

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) = norm (fds_nth f n) * mangoldt n / real n powr c

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
have "\<dots> \<le> norm (fds_nth f n) * ln n / real n powr c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (fds_nth f n) * mangoldt n / real n powr c \<le> norm (fds_nth f n) * ln (real n) / real n powr c
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. norm (fds_nth f n) * mangoldt n / real n powr c \<le> norm (fds_nth f n) * ln (real n) / real n powr c
[PROOF STEP]
by (intro mult_left_mono divide_right_mono mangoldt_le)
             (simp_all add: mangoldt_def)
[PROOF STATE]
proof (state)
this:
norm (fds_nth f n) * mangoldt n / real n powr c \<le> norm (fds_nth f n) * ln (real n) / real n powr c

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> norm (fds_nth f n) * ln (real n) / real n powr c
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> norm (fds_nth f n) * ln (real n) / real n powr c

goal (1 subgoal):
 1. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
using elim
[PROOF STATE]
proof (prove)
using this:
norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> norm (fds_nth f n) * ln (real n) / real n powr c
0 < n

goal (1 subgoal):
 1. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))
[PROOF STEP]
by (simp add: norm_nat_power algebra_simps)
[PROOF STATE]
proof (state)
this:
norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. norm (norm (fds_nth (fds (\<lambda>n. fds_nth f n * mangoldt n)) n / nat_power n (of_real c))) \<le> \<bar>ln (real n)\<bar> * norm (fds_nth f n) / norm (nat_power n (of_real c))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fds_abs_converges (fds (\<lambda>n. fds_nth f n * mangoldt n)) (of_real c)

goal (1 subgoal):
 1. \<And>c'. abs_conv_abscissa f < ereal c' \<Longrightarrow> \<exists>s. s \<bullet> (1::'a) = c' \<and> fds_abs_converges (fds (\<lambda>n. fds_nth f n * mangoldt n)) s
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
fds_abs_converges (fds (\<lambda>n. fds_nth f n * mangoldt n)) (of_real c)

goal (1 subgoal):
 1. \<exists>s. s \<bullet> (1::'a) = c \<and> fds_abs_converges (fds (\<lambda>n. fds_nth f n * mangoldt n)) s
[PROOF STEP]
by (intro exI[of _ "of_real c"]) auto
[PROOF STATE]
proof (state)
this:
\<exists>s. s \<bullet> (1::'a) = c \<and> fds_abs_converges (fds (\<lambda>n. fds_nth f n * mangoldt n)) s

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa (fds (\<lambda>n. fds_nth f n * mangoldt n)) \<le> abs_conv_abscissa f

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f

goal (1 subgoal):
 1. abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
abs_conv_abscissa (fds_deriv f / f) \<le> abs_conv_abscissa f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_integral_restrict [simp]:
  fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: banach"
  assumes "S \<subseteq> T"
  shows "((\<lambda>x. if x \<in> S then f x else 0) has_integral i) T \<longleftrightarrow> (f has_integral i) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. if x \<in> S then f x else (0::'b)) has_integral i) T = (f has_integral i) S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. if x \<in> S then f x else (0::'b)) has_integral i) T = (f has_integral i) S
[PROOF STEP]
have *: "\<And>x. (if x \<in> T then if x \<in> S then f x else 0 else 0) =  (if x\<in>S then f x else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (if x \<in> T then if x \<in> S then f x else (0::'b) else (0::'b)) = (if x \<in> S then f x else (0::'b))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> T

goal (1 subgoal):
 1. \<And>x. (if x \<in> T then if x \<in> S then f x else (0::'b) else (0::'b)) = (if x \<in> S then f x else (0::'b))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(if ?x \<in> T then if ?x \<in> S then f ?x else (0::'b) else (0::'b)) = (if ?x \<in> S then f ?x else (0::'b))

goal (1 subgoal):
 1. ((\<lambda>x. if x \<in> S then f x else (0::'b)) has_integral i) T = (f has_integral i) S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. if x \<in> S then f x else (0::'b)) has_integral i) T = (f has_integral i) S
[PROOF STEP]
apply (subst(2) has_integral')
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. if x \<in> S then f x else (0::'b)) has_integral i) T = (\<forall>e>0. \<exists>B>0. \<forall>a b. ball (0::'a) B \<subseteq> cbox a b \<longrightarrow> (\<exists>z. ((\<lambda>x. if x \<in> S then f x else (0::'b)) has_integral z) (cbox a b) \<and> norm (z - i) < e))
[PROOF STEP]
apply (subst has_integral')
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>e>0. \<exists>B>0. \<forall>a b. ball (0::'a) B \<subseteq> cbox a b \<longrightarrow> (\<exists>z. ((\<lambda>x. if x \<in> T then if x \<in> S then f x else (0::'b) else (0::'b)) has_integral z) (cbox a b) \<and> norm (z - i) < e)) = (\<forall>e>0. \<exists>B>0. \<forall>a b. ball (0::'a) B \<subseteq> cbox a b \<longrightarrow> (\<exists>z. ((\<lambda>x. if x \<in> S then f x else (0::'b)) has_integral z) (cbox a b) \<and> norm (z - i) < e))
[PROOF STEP]
apply (simp add: *)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
((\<lambda>x. if x \<in> S then f x else (0::'b)) has_integral i) T = (f has_integral i) S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_vebt_finite: "invar_vebt t n \<Longrightarrow> finite (set_vebt' t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invar_vebt t n \<Longrightarrow> finite (set_vebt' t)
[PROOF STEP]
using finite_subset inrange
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A
invar_vebt ?t ?n \<Longrightarrow> set_vebt' ?t \<subseteq> {0..2 ^ ?n - 1}

goal (1 subgoal):
 1. invar_vebt t n \<Longrightarrow> finite (set_vebt' t)
[PROOF STEP]
by blast


[STATEMENT]
lemma GSMP_union: "GSMP (A \<union> B) = GSMP A \<union> GSMP B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GSMP (A \<union> B) = GSMP A \<union> GSMP B
[PROOF STEP]
using SMP_union[of A B]
[PROOF STATE]
proof (prove)
using this:
SMP (A \<union> B) = SMP A \<union> SMP B

goal (1 subgoal):
 1. GSMP (A \<union> B) = GSMP A \<union> GSMP B
[PROOF STEP]
unfolding GSMP_def
[PROOF STATE]
proof (prove)
using this:
SMP (A \<union> B) = SMP A \<union> SMP B

goal (1 subgoal):
 1. {t \<in> SMP (A \<union> B). fv t = {}} = {t \<in> SMP A. fv t = {}} \<union> {t \<in> SMP B. fv t = {}}
[PROOF STEP]
by auto


[STATEMENT]
lemma less_prod_def':
  fixes x y :: "'a::order \<times> 'b::ord"
  shows "x < y \<longleftrightarrow> fst x < fst y \<or> fst x = fst y \<and> snd x < snd y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x < y) = (fst x < fst y \<or> fst x = fst y \<and> snd x < snd y)
[PROOF STEP]
by (auto simp add: less_prod_def le_less)


[STATEMENT]
lemma set_equality[code_pred_inline]:
  "A = B \<longleftrightarrow> (\<forall>x. A x \<longrightarrow> B x) \<and> (\<forall>x. B x \<longrightarrow> A x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A = B) = ((\<forall>x. A x \<longrightarrow> B x) \<and> (\<forall>x. B x \<longrightarrow> A x))
[PROOF STEP]
by (auto simp add: fun_eq_iff)


[STATEMENT]
lemma apply_cltn2_right_abs_in_S:
  assumes "invertible J"
  shows "apply_cltn2 p (cltn2_abs J) \<in> S
  \<longleftrightarrow> (proj2_rep p) \<bullet> (J ** M ** transpose J *v (proj2_rep p)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (apply_cltn2 p (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (apply_cltn2 p (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)
[PROOF STEP]
have "proj2_rep p \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proj2_rep p \<noteq> 0
[PROOF STEP]
by (rule proj2_rep_non_zero)
[PROOF STATE]
proof (state)
this:
proj2_rep p \<noteq> 0

goal (1 subgoal):
 1. (apply_cltn2 p (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)
[PROOF STEP]
with \<open>invertible J\<close>
[PROOF STATE]
proof (chain)
picking this:
invertible J
proj2_rep p \<noteq> 0
[PROOF STEP]
have "apply_cltn2 (proj2_abs (proj2_rep p)) (cltn2_abs J) \<in> S
    \<longleftrightarrow> proj2_rep p \<bullet> (J ** M ** transpose J *v proj2_rep p) = 0"
[PROOF STATE]
proof (prove)
using this:
invertible J
proj2_rep p \<noteq> 0

goal (1 subgoal):
 1. (apply_cltn2 (proj2_abs (proj2_rep p)) (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)
[PROOF STEP]
by (simp add: apply_cltn2_abs_abs_in_S)
[PROOF STATE]
proof (state)
this:
(apply_cltn2 (proj2_abs (proj2_rep p)) (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)

goal (1 subgoal):
 1. (apply_cltn2 p (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)
[PROOF STEP]
thus "apply_cltn2 p (cltn2_abs J) \<in> S
    \<longleftrightarrow> proj2_rep p \<bullet> (J ** M ** transpose J *v proj2_rep p) = 0"
[PROOF STATE]
proof (prove)
using this:
(apply_cltn2 (proj2_abs (proj2_rep p)) (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)

goal (1 subgoal):
 1. (apply_cltn2 p (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)
[PROOF STEP]
by (simp add: proj2_abs_rep)
[PROOF STATE]
proof (state)
this:
(apply_cltn2 p (cltn2_abs J) \<in> S) = (proj2_rep p \<bullet> (J ** M ** Finite_Cartesian_Product.transpose J *v proj2_rep p) = 0)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in group) generate_nat_pow:
  assumes "ord a \<noteq> 0" "a \<in> carrier G"
  shows "generate G {a} = {a [^] k |k. k \<in> {0..ord a - 1}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. generate G {a} = {a [^] k |k. k \<in> {0..ord a - 1}}
[PROOF STEP]
using assms generate_pow_nat ord_elems_inf_carrier
[PROOF STATE]
proof (prove)
using this:
ord a \<noteq> 0
a \<in> carrier G
\<lbrakk>?a \<in> carrier G; ord ?a \<noteq> 0\<rbrakk> \<Longrightarrow> generate G {?a} = {?a [^] k |k. k \<in> UNIV}
\<lbrakk>?a \<in> carrier G; ord ?a \<noteq> 0\<rbrakk> \<Longrightarrow> {?a [^] x |x. x \<in> UNIV} = {?a [^] x |x. x \<in> {0..ord ?a - 1}}

goal (1 subgoal):
 1. generate G {a} = {a [^] k |k. k \<in> {0..ord a - 1}}
[PROOF STEP]
by auto


[STATEMENT]
lemma integrable_neg_binomial_pmf_real:
  assumes p: "p \<in> {0<..1}"
  shows "integrable (measure_pmf (neg_binomial_pmf n p)) real"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (measure_pmf (neg_binomial_pmf n p)) real
[PROOF STEP]
using nn_integral_neg_binomial_pmf_real[OF p, of n]
[PROOF STATE]
proof (prove)
using this:
integral\<^sup>N (measure_pmf (neg_binomial_pmf n p)) of_nat = ennreal (real n * (1 - p) / p)

goal (1 subgoal):
 1. integrable (measure_pmf (neg_binomial_pmf n p)) real
[PROOF STEP]
by (subst integrable_iff_bounded) (auto simp flip: ennreal_of_nat_eq_real_of_nat)


[STATEMENT]
lemma floor_eq2: "real_of_int n \<le> x \<Longrightarrow> x < real_of_int n + 1 \<Longrightarrow> \<lfloor>x\<rfloor> = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>real_of_int n \<le> x; x < real_of_int n + 1\<rbrakk> \<Longrightarrow> \<lfloor>x\<rfloor> = n
[PROOF STEP]
by (fact floor_unique)


[STATEMENT]
lemma annotate_rlen_code[code]: "annotate_rlen s = snd (annotate_rlen_code s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. annotate_rlen s = snd (annotate_rlen_code s)
[PROOF STEP]
proof(induction s)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. annotate_rlen [] = snd (annotate_rlen_code [])
 2. \<And>a s. annotate_rlen s = snd (annotate_rlen_code s) \<Longrightarrow> annotate_rlen (a # s) = snd (annotate_rlen_code (a # s))
[PROOF STEP]
case (Cons s ss)
[PROOF STATE]
proof (state)
this:
annotate_rlen ss = snd (annotate_rlen_code ss)

goal (2 subgoals):
 1. annotate_rlen [] = snd (annotate_rlen_code [])
 2. \<And>a s. annotate_rlen s = snd (annotate_rlen_code s) \<Longrightarrow> annotate_rlen (a # s) = snd (annotate_rlen_code (a # s))
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
annotate_rlen ss = snd (annotate_rlen_code ss)

goal (1 subgoal):
 1. annotate_rlen (s # ss) = snd (annotate_rlen_code (s # ss))
[PROOF STEP]
using annotate_rlen_len[of ss]
[PROOF STATE]
proof (prove)
using this:
annotate_rlen ss = snd (annotate_rlen_code ss)
fst (annotate_rlen_code ss) = length ss

goal (1 subgoal):
 1. annotate_rlen (s # ss) = snd (annotate_rlen_code (s # ss))
[PROOF STEP]
by(clarsimp split: prod.split)
[PROOF STATE]
proof (state)
this:
annotate_rlen (s # ss) = snd (annotate_rlen_code (s # ss))

goal (1 subgoal):
 1. annotate_rlen [] = snd (annotate_rlen_code [])
[PROOF STEP]
qed simp


[STATEMENT]
lemma (in Group) Nfunc_LeastTr2_2_1:"\<lbrakk>i \<le> (n::nat); \<forall>l \<le> n. G \<guillemotright> f l;
       \<forall>l \<le> n. G \<guillemotright> g l; f i \<noteq> g i\<rbrakk> \<Longrightarrow> (LEAST k. (f k \<noteq> g k)) \<le> i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<le> n; \<forall>l\<le>n. G \<guillemotright> f l ; \<forall>l\<le>n. G \<guillemotright> g l ; f i \<noteq> g i\<rbrakk> \<Longrightarrow> (LEAST k. f k \<noteq> g k) \<le> i
[PROOF STEP]
apply (rule contrapos_pp, simp+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<le> n; \<forall>l\<le>n. G \<guillemotright> f l ; \<forall>l\<le>n. G \<guillemotright> g l ; f i \<noteq> g i; \<not> (LEAST k. f k \<noteq> g k) \<le> i\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (simp add:nat_not_le_less)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<le> n; \<forall>l\<le>n. G \<guillemotright> f l ; \<forall>l\<le>n. G \<guillemotright> g l ; f i \<noteq> g i; i < (LEAST k. f k \<noteq> g k)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (frule Nfunc_LeastTr2_2 [of "i" "n" "f" "g"], assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>i \<le> n; \<forall>l\<le>n. G \<guillemotright> f l ; \<forall>l\<le>n. G \<guillemotright> g l ; f i \<noteq> g i; i < (LEAST k. f k \<noteq> g k)\<rbrakk> \<Longrightarrow> NfuncPair_neq_at f g i
 2. \<lbrakk>i \<le> n; \<forall>l\<le>n. G \<guillemotright> f l ; \<forall>l\<le>n. G \<guillemotright> g l ; f i \<noteq> g i; i < (LEAST k. f k \<noteq> g k); (LEAST k. NfuncPair_neq_at f g k) \<le> i\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (simp add:NfuncPair_neq_at_def)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma discriminant_zero:
  fixes a b c x :: real
  assumes "a \<noteq> 0"
    and "discrim a b c = 0"
  shows "a * x\<^sup>2 + b * x + c = 0 \<longleftrightarrow> x = -b / (2 * a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a * x\<^sup>2 + b * x + c = 0) = (x = - b / (2 * a))
[PROOF STEP]
by (simp add: discriminant_nonneg assms)


[STATEMENT]
lemma closedin_closed_subset:
 "\<lbrakk>closedin (top_of_set U) V; T \<subseteq> U; S = V \<inter> T\<rbrakk>
             \<Longrightarrow> closedin (top_of_set T) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>closedin (top_of_set U) V; T \<subseteq> U; S = V \<inter> T\<rbrakk> \<Longrightarrow> closedin (top_of_set T) S
[PROOF STEP]
by (metis (no_types, lifting) Int_assoc Int_commute closedin_closed inf.orderE)


[STATEMENT]
lemma cdot_square_norm: "cinner x x = complex_of_real ((norm x)\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cinner x x = complex_of_real ((norm x)\<^sup>2)
[PROOF STEP]
by (metis Im_complex_of_real Re_complex_of_real cinner_ge_zero complex_eq_iff less_eq_complex_def power2_norm_eq_cinner' zero_complex.simps(2))


[STATEMENT]
lemma connectedin_PiE:
   "connectedin (product_topology X I) (PiE I S) \<longleftrightarrow>
        PiE I S = {} \<or> (\<forall>i \<in> I. connectedin (X i) (S i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connectedin (product_topology X I) (Pi\<^sub>E I S) = (Pi\<^sub>E I S = {} \<or> (\<forall>i\<in>I. connectedin (X i) (S i)))
[PROOF STEP]
by (fastforce simp add: connectedin_def subtopology_PiE connected_space_product_topology subset_PiE PiE_eq_empty_iff)


[STATEMENT]
lemma flub_rep_eq:
  "\<langle>flub A t\<rangle>\<^sub>f = (if (\<forall> a\<in>A. a |\<subseteq>| t) then (\<Union>x\<in>A. \<langle>x\<rangle>\<^sub>f) else \<langle>t\<rangle>\<^sub>f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>flub A t\<rangle>\<^sub>f = (if \<forall>a\<in>A. a |\<subseteq>| t then \<Union> (fset ` A) else \<langle>t\<rangle>\<^sub>f)
[PROOF STEP]
apply (subgoal_tac "(if (\<forall> a\<in>A. a |\<subseteq>| t) then (\<Union>x\<in>A. \<langle>x\<rangle>\<^sub>f) else \<langle>t\<rangle>\<^sub>f) \<in> {x. finite x}")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (if \<forall>a\<in>A. a |\<subseteq>| t then \<Union> (fset ` A) else \<langle>t\<rangle>\<^sub>f) \<in> {x. finite x} \<Longrightarrow> \<langle>flub A t\<rangle>\<^sub>f = (if \<forall>a\<in>A. a |\<subseteq>| t then \<Union> (fset ` A) else \<langle>t\<rangle>\<^sub>f)
 2. (if \<forall>a\<in>A. a |\<subseteq>| t then \<Union> (fset ` A) else \<langle>t\<rangle>\<^sub>f) \<in> {x. finite x}
[PROOF STEP]
apply (auto simp add:flub_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>a\<in>A. a |\<subseteq>| t \<Longrightarrow> finite (\<Union> (fset ` A))
[PROOF STEP]
apply (rule finite_UN_subsets[of _ _ "\<langle>t\<rangle>\<^sub>f"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<forall>a\<in>A. a |\<subseteq>| t \<Longrightarrow> \<forall>x\<in>A. \<langle>x\<rangle>\<^sub>f \<subseteq> \<langle>t\<rangle>\<^sub>f
 2. \<forall>a\<in>A. a |\<subseteq>| t \<Longrightarrow> finite \<langle>t\<rangle>\<^sub>f
[PROOF STEP]
apply (auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma  bernoulli_stream_stake_prob:
  fixes x
  assumes "M = bernoulli_stream p"
and "p \<le> 1" and "0 \<le> p"
shows "measure M {w\<in> space M. (stake n w = stake n x)} = (\<Prod>i\<in>{0..<n}. prob_component p x i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<P>(w in M. stake n w = stake n x) = prod (prob_component p x) {0..<n}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<P>(w in M. stake n w = stake n x) = prod (prob_component p x) {0..<n}
[PROOF STEP]
have "measure M {w\<in> space M. (stake n w = stake n x)} = emeasure M {w\<in> space M. (stake n w = stake n x)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal \<P>(w in M. stake n w = stake n x) = emeasure M {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
by (metis (no_types, lifting) assms(1) bernoulli_stream_def emeasure_eq_ennreal_measure emeasure_space
        ennreal_one_neq_top neq_top_trans prob_space.emeasure_space_1 prob_space.prob_space_stream_space
        prob_space_measure_pmf)
[PROOF STATE]
proof (state)
this:
ennreal \<P>(w in M. stake n w = stake n x) = emeasure M {w \<in> space M. stake n w = stake n x}

goal (1 subgoal):
 1. \<P>(w in M. stake n w = stake n x) = prod (prob_component p x) {0..<n}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ennreal \<P>(w in M. stake n w = stake n x) = emeasure M {w \<in> space M. stake n w = stake n x}

goal (1 subgoal):
 1. \<P>(w in M. stake n w = stake n x) = prod (prob_component p x) {0..<n}
[PROOF STEP]
have "... = (\<Prod>i\<in>{0..<n}. prob_component p x i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M {w \<in> space M. stake n w = stake n x} = ennreal (prod (prob_component p x) {0..<n})
[PROOF STEP]
using bernoulli_stream_pref_prob' assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?M = bernoulli_stream ?p; ?p \<le> 1; 0 \<le> ?p\<rbrakk> \<Longrightarrow> emeasure ?M {w \<in> space ?M. stake ?n w = stake ?n ?x} = ennreal (prod (prob_component ?p ?x) {0..<?n})
M = bernoulli_stream p
p \<le> 1
0 \<le> p

goal (1 subgoal):
 1. emeasure M {w \<in> space M. stake n w = stake n x} = ennreal (prod (prob_component p x) {0..<n})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
emeasure M {w \<in> space M. stake n w = stake n x} = ennreal (prod (prob_component p x) {0..<n})

goal (1 subgoal):
 1. \<P>(w in M. stake n w = stake n x) = prod (prob_component p x) {0..<n}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ennreal \<P>(w in M. stake n w = stake n x) = ennreal (prod (prob_component p x) {0..<n})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ennreal \<P>(w in M. stake n w = stake n x) = ennreal (prod (prob_component p x) {0..<n})

goal (1 subgoal):
 1. \<P>(w in M. stake n w = stake n x) = prod (prob_component p x) {0..<n}
[PROOF STEP]
by (simp add: assms(2) assms(3) prob_component_def prod_nonneg)
[PROOF STATE]
proof (state)
this:
\<P>(w in M. stake n w = stake n x) = prod (prob_component p x) {0..<n}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in aGroup) fSum_eq:"\<lbrakk> \<forall>j \<in> nset n (n + m). f j \<in> carrier A;
      \<forall>j \<in> nset n (n + m). g j \<in> carrier A; (\<forall>j\<in> nset n (n + m). f j = g j)\<rbrakk>
       \<Longrightarrow>
         fSum A f n (n + m) = fSum A g n (n + m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>j\<in>nset n (n + m). f j \<in> carrier A; \<forall>j\<in>nset n (n + m). g j \<in> carrier A; \<forall>j\<in>nset n (n + m). f j = g j\<rbrakk> \<Longrightarrow> \<Sigma>\<^sub>f A f n (n + m) = \<Sigma>\<^sub>f A g n (n + m)
[PROOF STEP]
by (simp add:fSum_eqTr)


[STATEMENT]
lemma uniqueness_algorithm_division_poly:
  fixes f::"'a::{comm_ring,semiring_1_no_zero_divisors} poly"
  assumes f1: "f = g * q1 + r1"
      and f2: "f = g * q2 + r2"
      and g: "g \<noteq> 0"
      and r1: "r1 = 0 \<or> degree r1 < degree g"
      and r2: "r2 = 0 \<or> degree r2 < degree g"
    shows "q1 = q2 \<and> r1 = r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
have "0 =  g * q1 + r1 - (g * q2 + r2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 = g * q1 + r1 - (g * q2 + r2)
[PROOF STEP]
using f1 f2
[PROOF STATE]
proof (prove)
using this:
f = g * q1 + r1
f = g * q2 + r2

goal (1 subgoal):
 1. 0 = g * q1 + r1 - (g * q2 + r2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 = g * q1 + r1 - (g * q2 + r2)

goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
0 = g * q1 + r1 - (g * q2 + r2)

goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
have "... = g * (q1 - q2) + r1 - r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g * q1 + r1 - (g * q2 + r2) = g * (q1 - q2) + r1 - r2
[PROOF STEP]
by (simp add: right_diff_distrib)
[PROOF STATE]
proof (state)
this:
g * q1 + r1 - (g * q2 + r2) = g * (q1 - q2) + r1 - r2

goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
0 = g * (q1 - q2) + r1 - r2
[PROOF STEP]
have eq: "g * (q1 - q2) = r2 - r1"
[PROOF STATE]
proof (prove)
using this:
0 = g * (q1 - q2) + r1 - r2

goal (1 subgoal):
 1. g * (q1 - q2) = r2 - r1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g * (q1 - q2) = r2 - r1

goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
have q_eq: "q1 = q2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. q1 = q2
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. q1 \<noteq> q2 \<Longrightarrow> False
[PROOF STEP]
assume q1_not_q2: "q1 \<noteq> q2"
[PROOF STATE]
proof (state)
this:
q1 \<noteq> q2

goal (1 subgoal):
 1. q1 \<noteq> q2 \<Longrightarrow> False
[PROOF STEP]
hence nz: "g * (q1 - q2) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
q1 \<noteq> q2

goal (1 subgoal):
 1. g * (q1 - q2) \<noteq> 0
[PROOF STEP]
using g
[PROOF STATE]
proof (prove)
using this:
q1 \<noteq> q2
g \<noteq> 0

goal (1 subgoal):
 1. g * (q1 - q2) \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g * (q1 - q2) \<noteq> 0

goal (1 subgoal):
 1. q1 \<noteq> q2 \<Longrightarrow> False
[PROOF STEP]
hence "degree (g * (q1 - q2)) \<ge> degree g"
[PROOF STATE]
proof (prove)
using this:
g * (q1 - q2) \<noteq> 0

goal (1 subgoal):
 1. degree g \<le> degree (g * (q1 - q2))
[PROOF STEP]
by (simp add: degree_mult_right_le)
[PROOF STATE]
proof (state)
this:
degree g \<le> degree (g * (q1 - q2))

goal (1 subgoal):
 1. q1 \<noteq> q2 \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
degree g \<le> degree (g * (q1 - q2))

goal (1 subgoal):
 1. q1 \<noteq> q2 \<Longrightarrow> False
[PROOF STEP]
have "degree (r2 - r1) < degree g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree (r2 - r1) < degree g
[PROOF STEP]
using eq nz degree_diff_less r1 r2
[PROOF STATE]
proof (prove)
using this:
g * (q1 - q2) = r2 - r1
g * (q1 - q2) \<noteq> 0
\<lbrakk>degree ?p < ?n; degree ?q < ?n\<rbrakk> \<Longrightarrow> degree (?p - ?q) < ?n
r1 = 0 \<or> degree r1 < degree g
r2 = 0 \<or> degree r2 < degree g

goal (1 subgoal):
 1. degree (r2 - r1) < degree g
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
degree (r2 - r1) < degree g

goal (1 subgoal):
 1. q1 \<noteq> q2 \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
degree g \<le> degree (g * (q1 - q2))
degree (r2 - r1) < degree g
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
degree g \<le> degree (g * (q1 - q2))
degree (r2 - r1) < degree g

goal (1 subgoal):
 1. False
[PROOF STEP]
using eq
[PROOF STATE]
proof (prove)
using this:
degree g \<le> degree (g * (q1 - q2))
degree (r2 - r1) < degree g
g * (q1 - q2) = r2 - r1

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
q1 = q2

goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
q1 = q2

goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
have "r1 = r2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r1 = r2
[PROOF STEP]
using eq q_eq
[PROOF STATE]
proof (prove)
using this:
g * (q1 - q2) = r2 - r1
q1 = q2

goal (1 subgoal):
 1. r1 = r2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r1 = r2

goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
q1 = q2
r1 = r2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
q1 = q2
r1 = r2

goal (1 subgoal):
 1. q1 = q2 \<and> r1 = r2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
q1 = q2 \<and> r1 = r2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Seq_append_OrdDom: "\<lbrakk>Ord k; OrdDom s1; OrdDom s2\<rbrakk> \<Longrightarrow> OrdDom (seq_append k s1 s2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ord k; OrdDom s1; OrdDom s2\<rbrakk> \<Longrightarrow> OrdDom (seq_append k s1 s2)
[PROOF STEP]
by (auto simp: seq_append_def OrdDom_hrestrict OrdDom_shift)


[STATEMENT]
lemma USUP_subset_mono: "A \<subseteq> B \<Longrightarrow> (\<Squnion> P\<in>A \<bullet> F(P)) \<sqsubseteq> (\<Squnion> P\<in>B \<bullet> F(P))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> B \<Longrightarrow> (\<Squnion> P \<in> A \<bullet> F P) \<sqsubseteq> (\<Squnion> P \<in> B \<bullet> F P)
[PROOF STEP]
by (simp add: INF_superset_mono USUP_as_Inf_collect)


[STATEMENT]
lemma oldest_token_monotonic_Suc:
  assumes "x \<le> n"
  assumes "oldest_token (token_run x n) n = Some i"
  assumes "oldest_token (token_run x (Suc n)) (Suc n) = Some j"
  shows "i \<ge> j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. j \<le> i
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. j \<le> i
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
x \<le> n
oldest_token (token_run x n) n = Some i
oldest_token (token_run x (Suc n)) (Suc n) = Some j
[PROOF STEP]
have "i = Min (configuration (token_run x n) n)"
    and "j = Min (configuration (token_run x (Suc n)) (Suc n))"
[PROOF STATE]
proof (prove)
using this:
x \<le> n
oldest_token (token_run x n) n = Some i
oldest_token (token_run x (Suc n)) (Suc n) = Some j

goal (1 subgoal):
 1. i = Min (configuration (token_run x n) n) &&& j = Min (configuration (token_run x (Suc n)) (Suc n))
[PROOF STEP]
by (metis oldest_token.elims option.discI option.sel)+
[PROOF STATE]
proof (state)
this:
i = Min (configuration (token_run x n) n)
j = Min (configuration (token_run x (Suc n)) (Suc n))

goal (1 subgoal):
 1. j \<le> i
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
i = Min (configuration (token_run x n) n)
j = Min (configuration (token_run x (Suc n)) (Suc n))

goal (1 subgoal):
 1. j \<le> i
[PROOF STEP]
using Min_antimono[OF configuration_monotonic_Suc[OF assms(1)] configuration_non_empty[OF assms(1)] configuration_finite]
[PROOF STATE]
proof (prove)
using this:
i = Min (configuration (token_run x n) n)
j = Min (configuration (token_run x (Suc n)) (Suc n))
Min (configuration (token_run x (Suc n)) (Suc n)) \<le> Min (configuration (token_run x n) n)

goal (1 subgoal):
 1. j \<le> i
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
j \<le> i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dvd_gcd_list_iff:
  "b dvd gcd_list xs \<longleftrightarrow> (\<forall>a\<in>set xs. b dvd a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (b dvd gcd_list xs) = (\<forall>a\<in>set xs. b dvd a)
[PROOF STEP]
by (simp add: dvd_Gcd_fin_iff)


[STATEMENT]
lemma length_minus_list: "y \<le> x \<Longrightarrow> length(x - y) = length(x) - length(y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<le> x \<Longrightarrow> length (x - y) = length x - length y
[PROOF STEP]
by (simp add: less_eq_list_def minus_list_def)


[STATEMENT]
lemma carrier_eq [simp]: "carrier G = totatives n"
  and mult_eq [simp]:    "(x \<otimes>\<^bsub>G\<^esub> y) = (x * y) mod n"
  and one_eq [simp]:     "\<one>\<^bsub>G\<^esub> = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier G = totatives n &&& x \<otimes>\<^bsub>G\<^esub> y = x * y mod n &&& \<one>\<^bsub>G\<^esub> = 1
[PROOF STEP]
by (auto simp: G_def Residues_Mult_def totatives_def)


[STATEMENT]
theorem "P (lfp (\<lambda>N::int set. {0} \<union> {(n + 2) mod 6 | n. n \<in> N})) =
  P {0, 4, 2}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (lfp (\<lambda>N. {0} \<union> {(n + 2) mod 6 |n. n \<in> N})) = P {0, 4, 2}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P (lfp (\<lambda>N. {0} \<union> {(n + 2) mod 6 |n. n \<in> N})) = P {0, 4, 2}
[PROOF STEP]
have seteq: "\<And>A B. (A = B) = ((\<forall>a \<in> A. a\<in>B) \<and> (\<forall>b\<in>B. b\<in>A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>A B. (A = B) = ((\<forall>a\<in>A. a \<in> B) \<and> (\<forall>b\<in>B. b \<in> A))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(?A = ?B) = ((\<forall>a\<in>?A. a \<in> ?B) \<and> (\<forall>b\<in>?B. b \<in> ?A))

goal (1 subgoal):
 1. P (lfp (\<lambda>N. {0} \<union> {(n + 2) mod 6 |n. n \<in> N})) = P {0, 4, 2}
[PROOF STEP]
have aux: "\<And>f A B. {f n | n. A n \<or> B n} = {f n | n. A n} \<union> {f n | n. B n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f A B. {f n |n. A n \<or> B n} = {f n |n. A n} \<union> {f n |n. B n}
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
{?f1 n |n. ?A1 n \<or> ?B1 n} = {?f1 n |n. ?A1 n} \<union> {?f1 n |n. ?B1 n}

goal (1 subgoal):
 1. P (lfp (\<lambda>N. {0} \<union> {(n + 2) mod 6 |n. n \<in> N})) = P {0, 4, 2}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (lfp (\<lambda>N. {0} \<union> {(n + 2) mod 6 |n. n \<in> N})) = P {0, 4, 2}
[PROOF STEP]
apply (subst lfp_conv_while [where ?U = "{0, 1, 2, 3, 4, 5}"])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. mono (\<lambda>N. {0} \<union> {(n + 2) mod 6 |n. n \<in> N})
 2. finite {0, 1, 2, 3, 4, 5}
 3. {0} \<union> {(n + 2) mod 6 |n. n \<in> {0, 1, 2, 3, 4, 5}} = {0, 1, 2, 3, 4, 5}
 4. P (fst (while (\<lambda>(A, fA). A \<noteq> fA) (\<lambda>(A, fA). (fA, {0} \<union> {(n + 2) mod 6 |n. n \<in> fA})) ({}, {0} \<union> {(n + 2) mod 6 |n. n \<in> {}}))) = P {0, 4, 2}
[PROOF STEP]
apply (rule monoI)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y. x \<subseteq> y \<Longrightarrow> {0} \<union> {(n + 2) mod 6 |n. n \<in> x} \<subseteq> {0} \<union> {(n + 2) mod 6 |n. n \<in> y}
 2. finite {0, 1, 2, 3, 4, 5}
 3. {0} \<union> {(n + 2) mod 6 |n. n \<in> {0, 1, 2, 3, 4, 5}} = {0, 1, 2, 3, 4, 5}
 4. P (fst (while (\<lambda>(A, fA). A \<noteq> fA) (\<lambda>(A, fA). (fA, {0} \<union> {(n + 2) mod 6 |n. n \<in> fA})) ({}, {0} \<union> {(n + 2) mod 6 |n. n \<in> {}}))) = P {0, 4, 2}
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. finite {0, 1, 2, 3, 4, 5}
 2. {0} \<union> {(n + 2) mod 6 |n. n \<in> {0, 1, 2, 3, 4, 5}} = {0, 1, 2, 3, 4, 5}
 3. P (fst (while (\<lambda>(A, fA). A \<noteq> fA) (\<lambda>(A, fA). (fA, {0} \<union> {(n + 2) mod 6 |n. n \<in> fA})) ({}, {0} \<union> {(n + 2) mod 6 |n. n \<in> {}}))) = P {0, 4, 2}
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. {0} \<union> {(n + 2) mod 6 |n. n \<in> {0, 1, 2, 3, 4, 5}} = {0, 1, 2, 3, 4, 5}
 2. P (fst (while (\<lambda>(A, fA). A \<noteq> fA) (\<lambda>(A, fA). (fA, {0} \<union> {(n + 2) mod 6 |n. n \<in> fA})) ({}, {0} \<union> {(n + 2) mod 6 |n. n \<in> {}}))) = P {0, 4, 2}
[PROOF STEP]
apply (simp add: aux set_eq_subset)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (fst (while (\<lambda>(A, fA). A \<noteq> fA) (\<lambda>(A, fA). (fA, {0} \<union> {(n + 2) mod 6 |n. n \<in> fA})) ({}, {0} \<union> {(n + 2) mod 6 |n. n \<in> {}}))) = P {0, 4, 2}
[PROOF STEP]
txt \<open>The fixpoint computation is performed purely by rewriting:\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (fst (while (\<lambda>(A, fA). A \<noteq> fA) (\<lambda>(A, fA). (fA, {0} \<union> {(n + 2) mod 6 |n. n \<in> fA})) ({}, {0} \<union> {(n + 2) mod 6 |n. n \<in> {}}))) = P {0, 4, 2}
[PROOF STEP]
apply (simp add: while_unfold aux seteq del: subset_empty)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
P (lfp (\<lambda>N. {0} \<union> {(n + 2) mod 6 |n. n \<in> N})) = P {0, 4, 2}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma divisors_pos_funD: "divisors_pos_fun df \<Longrightarrow> x \<noteq> 0 \<Longrightarrow> d dvd x \<Longrightarrow> d > 0 \<Longrightarrow> d \<in> set (df x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>divisors_pos_fun df; x \<noteq> (0::'a); d dvd x; (0::'a) < d\<rbrakk> \<Longrightarrow> d \<in> set (df x)
[PROOF STEP]
unfolding divisors_pos_fun_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(\<forall>x. x \<noteq> (0::'a) \<longrightarrow> set (df x) = {d. d dvd x \<and> (0::'a) < d}) \<and> (\<forall>x. distinct (df x)); x \<noteq> (0::'a); d dvd x; (0::'a) < d\<rbrakk> \<Longrightarrow> d \<in> set (df x)
[PROOF STEP]
by auto


[STATEMENT]
lemma Min_elem : "finite (xs :: 'a set) \<Longrightarrow> xs \<noteq> {} \<Longrightarrow> \<exists> x \<in> xs . Min (image (f :: 'a \<Rightarrow> nat) xs) = f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite xs; xs \<noteq> {}\<rbrakk> \<Longrightarrow> \<exists>x\<in>xs. Min (f ` xs) = f x
[PROOF STEP]
by (metis (mono_tags, opaque_lifting) Min_in empty_is_image finite_imageI imageE)


[STATEMENT]
lemma not_exp_le_zero [simp]: "\<not> exp x \<le> 0"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> exp x \<le> 0
[PROOF STEP]
by (simp add: not_le)


[STATEMENT]
lemma nth_swap: "i < length xs \<Longrightarrow> j < length xs \<Longrightarrow>
    swap xs i j ! k = (if k = i then xs ! j else if k = j then xs ! i else xs ! k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < length xs; j < length xs\<rbrakk> \<Longrightarrow> swap xs i j ! k = (if k = i then xs ! j else if k = j then xs ! i else xs ! k)
[PROOF STEP]
by (auto simp: swap_def nth_list_update)


[STATEMENT]
lemma arctan_double': "\<bar>a::real\<bar> < 1 \<Longrightarrow> MACHIN_TAG 2 (arctan a) = arctan (2 * a / (1 - a*a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>a\<bar> < 1 \<Longrightarrow> MACHIN_TAG 2 (arctan a) = arctan (2 * a / (1 - a * a))
[PROOF STEP]
unfolding MACHIN_TAG_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>a\<bar> < 1 \<Longrightarrow> 2 * arctan a = arctan (2 * a / (1 - a * a))
[PROOF STEP]
by (simp add: arctan_double power2_eq_square)


[STATEMENT]
lemma (in prob_space)
  assumes "indep_var S X T Y"
  shows indep_var_rv1: "random_variable S X"
    and indep_var_rv2: "random_variable T Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. random_variable S X &&& random_variable T Y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. random_variable S X
 2. random_variable T Y
[PROOF STEP]
have "\<forall>i\<in>UNIV. random_variable (case_bool S T i) (case_bool X Y i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>UNIV. random_variable (case i of True \<Rightarrow> S | False \<Rightarrow> T) (case i of True \<Rightarrow> X | False \<Rightarrow> Y)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
indep_var S X T Y

goal (1 subgoal):
 1. \<forall>i\<in>UNIV. random_variable (case i of True \<Rightarrow> S | False \<Rightarrow> T) (case i of True \<Rightarrow> X | False \<Rightarrow> Y)
[PROOF STEP]
unfolding indep_var_def indep_vars_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>i\<in>UNIV. random_variable (case i of True \<Rightarrow> S | False \<Rightarrow> T) (case i of True \<Rightarrow> X | False \<Rightarrow> Y)) \<and> indep_sets (\<lambda>i. sigma_sets (space M) {(case i of True \<Rightarrow> X | False \<Rightarrow> Y) -` A \<inter> space M |A. A \<in> sets (case i of True \<Rightarrow> S | False \<Rightarrow> T)}) UNIV

goal (1 subgoal):
 1. \<forall>i\<in>UNIV. random_variable (case i of True \<Rightarrow> S | False \<Rightarrow> T) (case i of True \<Rightarrow> X | False \<Rightarrow> Y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i\<in>UNIV. random_variable (case i of True \<Rightarrow> S | False \<Rightarrow> T) (case i of True \<Rightarrow> X | False \<Rightarrow> Y)

goal (2 subgoals):
 1. random_variable S X
 2. random_variable T Y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i\<in>UNIV. random_variable (case i of True \<Rightarrow> S | False \<Rightarrow> T) (case i of True \<Rightarrow> X | False \<Rightarrow> Y)
[PROOF STEP]
show "random_variable S X" "random_variable T Y"
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>UNIV. random_variable (case i of True \<Rightarrow> S | False \<Rightarrow> T) (case i of True \<Rightarrow> X | False \<Rightarrow> Y)

goal (1 subgoal):
 1. random_variable S X &&& random_variable T Y
[PROOF STEP]
unfolding UNIV_bool
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>{False, True}. random_variable (case i of True \<Rightarrow> S | False \<Rightarrow> T) (case i of True \<Rightarrow> X | False \<Rightarrow> Y)

goal (1 subgoal):
 1. random_variable S X &&& random_variable T Y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
random_variable S X
random_variable T Y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lebesgue_integral_point_measure:
  fixes g :: "_ \<Rightarrow> real"
  assumes f: "finite {a\<in>A. 0 < f a \<and> g a \<noteq> 0}"
  shows "integral\<^sup>L (point_measure A f) g = (\<Sum>a|a\<in>A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (point_measure A (\<lambda>x. ennreal (f x))) g = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. integral\<^sup>L (point_measure A (\<lambda>x. ennreal (f x))) g = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)
[PROOF STEP]
have eq: "{a \<in> A. max 0 (f a) \<noteq> 0 \<and> g a \<noteq> 0} = {a\<in>A. 0 < f a \<and> g a \<noteq> 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a \<in> A. max 0 (f a) \<noteq> 0 \<and> g a \<noteq> 0} = {a \<in> A. 0 < f a \<and> g a \<noteq> 0}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{a \<in> A. max 0 (f a) \<noteq> 0 \<and> g a \<noteq> 0} = {a \<in> A. 0 < f a \<and> g a \<noteq> 0}

goal (1 subgoal):
 1. integral\<^sup>L (point_measure A (\<lambda>x. ennreal (f x))) g = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)
[PROOF STEP]
have *: "ennreal (f x) = ennreal (max 0 (f x))" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (f x) = ennreal (max 0 (f x))
[PROOF STEP]
by (cases "0 \<le> f x") (auto simp: max.absorb1 ennreal_neg)
[PROOF STATE]
proof (state)
this:
ennreal (f ?x) = ennreal (max 0 (f ?x))

goal (1 subgoal):
 1. integral\<^sup>L (point_measure A (\<lambda>x. ennreal (f x))) g = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (point_measure A (\<lambda>x. ennreal (f x))) g = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)
[PROOF STEP]
unfolding point_measure_def *
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (density (count_space A) (\<lambda>x. ennreal (max 0 (f x)))) g = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
finite {a \<in> A. 0 < f a \<and> g a \<noteq> 0}

goal (1 subgoal):
 1. integral\<^sup>L (density (count_space A) (\<lambda>x. ennreal (max 0 (f x)))) g = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)
[PROOF STEP]
apply (subst integral_real_density)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. finite {a \<in> A. 0 < f a \<and> g a \<noteq> 0} \<Longrightarrow> (\<lambda>x. max 0 (f x)) \<in> borel_measurable (count_space A)
 2. finite {a \<in> A. 0 < f a \<and> g a \<noteq> 0} \<Longrightarrow> AE x in count_space A. 0 \<le> max 0 (f x)
 3. finite {a \<in> A. 0 < f a \<and> g a \<noteq> 0} \<Longrightarrow> g \<in> borel_measurable (count_space A)
 4. finite {a \<in> A. 0 < f a \<and> g a \<noteq> 0} \<Longrightarrow> LINT x|count_space A. max 0 (f x) * g x = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)
[PROOF STEP]
apply (auto simp add: integral_real_density lebesgue_integral_count_space_finite_support eq
      intro!: sum.cong)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (point_measure A (\<lambda>x. ennreal (f x))) g = (\<Sum>a | a \<in> A \<and> 0 < f a \<and> g a \<noteq> 0. f a * g a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inter_image_empty_iff: "(X \<inter> {p. f p = x} = {}) \<longleftrightarrow> (x \<notin> f ` X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X \<inter> {p. f p = x} = {}) = (x \<notin> f ` X)
[PROOF STEP]
by auto


[STATEMENT]
lemma if_eq_is_pr3: "\<lbrakk> p1 \<in> PrimRec3; p2 \<in> PrimRec3; q1 \<in> PrimRec3; q2 \<in> PrimRec3\<rbrakk> \<Longrightarrow> (\<lambda> x y z. if (p1 x y z = p2 x y z) then (q1 x y z) else (q2 x y z)) \<in> PrimRec3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p1 \<in> PrimRec3; p2 \<in> PrimRec3; q1 \<in> PrimRec3; q2 \<in> PrimRec3\<rbrakk> \<Longrightarrow> (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>p1 \<in> PrimRec3; p2 \<in> PrimRec3; q1 \<in> PrimRec3; q2 \<in> PrimRec3\<rbrakk> \<Longrightarrow> (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
have S1: "(\<lambda> x y z. if (p1 x y z = p2 x y z) then (q1 x y z) else (q2 x y z)) = (\<lambda> x y z. if (abs_of_diff (p1 x y z) (p2 x y z) = 0) then (q1 x y z) else (q2 x y z))" (is "?L = ?R")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) = (\<lambda>x y z. if abs_of_diff (p1 x y z) (p2 x y z) = 0 then q1 x y z else q2 x y z)
[PROOF STEP]
by (simp add: abs_of_diff_eq)
[PROOF STATE]
proof (state)
this:
(\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) = (\<lambda>x y z. if abs_of_diff (p1 x y z) (p2 x y z) = 0 then q1 x y z else q2 x y z)

goal (1 subgoal):
 1. \<lbrakk>p1 \<in> PrimRec3; p2 \<in> PrimRec3; q1 \<in> PrimRec3; q2 \<in> PrimRec3\<rbrakk> \<Longrightarrow> (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
assume A1: "p1 \<in> PrimRec3" and A2: "p2 \<in> PrimRec3"
[PROOF STATE]
proof (state)
this:
p1 \<in> PrimRec3
p2 \<in> PrimRec3

goal (1 subgoal):
 1. \<lbrakk>p1 \<in> PrimRec3; p2 \<in> PrimRec3; q1 \<in> PrimRec3; q2 \<in> PrimRec3\<rbrakk> \<Longrightarrow> (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
with abs_of_diff_is_pr
[PROOF STATE]
proof (chain)
picking this:
abs_of_diff \<in> PrimRec2
p1 \<in> PrimRec3
p2 \<in> PrimRec3
[PROOF STEP]
have S2: "(\<lambda> x y z. abs_of_diff (p1 x y z) (p2 x y z)) \<in> PrimRec3"
[PROOF STATE]
proof (prove)
using this:
abs_of_diff \<in> PrimRec2
p1 \<in> PrimRec3
p2 \<in> PrimRec3

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

goal (1 subgoal):
 1. \<lbrakk>p1 \<in> PrimRec3; p2 \<in> PrimRec3; q1 \<in> PrimRec3; q2 \<in> PrimRec3\<rbrakk> \<Longrightarrow> (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
assume "q1 \<in> PrimRec3" and "q2 \<in> PrimRec3"
[PROOF STATE]
proof (state)
this:
q1 \<in> PrimRec3
q2 \<in> PrimRec3

goal (1 subgoal):
 1. \<lbrakk>p1 \<in> PrimRec3; p2 \<in> PrimRec3; q1 \<in> PrimRec3; q2 \<in> PrimRec3\<rbrakk> \<Longrightarrow> (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
with S2
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x y z. abs_of_diff (p1 x y z) (p2 x y z)) \<in> PrimRec3
q1 \<in> PrimRec3
q2 \<in> PrimRec3
[PROOF STEP]
have "?R \<in> PrimRec3"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x y z. abs_of_diff (p1 x y z) (p2 x y z)) \<in> PrimRec3
q1 \<in> PrimRec3
q2 \<in> PrimRec3

goal (1 subgoal):
 1. (\<lambda>x y z. if abs_of_diff (p1 x y z) (p2 x y z) = 0 then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
by (rule if_is_pr3)
[PROOF STATE]
proof (state)
this:
(\<lambda>x y z. if abs_of_diff (p1 x y z) (p2 x y z) = 0 then q1 x y z else q2 x y z) \<in> PrimRec3

goal (1 subgoal):
 1. \<lbrakk>p1 \<in> PrimRec3; p2 \<in> PrimRec3; q1 \<in> PrimRec3; q2 \<in> PrimRec3\<rbrakk> \<Longrightarrow> (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
with S1
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) = (\<lambda>x y z. if abs_of_diff (p1 x y z) (p2 x y z) = 0 then q1 x y z else q2 x y z)
(\<lambda>x y z. if abs_of_diff (p1 x y z) (p2 x y z) = 0 then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) = (\<lambda>x y z. if abs_of_diff (p1 x y z) (p2 x y z) = 0 then q1 x y z else q2 x y z)
(\<lambda>x y z. if abs_of_diff (p1 x y z) (p2 x y z) = 0 then q1 x y z else q2 x y z) \<in> PrimRec3

goal (1 subgoal):
 1. (\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x y z. if p1 x y z = p2 x y z then q1 x y z else q2 x y z) \<in> PrimRec3

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma content_prod_mset:
  fixes A :: "'a :: {factorial_semiring, semiring_Gcd, normalization_semidom_multiplicative}
      poly multiset"
  shows "content (prod_mset A) = prod_mset (image_mset content A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content (\<Prod>\<^sub># A) = \<Prod>\<^sub># (image_mset content A)
[PROOF STEP]
by (induction A) (simp_all add: content_mult mult_ac)


[STATEMENT]
lemma (in Corps) invf_one:"1\<^sub>r \<noteq> \<zero>  \<Longrightarrow> invf K (1\<^sub>r) = 1\<^sub>r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1\<^sub>r \<noteq> \<zero> \<Longrightarrow> 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> = 1\<^sub>r
[PROOF STEP]
apply (cut_tac field_is_ring)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K\<rbrakk> \<Longrightarrow> 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> = 1\<^sub>r
[PROOF STEP]
apply (frule_tac Ring.ring_one)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K; 1\<^sub>r \<in> carrier K\<rbrakk> \<Longrightarrow> 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> = 1\<^sub>r
[PROOF STEP]
apply (cut_tac invf_closed1 [of "1\<^sub>r"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K; 1\<^sub>r \<in> carrier K; 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> \<in> carrier K - {\<zero>}\<rbrakk> \<Longrightarrow> 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> = 1\<^sub>r
 2. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K; 1\<^sub>r \<in> carrier K\<rbrakk> \<Longrightarrow> 1\<^sub>r \<in> carrier K - {\<zero>}
[PROOF STEP]
apply (cut_tac linvf[of "1\<^sub>r"])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K; 1\<^sub>r \<in> carrier K; 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> \<in> carrier K - {\<zero>}; 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> \<cdot>\<^sub>r 1\<^sub>r = 1\<^sub>r\<rbrakk> \<Longrightarrow> 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> = 1\<^sub>r
 2. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K; 1\<^sub>r \<in> carrier K; 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> \<in> carrier K - {\<zero>}\<rbrakk> \<Longrightarrow> 1\<^sub>r \<in> carrier K - {\<zero>}
 3. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K; 1\<^sub>r \<in> carrier K\<rbrakk> \<Longrightarrow> 1\<^sub>r \<in> carrier K - {\<zero>}
[PROOF STEP]
apply (simp add:Ring.ring_r_one[of "K"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K; 1\<^sub>r \<in> carrier K; 1\<^sub>r\<^bsup>\<hyphen> K\<^esup> \<in> carrier K - {\<zero>}\<rbrakk> \<Longrightarrow> 1\<^sub>r \<in> carrier K - {\<zero>}
 2. \<lbrakk>1\<^sub>r \<noteq> \<zero>; Ring K; 1\<^sub>r \<in> carrier K\<rbrakk> \<Longrightarrow> 1\<^sub>r \<in> carrier K - {\<zero>}
[PROOF STEP]
apply simp+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma fls_inverse_X_inv_power':
  assumes "inverse 1 = (1::'a::{semiring_1,uminus,inverse})"
  shows   "inverse ((fls_X_inv ^ n)::'a fls) = fls_X ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (fls_X_inv ^ n) = fls_X ^ n
[PROOF STEP]
using   fls_lr_inverse_X_inv_power'(2)[of n 1]
[PROOF STATE]
proof (prove)
using this:
fls_right_inverse (fls_X_inv ^ n) (1::?'b1) = fls_const (1::?'b1) * fls_X ^ n

goal (1 subgoal):
 1. inverse (fls_X_inv ^ n) = fls_X ^ n
[PROOF STEP]
by      (simp add: fls_inverse_def' assms)


[STATEMENT]
theorem set_of_insrt:
  "set_of (insrt\<^sub>0 x t) = insert x (set_of t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_of (insrt\<^sub>0 x t) = insert x (set_of t)
[PROOF STEP]
by (induct t) (auto simp add:set_of_l_bal set_of_r_bal Let_def)


[STATEMENT]
lemma ordIso_Sigma_cong1:
assumes "\<forall>i \<in> I. p i =o r i"
shows "|SIGMA i : I. Field(p i)| =o |SIGMA i : I. Field(r i)|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |SIGMA i:I. Field (p i)| =o |SIGMA i:I. Field (r i)|
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>I. p i =o r i

goal (1 subgoal):
 1. |SIGMA i:I. Field (p i)| =o |SIGMA i:I. Field (r i)|
[PROOF STEP]
by (auto simp add: card_of_Sigma_cong1)


[STATEMENT]
lemma map_replicate_False:
  "n = length xs \<Longrightarrow> map (\<lambda>(x,y). x \<and> y)
    (zip xs (replicate n False)) = replicate n False"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n = length xs \<Longrightarrow> map2 (\<and>) xs (replicate n False) = replicate n False
[PROOF STEP]
by (induct xs arbitrary: n) auto


[STATEMENT]
lemma simplex:
    "n simplex S \<longleftrightarrow> (\<exists>C. finite C \<and>
                       \<not> affine_dependent C \<and>
                       int(card C) = n + 1 \<and>
                       S = convex hull C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n simplex S) = (\<exists>C. finite C \<and> \<not> affine_dependent C \<and> int (card C) = n + 1 \<and> S = convex hull C)
[PROOF STEP]
by (auto simp add: simplex_def intro: aff_independent_finite)


[STATEMENT]
lemma filterlim_uminus_at_bot: "(LIM x F. f x :> at_bot) \<longleftrightarrow> (LIM x F. - (f x) :: real :> at_top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim f at_bot F = (LIM x F. - f x :> at_top)
[PROOF STEP]
unfolding filterlim_uminus_at_top
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim f at_bot F = (LIM x F. - (- f x) :> at_bot)
[PROOF STEP]
by simp


[STATEMENT]
lemma ceros_of_boolean_input_in_set:
  assumes s: "\<sigma> \<in> simplices"
  shows "ceros_of_boolean_input (vec n (\<lambda>i. i \<notin> \<sigma>)) = \<sigma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ceros_of_boolean_input (vec n (\<lambda>i. i \<notin> \<sigma>)) = \<sigma>
[PROOF STEP]
unfolding ceros_of_boolean_input_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. x < dim_vec (vec n (\<lambda>i. i \<notin> \<sigma>)) \<and> vec n (\<lambda>i. i \<notin> \<sigma>) $ x = False} = \<sigma>
[PROOF STEP]
using s
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplices

goal (1 subgoal):
 1. {x. x < dim_vec (vec n (\<lambda>i. i \<notin> \<sigma>)) \<and> vec n (\<lambda>i. i \<notin> \<sigma>) $ x = False} = \<sigma>
[PROOF STEP]
unfolding simplices_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> Pow {0..<n}

goal (1 subgoal):
 1. {x. x < dim_vec (vec n (\<lambda>i. i \<notin> \<sigma>)) \<and> vec n (\<lambda>i. i \<notin> \<sigma>) $ x = False} = \<sigma>
[PROOF STEP]
by auto


[STATEMENT]
lemma suminf_binaryset_eq:
  fixes f :: "'a set \<Rightarrow> 'b::{comm_monoid_add, t2_space}"
  shows "f {} = 0 \<Longrightarrow> (\<Sum>n. f (binaryset A B n)) = f A + f B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f {} = (0::'b) \<Longrightarrow> (\<Sum>n. f (binaryset A B n)) = f A + f B
[PROOF STEP]
by (metis binaryset_sums sums_unique)


[STATEMENT]
lemma card_set_prefixes [simp]: "card (set (prefixes xs)) = Suc (length xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (set (prefixes xs)) = Suc (length xs)
[PROOF STEP]
by (subst distinct_card) auto


[STATEMENT]
lemma Infinitesimal_approx_minus: "x - y \<in> Infinitesimal \<longleftrightarrow> x \<approx> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x - y \<in> Infinitesimal) = (x \<approx> y)
[PROOF STEP]
by (simp add: approx_minus_iff [symmetric] mem_infmal_iff)


[STATEMENT]
lemma numeral_le_ceiling [simp]: "numeral v \<le> \<lceil>x\<rceil> \<longleftrightarrow> numeral v - 1 < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (numeral v \<le> \<lceil>x\<rceil>) = (numeral v - (1::'a) < x)
[PROOF STEP]
by (simp add: le_ceiling_iff)


[STATEMENT]
lemma quotient_of_number [simp]:
  "quotient_of 0 = (0, 1)"
  "quotient_of 1 = (1, 1)"
  "quotient_of (numeral k) = (numeral k, 1)"
  "quotient_of (- 1) = (- 1, 1)"
  "quotient_of (- numeral k) = (- numeral k, 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (quotient_of 0 = (0, 1) &&& quotient_of 1 = (1, 1)) &&& quotient_of (numeral k) = (numeral k, 1) &&& quotient_of (- 1) = (- 1, 1) &&& quotient_of (- numeral k) = (- numeral k, 1)
[PROOF STEP]
by (simp_all add: rat_number_expand quotient_of_Fract)


[STATEMENT]
lemma eucl_of_list_prod:
  shows "eucl_of_list xs = (eucl_of_list (take DIM('b) xs)::'b::executable_euclidean_space,
    eucl_of_list (drop DIM('b) xs)::'c::executable_euclidean_space)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eucl_of_list xs = (eucl_of_list (take DIM('b) xs), eucl_of_list (drop DIM('b) xs))
[PROOF STEP]
using snd_eucl_of_list_prod[of xs, where 'b='b and 'c='c]
[PROOF STATE]
proof (prove)
using this:
snd (eucl_of_list xs) = eucl_of_list (drop DIM('b) xs)

goal (1 subgoal):
 1. eucl_of_list xs = (eucl_of_list (take DIM('b) xs), eucl_of_list (drop DIM('b) xs))
[PROOF STEP]
using fst_eucl_of_list_prod[of xs, where 'b='b and 'a='c]
[PROOF STATE]
proof (prove)
using this:
snd (eucl_of_list xs) = eucl_of_list (drop DIM('b) xs)
fst (eucl_of_list xs) = eucl_of_list (take DIM('b) xs)

goal (1 subgoal):
 1. eucl_of_list xs = (eucl_of_list (take DIM('b) xs), eucl_of_list (drop DIM('b) xs))
[PROOF STEP]
by (auto simp del: snd_eucl_of_list_prod fst_eucl_of_list_prod simp add: prod_eq_iff)