[STATEMENT]
lemma unity_div:
 fixes a :: int and d :: nat
 assumes "d dvd k"
 shows "unity_root k (a*d) = unity_root (k div d) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
have 1: "(2*pi*(a*d)/k) = (2*pi*a)/(k div d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * pi * real_of_int (a * int d) / real k = 2 * pi * real_of_int a / real (k div d)
[PROOF STEP]
using Suc_pred assms
[PROOF STATE]
proof (prove)
using this:
0 < ?n \<Longrightarrow> Suc (?n - Suc 0) = ?n
d dvd k

goal (1 subgoal):
 1. 2 * pi * real_of_int (a * int d) / real k = 2 * pi * real_of_int a / real (k div d)
[PROOF STEP]
by (simp add: divide_simps, fastforce)
[PROOF STATE]
proof (state)
this:
2 * pi * real_of_int (a * int d) / real k = 2 * pi * real_of_int a / real (k div d)

goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
have "unity_root k (a*d) = exp ((2*pi*(a*d)/k)* \<i>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unity_root k (a * int d) = exp (complex_of_real (2 * pi * real_of_int (a * int d) / real k) * \<i>)
[PROOF STEP]
using unity_root_conv_exp
[PROOF STATE]
proof (prove)
using this:
unity_root ?k ?n = exp (complex_of_real (2 * pi * real_of_int ?n / real ?k) * \<i>)

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

goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
unity_root k (a * int d) = exp (complex_of_real (2 * pi * real_of_int (a * int d) / real k) * \<i>)

goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
have "\<dots> = exp (((2*pi*a)/(k div d))* \<i>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp (complex_of_real (2 * pi * real_of_int (a * int d) / real k) * \<i>) = exp (complex_of_real (2 * pi * real_of_int a / real (k div d)) * \<i>)
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
2 * pi * real_of_int (a * int d) / real k = 2 * pi * real_of_int a / real (k div d)

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

goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
exp (complex_of_real (2 * pi * real_of_int (a * int d) / real k) * \<i>) = exp (complex_of_real (2 * pi * real_of_int a / real (k div d)) * \<i>)

goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
have "\<dots> = unity_root (k div d) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp (complex_of_real (2 * pi * real_of_int a / real (k div d)) * \<i>) = unity_root (k div d) a
[PROOF STEP]
using unity_root_conv_exp
[PROOF STATE]
proof (prove)
using this:
unity_root ?k ?n = exp (complex_of_real (2 * pi * real_of_int ?n / real ?k) * \<i>)

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

goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
unity_root k (a * int d) = unity_root (k div d) a

goal (1 subgoal):
 1. unity_root k (a * int d) = unity_root (k div d) a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
unity_root k (a * int d) = unity_root (k div d) a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hypext_fun_power:
  assumes "f twice_field_differentiable_at (Base x)"
    shows "(*h* (\<lambda>x. (f x) ^ n)) x = ((*h* f) x) ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (*h* (\<lambda>x. f x ^ n)) x = (*h* f) x ^ n
[PROOF STEP]
using assms hypext_compose[of f x "\<lambda>x. x ^ n"]
[PROOF STATE]
proof (prove)
using this:
f twice_field_differentiable_at Base x
\<lbrakk>f twice_field_differentiable_at Base x; (\<lambda>x. x ^ n) twice_field_differentiable_at f (Base x)\<rbrakk> \<Longrightarrow> (*h* (\<lambda>x. f x ^ n)) x = (*h* (\<lambda>x. x ^ n)) ((*h* f) x)

goal (1 subgoal):
 1. (*h* (\<lambda>x. f x ^ n)) x = (*h* f) x ^ n
[PROOF STEP]
by (simp add: hypext_power)


[STATEMENT]
lemma
  rbt_del_from_left_rbt_less: "\<lbrakk> lt |\<guillemotleft> v; rt |\<guillemotleft> v; k < v\<rbrakk> \<Longrightarrow> rbt_del_from_left x lt k y rt |\<guillemotleft> v"
  and rbt_del_from_right_rbt_less: "\<lbrakk>lt |\<guillemotleft> v; rt |\<guillemotleft> v; k < v\<rbrakk> \<Longrightarrow> rbt_del_from_right x lt k y rt |\<guillemotleft> v"
  and rbt_del_rbt_less: "lt |\<guillemotleft> v \<Longrightarrow> rbt_del x lt |\<guillemotleft> v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lbrakk>lt |\<guillemotleft> v; rt |\<guillemotleft> v; k < v\<rbrakk> \<Longrightarrow> rbt_del_from_left x lt k y rt |\<guillemotleft> v) &&& (\<lbrakk>lt |\<guillemotleft> v; rt |\<guillemotleft> v; k < v\<rbrakk> \<Longrightarrow> rbt_del_from_right x lt k y rt |\<guillemotleft> v) &&& (lt |\<guillemotleft> v \<Longrightarrow> rbt_del x lt |\<guillemotleft> v)
[PROOF STEP]
by (induct x lt k y rt and x lt k y rt and x lt rule: rbt_del_from_left_rbt_del_from_right_rbt_del.induct)
   (auto simp: balance_left_rbt_less balance_right_rbt_less)


[STATEMENT]
lemma ln_le_minus_one: "0 < x \<Longrightarrow> ln x \<le> x - 1"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> ln x \<le> x - 1
[PROOF STEP]
using exp_ge_add_one_self[of "ln x"]
[PROOF STATE]
proof (prove)
using this:
1 + ln x \<le> exp (ln x)

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


[STATEMENT]
lemma subspace_kernel: "m1.subspace {x. f x = 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m1.subspace {x. f x = (0::'c)}
[PROOF STEP]
using subspace_vimage[OF m2.subspace_single_0]
[PROOF STATE]
proof (prove)
using this:
m1.subspace (f -` {0::'c})

goal (1 subgoal):
 1. m1.subspace {x. f x = (0::'c)}
[PROOF STEP]
by (simp add: vimage_def)


[STATEMENT]
lemma ennreal_minus_if: "ennreal a - ennreal b = ennreal (if 0 \<le> b then (if b \<le> a then a - b else 0) else a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal a - ennreal b = ennreal (if 0 \<le> b then if b \<le> a then a - b else 0 else a)
[PROOF STEP]
by (auto simp: ennreal_minus ennreal_neg)


[STATEMENT]
lemma orthogonal_transformation_quat_congruence:
  assumes "norm q = 1"
  shows "orthogonal_transformation (\<lambda>x. HIm(cnj q * Hv x * q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
have nq: "(quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2 = 1
[PROOF STEP]
using assms norm_quat_def
[PROOF STATE]
proof (prove)
using this:
norm q = 1
norm ?z = sqrt ((quat.Re ?z)\<^sup>2 + (Im1 ?z)\<^sup>2 + (Im2 ?z)\<^sup>2 + (Im3 ?z)\<^sup>2)

goal (1 subgoal):
 1. (quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2 = 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2 = 1

goal (1 subgoal):
 1. orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
have "Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) (\<lambda>x. HIm (cnj q * Hv x * q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>b1 b2. HIm (Quaternions.cnj q * Hv (b1 + b2) * q) = HIm (Quaternions.cnj q * Hv b1 * q) + HIm (Quaternions.cnj q * Hv b2 * q)
 2. \<And>r b. HIm (Quaternions.cnj q * Hv (r *\<^sub>R b) * q) = r *\<^sub>R HIm (Quaternions.cnj q * Hv b * q)
[PROOF STEP]
show "\<And>r b. HIm (cnj q * Hv (r *\<^sub>R b) * q) = r *\<^sub>R HIm (cnj q * Hv b * q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>r b. HIm (Quaternions.cnj q * Hv (r *\<^sub>R b) * q) = r *\<^sub>R HIm (Quaternions.cnj q * Hv b * q)
[PROOF STEP]
by (metis him_mult_left hv_cmult mult_scaleR_left mult_scaleR_right scaleR_conv_of_real)
[PROOF STATE]
proof (state)
this:
HIm (Quaternions.cnj q * Hv (?r *\<^sub>R ?b) * q) = ?r *\<^sub>R HIm (Quaternions.cnj q * Hv ?b * q)

goal (1 subgoal):
 1. \<And>b1 b2. HIm (Quaternions.cnj q * Hv (b1 + b2) * q) = HIm (Quaternions.cnj q * Hv b1 * q) + HIm (Quaternions.cnj q * Hv b2 * q)
[PROOF STEP]
qed (simp add: distrib_left distrib_right)
[PROOF STATE]
proof (state)
this:
Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))

goal (1 subgoal):
 1. orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))

goal (1 subgoal):
 1. orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
have "HIm (cnj q * Hv v * q) \<bullet> HIm (cnj q * Hv w * q) = ((quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2)\<^sup>2 * (v \<bullet> w)" for v w
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. HIm (Quaternions.cnj q * Hv v * q) \<bullet> HIm (Quaternions.cnj q * Hv w * q) = ((quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2)\<^sup>2 * (v \<bullet> w)
[PROOF STEP]
by (simp add: HIm_def inner_vec_def sum_3 power2_eq_square algebra_simps)
[PROOF STATE]
proof (state)
this:
HIm (Quaternions.cnj q * Hv ?v * q) \<bullet> HIm (Quaternions.cnj q * Hv ?w * q) = ((quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2)\<^sup>2 * (?v \<bullet> ?w)

goal (1 subgoal):
 1. orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
(*SLOW, like 15s*)
[PROOF STATE]
proof (state)
this:
HIm (Quaternions.cnj q * Hv ?v * q) \<bullet> HIm (Quaternions.cnj q * Hv ?w * q) = ((quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2)\<^sup>2 * (?v \<bullet> ?w)

goal (1 subgoal):
 1. orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
HIm (Quaternions.cnj q * Hv ?v * q) \<bullet> HIm (Quaternions.cnj q * Hv ?w * q) = ((quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2)\<^sup>2 * (?v \<bullet> ?w)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Vector_Spaces.linear (*\<^sub>R) (*\<^sub>R) (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
HIm (Quaternions.cnj q * Hv ?v * q) \<bullet> HIm (Quaternions.cnj q * Hv ?w * q) = ((quat.Re q)\<^sup>2 + (Im1 q)\<^sup>2 + (Im2 q)\<^sup>2 + (Im3 q)\<^sup>2)\<^sup>2 * (?v \<bullet> ?w)

goal (1 subgoal):
 1. orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))
[PROOF STEP]
by (simp add: orthogonal_transformation_def linear_def nq)
[PROOF STATE]
proof (state)
this:
orthogonal_transformation (\<lambda>x. HIm (Quaternions.cnj q * Hv x * q))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poincare_map_in_planeI:
  assumes "returns_to (plane n c) x0"
  shows "poincare_map (plane n c) x0 \<bullet> n = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_map (plane n c) x0 \<bullet> n = c
[PROOF STEP]
using poincare_map_returns[OF assms]
[PROOF STATE]
proof (prove)
using this:
closed (plane n c) \<Longrightarrow> poincare_map (plane n c) x0 \<in> plane n c

goal (1 subgoal):
 1. poincare_map (plane n c) x0 \<bullet> n = c
[PROOF STEP]
by fastforce


[STATEMENT]
lemma sameprod_\<G>: assumes "X \<subseteq> [m]" "card X \<ge> 2"
  shows "X^\<two> \<in> \<G>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X^\<two> \<in> \<G>
[PROOF STEP]
unfolding \<G>_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X^\<two> \<in> {G. G \<subseteq> [m]^\<two>}
[PROOF STEP]
using assms(2) sameprod_mono[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
2 \<le> card X
X^\<two> \<subseteq> [m]^\<two>

goal (1 subgoal):
 1. X^\<two> \<in> {G. G \<subseteq> [m]^\<two>}
[PROOF STEP]
by auto


[STATEMENT]
theorem equivalence: "equivalence S Equivalence"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equivalence S Equivalence
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. Equivalence \<subseteq> S \<times> S
 2. \<And>a. a \<in> S \<Longrightarrow> (a, a) \<in> Equivalence
 3. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 4. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
show "Equivalence \<subseteq> S \<times> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Equivalence \<subseteq> S \<times> S
[PROOF STEP]
unfolding Equivalence_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A} \<subseteq> S \<times> S
[PROOF STEP]
using subset
[PROOF STATE]
proof (prove)
using this:
P \<subseteq> Pow S

goal (1 subgoal):
 1. {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A} \<subseteq> S \<times> S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Equivalence \<subseteq> S \<times> S

goal (3 subgoals):
 1. \<And>a. a \<in> S \<Longrightarrow> (a, a) \<in> Equivalence
 2. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 3. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>a. a \<in> S \<Longrightarrow> (a, a) \<in> Equivalence
 2. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 3. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>a. a \<in> S \<Longrightarrow> (a, a) \<in> Equivalence
 2. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 3. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
assume "a \<in> S"
[PROOF STATE]
proof (state)
this:
a \<in> S

goal (3 subgoals):
 1. \<And>a. a \<in> S \<Longrightarrow> (a, a) \<in> Equivalence
 2. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 3. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> S
[PROOF STEP]
show "(a, a) \<in> Equivalence"
[PROOF STATE]
proof (prove)
using this:
a \<in> S

goal (1 subgoal):
 1. (a, a) \<in> Equivalence
[PROOF STEP]
unfolding Equivalence_def
[PROOF STATE]
proof (prove)
using this:
a \<in> S

goal (1 subgoal):
 1. (a, a) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}
[PROOF STEP]
using complete
[PROOF STATE]
proof (prove)
using this:
a \<in> S
\<Union> P = S

goal (1 subgoal):
 1. (a, a) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(a, a) \<in> Equivalence

goal (2 subgoals):
 1. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 2. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 2. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
fix a and b
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 2. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
assume "(a, b) \<in> Equivalence"
[PROOF STATE]
proof (state)
this:
(a, b) \<in> Equivalence

goal (2 subgoals):
 1. \<And>a b. (a, b) \<in> Equivalence \<Longrightarrow> (b, a) \<in> Equivalence
 2. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(a, b) \<in> Equivalence
[PROOF STEP]
show "(b, a) \<in> Equivalence"
[PROOF STATE]
proof (prove)
using this:
(a, b) \<in> Equivalence

goal (1 subgoal):
 1. (b, a) \<in> Equivalence
[PROOF STEP]
unfolding Equivalence_def
[PROOF STATE]
proof (prove)
using this:
(a, b) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}

goal (1 subgoal):
 1. (b, a) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(b, a) \<in> Equivalence

goal (1 subgoal):
 1. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
fix a and b and c
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
assume "(a, b) \<in> Equivalence" "(b, c) \<in> Equivalence"
[PROOF STATE]
proof (state)
this:
(a, b) \<in> Equivalence
(b, c) \<in> Equivalence

goal (1 subgoal):
 1. \<And>a b c. \<lbrakk>(a, b) \<in> Equivalence; (b, c) \<in> Equivalence\<rbrakk> \<Longrightarrow> (a, c) \<in> Equivalence
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(a, b) \<in> Equivalence
(b, c) \<in> Equivalence
[PROOF STEP]
show "(a, c) \<in> Equivalence"
[PROOF STATE]
proof (prove)
using this:
(a, b) \<in> Equivalence
(b, c) \<in> Equivalence

goal (1 subgoal):
 1. (a, c) \<in> Equivalence
[PROOF STEP]
unfolding Equivalence_def
[PROOF STATE]
proof (prove)
using this:
(a, b) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}
(b, c) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}

goal (1 subgoal):
 1. (a, c) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}
[PROOF STEP]
using disjoint
[PROOF STATE]
proof (prove)
using this:
(a, b) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}
(b, c) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}
\<lbrakk>?A \<in> P; ?B \<in> P; ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<inter> ?B = {}

goal (1 subgoal):
 1. (a, c) \<in> {(a, b). \<exists>A\<in>P. a \<in> A \<and> b \<in> A}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(a, c) \<in> Equivalence

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma distinctPermSimps[simp]:
  fixes p :: "name prm"
  and   a :: name
  and   b :: name

  shows "distinctPerm([]::name prm)"
  and   "(distinctPerm((a, b)#p)) = (distinctPerm p \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinctPerm [] &&& distinctPerm ((a, b) # p) = (distinctPerm p \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p)
[PROOF STEP]
apply(simp add: distinctPerm_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinctPerm ((a, b) # p) = (distinctPerm p \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p)
[PROOF STEP]
apply(induct p)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. distinctPerm [(a, b)] = (distinctPerm [] \<and> a \<noteq> b \<and> a \<sharp> [] \<and> b \<sharp> [])
 2. \<And>aa p. distinctPerm ((a, b) # p) = (distinctPerm p \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p) \<Longrightarrow> distinctPerm ((a, b) # aa # p) = (distinctPerm (aa # p) \<and> a \<noteq> b \<and> a \<sharp> (aa # p) \<and> b \<sharp> (aa # p))
[PROOF STEP]
apply(unfold distinctPerm_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. distinct (map fst [(a, b)] @ map snd [(a, b)]) = (distinct (map fst [] @ map snd []) \<and> a \<noteq> b \<and> a \<sharp> [] \<and> b \<sharp> [])
 2. \<And>aa p. distinct (map fst ((a, b) # p) @ map snd ((a, b) # p)) = (distinct (map fst p @ map snd p) \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p) \<Longrightarrow> distinct (map fst ((a, b) # aa # p) @ map snd ((a, b) # aa # p)) = (distinct (map fst (aa # p) @ map snd (aa # p)) \<and> a \<noteq> b \<and> a \<sharp> (aa # p) \<and> b \<sharp> (aa # p))
[PROOF STEP]
apply(clarsimp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>aa p. distinct (map fst ((a, b) # p) @ map snd ((a, b) # p)) = (distinct (map fst p @ map snd p) \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p) \<Longrightarrow> distinct (map fst ((a, b) # aa # p) @ map snd ((a, b) # aa # p)) = (distinct (map fst (aa # p) @ map snd (aa # p)) \<and> a \<noteq> b \<and> a \<sharp> (aa # p) \<and> b \<sharp> (aa # p))
[PROOF STEP]
apply(rule iffI, erule iffE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>aa p. \<lbrakk>distinct (map fst ((a, b) # aa # p) @ map snd ((a, b) # aa # p)); distinct (map fst ((a, b) # p) @ map snd ((a, b) # p)) \<longrightarrow> distinct (map fst p @ map snd p) \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p; distinct (map fst p @ map snd p) \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p \<longrightarrow> distinct (map fst ((a, b) # p) @ map snd ((a, b) # p))\<rbrakk> \<Longrightarrow> distinct (map fst (aa # p) @ map snd (aa # p)) \<and> a \<noteq> b \<and> a \<sharp> (aa # p) \<and> b \<sharp> (aa # p)
 2. \<And>aa p. \<lbrakk>distinct (map fst ((a, b) # p) @ map snd ((a, b) # p)) = (distinct (map fst p @ map snd p) \<and> a \<noteq> b \<and> a \<sharp> p \<and> b \<sharp> p); distinct (map fst (aa # p) @ map snd (aa # p)) \<and> a \<noteq> b \<and> a \<sharp> (aa # p) \<and> b \<sharp> (aa # p)\<rbrakk> \<Longrightarrow> distinct (map fst ((a, b) # aa # p) @ map snd ((a, b) # aa # p))
[PROOF STEP]
by(clarsimp)+


[STATEMENT]
lemma interior_eq: "interior S = S \<longleftrightarrow> open S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (interior S = S) = open S
[PROOF STEP]
by (metis open_interior interior_open)


[STATEMENT]
lemma alpha_superlinear: "b > 2 \<Longrightarrow> int n \<le> \<alpha> b n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 < b \<Longrightarrow> int n \<le> \<alpha> b n
[PROOF STEP]
apply (induction n, auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>int n \<le> \<alpha> b n; 2 < b\<rbrakk> \<Longrightarrow> 1 + int n \<le> \<alpha> b (Suc n)
[PROOF STEP]
by (smt Suc_1 alpha_strictly_increasing less_imp_of_nat_less of_nat_1 of_nat_Suc)


[STATEMENT]
lemma hoare_choice: "hoare p (x \<sqinter> y) q = ((hoare p) x q & (hoare p y q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hoare p (x \<sqinter> y) q = (hoare p x q \<and> hoare p y q)
[PROOF STEP]
apply (unfold hoare_def wp_choice inf_fun_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p \<le> wp x q \<sqinter> wp y q) = (p \<le> wp x q \<and> p \<le> wp y q)
[PROOF STEP]
by auto


[STATEMENT]
lemma one_mod_qr_poly [simp]:
  "1 mod (qr_poly :: 'a :: qr_spec mod_ring poly) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 mod qr_poly = 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 mod qr_poly = 1
[PROOF STEP]
have "2 ^ 1 \<le> (2 ^ deg_qr TYPE('a) :: nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ 1 \<le> 2 ^ deg_qr TYPE('a)
[PROOF STEP]
using deg_qr_pos[where ?'a = 'a]
[PROOF STATE]
proof (prove)
using this:
0 < deg_qr TYPE('a)

goal (1 subgoal):
 1. 2 ^ 1 \<le> 2 ^ deg_qr TYPE('a)
[PROOF STEP]
by (intro power_increasing) auto
[PROOF STATE]
proof (state)
this:
2 ^ 1 \<le> 2 ^ deg_qr TYPE('a)

goal (1 subgoal):
 1. 1 mod qr_poly = 1
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
2 ^ 1 \<le> 2 ^ deg_qr TYPE('a)

goal (1 subgoal):
 1. 1 mod qr_poly = 1
[PROOF STEP]
by (metis degree_qr_poly deg_qr_pos degree_1 mod_poly_less)
[PROOF STATE]
proof (state)
this:
1 mod qr_poly = 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma convergent_ereal: \<comment> \<open>RENAME\<close>
  fixes X :: "nat \<Rightarrow> 'a :: {complete_linorder,linorder_topology}"
  shows "convergent X \<longleftrightarrow> limsup X = liminf X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent X = (limsup X = liminf X)
[PROOF STEP]
using tendsto_iff_Liminf_eq_Limsup[of sequentially]
[PROOF STATE]
proof (prove)
using this:
sequentially \<noteq> bot \<Longrightarrow> ?f \<longlonglongrightarrow> ?f0.0 = (liminf ?f = ?f0.0 \<and> limsup ?f = ?f0.0)

goal (1 subgoal):
 1. convergent X = (limsup X = liminf X)
[PROOF STEP]
by (auto simp: convergent_def)


[STATEMENT]
lemma mset_remove1[simp]: "mset (remove1 a xs) = mset xs - {#a#}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset (remove1 a xs) = mset xs - {#a#}
[PROOF STEP]
by (induct xs) (auto simp add: multiset_eq_iff)


[STATEMENT]
lemma Pi'_iff: "f \<in> Pi' I X \<longleftrightarrow> domain f = I \<and> (\<forall>i\<in>I. f i \<in> X i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> Pi' I X) = (domain f = I \<and> (\<forall>i\<in>I. (f)\<^sub>F i \<in> X i))
[PROOF STEP]
unfolding Pi'_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> {P. domain P = I \<and> (\<forall>i. i \<in> I \<longrightarrow> (P)\<^sub>F i \<in> X i)}) = (domain f = I \<and> (\<forall>i\<in>I. (f)\<^sub>F i \<in> X i))
[PROOF STEP]
by auto


[STATEMENT]
lemma closure_of_eq_empty_gen: "X closure_of S = {} \<longleftrightarrow> disjnt (topspace X) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X closure_of S = {}) = disjnt (topspace X) S
[PROOF STEP]
unfolding disjnt_def closure_of_restrict [where S=S]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X closure_of (topspace X \<inter> S) = {}) = (topspace X \<inter> S = {})
[PROOF STEP]
using closure_of
[PROOF STATE]
proof (prove)
using this:
?X closure_of ?S = topspace ?X \<inter> (?S \<union> ?X derived_set_of ?S)

goal (1 subgoal):
 1. (X closure_of (topspace X \<inter> S) = {}) = (topspace X \<inter> S = {})
[PROOF STEP]
by fastforce


[STATEMENT]
lemma unat_shiftr_shiftl_mask_zero:
  "\<lbrakk> c + a \<ge> LENGTH('a) + b ; c < LENGTH('a) \<rbrakk>
   \<Longrightarrow> unat (((q :: 'a :: len word) >> a << b) AND NOT(mask c)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>LENGTH('a) + b \<le> c + a; c < LENGTH('a)\<rbrakk> \<Longrightarrow> unat ((q >> a << b) AND NOT (mask c)) = 0
[PROOF STEP]
by (fastforce intro: unat_is_aligned_add[where p=0 and n=c, simplified, THEN conjunct2]
                       unat_shiftl_less_t2n unat_shiftr_less_t2n unat_pow_le_intro)


[STATEMENT]
theorem cond_2:
  assumes "ego.s_stop \<ge> other.s_stop"
  shows "collision {0 ..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. collision {0..}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
other.s_stop \<le> ego.s_stop

goal (1 subgoal):
 1. collision {0..}
[PROOF STEP]
apply (intro collision_subset[where t="{0 ..}" and s = "{0 .. max ego.t_stop other.t_stop}"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. other.s_stop \<le> ego.s_stop \<Longrightarrow> collision {0..max ego.t_stop other.t_stop}
 2. other.s_stop \<le> ego.s_stop \<Longrightarrow> {0..max ego.t_stop other.t_stop} \<subseteq> {0..}
[PROOF STEP]
apply (intro ego_other_ivt[where t = "max ego.t_stop other.t_stop"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. other.s_stop \<le> ego.s_stop \<Longrightarrow> other.s (max ego.t_stop other.t_stop) \<le> ego.s (max ego.t_stop other.t_stop)
 2. other.s_stop \<le> ego.s_stop \<Longrightarrow> {0..max ego.t_stop other.t_stop} \<subseteq> {0..}
[PROOF STEP]
apply (auto simp: ego.s_eq_s_stop other.s_eq_s_stop)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem tree_height_estimate:
  "tree_invar t \<Longrightarrow> size (tree_to_multiset t) = (2::nat)^(height_tree t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tree_invar t \<Longrightarrow> size (tree_to_multiset t) = 2 ^ height_tree t
[PROOF STEP]
apply (cases t, simp only:)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2 x3 x4. \<lbrakk>tree_invar (Node x1 x2 x3 x4); t = Node x1 x2 x3 x4\<rbrakk> \<Longrightarrow> size (tree_to_multiset (Node x1 x2 x3 x4)) = 2 ^ height_tree (Node x1 x2 x3 x4)
[PROOF STEP]
apply (frule tree_rank_estimate)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2 x3 x4. \<lbrakk>tree_invar (Node x1 x2 x3 x4); t = Node x1 x2 x3 x4; size (tree_to_multiset (Node x1 x2 x3 x4)) = 2 ^ x3\<rbrakk> \<Longrightarrow> size (tree_to_multiset (Node x1 x2 x3 x4)) = 2 ^ height_tree (Node x1 x2 x3 x4)
[PROOF STEP]
apply (frule tree_rank_height)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x1 x2 x3 x4. \<lbrakk>tree_invar (Node x1 x2 x3 x4); t = Node x1 x2 x3 x4; size (tree_to_multiset (Node x1 x2 x3 x4)) = 2 ^ x3; height_tree (Node x1 x2 x3 x4) = x3\<rbrakk> \<Longrightarrow> size (tree_to_multiset (Node x1 x2 x3 x4)) = 2 ^ height_tree (Node x1 x2 x3 x4)
[PROOF STEP]
apply (simp only: )
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma LIMSEQ_norm_0_pow:
  assumes "k > 0" "b > 1"
  assumes  "\<And>n::nat. norm (s n) \<le> k / b^n"
  shows "s \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s \<longlonglongrightarrow> (0::'a)
[PROOF STEP]
proof (rule metric_LIMSEQ_I)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. dist (s n) (0::'a) < r
[PROOF STEP]
fix e
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. dist (s n) (0::'a) < r
[PROOF STEP]
assume "e > (0::real)"
[PROOF STATE]
proof (state)
this:
0 < e

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. dist (s n) (0::'a) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < e
[PROOF STEP]
have "k / e > 0"
[PROOF STATE]
proof (prove)
using this:
0 < e

goal (1 subgoal):
 1. 0 < k / e
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
0 < e
0 < k

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

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. dist (s n) (0::'a) < r
[PROOF STEP]
obtain N where N: "b^(N::nat) > k / e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>N. k / e < b ^ N \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
1 < b

goal (1 subgoal):
 1. (\<And>N. k / e < b ^ N \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using real_arch_pow
[PROOF STATE]
proof (prove)
using this:
1 < b
1 < ?x \<Longrightarrow> \<exists>n. ?y < ?x ^ n

goal (1 subgoal):
 1. (\<And>N. k / e < b ^ N \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
k / e < b ^ N

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. dist (s n) (0::'a) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k / e < b ^ N
[PROOF STEP]
have "norm (s n) < e" if "n \<ge> N" for n
[PROOF STATE]
proof (prove)
using this:
k / e < b ^ N

goal (1 subgoal):
 1. norm (s n) < e
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k / e < b ^ N \<Longrightarrow> norm (s n) < e
[PROOF STEP]
have "k / b^n \<le> k / b^N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k / b ^ n \<le> k / b ^ N
[PROOF STEP]
by (smt assms(1) assms(2) frac_le leD power_less_imp_less_exp that zero_less_power)
[PROOF STATE]
proof (state)
this:
k / b ^ n \<le> k / b ^ N

goal (1 subgoal):
 1. k / e < b ^ N \<Longrightarrow> norm (s n) < e
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
k / b ^ n \<le> k / b ^ N

goal (1 subgoal):
 1. k / e < b ^ N \<Longrightarrow> norm (s n) < e
[PROOF STEP]
have " ... < e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k / b ^ N < e
[PROOF STEP]
using N
[PROOF STATE]
proof (prove)
using this:
k / e < b ^ N

goal (1 subgoal):
 1. k / b ^ N < e
[PROOF STEP]
by (metis \<open>0 < e\<close> assms(2) less_trans mult.commute pos_divide_less_eq zero_less_one zero_less_power)
[PROOF STATE]
proof (state)
this:
k / b ^ N < e

goal (1 subgoal):
 1. k / e < b ^ N \<Longrightarrow> norm (s n) < e
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
k / b ^ n < e
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
k / b ^ n < e

goal (1 subgoal):
 1. norm (s n) < e
[PROOF STEP]
by (meson assms less_eq_real_def not_le order_trans)
[PROOF STATE]
proof (state)
this:
norm (s n) < e

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
N \<le> ?n \<Longrightarrow> norm (s ?n) < e

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. dist (s n) (0::'a) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
N \<le> ?n \<Longrightarrow> norm (s ?n) < e
[PROOF STEP]
show "\<exists>no. \<forall>n\<ge>no. dist (s n) 0 < e"
[PROOF STATE]
proof (prove)
using this:
N \<le> ?n \<Longrightarrow> norm (s ?n) < e

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. dist (s n) (0::'a) < e
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>no. \<forall>n\<ge>no. dist (s n) (0::'a) < e

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fv_subterms_subst_eq[simp]: "fv\<^sub>s\<^sub>e\<^sub>t (subterms (t \<cdot> \<theta>)) = fv\<^sub>s\<^sub>e\<^sub>t (subterms t \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fv\<^sub>s\<^sub>e\<^sub>t (subterms (t \<cdot> \<theta>)) = fv\<^sub>s\<^sub>e\<^sub>t (subterms t \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>)
[PROOF STEP]
using fv_subterms
[PROOF STATE]
proof (prove)
using this:
fv\<^sub>s\<^sub>e\<^sub>t (subterms ?t) = fv ?t

goal (1 subgoal):
 1. fv\<^sub>s\<^sub>e\<^sub>t (subterms (t \<cdot> \<theta>)) = fv\<^sub>s\<^sub>e\<^sub>t (subterms t \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>)
[PROOF STEP]
by (induct t) force+


[STATEMENT]
lemma poly_exp_expand:
  "p = (prod (\<lambda> (a,i). a ^ i) as) * prod (\<lambda> (a,i). a) as"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p = (\<Prod>(a, i)\<in>as. a ^ i) * (\<Prod>(a, i)\<in>as. a)
[PROOF STEP]
unfolding p prod.distrib[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>(a, i)\<in>as. a ^ Suc i) = (\<Prod>x\<in>as. (case x of (x, xa) \<Rightarrow> x ^ xa) * (case x of (a, i) \<Rightarrow> a))
[PROOF STEP]
by (rule prod.cong, auto)


[STATEMENT]
lemma class_exists_equiv2:
 "(\<exists>x. fst x = cn \<and> x \<in> set (P1 @ P2)) = (class P1 cn \<noteq> None \<or> class P2 cn \<noteq> None)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x. fst x = cn \<and> x \<in> set (P1 @ P2)) = (class P1 cn \<noteq> None \<or> class P2 cn \<noteq> None)
[PROOF STEP]
by (simp only: class_exists_equiv [where P = "P1@P2"], simp add: class_def)


[STATEMENT]
lemma permutep_single:
  "bij f \<Longrightarrow> permutep f (Poly_Mapping.single a b) = Poly_Mapping.single (inv_into UNIV f a) b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij f \<Longrightarrow> permutep f (Poly_Mapping.single a b) = Poly_Mapping.single (inv f a) b
[PROOF STEP]
by transfer (auto simp: fun_eq_iff when_def inv_f_f surj_f_inv_f bij_is_inj bij_is_surj)


[STATEMENT]
lemma dim_eq_card:
  assumes "B \<subseteq> U\<^sub>V\<^sub>S"
    and "V \<subseteq> U\<^sub>V\<^sub>S"
    and BV: "span B = span V"
    and B: "\<not>dependent B"
  shows "dim V = card B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.dim V = card B
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. local.dim V = card B
[PROOF STEP]
define p where "p b \<equiv> b \<subseteq> U\<^sub>V\<^sub>S \<and> \<not>dependent b \<and> span b = span V" for b
[PROOF STATE]
proof (state)
this:
p ?b \<equiv> ?b \<subseteq> U\<^sub>V\<^sub>S \<and> \<not> local.dependent ?b \<and> local.span ?b = local.span V

goal (1 subgoal):
 1. local.dim V = card B
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
B \<subseteq> U\<^sub>V\<^sub>S
V \<subseteq> U\<^sub>V\<^sub>S
local.span B = local.span V
\<not> local.dependent B
[PROOF STEP]
have "p (SOME B. p B)"
[PROOF STATE]
proof (prove)
using this:
B \<subseteq> U\<^sub>V\<^sub>S
V \<subseteq> U\<^sub>V\<^sub>S
local.span B = local.span V
\<not> local.dependent B

goal (1 subgoal):
 1. p (SOME B. p B)
[PROOF STEP]
by (intro someI[of p B], unfold p_def) simp
[PROOF STATE]
proof (state)
this:
p (SOME B. p B)

goal (1 subgoal):
 1. local.dim V = card B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p (SOME B. p B)
[PROOF STEP]
have "\<exists>f. bij_betw f B (SOME B. p B) \<and> (\<forall>x\<in>U\<^sub>V\<^sub>S. f x \<in> U\<^sub>V\<^sub>S)"
[PROOF STATE]
proof (prove)
using this:
p (SOME B. p B)

goal (1 subgoal):
 1. \<exists>f. bij_betw f B (SOME B. p B) \<and> (\<forall>x\<in>U\<^sub>V\<^sub>S. f x \<in> U\<^sub>V\<^sub>S)
[PROOF STEP]
by (subst (asm) p_def, intro bij_if_span_eq_span_bases) (simp_all add: assms)
[PROOF STATE]
proof (state)
this:
\<exists>f. bij_betw f B (SOME B. p B) \<and> (\<forall>x\<in>U\<^sub>V\<^sub>S. f x \<in> U\<^sub>V\<^sub>S)

goal (1 subgoal):
 1. local.dim V = card B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>f. bij_betw f B (SOME B. p B) \<and> (\<forall>x\<in>U\<^sub>V\<^sub>S. f x \<in> U\<^sub>V\<^sub>S)
[PROOF STEP]
have "card B = card (SOME B. p B)"
[PROOF STATE]
proof (prove)
using this:
\<exists>f. bij_betw f B (SOME B. p B) \<and> (\<forall>x\<in>U\<^sub>V\<^sub>S. f x \<in> U\<^sub>V\<^sub>S)

goal (1 subgoal):
 1. card B = card (SOME B. p B)
[PROOF STEP]
by (auto intro: bij_betw_same_card)
[PROOF STATE]
proof (state)
this:
card B = card (SOME B. p B)

goal (1 subgoal):
 1. local.dim V = card B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card B = card (SOME B. p B)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card B = card (SOME B. p B)

goal (1 subgoal):
 1. local.dim V = card B
[PROOF STEP]
using assms(1,3,4)
[PROOF STATE]
proof (prove)
using this:
card B = card (SOME B. p B)
B \<subseteq> U\<^sub>V\<^sub>S
local.span B = local.span V
\<not> local.dependent B

goal (1 subgoal):
 1. local.dim V = card B
[PROOF STEP]
unfolding dim_def p_def
[PROOF STATE]
proof (prove)
using this:
card B = card (SOME B. B \<subseteq> U\<^sub>V\<^sub>S \<and> \<not> local.dependent B \<and> local.span B = local.span V)
B \<subseteq> U\<^sub>V\<^sub>S
local.span B = local.span V
\<not> local.dependent B

goal (1 subgoal):
 1. (if \<exists>b\<subseteq>U\<^sub>V\<^sub>S. \<not> local.dependent b \<and> local.span b = local.span V then card (SOME b. b \<subseteq> U\<^sub>V\<^sub>S \<and> \<not> local.dependent b \<and> local.span b = local.span V) else 0) = card B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
local.dim V = card B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_plus_rearrange2: "a +o (b +o C) = (a + b) +o C"
  for a b :: "'a::semigroup_add"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a +o (b +o C) = (a + b) +o C
[PROOF STEP]
by (auto simp add: elt_set_plus_def add.assoc)


[STATEMENT]
lemma construct_lhs_vector_cleaner:
  assumes "p \<noteq> 0"
  shows "(construct_lhs_vector p qs signs) =
   vec_of_list (map (\<lambda>s. rat_of_int (card {x. poly p x = 0 \<and> ((consistent_sign_vec_copr qs x) = s)})) signs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. construct_lhs_vector p qs signs = vec_of_list (map (\<lambda>s. rat_of_int (int (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = s}))) signs)
[PROOF STEP]
apply (rule eq_vecI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>i. i < dim_vec (vec_of_list (map (\<lambda>s. rat_of_int (int (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = s}))) signs)) \<Longrightarrow> construct_lhs_vector p qs signs $ i = vec_of_list (map (\<lambda>s. rat_of_int (int (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = s}))) signs) $ i
 2. dim_vec (construct_lhs_vector p qs signs) = dim_vec (vec_of_list (map (\<lambda>s. rat_of_int (int (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = s}))) signs))
[PROOF STEP]
apply (auto simp add:  construct_lhs_vector_clean[OF assms] )
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>i. i < length signs \<Longrightarrow> construct_lhs_vector p qs signs $ i = rat_of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = vec_of_list signs $ i})
 2. dim_vec (construct_lhs_vector p qs signs) = length signs
[PROOF STEP]
apply (simp add: vec_of_list_index)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>i. i < length signs \<Longrightarrow> construct_lhs_vector p qs signs $ i = rat_of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
 2. dim_vec (construct_lhs_vector p qs signs) = length signs
[PROOF STEP]
unfolding construct_lhs_vector_def
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>i. i < length signs \<Longrightarrow> vec_of_list (map (\<lambda>w. rat_of_int (int (length (filter (\<lambda>v. v = w) (map (consistent_sign_vec_copr qs) (characterize_root_list_p p)))))) signs) $ i = rat_of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
 2. dim_vec (vec_of_list (map (\<lambda>w. rat_of_int (int (length (filter (\<lambda>v. v = w) (map (consistent_sign_vec_copr qs) (characterize_root_list_p p)))))) signs)) = length signs
[PROOF STEP]
using assms construct_lhs_vector_clean construct_lhs_vector_def
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0
\<lbrakk>?p \<noteq> 0; ?i < length ?signs\<rbrakk> \<Longrightarrow> of_rat (construct_lhs_vector ?p ?qs ?signs $ ?i) = of_nat (card {x. poly ?p x = 0 \<and> consistent_sign_vec_copr ?qs x = ?signs ! ?i})
construct_lhs_vector ?p ?qs ?signs \<equiv> vec_of_list (map (\<lambda>w. rat_of_int (int (length (filter (\<lambda>v. v = w) (map (consistent_sign_vec_copr ?qs) (characterize_root_list_p ?p)))))) ?signs)

goal (2 subgoals):
 1. \<And>i. i < length signs \<Longrightarrow> vec_of_list (map (\<lambda>w. rat_of_int (int (length (filter (\<lambda>v. v = w) (map (consistent_sign_vec_copr qs) (characterize_root_list_p p)))))) signs) $ i = rat_of_nat (card {x. poly p x = 0 \<and> consistent_sign_vec_copr qs x = signs ! i})
 2. dim_vec (vec_of_list (map (\<lambda>w. rat_of_int (int (length (filter (\<lambda>v. v = w) (map (consistent_sign_vec_copr qs) (characterize_root_list_p p)))))) signs)) = length signs
[PROOF STEP]
apply auto[1]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec (vec_of_list (map (\<lambda>w. rat_of_int (int (length (filter (\<lambda>v. v = w) (map (consistent_sign_vec_copr qs) (characterize_root_list_p p)))))) signs)) = length signs
[PROOF STEP]
by simp


[STATEMENT]
lemma infinite_card_of_diff_singl:
assumes "\<not>finite A"
shows "|A - {a}| =o |A|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |A - {a}| =o |A|
[PROOF STEP]
by (metis assms card_of_infinite_diff_finite finite.emptyI finite_insert)


[STATEMENT]
lemma is_process5_sing:
"\<lbrakk> is_process P ; (s,{x}) \<notin> FAILURES P;(s,{}) \<in> FAILURES P\<rbrakk> \<Longrightarrow> (s @ [x],{}) \<in> FAILURES P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_process P; (s, {x}) \<notin> FAILURES P; (s, {}) \<in> FAILURES P\<rbrakk> \<Longrightarrow> (s @ [x], {}) \<in> FAILURES P
[PROOF STEP]
by(drule_tac X="{}" in is_process5_S1, auto)


[STATEMENT]
lemma lemma_2_10_30:
  "((b l\<rightarrow> a) r\<rightarrow> a) l\<rightarrow> a = b l\<rightarrow> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((b l\<rightarrow> a) r\<rightarrow> a) l\<rightarrow> a = b l\<rightarrow> a
[PROOF STEP]
apply (rule order.antisym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ((b l\<rightarrow> a) r\<rightarrow> a) l\<rightarrow> a \<le> b l\<rightarrow> a
 2. b l\<rightarrow> a \<le> ((b l\<rightarrow> a) r\<rightarrow> a) l\<rightarrow> a
[PROOF STEP]
apply (simp_all add: lemma_2_10_26)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((b l\<rightarrow> a) r\<rightarrow> a) l\<rightarrow> a \<le> b l\<rightarrow> a
[PROOF STEP]
apply (rule lemma_2_5_13_a)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b \<le> (b l\<rightarrow> a) r\<rightarrow> a
[PROOF STEP]
by (rule lemma_2_10_24)


[STATEMENT]
lemma nn_integral_spmf_neq_infinity: "(\<integral>\<^sup>+ x. spmf p x \<partial>count_space UNIV) \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ x. ennreal (spmf p x)) \<noteq> \<infinity>
[PROOF STEP]
using nn_integral_measure_spmf[where f="\<lambda>_. 1", of p, symmetric]
[PROOF STATE]
proof (prove)
using this:
(\<Sum>\<^sup>+ x. ennreal (spmf p x) * 1) = \<integral>\<^sup>+ x. 1 \<partial>measure_spmf p

goal (1 subgoal):
 1. (\<Sum>\<^sup>+ x. ennreal (spmf p x)) \<noteq> \<infinity>
[PROOF STEP]
by simp


[STATEMENT]
lemma floor_add: "\<lfloor>x + y\<rfloor> = (if frac x + frac y < 1 then \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> else (\<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>) + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lfloor>x + y\<rfloor> = (if frac x + frac y < (1::'a) then \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> else \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> + 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lfloor>x + y\<rfloor> = (if frac x + frac y < (1::'a) then \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> else \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> + 1)
[PROOF STEP]
have "x + y < 1 + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>
[PROOF STEP]
by (metis add.commute floor_unique le_floor_add le_floor_iff of_int_add)
[PROOF STATE]
proof (state)
this:
x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>

goal (1 subgoal):
 1. \<lfloor>x + y\<rfloor> = (if frac x + frac y < (1::'a) then \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> else \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> + 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>

goal (1 subgoal):
 1. \<lfloor>x + y\<rfloor> = (if frac x + frac y < (1::'a) then \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> else \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> + 1)
[PROOF STEP]
have "\<not> x + y < 1 + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = 1 + (\<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = 1 + (\<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>)
[PROOF STEP]
apply (simp add: floor_eq_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> x + y < (2::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>)
[PROOF STEP]
apply (auto simp add: algebra_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> x + y < of_int \<lfloor>x\<rfloor> + (of_int \<lfloor>y\<rfloor> + (2::'a))
[PROOF STEP]
apply linarith
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<not> x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = 1 + (\<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>)

goal (1 subgoal):
 1. \<lfloor>x + y\<rfloor> = (if frac x + frac y < (1::'a) then \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> else \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> + 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>
\<not> x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = 1 + (\<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>
\<not> x + y < (1::'a) + (of_int \<lfloor>x\<rfloor> + of_int \<lfloor>y\<rfloor>) \<Longrightarrow> \<lfloor>x + y\<rfloor> = 1 + (\<lfloor>x\<rfloor> + \<lfloor>y\<rfloor>)

goal (1 subgoal):
 1. \<lfloor>x + y\<rfloor> = (if frac x + frac y < (1::'a) then \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> else \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> + 1)
[PROOF STEP]
by (auto simp add: frac_def algebra_simps)
[PROOF STATE]
proof (state)
this:
\<lfloor>x + y\<rfloor> = (if frac x + frac y < (1::'a) then \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> else \<lfloor>x\<rfloor> + \<lfloor>y\<rfloor> + 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ordinal_plus_0 [simp]: "x + 0 = (x::ordinal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x + 0 = x
[PROOF STEP]
by (simp add: plus_ordinal_def)


[STATEMENT]
lemma conefield_expansion_estimate:
  fixes u v::"'a::euclidean_space" and F::"'a \<Rightarrow> 'a"
  assumes "t \<in> {0 .. pi / 2}"
  assumes angle_pos: "0 < vangle u v" "vangle u v < pi / 2"
  assumes angle_le: "vangle (F u) (F v) \<le> vangle u v"
  assumes "bounded_linear F"
  assumes "x \<in> conefield u v"
  shows "norm (F x) \<ge> min (norm (F u)/norm u) (norm (F v)/norm v) * norm x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
assume [simp]: "x \<noteq> 0"
[PROOF STATE]
proof (state)
this:
x \<noteq> (0::'a)

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
t \<in> {0..pi / 2}
0 < vangle u v
vangle u v < pi / 2
vangle (F u) (F v) \<le> vangle u v
bounded_linear F
x \<in> conefield u v
[PROOF STEP]
have [simp]: "u \<noteq> 0" "v \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
t \<in> {0..pi / 2}
0 < vangle u v
vangle u v < pi / 2
vangle (F u) (F v) \<le> vangle u v
bounded_linear F
x \<in> conefield u v

goal (1 subgoal):
 1. u \<noteq> (0::'a) &&& v \<noteq> (0::'a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u \<noteq> (0::'a)
v \<noteq> (0::'a)

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
interpret bounded_linear F
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_linear F
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
define u1 where "u1 = u /\<^sub>R norm u"
[PROOF STATE]
proof (state)
this:
u1 = u /\<^sub>R norm u

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
define v1 where "v1 = v /\<^sub>R norm v"
[PROOF STATE]
proof (state)
this:
v1 = v /\<^sub>R norm v

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
note \<open>x \<in> conefield u v\<close>
[PROOF STATE]
proof (state)
this:
x \<in> conefield u v

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x \<in> conefield u v

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
have \<open>conefield u v = conefield u1 v1\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conefield u v = conefield u1 v1
[PROOF STEP]
by (auto simp: u1_def v1_def conefield_scaleR conefield_commute[of u])
[PROOF STATE]
proof (state)
this:
conefield u v = conefield u1 v1

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x \<in> conefield u1 v1
[PROOF STEP]
obtain c t where x: "x = c *\<^sub>R conemem u1 v1 t" "t \<in> {0 .. pi / 2}" "c \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
x \<in> conefield u1 v1

goal (1 subgoal):
 1. (\<And>c t. \<lbrakk>x = c *\<^sub>R conemem u1 v1 t; t \<in> {0..pi / 2}; 0 \<le> c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: conefield_def cone_hull_expl conesegment_def)
[PROOF STATE]
proof (state)
this:
x = c *\<^sub>R conemem u1 v1 t
t \<in> {0..pi / 2}
0 \<le> c

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = c *\<^sub>R conemem u1 v1 t
t \<in> {0..pi / 2}
0 \<le> c
[PROOF STEP]
have xc: "x /\<^sub>R c = conemem u1 v1 t"
[PROOF STATE]
proof (prove)
using this:
x = c *\<^sub>R conemem u1 v1 t
t \<in> {0..pi / 2}
0 \<le> c

goal (1 subgoal):
 1. x /\<^sub>R c = conemem u1 v1 t
[PROOF STEP]
by (auto simp: divide_simps)
[PROOF STATE]
proof (state)
this:
x /\<^sub>R c = conemem u1 v1 t

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x /\<^sub>R c = conemem u1 v1 t

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
have "F \<dots> = conemem (F u1) (F v1) t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F (conemem u1 v1 t) = conemem (F u1) (F v1) t
[PROOF STEP]
by (simp add: bounded_linear_image_conemem assms)
[PROOF STATE]
proof (state)
this:
F (conemem u1 v1 t) = conemem (F u1) (F v1) t

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
F (conemem u1 v1 t) = conemem (F u1) (F v1) t

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
have "norm \<dots> \<ge> min (norm (F u1)) (norm (F v1)) * norm (conemem u1 v1 t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. min (norm (F u1)) (norm (F v1)) * norm (conemem u1 v1 t) \<le> norm (conemem (F u1) (F v1) t)
[PROOF STEP]
apply (rule conemem_expansion_estimate)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. t \<in> {0..pi / 2}
 2. 0 < vangle u1 v1
 3. vangle u1 v1 < pi / 2
 4. vangle (F u1) (F v1) \<le> vangle u1 v1
 5. norm u1 = 1
 6. norm v1 = 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> {0..pi / 2}
[PROOF STEP]
by fact
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. 0 < vangle u1 v1
 2. vangle u1 v1 < pi / 2
 3. vangle (F u1) (F v1) \<le> vangle u1 v1
 4. norm u1 = 1
 5. norm v1 = 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < vangle u1 v1
[PROOF STEP]
using angle_pos
[PROOF STATE]
proof (prove)
using this:
0 < vangle u v
vangle u v < pi / 2

goal (1 subgoal):
 1. 0 < vangle u1 v1
[PROOF STEP]
by (simp add: u1_def v1_def vangle_scaleR)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. vangle u1 v1 < pi / 2
 2. vangle (F u1) (F v1) \<le> vangle u1 v1
 3. norm u1 = 1
 4. norm v1 = 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vangle u1 v1 < pi / 2
[PROOF STEP]
using angle_pos
[PROOF STATE]
proof (prove)
using this:
0 < vangle u v
vangle u v < pi / 2

goal (1 subgoal):
 1. vangle u1 v1 < pi / 2
[PROOF STEP]
by (simp add: u1_def v1_def vangle_scaleR)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. vangle (F u1) (F v1) \<le> vangle u1 v1
 2. norm u1 = 1
 3. norm v1 = 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vangle (F u1) (F v1) \<le> vangle u1 v1
[PROOF STEP]
using angle_le
[PROOF STATE]
proof (prove)
using this:
vangle (F u) (F v) \<le> vangle u v

goal (1 subgoal):
 1. vangle (F u1) (F v1) \<le> vangle u1 v1
[PROOF STEP]
by (simp add: u1_def v1_def scaleR vangle_scaleR)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. norm u1 = 1
 2. norm v1 = 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm u1 = 1
[PROOF STEP]
using angle_le
[PROOF STATE]
proof (prove)
using this:
vangle (F u) (F v) \<le> vangle u v

goal (1 subgoal):
 1. norm u1 = 1
[PROOF STEP]
by (simp add: u1_def v1_def scaleR vangle_scaleR)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm v1 = 1
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm v1 = 1
[PROOF STEP]
using angle_le
[PROOF STATE]
proof (prove)
using this:
vangle (F u) (F v) \<le> vangle u v

goal (1 subgoal):
 1. norm v1 = 1
[PROOF STEP]
by (simp add: u1_def v1_def scaleR vangle_scaleR)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
min (norm (F u1)) (norm (F v1)) * norm (conemem u1 v1 t) \<le> norm (conemem (F u1) (F v1) t)

goal (2 subgoals):
 1. ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
 2. \<not> ?P \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
min (norm (F u1)) (norm (F v1)) * norm (conemem u1 v1 t) \<le> norm (F (x /\<^sub>R c))
[PROOF STEP]
show "norm (F x) \<ge> min (norm (F u)/norm u) (norm (F v)/norm v) * norm x"
[PROOF STATE]
proof (prove)
using this:
min (norm (F u1)) (norm (F v1)) * norm (conemem u1 v1 t) \<le> norm (F (x /\<^sub>R c))

goal (1 subgoal):
 1. min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
unfolding xc[symmetric] scaleR u1_def v1_def norm_scaleR x
[PROOF STATE]
proof (prove)
using this:
min (\<bar>inverse (norm u)\<bar> * norm (F u)) (\<bar>inverse (norm v)\<bar> * norm (F v)) * norm (conemem (u /\<^sub>R norm u) (v /\<^sub>R norm v) t) \<le> \<bar>inverse c\<bar> * (\<bar>c\<bar> * norm (F (conemem (u /\<^sub>R norm u) (v /\<^sub>R norm v) t)))

goal (1 subgoal):
 1. min (norm (F u) / norm u) (norm (F v) / norm v) * (\<bar>c\<bar> * norm (conemem (u /\<^sub>R norm u) (v /\<^sub>R norm v) t)) \<le> \<bar>c\<bar> * norm (F (conemem (u /\<^sub>R norm u) (v /\<^sub>R norm v) t))
[PROOF STEP]
using \<open>c \<ge> 0\<close>
[PROOF STATE]
proof (prove)
using this:
min (\<bar>inverse (norm u)\<bar> * norm (F u)) (\<bar>inverse (norm v)\<bar> * norm (F v)) * norm (conemem (u /\<^sub>R norm u) (v /\<^sub>R norm v) t) \<le> \<bar>inverse c\<bar> * (\<bar>c\<bar> * norm (F (conemem (u /\<^sub>R norm u) (v /\<^sub>R norm v) t)))
0 \<le> c

goal (1 subgoal):
 1. min (norm (F u) / norm u) (norm (F v) / norm v) * (\<bar>c\<bar> * norm (conemem (u /\<^sub>R norm u) (v /\<^sub>R norm v) t)) \<le> \<bar>c\<bar> * norm (F (conemem (u /\<^sub>R norm u) (v /\<^sub>R norm v) t))
[PROOF STEP]
by (simp add: divide_simps split: if_splits)
[PROOF STATE]
proof (state)
this:
min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)

goal (1 subgoal):
 1. \<not> x \<noteq> (0::'a) \<Longrightarrow> min (norm (F u) / norm u) (norm (F v) / norm v) * norm x \<le> norm (F x)
[PROOF STEP]
qed simp


[STATEMENT]
lemma assert_fun_dual: "((assert_fun p) o \<top>) \<sqinter> (dual_fun (assert_fun p)) = assert_fun p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (assert_fun p \<circ> \<top>) \<sqinter> dual_fun (assert_fun p) = assert_fun p
[PROOF STEP]
by (simp add: fun_eq_iff inf_fun_def dual_fun_def o_def assert_fun_def top_fun_def inf_sup_distrib)


[STATEMENT]
lemma oexp_succ [simp]: "Ord \<beta> \<Longrightarrow> \<alpha>\<up>(succ \<beta>) = \<alpha>\<up>\<beta> * \<alpha>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ord \<beta> \<Longrightarrow> \<alpha> \<up> ZFC_in_HOL.succ \<beta> = \<alpha> \<up> \<beta> * \<alpha>
[PROOF STEP]
by (simp add: def_transrec [OF oexp_def])


[STATEMENT]
lemma div_mult_le: "(a div b) * c \<le> (a * c) div (b :: nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a div b * c \<le> a * c div b
[PROOF STEP]
by (metis div_mult2_eq div_mult_mult2 mult.commute mult_0_right times_div_less_eq_dividend)


[STATEMENT]
lemma accepts_or:
 "accepts (or L R) w = (accepts L w | accepts R w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NAe.accepts (RegExp2NAe.or L R) w = (NAe.accepts L w \<or> NAe.accepts R w)
[PROOF STEP]
apply (simp add:accepts_def steps_or)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>q. (w = [] \<and> q = start (RegExp2NAe.or L R) \<or> (\<exists>p. q = True # p \<and> (start L, p) \<in> NAe.steps L w \<or> q = False # p \<and> (start R, p) \<in> NAe.steps R w)) \<and> fin (RegExp2NAe.or L R) q) = ((\<exists>q. (start L, q) \<in> NAe.steps L w \<and> fin L q) \<or> (\<exists>q. (start R, q) \<in> NAe.steps R w \<and> fin R q))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma tendsto_iff_Liminf_eq_Limsup:
  fixes f0 :: "'a :: {complete_linorder,linorder_topology}"
  shows "\<not> trivial_limit F \<Longrightarrow> (f \<longlongrightarrow> f0) F \<longleftrightarrow> (Liminf F f = f0 \<and> Limsup F f = f0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F \<noteq> bot \<Longrightarrow> (f \<longlongrightarrow> f0) F = (Liminf F f = f0 \<and> Limsup F f = f0)
[PROOF STEP]
by (metis Liminf_eq_Limsup lim_imp_Limsup lim_imp_Liminf)


[STATEMENT]
lemma (in -) nested_Collect: "{f y |y. y \<in> {g x |x. x \<in> X}} = {f (g x) |x. x \<in> X}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {f y |y::'b. y \<in> {g x |x::'c. x \<in> X}} = {f (g x) |x::'c. x \<in> X}
variables:
X :: 'c set
g :: 'c \<Rightarrow> 'b
f :: 'b \<Rightarrow> 'a
type variables:
'a, 'b, 'c :: type
[PROOF STEP]
by blast


[STATEMENT]
lemma (in PolynRg) scf_d_pol:"\<lbrakk>p \<in> carrier R; deg R S X p \<le> an d\<rbrakk> \<Longrightarrow>
      pol_coeff S (scf_d R S X p d) \<and> fst (scf_d R S X p d) = d \<and>
       p = polyn_expr R X d (scf_d R S X p d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p \<in> carrier R; deg R S X p \<le> an d\<rbrakk> \<Longrightarrow> pol_coeff S (scf_d R S X p d) \<and> fst (scf_d R S X p d) = d \<and> p = polyn_expr R X d (scf_d R S X p d)
[PROOF STEP]
apply (frule scf_d_polTr[of "p" "d"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p \<in> carrier R; deg R S X p \<le> an d; scf_cond R S X p d (scf_d R S X p d)\<rbrakk> \<Longrightarrow> pol_coeff S (scf_d R S X p d) \<and> fst (scf_d R S X p d) = d \<and> p = polyn_expr R X d (scf_d R S X p d)
[PROOF STEP]
apply (simp add:scf_cond_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "(\<forall>x y. \<exists>z. \<forall>w. (P x \<and> Q y \<longrightarrow> R z \<and> S w))
    \<longrightarrow> (\<exists>x y. P x \<and> Q y) \<longrightarrow> (\<exists>z. R z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x y. \<exists>z. \<forall>w. P x \<and> Q y \<longrightarrow> R z \<and> S w) \<longrightarrow> (\<exists>x y. P x \<and> Q y) \<longrightarrow> (\<exists>z. R z)
[PROOF STEP]
by blast


[STATEMENT]
lemma list_ex_length:
  "list_ex P xs \<longleftrightarrow> (\<exists>n < length xs. P (xs ! n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_ex P xs = (\<exists>n<length xs. P (xs ! n))
[PROOF STEP]
by (auto simp add: list_ex_iff set_conv_nth)


[STATEMENT]
lemma single_input_alt_def :
  "single_input M = (\<forall> q1 x x' y y' q1' q1'' . (q1,x,y,q1') \<in> transitions M \<and> (q1,x',y',q1'') \<in> transitions M \<longrightarrow> x = x')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. single_input M = (\<forall>q1 x x' y y' q1' q1''. (q1, x, y, q1') \<in> FSM.transitions M \<and> (q1, x', y', q1'') \<in> FSM.transitions M \<longrightarrow> x = x')
[PROOF STEP]
by fastforce


[STATEMENT]
lemma evContainsEx_containsEx0:
  "[| branch subs (pseq fs) f; !n . ~ proofTree (tree subs (f n)) |]
  ==> EV (contains f (i,FAll Neg A)) -->
      EV (contains f (0,FAll Neg A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>branch subs (pseq fs) f; \<forall>n. \<not> proofTree (tree subs (f n))\<rbrakk> \<Longrightarrow> EV (contains f (i, FAll Neg A)) \<longrightarrow> EV (contains f (0, FAll Neg A))
[PROOF STEP]
apply (induct i, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>\<lbrakk>branch subs (pseq fs) f; \<forall>n. \<not> proofTree (tree subs (f n))\<rbrakk> \<Longrightarrow> EV (contains f (i, FAll Neg A)) \<longrightarrow> EV (contains f (0, FAll Neg A)); branch subs (pseq fs) f; \<forall>n. \<not> proofTree (tree subs (f n))\<rbrakk> \<Longrightarrow> EV (contains f (Suc i, FAll Neg A)) \<longrightarrow> EV (contains f (0, FAll Neg A))
[PROOF STEP]
apply(blast dest!: evContainsExSuc_containsEx)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma ratfps_has_asymptotics_correct:
  assumes "ratfps_has_asymptotics q k R"
  shows   "fps_nth (fps_of_poly p / fps_of_poly q) \<in> O(\<lambda>n. of_nat n ^ k * of_real R ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (fps_of_poly p / fps_of_poly q) \<in> O(\<lambda>n. of_nat n ^ k * complex_of_real R ^ n)
[PROOF STEP]
proof (rule ratfps_nth_bigo_square_free_factorization')
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. square_free_factorization q (?b, ?cs)
 2. q \<noteq> 0
 3. 0 < R
 4. list_all (\<lambda>cl. proots_ball_card (fst cl) 0 (1 / R) = 0) ?cs
 5. list_all (\<lambda>cl. proots_sphere_card (fst cl) 0 (1 / R) = 0) (filter (\<lambda>cl. k < snd cl) ?cs)
[PROOF STEP]
show "square_free_factorization q (fst (yun_factorization gcd q), snd (yun_factorization gcd q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. square_free_factorization q (fst (yun_factorization gcd q), snd (yun_factorization gcd q))
[PROOF STEP]
by (rule yun_factorization) simp
[PROOF STATE]
proof (state)
this:
square_free_factorization q (fst (yun_factorization gcd q), snd (yun_factorization gcd q))

goal (4 subgoals):
 1. q \<noteq> 0
 2. 0 < R
 3. list_all (\<lambda>cl. proots_ball_card (fst cl) 0 (1 / R) = 0) (snd (yun_factorization gcd q))
 4. list_all (\<lambda>cl. proots_sphere_card (fst cl) 0 (1 / R) = 0) (filter (\<lambda>cl. k < snd cl) (snd (yun_factorization gcd q)))
[PROOF STEP]
qed (insert assms, auto simp: ratfps_has_asymptotics_def Let_def list_all_def)


[STATEMENT]
theorem (in dcharacter) polya_vinogradov_inequality:
  assumes nonprincipal: "\<chi> \<noteq> principal_dchar n"
  shows   "norm (\<Sum>m=1..x. \<chi> m) < 2 * sqrt n * ln n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
have "n div conductor > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n div conductor
[PROOF STEP]
using n conductor_dvd dvd_div_eq_0_iff[of conductor n]
[PROOF STATE]
proof (prove)
using this:
1 < n
conductor dvd n
conductor dvd n \<Longrightarrow> (n div conductor = 0) = (n = 0)

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

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
have "norm (\<Sum>m=1..x. \<chi> m) < sqrt conductor * ln conductor * divisor_count (n div conductor)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < sqrt (real conductor) * ln (real conductor) * real (divisor_count (n div conductor))
[PROOF STEP]
using nonprincipal
[PROOF STATE]
proof (prove)
using this:
\<chi> \<noteq> principal_dchar n

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < sqrt (real conductor) * ln (real conductor) * real (divisor_count (n div conductor))
[PROOF STEP]
by (rule polya_vinogradov_inequality_explicit)
[PROOF STATE]
proof (state)
this:
cmod (sum \<chi> {1..x}) < sqrt (real conductor) * ln (real conductor) * real (divisor_count (n div conductor))

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod (sum \<chi> {1..x}) < sqrt (real conductor) * ln (real conductor) * real (divisor_count (n div conductor))

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
have "\<dots> \<le> sqrt conductor * ln conductor * (2 * sqrt (n div conductor))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (real conductor) * ln (real conductor) * real (divisor_count (n div conductor)) \<le> sqrt (real conductor) * ln (real conductor) * (2 * sqrt (real (n div conductor)))
[PROOF STEP]
using conductor_gr_0 \<open>n div conductor > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < conductor
0 < n div conductor

goal (1 subgoal):
 1. sqrt (real conductor) * ln (real conductor) * real (divisor_count (n div conductor)) \<le> sqrt (real conductor) * ln (real conductor) * (2 * sqrt (real (n div conductor)))
[PROOF STEP]
by (intro mult_left_mono divisor_count_upper_bound') (auto simp: Suc_le_eq)
[PROOF STATE]
proof (state)
this:
sqrt (real conductor) * ln (real conductor) * real (divisor_count (n div conductor)) \<le> sqrt (real conductor) * ln (real conductor) * (2 * sqrt (real (n div conductor)))

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sqrt (real conductor) * ln (real conductor) * real (divisor_count (n div conductor)) \<le> sqrt (real conductor) * ln (real conductor) * (2 * sqrt (real (n div conductor)))

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
have "sqrt (n div conductor) = sqrt n / sqrt conductor"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (real (n div conductor)) = sqrt (real n) / sqrt (real conductor)
[PROOF STEP]
using conductor_dvd
[PROOF STATE]
proof (prove)
using this:
conductor dvd n

goal (1 subgoal):
 1. sqrt (real (n div conductor)) = sqrt (real n) / sqrt (real conductor)
[PROOF STEP]
by (simp add: Real.real_of_nat_div real_sqrt_divide)
[PROOF STATE]
proof (state)
this:
sqrt (real (n div conductor)) = sqrt (real n) / sqrt (real conductor)

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sqrt (real (n div conductor)) = sqrt (real n) / sqrt (real conductor)

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
have "sqrt conductor * ln conductor * (2 * (sqrt n / sqrt conductor)) =
               2 * sqrt n * ln conductor"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (real conductor) * ln (real conductor) * (2 * (sqrt (real n) / sqrt (real conductor))) = 2 * sqrt (real n) * ln (real conductor)
[PROOF STEP]
using conductor_gr_0 n
[PROOF STATE]
proof (prove)
using this:
0 < conductor
1 < n

goal (1 subgoal):
 1. sqrt (real conductor) * ln (real conductor) * (2 * (sqrt (real n) / sqrt (real conductor))) = 2 * sqrt (real n) * ln (real conductor)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
sqrt (real conductor) * ln (real conductor) * (2 * (sqrt (real n) / sqrt (real conductor))) = 2 * sqrt (real n) * ln (real conductor)

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sqrt (real conductor) * ln (real conductor) * (2 * (sqrt (real n) / sqrt (real conductor))) = 2 * sqrt (real n) * ln (real conductor)

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
have "\<dots> \<le> 2 * sqrt n * ln n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * sqrt (real n) * ln (real conductor) \<le> 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
using conductor_le_modulus conductor_gr_0
[PROOF STATE]
proof (prove)
using this:
conductor \<le> n
0 < conductor

goal (1 subgoal):
 1. 2 * sqrt (real n) * ln (real conductor) \<le> 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
by (intro mult_left_mono) auto
[PROOF STATE]
proof (state)
this:
2 * sqrt (real n) * ln (real conductor) \<le> 2 * sqrt (real n) * ln (real n)

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)

goal (1 subgoal):
 1. cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
cmod (sum \<chi> {1..x}) < 2 * sqrt (real n) * ln (real n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma p_gt_0: "p > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < p
[PROOF STEP]
using p_ge_18
[PROOF STATE]
proof (prove)
using this:
18 \<le> p

goal (1 subgoal):
 1. 0 < p
[PROOF STEP]
by simp


[STATEMENT]
lemma transpose_transpose [simp]: "transpose(transpose A) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Finite_Cartesian_Product.transpose (Finite_Cartesian_Product.transpose A) = A
[PROOF STEP]
by (vector transpose_def)


[STATEMENT]
lemma integral_FTC_atLeastAtMost:
  fixes f :: "real \<Rightarrow> 'a :: euclidean_space"
  assumes "a \<le> b"
    and F: "\<And>x. a \<le> x \<Longrightarrow> x \<le> b \<Longrightarrow> (F has_vector_derivative f x) (at x within {a .. b})"
    and f: "continuous_on {a .. b} f"
  shows "integral\<^sup>L lborel (\<lambda>x. indicator {a .. b} x *\<^sub>R f x) = F b - F a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
let ?f = "\<lambda>x. indicator {a .. b} x *\<^sub>R f x"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
have "(?f has_integral (\<integral>x. ?f x \<partial>lborel)) UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral LBINT x. indicat_real {a..b} x *\<^sub>R f x) UNIV
[PROOF STEP]
using borel_integrable_atLeastAtMost'[OF f]
[PROOF STATE]
proof (prove)
using this:
set_integrable lborel {a..b} f

goal (1 subgoal):
 1. ((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral LBINT x. indicat_real {a..b} x *\<^sub>R f x) UNIV
[PROOF STEP]
unfolding set_integrable_def
[PROOF STATE]
proof (prove)
using this:
integrable lborel (\<lambda>x. indicat_real {a..b} x *\<^sub>R f x)

goal (1 subgoal):
 1. ((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral LBINT x. indicat_real {a..b} x *\<^sub>R f x) UNIV
[PROOF STEP]
by (rule has_integral_integral_lborel)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral LBINT x. indicat_real {a..b} x *\<^sub>R f x) UNIV

goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral LBINT x. indicat_real {a..b} x *\<^sub>R f x) UNIV

goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
have "(f has_integral F b - F a) {a .. b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral F b - F a) {a..b}
[PROOF STEP]
by (intro fundamental_theorem_of_calculus ballI assms) auto
[PROOF STATE]
proof (state)
this:
(f has_integral F b - F a) {a..b}

goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(f has_integral F b - F a) {a..b}
[PROOF STEP]
have "(?f has_integral F b - F a) {a .. b}"
[PROOF STATE]
proof (prove)
using this:
(f has_integral F b - F a) {a..b}

goal (1 subgoal):
 1. ((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral F b - F a) {a..b}
[PROOF STEP]
by (subst has_integral_cong[where g=f]) auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral F b - F a) {a..b}

goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral F b - F a) {a..b}
[PROOF STEP]
have "(?f has_integral F b - F a) UNIV"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral F b - F a) {a..b}

goal (1 subgoal):
 1. ((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral F b - F a) UNIV
[PROOF STEP]
by (intro has_integral_on_superset[where T=UNIV and S="{a..b}"]) auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral F b - F a) UNIV

goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral LBINT x. indicat_real {a..b} x *\<^sub>R f x) UNIV
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral F b - F a) UNIV
[PROOF STEP]
show "integral\<^sup>L lborel ?f = F b - F a"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral LBINT x. indicat_real {a..b} x *\<^sub>R f x) UNIV
((\<lambda>x. indicat_real {a..b} x *\<^sub>R f x) has_integral F b - F a) UNIV

goal (1 subgoal):
 1. LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a
[PROOF STEP]
by (rule has_integral_unique)
[PROOF STATE]
proof (state)
this:
LBINT x. indicat_real {a..b} x *\<^sub>R f x = F b - F a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Corps) one_plus_x_nonzero:"\<lbrakk>valuation K v; x \<in> carrier K; v x < 0\<rbrakk>
      \<Longrightarrow> 1\<^sub>r \<plusminus> x \<in> carrier K \<and> v (1\<^sub>r \<plusminus> x) < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; x \<in> carrier K; v x < 0\<rbrakk> \<Longrightarrow> 1\<^sub>r \<plusminus> x \<in> carrier K \<and> v (1\<^sub>r \<plusminus> x) < 0
[PROOF STEP]
apply (cut_tac field_is_ring, frule Ring.ring_is_ag[of "K"],
       frule Ring.ring_one[of "K"],
       frule aGroup.ag_pOp_closed[of "K" "1\<^sub>r" "x"], assumption+,
       simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; x \<in> carrier K; v x < 0; Ring K; aGroup K; 1\<^sub>r \<in> carrier K; 1\<^sub>r \<plusminus> x \<in> carrier K\<rbrakk> \<Longrightarrow> v (1\<^sub>r \<plusminus> x) < 0
[PROOF STEP]
apply (frule value_less_eq[of "v" "x" "1\<^sub>r"], assumption+,
       simp add:value_of_one, simp add:aGroup.ag_pOp_commute)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem (in Group) rcs_eq:"\<lbrakk>G \<guillemotright> H; a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow>
                            (b \<cdot> (\<rho> a) \<in> H) = (H \<bullet> a = H \<bullet> b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> (b \<cdot> \<rho> a \<in> H) = (H \<bullet> a = H \<bullet> b)
[PROOF STEP]
apply (rule iffI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; b \<cdot> \<rho> a \<in> H\<rbrakk> \<Longrightarrow> H \<bullet> a = H \<bullet> b
 2. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; H \<bullet> a = H \<bullet> b\<rbrakk> \<Longrightarrow> b \<cdot> \<rho> a \<in> H
[PROOF STEP]
apply (rule equalityI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; b \<cdot> \<rho> a \<in> H\<rbrakk> \<Longrightarrow> H \<bullet> a \<subseteq> H \<bullet> b
 2. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; b \<cdot> \<rho> a \<in> H\<rbrakk> \<Longrightarrow> H \<bullet> b \<subseteq> H \<bullet> a
 3. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; H \<bullet> a = H \<bullet> b\<rbrakk> \<Longrightarrow> b \<cdot> \<rho> a \<in> H
[PROOF STEP]
apply (frule rcsTr7[of "H" "a" "b"], assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; b \<cdot> \<rho> a \<in> H\<rbrakk> \<Longrightarrow> H \<bullet> b \<subseteq> H \<bullet> a
 2. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; H \<bullet> a = H \<bullet> b\<rbrakk> \<Longrightarrow> b \<cdot> \<rho> a \<in> H
[PROOF STEP]
apply (frule rcs_tool1[of "H" "a" "b"], assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; b \<cdot> \<rho> a \<in> H; a \<cdot> \<rho> b \<in> H\<rbrakk> \<Longrightarrow> H \<bullet> b \<subseteq> H \<bullet> a
 2. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; H \<bullet> a = H \<bullet> b\<rbrakk> \<Longrightarrow> b \<cdot> \<rho> a \<in> H
[PROOF STEP]
apply (rule rcsTr7[of "H" "b" "a"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; H \<bullet> a = H \<bullet> b\<rbrakk> \<Longrightarrow> b \<cdot> \<rho> a \<in> H
[PROOF STEP]
apply (frule a_in_rcs[of "H" "a"], assumption, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; H \<bullet> a = H \<bullet> b; a \<in> H \<bullet> b\<rbrakk> \<Longrightarrow> b \<cdot> \<rho> a \<in> H
[PROOF STEP]
apply (simp add:rcs_eqTr1[of "H" "a" "b"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G; b \<in> carrier G; H \<bullet> a = H \<bullet> b; a \<cdot> \<rho> b \<in> H\<rbrakk> \<Longrightarrow> b \<cdot> \<rho> a \<in> H
[PROOF STEP]
apply (rule rcs_tool1, assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in domain) univ_poly_units_incl:
  assumes "subring K R" shows "Units (K[X]) \<subseteq> { [ k ] | k. k \<in> K - { \<zero> } }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Units (K [X]) \<subseteq> {[k] |k. k \<in> K - {\<zero>}}
[PROOF STEP]
using domain.univ_poly_carrier_units_incl[OF subring_is_domain[OF assms]]
        univ_poly_consistent[OF assms]
[PROOF STATE]
proof (prove)
using this:
Units (poly_ring (R\<lparr>carrier := K\<rparr>)) \<subseteq> {[k] |k. k \<in> carrier (R\<lparr>carrier := K\<rparr>) - {\<zero>\<^bsub>R\<lparr>carrier := K\<rparr>\<^esub>}}
univ_poly (R\<lparr>carrier := K\<rparr>) = univ_poly R

goal (1 subgoal):
 1. Units (K [X]) \<subseteq> {[k] |k. k \<in> K - {\<zero>}}
[PROOF STEP]
by auto


[STATEMENT]
lemma vector_derivative_chain_at:
  assumes "f differentiable at x" "(g differentiable at (f x))"
  shows "vector_derivative (g \<circ> f) (at x) =
         vector_derivative f (at x) *\<^sub>R vector_derivative g (at (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vector_derivative (g \<circ> f) (at x) = vector_derivative f (at x) *\<^sub>R vector_derivative g (at (f x))
[PROOF STEP]
by (metis vector_diff_chain_at vector_derivative_at vector_derivative_works assms)