[STATEMENT]
lemma inverse_diff_inverse:
  fixes a b :: "'a::division_ring"
  assumes "a \<noteq> 0" and "b \<noteq> 0"
  shows "inverse a - inverse b = - (inverse a * (a - b) * inverse b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse a - inverse b = - (inverse a * (a - b) * inverse b)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a)
b \<noteq> (0::'a)

goal (1 subgoal):
 1. inverse a - inverse b = - (inverse a * (a - b) * inverse b)
[PROOF STEP]
by (simp add: algebra_simps)


[STATEMENT]
lemma "a \<in> {x. P x} \<Longrightarrow> P a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> {x. P x} \<Longrightarrow> P a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<in> {x. P x} \<Longrightarrow> P a
[PROOF STEP]
assume "a \<in> {x. P x}"
[PROOF STATE]
proof (state)
this:
a \<in> {x. P x}

goal (1 subgoal):
 1. a \<in> {x. P x} \<Longrightarrow> P a
[PROOF STEP]
thus "P a"
[PROOF STATE]
proof (prove)
using this:
a \<in> {x. P x}

goal (1 subgoal):
 1. P a
[PROOF STEP]
by (metis mem_Collect_eq)
[PROOF STATE]
proof (state)
this:
P a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma signed_arith_sint:
  "((- (2 ^ (size a - 1)) \<le> (sint a + sint b)) \<and> (sint a + sint b \<le> (2 ^ (size a - 1) - 1)))
    \<Longrightarrow> sint (a + b) = (sint a + sint b)"
  "((- (2 ^ (size a - 1)) \<le> (sint a - sint b)) \<and> (sint a - sint b \<le> (2 ^ (size a - 1) - 1)))
    \<Longrightarrow> sint (a - b) = (sint a - sint b)"
  "((- (2 ^ (size a - 1)) \<le> (- sint a)) \<and> (- sint a) \<le> (2 ^ (size a - 1) - 1))
    \<Longrightarrow> sint (- a) = (- sint a)"
  "((- (2 ^ (size a - 1)) \<le> (sint a * sint b)) \<and> (sint a * sint b \<le> (2 ^ (size a - 1) - 1)))
    \<Longrightarrow> sint (a * b) = (sint a * sint b)"
  "((- (2 ^ (size a - 1)) \<le> (sint a sdiv sint b)) \<and> (sint a sdiv sint b \<le> (2 ^ (size a - 1) - 1)))
    \<Longrightarrow> sint (a sdiv b) = (sint a sdiv sint b)"
  "((- (2 ^ (size a - 1)) \<le> (sint a smod sint b)) \<and> (sint a smod sint b \<le> (2 ^ (size a - 1) - 1)))
    \<Longrightarrow> sint (a smod b) = (sint a smod sint b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((- (2 ^ (size a - 1)) \<le> sint a + sint b \<and> sint a + sint b \<le> 2 ^ (size a - 1) - 1 \<Longrightarrow> sint (a + b) = sint a + sint b) &&& (- (2 ^ (size a - 1)) \<le> sint a - sint b \<and> sint a - sint b \<le> 2 ^ (size a - 1) - 1 \<Longrightarrow> sint (a - b) = sint a - sint b) &&& (- (2 ^ (size a - 1)) \<le> - sint a \<and> - sint a \<le> 2 ^ (size a - 1) - 1 \<Longrightarrow> sint (- a) = - sint a)) &&& (- (2 ^ (size a - 1)) \<le> sint a * sint b \<and> sint a * sint b \<le> 2 ^ (size a - 1) - 1 \<Longrightarrow> sint (a * b) = sint a * sint b) &&& (- (2 ^ (size a - 1)) \<le> sint a sdiv sint b \<and> sint a sdiv sint b \<le> 2 ^ (size a - 1) - 1 \<Longrightarrow> sint (a sdiv b) = sint a sdiv sint b) &&& (- (2 ^ (size a - 1)) \<le> sint a smod sint b \<and> sint a smod sint b \<le> 2 ^ (size a - 1) - 1 \<Longrightarrow> sint (a smod b) = sint a smod sint b)
[PROOF STEP]
by (subst (asm) signed_arith_ineq_checks_to_eq; simp)+


[STATEMENT]
lemma degree_less_sum':
  assumes "MPoly_Type.degree (p::real mpoly) var = n"
  assumes "MPoly_Type.degree (q::real mpoly) var = m"
  assumes "n < m"
  shows "MPoly_Type.degree (p + q) var = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.degree (p + q) var = m
[PROOF STEP]
using degree_less_sum[OF assms(2) assms(1) assms(3)]
[PROOF STATE]
proof (prove)
using this:
MPoly_Type.degree (q + p) var = m

goal (1 subgoal):
 1. MPoly_Type.degree (p + q) var = m
[PROOF STEP]
by (simp add: add.commute)


[STATEMENT]
lemma gkernTr3:"\<lbrakk>Group F; Group G; f \<in> gHom F G ; x \<in> gker\<^bsub>F,G\<^esub> f\<rbrakk> \<Longrightarrow>
                    (\<rho>\<^bsub>F\<^esub> x) \<in> gker\<^bsub>F,G\<^esub> f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; x \<in> gker\<^bsub>F,G\<^esub> f\<rbrakk> \<Longrightarrow> \<rho>\<^bsub>F\<^esub> x \<in> gker\<^bsub>F,G\<^esub> f
[PROOF STEP]
apply (simp add:gkernel_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; x \<in> carrier F \<and> f x = \<one>\<^bsub>G\<^esub>\<rbrakk> \<Longrightarrow> \<rho>\<^bsub>F\<^esub> x \<in> carrier F \<and> f (\<rho>\<^bsub>F\<^esub> x) = \<one>\<^bsub>G\<^esub>
[PROOF STEP]
(* thm ghom_inv_inv [of "F" "G" "f" "x"] *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; x \<in> carrier F \<and> f x = \<one>\<^bsub>G\<^esub>\<rbrakk> \<Longrightarrow> \<rho>\<^bsub>F\<^esub> x \<in> carrier F \<and> f (\<rho>\<^bsub>F\<^esub> x) = \<one>\<^bsub>G\<^esub>
[PROOF STEP]
apply (simp add:ghom_inv_inv [of "F" "G" "f" "x"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; x \<in> carrier F \<and> f x = \<one>\<^bsub>G\<^esub>\<rbrakk> \<Longrightarrow> \<rho>\<^bsub>F\<^esub> x \<in> carrier F \<and> \<rho>\<^bsub>G\<^esub> \<one>\<^bsub>G\<^esub> = \<one>\<^bsub>G\<^esub>
[PROOF STEP]
apply (simp add:Group.i_closed)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; x \<in> carrier F \<and> f x = \<one>\<^bsub>G\<^esub>\<rbrakk> \<Longrightarrow> \<rho>\<^bsub>G\<^esub> \<one>\<^bsub>G\<^esub> = \<one>\<^bsub>G\<^esub>
[PROOF STEP]
apply (simp add:Group.i_one)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma pos_minus_divide_le_eq [field_simps]: "0 < c \<Longrightarrow> - (b / c) \<le> a \<longleftrightarrow> - b \<le> a * c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < c \<Longrightarrow> (- (b / c) \<le> a) = (- b \<le> a * c)
[PROOF STEP]
unfolding minus_divide_left
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < c \<Longrightarrow> (- b / c \<le> a) = (- b \<le> a * c)
[PROOF STEP]
by (rule pos_divide_le_eq)


[STATEMENT]
lemma rel_interior_convex_linear_image:
  fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"
  assumes "linear f"
    and "convex S"
  shows "f ` (rel_interior S) = rel_interior (f ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
proof (cases "S = {}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. S = {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
 2. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
S = {}

goal (2 subgoals):
 1. S = {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
 2. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
S = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
S = {}

goal (1 subgoal):
 1. f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
S = {}
linear f
convex S

goal (1 subgoal):
 1. f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` rel_interior S = rel_interior (f ` S)

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
S \<noteq> {}

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
interpret linear f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linear f
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
have *: "f ` (rel_interior S) \<subseteq> f ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` rel_interior S \<subseteq> f ` S
[PROOF STEP]
unfolding image_mono
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` rel_interior S \<subseteq> f ` S
[PROOF STEP]
using rel_interior_subset
[PROOF STATE]
proof (prove)
using this:
rel_interior ?S \<subseteq> ?S

goal (1 subgoal):
 1. f ` rel_interior S \<subseteq> f ` S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` rel_interior S \<subseteq> f ` S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
have "f ` S \<subseteq> f ` (closure S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` S \<subseteq> f ` closure S
[PROOF STEP]
unfolding image_mono
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` S \<subseteq> f ` closure S
[PROOF STEP]
using closure_subset
[PROOF STATE]
proof (prove)
using this:
?S \<subseteq> closure ?S

goal (1 subgoal):
 1. f ` S \<subseteq> f ` closure S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` S \<subseteq> f ` closure S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f ` S \<subseteq> f ` closure S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
have "\<dots> = f ` (closure (rel_interior S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` closure S = f ` closure (rel_interior S)
[PROOF STEP]
using convex_closure_rel_interior assms
[PROOF STATE]
proof (prove)
using this:
convex ?S \<Longrightarrow> closure (rel_interior ?S) = closure ?S
linear f
convex S

goal (1 subgoal):
 1. f ` closure S = f ` closure (rel_interior S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` closure S = f ` closure (rel_interior S)

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f ` closure S = f ` closure (rel_interior S)

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
have "\<dots> \<subseteq> closure (f ` (rel_interior S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` closure (rel_interior S) \<subseteq> closure (f ` rel_interior S)
[PROOF STEP]
using closure_linear_image_subset assms
[PROOF STATE]
proof (prove)
using this:
linear ?f \<Longrightarrow> ?f ` closure ?S \<subseteq> closure (?f ` ?S)
linear f
convex S

goal (1 subgoal):
 1. f ` closure (rel_interior S) \<subseteq> closure (f ` rel_interior S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` closure (rel_interior S) \<subseteq> closure (f ` rel_interior S)

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
f ` S \<subseteq> closure (f ` rel_interior S)
[PROOF STEP]
have "closure (f ` S) = closure (f ` rel_interior S)"
[PROOF STATE]
proof (prove)
using this:
f ` S \<subseteq> closure (f ` rel_interior S)

goal (1 subgoal):
 1. closure (f ` S) = closure (f ` rel_interior S)
[PROOF STEP]
using closure_mono[of "f ` S" "closure (f ` rel_interior S)"] closure_closure
      closure_mono[of "f ` rel_interior S" "f ` S"] *
[PROOF STATE]
proof (prove)
using this:
f ` S \<subseteq> closure (f ` rel_interior S)
f ` S \<subseteq> closure (f ` rel_interior S) \<Longrightarrow> closure (f ` S) \<subseteq> closure (closure (f ` rel_interior S))
closure (closure ?S) = closure ?S
f ` rel_interior S \<subseteq> f ` S \<Longrightarrow> closure (f ` rel_interior S) \<subseteq> closure (f ` S)
f ` rel_interior S \<subseteq> f ` S

goal (1 subgoal):
 1. closure (f ` S) = closure (f ` rel_interior S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
closure (f ` S) = closure (f ` rel_interior S)

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
closure (f ` S) = closure (f ` rel_interior S)
[PROOF STEP]
have "rel_interior (f ` S) = rel_interior (f ` rel_interior S)"
[PROOF STATE]
proof (prove)
using this:
closure (f ` S) = closure (f ` rel_interior S)

goal (1 subgoal):
 1. rel_interior (f ` S) = rel_interior (f ` rel_interior S)
[PROOF STEP]
using assms convex_rel_interior
      linear_conv_bounded_linear[of f] convex_linear_image[of _ S]
      convex_linear_image[of _ "rel_interior S"]
      closure_eq_rel_interior_eq[of "f ` S" "f ` rel_interior S"]
[PROOF STATE]
proof (prove)
using this:
closure (f ` S) = closure (f ` rel_interior S)
linear f
convex S
convex ?S \<Longrightarrow> convex (rel_interior ?S)
linear f = bounded_linear f
\<lbrakk>linear ?f; convex S\<rbrakk> \<Longrightarrow> convex (?f ` S)
\<lbrakk>linear ?f; convex (rel_interior S)\<rbrakk> \<Longrightarrow> convex (?f ` rel_interior S)
\<lbrakk>convex (f ` S); convex (f ` rel_interior S)\<rbrakk> \<Longrightarrow> (closure (f ` S) = closure (f ` rel_interior S)) = (rel_interior (f ` S) = rel_interior (f ` rel_interior S))

goal (1 subgoal):
 1. rel_interior (f ` S) = rel_interior (f ` rel_interior S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rel_interior (f ` S) = rel_interior (f ` rel_interior S)

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
rel_interior (f ` S) = rel_interior (f ` rel_interior S)
[PROOF STEP]
have "rel_interior (f ` S) \<subseteq> f ` rel_interior S"
[PROOF STATE]
proof (prove)
using this:
rel_interior (f ` S) = rel_interior (f ` rel_interior S)

goal (1 subgoal):
 1. rel_interior (f ` S) \<subseteq> f ` rel_interior S
[PROOF STEP]
using rel_interior_subset
[PROOF STATE]
proof (prove)
using this:
rel_interior (f ` S) = rel_interior (f ` rel_interior S)
rel_interior ?S \<subseteq> ?S

goal (1 subgoal):
 1. rel_interior (f ` S) \<subseteq> f ` rel_interior S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rel_interior (f ` S) \<subseteq> f ` rel_interior S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
rel_interior (f ` S) \<subseteq> f ` rel_interior S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
rel_interior (f ` S) \<subseteq> f ` rel_interior S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
fix z
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
assume "z \<in> f ` rel_interior S"
[PROOF STATE]
proof (state)
this:
z \<in> f ` rel_interior S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<in> f ` rel_interior S
[PROOF STEP]
obtain z1 where z1: "z1 \<in> rel_interior S" "f z1 = z"
[PROOF STATE]
proof (prove)
using this:
z \<in> f ` rel_interior S

goal (1 subgoal):
 1. (\<And>z1. \<lbrakk>z1 \<in> rel_interior S; f z1 = z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z1 \<in> rel_interior S
f z1 = z

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
z1 \<in> rel_interior S
f z1 = z

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
assume "x \<in> f ` S"
[PROOF STATE]
proof (state)
this:
x \<in> f ` S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> f ` S
[PROOF STEP]
obtain x1 where x1: "x1 \<in> S" "f x1 = x"
[PROOF STATE]
proof (prove)
using this:
x \<in> f ` S

goal (1 subgoal):
 1. (\<And>x1. \<lbrakk>x1 \<in> S; f x1 = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x1 \<in> S
f x1 = x

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x1 \<in> S
f x1 = x
[PROOF STEP]
obtain e where e: "e > 1" "(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S"
[PROOF STATE]
proof (prove)
using this:
x1 \<in> S
f x1 = x

goal (1 subgoal):
 1. (\<And>e. \<lbrakk>1 < e; (1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using convex_rel_interior_iff[of S z1] \<open>convex S\<close> x1 z1
[PROOF STATE]
proof (prove)
using this:
x1 \<in> S
f x1 = x
\<lbrakk>convex S; S \<noteq> {}\<rbrakk> \<Longrightarrow> (z1 \<in> rel_interior S) = (\<forall>x\<in>S. \<exists>e>1. (1 - e) *\<^sub>R x + e *\<^sub>R z1 \<in> S)
convex S
x1 \<in> S
f x1 = x
z1 \<in> rel_interior S
f z1 = z

goal (1 subgoal):
 1. (\<And>e. \<lbrakk>1 < e; (1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
1 < e
(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
1 < e
(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
have "f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) = (1 - e) *\<^sub>R x + e *\<^sub>R z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) = (1 - e) *\<^sub>R x + e *\<^sub>R z
[PROOF STEP]
using x1 z1
[PROOF STATE]
proof (prove)
using this:
x1 \<in> S
f x1 = x
z1 \<in> rel_interior S
f z1 = z

goal (1 subgoal):
 1. f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) = (1 - e) *\<^sub>R x + e *\<^sub>R z
[PROOF STEP]
by (simp add: linear_add linear_scale \<open>linear f\<close>)
[PROOF STATE]
proof (state)
this:
f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) = (1 - e) *\<^sub>R x + e *\<^sub>R z

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
1 < e
(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S
f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) = (1 - e) *\<^sub>R x + e *\<^sub>R z
[PROOF STEP]
have "(1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S"
[PROOF STATE]
proof (prove)
using this:
1 < e
(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S
f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) = (1 - e) *\<^sub>R x + e *\<^sub>R z

goal (1 subgoal):
 1. (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S
[PROOF STEP]
using imageI[of "(1 - e) *\<^sub>R x1 + e *\<^sub>R z1" S f]
[PROOF STATE]
proof (prove)
using this:
1 < e
(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S
f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) = (1 - e) *\<^sub>R x + e *\<^sub>R z
(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S \<Longrightarrow> f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) \<in> f ` S

goal (1 subgoal):
 1. (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S
[PROOF STEP]
have "\<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S"
[PROOF STATE]
proof (prove)
using this:
(1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S

goal (1 subgoal):
 1. \<exists>e>1. (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S
[PROOF STEP]
using e
[PROOF STATE]
proof (prove)
using this:
(1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S
1 < e
(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S

goal (1 subgoal):
 1. \<exists>e>1. (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>e>1. (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x2 \<in> f ` S \<Longrightarrow> \<exists>e>1. (1 - e) *\<^sub>R ?x2 + e *\<^sub>R z \<in> f ` S

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x2 \<in> f ` S \<Longrightarrow> \<exists>e>1. (1 - e) *\<^sub>R ?x2 + e *\<^sub>R z \<in> f ` S
[PROOF STEP]
have "z \<in> rel_interior (f ` S)"
[PROOF STATE]
proof (prove)
using this:
?x2 \<in> f ` S \<Longrightarrow> \<exists>e>1. (1 - e) *\<^sub>R ?x2 + e *\<^sub>R z \<in> f ` S

goal (1 subgoal):
 1. z \<in> rel_interior (f ` S)
[PROOF STEP]
using convex_rel_interior_iff[of "f ` S" z] \<open>convex S\<close> \<open>linear f\<close>
        \<open>S \<noteq> {}\<close> convex_linear_image[of f S]  linear_conv_bounded_linear[of f]
[PROOF STATE]
proof (prove)
using this:
?x2 \<in> f ` S \<Longrightarrow> \<exists>e>1. (1 - e) *\<^sub>R ?x2 + e *\<^sub>R z \<in> f ` S
\<lbrakk>convex (f ` S); f ` S \<noteq> {}\<rbrakk> \<Longrightarrow> (z \<in> rel_interior (f ` S)) = (\<forall>x\<in>f ` S. \<exists>e>1. (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S)
convex S
linear f
S \<noteq> {}
\<lbrakk>linear f; convex S\<rbrakk> \<Longrightarrow> convex (f ` S)
linear f = bounded_linear f

goal (1 subgoal):
 1. z \<in> rel_interior (f ` S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> rel_interior (f ` S)

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?z2 \<in> f ` rel_interior S \<Longrightarrow> ?z2 \<in> rel_interior (f ` S)

goal (1 subgoal):
 1. S \<noteq> {} \<Longrightarrow> f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
rel_interior (f ` S) \<subseteq> f ` rel_interior S
?z2 \<in> f ` rel_interior S \<Longrightarrow> ?z2 \<in> rel_interior (f ` S)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
rel_interior (f ` S) \<subseteq> f ` rel_interior S
?z2 \<in> f ` rel_interior S \<Longrightarrow> ?z2 \<in> rel_interior (f ` S)

goal (1 subgoal):
 1. f ` rel_interior S = rel_interior (f ` S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` rel_interior S = rel_interior (f ` S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma list_all3_mapD: "list_all3 P (map f xs) (map g ys) (map h zs) \<Longrightarrow>
  list_all3 (\<lambda>x y z. P (f x) (g y) (h z)) xs ys zs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all3 P (map f xs) (map g ys) (map h zs) \<Longrightarrow> list_all3 (\<lambda>x y z. P (f x) (g y) (h z)) xs ys zs
[PROOF STEP]
by (induct "map f xs" "map g ys" "map h zs" arbitrary: xs ys zs rule: list_all3.induct)
    (auto intro: list_all3.intros)


[STATEMENT]
lemma permutesE:
  assumes "p permutes S"
  obtains "bij p" "\<forall>x. x \<notin> S \<longrightarrow> p x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lbrakk>bij p; \<forall>x. x \<notin> S \<longrightarrow> p x = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
p permutes S

goal (1 subgoal):
 1. (\<lbrakk>bij p; \<forall>x. x \<notin> S \<longrightarrow> p x = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (simp add: permutes_def permutes_imp_bij')


[STATEMENT]
lemma ttree_contI:
  assumes  "\<And> S. f (Either S) = Either (f ` S)"
  shows "cont f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cont f
[PROOF STEP]
proof(rule contI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Y. chain Y \<Longrightarrow> range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)
[PROOF STEP]
fix Y :: "nat \<Rightarrow> 'a ttree"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Y. chain Y \<Longrightarrow> range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)
[PROOF STEP]
have "range (\<lambda>i. f (Y i)) = f ` range Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (\<lambda>i. f (Y i)) = f ` range Y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
range (\<lambda>i. f (Y i)) = f ` range Y

goal (1 subgoal):
 1. \<And>Y. chain Y \<Longrightarrow> range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
range (\<lambda>i. f (Y i)) = f ` range Y

goal (1 subgoal):
 1. \<And>Y. chain Y \<Longrightarrow> range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)
[PROOF STEP]
have "Either \<dots> = f (Either (range Y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Either (f ` range Y) = f (Either (range Y))
[PROOF STEP]
unfolding assms(1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Either (f ` range Y) = Either (f ` range Y)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
Either (f ` range Y) = f (Either (range Y))

goal (1 subgoal):
 1. \<And>Y. chain Y \<Longrightarrow> range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Either (f ` range Y) = f (Either (range Y))

goal (1 subgoal):
 1. \<And>Y. chain Y \<Longrightarrow> range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)
[PROOF STEP]
have "Either (range Y) = lub (range Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Either (range Y) = Lub Y
[PROOF STEP]
unfolding lub_is_either
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Either (range Y) = Either (range Y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Either (range Y) = Lub Y

goal (1 subgoal):
 1. \<And>Y. chain Y \<Longrightarrow> range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Either (range (\<lambda>i. f (Y i))) = f (Lub Y)
[PROOF STEP]
show "range (\<lambda>i. f (Y i)) <<| f (\<Squnion> i. Y i)"
[PROOF STATE]
proof (prove)
using this:
Either (range (\<lambda>i. f (Y i))) = f (Lub Y)

goal (1 subgoal):
 1. range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)
[PROOF STEP]
by (metis is_lub_ttree)
[PROOF STATE]
proof (state)
this:
range (\<lambda>i. f (Y i)) <<| f (\<Squnion>i. Y i)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma not_dvd_imp_multiplicity_0:
  assumes "\<not>p dvd x"
  shows   "multiplicity p x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicity p x = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. multiplicity p x = 0
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
\<not> p dvd x
[PROOF STEP]
have "multiplicity p x < 1"
[PROOF STATE]
proof (prove)
using this:
\<not> p dvd x

goal (1 subgoal):
 1. multiplicity p x < 1
[PROOF STEP]
by (intro multiplicity_lessI) auto
[PROOF STATE]
proof (state)
this:
multiplicity p x < 1

goal (1 subgoal):
 1. multiplicity p x = 0
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
multiplicity p x < 1

goal (1 subgoal):
 1. multiplicity p x = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
multiplicity p x = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma harm_aux_ineq_2:
  fixes k :: real
  assumes "k \<ge> 1"
  shows   "1 / (k + 1) < ln (1 + 2 / (2 * k + 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / (k + 1) < ln (1 + 2 / (2 * k + 1))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 / (k + 1) < ln (1 + 2 / (2 * k + 1))
[PROOF STEP]
have "k > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < k
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
1 \<le> k

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

goal (1 subgoal):
 1. 1 / (k + 1) < ln (1 + 2 / (2 * k + 1))
[PROOF STEP]
have "1 < (k + 1) * ln (1 + 2 / (2 * k + 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < (k + 1) * ln (1 + 2 / (2 * k + 1))
[PROOF STEP]
using harm_aux_ineq_2_lemma assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> ?x \<Longrightarrow> 1 < (?x + 1) * ln (1 + 2 / (2 * ?x + 1))
1 \<le> k

goal (1 subgoal):
 1. 1 < (k + 1) * ln (1 + 2 / (2 * k + 1))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 < (k + 1) * ln (1 + 2 / (2 * k + 1))

goal (1 subgoal):
 1. 1 / (k + 1) < ln (1 + 2 / (2 * k + 1))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 < (k + 1) * ln (1 + 2 / (2 * k + 1))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
1 < (k + 1) * ln (1 + 2 / (2 * k + 1))

goal (1 subgoal):
 1. 1 / (k + 1) < ln (1 + 2 / (2 * k + 1))
[PROOF STEP]
by (simp add: \<open>0 < k\<close> add_pos_pos mult.commute mult_imp_div_pos_less)
[PROOF STATE]
proof (state)
this:
1 / (k + 1) < ln (1 + 2 / (2 * k + 1))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prime_gauss_int_norm_imp_prime_elem:
  assumes "prime (gauss_int_norm q)"
  shows   "prime_elem q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime_elem q
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. prime_elem q
[PROOF STEP]
have "irreducible q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. irreducible q
[PROOF STEP]
proof (rule irreducibleI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. q \<noteq> 0
 2. \<not> is_unit q
 3. \<And>a b. q = a * b \<Longrightarrow> is_unit a \<or> is_unit b
[PROOF STEP]
fix a b
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. q \<noteq> 0
 2. \<not> is_unit q
 3. \<And>a b. q = a * b \<Longrightarrow> is_unit a \<or> is_unit b
[PROOF STEP]
assume "q = a * b"
[PROOF STATE]
proof (state)
this:
q = a * b

goal (3 subgoals):
 1. q \<noteq> 0
 2. \<not> is_unit q
 3. \<And>a b. q = a * b \<Longrightarrow> is_unit a \<or> is_unit b
[PROOF STEP]
hence "gauss_int_norm q = gauss_int_norm a * gauss_int_norm b"
[PROOF STATE]
proof (prove)
using this:
q = a * b

goal (1 subgoal):
 1. gauss_int_norm q = gauss_int_norm a * gauss_int_norm b
[PROOF STEP]
by (simp_all add: gauss_int_norm_mult)
[PROOF STATE]
proof (state)
this:
gauss_int_norm q = gauss_int_norm a * gauss_int_norm b

goal (3 subgoals):
 1. q \<noteq> 0
 2. \<not> is_unit q
 3. \<And>a b. q = a * b \<Longrightarrow> is_unit a \<or> is_unit b
[PROOF STEP]
thus "is_unit a \<or> is_unit b"
[PROOF STATE]
proof (prove)
using this:
gauss_int_norm q = gauss_int_norm a * gauss_int_norm b

goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
gauss_int_norm q = gauss_int_norm a * gauss_int_norm b
prime (gauss_int_norm q)

goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
by (auto dest!: prime_product simp: gauss_int_norm_eq_Suc_0_iff)
[PROOF STATE]
proof (state)
this:
is_unit a \<or> is_unit b

goal (2 subgoals):
 1. q \<noteq> 0
 2. \<not> is_unit q
[PROOF STEP]
qed (use assms in \<open>auto simp: is_unit_gauss_int_iff'\<close>)
[PROOF STATE]
proof (state)
this:
irreducible q

goal (1 subgoal):
 1. prime_elem q
[PROOF STEP]
thus "prime_elem q"
[PROOF STATE]
proof (prove)
using this:
irreducible q

goal (1 subgoal):
 1. prime_elem q
[PROOF STEP]
using irreducible_imp_prime_elem_gcd
[PROOF STATE]
proof (prove)
using this:
irreducible q
irreducible ?x \<Longrightarrow> prime_elem ?x

goal (1 subgoal):
 1. prime_elem q
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
prime_elem q

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma but_last_zip [rule_format] :
  "\<forall>ys. length xs = length ys \<longrightarrow> xs \<noteq> [] \<longrightarrow>
    last (zip xs ys) = (last xs, last ys) \<and>
    butlast (zip xs ys) = zip (butlast xs) (butlast ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>ys. length xs = length ys \<longrightarrow> xs \<noteq> [] \<longrightarrow> last (zip xs ys) = (last xs, last ys) \<and> butlast (zip xs ys) = zip (butlast xs) (butlast ys)
[PROOF STEP]
apply (induct xs)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<forall>ys. length [] = length ys \<longrightarrow> [] \<noteq> [] \<longrightarrow> last (zip [] ys) = (last [], last ys) \<and> butlast (zip [] ys) = zip (butlast []) (butlast ys)
 2. \<And>a xs. \<forall>ys. length xs = length ys \<longrightarrow> xs \<noteq> [] \<longrightarrow> last (zip xs ys) = (last xs, last ys) \<and> butlast (zip xs ys) = zip (butlast xs) (butlast ys) \<Longrightarrow> \<forall>ys. length (a # xs) = length ys \<longrightarrow> a # xs \<noteq> [] \<longrightarrow> last (zip (a # xs) ys) = (last (a # xs), last ys) \<and> butlast (zip (a # xs) ys) = zip (butlast (a # xs)) (butlast ys)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a ys. Suc 0 = length ys \<Longrightarrow> last (zip [a] ys) = (a, last ys)
 2. \<And>a ys. Suc 0 = length ys \<Longrightarrow> butlast (zip [a] ys) = []
 3. \<And>a xs ys. \<lbrakk>\<forall>ys. length xs = length ys \<longrightarrow> last (zip xs ys) = (last xs, last ys) \<and> butlast (zip xs ys) = zip (butlast xs) (butlast ys); xs \<noteq> []; Suc (length xs) = length ys\<rbrakk> \<Longrightarrow> last (zip (a # xs) ys) = (last xs, last ys)
 4. \<And>a xs ys. \<lbrakk>\<forall>ys. length xs = length ys \<longrightarrow> last (zip xs ys) = (last xs, last ys) \<and> butlast (zip xs ys) = zip (butlast xs) (butlast ys); xs \<noteq> []; Suc (length xs) = length ys\<rbrakk> \<Longrightarrow> butlast (zip (a # xs) ys) = zip (a # butlast xs) (butlast ys)
[PROOF STEP]
apply ((case_tac ys, auto simp: neq_Nil_conv)[1])+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma exp_Arg2pi2pi_multivalue:
  assumes "exp (\<i>* of_real x) = z"
  shows "\<exists>k::int. x = Arg2pi z + 2*k*pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
define k where "k=floor( x/(2*pi))"
[PROOF STATE]
proof (state)
this:
k = \<lfloor>x / (2 * pi)\<rfloor>

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
define x' where "x'= x - (2*k*pi)"
[PROOF STATE]
proof (state)
this:
x' = x - real_of_int (2 * k) * pi

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
have "x'/(2*pi) \<ge>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x' / (2 * pi)
[PROOF STEP]
unfolding x'_def k_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> (x - real_of_int (2 * \<lfloor>x / (2 * pi)\<rfloor>) * pi) / (2 * pi)
[PROOF STEP]
by (simp add: diff_divide_distrib)
[PROOF STATE]
proof (state)
this:
0 \<le> x' / (2 * pi)

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 \<le> x' / (2 * pi)

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
have "x'/(2*pi) < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x' / (2 * pi) < 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x' / (2 * pi) < 1
[PROOF STEP]
have "x/(2*pi) - k < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x / (2 * pi) - real_of_int k < 1
[PROOF STEP]
unfolding k_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x / (2 * pi) - real_of_int \<lfloor>x / (2 * pi)\<rfloor> < 1
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
x / (2 * pi) - real_of_int k < 1

goal (1 subgoal):
 1. x' / (2 * pi) < 1
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x / (2 * pi) - real_of_int k < 1

goal (1 subgoal):
 1. x' / (2 * pi) < 1
[PROOF STEP]
unfolding k_def x'_def
[PROOF STATE]
proof (prove)
using this:
x / (2 * pi) - real_of_int \<lfloor>x / (2 * pi)\<rfloor> < 1

goal (1 subgoal):
 1. (x - real_of_int (2 * \<lfloor>x / (2 * pi)\<rfloor>) * pi) / (2 * pi) < 1
[PROOF STEP]
by (auto simp add:field_simps)
[PROOF STATE]
proof (state)
this:
x' / (2 * pi) < 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x' / (2 * pi) < 1

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 \<le> x' / (2 * pi)
x' / (2 * pi) < 1
[PROOF STEP]
have "x'\<ge>0" and "x'<2*pi"
[PROOF STATE]
proof (prove)
using this:
0 \<le> x' / (2 * pi)
x' / (2 * pi) < 1

goal (1 subgoal):
 1. 0 \<le> x' &&& x' < 2 * pi
[PROOF STEP]
by (auto simp add:field_simps)
[PROOF STATE]
proof (state)
this:
0 \<le> x'
x' < 2 * pi

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 \<le> x'
x' < 2 * pi

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
have "exp (\<i> * complex_of_real x') = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp (\<i> * complex_of_real x') = z
[PROOF STEP]
using assms x'_def
[PROOF STATE]
proof (prove)
using this:
exp (\<i> * complex_of_real x) = z
x' = x - real_of_int (2 * k) * pi

goal (1 subgoal):
 1. exp (\<i> * complex_of_real x') = z
[PROOF STEP]
by  (auto simp add:field_simps )
[PROOF STATE]
proof (state)
this:
exp (\<i> * complex_of_real x') = z

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 \<le> x'
x' < 2 * pi
exp (\<i> * complex_of_real x') = z
[PROOF STEP]
have "Arg2pi z = x'"
[PROOF STATE]
proof (prove)
using this:
0 \<le> x'
x' < 2 * pi
exp (\<i> * complex_of_real x') = z

goal (1 subgoal):
 1. Arg2pi z = x'
[PROOF STEP]
using Arg2pi_unique[of 1 x' z,simplified]
[PROOF STATE]
proof (prove)
using this:
0 \<le> x'
x' < 2 * pi
exp (\<i> * complex_of_real x') = z
\<lbrakk>exp (\<i> * complex_of_real x') = z; 0 \<le> x'; x' < 2 * pi\<rbrakk> \<Longrightarrow> Arg2pi z = x'

goal (1 subgoal):
 1. Arg2pi z = x'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Arg2pi z = x'

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
hence " x = Arg2pi z + 2*k*pi"
[PROOF STATE]
proof (prove)
using this:
Arg2pi z = x'

goal (1 subgoal):
 1. x = Arg2pi z + real_of_int (2 * k) * pi
[PROOF STEP]
unfolding x'_def
[PROOF STATE]
proof (prove)
using this:
Arg2pi z = x - real_of_int (2 * k) * pi

goal (1 subgoal):
 1. x = Arg2pi z + real_of_int (2 * k) * pi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = Arg2pi z + real_of_int (2 * k) * pi

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x = Arg2pi z + real_of_int (2 * k) * pi

goal (1 subgoal):
 1. \<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>xa. x = Arg2pi z + 2 * real_of_int xa * pi

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Pfunc_mono[simp]:
assumes "A1 \<subseteq> A2" and "B1 \<subseteq> B2"
shows "Pfunc A B1 \<subseteq> Pfunc A B2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Pfunc A B1 \<subseteq> Pfunc A B2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A1 \<subseteq> A2
B1 \<subseteq> B2

goal (1 subgoal):
 1. Pfunc A B1 \<subseteq> Pfunc A B2
[PROOF STEP]
unfolding Pfunc_def
[PROOF STATE]
proof (prove)
using this:
A1 \<subseteq> A2
B1 \<subseteq> B2

goal (1 subgoal):
 1. {f. (\<forall>a. f a \<noteq> None \<longrightarrow> a \<in> A) \<and> (\<forall>a. case f a of None \<Rightarrow> True | Some b \<Rightarrow> b \<in> B1)} \<subseteq> {f. (\<forall>a. f a \<noteq> None \<longrightarrow> a \<in> A) \<and> (\<forall>a. case f a of None \<Rightarrow> True | Some b \<Rightarrow> b \<in> B2)}
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a. \<lbrakk>A1 \<subseteq> A2; B1 \<subseteq> B2; \<forall>a. x a \<noteq> None \<longrightarrow> a \<in> A; \<forall>a. case x a of None \<Rightarrow> True | Some b \<Rightarrow> b \<in> B1\<rbrakk> \<Longrightarrow> case x a of None \<Rightarrow> True | Some b \<Rightarrow> b \<in> B2
[PROOF STEP]
apply (case_tac "x a", auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a aa. \<lbrakk>A1 \<subseteq> A2; B1 \<subseteq> B2; \<forall>a. (\<exists>y. x a = Some y) \<longrightarrow> a \<in> A; \<forall>a. case x a of None \<Rightarrow> True | Some b \<Rightarrow> b \<in> B1; x a = Some aa\<rbrakk> \<Longrightarrow> aa \<in> B2
[PROOF STEP]
apply (metis in_mono option.simps(5))
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma simply_connected_imp_holomorphic_log:
  assumes holf: "f holomorphic_on S"
      and S: "simply_connected S" "locally path_connected S"
      and fnz: "\<And>z. z \<in> S \<Longrightarrow> f z \<noteq> 0"
  obtains g where "g holomorphic_on S" "\<And>z. z \<in> S \<Longrightarrow> f z = exp(g z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = exp (g z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = exp (g z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have contf: "continuous_on S f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on S f
[PROOF STEP]
by (simp add: holf holomorphic_on_imp_continuous_on)
[PROOF STATE]
proof (state)
this:
continuous_on S f

goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = exp (g z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain g where contg: "continuous_on S g" and feq: "\<And>x. x \<in> S \<Longrightarrow> f x = exp (g x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g. \<lbrakk>continuous_on S g; \<And>x. x \<in> S \<Longrightarrow> f x = exp (g x)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis continuous_logarithm_on_simply_connected [OF contf S fnz])
[PROOF STATE]
proof (state)
this:
continuous_on S g
?x \<in> S \<Longrightarrow> f ?x = exp (g ?x)

goal (1 subgoal):
 1. (\<And>g. \<lbrakk>g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = exp (g z)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_on S g
?x \<in> S \<Longrightarrow> f ?x = exp (g ?x)
[PROOF STEP]
show thesis
[PROOF STATE]
proof (prove)
using this:
continuous_on S g
?x \<in> S \<Longrightarrow> f ?x = exp (g ?x)

goal (1 subgoal):
 1. thesis
[PROOF STEP]
using fnz g_imp_holomorphic_log holf that
[PROOF STATE]
proof (prove)
using this:
continuous_on S g
?x \<in> S \<Longrightarrow> f ?x = exp (g ?x)
?z \<in> S \<Longrightarrow> f ?z \<noteq> 0
\<lbrakk>?f holomorphic_on ?S; continuous_on ?S ?g; \<And>x. x \<in> ?S \<Longrightarrow> ?f x = exp (?g x); \<And>z. z \<in> ?S \<Longrightarrow> ?f z \<noteq> 0; \<And>g. \<lbrakk>g holomorphic_on ?S; \<And>z. z \<in> ?S \<Longrightarrow> ?f z = exp (g z)\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
f holomorphic_on S
\<lbrakk>?g holomorphic_on S; \<And>z. z \<in> S \<Longrightarrow> f z = exp (?g z)\<rbrakk> \<Longrightarrow> thesis

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma remove_all_mset_minus: "mset ys \<subseteq># mset xs \<Longrightarrow> mset (remove_all xs ys) = mset xs - mset ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset ys \<subseteq># mset xs \<Longrightarrow> mset (remove_all xs ys) = mset xs - mset ys
[PROOF STEP]
proof (induction ys arbitrary: xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xs. mset [] \<subseteq># mset xs \<Longrightarrow> mset (remove_all xs []) = mset xs - mset []
 2. \<And>a ys xs. \<lbrakk>\<And>xs. mset ys \<subseteq># mset xs \<Longrightarrow> mset (remove_all xs ys) = mset xs - mset ys; mset (a # ys) \<subseteq># mset xs\<rbrakk> \<Longrightarrow> mset (remove_all xs (a # ys)) = mset xs - mset (a # ys)
[PROOF STEP]
case (Cons y ys)
[PROOF STATE]
proof (state)
this:
mset ys \<subseteq># mset ?xs \<Longrightarrow> mset (remove_all ?xs ys) = mset ?xs - mset ys
mset (y # ys) \<subseteq># mset xs

goal (2 subgoals):
 1. \<And>xs. mset [] \<subseteq># mset xs \<Longrightarrow> mset (remove_all xs []) = mset xs - mset []
 2. \<And>a ys xs. \<lbrakk>\<And>xs. mset ys \<subseteq># mset xs \<Longrightarrow> mset (remove_all xs ys) = mset xs - mset ys; mset (a # ys) \<subseteq># mset xs\<rbrakk> \<Longrightarrow> mset (remove_all xs (a # ys)) = mset xs - mset (a # ys)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
proof (cases "y \<in> set xs")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. y \<in> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
 2. y \<notin> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
case y_in: True
[PROOF STATE]
proof (state)
this:
y \<in> set xs

goal (2 subgoals):
 1. y \<in> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
 2. y \<notin> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> set xs
[PROOF STEP]
have subs: "mset ys \<subseteq># mset (remove1 y xs)"
[PROOF STATE]
proof (prove)
using this:
y \<in> set xs

goal (1 subgoal):
 1. mset ys \<subseteq># mset (remove1 y xs)
[PROOF STEP]
using Cons(2)
[PROOF STATE]
proof (prove)
using this:
y \<in> set xs
mset (y # ys) \<subseteq># mset xs

goal (1 subgoal):
 1. mset ys \<subseteq># mset (remove1 y xs)
[PROOF STEP]
by (simp add: insert_subset_eq_iff)
[PROOF STATE]
proof (state)
this:
mset ys \<subseteq># mset (remove1 y xs)

goal (2 subgoals):
 1. y \<in> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
 2. y \<notin> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
using y_in Cons subs
[PROOF STATE]
proof (prove)
using this:
y \<in> set xs
mset ys \<subseteq># mset ?xs \<Longrightarrow> mset (remove_all ?xs ys) = mset ?xs - mset ys
mset (y # ys) \<subseteq># mset xs
mset ys \<subseteq># mset (remove1 y xs)

goal (1 subgoal):
 1. mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)

goal (1 subgoal):
 1. y \<notin> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. y \<notin> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
y \<notin> set xs

goal (1 subgoal):
 1. y \<notin> set xs \<Longrightarrow> mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<notin> set xs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
y \<notin> set xs

goal (1 subgoal):
 1. mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
using Cons
[PROOF STATE]
proof (prove)
using this:
y \<notin> set xs
mset ys \<subseteq># mset ?xs \<Longrightarrow> mset (remove_all ?xs ys) = mset ?xs - mset ys
mset (y # ys) \<subseteq># mset xs

goal (1 subgoal):
 1. mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
mset (remove_all xs (y # ys)) = mset xs - mset (y # ys)

goal (1 subgoal):
 1. \<And>xs. mset [] \<subseteq># mset xs \<Longrightarrow> mset (remove_all xs []) = mset xs - mset []
[PROOF STEP]
qed auto


[STATEMENT]
lemma ennsqrt_ennreal_ennreal_sqrt [simp]:
  assumes "t \<ge> (0::real)"
  shows "ennsqrt (ennreal t) = ennreal (sqrt t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennsqrt (ennreal t) = ennreal (sqrt t)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ennsqrt (ennreal t) = ennreal (sqrt t)
[PROOF STEP]
have "ennreal t = ennreal (sqrt t) * ennreal(sqrt t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal t = ennreal (sqrt t) * ennreal (sqrt t)
[PROOF STEP]
apply (subst ennreal_mult[symmetric])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. 0 \<le> sqrt t
 2. ennreal t = ennreal (sqrt t * sqrt t)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> t

goal (2 subgoals):
 1. 0 \<le> sqrt t
 2. ennreal t = ennreal (sqrt t * sqrt t)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ennreal t = ennreal (sqrt t) * ennreal (sqrt t)

goal (1 subgoal):
 1. ennsqrt (ennreal t) = ennreal (sqrt t)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ennreal t = ennreal (sqrt t) * ennreal (sqrt t)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ennreal t = ennreal (sqrt t) * ennreal (sqrt t)

goal (1 subgoal):
 1. ennsqrt (ennreal t) = ennreal (sqrt t)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ennsqrt (ennreal t) = ennreal (sqrt t)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fixes F
  defines "F \<equiv> \<lambda>llength xs. case xs of LNil \<Rightarrow> 0 | LCons x xs \<Rightarrow> eSuc (llength xs)"
  shows llength_conv_fixp: "llength \<equiv> ccpo.fixp (fun_lub Sup) (fun_ord (\<le>)) F" (is "_ \<equiv> ?fixp")
  and llength_mono: "\<And>xs. monotone (fun_ord (\<le>)) (\<le>) (\<lambda>llength. F llength xs)" (is "PROP ?mono")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (llength \<equiv> lfp.fixp_fun F) &&& (\<And>xs. monotone lfp.le_fun (\<le>) (\<lambda>llength. F llength xs))
[PROOF STEP]
proof(intro eq_reflection ext)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. llength x = lfp.fixp_fun F x
 2. \<And>xs. monotone lfp.le_fun (\<le>) (\<lambda>llength. F llength xs)
[PROOF STEP]
show mono: "PROP ?mono"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xs. monotone lfp.le_fun (\<le>) (\<lambda>llength. F llength xs)
[PROOF STEP]
unfolding F_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xs. monotone lfp.le_fun (\<le>) (\<lambda>llength. case xs of LNil \<Rightarrow> 0 | LCons x xs \<Rightarrow> eSuc (llength xs))
[PROOF STEP]
by(tactic \<open>Partial_Function.mono_tac @{context} 1\<close>)
[PROOF STATE]
proof (state)
this:
monotone lfp.le_fun (\<le>) (\<lambda>llength. F llength ?xs)

goal (1 subgoal):
 1. \<And>x. llength x = lfp.fixp_fun F x
[PROOF STEP]
fix xs
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. llength x = lfp.fixp_fun F x
[PROOF STEP]
show "llength xs = ?fixp xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. llength xs = lfp.fixp_fun F xs
[PROOF STEP]
by(coinduction arbitrary: xs rule: enat_coinduct)(subst (1 2 3) lfp.mono_body_fixp[OF mono], fastforce simp add: F_def split: llist.split del: iffI)+
[PROOF STATE]
proof (state)
this:
llength xs = lfp.fixp_fun F xs

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma integrable_componentwise_iff:
  fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space"
  shows "f integrable_on A \<longleftrightarrow> (\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f integrable_on A) = (\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f integrable_on A \<Longrightarrow> \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A
 2. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
assume "f integrable_on A"
[PROOF STATE]
proof (state)
this:
f integrable_on A

goal (2 subgoals):
 1. f integrable_on A \<Longrightarrow> \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A
 2. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f integrable_on A
[PROOF STEP]
obtain y where "(f has_integral y) A"
[PROOF STATE]
proof (prove)
using this:
f integrable_on A

goal (1 subgoal):
 1. (\<And>y. (f has_integral y) A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: integrable_on_def)
[PROOF STATE]
proof (state)
this:
(f has_integral y) A

goal (2 subgoals):
 1. f integrable_on A \<Longrightarrow> \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A
 2. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
hence "(\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral (y \<bullet> b)) A)"
[PROOF STATE]
proof (prove)
using this:
(f has_integral y) A

goal (1 subgoal):
 1. \<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y \<bullet> b) A
[PROOF STEP]
by (subst (asm) has_integral_componentwise_iff)
[PROOF STATE]
proof (state)
this:
\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y \<bullet> b) A

goal (2 subgoals):
 1. f integrable_on A \<Longrightarrow> \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A
 2. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
thus "(\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A)"
[PROOF STATE]
proof (prove)
using this:
\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y \<bullet> b) A

goal (1 subgoal):
 1. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A
[PROOF STEP]
by (auto simp: integrable_on_def)
[PROOF STATE]
proof (state)
this:
\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A

goal (1 subgoal):
 1. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
assume "(\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A)"
[PROOF STATE]
proof (state)
this:
\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A

goal (1 subgoal):
 1. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A
[PROOF STEP]
obtain y where "\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y b) A"
[PROOF STATE]
proof (prove)
using this:
\<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A

goal (1 subgoal):
 1. (\<And>y. \<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y b) A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding integrable_on_def
[PROOF STATE]
proof (prove)
using this:
\<forall>b\<in>Basis. \<exists>y. ((\<lambda>x. f x \<bullet> b) has_integral y) A

goal (1 subgoal):
 1. (\<And>y. \<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y b) A \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (subst (asm) bchoice_iff) blast
[PROOF STATE]
proof (state)
this:
\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y b) A

goal (1 subgoal):
 1. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
hence "\<forall>b\<in>Basis. (((\<lambda>x. x *\<^sub>R b) \<circ> (\<lambda>x. f x \<bullet> b)) has_integral (y b *\<^sub>R b)) A"
[PROOF STATE]
proof (prove)
using this:
\<forall>b\<in>Basis. ((\<lambda>x. f x \<bullet> b) has_integral y b) A

goal (1 subgoal):
 1. \<forall>b\<in>Basis. ((\<lambda>x. x *\<^sub>R b) \<circ> (\<lambda>x. f x \<bullet> b) has_integral y b *\<^sub>R b) A
[PROOF STEP]
by (intro ballI has_integral_linear) (simp_all add: bounded_linear_scaleR_left)
[PROOF STATE]
proof (state)
this:
\<forall>b\<in>Basis. ((\<lambda>x. x *\<^sub>R b) \<circ> (\<lambda>x. f x \<bullet> b) has_integral y b *\<^sub>R b) A

goal (1 subgoal):
 1. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
hence "((\<lambda>x. \<Sum>b\<in>Basis. (f x \<bullet> b) *\<^sub>R b) has_integral (\<Sum>b\<in>Basis. y b *\<^sub>R b)) A"
[PROOF STATE]
proof (prove)
using this:
\<forall>b\<in>Basis. ((\<lambda>x. x *\<^sub>R b) \<circ> (\<lambda>x. f x \<bullet> b) has_integral y b *\<^sub>R b) A

goal (1 subgoal):
 1. ((\<lambda>x. \<Sum>b\<in>Basis. (f x \<bullet> b) *\<^sub>R b) has_integral (\<Sum>b\<in>Basis. y b *\<^sub>R b)) A
[PROOF STEP]
by (intro has_integral_sum) (simp_all add: o_def)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. \<Sum>b\<in>Basis. (f x \<bullet> b) *\<^sub>R b) has_integral (\<Sum>b\<in>Basis. y b *\<^sub>R b)) A

goal (1 subgoal):
 1. \<forall>b\<in>Basis. (\<lambda>x. f x \<bullet> b) integrable_on A \<Longrightarrow> f integrable_on A
[PROOF STEP]
thus "f integrable_on A"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. \<Sum>b\<in>Basis. (f x \<bullet> b) *\<^sub>R b) has_integral (\<Sum>b\<in>Basis. y b *\<^sub>R b)) A

goal (1 subgoal):
 1. f integrable_on A
[PROOF STEP]
by (auto simp: integrable_on_def o_def euclidean_representation)
[PROOF STATE]
proof (state)
this:
f integrable_on A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sorted_rev_subset_len_lt:
  assumes "sorted (rev a)"
      and "sorted (rev b)"
      and "set a \<subset> set b"
    shows "length a < length b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length a < length b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Sorted_Less.sorted (rev a)
Sorted_Less.sorted (rev b)
set a \<subset> set b

goal (1 subgoal):
 1. length a < length b
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>Sorted_Less.sorted (rev a); Sorted_Less.sorted (rev b); set a \<subset> set b\<rbrakk> \<Longrightarrow> length a < length b
[PROOF STEP]
from assms(1) assms(2)
[PROOF STATE]
proof (chain)
picking this:
Sorted_Less.sorted (rev a)
Sorted_Less.sorted (rev b)
[PROOF STEP]
have dist_a: "distinct a" and dist_b: "distinct b"
[PROOF STATE]
proof (prove)
using this:
Sorted_Less.sorted (rev a)
Sorted_Less.sorted (rev b)

goal (1 subgoal):
 1. distinct a &&& distinct b
[PROOF STEP]
by (auto dest: distinct_sorted_rev)
[PROOF STATE]
proof (state)
this:
distinct a
distinct b

goal (1 subgoal):
 1. \<lbrakk>Sorted_Less.sorted (rev a); Sorted_Less.sorted (rev b); set a \<subset> set b\<rbrakk> \<Longrightarrow> length a < length b
[PROOF STEP]
from assms(3)
[PROOF STATE]
proof (chain)
picking this:
set a \<subset> set b
[PROOF STEP]
have "card (set a) < card (set b)"
[PROOF STATE]
proof (prove)
using this:
set a \<subset> set b

goal (1 subgoal):
 1. card (set a) < card (set b)
[PROOF STEP]
by (auto intro: psubset_card_mono)
[PROOF STATE]
proof (state)
this:
card (set a) < card (set b)

goal (1 subgoal):
 1. \<lbrakk>Sorted_Less.sorted (rev a); Sorted_Less.sorted (rev b); set a \<subset> set b\<rbrakk> \<Longrightarrow> length a < length b
[PROOF STEP]
with dist_a dist_b
[PROOF STATE]
proof (chain)
picking this:
distinct a
distinct b
card (set a) < card (set b)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
distinct a
distinct b
card (set a) < card (set b)

goal (1 subgoal):
 1. length a < length b
[PROOF STEP]
by (auto simp add: distinct_card)
[PROOF STATE]
proof (state)
this:
length a < length b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ds_monotone: assumes "S \<subseteq> T" shows "ds r S \<subseteq> ds r T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r \<down>s S \<subseteq> r \<down>s T
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> T

goal (1 subgoal):
 1. r \<down>s S \<subseteq> r \<down>s T
[PROOF STEP]
unfolding ds_def
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> T

goal (1 subgoal):
 1. {y. \<exists>x\<in>S. (y, x) \<in> r} \<subseteq> {y. \<exists>x\<in>T. (y, x) \<in> r}
[PROOF STEP]
by auto


[STATEMENT]
lemma (in galois_connection) dual_inf_dist_\<gamma>: "\<gamma> (Inf C) = Inf (\<gamma>`C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<gamma> (Inf C) = Inf (\<gamma> ` C)
[PROOF STEP]
apply (rule antisym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<gamma> (Inf C) \<le> Inf (\<gamma> ` C)
 2. Inf (\<gamma> ` C) \<le> \<gamma> (Inf C)
[PROOF STEP]
apply (rule Inf_greatest)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> \<gamma> ` C \<Longrightarrow> \<gamma> (Inf C) \<le> x
 2. Inf (\<gamma> ` C) \<le> \<gamma> (Inf C)
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. xa \<in> C \<Longrightarrow> \<gamma> (Inf C) \<le> \<gamma> xa
 2. Inf (\<gamma> ` C) \<le> \<gamma> (Inf C)
[PROOF STEP]
apply (rule monoD[OF \<gamma>_mono])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. xa \<in> C \<Longrightarrow> Inf C \<le> xa
 2. Inf (\<gamma> ` C) \<le> \<gamma> (Inf C)
[PROOF STEP]
apply (rule Inf_lower)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. xa \<in> C \<Longrightarrow> xa \<in> C
 2. Inf (\<gamma> ` C) \<le> \<gamma> (Inf C)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf (\<gamma> ` C) \<le> \<gamma> (Inf C)
[PROOF STEP]
apply (subst galois)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> (Inf (\<gamma> ` C)) \<le> Inf C
[PROOF STEP]
apply (rule Inf_greatest)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> \<alpha> (Inf (\<gamma> ` C)) \<le> x
[PROOF STEP]
apply (subst galois[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> Inf (\<gamma> ` C) \<le> \<gamma> x
[PROOF STEP]
apply (rule Inf_lower)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> C \<Longrightarrow> \<gamma> x \<in> \<gamma> ` C
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma tendsto_inverse_0:
  fixes x :: "_ \<Rightarrow> 'a::real_normed_div_algebra"
  shows "(inverse \<longlongrightarrow> (0::'a)) at_infinity"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (inverse \<longlongrightarrow> (0::'a)) at_infinity
[PROOF STEP]
unfolding tendsto_Zfun_iff diff_0_right Zfun_def eventually_at_infinity
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>r>0. \<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> norm (inverse x) < r
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> norm (inverse x) < r
[PROOF STEP]
fix r :: real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> norm (inverse x) < r
[PROOF STEP]
assume "0 < r"
[PROOF STATE]
proof (state)
this:
0 < r

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> norm (inverse x) < r
[PROOF STEP]
show "\<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> norm (inverse x :: 'a) < r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> norm (inverse x) < r
[PROOF STEP]
proof (intro exI[of _ "inverse (r / 2)"] allI impI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. inverse (r / 2) \<le> norm x \<Longrightarrow> norm (inverse x) < r
[PROOF STEP]
fix x :: 'a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. inverse (r / 2) \<le> norm x \<Longrightarrow> norm (inverse x) < r
[PROOF STEP]
from \<open>0 < r\<close>
[PROOF STATE]
proof (chain)
picking this:
0 < r
[PROOF STEP]
have "0 < inverse (r / 2)"
[PROOF STATE]
proof (prove)
using this:
0 < r

goal (1 subgoal):
 1. 0 < inverse (r / 2)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < inverse (r / 2)

goal (1 subgoal):
 1. \<And>x. inverse (r / 2) \<le> norm x \<Longrightarrow> norm (inverse x) < r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
0 < inverse (r / 2)

goal (1 subgoal):
 1. \<And>x. inverse (r / 2) \<le> norm x \<Longrightarrow> norm (inverse x) < r
[PROOF STEP]
assume *: "inverse (r / 2) \<le> norm x"
[PROOF STATE]
proof (state)
this:
inverse (r / 2) \<le> norm x

goal (1 subgoal):
 1. \<And>x. inverse (r / 2) \<le> norm x \<Longrightarrow> norm (inverse x) < r
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
0 < norm x
[PROOF STEP]
show "norm (inverse x) < r"
[PROOF STATE]
proof (prove)
using this:
0 < norm x

goal (1 subgoal):
 1. norm (inverse x) < r
[PROOF STEP]
using * \<open>0 < r\<close>
[PROOF STATE]
proof (prove)
using this:
0 < norm x
inverse (r / 2) \<le> norm x
0 < r

goal (1 subgoal):
 1. norm (inverse x) < r
[PROOF STEP]
by (subst nonzero_norm_inverse) (simp_all add: inverse_eq_divide field_simps)
[PROOF STATE]
proof (state)
this:
norm (inverse x) < r

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>b. \<forall>x. b \<le> norm x \<longrightarrow> norm (inverse x) < r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rtranclp_step: "rtranclp R q q'' \<Longrightarrow> (\<And>q'. R q q' \<longleftrightarrow> q' \<in> X) \<Longrightarrow>
  q = q'' \<or> (\<exists>q' \<in> X. R q q' \<and> rtranclp R q' q'')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R\<^sup>*\<^sup>* q q''; \<And>q'. R q q' = (q' \<in> X)\<rbrakk> \<Longrightarrow> q = q'' \<or> (\<exists>q'\<in>X. R q q' \<and> R\<^sup>*\<^sup>* q' q'')
[PROOF STEP]
by (induction q q'' rule: rtranclp.induct)
     (auto intro: rtranclp.rtrancl_into_rtrancl)


[STATEMENT]
lemma algebraic_int_diff [intro]:
  fixes x y :: "'a :: field_char_0"
  assumes "algebraic_int x" "algebraic_int y"
  shows   "algebraic_int (x - y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. algebraic_int (x - y)
[PROOF STEP]
using algebraic_int_plus[OF assms(1) algebraic_int_minus[OF assms(2)]]
[PROOF STATE]
proof (prove)
using this:
algebraic_int (x + - y)

goal (1 subgoal):
 1. algebraic_int (x - y)
[PROOF STEP]
by simp


[STATEMENT]
lemma measurable_count_space_eq2_countable:
  fixes f :: "'a => 'c::countable"
  shows "f \<in> measurable M (count_space A) \<longleftrightarrow> (f \<in> space M \<rightarrow> A \<and> (\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> M \<rightarrow>\<^sub>M count_space A) = (f \<in> space M \<rightarrow> A \<and> (\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M))
[PROOF STEP]
by (intro measurable_count_space_eq_countable countableI_type)


[STATEMENT]
lemma permute_poly_args_add:
  assumes "\<sigma> permutes {..<n}"
  assumes "p \<in> carrier (R[\<X>\<^bsub>n\<^esub>])"
  assumes "q \<in> carrier (R[\<X>\<^bsub>n\<^esub>])"
  shows "permute_poly_args n \<sigma> (p \<oplus>\<^bsub>R[\<X>\<^bsub>n\<^esub>]\<^esub> q) = (permute_poly_args n \<sigma> p) \<oplus>\<^bsub>R[\<X>\<^bsub>n\<^esub>]\<^esub> (permute_poly_args n \<sigma> q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. permute_poly_args n \<sigma> (p \<oplus>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> q) = permute_poly_args n \<sigma> p \<oplus>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> permute_poly_args n \<sigma> q
[PROOF STEP]
using permute_poly_args_characterization(1)[of  \<sigma>] assms
[PROOF STATE]
proof (prove)
using this:
\<sigma> permutes {..<?n} \<Longrightarrow> ring_hom_ring (R [\<X>\<^bsub>?n\<^esub>]) (R [\<X>\<^bsub>?n\<^esub>]) (permute_poly_args ?n \<sigma>)
\<sigma> permutes {..<n}
p \<in> carrier (R [\<X>\<^bsub>n\<^esub>])
q \<in> carrier (R [\<X>\<^bsub>n\<^esub>])

goal (1 subgoal):
 1. permute_poly_args n \<sigma> (p \<oplus>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> q) = permute_poly_args n \<sigma> p \<oplus>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> permute_poly_args n \<sigma> q
[PROOF STEP]
unfolding ring_hom_ring_def ring_hom_ring_axioms_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> permutes {..<?n} \<Longrightarrow> ring (R [\<X>\<^bsub>?n\<^esub>]) \<and> ring (R [\<X>\<^bsub>?n\<^esub>]) \<and> permute_poly_args ?n \<sigma> \<in> ring_hom (R [\<X>\<^bsub>?n\<^esub>]) (R [\<X>\<^bsub>?n\<^esub>])
\<sigma> permutes {..<n}
p \<in> carrier (R [\<X>\<^bsub>n\<^esub>])
q \<in> carrier (R [\<X>\<^bsub>n\<^esub>])

goal (1 subgoal):
 1. permute_poly_args n \<sigma> (p \<oplus>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> q) = permute_poly_args n \<sigma> p \<oplus>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> permute_poly_args n \<sigma> q
[PROOF STEP]
by (metis (no_types, lifting) ring_hom_add)


[STATEMENT]
lemma lsum_list_lappend: "\<lbrakk> lfinite xs; lfinite ys \<rbrakk> \<Longrightarrow> lsum_list (lappend xs ys) = lsum_list xs + lsum_list ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>lfinite xs; lfinite ys\<rbrakk> \<Longrightarrow> lsum_list (lappend xs ys) = lsum_list xs + lsum_list ys
[PROOF STEP]
by(simp add: lsum_list_def list_of_lappend)


[STATEMENT]
lemma infinite_infinite_Fpow:
  assumes "infinite A"
  shows "infinite (Fpow A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite (Fpow A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infinite (Fpow A)
[PROOF STEP]
have inj: "inj (\<lambda> S. {S})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj (\<lambda>S. {S})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inj (\<lambda>S. {S})

goal (1 subgoal):
 1. infinite (Fpow A)
[PROOF STEP]
have "(\<lambda> S. {S}) ` A \<subseteq> Fpow A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>S. {S}) ` A \<subseteq> Fpow A
[PROOF STEP]
by (auto simp: Fpow_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>S. {S}) ` A \<subseteq> Fpow A

goal (1 subgoal):
 1. infinite (Fpow A)
[PROOF STEP]
from finite_subset[OF this] inj assms
[PROOF STATE]
proof (chain)
picking this:
finite (Fpow A) \<Longrightarrow> finite ((\<lambda>S. {S}) ` A)
inj (\<lambda>S. {S})
infinite A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite (Fpow A) \<Longrightarrow> finite ((\<lambda>S. {S}) ` A)
inj (\<lambda>S. {S})
infinite A

goal (1 subgoal):
 1. infinite (Fpow A)
[PROOF STEP]
by (auto simp: finite_image_iff)
[PROOF STATE]
proof (state)
this:
infinite (Fpow A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma continuous_min [continuous_intros]:
  fixes f :: "'a::t2_space \<Rightarrow> 'b::linorder_topology"
  shows "\<lbrakk>continuous F f; continuous F g\<rbrakk> \<Longrightarrow> continuous F (\<lambda>x. (min (f x) (g x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous F f; continuous F g\<rbrakk> \<Longrightarrow> continuous F (\<lambda>x. min (f x) (g x))
[PROOF STEP]
by (simp add: tendsto_min continuous_def)


[STATEMENT]
lemma Conj_eq_iff [simp]:
  assumes "finite (supp xset1)" and "finite (supp xset2)"
  shows "Conj xset1 = Conj xset2 \<longleftrightarrow> xset1 = xset2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Conj xset1 = Conj xset2) = (xset1 = xset2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite (supp xset1)
finite (supp xset2)

goal (1 subgoal):
 1. (Conj xset1 = Conj xset2) = (xset1 = xset2)
[PROOF STEP]
by (metis (erased, opaque_lifting) Conj\<^sub>\<alpha>_eq_iff Conj_rep_eq Rep_formula_inverse injI inj_eq bset.inj_map)


[STATEMENT]
lemma ln_eq_zero_iff [simp]: "0 < x \<Longrightarrow> ln x = 0 \<longleftrightarrow> x = 1"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> (ln x = 0) = (x = 1)
[PROOF STEP]
using ln_inj_iff [of x 1]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < x; 0 < 1\<rbrakk> \<Longrightarrow> (ln x = ln 1) = (x = 1)

goal (1 subgoal):
 1. 0 < x \<Longrightarrow> (ln x = 0) = (x = 1)
[PROOF STEP]
by simp


[STATEMENT]
lemma arcsin_less_arcsin: "- 1 \<le> x \<Longrightarrow> x < y \<Longrightarrow> y \<le> 1 \<Longrightarrow> arcsin x < arcsin y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>- 1 \<le> x; x < y; y \<le> 1\<rbrakk> \<Longrightarrow> arcsin x < arcsin y
[PROOF STEP]
using arcsin_less_mono
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<bar>?x\<bar> \<le> 1; \<bar>?y\<bar> \<le> 1\<rbrakk> \<Longrightarrow> (arcsin ?x < arcsin ?y) = (?x < ?y)

goal (1 subgoal):
 1. \<lbrakk>- 1 \<le> x; x < y; y \<le> 1\<rbrakk> \<Longrightarrow> arcsin x < arcsin y
[PROOF STEP]
by auto


[STATEMENT]
lemma pi_ge_zero [simp]: "0 \<le> pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> pi
[PROOF STEP]
by (rule pi_gt_zero [THEN order_less_imp_le])


[STATEMENT]
lemma icard_eq_Infty_imp: "icard A = \<infinity> \<Longrightarrow> infinite A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. icard A = \<infinity> \<Longrightarrow> infinite A
[PROOF STEP]
by (rule icard_infinite_conv[THEN iffD1])


[STATEMENT]
lemma prime_above_upper_bound: "prime_above n \<le> 2*n+2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime_above n \<le> 2 * n + 2
[PROOF STEP]
using prime_above_range
[PROOF STATE]
proof (prove)
using this:
prime_above ?n \<in> {?n..2 * ?n + 2}

goal (1 subgoal):
 1. prime_above n \<le> 2 * n + 2
[PROOF STEP]
by simp


[STATEMENT]
lemma rHom_npow:"\<lbrakk> Ring A; Ring R; x \<in> carrier A; f \<in> rHom A R \<rbrakk> \<Longrightarrow>
                    f (x^\<^bsup>A n\<^esup>) = (f x)^\<^bsup>R n\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ring A; Ring R; x \<in> carrier A; f \<in> rHom A R\<rbrakk> \<Longrightarrow> f (x^\<^bsup>A n\<^esup>) = f x^\<^bsup>R n\<^esup>
[PROOF STEP]
apply (induct_tac n)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>Ring A; Ring R; x \<in> carrier A; f \<in> rHom A R\<rbrakk> \<Longrightarrow> f (x^\<^bsup>A 0\<^esup>) = f x^\<^bsup>R 0\<^esup>
 2. \<And>n. \<lbrakk>Ring A; Ring R; x \<in> carrier A; f \<in> rHom A R; f (x^\<^bsup>A n\<^esup>) = f x^\<^bsup>R n\<^esup>\<rbrakk> \<Longrightarrow> f (x^\<^bsup>A Suc n\<^esup>) = f x^\<^bsup>R Suc n\<^esup>
[PROOF STEP]
apply (simp add:rHom_one)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>Ring A; Ring R; x \<in> carrier A; f \<in> rHom A R; f (x^\<^bsup>A n\<^esup>) = f x^\<^bsup>R n\<^esup>\<rbrakk> \<Longrightarrow> f (x^\<^bsup>A Suc n\<^esup>) = f x^\<^bsup>R Suc n\<^esup>
[PROOF STEP]
apply (simp,
      frule_tac n = n in Ring.npClose[of "A" "x"], assumption+,
      subst rHom_tOp[of "A" "R" _ "x" "f"], assumption+, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma perm_eq_iff:
  fixes p q :: "perm"
  shows "p = q \<longleftrightarrow> (\<forall>a::atom. p \<bullet> a = q \<bullet> a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p = q) = (\<forall>a. p \<bullet> a = q \<bullet> a)
[PROOF STEP]
unfolding permute_atom_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p = q) = (\<forall>a. Rep_perm p a = Rep_perm q a)
[PROOF STEP]
by (metis Rep_perm_ext ext)


[STATEMENT]
lemma upper_asymptotic_density_infinite_interval [simp]:
  "upper_asymptotic_density {N..} = 1"
  "upper_asymptotic_density {N<..} = 1"
  "upper_asymptotic_density UNIV = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. upper_asymptotic_density {N..} = 1 &&& upper_asymptotic_density {N<..} = 1 &&& upper_asymptotic_density UNIV = 1
[PROOF STEP]
by (metis antisym upper_asymptotic_density_in_01(2) lower_asymptotic_density_infinite_interval lower_asymptotic_density_le_upper)+


[STATEMENT]
lemma smult_distrib_left_diff :
  "\<lbrakk> r \<in> R; m \<in> M; n \<in> M \<rbrakk> \<Longrightarrow> r \<cdot> (m - n) = r \<cdot> m - r \<cdot> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>r \<in> R; m \<in> M; n \<in> M\<rbrakk> \<Longrightarrow> r \<cdot> (m - n) = r \<cdot> m - r \<cdot> n
[PROOF STEP]
using neg_closed smult_distrib_left[of r m "-n"] smult_neg
[PROOF STATE]
proof (prove)
using this:
?g \<in> M \<Longrightarrow> - ?g \<in> M
\<lbrakk>r \<in> R; m \<in> M; - n \<in> M\<rbrakk> \<Longrightarrow> r \<cdot> (m + - n) = r \<cdot> m + r \<cdot> - n
\<lbrakk>?r \<in> R; ?m \<in> M\<rbrakk> \<Longrightarrow> ?r \<cdot> - ?m = - (?r \<cdot> ?m)

goal (1 subgoal):
 1. \<lbrakk>r \<in> R; m \<in> M; n \<in> M\<rbrakk> \<Longrightarrow> r \<cdot> (m - n) = r \<cdot> m - r \<cdot> n
[PROOF STEP]
by (simp add: algebra_simps)


[STATEMENT]
lemma poly_pos_between_leq_less:
  "(\<forall>x::real. a \<le> x \<and> x < b \<longrightarrow> poly p x > 0) \<longleftrightarrow>
    (a \<ge> b \<or> poly p a > 0) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x) = ((b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0))
[PROOF STEP]
proof (intro iffI conjI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x \<Longrightarrow> b \<le> a \<or> 0 < poly p a
 2. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
 3. (b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0) \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
assume A: "\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x > 0"
[PROOF STATE]
proof (state)
this:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x

goal (3 subgoals):
 1. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x \<Longrightarrow> b \<le> a \<or> 0 < poly p a
 2. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
 3. (b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0) \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
have "\<And>x. poly p (x::real) > 0 \<Longrightarrow> poly p x \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. 0 < poly p x \<Longrightarrow> poly p x \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < poly p ?x \<Longrightarrow> poly p ?x \<noteq> 0

goal (3 subgoals):
 1. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x \<Longrightarrow> b \<le> a \<or> 0 < poly p a
 2. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
 3. (b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0) \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
with A
[PROOF STATE]
proof (chain)
picking this:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
0 < poly p ?x \<Longrightarrow> poly p ?x \<noteq> 0
[PROOF STEP]
show "\<forall>x::real. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
0 < poly p ?x \<Longrightarrow> poly p ?x \<noteq> 0

goal (1 subgoal):
 1. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0

goal (2 subgoals):
 1. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x \<Longrightarrow> b \<le> a \<or> 0 < poly p a
 2. (b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0) \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
from A
[PROOF STATE]
proof (chain)
picking this:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
show "a \<ge> b \<or> poly p a > 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x

goal (1 subgoal):
 1. b \<le> a \<or> 0 < poly p a
[PROOF STEP]
by (cases "a < b", auto)
[PROOF STATE]
proof (state)
this:
b \<le> a \<or> 0 < poly p a

goal (1 subgoal):
 1. (b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0) \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0) \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
assume "(b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a\<le>x \<and> x<b \<longrightarrow> poly p x \<noteq> 0)"
[PROOF STATE]
proof (state)
this:
(b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0)

goal (1 subgoal):
 1. (b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0) \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
hence A: "b \<le> a \<or> 0 < poly p a" and B: "\<forall>x. a\<le>x \<and> x<b \<longrightarrow> poly p x \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
(b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0)

goal (1 subgoal):
 1. b \<le> a \<or> 0 < poly p a &&& \<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
b \<le> a \<or> 0 < poly p a
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0

goal (1 subgoal):
 1. (b \<le> a \<or> 0 < poly p a) \<and> (\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0) \<Longrightarrow> \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
show "\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x
[PROOF STEP]
proof (cases "a \<ge> b", simp, clarify, rule_tac ccontr,
         simp only: not_le not_less)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>a < b; a \<le> x; x < b; poly p x \<le> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>a < b; a \<le> x; x < b; poly p x \<le> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
assume "a < b" "a \<le> x" "x < b" "poly p x \<le> 0"
[PROOF STATE]
proof (state)
this:
a < b
a \<le> x
x < b
poly p x \<le> 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>a < b; a \<le> x; x < b; poly p x \<le> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
with B
[PROOF STATE]
proof (chain)
picking this:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
a < b
a \<le> x
x < b
poly p x \<le> 0
[PROOF STEP]
have "poly p x < 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
a < b
a \<le> x
x < b
poly p x \<le> 0

goal (1 subgoal):
 1. poly p x < 0
[PROOF STEP]
by (simp add: less_eq_real_def)
[PROOF STATE]
proof (state)
this:
poly p x < 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>a < b; a \<le> x; x < b; poly p x \<le> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
poly p x < 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>a < b; a \<le> x; x < b; poly p x \<le> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
from A and \<open>a < b\<close>
[PROOF STATE]
proof (chain)
picking this:
b \<le> a \<or> 0 < poly p a
a < b
[PROOF STEP]
have "poly p a > 0"
[PROOF STATE]
proof (prove)
using this:
b \<le> a \<or> 0 < poly p a
a < b

goal (1 subgoal):
 1. 0 < poly p a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < poly p a

goal (1 subgoal):
 1. \<And>x. \<lbrakk>a < b; a \<le> x; x < b; poly p x \<le> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
poly p x < 0
0 < poly p a
[PROOF STEP]
have "x > a"
[PROOF STATE]
proof (prove)
using this:
poly p x < 0
0 < poly p a

goal (1 subgoal):
 1. a < x
[PROOF STEP]
using \<open>x \<ge> a\<close>
[PROOF STATE]
proof (prove)
using this:
poly p x < 0
0 < poly p a
a \<le> x

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

goal (1 subgoal):
 1. \<And>x. \<lbrakk>a < b; a \<le> x; x < b; poly p x \<le> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
from \<open>poly p x < 0\<close> and \<open>poly p a > 0\<close>
[PROOF STATE]
proof (chain)
picking this:
poly p x < 0
0 < poly p a
[PROOF STEP]
have "sgn (poly p a) \<noteq> sgn (poly p x)"
[PROOF STATE]
proof (prove)
using this:
poly p x < 0
0 < poly p a

goal (1 subgoal):
 1. sgn (poly p a) \<noteq> sgn (poly p x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sgn (poly p a) \<noteq> sgn (poly p x)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>a < b; a \<le> x; x < b; poly p x \<le> 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
from poly_different_sign_imp_root[OF \<open>x > a\<close> this] and B and \<open>x < b\<close>
[PROOF STATE]
proof (chain)
picking this:
\<exists>xa\<ge>a. xa \<le> x \<and> poly p xa = 0
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
x < b
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<exists>xa\<ge>a. xa \<le> x \<and> poly p xa = 0
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> poly p x \<noteq> 0
x < b

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:
\<forall>x. a \<le> x \<and> x < b \<longrightarrow> 0 < poly p x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma timeFrame_assoc[simp]: "timeFrame n (timeFrame n' f) = timeFrame (n+n') f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. timeFrame n (timeFrame n' f) = timeFrame (n + n') f
[PROOF STEP]
by (metis (no_types, lifting) ab_semigroup_add_class.add_ac(1) timeFrame.elims timeFrame.simps(1))


[STATEMENT]
lemma eval_fds_deriv_zeta:
  assumes "Re s > 1"
  shows   "eval_fds (fds_deriv fds_zeta) s = deriv zeta s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fds (fds_deriv fds_zeta) s = deriv zeta s
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eval_fds (fds_deriv fds_zeta) s = deriv zeta s
[PROOF STEP]
have ev: "eventually (\<lambda>z. z \<in> {z. Re z > 1}) (nhds s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F z in nhds s. z \<in> {z. 1 < Re z}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
1 < Re s

goal (1 subgoal):
 1. \<forall>\<^sub>F z in nhds s. z \<in> {z. 1 < Re z}
[PROOF STEP]
by (intro eventually_nhds_in_open open_halfspace_Re_gt) auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F z in nhds s. z \<in> {z. 1 < Re z}

goal (1 subgoal):
 1. eval_fds (fds_deriv fds_zeta) s = deriv zeta s
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
1 < Re s
[PROOF STEP]
have "eval_fds (fds_deriv fds_zeta) s = deriv (eval_fds fds_zeta) s"
[PROOF STATE]
proof (prove)
using this:
1 < Re s

goal (1 subgoal):
 1. eval_fds (fds_deriv fds_zeta) s = deriv (eval_fds fds_zeta) s
[PROOF STEP]
by (subst eval_fds_deriv) auto
[PROOF STATE]
proof (state)
this:
eval_fds (fds_deriv fds_zeta) s = deriv (eval_fds fds_zeta) s

goal (1 subgoal):
 1. eval_fds (fds_deriv fds_zeta) s = deriv zeta s
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
eval_fds (fds_deriv fds_zeta) s = deriv (eval_fds fds_zeta) s

goal (1 subgoal):
 1. eval_fds (fds_deriv fds_zeta) s = deriv zeta s
[PROOF STEP]
have "\<dots> = deriv zeta s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deriv (eval_fds fds_zeta) s = deriv zeta s
[PROOF STEP]
by (intro deriv_cong_ev eventually_mono[OF ev]) (auto simp: eval_fds_zeta)
[PROOF STATE]
proof (state)
this:
deriv (eval_fds fds_zeta) s = deriv zeta s

goal (1 subgoal):
 1. eval_fds (fds_deriv fds_zeta) s = deriv zeta s
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
eval_fds (fds_deriv fds_zeta) s = deriv zeta s
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
eval_fds (fds_deriv fds_zeta) s = deriv zeta s

goal (1 subgoal):
 1. eval_fds (fds_deriv fds_zeta) s = deriv zeta s
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
eval_fds (fds_deriv fds_zeta) s = deriv zeta s

goal:
No subgoals!
[PROOF STEP]
qed