[STATEMENT]
lemma setsum_eq_one_le:
  fixes n::nat
  assumes "\<forall>i \<le> n. f i = 1"
  shows "(\<Sum>i \<le> n. f i) = Suc n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f {..n} = Suc n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<le>n. f i = 1

goal (1 subgoal):
 1. sum f {..n} = Suc n
[PROOF STEP]
by (induct n) (auto)


[STATEMENT]
lemma midpoint_eq_iff: "midpoint a b = c \<longleftrightarrow> a + b = c + c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (midpoint a b = c) = (a + b = c + c)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (midpoint a b = c) = (a + b = c + c)
[PROOF STEP]
have "midpoint a b = c \<longleftrightarrow> scaleR 2 (midpoint a b) = scaleR 2 c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (midpoint a b = c) = (2 *\<^sub>R midpoint a b = 2 *\<^sub>R c)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(midpoint a b = c) = (2 *\<^sub>R midpoint a b = 2 *\<^sub>R c)

goal (1 subgoal):
 1. (midpoint a b = c) = (a + b = c + c)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(midpoint a b = c) = (2 *\<^sub>R midpoint a b = 2 *\<^sub>R c)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(midpoint a b = c) = (2 *\<^sub>R midpoint a b = 2 *\<^sub>R c)

goal (1 subgoal):
 1. (midpoint a b = c) = (a + b = c + c)
[PROOF STEP]
unfolding midpoint_def scaleR_2 [symmetric]
[PROOF STATE]
proof (prove)
using this:
((a + b) /\<^sub>R 2 = c) = (2 *\<^sub>R ((a + b) /\<^sub>R 2) = 2 *\<^sub>R c)

goal (1 subgoal):
 1. ((a + b) /\<^sub>R 2 = c) = (a + b = 2 *\<^sub>R c)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(midpoint a b = c) = (a + b = c + c)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma filter_bool_list_card:
  "\<lbrakk>distinct xs; length xs = length bs\<rbrakk> \<Longrightarrow> card (set (filter_bool_list bs xs)) = count_list bs True"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distinct xs; length xs = length bs\<rbrakk> \<Longrightarrow> card (set (filter_bool_list bs xs)) = count_list bs True
[PROOF STEP]
by(induct bs xs rule: filter_bool_list.induct) (auto simp: filter_bool_list_not_elem)


[STATEMENT]
lemma differentiable_on_Pair:
  "f differentiable_on S \<Longrightarrow> g differentiable_on S \<Longrightarrow> (\<lambda>x. (f x, g x)) differentiable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f differentiable_on S; g differentiable_on S\<rbrakk> \<Longrightarrow> (\<lambda>x. (f x, g x)) differentiable_on S
[PROOF STEP]
unfolding differentiable_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>S. f differentiable at x within S; \<forall>x\<in>S. g differentiable at x within S\<rbrakk> \<Longrightarrow> \<forall>x\<in>S. (\<lambda>x. (f x, g x)) differentiable at x within S
[PROOF STEP]
using differentiable_Pair[of f _ S g]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f differentiable at ?x within S; g differentiable at ?x within S\<rbrakk> \<Longrightarrow> (\<lambda>x. (f x, g x)) differentiable at ?x within S

goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>S. f differentiable at x within S; \<forall>x\<in>S. g differentiable at x within S\<rbrakk> \<Longrightarrow> \<forall>x\<in>S. (\<lambda>x. (f x, g x)) differentiable at x within S
[PROOF STEP]
by auto


[STATEMENT]
lemma add_mset_le_le_le:
  fixes a :: "'a :: linorder"
  assumes a_le_b: "a \<le> b" and A_le_B: "A \<le> B"
  shows "add_mset a A \<le> add_mset b B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. add_mset a A \<le> add_mset b B
[PROOF STEP]
by (rule order.trans[OF add_mset_le_left_le[OF a_le_b] add_mset_le_right_le[OF A_le_B]])


[STATEMENT]
lemma binomial_Suc_Suc_eq_times: "(Suc n choose Suc k) = (Suc n * (n choose k)) div Suc k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc n choose Suc k = Suc n * (n choose k) div Suc k
[PROOF STEP]
by (simp add: Suc_times_binomial_eq del: mult_Suc mult_Suc_right)


[STATEMENT]
lemma prime_power_inj:
  assumes "prime a" "a ^ m = a ^ n"
  shows   "m = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m = n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. m = n
[PROOF STEP]
have "multiplicity a (a ^ m) = multiplicity a (a ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicity a (a ^ m) = multiplicity a (a ^ n)
[PROOF STEP]
by (simp only: assms)
[PROOF STATE]
proof (state)
this:
multiplicity a (a ^ m) = multiplicity a (a ^ n)

goal (1 subgoal):
 1. m = n
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
multiplicity a (a ^ m) = multiplicity a (a ^ n)

goal (1 subgoal):
 1. m = n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
multiplicity a (a ^ m) = multiplicity a (a ^ n)
prime a
a ^ m = a ^ n

goal (1 subgoal):
 1. m = n
[PROOF STEP]
by (subst (asm) (1 2) multiplicity_prime_power) simp_all
[PROOF STATE]
proof (state)
this:
m = n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma evalS_equiv[rule_format]: "(equalOn (freeVarsFL Gamma) f g) --> (evalS M f Gamma = evalS M g Gamma)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equalOn (freeVarsFL Gamma) f g \<longrightarrow> evalS M f Gamma = evalS M g Gamma
[PROOF STEP]
apply (induct Gamma, simp, rule)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a Gamma. \<lbrakk>equalOn (freeVarsFL Gamma) f g \<longrightarrow> evalS M f Gamma = evalS M g Gamma; equalOn (freeVarsFL (a # Gamma)) f g\<rbrakk> \<Longrightarrow> evalS M f (a # Gamma) = evalS M g (a # Gamma)
[PROOF STEP]
apply(simp add: freeVarsFL_cons)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a Gamma. \<lbrakk>equalOn (freeVarsFL Gamma) f g \<longrightarrow> evalS M f Gamma = evalS M g Gamma; equalOn (freeVarsF a \<union> freeVarsFL Gamma) f g\<rbrakk> \<Longrightarrow> (evalF M f a \<or> evalS M f Gamma) = (evalF M g a \<or> evalS M g Gamma)
[PROOF STEP]
apply(drule_tac equalOn_UnD)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a Gamma. \<lbrakk>equalOn (freeVarsFL Gamma) f g \<longrightarrow> evalS M f Gamma = evalS M g Gamma; equalOn (freeVarsF a) f g \<and> equalOn (freeVarsFL Gamma) f g\<rbrakk> \<Longrightarrow> (evalF M f a \<or> evalS M f Gamma) = (evalF M g a \<or> evalS M g Gamma)
[PROOF STEP]
apply(blast dest: evalF_equiv)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma graph_map_add: "dom m1 \<inter> dom m2 = {} \<Longrightarrow> graph (m1 ++ m2) = graph m1 \<union> graph m2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dom m1 \<inter> dom m2 = {} \<Longrightarrow> graph (m1 ++ m2) = graph m1 \<union> graph m2
[PROOF STEP]
unfolding graph_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dom m1 \<inter> dom m2 = {} \<Longrightarrow> {(a, b) |a b. (m1 ++ m2) a = Some b} = {(a, b) |a b. m1 a = Some b} \<union> {(a, b) |a b. m2 a = Some b}
[PROOF STEP]
using map_add_comm
[PROOF STATE]
proof (prove)
using this:
dom ?m1.0 \<inter> dom ?m2.0 = {} \<Longrightarrow> ?m1.0 ++ ?m2.0 = ?m2.0 ++ ?m1.0

goal (1 subgoal):
 1. dom m1 \<inter> dom m2 = {} \<Longrightarrow> {(a, b) |a b. (m1 ++ m2) a = Some b} = {(a, b) |a b. m1 a = Some b} \<union> {(a, b) |a b. m2 a = Some b}
[PROOF STEP]
by force


[STATEMENT]
lemma countable_rtrancl:
  "(\<And>Y. countable Y \<Longrightarrow> countable (X `` Y)) \<Longrightarrow> countable Y \<Longrightarrow> countable (X\<^sup>* `` Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>Y. countable Y \<Longrightarrow> countable (X `` Y); countable Y\<rbrakk> \<Longrightarrow> countable (X\<^sup>* `` Y)
[PROOF STEP]
unfolding rtrancl_is_UN_relpow UN_Image
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>Y. countable Y \<Longrightarrow> countable (X `` Y); countable Y\<rbrakk> \<Longrightarrow> countable (\<Union>i. (X ^^ i) `` Y)
[PROOF STEP]
by (intro countable_UN countableI_type countable_relpow)


[STATEMENT]
lemma negligible_frontier_interval: "negligible(cbox (a::'a::euclidean_space) b - box a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. negligible (cbox a b - box a b)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. negligible (cbox a b - box a b)
[PROOF STEP]
let ?A = "\<Union>((\<lambda>k. {x. x\<bullet>k = a\<bullet>k} \<union> {x::'a. x\<bullet>k = b\<bullet>k}) ` Basis)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. negligible (cbox a b - box a b)
[PROOF STEP]
have "negligible ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. negligible (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})
[PROOF STEP]
by (force simp add: negligible_Union[OF finite_imageI])
[PROOF STATE]
proof (state)
this:
negligible (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})

goal (1 subgoal):
 1. negligible (cbox a b - box a b)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
negligible (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})

goal (1 subgoal):
 1. negligible (cbox a b - box a b)
[PROOF STEP]
have "cbox a b - box a b \<subseteq> ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cbox a b - box a b \<subseteq> (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})
[PROOF STEP]
by (force simp add: mem_box)
[PROOF STATE]
proof (state)
this:
cbox a b - box a b \<subseteq> (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})

goal (1 subgoal):
 1. negligible (cbox a b - box a b)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
negligible (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})
cbox a b - box a b \<subseteq> (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
negligible (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})
cbox a b - box a b \<subseteq> (\<Union>k\<in>Basis. {x. x \<bullet> k = a \<bullet> k} \<union> {x. x \<bullet> k = b \<bullet> k})

goal (1 subgoal):
 1. negligible (cbox a b - box a b)
[PROOF STEP]
by (rule negligible_subset)
[PROOF STATE]
proof (state)
this:
negligible (cbox a b - box a b)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem complete_build:
  "length ps = 2 ^ h \<Longrightarrow> \<forall>k. distinct (map (\<lambda>p. p$k) ps) \<Longrightarrow> complete (build k ps)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>length ps = 2 ^ h; \<forall>k. distinct (map (\<lambda>p. p $ k) ps)\<rbrakk> \<Longrightarrow> KD_Tree.complete (build k ps)
[PROOF STEP]
by (simp add: balanced_build complete_if_balanced_size_2powh size_build)


[STATEMENT]
lemma measure_restrict_space:
  assumes "\<Omega> \<inter> space M \<in> sets M" "A \<subseteq> \<Omega>"
  shows "measure (restrict_space M \<Omega>) A = measure M A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure (restrict_space M \<Omega>) A = Sigma_Algebra.measure M A
[PROOF STEP]
using emeasure_restrict_space[OF assms]
[PROOF STATE]
proof (prove)
using this:
emeasure (restrict_space M \<Omega>) A = emeasure M A

goal (1 subgoal):
 1. Sigma_Algebra.measure (restrict_space M \<Omega>) A = Sigma_Algebra.measure M A
[PROOF STEP]
by (simp add: measure_def)


[STATEMENT]
lemma infsetsum_pmf_eq_1:
  assumes "set_pmf p \<subseteq> A"
  shows   "infsetsum (pmf p) A = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infsetsum (pmf p) A = 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infsetsum (pmf p) A = 1
[PROOF STEP]
have "infsetsum (pmf p) A = lebesgue_integral (count_space UNIV) (pmf p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infsetsum (pmf p) A = integral\<^sup>L (count_space UNIV) (pmf p)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
set_pmf p \<subseteq> A

goal (1 subgoal):
 1. infsetsum (pmf p) A = integral\<^sup>L (count_space UNIV) (pmf p)
[PROOF STEP]
unfolding infsetsum_altdef set_lebesgue_integral_def
[PROOF STATE]
proof (prove)
using this:
set_pmf p \<subseteq> A

goal (1 subgoal):
 1. LINT x|count_space UNIV. indicat_real A x *\<^sub>R pmf p x = integral\<^sup>L (count_space UNIV) (pmf p)
[PROOF STEP]
by (intro Bochner_Integration.integral_cong) (auto simp: indicator_def set_pmf_eq)
[PROOF STATE]
proof (state)
this:
infsetsum (pmf p) A = integral\<^sup>L (count_space UNIV) (pmf p)

goal (1 subgoal):
 1. infsetsum (pmf p) A = 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
infsetsum (pmf p) A = integral\<^sup>L (count_space UNIV) (pmf p)

goal (1 subgoal):
 1. infsetsum (pmf p) A = 1
[PROOF STEP]
have "\<dots> = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (count_space UNIV) (pmf p) = 1
[PROOF STEP]
by (subst integral_eq_nn_integral) (auto simp: nn_integral_pmf)
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (count_space UNIV) (pmf p) = 1

goal (1 subgoal):
 1. infsetsum (pmf p) A = 1
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
infsetsum (pmf p) A = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
infsetsum (pmf p) A = 1

goal (1 subgoal):
 1. infsetsum (pmf p) A = 1
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
infsetsum (pmf p) A = 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_rel_Id_on[simp]: "\<langle>Id_on S\<rangle> set_rel = Id_on (Pow S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>Id_on S\<rangle>set_rel = Id_on (Pow S)
[PROOF STEP]
unfolding set_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(A, B). (\<forall>x\<in>A. \<exists>y\<in>B. (x, y) \<in> Id_on S) \<and> (\<forall>y\<in>B. \<exists>x\<in>A. (x, y) \<in> Id_on S)} = Id_on (Pow S)
[PROOF STEP]
by auto


[STATEMENT]
lemma conversep_in_rel: "(in_rel R)\<inverse>\<inverse> = in_rel (R\<inverse>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (in_rel R)\<inverse>\<inverse> = in_rel (R\<inverse>)
[PROOF STEP]
unfolding fun_eq_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x xa. (in_rel R)\<inverse>\<inverse> x xa = in_rel (R\<inverse>) x xa
[PROOF STEP]
by auto


[STATEMENT]
lemma preserve_rtranclp'':
  "(\<And>x y. R x y \<Longrightarrow> S (f x) (f y)) \<Longrightarrow>
   (\<And>y. S (f y) (g y)) \<Longrightarrow>
   R\<^sup>*\<^sup>* x y \<Longrightarrow> S\<^sup>+\<^sup>+ (f x) (g y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x y. R x y \<Longrightarrow> S (f x) (f y); \<And>y. S (f y) (g y); R\<^sup>*\<^sup>* x y\<rbrakk> \<Longrightarrow> S\<^sup>+\<^sup>+ (f x) (g y)
[PROOF STEP]
apply (rule_tac ?b="f y" in rtranclp_into_tranclp1, auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x y. R x y \<Longrightarrow> S (f x) (f y); \<And>y. S (f y) (g y); R\<^sup>*\<^sup>* x y\<rbrakk> \<Longrightarrow> S\<^sup>*\<^sup>* (f x) (f y)
[PROOF STEP]
by (rule preserve_rtranclp, auto)


[STATEMENT]
lemma isUCont_plus[simp]:
  shows \<open>isUCont (\<lambda>(x::'a::real_normed_vector,y). x+y)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isUCont (\<lambda>(x, y). x + y)
[PROOF STEP]
proof (rule isUCont_prod_metric[THEN iffD2], intro allI impI, simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>e. 0 < e \<Longrightarrow> \<exists>d>0. \<forall>x y. dist x y < d \<longrightarrow> (\<forall>x' y'. dist x' y' < d \<longrightarrow> dist (x + x') (y + y') < e)
[PROOF STEP]
fix e :: real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>e. 0 < e \<Longrightarrow> \<exists>d>0. \<forall>x y. dist x y < d \<longrightarrow> (\<forall>x' y'. dist x' y' < d \<longrightarrow> dist (x + x') (y + y') < e)
[PROOF STEP]
assume \<open>0 < e\<close>
[PROOF STATE]
proof (state)
this:
0 < e

goal (1 subgoal):
 1. \<And>e. 0 < e \<Longrightarrow> \<exists>d>0. \<forall>x y. dist x y < d \<longrightarrow> (\<forall>x' y'. dist x' y' < d \<longrightarrow> dist (x + x') (y + y') < e)
[PROOF STEP]
show \<open>\<exists>d>0. \<forall>x y :: 'a. dist x y < d \<longrightarrow> (\<forall>x' y'. dist x' y' < d \<longrightarrow> dist (x + x') (y + y') < e)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>d>0. \<forall>x y. dist x y < d \<longrightarrow> (\<forall>x' y'. dist x' y' < d \<longrightarrow> dist (x + x') (y + y') < e)
[PROOF STEP]
apply (rule exI[of _ \<open>e/2\<close>])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < e / 2 \<and> (\<forall>x y. dist x y < e / 2 \<longrightarrow> (\<forall>x' y'. dist x' y' < e / 2 \<longrightarrow> dist (x + x') (y + y') < e))
[PROOF STEP]
using \<open>0 < e\<close>
[PROOF STATE]
proof (prove)
using this:
0 < e

goal (1 subgoal):
 1. 0 < e / 2 \<and> (\<forall>x y. dist x y < e / 2 \<longrightarrow> (\<forall>x' y'. dist x' y' < e / 2 \<longrightarrow> dist (x + x') (y + y') < e))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y x' y'. \<lbrakk>0 < e; dist x y * 2 < e; dist x' y' * 2 < e\<rbrakk> \<Longrightarrow> dist (x + x') (y + y') < e
[PROOF STEP]
by (smt (verit, ccfv_SIG) dist_add_cancel dist_add_cancel2 dist_commute dist_triangle_lt)
[PROOF STATE]
proof (state)
this:
\<exists>d>0. \<forall>x y. dist x y < d \<longrightarrow> (\<forall>x' y'. dist x' y' < d \<longrightarrow> dist (x + x') (y + y') < e)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma group_isoI[intro]:
  assumes G: "group G"
      and H: "group H"
      and inj1: "\<forall>x\<in>carrier G. h x = \<one>\<^bsub>H\<^esub> \<longrightarrow> x = \<one>\<^bsub>G\<^esub>"
      and surj: "h ` (carrier G) = carrier H"
      and hom: "\<forall>x\<in>carrier G. \<forall>y\<in>carrier G. h (x \<otimes>\<^bsub>G\<^esub> y) = h x \<otimes>\<^bsub>H\<^esub> h y"
  shows "h \<in> iso G H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h \<in> Group.iso G H
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. h \<in> Group.iso G H
[PROOF STEP]
from surj
[PROOF STATE]
proof (chain)
picking this:
h ` carrier G = carrier H
[PROOF STEP]
have "h \<in> carrier G \<rightarrow> carrier H"
[PROOF STATE]
proof (prove)
using this:
h ` carrier G = carrier H

goal (1 subgoal):
 1. h \<in> carrier G \<rightarrow> carrier H
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
h \<in> carrier G \<rightarrow> carrier H

goal (1 subgoal):
 1. h \<in> Group.iso G H
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
h \<in> carrier G \<rightarrow> carrier H
[PROOF STEP]
interpret group_hom G H h
[PROOF STATE]
proof (prove)
using this:
h \<in> carrier G \<rightarrow> carrier H

goal (1 subgoal):
 1. group_hom G H h
[PROOF STEP]
using G and H and hom
[PROOF STATE]
proof (prove)
using this:
h \<in> carrier G \<rightarrow> carrier H
Group.group G
Group.group H
\<forall>x\<in>carrier G. \<forall>y\<in>carrier G. h (x \<otimes>\<^bsub>G\<^esub> y) = h x \<otimes>\<^bsub>H\<^esub> h y

goal (1 subgoal):
 1. group_hom G H h
[PROOF STEP]
by (auto intro!: group_hom.intro group_hom_axioms.intro)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. h \<in> Group.iso G H
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h \<in> Group.iso G H
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Group.group G
Group.group H
\<forall>x\<in>carrier G. h x = \<one>\<^bsub>H\<^esub> \<longrightarrow> x = \<one>\<^bsub>G\<^esub>
h ` carrier G = carrier H
\<forall>x\<in>carrier G. \<forall>y\<in>carrier G. h (x \<otimes>\<^bsub>G\<^esub> y) = h x \<otimes>\<^bsub>H\<^esub> h y

goal (1 subgoal):
 1. h \<in> Group.iso G H
[PROOF STEP]
unfolding hom_def
[PROOF STATE]
proof (prove)
using this:
Group.group G
Group.group H
\<forall>x\<in>carrier G. h x = \<one>\<^bsub>H\<^esub> \<longrightarrow> x = \<one>\<^bsub>G\<^esub>
h ` carrier G = carrier H
\<forall>x\<in>carrier G. \<forall>y\<in>carrier G. h (x \<otimes>\<^bsub>G\<^esub> y) = h x \<otimes>\<^bsub>H\<^esub> h y

goal (1 subgoal):
 1. h \<in> Group.iso G H
[PROOF STEP]
by (auto intro: group_hom_isoI)
[PROOF STATE]
proof (state)
this:
h \<in> Group.iso G H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "((P\<or>Q) \<and> (\<not>P\<or>Q) \<and> (P\<or> \<not>Q)) \<longrightarrow> \<not> (\<not>P \<or> \<not>Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P \<or> Q) \<and> (\<not> P \<or> Q) \<and> (P \<or> \<not> Q) \<longrightarrow> \<not> (\<not> P \<or> \<not> Q)
[PROOF STEP]
by blast


[STATEMENT]
theorem ln_upper_7: "0 < x \<Longrightarrow> ln(x) \<le> ln_upper_7 x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> ln x \<le> ln_upper_7 x
[PROOF STEP]
by (metis le_less_linear less_eq_real_def ln_upper_7_neg ln_upper_7_pos)


[STATEMENT]
lemma frechet_derivative_cos:
  "frechet_derivative (\<lambda>x. cos (f x)) (at x) = (\<lambda>xa. frechet_derivative f (at x) xa * - sin (f x))"
  if "f differentiable (at x)"
  for f::"_\<Rightarrow>real"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frechet_derivative (\<lambda>x. cos (f x)) (at x) = (\<lambda>xa. frechet_derivative f (at x) xa * - sin (f x))
[PROOF STEP]
by (rule frechet_derivative_at'[OF has_derivative_cos[OF frechet_derivative_worksI[OF that]]])


[STATEMENT]
lemma M_index_square_itself: "j < dim_col M \<Longrightarrow> i < dim_row M \<Longrightarrow> (M $$ (i, j))^2 = M $$ (i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>j < dim_col M; i < dim_row M\<rbrakk> \<Longrightarrow> (M $$ (i, j))\<^sup>2 = M $$ (i, j)
[PROOF STEP]
using M_not_zero_simp
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?j < dim_col M; ?i < dim_row M; M $$ (?i, ?j) \<noteq> (0::'b)\<rbrakk> \<Longrightarrow> M $$ (?i, ?j) = (1::'b)

goal (1 subgoal):
 1. \<lbrakk>j < dim_col M; i < dim_row M\<rbrakk> \<Longrightarrow> (M $$ (i, j))\<^sup>2 = M $$ (i, j)
[PROOF STEP]
by (cases "M $$ (i, j) = 0")(simp_all, metis power_one)


[STATEMENT]
theorem wls_Abs_swap_ex:
assumes  "wls s X" and "wls s X'"
shows
"(Abs xs x X = Abs xs x' X') =
 (\<exists> y. y \<notin> {x,x'} \<and> fresh xs y X \<and> fresh xs y X' \<and>
       (X #[y \<and> x]_xs) = (X' #[y \<and> x']_xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Abs xs x X = Abs xs x' X') = (\<exists>y. y \<notin> {x, x'} \<and> fresh xs y X \<and> fresh xs y X' \<and> X #[y \<and> x]_xs = X' #[y \<and> x']_xs)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wls s X
wls s X'

goal (1 subgoal):
 1. (Abs xs x X = Abs xs x' X') = (\<exists>y. y \<notin> {x, x'} \<and> fresh xs y X \<and> fresh xs y X' \<and> X #[y \<and> x]_xs = X' #[y \<and> x']_xs)
[PROOF STEP]
by(simp add: wls_Abs_ainj_ex)


[STATEMENT]
lemma base: "\<alpha> > 4/3 \<Longrightarrow> base > 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 4 / 3 < \<alpha> \<Longrightarrow> 1 < base
[PROOF STEP]
using reduction(1,3)
[PROOF STATE]
proof (prove)
using this:
0 < reduction
4 / 3 < \<alpha> \<Longrightarrow> reduction < 1

goal (1 subgoal):
 1. 4 / 3 < \<alpha> \<Longrightarrow> 1 < base
[PROOF STEP]
unfolding reduction_def base_def
[PROOF STATE]
proof (prove)
using this:
0 < (4 + \<alpha>) / (4 * \<alpha>)
4 / 3 < \<alpha> \<Longrightarrow> (4 + \<alpha>) / (4 * \<alpha>) < 1

goal (1 subgoal):
 1. 4 / 3 < \<alpha> \<Longrightarrow> 1 < real_of_rat (4 * \<alpha> / (4 + \<alpha>))
[PROOF STEP]
by auto


[STATEMENT]
lemma count_vec_sum_zeros:
  fixes v :: "'a :: {ring_1} vec"
  assumes "\<And> i. i < dim_vec v \<Longrightarrow> v $ i = 1 \<or> v $ i = 0"
  shows "of_nat (count_vec v 0) = of_nat (dim_vec v) - sum_vec v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat (count_vec v (0::'a)) = of_nat (dim_vec v) - sum_vec v
[PROOF STEP]
using count_vec_two_elems assms count_vec_sum_ones
[PROOF STATE]
proof (prove)
using this:
(\<And>i. i < dim_vec ?v \<Longrightarrow> ?v $ i = (1::?'a) \<or> ?v $ i = (0::?'a)) \<Longrightarrow> count_vec ?v (1::?'a) + count_vec ?v (0::?'a) = dim_vec ?v
?i < dim_vec v \<Longrightarrow> v $ ?i = (1::'a) \<or> v $ ?i = (0::'a)
(\<And>i. i < dim_vec ?v \<Longrightarrow> ?v $ i = (1::?'a) \<or> ?v $ i = (0::?'a)) \<Longrightarrow> of_nat (count_vec ?v (1::?'a)) = sum_vec ?v

goal (1 subgoal):
 1. of_nat (count_vec v (0::'a)) = of_nat (dim_vec v) - sum_vec v
[PROOF STEP]
by (metis add_diff_cancel_left' of_nat_add)


[STATEMENT]
lemma ennreal_le_iff2: "ennreal x \<le> ennreal y \<longleftrightarrow> ((0 \<le> y \<and> x \<le> y) \<or> (x \<le> 0 \<and> y \<le> 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ennreal x \<le> ennreal y) = (0 \<le> y \<and> x \<le> y \<or> x \<le> 0 \<and> y \<le> 0)
[PROOF STEP]
by (cases "0 \<le> y") (auto simp: ennreal_eq_0_iff ennreal_neg)


[STATEMENT]
lemma  orthogonal_rotation_or_rotoinversion:
  fixes Q :: "'a::linordered_idom^'n^'n"
  shows " orthogonal_matrix Q \<longleftrightarrow> rotation_matrix Q \<or> rotoinversion_matrix Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal_matrix Q = (rotation_matrix Q \<or> rotoinversion_matrix Q)
[PROOF STEP]
by (metis rotoinversion_matrix_def rotation_matrix_def det_orthogonal_matrix)


[STATEMENT]
lemma cart_product_add_1_filter: "{#m \<in># ((add_mset a M) \<times># N) . P m #} =
    {#m \<in># (M \<times># N) . P m #} + {#m \<in># ({#a#} \<times>#  N) . P m #}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filter_mset P (add_mset a M \<times># N) = filter_mset P (M \<times># N) + filter_mset P ({#a#} \<times># N)
[PROOF STEP]
unfolding add_mset_add_single [of a M] Sigma_mset_plus_distrib1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filter_mset P (M \<times># N + {#a#} \<times># N) = filter_mset P (M \<times># N) + filter_mset P ({#a#} \<times># N)
[PROOF STEP]
by (simp add: Times_mset_single_left)


[STATEMENT]
lemma Deriv_empty[simp]:   "Deriv a {} = {}"
  and Deriv_epsilon[simp]: "Deriv a {[]} = {}"
  and Deriv_char[simp]:    "Deriv a {[b]} = (if a = b then {[]} else {})"
  and Deriv_union[simp]:   "Deriv a (A \<union> B) = Deriv a A \<union> Deriv a B"
  and Deriv_inter[simp]:   "Deriv a (A \<inter> B) = Deriv a A \<inter> Deriv a B"
  and Deriv_compl[simp]:   "Deriv a (-A) = - Deriv a A"
  and Deriv_Union[simp]:   "Deriv a (Union M) = Union(Deriv a ` M)"
  and Deriv_UN[simp]:      "Deriv a (UN x:I. S x) = (UN x:I. Deriv a (S x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((Deriv a {} = {} &&& Deriv a {[]} = {}) &&& Deriv a {[b]} = (if a = b then {[]} else {}) &&& Deriv a (A \<union> B) = Deriv a A \<union> Deriv a B) &&& (Deriv a (A \<inter> B) = Deriv a A \<inter> Deriv a B &&& Deriv a (- A) = - Deriv a A) &&& Deriv a (\<Union> M) = \<Union> (Deriv a ` M) &&& Deriv a (\<Union> (S ` I)) = (\<Union>x\<in>I. Deriv a (S x))
[PROOF STEP]
by (auto simp: Deriv_def)


[STATEMENT]
lemma log_divide_eq:
  "log b (A / B) = (if 0 < A * B then log b \<bar>A\<bar> - log b \<bar>B\<bar> else log b 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. log b (A / B) = (if 0 < A * B then log b \<bar>A\<bar> - log b \<bar>B\<bar> else log b 0)
[PROOF STEP]
unfolding divide_inverse log_mult_eq log_inverse_eq abs_inverse
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if 0 < A * inverse B then log b \<bar>A\<bar> + (if 0 < \<bar>B\<bar> then - log b \<bar>B\<bar> else log b 0) else log b 0) = (if 0 < A * B then log b \<bar>A\<bar> - log b \<bar>B\<bar> else log b 0)
[PROOF STEP]
by (auto simp: zero_less_mult_iff mult_le_0_iff)


[STATEMENT]
lemma pochhammer_double:
  fixes z :: "'a::field_char_0"
  shows "pochhammer (2 * z) (2 * n) = of_nat (2^(2*n)) * pochhammer z n * pochhammer (z+1/2) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. pochhammer ((2::'a) * z) (2 * 0) = of_nat (2 ^ (2 * 0)) * pochhammer z 0 * pochhammer (z + (1::'a) / (2::'a)) 0
 2. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. pochhammer ((2::'a) * z) (2 * 0) = of_nat (2 ^ (2 * 0)) * pochhammer z 0 * pochhammer (z + (1::'a) / (2::'a)) 0
 2. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer ((2::'a) * z) (2 * 0) = of_nat (2 ^ (2 * 0)) * pochhammer z 0 * pochhammer (z + (1::'a) / (2::'a)) 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pochhammer ((2::'a) * z) (2 * 0) = of_nat (2 ^ (2 * 0)) * pochhammer z 0 * pochhammer (z + (1::'a) / (2::'a)) 0

goal (1 subgoal):
 1. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n

goal (1 subgoal):
 1. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
have "pochhammer (2 * z) (2 * (Suc n)) = pochhammer (2 * z) (2 * n) *
      (2 * (z + of_nat n)) * (2 * (z + of_nat n) + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer ((2::'a) * z) (2 * Suc n) = pochhammer ((2::'a) * z) (2 * n) * ((2::'a) * (z + of_nat n)) * ((2::'a) * (z + of_nat n) + (1::'a))
[PROOF STEP]
by (simp add: pochhammer_rec' ac_simps)
[PROOF STATE]
proof (state)
this:
pochhammer ((2::'a) * z) (2 * Suc n) = pochhammer ((2::'a) * z) (2 * n) * ((2::'a) * (z + of_nat n)) * ((2::'a) * (z + of_nat n) + (1::'a))

goal (1 subgoal):
 1. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pochhammer ((2::'a) * z) (2 * Suc n) = pochhammer ((2::'a) * z) (2 * n) * ((2::'a) * (z + of_nat n)) * ((2::'a) * (z + of_nat n) + (1::'a))

goal (1 subgoal):
 1. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
note Suc
[PROOF STATE]
proof (state)
this:
pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n

goal (1 subgoal):
 1. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n

goal (1 subgoal):
 1. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
have "of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + 1/2) n *
        (2 * (z + of_nat n)) * (2 * (z + of_nat n) + 1) =
      of_nat (2 ^ (2 * (Suc n))) * pochhammer z (Suc n) * pochhammer (z + 1/2) (Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n * ((2::'a) * (z + of_nat n)) * ((2::'a) * (z + of_nat n) + (1::'a)) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
by (simp add: field_simps pochhammer_rec')
[PROOF STATE]
proof (state)
this:
of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n * ((2::'a) * (z + of_nat n)) * ((2::'a) * (z + of_nat n) + (1::'a)) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)

goal (1 subgoal):
 1. \<And>n. pochhammer ((2::'a) * z) (2 * n) = of_nat (2 ^ (2 * n)) * pochhammer z n * pochhammer (z + (1::'a) / (2::'a)) n \<Longrightarrow> pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)

goal (1 subgoal):
 1. pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
pochhammer ((2::'a) * z) (2 * Suc n) = of_nat (2 ^ (2 * Suc n)) * pochhammer z (Suc n) * pochhammer (z + (1::'a) / (2::'a)) (Suc n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem (in prime_number_theorem) divisor_count_primorial_gt:
  assumes "\<epsilon> > 0"
  defines "h \<equiv> primorial"
  shows "eventually (\<lambda>x. divisor_count (h x) > 2 powr ((1 - \<epsilon>) * ln (h x) / ln (ln (h x)))) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
have "(\<lambda>x. (1 - \<epsilon>) * ln (h x) / ln (ln (h x))) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * \<theta> x / ln (\<theta> x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * \<theta> x / ln (\<theta> x))
[PROOF STEP]
by (simp add: h_def ln_primorial)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * \<theta> x / ln (\<theta> x))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * \<theta> x / ln (\<theta> x))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
have "\<dots> \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * x / ln x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * \<theta> x / ln (\<theta> x)) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * x / ln x)
[PROOF STEP]
by (intro asymp_equiv_intros \<theta>_asymptotics ln_\<theta>_asymp_equiv)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * \<theta> x / ln (\<theta> x)) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * x / ln x)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>c d. c \<sim>[at_top] d \<Longrightarrow> c \<sim>[at_top] d) \<Longrightarrow> (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) \<sim>[at_top] (\<lambda>a. (1 - \<epsilon>) * a / ln a)
[PROOF STEP]
have *: "(\<lambda>x. (1 - \<epsilon>) * ln (h x) / ln (ln (h x))) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * x / ln x)"
[PROOF STATE]
proof (prove)
using this:
(\<And>c d. c \<sim>[at_top] d \<Longrightarrow> c \<sim>[at_top] d) \<Longrightarrow> (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) \<sim>[at_top] (\<lambda>a. (1 - \<epsilon>) * a / ln a)

goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * x / ln x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) \<sim>[at_top] (\<lambda>x. (1 - \<epsilon>) * x / ln x)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
have "(\<lambda>x. (1 - \<epsilon>) * ln (h x) / (ln (ln (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)
[PROOF STEP]
using asymp_equiv_imp_diff_smallo[OF *]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)

goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
have "?this \<longleftrightarrow> (\<lambda>x. (1 - \<epsilon>) * ln (h x) / (ln (ln (h x))) - x / ln x + \<epsilon> * x / ln x)
                \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)) = ((\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x))
[PROOF STEP]
by (intro landau_o.small.in_cong eventually_mono[OF eventually_gt_at_top[of 1]])
       (auto simp: field_simps)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)) = ((\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - (1 - \<epsilon>) * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x)) = ((\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x) \<in> o(\<lambda>x. (1 - \<epsilon>) * x / ln x))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
have "(\<lambda>x. (1 - \<epsilon>) * x / ln x) \<in> O(\<lambda>x. x / ln x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * x / ln x) \<in> O(\<lambda>x. x / ln x)
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * x / ln x) \<in> O(\<lambda>x. x / ln x)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x) \<in> o(\<lambda>x. x / ln x)
[PROOF STEP]
have "(\<lambda>x. (1 - \<epsilon>) * ln (h x) / (ln (ln (h x))) - x / ln x + \<epsilon> * x / ln x)
                   \<in> o(\<lambda>x. x / ln x)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x) \<in> o(\<lambda>x. x / ln x)

goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x) \<in> o(\<lambda>x. x / ln x)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x) \<in> o(\<lambda>x. x / ln x)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
hence "(\<lambda>x. (1 - \<epsilon>) * ln (h x) / (ln (ln (h x))) - x / ln x + \<epsilon> * x / ln x - (\<pi> x - x / ln x))
           \<in> o(\<lambda>x. x / ln x)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x) \<in> o(\<lambda>x. x / ln x)

goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x - (\<pi> x - x / ln x)) \<in> o(\<lambda>x. x / ln x)
[PROOF STEP]
by (intro sum_in_smallo[OF _ asymp_equiv_imp_diff_smallo] prime_number_theorem)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x - (\<pi> x - x / ln x)) \<in> o(\<lambda>x. x / ln x)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
hence "(\<lambda>x. (1 - \<epsilon>) * ln (h x) / (ln (ln (h x))) - \<pi> x + \<epsilon> * (x / ln x)) \<in> o(\<lambda>x. \<epsilon> * (x / ln x))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x - (\<pi> x - x / ln x)) \<in> o(\<lambda>x. x / ln x)

goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x + \<epsilon> * (x / ln x)) \<in> o(\<lambda>x. \<epsilon> * (x / ln x))
[PROOF STEP]
using \<open>\<epsilon> > 0\<close>
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - x / ln x + \<epsilon> * x / ln x - (\<pi> x - x / ln x)) \<in> o(\<lambda>x. x / ln x)
0 < \<epsilon>

goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x + \<epsilon> * (x / ln x)) \<in> o(\<lambda>x. \<epsilon> * (x / ln x))
[PROOF STEP]
by (subst landau_o.small.cmult) (simp_all add: algebra_simps)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x + \<epsilon> * (x / ln x)) \<in> o(\<lambda>x. \<epsilon> * (x / ln x))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
hence "(\<lambda>x. (1 - \<epsilon>) * ln (h x) / (ln (ln (h x))) - \<pi> x) \<sim>[at_top] (\<lambda>x. -\<epsilon> * (x / ln x))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x + \<epsilon> * (x / ln x)) \<in> o(\<lambda>x. \<epsilon> * (x / ln x))

goal (1 subgoal):
 1. (\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x) \<sim>[at_top] (\<lambda>x. - \<epsilon> * (x / ln x))
[PROOF STEP]
by (intro smallo_imp_asymp_equiv) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x) \<sim>[at_top] (\<lambda>x. - \<epsilon> * (x / ln x))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
hence "eventually (\<lambda>x. (1 - \<epsilon>) * ln (h x) / (ln (ln (h x))) - \<pi> x < 0 \<longleftrightarrow>
                         -\<epsilon> * (x / ln x) < 0) at_top"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x) \<sim>[at_top] (\<lambda>x. - \<epsilon> * (x / ln x))

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x < 0) = (- \<epsilon> * (x / ln x) < 0)
[PROOF STEP]
by (rule asymp_equiv_eventually_neg_iff)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x < 0) = (- \<epsilon> * (x / ln x) < 0)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x < 0) = (- \<epsilon> * (x / ln x) < 0)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
have "eventually (\<lambda>x. -\<epsilon> * (x / ln x) < 0) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. - \<epsilon> * (x / ln x) < 0
[PROOF STEP]
using \<open>\<epsilon> > 0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < \<epsilon>

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. - \<epsilon> * (x / ln x) < 0
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. - \<epsilon> * (x / ln x) < 0

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in at_top. ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x < 0) = (- \<epsilon> * (x / ln x) < 0)
\<forall>\<^sub>F x in at_top. - \<epsilon> * (x / ln x) < 0
[PROOF STEP]
have "eventually (\<lambda>x. (1 - \<epsilon>) * ln (h x) / ln (ln (h x)) < \<pi> x) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) - \<pi> x < 0) = (- \<epsilon> * (x / ln x) < 0)
\<forall>\<^sub>F x in at_top. - \<epsilon> * (x / ln x) < 0

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) < \<pi> x
[PROOF STEP]
by eventually_elim simp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) < \<pi> x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
thus "eventually (\<lambda>x. divisor_count (h x) > 2 powr ((1 - \<epsilon>) * ln (h x) / ln (ln (h x)))) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) < \<pi> x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) < \<pi> x \<Longrightarrow> 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
case (elim x)
[PROOF STATE]
proof (state)
this:
(1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) < \<pi> x

goal (1 subgoal):
 1. \<And>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) < \<pi> x \<Longrightarrow> 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
hence "2 powr ((1 - \<epsilon>) * ln (h x) / ln (ln (h x))) < 2 powr \<pi> x"
[PROOF STATE]
proof (prove)
using this:
(1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) < \<pi> x

goal (1 subgoal):
 1. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < 2 powr \<pi> x
[PROOF STEP]
by (intro powr_less_mono) auto
[PROOF STATE]
proof (state)
this:
2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < 2 powr \<pi> x

goal (1 subgoal):
 1. \<And>x. (1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x))) < \<pi> x \<Longrightarrow> 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < 2 powr \<pi> x

goal (1 subgoal):
 1. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))
[PROOF STEP]
by (simp add: divisor_count_primorial h_def)
[PROOF STATE]
proof (state)
this:
2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. 2 powr ((1 - \<epsilon>) * ln (real (h x)) / ln (ln (real (h x)))) < real (divisor_count (h x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma not_union_or: "(x\<notin>A\<union>B) = (x\<notin>A \<and> x\<notin>B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<notin> A \<union> B) = (x \<notin> A \<and> x \<notin> B)
[PROOF STEP]
by simp


[STATEMENT]
lemma in_ChainsD: "\<lbrakk> M \<in> Chains r; x \<in> M; y \<in> M \<rbrakk> \<Longrightarrow> (x, y) \<in> r \<or> (y, x) \<in> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>M \<in> Chains r; x \<in> M; y \<in> M\<rbrakk> \<Longrightarrow> (x, y) \<in> r \<or> (y, x) \<in> r
[PROOF STEP]
unfolding Chains_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>M \<in> {C. \<forall>a\<in>C. \<forall>b\<in>C. (a, b) \<in> r \<or> (b, a) \<in> r}; x \<in> M; y \<in> M\<rbrakk> \<Longrightarrow> (x, y) \<in> r \<or> (y, x) \<in> r
[PROOF STEP]
by fast


[STATEMENT]
lemma  prod_2: "prod f {(1::nat)..2} = f 1 * f 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod f {1..2} = f 1 * f 2
[PROOF STEP]
by (simp add: eval_nat_numeral atLeastAtMostSuc_conv mult.commute)


[STATEMENT]
lemma "x \<in> {0.5 .. 4.5} \<longrightarrow> \<bar> arctan x - 0.91 \<bar> < 0.455"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> {5 / 10..45 / 10} \<longrightarrow> \<bar>arctan x - 91 / 10\<^sup>2\<bar> < 455 / 10 ^ 3
[PROOF STEP]
by (approximation 10)


[STATEMENT]
lemma Ball_Sum_iff: "(\<forall>x\<in>A<+>B. P x) \<longleftrightarrow> (\<forall> x\<in>A. P (Inl x)) \<and> (\<forall> y\<in>B. P (Inr y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>A <+> B. P x) = ((\<forall>x\<in>A. P (Inl x)) \<and> (\<forall>y\<in>B. P (Inr y)))
[PROOF STEP]
by (auto)


[STATEMENT]
lemma gbinomial_absorb_comp: "(a - of_nat k) * (a gchoose k) = a * ((a - 1) gchoose k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a - of_nat k) * (a gchoose k) = a * (a - (1::'a) gchoose k)
[PROOF STEP]
using pochhammer_absorb_comp[of a k]
[PROOF STATE]
proof (prove)
using this:
(a - of_nat k) * pochhammer (- a) k = a * pochhammer (- a + (1::'a)) k

goal (1 subgoal):
 1. (a - of_nat k) * (a gchoose k) = a * (a - (1::'a) gchoose k)
[PROOF STEP]
by (simp add: gbinomial_pochhammer)


[STATEMENT]
lemma fds_euler_product_LIMSEQ:
  fixes f :: "'a :: {nat_power, real_normed_field, banach, second_countable_topology} fds"
  assumes "multiplicative_function (fds_nth f)" and "fds_abs_converges f s"
  shows   "(\<lambda>n. \<Prod>p\<le>n. if prime p then \<Sum>i. fds_nth f (p ^ i) / nat_power (p ^ i) s else 1) \<longlonglongrightarrow>
             eval_fds f s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. \<Prod>p\<le>n. if prime p then \<Sum>i. fds_nth f (p ^ i) / nat_power (p ^ i) s else (1::'a)) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
unfolding eval_fds_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. \<Prod>p\<le>n. if prime p then \<Sum>i. fds_nth f (p ^ i) / nat_power (p ^ i) s else (1::'a)) \<longlonglongrightarrow> (\<Sum>n. fds_nth f n / nat_power n s)
[PROOF STEP]
proof (rule euler_product_LIMSEQ)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. summable (\<lambda>i. norm (fds_nth f i / nat_power i s))
 2. multiplicative_function (\<lambda>n. fds_nth f n / nat_power n s)
[PROOF STEP]
show "multiplicative_function (\<lambda>n. fds_nth f n / nat_power n s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicative_function (\<lambda>n. fds_nth f n / nat_power n s)
[PROOF STEP]
by (rule multiplicative_function_divide_nat_power) fact+
[PROOF STATE]
proof (state)
this:
multiplicative_function (\<lambda>n. fds_nth f n / nat_power n s)

goal (1 subgoal):
 1. summable (\<lambda>i. norm (fds_nth f i / nat_power i s))
[PROOF STEP]
qed (insert assms, auto simp: fds_abs_converges_def)


[STATEMENT]
lemma sgn_sqrt [simp]:
  shows "sgn (sqrt x) = sgn x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sgn (sqrt x) = sgn x
[PROOF STEP]
by (simp add: sgn_root sqrt_def)


[STATEMENT]
lemma mult_ceiling_le_Ints:
  assumes "0 \<le> a" "a \<in> Ints"
  shows "(of_int \<lceil>a * b\<rceil> :: 'a :: linordered_idom) \<le> of_int(\<lceil>a\<rceil> * \<lceil>b\<rceil>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int \<lceil>a * b\<rceil> \<le> of_int (\<lceil>a\<rceil> * \<lceil>b\<rceil>)
[PROOF STEP]
by (metis Ints_cases assms ceiling_le_iff ceiling_of_int le_of_int_ceiling mult_left_mono of_int_le_iff of_int_mult)


[STATEMENT]
lemma ltl_to_dra_nodes_finite:
  "finite (DRA.nodes (ltl_to_dra \<phi>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (DRA.nodes (ltl_to_dra \<phi>))
[PROOF STEP]
unfolding ltl_to_dra_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (DRA.nodes (DRA_Combine.union_list (map (\<lambda>(x, y). \<AA>' \<phi> x y) (advice_sets \<phi>))))
[PROOF STEP]
apply (rule DRA_Combine.union_list_nodes_finite)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all (finite \<circ> DRA.nodes) (map (\<lambda>(x, y). \<AA>' \<phi> x y) (advice_sets \<phi>))
[PROOF STEP]
apply (simp add: split_def \<AA>'_alphabet advice_sets_not_empty)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all (finite \<circ> DRA.nodes) (map (\<lambda>p. \<AA>' \<phi> (fst p) (snd p)) (advice_sets \<phi>))
[PROOF STEP]
apply (simp add: list.pred_set split_def \<AA>'_nodes_finite)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma isosceles_triangle:
  assumes "dist a c = dist b c"
  shows   "angle b a c = angle a b c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. angle b a c = angle a b c
[PROOF STEP]
by (rule congruent_triangle_sss) (insert assms, simp_all add: dist_commute)


[STATEMENT]
lemma power_eq_top_ennreal: "x ^ n = top \<longleftrightarrow> (n \<noteq> 0 \<and> (x::ennreal) = top)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x ^ n = top) = (n \<noteq> 0 \<and> x = top)
[PROOF STEP]
by (cases x rule: ennreal_cases)
     (auto simp: ennreal_power top_power_ennreal)


[STATEMENT]
lemma map_poly_Re_poly: fixes x :: real
  shows "poly (map_poly Re p) x = poly p (of_real x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (poly (map_poly Re p) x) = poly p (complex_of_real x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. complex_of_real (poly (map_poly Re p) x) = poly p (complex_of_real x)
[PROOF STEP]
have id: "map_poly (of_real o Re) p = p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly (complex_of_real \<circ> Re) p = p
[PROOF STEP]
by (rule map_poly_idI, insert coeffs, auto)
[PROOF STATE]
proof (state)
this:
map_poly (complex_of_real \<circ> Re) p = p

goal (1 subgoal):
 1. complex_of_real (poly (map_poly Re p) x) = poly p (complex_of_real x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (poly (map_poly Re p) x) = poly p (complex_of_real x)
[PROOF STEP]
unfolding arg_cong[OF id, of poly, symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (poly (map_poly Re p) x) = poly (map_poly (complex_of_real \<circ> Re) p) (complex_of_real x)
[PROOF STEP]
by (subst map_poly_map_poly[symmetric], auto)
[PROOF STATE]
proof (state)
this:
complex_of_real (poly (map_poly Re p) x) = poly p (complex_of_real x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_integral_component_nonneg:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  assumes "k \<in> Basis"
    and "(f has_integral i) S"
    and "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> (f x)\<bullet>k"
  shows "0 \<le> i\<bullet>k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> i \<bullet> k
[PROOF STEP]
using has_integral_component_le[OF assms(1) has_integral_0 assms(2)]
[PROOF STATE]
proof (prove)
using this:
(\<And>x. x \<in> S \<Longrightarrow> (0::'b) \<bullet> k \<le> f x \<bullet> k) \<Longrightarrow> (0::'b) \<bullet> k \<le> i \<bullet> k

goal (1 subgoal):
 1. 0 \<le> i \<bullet> k
[PROOF STEP]
using assms(3-)
[PROOF STATE]
proof (prove)
using this:
(\<And>x. x \<in> S \<Longrightarrow> (0::'b) \<bullet> k \<le> f x \<bullet> k) \<Longrightarrow> (0::'b) \<bullet> k \<le> i \<bullet> k
?x \<in> S \<Longrightarrow> 0 \<le> f ?x \<bullet> k

goal (1 subgoal):
 1. 0 \<le> i \<bullet> k
[PROOF STEP]
by auto


[STATEMENT]
lemma elements_mat: "elements_mat A = {A $$ (i,j) | i j. i < dim_row A \<and> j < dim_col A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. elements_mat A = {A $$ (i, j) |i j. i < dim_row A \<and> j < dim_col A}
[PROOF STEP]
unfolding elements_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (concat (map (\<lambda>i. map (\<lambda>j. A $$ (i, j)) [0..<dim_col A]) [0..<dim_row A])) = {A $$ (i, j) |i j. i < dim_row A \<and> j < dim_col A}
[PROOF STEP]
by force


[STATEMENT]
lemma insert_at_index_closed:
  assumes "length as = n"
  assumes "as \<in> carrier (R\<^bsup>n\<^esup>)"
  assumes "a \<in> carrier R"
  assumes "k \<le> n"
  shows "(insert_at_index as a k) \<in> carrier (R\<^bsup>Suc n\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert_at_index as a k \<in> carrier (R\<^bsup>Suc n\<^esup>)
[PROOF STEP]
apply(rule cartesian_power_car_memI')
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. length (insert_at_index as a k) = Suc n
 2. \<And>i. i < Suc n \<Longrightarrow> insert_at_index as a k ! i \<in> carrier R
[PROOF STEP]
apply (metis Groups.add_ac(2) assms(1) insert_at_index_length plus_1_eq_Suc)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i < Suc n \<Longrightarrow> insert_at_index as a k ! i \<in> carrier R
[PROOF STEP]
by (smt R_list_length Suc_le_eq assms(1) assms(2) assms(3) assms(4)
      cartesian_power_car_memE' insert_at_index_eq insert_at_index_eq'
      insert_at_index_eq'' less_Suc_eq less_Suc_eq_0_disj not_less_eq_eq)


[STATEMENT]
theorem i_drop_induct: "
  \<lbrakk> P (f \<Up> 0); \<And>n. P (f \<Up> n) \<Longrightarrow> P ( f \<Up> Suc n) \<rbrakk> \<Longrightarrow> P ( f \<Up> n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P (f \<Up> 0); \<And>n. P (f \<Up> n) \<Longrightarrow> P (f \<Up> Suc n)\<rbrakk> \<Longrightarrow> P (f \<Up> n)
[PROOF STEP]
by (rule nat.induct)


[STATEMENT]
lemma quadratic_shape2b:
  fixes a b c x y::"real"
  assumes "a < 0"
  assumes "x < y \<and> a*x^2 + b*x + c = 0 \<and> a*y^2 + b*y + c = 0"
  shows "\<And>z. (z > y \<Longrightarrow> a*z^2 + b*z + c < 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>z. y < z \<Longrightarrow> a * z\<^sup>2 + b * z + c < 0
[PROOF STEP]
using quadratic_shape1b[where a= "-a", where b = "-b", where c = "-c", where x = "x", where y = "y"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < - a; x < y \<and> - a * x\<^sup>2 + - b * x + - c = 0 \<and> - a * y\<^sup>2 + - b * y + - c = 0; y < ?z\<rbrakk> \<Longrightarrow> 0 < - a * ?z\<^sup>2 + - b * ?z + - c

goal (1 subgoal):
 1. \<And>z. y < z \<Longrightarrow> a * z\<^sup>2 + b * z + c < 0
[PROOF STEP]
using assms(1) assms(2)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < - a; x < y \<and> - a * x\<^sup>2 + - b * x + - c = 0 \<and> - a * y\<^sup>2 + - b * y + - c = 0; y < ?z\<rbrakk> \<Longrightarrow> 0 < - a * ?z\<^sup>2 + - b * ?z + - c
a < 0
x < y \<and> a * x\<^sup>2 + b * x + c = 0 \<and> a * y\<^sup>2 + b * y + c = 0

goal (1 subgoal):
 1. \<And>z. y < z \<Longrightarrow> a * z\<^sup>2 + b * z + c < 0
[PROOF STEP]
by force


[STATEMENT]
lemma lcm_unique_int:
  "d \<ge> 0 \<and> a dvd d \<and> b dvd d \<and> (\<forall>e. a dvd e \<and> b dvd e \<longrightarrow> d dvd e) \<longleftrightarrow> d = lcm a b"
  for a b d :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 \<le> d \<and> a dvd d \<and> b dvd d \<and> (\<forall>e. a dvd e \<and> b dvd e \<longrightarrow> d dvd e)) = (d = lcm a b)
[PROOF STEP]
using lcm_least zdvd_antisym_nonneg
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a dvd ?c; ?b dvd ?c\<rbrakk> \<Longrightarrow> lcm ?a ?b dvd ?c
\<lbrakk>0 \<le> ?m; 0 \<le> ?n; ?m dvd ?n; ?n dvd ?m\<rbrakk> \<Longrightarrow> ?m = ?n

goal (1 subgoal):
 1. (0 \<le> d \<and> a dvd d \<and> b dvd d \<and> (\<forall>e. a dvd e \<and> b dvd e \<longrightarrow> d dvd e)) = (d = lcm a b)
[PROOF STEP]
by auto


[STATEMENT]
lemma span_insert: "span (insert a S) = {x. \<exists>k. (x - k *s a) \<in> span S}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. span (insert a S) = {x. \<exists>k. x - k *s a \<in> span S}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. span (insert a S) = {x. \<exists>k. x - k *s a \<in> span S}
[PROOF STEP]
have "span ({a} \<union> S) = {x. \<exists>k. (x - k *s a) \<in> span S}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. span ({a} \<union> S) = {x. \<exists>k. x - k *s a \<in> span S}
[PROOF STEP]
unfolding span_Un span_singleton
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x + y |x y. x \<in> range (\<lambda>k. k *s a) \<and> y \<in> span S} = {x. \<exists>k. x - k *s a \<in> span S}
[PROOF STEP]
apply (auto simp add: set_eq_iff)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>y k. y \<in> span S \<Longrightarrow> \<exists>ka. k *s a + y - ka *s a \<in> span S
 2. \<And>x k. x - k *s a \<in> span S \<Longrightarrow> \<exists>xa y. x = xa + y \<and> xa \<in> range (\<lambda>k. k *s a) \<and> y \<in> span S
[PROOF STEP]
subgoal for y k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<in> span S \<Longrightarrow> \<exists>ka. k *s a + y - ka *s a \<in> span S
[PROOF STEP]
by (auto intro!: exI[of _ "k"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x k. x - k *s a \<in> span S \<Longrightarrow> \<exists>xa y. x = xa + y \<and> xa \<in> range (\<lambda>k. k *s a) \<and> y \<in> span S
[PROOF STEP]
subgoal for y k
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y - k *s a \<in> span S \<Longrightarrow> \<exists>x ya. y = x + ya \<and> x \<in> range (\<lambda>k. k *s a) \<and> ya \<in> span S
[PROOF STEP]
by (rule exI[of _ "k *s a"], rule exI[of _ "y - k *s a"]) auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
span ({a} \<union> S) = {x. \<exists>k. x - k *s a \<in> span S}

goal (1 subgoal):
 1. span (insert a S) = {x. \<exists>k. x - k *s a \<in> span S}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
span ({a} \<union> S) = {x. \<exists>k. x - k *s a \<in> span S}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
span ({a} \<union> S) = {x. \<exists>k. x - k *s a \<in> span S}

goal (1 subgoal):
 1. span (insert a S) = {x. \<exists>k. x - k *s a \<in> span S}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
span (insert a S) = {x. \<exists>k. x - k *s a \<in> span S}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma homeomorphic_affine_sets_eq:
  fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"
  assumes "affine S" "affine T"
  shows "S homeomorphic T \<longleftrightarrow> aff_dim S = aff_dim T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
proof (cases "S = {} \<or> T = {}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. S = {} \<or> T = {} \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
 2. \<not> (S = {} \<or> T = {}) \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
S = {} \<or> T = {}

goal (2 subgoals):
 1. S = {} \<or> T = {} \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
 2. \<not> (S = {} \<or> T = {}) \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
S = {} \<or> T = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
S = {} \<or> T = {}

goal (1 subgoal):
 1. S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
using assms homeomorphic_affine_sets
[PROOF STATE]
proof (prove)
using this:
S = {} \<or> T = {}
affine S
affine T
\<lbrakk>affine ?S; affine ?T; aff_dim ?S = aff_dim ?T\<rbrakk> \<Longrightarrow> ?S homeomorphic ?T

goal (1 subgoal):
 1. S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
S homeomorphic T = (aff_dim S = aff_dim T)

goal (1 subgoal):
 1. \<not> (S = {} \<or> T = {}) \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (S = {} \<or> T = {}) \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (S = {} \<or> T = {})

goal (1 subgoal):
 1. \<not> (S = {} \<or> T = {}) \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (S = {} \<or> T = {})
[PROOF STEP]
obtain a b where "a \<in> S" "b \<in> T"
[PROOF STATE]
proof (prove)
using this:
\<not> (S = {} \<or> T = {})

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>a \<in> S; b \<in> T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a \<in> S
b \<in> T

goal (1 subgoal):
 1. \<not> (S = {} \<or> T = {}) \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> S
b \<in> T
[PROOF STEP]
have "subspace ((+) (- a) ` S)" "subspace ((+) (- b) ` T)"
[PROOF STATE]
proof (prove)
using this:
a \<in> S
b \<in> T

goal (1 subgoal):
 1. subspace ((+) (- a) ` S) &&& subspace ((+) (- b) ` T)
[PROOF STEP]
using affine_diffs_subspace assms
[PROOF STATE]
proof (prove)
using this:
a \<in> S
b \<in> T
\<lbrakk>affine ?S; ?a \<in> ?S\<rbrakk> \<Longrightarrow> subspace ((+) (- ?a) ` ?S)
affine S
affine T

goal (1 subgoal):
 1. subspace ((+) (- a) ` S) &&& subspace ((+) (- b) ` T)
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
subspace ((+) (- a) ` S)
subspace ((+) (- b) ` T)

goal (1 subgoal):
 1. \<not> (S = {} \<or> T = {}) \<Longrightarrow> S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
subspace ((+) (- a) ` S)
subspace ((+) (- b) ` T)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
subspace ((+) (- a) ` S)
subspace ((+) (- b) ` T)

goal (1 subgoal):
 1. S homeomorphic T = (aff_dim S = aff_dim T)
[PROOF STEP]
by (metis affine_imp_convex assms homeomorphic_affine_sets homeomorphic_convex_sets)
[PROOF STATE]
proof (state)
this:
S homeomorphic T = (aff_dim S = aff_dim T)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prefix_same_length_eq:
  shows "(prefix a b \<and> length a = length b) \<longleftrightarrow> a = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (prefix a b \<and> length a = length b) = (a = b)
[PROOF STEP]
by (metis prefix_length_le prefix_length_prefix prefix_order.antisym prefix_order.order_refl)


[STATEMENT]
lemma div_invert:
  fixes x y n :: nat
  assumes "x > 0" "y > 0" "y \<le> n div x"
  shows "x \<le> n div y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<le> n div y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<le> n div y
[PROOF STEP]
from assms(1,3)
[PROOF STATE]
proof (chain)
picking this:
0 < x
y \<le> n div x
[PROOF STEP]
have "y * x \<le> (n div x) * x"
[PROOF STATE]
proof (prove)
using this:
0 < x
y \<le> n div x

goal (1 subgoal):
 1. y * x \<le> n div x * x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y * x \<le> n div x * x

goal (1 subgoal):
 1. x \<le> n div y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
y * x \<le> n div x * x

goal (1 subgoal):
 1. x \<le> n div y
[PROOF STEP]
have "\<dots> \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n div x * x \<le> n
[PROOF STEP]
by (simp add: minus_mod_eq_div_mult[symmetric])
[PROOF STATE]
proof (state)
this:
n div x * x \<le> n

goal (1 subgoal):
 1. x \<le> n div y
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
y * x \<le> n
[PROOF STEP]
have "y * x \<le> n"
[PROOF STATE]
proof (prove)
using this:
y * x \<le> n

goal (1 subgoal):
 1. y * x \<le> n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
y * x \<le> n

goal (1 subgoal):
 1. x \<le> n div y
[PROOF STEP]
with assms(2)
[PROOF STATE]
proof (chain)
picking this:
0 < y
y * x \<le> n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < y
y * x \<le> n

goal (1 subgoal):
 1. x \<le> n div y
[PROOF STEP]
using div_le_mono[of "y*x" n y]
[PROOF STATE]
proof (prove)
using this:
0 < y
y * x \<le> n
y * x \<le> n \<Longrightarrow> y * x div y \<le> n div y

goal (1 subgoal):
 1. x \<le> n div y
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<le> n div y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma content_ff_iff: "divides_ff x (content_ff p) \<longleftrightarrow> (\<forall> c \<in> set (coeffs p). divides_ff x c)" (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. divides_ff x (content_ff p) = (\<forall>c\<in>set (coeffs p). divides_ff x c)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. divides_ff x (content_ff p) \<Longrightarrow> \<forall>c\<in>set (coeffs p). divides_ff x c
 2. \<forall>c\<in>set (coeffs p). divides_ff x c \<Longrightarrow> divides_ff x (content_ff p)
[PROOF STEP]
assume ?l
[PROOF STATE]
proof (state)
this:
divides_ff x (content_ff p)

goal (2 subgoals):
 1. divides_ff x (content_ff p) \<Longrightarrow> \<forall>c\<in>set (coeffs p). divides_ff x c
 2. \<forall>c\<in>set (coeffs p). divides_ff x c \<Longrightarrow> divides_ff x (content_ff p)
[PROOF STEP]
from divides_ff_trans[OF this, unfolded content_ff_def, OF some_gcd_ff_list_divides]
[PROOF STATE]
proof (chain)
picking this:
?z \<in> set (coeffs p) \<Longrightarrow> divides_ff x ?z
[PROOF STEP]
show ?r
[PROOF STATE]
proof (prove)
using this:
?z \<in> set (coeffs p) \<Longrightarrow> divides_ff x ?z

goal (1 subgoal):
 1. \<forall>c\<in>set (coeffs p). divides_ff x c
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<forall>c\<in>set (coeffs p). divides_ff x c

goal (1 subgoal):
 1. \<forall>c\<in>set (coeffs p). divides_ff x c \<Longrightarrow> divides_ff x (content_ff p)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>c\<in>set (coeffs p). divides_ff x c \<Longrightarrow> divides_ff x (content_ff p)
[PROOF STEP]
assume ?r
[PROOF STATE]
proof (state)
this:
\<forall>c\<in>set (coeffs p). divides_ff x c

goal (1 subgoal):
 1. \<forall>c\<in>set (coeffs p). divides_ff x c \<Longrightarrow> divides_ff x (content_ff p)
[PROOF STEP]
thus ?l
[PROOF STATE]
proof (prove)
using this:
\<forall>c\<in>set (coeffs p). divides_ff x c

goal (1 subgoal):
 1. divides_ff x (content_ff p)
[PROOF STEP]
unfolding content_ff_def
[PROOF STATE]
proof (prove)
using this:
\<forall>c\<in>set (coeffs p). divides_ff x c

goal (1 subgoal):
 1. divides_ff x (some_gcd_ff_list (coeffs p))
[PROOF STEP]
by (intro some_gcd_ff_list_greatest, auto)
[PROOF STATE]
proof (state)
this:
divides_ff x (content_ff p)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pos_prod_lt:
  fixes c :: "'a::linordered_field"
  assumes "c > 0"
  shows "c * x < 0 \<equiv> x < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c * x < (0::'a) \<equiv> x < (0::'a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c * x < (0::'a) \<equiv> x < (0::'a)
[PROOF STEP]
have "c * x < 0 \<longleftrightarrow> 0 /c > x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c * x < (0::'a)) = (x < (0::'a) / c)
[PROOF STEP]
by (simp only: pos_less_divide_eq[OF \<open>c > 0\<close>] algebra_simps)
[PROOF STATE]
proof (state)
this:
(c * x < (0::'a)) = (x < (0::'a) / c)

goal (1 subgoal):
 1. c * x < (0::'a) \<equiv> x < (0::'a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(c * x < (0::'a)) = (x < (0::'a) / c)

goal (1 subgoal):
 1. c * x < (0::'a) \<equiv> x < (0::'a)
[PROOF STEP]
have "\<dots> \<longleftrightarrow> 0 > x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x < (0::'a) / c) = (x < (0::'a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(x < (0::'a) / c) = (x < (0::'a))

goal (1 subgoal):
 1. c * x < (0::'a) \<equiv> x < (0::'a)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(c * x < (0::'a)) = (x < (0::'a))
[PROOF STEP]
show "PROP ?thesis"
[PROOF STATE]
proof (prove)
using this:
(c * x < (0::'a)) = (x < (0::'a))

goal (1 subgoal):
 1. c * x < (0::'a) \<equiv> x < (0::'a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c * x < (0::'a) \<equiv> x < (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma orthogonal_commute: "orthogonal x y \<longleftrightarrow> orthogonal y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. orthogonal x y = orthogonal y x
[PROOF STEP]
unfolding orthogonal_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (inner x y = (0::'a)) = (inner y x = (0::'a))
[PROOF STEP]
using inner_commute_zero
[PROOF STATE]
proof (prove)
using this:
(inner ?xa ?x = (0::'a)) = (inner ?x ?xa = (0::'a))

goal (1 subgoal):
 1. (inner x y = (0::'a)) = (inner y x = (0::'a))
[PROOF STEP]
by auto


[STATEMENT]
lemma Lcm_no_units: "Lcm A = Lcm (A - {a. is_unit a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lcm A = Lcm (A - {a. is_unit a})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Lcm A = Lcm (A - {a. is_unit a})
[PROOF STEP]
have "(A - {a. is_unit a}) \<union> {a\<in>A. is_unit a} = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A - {a. is_unit a} \<union> {a \<in> A. is_unit a} = A
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A - {a. is_unit a} \<union> {a \<in> A. is_unit a} = A

goal (1 subgoal):
 1. Lcm A = Lcm (A - {a. is_unit a})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A - {a. is_unit a} \<union> {a \<in> A. is_unit a} = A
[PROOF STEP]
have "Lcm A = lcm (Lcm (A - {a. is_unit a})) (Lcm {a\<in>A. is_unit a})"
[PROOF STATE]
proof (prove)
using this:
A - {a. is_unit a} \<union> {a \<in> A. is_unit a} = A

goal (1 subgoal):
 1. Lcm A = lcm (Lcm (A - {a. is_unit a})) (Lcm {a \<in> A. is_unit a})
[PROOF STEP]
by (simp add: Lcm_Un [symmetric])
[PROOF STATE]
proof (state)
this:
Lcm A = lcm (Lcm (A - {a. is_unit a})) (Lcm {a \<in> A. is_unit a})

goal (1 subgoal):
 1. Lcm A = Lcm (A - {a. is_unit a})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Lcm A = lcm (Lcm (A - {a. is_unit a})) (Lcm {a \<in> A. is_unit a})

goal (1 subgoal):
 1. Lcm A = Lcm (A - {a. is_unit a})
[PROOF STEP]
have "Lcm {a\<in>A. is_unit a} = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lcm {a \<in> A. is_unit a} = (1::'a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Lcm {a \<in> A. is_unit a} = (1::'a)

goal (1 subgoal):
 1. Lcm A = Lcm (A - {a. is_unit a})
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Lcm A = lcm (Lcm (A - {a. is_unit a})) (1::'a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Lcm A = lcm (Lcm (A - {a. is_unit a})) (1::'a)

goal (1 subgoal):
 1. Lcm A = Lcm (A - {a. is_unit a})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Lcm A = Lcm (A - {a. is_unit a})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma append_rows_index:
  assumes "dim_col A = dim_col B"
  assumes "i < dim_row A + dim_row B"
  assumes "j < dim_col A"
  shows "(A @\<^sub>r B) $$ (i,j) = (if i < dim_row A then A $$ (i,j) else B $$ (i-dim_row A,j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A @\<^sub>r B) $$ (i, j) = (if i < dim_row A then A $$ (i, j) else B $$ (i - dim_row A, j))
[PROOF STEP]
unfolding append_rows_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat A (0\<^sub>m (dim_row A) 0) B (0\<^sub>m (dim_row B) 0) $$ (i, j) = (if i < dim_row A then A $$ (i, j) else B $$ (i - dim_row A, j))
[PROOF STEP]
apply (subst index_mat_four_block)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. i < dim_row A + dim_row (0\<^sub>m (dim_row B) 0)
 2. j < dim_col A + dim_col (0\<^sub>m (dim_row B) 0)
 3. (if i < dim_row A then if j < dim_col A then A $$ (i, j) else 0\<^sub>m (dim_row A) 0 $$ (i, j - dim_col A) else if j < dim_col A then B $$ (i - dim_row A, j) else 0\<^sub>m (dim_row B) 0 $$ (i - dim_row A, j - dim_col A)) = (if i < dim_row A then A $$ (i, j) else B $$ (i - dim_row A, j))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
dim_col A = dim_col B
i < dim_row A + dim_row B
j < dim_col A

goal (3 subgoals):
 1. i < dim_row A + dim_row (0\<^sub>m (dim_row B) 0)
 2. j < dim_col A + dim_col (0\<^sub>m (dim_row B) 0)
 3. (if i < dim_row A then if j < dim_col A then A $$ (i, j) else 0\<^sub>m (dim_row A) 0 $$ (i, j - dim_col A) else if j < dim_col A then B $$ (i - dim_row A, j) else 0\<^sub>m (dim_row B) 0 $$ (i - dim_row A, j - dim_col A)) = (if i < dim_row A then A $$ (i, j) else B $$ (i - dim_row A, j))
[PROOF STEP]
by auto


[STATEMENT]
lemma scaleC_left_mono_neg: "b \<le> a \<Longrightarrow> c \<le> 0 \<Longrightarrow> c *\<^sub>C a \<le> c *\<^sub>C b"
  for a b :: "'a::ordered_complex_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>b \<le> a; c \<le> 0\<rbrakk> \<Longrightarrow> c *\<^sub>C a \<le> c *\<^sub>C b
[PROOF STEP]
by (drule scaleC_left_mono [of _ _ "- c"], simp_all add: less_eq_complex_def)


[STATEMENT]
lemma homeomorphic_arc_image_interval:
  fixes g :: "real \<Rightarrow> 'a::t2_space" and a::real
  assumes "arc g" "a < b"
  shows "(path_image g) homeomorphic {a..b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image g homeomorphic {a..b}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_image g homeomorphic {a..b}
[PROOF STEP]
have "(path_image g) homeomorphic {0..1::real}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image g homeomorphic {0..1}
[PROOF STEP]
by (meson assms(1) homeomorphic_def homeomorphic_sym homeomorphism_arc)
[PROOF STATE]
proof (state)
this:
path_image g homeomorphic {0..1}

goal (1 subgoal):
 1. path_image g homeomorphic {a..b}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
path_image g homeomorphic {0..1}

goal (1 subgoal):
 1. path_image g homeomorphic {a..b}
[PROOF STEP]
have "\<dots> homeomorphic {a..b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {0..1} homeomorphic {a..b}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
arc g
a < b

goal (1 subgoal):
 1. {0..1} homeomorphic {a..b}
[PROOF STEP]
by (force intro: homeomorphic_closed_intervals_real)
[PROOF STATE]
proof (state)
this:
{0..1} homeomorphic {a..b}

goal (1 subgoal):
 1. path_image g homeomorphic {a..b}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
path_image g homeomorphic {a..b}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
path_image g homeomorphic {a..b}

goal (1 subgoal):
 1. path_image g homeomorphic {a..b}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
path_image g homeomorphic {a..b}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma gbinomial_parallel_sum: "(\<Sum>k\<le>n. (a + of_nat k) gchoose k) = (a + of_nat n + 1) gchoose n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<le>n. a + of_nat k gchoose k) = a + of_nat n + (1::'a) gchoose n
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<Sum>k\<le>0. a + of_nat k gchoose k) = a + of_nat 0 + (1::'a) gchoose 0
 2. \<And>n. (\<Sum>k\<le>n. a + of_nat k gchoose k) = a + of_nat n + (1::'a) gchoose n \<Longrightarrow> (\<Sum>k\<le>Suc n. a + of_nat k gchoose k) = a + of_nat (Suc n) + (1::'a) gchoose Suc n
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. (\<Sum>k\<le>0. a + of_nat k gchoose k) = a + of_nat 0 + (1::'a) gchoose 0
 2. \<And>n. (\<Sum>k\<le>n. a + of_nat k gchoose k) = a + of_nat n + (1::'a) gchoose n \<Longrightarrow> (\<Sum>k\<le>Suc n. a + of_nat k gchoose k) = a + of_nat (Suc n) + (1::'a) gchoose Suc n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<le>0. a + of_nat k gchoose k) = a + of_nat 0 + (1::'a) gchoose 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>0. a + of_nat k gchoose k) = a + of_nat 0 + (1::'a) gchoose 0

goal (1 subgoal):
 1. \<And>n. (\<Sum>k\<le>n. a + of_nat k gchoose k) = a + of_nat n + (1::'a) gchoose n \<Longrightarrow> (\<Sum>k\<le>Suc n. a + of_nat k gchoose k) = a + of_nat (Suc n) + (1::'a) gchoose Suc n
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. (\<Sum>k\<le>n. a + of_nat k gchoose k) = a + of_nat n + (1::'a) gchoose n \<Longrightarrow> (\<Sum>k\<le>Suc n. a + of_nat k gchoose k) = a + of_nat (Suc n) + (1::'a) gchoose Suc n
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>m. a + of_nat k gchoose k) = a + of_nat m + (1::'a) gchoose m

goal (1 subgoal):
 1. \<And>n. (\<Sum>k\<le>n. a + of_nat k gchoose k) = a + of_nat n + (1::'a) gchoose n \<Longrightarrow> (\<Sum>k\<le>Suc n. a + of_nat k gchoose k) = a + of_nat (Suc n) + (1::'a) gchoose Suc n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>k\<le>m. a + of_nat k gchoose k) = a + of_nat m + (1::'a) gchoose m
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(\<Sum>k\<le>m. a + of_nat k gchoose k) = a + of_nat m + (1::'a) gchoose m

goal (1 subgoal):
 1. (\<Sum>k\<le>Suc m. a + of_nat k gchoose k) = a + of_nat (Suc m) + (1::'a) gchoose Suc m
[PROOF STEP]
using gbinomial_Suc_Suc[of "(a + of_nat m + 1)" m]
[PROOF STATE]
proof (prove)
using this:
(\<Sum>k\<le>m. a + of_nat k gchoose k) = a + of_nat m + (1::'a) gchoose m
a + of_nat m + (1::'a) + (1::'a) gchoose Suc m = a + of_nat m + (1::'a) gchoose m + (a + of_nat m + (1::'a) gchoose Suc m)

goal (1 subgoal):
 1. (\<Sum>k\<le>Suc m. a + of_nat k gchoose k) = a + of_nat (Suc m) + (1::'a) gchoose Suc m
[PROOF STEP]
by (simp add: add_ac)
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>Suc m. a + of_nat k gchoose k) = a + of_nat (Suc m) + (1::'a) gchoose Suc m

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hyperpow_inverse: "\<And>r n. r \<noteq> (0::'a::field star) \<Longrightarrow> inverse (r pow n) = (inverse r) pow n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>r n. r \<noteq> 0 \<Longrightarrow> inverse (r pow n) = inverse r pow n
[PROOF STEP]
by transfer (rule power_inverse [symmetric])


[STATEMENT]
lemma (in Order) ord_isom_le_forall:"\<lbrakk>Order E; ord_isom D E f\<rbrakk> \<Longrightarrow>
      \<forall>a \<in> carrier D. \<forall> b \<in> carrier D. (a \<preceq> b) = ((f a) \<preceq>\<^bsub>E\<^esub> (f b))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Order E; ord_isom D E f\<rbrakk> \<Longrightarrow> \<forall>a\<in>carrier D. \<forall>b\<in>carrier D. a \<preceq> b = f a \<preceq>\<^bsub>E\<^esub> f b
[PROOF STEP]
by ((rule ballI)+,
       rule ord_isom_le, assumption+)