[STATEMENT]
lemma continuous_left_inverse_imp_quotient_map:
  assumes "continuous_on S f"
      and "continuous_on (f ` S) g"
      and  "\<And>x. x \<in> S \<Longrightarrow> g(f x) = x"
      and "U \<subseteq> f ` S"
    shows "openin (top_of_set S) (S \<inter> f -` U) \<longleftrightarrow>
           openin (top_of_set (f ` S)) U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (top_of_set S) (S \<inter> f -` U) = openin (top_of_set (f ` S)) U
[PROOF STEP]
apply (rule continuous_right_inverse_imp_quotient_map)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. continuous_on S f
 2. f ` S \<subseteq> f ` S
 3. continuous_on (f ` S) ?g
 4. ?g ` f ` S \<subseteq> S
 5. \<And>y. y \<in> f ` S \<Longrightarrow> f (?g y) = y
 6. U \<subseteq> f ` S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
continuous_on S f
continuous_on (f ` S) g
?x \<in> S \<Longrightarrow> g (f ?x) = ?x
U \<subseteq> f ` S

goal (6 subgoals):
 1. continuous_on S f
 2. f ` S \<subseteq> f ` S
 3. continuous_on (f ` S) ?g
 4. ?g ` f ` S \<subseteq> S
 5. \<And>y. y \<in> f ` S \<Longrightarrow> f (?g y) = y
 6. U \<subseteq> f ` S
[PROOF STEP]
apply force+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma le_imp_inverse_le_neg:
  "a \<le> b \<Longrightarrow> b < 0 \<Longrightarrow> inverse b \<le> inverse a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> b; b < (0::'a)\<rbrakk> \<Longrightarrow> inverse b \<le> inverse a
[PROOF STEP]
by (force simp add: le_less less_imp_inverse_less_neg)


[STATEMENT]
lemma nprv_bexiI:
"nprv F (subst \<phi> t1 x) \<Longrightarrow> nprv F (LLq t1 t) \<Longrightarrow>
 F \<subseteq> fmla \<Longrightarrow> finite F \<Longrightarrow> \<phi> \<in> fmla \<Longrightarrow> t \<in> atrm \<Longrightarrow> t1 \<in> atrm \<Longrightarrow> x \<in> var \<Longrightarrow>
 x \<notin> FvarsT t \<Longrightarrow>
 nprv F (bexi x t \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>nprv F (subst \<phi> t1 x); nprv F (LLq t1 t); F \<subseteq> fmla; finite F; \<phi> \<in> fmla; t \<in> atrm; t1 \<in> atrm; x \<in> var; x \<notin> FvarsT t\<rbrakk> \<Longrightarrow> nprv F (bexi x t \<phi>)
[PROOF STEP]
unfolding bexi_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>nprv F (subst \<phi> t1 x); nprv F (LLq t1 t); F \<subseteq> fmla; finite F; \<phi> \<in> fmla; t \<in> atrm; t1 \<in> atrm; x \<in> var; x \<notin> FvarsT t\<rbrakk> \<Longrightarrow> nprv F (exi x (cnj (LLq (Var x) t) \<phi>))
[PROOF STEP]
by (nprover2 r1: nprv_exiI[of _ _ t1] r2: nprv_cnjI)


[STATEMENT]
lemma iT_Plus_prev2: "k \<le> n \<Longrightarrow> iprev n (I \<oplus> k) = (iprev (n - k) I) + k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k \<le> n \<Longrightarrow> iprev n (I \<oplus> k) = iprev (n - k) I + k
[PROOF STEP]
by (insert iT_Plus_iprev[of "n - k" k I], simp)


[STATEMENT]
lemma uniformly_continuous_on_Cauchy:
  fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space"
  assumes "uniformly_continuous_on S f" "Cauchy X" "\<And>n. X n \<in> S"
  shows "Cauchy (\<lambda>n. f (X n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cauchy (\<lambda>n. f (X n))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
uniformly_continuous_on S f
Cauchy X
X ?n \<in> S

goal (1 subgoal):
 1. Cauchy (\<lambda>n. f (X n))
[PROOF STEP]
unfolding uniformly_continuous_on_def
[PROOF STATE]
proof (prove)
using this:
\<forall>e>0. \<exists>d>0. \<forall>x\<in>S. \<forall>x'\<in>S. dist x' x < d \<longrightarrow> dist (f x') (f x) < e
Cauchy X
X ?n \<in> S

goal (1 subgoal):
 1. Cauchy (\<lambda>n. f (X n))
[PROOF STEP]
by (meson Cauchy_def)


[STATEMENT]
lemma det_row_uminus: "det (upd_row M i (- a)) = - det (upd_row M i a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Square_Matrix.det (upd_row M i (- a)) = - Square_Matrix.det (upd_row M i a)
[PROOF STEP]
by (simp add: vector_sneg_minus1 det_row_mul)


[STATEMENT]
lemma fstar_unfoldl_var [simp]:
  fixes f :: "'a::complete_lattice \<Rightarrow> 'a"
  shows "Inf_pres f \<Longrightarrow> x \<sqinter> f (fstar f x) = fstar f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf_pres f \<Longrightarrow> x \<sqinter> f (fstar f x) = fstar f x
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Inf_pres f \<Longrightarrow> x \<sqinter> f (fstar f x) = fstar f x
[PROOF STEP]
assume hyp: "Inf_pres f"
[PROOF STATE]
proof (state)
this:
Inf_pres f

goal (1 subgoal):
 1. Inf_pres f \<Longrightarrow> x \<sqinter> f (fstar f x) = fstar f x
[PROOF STEP]
have "x \<sqinter> f (fstar f x) = fpower f 0 x \<sqinter> (\<Sqinter>n. fpower f (Suc n) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<sqinter> f (fstar f x) = fpower f 0 x \<sqinter> (\<Sqinter>n. fpower f (Suc n) x)
[PROOF STEP]
by (simp add: fstar_def image_comp) (metis (no_types) comp_apply hyp image_image)
[PROOF STATE]
proof (state)
this:
x \<sqinter> f (fstar f x) = fpower f 0 x \<sqinter> (\<Sqinter>n. fpower f (Suc n) x)

goal (1 subgoal):
 1. Inf_pres f \<Longrightarrow> x \<sqinter> f (fstar f x) = fstar f x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x \<sqinter> f (fstar f x) = fpower f 0 x \<sqinter> (\<Sqinter>n. fpower f (Suc n) x)

goal (1 subgoal):
 1. Inf_pres f \<Longrightarrow> x \<sqinter> f (fstar f x) = fstar f x
[PROOF STEP]
have "... = (\<Sqinter>n. fpower f n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fpower f 0 x \<sqinter> (\<Sqinter>n. fpower f (Suc n) x) = (\<Sqinter>n. fpower f n x)
[PROOF STEP]
by (subst fInf_unfold, auto)
[PROOF STATE]
proof (state)
this:
fpower f 0 x \<sqinter> (\<Sqinter>n. fpower f (Suc n) x) = (\<Sqinter>n. fpower f n x)

goal (1 subgoal):
 1. Inf_pres f \<Longrightarrow> x \<sqinter> f (fstar f x) = fstar f x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x \<sqinter> f (fstar f x) = (\<Sqinter>n. fpower f n x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<sqinter> f (fstar f x) = (\<Sqinter>n. fpower f n x)

goal (1 subgoal):
 1. x \<sqinter> f (fstar f x) = fstar f x
[PROOF STEP]
by (simp add: fstar_def image_comp)
[PROOF STATE]
proof (state)
this:
x \<sqinter> f (fstar f x) = fstar f x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lhopital_at_top:
  "LIM x at x. (g::real \<Rightarrow> real) x :> at_top \<Longrightarrow>
    eventually (\<lambda>x. g' x \<noteq> 0) (at x) \<Longrightarrow>
    eventually (\<lambda>x. DERIV f x :> f' x) (at x) \<Longrightarrow>
    eventually (\<lambda>x. DERIV g x :> g' x) (at x) \<Longrightarrow>
    ((\<lambda> x. (f' x / g' x)) \<longlongrightarrow> y) (at x) \<Longrightarrow>
    ((\<lambda> x. f x / g x) \<longlongrightarrow> y) (at x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>filterlim g at_top (at x); \<forall>\<^sub>F x in at x. g' x \<noteq> 0; \<forall>\<^sub>F x in at x. (f has_real_derivative f' x) (at x); \<forall>\<^sub>F x in at x. (g has_real_derivative g' x) (at x); (\<lambda>x. f' x / g' x) \<midarrow>x\<rightarrow> y\<rbrakk> \<Longrightarrow> (\<lambda>x. f x / g x) \<midarrow>x\<rightarrow> y
[PROOF STEP]
unfolding eventually_at_split filterlim_at_split
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>filterlim g at_top (at_left x) \<and> filterlim g at_top (at_right x); (\<forall>\<^sub>F x in at_left x. g' x \<noteq> 0) \<and> (\<forall>\<^sub>F x in at_right x. g' x \<noteq> 0); (\<forall>\<^sub>F x in at_left x. (f has_real_derivative f' x) (at x)) \<and> (\<forall>\<^sub>F x in at_right x. (f has_real_derivative f' x) (at x)); (\<forall>\<^sub>F x in at_left x. (g has_real_derivative g' x) (at x)) \<and> (\<forall>\<^sub>F x in at_right x. (g has_real_derivative g' x) (at x)); ((\<lambda>x. f' x / g' x) \<longlongrightarrow> y) (at_left x) \<and> ((\<lambda>x. f' x / g' x) \<longlongrightarrow> y) (at_right x)\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x / g x) \<longlongrightarrow> y) (at_left x) \<and> ((\<lambda>x. f x / g x) \<longlongrightarrow> y) (at_right x)
[PROOF STEP]
by (auto intro!: lhopital_right_at_top[of g x g' f f'] lhopital_left_at_top[of g x g' f f'])


[STATEMENT]
lemma carrier_sum_group:
  assumes "\<And>i. i \<in> I \<Longrightarrow> group (G i)"
  shows "carrier(sum_group I G) = {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (sum_group I G) = {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. carrier (sum_group I G) = {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
interpret SG: subgroup "{x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}" "(product_group I G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}} (product_group I G)
[PROOF STEP]
by (simp add: assms subgroup_sum_group)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. carrier (sum_group I G) = {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (sum_group I G) = {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
by (simp add: sum_group_def subgroup_sum_group carrier_subgroup_generated_alt)
[PROOF STATE]
proof (state)
this:
carrier (sum_group I G) = {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma normal_density_times_minusx:
  assumes "\<sigma> > 0" "\<sigma>' > 0" "a \<noteq> a'"
  shows "normal_density (\<mu> - a*x) \<sigma> y * normal_density (\<mu>' - a'*x) \<sigma>' y = (1 / \<bar>a' - a\<bar>) * normal_density ((\<mu>'- \<mu>)/(a'-a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)/(a' - a)\<^sup>2)) x * normal_density (((\<mu> - a*x)*\<sigma>'\<^sup>2 + (\<mu>' - a'*x)*\<sigma>\<^sup>2)/(\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) (\<sigma> * \<sigma>' / sqrt (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normal_density (\<mu> - a * x) \<sigma> y * normal_density (\<mu>' - a' * x) \<sigma>' y = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x * normal_density (((\<mu> - a * x) * \<sigma>'\<^sup>2 + (\<mu>' - a' * x) * \<sigma>\<^sup>2) / (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) (\<sigma> * \<sigma>' / sqrt (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. normal_density (\<mu> - a * x) \<sigma> y * normal_density (\<mu>' - a' * x) \<sigma>' y = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x * normal_density (((\<mu> - a * x) * \<sigma>'\<^sup>2 + (\<mu>' - a' * x) * \<sigma>\<^sup>2) / (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) (\<sigma> * \<sigma>' / sqrt (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) y
[PROOF STEP]
have non0:"a' - a \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a' - a \<noteq> 0
[PROOF STEP]
using assms(3)
[PROOF STATE]
proof (prove)
using this:
a \<noteq> a'

goal (1 subgoal):
 1. a' - a \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a' - a \<noteq> 0

goal (1 subgoal):
 1. normal_density (\<mu> - a * x) \<sigma> y * normal_density (\<mu>' - a' * x) \<sigma>' y = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x * normal_density (((\<mu> - a * x) * \<sigma>'\<^sup>2 + (\<mu>' - a' * x) * \<sigma>\<^sup>2) / (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) (\<sigma> * \<sigma>' / sqrt (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) y
[PROOF STEP]
have "1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x"
       (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
have "?lhs = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))
[PROOF STEP]
by(simp add: ring_class.left_diff_distrib group_add_class.diff_diff_eq2 add.commute add_diff_eq)
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
have "... = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>)/(a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))
[PROOF STEP]
have "((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 = ((a' - a) * (x - (\<mu>' - \<mu>)/(a' - a)))\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 = ((a' - a) * (x - (\<mu>' - \<mu>) / (a' - a)))\<^sup>2
[PROOF STEP]
using non0
[PROOF STATE]
proof (prove)
using this:
a' - a \<noteq> 0

goal (1 subgoal):
 1. ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 = ((a' - a) * (x - (\<mu>' - \<mu>) / (a' - a)))\<^sup>2
[PROOF STEP]
by(simp add: ring_class.right_diff_distrib[of "a'-a" x])
[PROOF STATE]
proof (state)
this:
((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 = ((a' - a) * (x - (\<mu>' - \<mu>) / (a' - a)))\<^sup>2

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 = ((a' - a) * (x - (\<mu>' - \<mu>) / (a' - a)))\<^sup>2

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))
[PROOF STEP]
have "... = (a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>)/(a' - a))\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((a' - a) * (x - (\<mu>' - \<mu>) / (a' - a)))\<^sup>2 = (a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2
[PROOF STEP]
by(simp add: monoid_mult_class.power2_eq_square)
[PROOF STATE]
proof (state)
this:
((a' - a) * (x - (\<mu>' - \<mu>) / (a' - a)))\<^sup>2 = (a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 = (a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 = (a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a) * x - (\<mu>' - \<mu>))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)))

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
have "... = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)/(a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
using non0
[PROOF STATE]
proof (prove)
using this:
a' - a \<noteq> 0

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
by (simp add: normal_density_def)
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- ((a' - a)\<^sup>2 * (x - (\<mu>' - \<mu>) / (a' - a))\<^sup>2) / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
have "... = ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
have "1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)/(a' - a)\<^sup>2))\<^sup>2) = 1 / \<bar>a' - a\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) = 1 / \<bar>a' - a\<bar>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < \<sigma>
0 < \<sigma>'
a \<noteq> a'

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) = 1 / \<bar>a' - a\<bar>
[PROOF STEP]
by(simp add: real_sqrt_divide[symmetric]) (simp add: real_sqrt_divide)
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) = 1 / \<bar>a' - a\<bar>

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) = 1 / \<bar>a' - a\<bar>

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * sqrt (2 * pi * (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2))\<^sup>2) * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x

goal (1 subgoal):
 1. 1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x

goal (1 subgoal):
 1. normal_density (\<mu> - a * x) \<sigma> y * normal_density (\<mu>' - a' * x) \<sigma>' y = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x * normal_density (((\<mu> - a * x) * \<sigma>'\<^sup>2 + (\<mu>' - a' * x) * \<sigma>\<^sup>2) / (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) (\<sigma> * \<sigma>' / sqrt (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) y
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
1 / sqrt (2 * pi * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) * exp (- (\<mu> - a * x - (\<mu>' - a' * x))\<^sup>2 / (2 * (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2))) = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x

goal (1 subgoal):
 1. normal_density (\<mu> - a * x) \<sigma> y * normal_density (\<mu>' - a' * x) \<sigma>' y = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x * normal_density (((\<mu> - a * x) * \<sigma>'\<^sup>2 + (\<mu>' - a' * x) * \<sigma>\<^sup>2) / (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) (\<sigma> * \<sigma>' / sqrt (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) y
[PROOF STEP]
by(simp add:normal_density_times[OF assms(1,2),of "\<mu> - a*x" y "\<mu>' - a'*x"])
[PROOF STATE]
proof (state)
this:
normal_density (\<mu> - a * x) \<sigma> y * normal_density (\<mu>' - a' * x) \<sigma>' y = 1 / \<bar>a' - a\<bar> * normal_density ((\<mu>' - \<mu>) / (a' - a)) (sqrt ((\<sigma>\<^sup>2 + \<sigma>'\<^sup>2) / (a' - a)\<^sup>2)) x * normal_density (((\<mu> - a * x) * \<sigma>'\<^sup>2 + (\<mu>' - a' * x) * \<sigma>\<^sup>2) / (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) (\<sigma> * \<sigma>' / sqrt (\<sigma>\<^sup>2 + \<sigma>'\<^sup>2)) y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma zero_neq_inf[simp]:"0 \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<noteq> \<infinity>
[PROOF STEP]
by (cut_tac inf_neq_0, frule not_sym, simp)


[STATEMENT]
lemma invfun_r1:"\<lbrakk> f\<in>A \<rightarrow> B; bij_to f A B; b \<in> B \<rbrakk>
                      \<Longrightarrow> f ((invfun A B f) b) = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; bij_to f A B; b \<in> B\<rbrakk> \<Longrightarrow> f ((f\<inverse>\<^bsub>B,A\<^esub>) b) = b
[PROOF STEP]
apply (simp add:bij_to_def, erule conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; b \<in> B; surj_to f A B; inj_on f A\<rbrakk> \<Longrightarrow> f ((f\<inverse>\<^bsub>B,A\<^esub>) b) = b
[PROOF STEP]
apply (rule invfun_r, assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma complement_index:
  assumes "ps \<subseteq> \<V>"
  shows "\<B>\<^sup>C index ps = size {# b \<in># \<B> . (\<forall> x \<in> ps . x \<notin> b) #}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<B>\<^sup>C index ps = size {#b \<in># \<B>. \<forall>x\<in>ps. x \<notin> b#}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<B>\<^sup>C index ps = size {#b \<in># \<B>. \<forall>x\<in>ps. x \<notin> b#}
[PROOF STEP]
have "\<B>\<^sup>C index ps =  size {# b \<in># {# bl\<^sup>c . bl \<in># \<B>#}. ps \<subseteq> b #}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<B>\<^sup>C index ps = size (filter_mset ((\<subseteq>) ps) (image_mset block_complement \<B>))
[PROOF STEP]
by (simp add: complement_blocks_def points_index_def)
[PROOF STATE]
proof (state)
this:
\<B>\<^sup>C index ps = size (filter_mset ((\<subseteq>) ps) (image_mset block_complement \<B>))

goal (1 subgoal):
 1. \<B>\<^sup>C index ps = size {#b \<in># \<B>. \<forall>x\<in>ps. x \<notin> b#}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<B>\<^sup>C index ps = size (filter_mset ((\<subseteq>) ps) (image_mset block_complement \<B>))
[PROOF STEP]
have "\<B>\<^sup>C index ps = size {# bl\<^sup>c | bl \<in># \<B> . ps \<subseteq> bl\<^sup>c #}"
[PROOF STATE]
proof (prove)
using this:
\<B>\<^sup>C index ps = size (filter_mset ((\<subseteq>) ps) (image_mset block_complement \<B>))

goal (1 subgoal):
 1. \<B>\<^sup>C index ps = size (image_mset block_complement {#bl \<in># \<B>. ps \<subseteq> bl\<^sup>c#})
[PROOF STEP]
by (metis image_mset_filter_swap)
[PROOF STATE]
proof (state)
this:
\<B>\<^sup>C index ps = size (image_mset block_complement {#bl \<in># \<B>. ps \<subseteq> bl\<^sup>c#})

goal (1 subgoal):
 1. \<B>\<^sup>C index ps = size {#b \<in># \<B>. \<forall>x\<in>ps. x \<notin> b#}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<B>\<^sup>C index ps = size (image_mset block_complement {#bl \<in># \<B>. ps \<subseteq> bl\<^sup>c#})

goal (1 subgoal):
 1. \<B>\<^sup>C index ps = size {#b \<in># \<B>. \<forall>x\<in>ps. x \<notin> b#}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<B>\<^sup>C index ps = size (image_mset block_complement {#bl \<in># \<B>. ps \<subseteq> bl\<^sup>c#})
ps \<subseteq> \<V>

goal (1 subgoal):
 1. \<B>\<^sup>C index ps = size {#b \<in># \<B>. \<forall>x\<in>ps. x \<notin> b#}
[PROOF STEP]
by (simp add: block_complement_elem_iff)
[PROOF STATE]
proof (state)
this:
\<B>\<^sup>C index ps = size {#b \<in># \<B>. \<forall>x\<in>ps. x \<notin> b#}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_sqrt_pow2 [simp]: "0 \<le> x \<Longrightarrow> (sqrt x)\<^sup>2 = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x \<Longrightarrow> (sqrt x)\<^sup>2 = x
[PROOF STEP]
unfolding sqrt_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x \<Longrightarrow> (root 2 x)\<^sup>2 = x
[PROOF STEP]
by (rule real_root_pow_pos2 [OF pos2])


[STATEMENT]
lemma twice_field_differentiable_at_sqrt_fun [intro]:
  assumes "f twice_field_differentiable_at x"
    and "f x > 0"
  shows "(\<lambda>x. sqrt (f x)) twice_field_differentiable_at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. sqrt (f x)) twice_field_differentiable_at x
[PROOF STEP]
by (simp add: assms(1) assms(2) twice_field_differentiable_at_compose)


[STATEMENT]
lemma subsetCI:
  shows "(\<And>x. x \<in> A \<Longrightarrow> x \<notin> B \<Longrightarrow> False) \<Longrightarrow> A \<subseteq> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> A; x \<notin> B\<rbrakk> \<Longrightarrow> False) \<Longrightarrow> A \<subseteq> B
[PROOF STEP]
by auto


[STATEMENT]
lemma exp_rule: "((c::('a) mod_ring) * d )^e= (c^e) * (d^e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c * d) ^ e = c ^ e * d ^ e
[PROOF STEP]
by (simp add: power_mult_distrib)


[STATEMENT]
lemma T_vebt_buildupi_gq_0: "T_vebt_buildupi n > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < T_vebt_buildupi n
[PROOF STEP]
apply(induction n rule : T_vebt_buildupi.induct)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. 0 < T_vebt_buildupi 0
 2. 0 < T_vebt_buildupi (Suc 0)
 3. \<And>n. \<lbrakk>even n \<Longrightarrow> 0 < T_vebt_buildupi (Suc (n div 2)); even n \<Longrightarrow> 0 < T_vebt_buildupi (Suc (n div 2)); odd n \<Longrightarrow> 0 < T_vebt_buildupi (Suc (Suc (n div 2))); odd n \<Longrightarrow> 0 < T_vebt_buildupi (Suc (n div 2))\<rbrakk> \<Longrightarrow> 0 < T_vebt_buildupi (Suc (Suc n))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma [code abstract]:
  "integer_of_natural (m - n) = max 0 (integer_of_natural m - integer_of_natural n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integer_of_natural (m - n) = max 0 (integer_of_natural m - integer_of_natural n)
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma snd_crit_pair_below_lcs:
  "snd (crit_pair p q) \<prec>\<^sub>p monomial 1 (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
[PROOF STEP]
proof (cases "component_of_term (lt p) = component_of_term (lt q)")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. component_of_term (lt p) = component_of_term (lt q) \<Longrightarrow> snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
 2. component_of_term (lt p) \<noteq> component_of_term (lt q) \<Longrightarrow> snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
component_of_term (lt p) = component_of_term (lt q)

goal (2 subgoals):
 1. component_of_term (lt p) = component_of_term (lt q) \<Longrightarrow> snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
 2. component_of_term (lt p) \<noteq> component_of_term (lt q) \<Longrightarrow> snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
[PROOF STEP]
by (simp add: True crit_pair_swap[of p] lcs_comm[of "lp p"], fact fst_crit_pair_below_lcs)
[PROOF STATE]
proof (state)
this:
snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))

goal (1 subgoal):
 1. component_of_term (lt p) \<noteq> component_of_term (lt q) \<Longrightarrow> snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. component_of_term (lt p) \<noteq> component_of_term (lt q) \<Longrightarrow> snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
component_of_term (lt p) \<noteq> component_of_term (lt q)

goal (1 subgoal):
 1. component_of_term (lt p) \<noteq> component_of_term (lt q) \<Longrightarrow> snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))
[PROOF STEP]
by (simp add: crit_pair_def False ord_strict_p_monomial_iff)
[PROOF STATE]
proof (state)
this:
snd (crit_pair p q) \<prec>\<^sub>p monomial (1::'b) (term_of_pair (lcs (lp p) (lp q), component_of_term (lt p)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma higher_deriv_Polygamma_approx [simp]:
  "(deriv ^^ j) (Polygamma_approx i m) = Polygamma_approx (j + i) m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (deriv ^^ j) (Polygamma_approx i m) = Polygamma_approx (j + i) m
[PROOF STEP]
by (simp add: Polygamma_approx_def funpow_add)


[STATEMENT]
lemma deriv_scaleR_deriv_right:
  assumes "f twice_field_differentiable_at z"
  shows "deriv (\<lambda>x. k *\<^sub>R deriv f x) z = k *\<^sub>R deriv (deriv f) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deriv (\<lambda>x. k *\<^sub>R deriv f x) z = k *\<^sub>R deriv (deriv f) z
[PROOF STEP]
using assms deriv_scaleR_right twice_field_differentiable_at_def
[PROOF STATE]
proof (prove)
using this:
f twice_field_differentiable_at z
?f field_differentiable at ?z \<Longrightarrow> deriv (\<lambda>x. ?k *\<^sub>R ?f x) ?z = ?k *\<^sub>R deriv ?f ?z
?f twice_field_differentiable_at ?x \<equiv> \<exists>S. ?f field_differentiable_on S \<and> ?x \<in> interior S \<and> deriv ?f field_differentiable at ?x

goal (1 subgoal):
 1. deriv (\<lambda>x. k *\<^sub>R deriv f x) z = k *\<^sub>R deriv (deriv f) z
[PROOF STEP]
by blast


[STATEMENT]
lemma parts_UN_subset1: "(\<Union>x\<in>A. parts(H x)) \<subseteq> parts(\<Union>x\<in>A. H x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>x\<in>A. parts (H x)) \<subseteq> parts (\<Union> (H ` A))
[PROOF STEP]
by (intro UN_least parts_mono UN_upper)


[STATEMENT]
lemma Cons_less_iff:
  fixes x :: "'a :: preorder" shows
  "x # xs < ys \<longleftrightarrow> (\<exists>y ys'. ys = y # ys' \<and> (x < y \<or> x = y \<and> xs < ys'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x # xs < ys) = (\<exists>y ys'. ys = y # ys' \<and> (x < y \<or> x = y \<and> xs < ys'))
[PROOF STEP]
by(cases ys) auto


[STATEMENT]
lemma DERIV_real_root:
  assumes n: "0 < n"
    and x: "0 < x"
  shows "DERIV (root n) x :> inverse (real n * root n x ^ (n - Suc 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (root n has_real_derivative inverse (real n * root n x ^ (n - Suc 0))) (at x)
[PROOF STEP]
proof (rule DERIV_inverse_function)
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. (?f has_real_derivative real n * root n x ^ (n - Suc 0)) (at (root n x))
 2. real n * root n x ^ (n - Suc 0) \<noteq> 0
 3. ?a < x
 4. x < ?b
 5. \<And>y. \<lbrakk>?a < y; y < ?b\<rbrakk> \<Longrightarrow> ?f (root n y) = y
 6. isCont (root n) x
[PROOF STEP]
show "0 < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x
[PROOF STEP]
using x
[PROOF STATE]
proof (prove)
using this:
0 < x

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

goal (5 subgoals):
 1. (?f has_real_derivative real n * root n x ^ (n - Suc 0)) (at (root n x))
 2. real n * root n x ^ (n - Suc 0) \<noteq> 0
 3. x < ?b
 4. \<And>y. \<lbrakk>0 < y; y < ?b\<rbrakk> \<Longrightarrow> ?f (root n y) = y
 5. isCont (root n) x
[PROOF STEP]
show "x < x + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < x + 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x < x + 1

goal (4 subgoals):
 1. (?f has_real_derivative real n * root n x ^ (n - Suc 0)) (at (root n x))
 2. real n * root n x ^ (n - Suc 0) \<noteq> 0
 3. \<And>y. \<lbrakk>0 < y; y < x + 1\<rbrakk> \<Longrightarrow> ?f (root n y) = y
 4. isCont (root n) x
[PROOF STEP]
show "DERIV (\<lambda>x. x ^ n) (root n x) :> real n * root n x ^ (n - Suc 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. x ^ n) has_real_derivative real n * root n x ^ (n - Suc 0)) (at (root n x))
[PROOF STEP]
by (rule DERIV_pow)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. x ^ n) has_real_derivative real n * root n x ^ (n - Suc 0)) (at (root n x))

goal (3 subgoals):
 1. real n * root n x ^ (n - Suc 0) \<noteq> 0
 2. \<And>y. \<lbrakk>0 < y; y < x + 1\<rbrakk> \<Longrightarrow> root n y ^ n = y
 3. isCont (root n) x
[PROOF STEP]
show "real n * root n x ^ (n - Suc 0) \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real n * root n x ^ (n - Suc 0) \<noteq> 0
[PROOF STEP]
using n x
[PROOF STATE]
proof (prove)
using this:
0 < n
0 < x

goal (1 subgoal):
 1. real n * root n x ^ (n - Suc 0) \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real n * root n x ^ (n - Suc 0) \<noteq> 0

goal (2 subgoals):
 1. \<And>y. \<lbrakk>0 < y; y < x + 1\<rbrakk> \<Longrightarrow> root n y ^ n = y
 2. isCont (root n) x
[PROOF STEP]
show "isCont (root n) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont (root n) x
[PROOF STEP]
by (rule isCont_real_root)
[PROOF STATE]
proof (state)
this:
isCont (root n) x

goal (1 subgoal):
 1. \<And>y. \<lbrakk>0 < y; y < x + 1\<rbrakk> \<Longrightarrow> root n y ^ n = y
[PROOF STEP]
qed (use n in auto)


[STATEMENT]
lemma eventually_nhds_set:
  "(\<forall>\<^sub>F x in nhds_set X. P x) \<longleftrightarrow> (\<exists>S. open S \<and> X \<subseteq> S \<and> (\<forall>x\<in>S. P x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (nhds_set X) = (\<exists>S. open S \<and> X \<subseteq> S \<and> (\<forall>x\<in>S. P x))
[PROOF STEP]
unfolding nhds_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (Inf (principal ` {S. open S \<and> X \<subseteq> S})) = (\<exists>S. open S \<and> X \<subseteq> S \<and> (\<forall>x\<in>S. P x))
[PROOF STEP]
by (subst eventually_INF_base) (auto simp: eventually_principal)


[STATEMENT]
lemma uminus_uminus_image: "uminus ` uminus ` S = S"
  for S::"'r::ab_group_add set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. uminus ` uminus ` S = S
[PROOF STEP]
by (auto simp: image_image)


[STATEMENT]
lemma diff_less_swap: "\<lbrakk> 0 < (i::nat); 0 < j \<rbrakk> \<Longrightarrow> (k - j < i) = (k - i < j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < i; 0 < j\<rbrakk> \<Longrightarrow> (k - j < i) = (k - i < j)
[PROOF STEP]
by (blast intro: diff_less_imp_swap)


[STATEMENT]
lemma fds_abs_converges_mult:
  fixes s :: "'a :: {nat_power, real_normed_field, banach, second_countable_topology}"
  assumes "fds_abs_converges f s" "fds_abs_converges g s"
  shows   "fds_abs_converges (f * g) s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_abs_converges (f * g) s
[PROOF STEP]
using summable_dirichlet_prod[OF _ _ assms[unfolded fds_abs_converges_def]]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>fds_nth f 0 = (0::'a); fds_nth g 0 = (0::'a)\<rbrakk> \<Longrightarrow> summable (\<lambda>n. norm (dirichlet_prod (fds_nth f) (fds_nth g) n / nat_power n s))

goal (1 subgoal):
 1. fds_abs_converges (f * g) s
[PROOF STEP]
by (simp add: fds_abs_converges_def fds_nth_mult)


[STATEMENT]
lemma l7_21:
  assumes "\<not> Col A B C" and
    "B \<noteq> D" and
    "Cong A B C D" and
    "Cong B C D A" and
    "Col A P C" and
    "Col B P D"
  shows "P Midpoint A C \<and> P Midpoint B D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P Midpoint A C \<and> P Midpoint B D
[PROOF STEP]
by (smt assms(1) assms(2) assms(3) assms(4) assms(5) assms(6) col_transitivity_2 is_midpoint_id_2 l7_21_R1 not_col_distincts not_cong_3412)


[STATEMENT]
lemma eint_Min_geq:
  assumes "finite (A::eint set)"
  assumes "\<And>x. x \<in> A \<Longrightarrow> x \<ge> c"
  assumes "A \<noteq> {}"
  shows "Min A \<ge> c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c \<le> Min A
[PROOF STEP]
using Min_in[of A] assms(2)[of "Min A"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite A; A \<noteq> {}\<rbrakk> \<Longrightarrow> Min A \<in> A
Min A \<in> A \<Longrightarrow> c \<le> Min A
finite A
?x1 \<in> A \<Longrightarrow> c \<le> ?x1
A \<noteq> {}

goal (1 subgoal):
 1. c \<le> Min A
[PROOF STEP]
by blast


[STATEMENT]
lemma minor_transpose: "minor (transpose A) i j = transpose (minor A j i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. minor (Square_Matrix.transpose A) i j = Square_Matrix.transpose (minor A j i)
[PROOF STEP]
by transfer (auto simp: fun_eq_iff)


[STATEMENT]
lemma adjoint_def:
  "adjoint A = mat (dim_col A) (dim_row A) (\<lambda>(i,j). conjugate (A $$ (j,i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint A = mat (dim_col A) (dim_row A) (\<lambda>(i, j). conjugate (A $$ (j, i)))
[PROOF STEP]
unfolding mat_adjoint_def mat_of_rows_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat (length (map conjugate (cols A))) (dim_row A) (\<lambda>(i, y). map conjugate (cols A) ! i $ y) = mat (dim_col A) (dim_row A) (\<lambda>(i, j). conjugate (A $$ (j, i)))
[PROOF STEP]
by auto


[STATEMENT]
lemma a_eq_minus_1: "\<forall>a::'a. a+1 = 0 \<longrightarrow> a = -1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>a. a + (1::'a) = (0::'a) \<longrightarrow> a = - (1::'a)
[PROOF STEP]
by (metis eq_neg_iff_add_eq_0)


[STATEMENT]
lemma infsum_nonneg_is_SUPREMUM_ereal:
  fixes f :: "'a \<Rightarrow> real"
  assumes summable: "f summable_on A"
    and fnn: "\<And>x. x\<in>A \<Longrightarrow> f x \<ge> 0"
  shows "ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. (ereal (sum f F)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))
[PROOF STEP]
have \<open>ereal (infsum f A) = infsum (ereal o f) A\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (infsum f A) = infsum (ereal \<circ> f) A
[PROOF STEP]
apply (rule infsum_comm_additive_general[symmetric])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>F. \<lbrakk>finite F; F \<subseteq> A\<rbrakk> \<Longrightarrow> sum (ereal \<circ> f) F = ereal (sum f F)
 2. isCont ereal (infsum f A)
 3. f summable_on A
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f summable_on A
?x \<in> A \<Longrightarrow> 0 \<le> f ?x

goal (3 subgoals):
 1. \<And>F. \<lbrakk>finite F; F \<subseteq> A\<rbrakk> \<Longrightarrow> sum (ereal \<circ> f) F = ereal (sum f F)
 2. isCont ereal (infsum f A)
 3. f summable_on A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ereal (infsum f A) = infsum (ereal \<circ> f) A

goal (1 subgoal):
 1. ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ereal (infsum f A) = infsum (ereal \<circ> f) A

goal (1 subgoal):
 1. ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))
[PROOF STEP]
have \<open>\<dots> = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. (ereal (sum f F)))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infsum (ereal \<circ> f) A = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))
[PROOF STEP]
by (subst nonneg_infsum_complete) (simp_all add: assms)
[PROOF STATE]
proof (state)
this:
infsum (ereal \<circ> f) A = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))

goal (1 subgoal):
 1. ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))

goal (1 subgoal):
 1. ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
ereal (infsum f A) = (SUP F\<in>{F. finite F \<and> F \<subseteq> A}. ereal (sum f F))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nonneg_bdd_above_summable_on:
  fixes f :: \<open>'a \<Rightarrow> 'b :: {conditionally_complete_linorder, ordered_comm_monoid_add, linorder_topology}\<close>
  assumes \<open>\<And>x. x\<in>A \<Longrightarrow> f x \<ge> 0\<close>
  assumes \<open>bdd_above (sum f ` {F. F\<subseteq>A \<and> finite F})\<close>
  shows \<open>f summable_on A\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f summable_on A
[PROOF STEP]
using assms(1) assms(2) summable_on_def nonneg_bdd_above_has_sum
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> (0::'b) \<le> f ?x
bdd_above (sum f ` {F. F \<subseteq> A \<and> finite F})
(?f summable_on ?A) = (\<exists>x. has_sum ?f ?A x)
\<lbrakk>\<And>x. x \<in> ?A \<Longrightarrow> (0::?'b) \<le> ?f x; bdd_above (sum ?f ` {F. F \<subseteq> ?A \<and> finite F})\<rbrakk> \<Longrightarrow> has_sum ?f ?A (Sup (sum ?f ` {F. finite F \<and> F \<subseteq> ?A}))

goal (1 subgoal):
 1. f summable_on A
[PROOF STEP]
by blast


[STATEMENT]
lemma focus_superset:
  assumes "finite A" and "keys p \<subseteq> A"
  shows "focus X p = (\<Sum>t\<in>A. monomial (monomial (lookup p t) (except t X)) (except t (- X)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. focus X p = (\<Sum>t\<in>A. monomial (monomial (lookup p t) (except t X)) (except t (- X)))
[PROOF STEP]
unfolding focus_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>t\<in>keys p. monomial (monomial (lookup p t) (except t X)) (except t (- X))) = (\<Sum>t\<in>A. monomial (monomial (lookup p t) (except t X)) (except t (- X)))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A
keys p \<subseteq> A

goal (1 subgoal):
 1. (\<Sum>t\<in>keys p. monomial (monomial (lookup p t) (except t X)) (except t (- X))) = (\<Sum>t\<in>A. monomial (monomial (lookup p t) (except t X)) (except t (- X)))
[PROOF STEP]
by (rule sum.mono_neutral_left) (simp add: in_keys_iff)


[STATEMENT]
lemma mat_det_cnj [simp]:
  shows "mat_det (mat_cnj A) = cnj (mat_det A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_det (mat_cnj A) = cnj (mat_det A)
[PROOF STEP]
by (cases A) (simp add: mat_cnj_def)


[STATEMENT]
lemma matrix_inv_unique:
  fixes A::"'a::{semiring_1}^'n^'n"
  assumes AB: "A ** B = mat 1" and BA: "B ** A = mat 1"
  shows "matrix_inv A = B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_inv A = B
[PROOF STEP]
by (metis AB BA invertible_def matrix_inv_right matrix_mul_assoc matrix_mul_lid)


[STATEMENT]
lemma length_eq_zero_butlast_concat:
  assumes "length ys = 0"
  shows "butlast (xs @ ys) = butlast xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. butlast (xs @ ys) = butlast xs
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length ys = 0

goal (1 subgoal):
 1. butlast (xs @ ys) = butlast xs
[PROOF STEP]
by (metis append_Nil2 length_0_conv)


[STATEMENT]
lemma cross_ratio_product:
  assumes "proj2_Col p q s" and "p \<noteq> q" and "s \<noteq> p" and "s \<noteq> q"
  shows "cross_ratio p q r s * cross_ratio p q s t = cross_ratio p q r t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cross_ratio p q r s * cross_ratio p q s t = cross_ratio p q r t
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cross_ratio p q r s * cross_ratio p q s t = cross_ratio p q r t
[PROOF STEP]
from \<open>proj2_Col p q s\<close> and \<open>p \<noteq> q\<close> and \<open>s \<noteq> p\<close> and \<open>s \<noteq> q\<close>
[PROOF STATE]
proof (chain)
picking this:
proj2_Col p q s
p \<noteq> q
s \<noteq> p
s \<noteq> q
[PROOF STEP]
have "proj2_Col_coeff p q s \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
proj2_Col p q s
p \<noteq> q
s \<noteq> p
s \<noteq> q

goal (1 subgoal):
 1. proj2_Col_coeff p q s \<noteq> 0
[PROOF STEP]
by (rule proj2_Col_distinct_coeff_non_zero)
[PROOF STATE]
proof (state)
this:
proj2_Col_coeff p q s \<noteq> 0

goal (1 subgoal):
 1. cross_ratio p q r s * cross_ratio p q s t = cross_ratio p q r t
[PROOF STEP]
thus "cross_ratio p q r s * cross_ratio p q s t = cross_ratio p q r t"
[PROOF STATE]
proof (prove)
using this:
proj2_Col_coeff p q s \<noteq> 0

goal (1 subgoal):
 1. cross_ratio p q r s * cross_ratio p q s t = cross_ratio p q r t
[PROOF STEP]
by (unfold cross_ratio_def) simp
[PROOF STATE]
proof (state)
this:
cross_ratio p q r s * cross_ratio p q s t = cross_ratio p q r t

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma LIMSEQ_inverse_real_of_nat_add_minus: "(\<lambda>n. r + -inverse (real (Suc n))) \<longlonglongrightarrow> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. r + - inverse (real (Suc n))) \<longlonglongrightarrow> r
[PROOF STEP]
using tendsto_add [OF tendsto_const tendsto_minus [OF LIMSEQ_inverse_real_of_nat]]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. ?a + - inverse (real (Suc x))) \<longlonglongrightarrow> ?a + - 0

goal (1 subgoal):
 1. (\<lambda>n. r + - inverse (real (Suc n))) \<longlonglongrightarrow> r
[PROOF STEP]
by auto


[STATEMENT]
lemma optimize_sound:
  assumes "maximize A b c = Some (Sat x)"
  shows "x \<in> max_lp A b c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> max_lp A b c
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> max_lp A b c
[PROOF STEP]
have *: "dim_vec b = dim_row A \<and> dim_vec c = dim_col A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec b = dim_row A \<and> dim_vec c = dim_col A
[PROOF STEP]
by (metis assms maximize.simps option.distinct(1))
[PROOF STATE]
proof (state)
this:
dim_vec b = dim_row A \<and> dim_vec c = dim_col A

goal (1 subgoal):
 1. x \<in> max_lp A b c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
dim_vec b = dim_row A \<and> dim_vec c = dim_col A
[PROOF STEP]
interpret rat: rat_LP A b c "dim_vec b" "dim_vec c"
[PROOF STATE]
proof (prove)
using this:
dim_vec b = dim_row A \<and> dim_vec c = dim_col A

goal (1 subgoal):
 1. rat_LP A b c (dim_vec b) (dim_vec c)
[PROOF STEP]
by (metis abstract_LP_def carrier_mat_triv carrier_vec_dim_vec rat_LP.intro)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> max_lp A b c
[PROOF STEP]
have "Sat x = optimize_no_cond A b c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inr x = optimize_no_cond A b c
[PROOF STEP]
using assms *
[PROOF STATE]
proof (prove)
using this:
maximize A b c = Some (Inr x)
dim_vec b = dim_row A \<and> dim_vec c = dim_col A

goal (1 subgoal):
 1. Inr x = optimize_no_cond A b c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Inr x = optimize_no_cond A b c

goal (1 subgoal):
 1. x \<in> max_lp A b c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Inr x = optimize_no_cond A b c
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Inr x = optimize_no_cond A b c

goal (1 subgoal):
 1. x \<in> max_lp A b c
[PROOF STEP]
by (simp add: rat.optimize_no_cond_correct)
[PROOF STATE]
proof (state)
this:
x \<in> max_lp A b c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Module) l_span_l_span:"H \<subseteq> carrier M \<Longrightarrow>
       linear_span R M (carrier R) (linear_span R M (carrier R) H) =
                                          linear_span R M (carrier R) H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H \<subseteq> carrier M \<Longrightarrow> linear_span R M (carrier R) (linear_span R M (carrier R) H) = linear_span R M (carrier R) H
[PROOF STEP]
apply (cut_tac sc_Ring, frule Ring.whole_ideal[of R])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<subseteq> carrier M; Ring R; ideal R (carrier R)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) (linear_span R M (carrier R) H) = linear_span R M (carrier R) H
[PROOF STEP]
apply (rule equalityI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>H \<subseteq> carrier M; Ring R; ideal R (carrier R)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) (linear_span R M (carrier R) H) \<subseteq> linear_span R M (carrier R) H
 2. \<lbrakk>H \<subseteq> carrier M; Ring R; ideal R (carrier R)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) H \<subseteq> linear_span R M (carrier R) (linear_span R M (carrier R) H)
[PROOF STEP]
apply (rule subsetI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>H \<subseteq> carrier M; Ring R; ideal R (carrier R); x \<in> linear_span R M (carrier R) (linear_span R M (carrier R) H)\<rbrakk> \<Longrightarrow> x \<in> linear_span R M (carrier R) H
 2. \<lbrakk>H \<subseteq> carrier M; Ring R; ideal R (carrier R)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) H \<subseteq> linear_span R M (carrier R) (linear_span R M (carrier R) H)
[PROOF STEP]
apply (frule linear_span_inc_0[of "carrier R" H], assumption+,
        frule nonempty[of _ "linear_span R M (carrier R) H"],
        simp add:linear_span_def[of R M "carrier R"
                            "linear_span R M (carrier R) H"],
        erule exE, (erule bexE)+, simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x n f s. \<lbrakk>H \<subseteq> carrier M; Ring R; ideal R (carrier R); \<zero> \<in> linear_span R M (carrier R) H; linear_span R M (carrier R) H \<noteq> {}; f \<in> {j. j \<le> n} \<rightarrow> linear_span R M (carrier R) H; s \<in> {j. j \<le> n} \<rightarrow> carrier R; x = l_comb R M n s f\<rbrakk> \<Longrightarrow> l_comb R M n s f \<in> linear_span R M (carrier R) H
 2. \<lbrakk>H \<subseteq> carrier M; Ring R; ideal R (carrier R)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) H \<subseteq> linear_span R M (carrier R) (linear_span R M (carrier R) H)
[PROOF STEP]
apply (frule_tac s = s and n = n and f = f in l_span_closed2[of "carrier R"],
        assumption+,
        frule lin_span_sub_carrier[of "carrier R" "H"], assumption+,
        rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>H \<subseteq> carrier M; Ring R; ideal R (carrier R); linear_span R M (carrier R) H \<subseteq> carrier M; x \<in> linear_span R M (carrier R) H\<rbrakk> \<Longrightarrow> x \<in> linear_span R M (carrier R) (linear_span R M (carrier R) H)
[PROOF STEP]
apply (rule_tac h = x in h_in_linear_span[of "linear_span R M (carrier R) H"],
        assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in group) derived_quot_is_comm_group: "comm_group (G Mod (derived G (carrier G)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comm_group (G Mod derived G (carrier G))
[PROOF STEP]
proof (rule group.group_comm_groupI[OF derived_quot_is_group], simp add: FactGroup_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
interpret DG: normal "derived G (carrier G)" G
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. derived G (carrier G) \<lhd> G
[PROOF STEP]
using derived_self_is_normal
[PROOF STATE]
proof (prove)
using this:
derived G (carrier G) \<lhd> G

goal (1 subgoal):
 1. derived G (carrier G) \<lhd> G
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
fix H K
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
assume "H \<in> rcosets derived G (carrier G)" and "K \<in> rcosets derived G (carrier G)"
[PROOF STATE]
proof (state)
this:
H \<in> rcosets derived G (carrier G)
K \<in> rcosets derived G (carrier G)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
H \<in> rcosets derived G (carrier G)
K \<in> rcosets derived G (carrier G)
[PROOF STEP]
obtain g1 g2
    where g1: "g1 \<in> carrier G" "H = derived G (carrier G) #> g1"
      and g2: "g2 \<in> carrier G" "K = derived G (carrier G) #> g2"
[PROOF STATE]
proof (prove)
using this:
H \<in> rcosets derived G (carrier G)
K \<in> rcosets derived G (carrier G)

goal (1 subgoal):
 1. (\<And>g1 g2. \<lbrakk>g1 \<in> carrier G; H = derived G (carrier G) #> g1; g2 \<in> carrier G; K = derived G (carrier G) #> g2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding RCOSETS_def
[PROOF STATE]
proof (prove)
using this:
H \<in> (\<Union>a\<in>carrier G. {derived G (carrier G) #> a})
K \<in> (\<Union>a\<in>carrier G. {derived G (carrier G) #> a})

goal (1 subgoal):
 1. (\<And>g1 g2. \<lbrakk>g1 \<in> carrier G; H = derived G (carrier G) #> g1; g2 \<in> carrier G; K = derived G (carrier G) #> g2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g1 \<in> carrier G
H = derived G (carrier G) #> g1
g2 \<in> carrier G
K = derived G (carrier G) #> g2

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
hence "H <#> K = derived G (carrier G) #> (g1 \<otimes> g2)"
[PROOF STATE]
proof (prove)
using this:
g1 \<in> carrier G
H = derived G (carrier G) #> g1
g2 \<in> carrier G
K = derived G (carrier G) #> g2

goal (1 subgoal):
 1. H <#> K = derived G (carrier G) #> g1 \<otimes> g2
[PROOF STEP]
by (simp add: DG.rcos_sum)
[PROOF STATE]
proof (state)
this:
H <#> K = derived G (carrier G) #> g1 \<otimes> g2

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
H <#> K = derived G (carrier G) #> g1 \<otimes> g2

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
have " ... = derived G (carrier G) #> (g2 \<otimes> g1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
fix g1 g2
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. derived G (carrier G) #> g1__ \<otimes> g2__ = derived G (carrier G) #> g2__ \<otimes> g1__
[PROOF STEP]
assume g1: "g1 \<in> carrier G" and g2: "g2 \<in> carrier G"
[PROOF STATE]
proof (state)
this:
g1 \<in> carrier G
g2 \<in> carrier G

goal (1 subgoal):
 1. derived G (carrier G) #> g1__ \<otimes> g2__ = derived G (carrier G) #> g2__ \<otimes> g1__
[PROOF STEP]
have "derived G (carrier G) #> (g1 \<otimes> g2) \<subseteq> derived G (carrier G) #> (g2 \<otimes> g1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. derived G (carrier G) #> g1 \<otimes> g2 \<subseteq> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
fix h
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
assume "h \<in> derived G (carrier G) #> (g1 \<otimes> g2)"
[PROOF STATE]
proof (state)
this:
h \<in> derived G (carrier G) #> g1 \<otimes> g2

goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
h \<in> derived G (carrier G) #> g1 \<otimes> g2
[PROOF STEP]
obtain g' where h: "g' \<in> carrier G" "g' \<in> derived G (carrier G)" "h = g' \<otimes> (g1 \<otimes> g2)"
[PROOF STATE]
proof (prove)
using this:
h \<in> derived G (carrier G) #> g1 \<otimes> g2

goal (1 subgoal):
 1. (\<And>g'. \<lbrakk>g' \<in> carrier G; g' \<in> derived G (carrier G); h = g' \<otimes> (g1 \<otimes> g2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using DG.subset
[PROOF STATE]
proof (prove)
using this:
h \<in> derived G (carrier G) #> g1 \<otimes> g2
derived G (carrier G) \<subseteq> carrier G

goal (1 subgoal):
 1. (\<And>g'. \<lbrakk>g' \<in> carrier G; g' \<in> derived G (carrier G); h = g' \<otimes> (g1 \<otimes> g2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding r_coset_def
[PROOF STATE]
proof (prove)
using this:
h \<in> (\<Union>h\<in>derived G (carrier G). {h \<otimes> (g1 \<otimes> g2)})
derived G (carrier G) \<subseteq> carrier G

goal (1 subgoal):
 1. (\<And>g'. \<lbrakk>g' \<in> carrier G; g' \<in> derived G (carrier G); h = g' \<otimes> (g1 \<otimes> g2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g' \<in> carrier G
g' \<in> derived G (carrier G)
h = g' \<otimes> (g1 \<otimes> g2)

goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
hence "h = g' \<otimes> (g1 \<otimes> g2) \<otimes> (inv g1 \<otimes> inv g2 \<otimes> g2 \<otimes> g1)"
[PROOF STATE]
proof (prove)
using this:
g' \<in> carrier G
g' \<in> derived G (carrier G)
h = g' \<otimes> (g1 \<otimes> g2)

goal (1 subgoal):
 1. h = g' \<otimes> (g1 \<otimes> g2) \<otimes> (inv g1 \<otimes> inv g2 \<otimes> g2 \<otimes> g1)
[PROOF STEP]
using g1 g2
[PROOF STATE]
proof (prove)
using this:
g' \<in> carrier G
g' \<in> derived G (carrier G)
h = g' \<otimes> (g1 \<otimes> g2)
g1 \<in> carrier G
g2 \<in> carrier G

goal (1 subgoal):
 1. h = g' \<otimes> (g1 \<otimes> g2) \<otimes> (inv g1 \<otimes> inv g2 \<otimes> g2 \<otimes> g1)
[PROOF STEP]
by (simp add: m_assoc)
[PROOF STATE]
proof (state)
this:
h = g' \<otimes> (g1 \<otimes> g2) \<otimes> (inv g1 \<otimes> inv g2 \<otimes> g2 \<otimes> g1)

goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
hence "h = (g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2)) \<otimes> (g2 \<otimes> g1)"
[PROOF STATE]
proof (prove)
using this:
h = g' \<otimes> (g1 \<otimes> g2) \<otimes> (inv g1 \<otimes> inv g2 \<otimes> g2 \<otimes> g1)

goal (1 subgoal):
 1. h = g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<otimes> (g2 \<otimes> g1)
[PROOF STEP]
using h(1) g1 g2 inv_closed m_assoc m_closed
[PROOF STATE]
proof (prove)
using this:
h = g' \<otimes> (g1 \<otimes> g2) \<otimes> (inv g1 \<otimes> inv g2 \<otimes> g2 \<otimes> g1)
g' \<in> carrier G
g1 \<in> carrier G
g2 \<in> carrier G
?x \<in> carrier G \<Longrightarrow> inv ?x \<in> carrier G
\<lbrakk>?x \<in> carrier G; ?y \<in> carrier G; ?z \<in> carrier G\<rbrakk> \<Longrightarrow> ?x \<otimes> ?y \<otimes> ?z = ?x \<otimes> (?y \<otimes> ?z)
\<lbrakk>?x \<in> carrier G; ?y \<in> carrier G\<rbrakk> \<Longrightarrow> ?x \<otimes> ?y \<in> carrier G

goal (1 subgoal):
 1. h = g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<otimes> (g2 \<otimes> g1)
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
h = g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<otimes> (g2 \<otimes> g1)

goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
h = g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<otimes> (g2 \<otimes> g1)

goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
have "g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2 \<in> derived G (carrier G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2 \<in> derived G (carrier G)
[PROOF STEP]
using incl[of _ "derived_set G (carrier G)"] g1 g2
[PROOF STATE]
proof (prove)
using this:
?h \<in> derived_set G (carrier G) \<Longrightarrow> ?h \<in> generate ?G (derived_set G (carrier G))
g1 \<in> carrier G
g2 \<in> carrier G

goal (1 subgoal):
 1. g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2 \<in> derived G (carrier G)
[PROOF STEP]
unfolding derived_def
[PROOF STATE]
proof (prove)
using this:
?h \<in> derived_set G (carrier G) \<Longrightarrow> ?h \<in> generate ?G (derived_set G (carrier G))
g1 \<in> carrier G
g2 \<in> carrier G

goal (1 subgoal):
 1. g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2 \<in> generate G (derived_set G (carrier G))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2 \<in> derived G (carrier G)

goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
hence "g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<in> derived G (carrier G)"
[PROOF STATE]
proof (prove)
using this:
g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2 \<in> derived G (carrier G)

goal (1 subgoal):
 1. g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<in> derived G (carrier G)
[PROOF STEP]
using DG.m_closed[OF h(2)]
[PROOF STATE]
proof (prove)
using this:
g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2 \<in> derived G (carrier G)
?y \<in> derived G (carrier G) \<Longrightarrow> g' \<otimes> ?y \<in> derived G (carrier G)

goal (1 subgoal):
 1. g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<in> derived G (carrier G)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<in> derived G (carrier G)

goal (1 subgoal):
 1. \<And>x. x \<in> derived G (carrier G) #> g1 \<otimes> g2 \<Longrightarrow> x \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
h = g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<otimes> (g2 \<otimes> g1)
g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<in> derived G (carrier G)
[PROOF STEP]
show "h \<in> derived G (carrier G) #> (g2 \<otimes> g1)"
[PROOF STATE]
proof (prove)
using this:
h = g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<otimes> (g2 \<otimes> g1)
g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<in> derived G (carrier G)

goal (1 subgoal):
 1. h \<in> derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
unfolding r_coset_def
[PROOF STATE]
proof (prove)
using this:
h = g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<otimes> (g2 \<otimes> g1)
g' \<otimes> (g1 \<otimes> g2 \<otimes> inv g1 \<otimes> inv g2) \<in> derived G (carrier G)

goal (1 subgoal):
 1. h \<in> (\<Union>h\<in>derived G (carrier G). {h \<otimes> (g2 \<otimes> g1)})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
h \<in> derived G (carrier G) #> g2 \<otimes> g1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
derived G (carrier G) #> g1 \<otimes> g2 \<subseteq> derived G (carrier G) #> g2 \<otimes> g1

goal (1 subgoal):
 1. derived G (carrier G) #> g1__ \<otimes> g2__ = derived G (carrier G) #> g2__ \<otimes> g1__
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>?g1a2 \<in> carrier G; ?g2a2 \<in> carrier G\<rbrakk> \<Longrightarrow> derived G (carrier G) #> ?g1a2 \<otimes> ?g2a2 \<subseteq> derived G (carrier G) #> ?g2a2 \<otimes> ?g1a2

goal (1 subgoal):
 1. derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?g1a2 \<in> carrier G; ?g2a2 \<in> carrier G\<rbrakk> \<Longrightarrow> derived G (carrier G) #> ?g1a2 \<otimes> ?g2a2 \<subseteq> derived G (carrier G) #> ?g2a2 \<otimes> ?g1a2

goal (1 subgoal):
 1. derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
using g1(1) g2(1)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?g1a2 \<in> carrier G; ?g2a2 \<in> carrier G\<rbrakk> \<Longrightarrow> derived G (carrier G) #> ?g1a2 \<otimes> ?g2a2 \<subseteq> derived G (carrier G) #> ?g2a2 \<otimes> ?g1a2
g1 \<in> carrier G
g2 \<in> carrier G

goal (1 subgoal):
 1. derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
derived G (carrier G) #> g1 \<otimes> g2 = derived G (carrier G) #> g2 \<otimes> g1

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
have " ... = K <#> H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. derived G (carrier G) #> g2 \<otimes> g1 = K <#> H
[PROOF STEP]
by (simp add: g1 g2 DG.rcos_sum)
[PROOF STATE]
proof (state)
this:
derived G (carrier G) #> g2 \<otimes> g1 = K <#> H

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> rcosets derived G (carrier G); y \<in> rcosets derived G (carrier G)\<rbrakk> \<Longrightarrow> x <#> y = y <#> x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
H <#> K = K <#> H
[PROOF STEP]
show "H <#> K = K <#> H"
[PROOF STATE]
proof (prove)
using this:
H <#> K = K <#> H

goal (1 subgoal):
 1. H <#> K = K <#> H
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
H <#> K = K <#> H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poly_add_ge_mono: assumes "p1 \<ge>p p2" shows "poly_add p1 q \<ge>p poly_add p2 q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_add p1 q \<ge>p poly_add p2 q
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
p1 \<ge>p p2

goal (1 subgoal):
 1. poly_add p1 q \<ge>p poly_add p2 q
[PROOF STEP]
unfolding poly_ge_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<alpha>. pos_assign \<alpha> \<longrightarrow> eval_poly \<alpha> p2 \<le> eval_poly \<alpha> p1

goal (1 subgoal):
 1. \<forall>\<alpha>. pos_assign \<alpha> \<longrightarrow> eval_poly \<alpha> (poly_add p2 q) \<le> eval_poly \<alpha> (poly_add p1 q)
[PROOF STEP]
by (auto simp: field_simps plus_left_mono)


[STATEMENT]
lemma drop_lem[rule_format]:
  fixes n :: nat and l :: "'a list" and g :: "'a list"
  assumes "drop n l = drop n g" and "length l = length g" and "n < length g"
  shows "l!n = g!n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l ! n = g ! n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. l ! n = g ! n
[PROOF STEP]
from assms(2-3)
[PROOF STATE]
proof (chain)
picking this:
length l = length g
n < length g
[PROOF STEP]
have "n < length l"
[PROOF STATE]
proof (prove)
using this:
length l = length g
n < length g

goal (1 subgoal):
 1. n < length l
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
n < length l

goal (1 subgoal):
 1. l ! n = g ! n
[PROOF STEP]
from Cons_nth_drop_Suc[OF this] Cons_nth_drop_Suc[OF assms(3)] assms(1)
[PROOF STATE]
proof (chain)
picking this:
l ! n # drop (Suc n) l = drop n l
g ! n # drop (Suc n) g = drop n g
drop n l = drop n g
[PROOF STEP]
have "l!n # drop (Suc n) l = g!n # drop (Suc n) g"
[PROOF STATE]
proof (prove)
using this:
l ! n # drop (Suc n) l = drop n l
g ! n # drop (Suc n) g = drop n g
drop n l = drop n g

goal (1 subgoal):
 1. l ! n # drop (Suc n) l = g ! n # drop (Suc n) g
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
l ! n # drop (Suc n) l = g ! n # drop (Suc n) g

goal (1 subgoal):
 1. l ! n = g ! n
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
l ! n # drop (Suc n) l = g ! n # drop (Suc n) g

goal (1 subgoal):
 1. l ! n = g ! n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
l ! n = g ! n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fps_conv_radius_ln_nonzero [simp]:
  assumes "c \<noteq> (0 :: 'a :: {banach,real_normed_field,field_char_0})"
  shows   "fps_conv_radius (fps_ln c) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_conv_radius (fps_ln c) = 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
c \<noteq> (0::'a)

goal (1 subgoal):
 1. fps_conv_radius (fps_ln c) = 1
[PROOF STEP]
by (simp add: fps_conv_radius_ln)


[STATEMENT]
lemma ZFCartProd:
  assumes "x |\<in>| A |\<times>| B"
  shows   "Fst x |\<in>| A \<and> Snd x |\<in>| B \<and> isOpair x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Fst x |\<in>| A \<and> Snd x |\<in>| B \<and> isOpair x
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Fst x |\<in>| A \<and> Snd x |\<in>| B \<and> isOpair x
[PROOF STEP]
from CartProd
[PROOF STATE]
proof (chain)
picking this:
?x |\<in>| ?A |\<times>| ?B = (\<exists>a b. a |\<in>| ?A \<and> b |\<in>| ?B \<and> ?x = Opair a b)
[PROOF STEP]
obtain a b
    where "a |\<in>| A"
    and   "b |\<in>| B"
    and   "x = Opair a b"
[PROOF STATE]
proof (prove)
using this:
?x |\<in>| ?A |\<times>| ?B = (\<exists>a b. a |\<in>| ?A \<and> b |\<in>| ?B \<and> ?x = Opair a b)

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>a |\<in>| A; b |\<in>| B; x = Opair a b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?x |\<in>| ?A |\<times>| ?B = (\<exists>a b. a |\<in>| ?A \<and> b |\<in>| ?B \<and> ?x = Opair a b)
x |\<in>| A |\<times>| B

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>a |\<in>| A; b |\<in>| B; x = Opair a b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a |\<in>| A
b |\<in>| B
x = Opair a b

goal (1 subgoal):
 1. Fst x |\<in>| A \<and> Snd x |\<in>| B \<and> isOpair x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
a |\<in>| A
b |\<in>| B
x = Opair a b

goal (1 subgoal):
 1. Fst x |\<in>| A \<and> Snd x |\<in>| B \<and> isOpair x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a |\<in>| A
b |\<in>| B
x = Opair a b
x |\<in>| A |\<times>| B

goal (1 subgoal):
 1. Fst x |\<in>| A \<and> Snd x |\<in>| B \<and> isOpair x
[PROOF STEP]
by (auto simp add: Fst Snd isOpair_def)
[PROOF STATE]
proof (state)
this:
Fst x |\<in>| A \<and> Snd x |\<in>| B \<and> isOpair x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma iso_reduced_homology_group_lower_hemisphere:
  assumes "k \<le> n"
  shows "hom_induced p (nsphere n) {} (nsphere n) {x. x k \<le> 0} id
      \<in> iso (reduced_homology_group p (nsphere n)) (relative_homology_group p (nsphere n) {x. x k \<le> 0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p (nsphere n) {} (nsphere n) {x. x k \<le> 0} id \<in> Group.iso (reduced_homology_group p (nsphere n)) (relative_homology_group p (nsphere n) {x. x k \<le> 0})
[PROOF STEP]
proof (rule iso_reduced_homology_by_contractible)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. contractible_space (subtopology (nsphere n) {x. x k \<le> 0})
 2. topspace (nsphere n) \<inter> {x. x k \<le> 0} \<noteq> {}
[PROOF STEP]
show "contractible_space (subtopology (nsphere n) {x. x k \<le> 0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. contractible_space (subtopology (nsphere n) {x. x k \<le> 0})
[PROOF STEP]
by (simp add: assms contractible_space_lower_hemisphere)
[PROOF STATE]
proof (state)
this:
contractible_space (subtopology (nsphere n) {x. x k \<le> 0})

goal (1 subgoal):
 1. topspace (nsphere n) \<inter> {x. x k \<le> 0} \<noteq> {}
[PROOF STEP]
have "(\<lambda>i. if i = k then -1 else 0) \<in> topspace (nsphere n) \<inter> {x. x k \<le> 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. if i = k then - 1 else 0) \<in> topspace (nsphere n) \<inter> {x. x k \<le> 0}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
k \<le> n

goal (1 subgoal):
 1. (\<lambda>i. if i = k then - 1 else 0) \<in> topspace (nsphere n) \<inter> {x. x k \<le> 0}
[PROOF STEP]
by (simp add: nsphere if_distrib [of "\<lambda>x. x ^ 2"] cong: if_cong)
[PROOF STATE]
proof (state)
this:
(\<lambda>i. if i = k then - 1 else 0) \<in> topspace (nsphere n) \<inter> {x. x k \<le> 0}

goal (1 subgoal):
 1. topspace (nsphere n) \<inter> {x. x k \<le> 0} \<noteq> {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>i. if i = k then - 1 else 0) \<in> topspace (nsphere n) \<inter> {x. x k \<le> 0}
[PROOF STEP]
show "topspace (nsphere n) \<inter> {x. x k \<le> 0} \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>i. if i = k then - 1 else 0) \<in> topspace (nsphere n) \<inter> {x. x k \<le> 0}

goal (1 subgoal):
 1. topspace (nsphere n) \<inter> {x. x k \<le> 0} \<noteq> {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
topspace (nsphere n) \<inter> {x. x k \<le> 0} \<noteq> {}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma congruence2:
  fixes b1 :: nat
  assumes "b>=2"
  shows "(\<alpha> b n) mod (b - 2) = n mod (b - 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> b n mod int (b - 2) = int (n mod (b - 2))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<alpha> b n mod int (b - 2) = int (n mod (b - 2))
[PROOF STEP]
from alpha_linear
[PROOF STATE]
proof (chain)
picking this:
\<alpha> 2 ?n = int ?n
[PROOF STEP]
have S1: "\<alpha> (nat 2) n = n"
[PROOF STATE]
proof (prove)
using this:
\<alpha> 2 ?n = int ?n

goal (1 subgoal):
 1. \<alpha> (nat 2) n = int n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<alpha> (nat 2) n = int n

goal (1 subgoal):
 1. \<alpha> b n mod int (b - 2) = int (n mod (b - 2))
[PROOF STEP]
define q where "q = b - (nat 2)"
[PROOF STATE]
proof (state)
this:
q = b - nat 2

goal (1 subgoal):
 1. \<alpha> b n mod int (b - 2) = int (n mod (b - 2))
[PROOF STEP]
from q_def assms le_mod_geq
[PROOF STATE]
proof (chain)
picking this:
q = b - nat 2
2 \<le> b
?n \<le> ?m \<Longrightarrow> ?m mod ?n = (?m - ?n) mod ?n
[PROOF STEP]
have S4: "b mod q = 2 mod q"
[PROOF STATE]
proof (prove)
using this:
q = b - nat 2
2 \<le> b
?n \<le> ?m \<Longrightarrow> ?m mod ?n = (?m - ?n) mod ?n

goal (1 subgoal):
 1. b mod q = 2 mod q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
b mod q = 2 mod q

goal (1 subgoal):
 1. \<alpha> b n mod int (b - 2) = int (n mod (b - 2))
[PROOF STEP]
from assms S4 congruence
[PROOF STATE]
proof (chain)
picking this:
2 \<le> b
b mod q = 2 mod q
?b1.0 mod ?q = ?b2.0 mod ?q \<Longrightarrow> \<alpha> ?b1.0 ?n mod int ?q = \<alpha> ?b2.0 ?n mod int ?q
[PROOF STEP]
have SN: "(\<alpha> b n) mod q = (\<alpha> 2 n) mod q"
[PROOF STATE]
proof (prove)
using this:
2 \<le> b
b mod q = 2 mod q
?b1.0 mod ?q = ?b2.0 mod ?q \<Longrightarrow> \<alpha> ?b1.0 ?n mod int ?q = \<alpha> ?b2.0 ?n mod int ?q

goal (1 subgoal):
 1. \<alpha> b n mod int q = \<alpha> 2 n mod int q
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<alpha> b n mod int q = \<alpha> 2 n mod int q

goal (1 subgoal):
 1. \<alpha> b n mod int (b - 2) = int (n mod (b - 2))
[PROOF STEP]
from S1 SN q_def zmod_int
[PROOF STATE]
proof (chain)
picking this:
\<alpha> (nat 2) n = int n
\<alpha> b n mod int q = \<alpha> 2 n mod int q
q = b - nat 2
int (?a mod ?b) = int ?a mod int ?b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<alpha> (nat 2) n = int n
\<alpha> b n mod int q = \<alpha> 2 n mod int q
q = b - nat 2
int (?a mod ?b) = int ?a mod int ?b

goal (1 subgoal):
 1. \<alpha> b n mod int (b - 2) = int (n mod (b - 2))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<alpha> b n mod int (b - 2) = int (n mod (b - 2))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hvzk_xr'_rewrite:
  assumes r: "r < order \<G>"
  shows "((w*c + r) mod (order \<G>) mod (order \<G>) + (order \<G>) * w*c - w*c) mod (order \<G>) = r"
(is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = r
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = r
[PROOF STEP]
have "?lhs = (w*c + r  + (order \<G>) * w*c- w*c) mod (order \<G>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = (w * c + r + order \<G> * w * c - w * c) mod order \<G>
[PROOF STEP]
by (metis Nat.add_diff_assoc Num.of_nat_simps(1) One_nat_def add_less_same_cancel2 less_imp_le_nat
        mod_add_left_eq mult.assoc mult_0_right n_less_m_mult_n nat_neq_iff not_add_less2 of_nat_0_le_iff prime_gt_1_nat prime_order)
[PROOF STATE]
proof (state)
this:
((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = (w * c + r + order \<G> * w * c - w * c) mod order \<G>

goal (1 subgoal):
 1. ((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = r
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = (w * c + r + order \<G> * w * c - w * c) mod order \<G>

goal (1 subgoal):
 1. ((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = r
[PROOF STEP]
using r
[PROOF STATE]
proof (prove)
using this:
((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = (w * c + r + order \<G> * w * c - w * c) mod order \<G>
r < order \<G>

goal (1 subgoal):
 1. ((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = r
[PROOF STEP]
by (metis ab_semigroup_add_class.add_ac(1) ab_semigroup_mult_class.mult_ac(1) diff_add_inverse mod_if mod_mult_self2)
[PROOF STATE]
proof (state)
this:
((w * c + r) mod order \<G> mod order \<G> + order \<G> * w * c - w * c) mod order \<G> = r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "!!a::int. [| a+b < i+j; a<b; i<j |] ==> a+a - - (- 1) < j+j - 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>a + b < i + j; a < b; i < j\<rbrakk> \<Longrightarrow> a + a - - (- 1) < j + j - 3
[PROOF STEP]
by arith


[STATEMENT]
lemma ex1_9: "\<bar>integral {0 .. 1} (\<lambda>x. 1 / (1 + x*x::real)) - pi/4\<bar> \<le> 1 / 10^9"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>integral {0..1} (\<lambda>x. 1 / (1 + x * x)) - pi / 4\<bar> \<le> 1 / 10 ^ 9
[PROOF STEP]
by (rule abs_minus_leI) (tactic \<open>integral_bnds_tac 1 50 5 6 40 "" [] @{context} 1\<close>)


[STATEMENT]
lemma M_not_one_simp: "j < dim_col M \<Longrightarrow> i < dim_row M \<Longrightarrow> M $$ (i, j) \<noteq> 1 \<Longrightarrow> M $$ (i, j) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>j < dim_col M; i < dim_row M; M $$ (i, j) \<noteq> (1::'b)\<rbrakk> \<Longrightarrow> M $$ (i, j) = (0::'b)
[PROOF STEP]
using elems01
[PROOF STATE]
proof (prove)
using this:
elements_mat M \<subseteq> {0::'b, 1::'b}

goal (1 subgoal):
 1. \<lbrakk>j < dim_col M; i < dim_row M; M $$ (i, j) \<noteq> (1::'b)\<rbrakk> \<Longrightarrow> M $$ (i, j) = (0::'b)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in group) conjugation_is_inj:
  assumes "g \<in> carrier G" "h1 \<in> carrier G" "h2 \<in> carrier G"
    and "g \<otimes> h1 \<otimes> (inv g) = g \<otimes> h2 \<otimes> (inv g)"
    shows "h1 = h2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h1 = h2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G
h1 \<in> carrier G
h2 \<in> carrier G
g \<otimes> h1 \<otimes> inv g = g \<otimes> h2 \<otimes> inv g

goal (1 subgoal):
 1. h1 = h2
[PROOF STEP]
by auto


[STATEMENT]
lemma independent_span_bound:
  assumes f: "finite T"
    and i: "independent S"
    and sp: "S \<subseteq> span T"
  shows "finite S \<and> card S \<le> card T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite S \<and> card S \<le> card T
[PROOF STEP]
by (metis exchange_lemma[OF f i sp] finite_subset card_mono)


[STATEMENT]
lemma continuous_on_pre_zeta [continuous_intros]:
  assumes "continuous_on A f" "a > 0"
  shows   "continuous_on A (\<lambda>x. pre_zeta a (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on A (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. continuous_on A (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
continuous_on A f
0 < a
[PROOF STEP]
have "continuous_on UNIV (pre_zeta a)"
[PROOF STATE]
proof (prove)
using this:
continuous_on A f
0 < a

goal (1 subgoal):
 1. continuous_on UNIV (pre_zeta a)
[PROOF STEP]
by (intro holomorphic_on_imp_continuous_on[OF holomorphic_pre_zeta]) auto
[PROOF STATE]
proof (state)
this:
continuous_on UNIV (pre_zeta a)

goal (1 subgoal):
 1. continuous_on A (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
from continuous_on_compose2[OF this assms(1)]
[PROOF STATE]
proof (chain)
picking this:
f ` A \<subseteq> UNIV \<Longrightarrow> continuous_on A (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f ` A \<subseteq> UNIV \<Longrightarrow> continuous_on A (\<lambda>x. pre_zeta a (f x))

goal (1 subgoal):
 1. continuous_on A (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
continuous_on A (\<lambda>x. pre_zeta a (f x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma all_vec_append: "(\<forall> x \<in> carrier_vec (n + m). P x) \<longleftrightarrow> (\<forall> x1 \<in> carrier_vec n. \<forall> x2 \<in> carrier_vec m. P (x1 @\<^sub>v x2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>carrier_vec (n + m). P x) = (\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2))
[PROOF STEP]
proof (standard, force, intro ballI, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2); x \<in> carrier_vec (n + m)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
case (1 x)
[PROOF STATE]
proof (state)
this:
\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2)
x \<in> carrier_vec (n + m)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2); x \<in> carrier_vec (n + m)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
have "x = vec n (\<lambda> i. x $ i) @\<^sub>v vec m (\<lambda> i. x $ (n + i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i))
[PROOF STEP]
by (rule eq_vecI, insert 1(2), auto)
[PROOF STATE]
proof (state)
this:
x = vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2); x \<in> carrier_vec (n + m)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
hence "P x = P (vec n (\<lambda> i. x $ i) @\<^sub>v vec m (\<lambda> i. x $ (n + i)))"
[PROOF STATE]
proof (prove)
using this:
x = vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i))

goal (1 subgoal):
 1. P x = P (vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P x = P (vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i)))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2); x \<in> carrier_vec (n + m)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
P x = P (vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i)))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2); x \<in> carrier_vec (n + m)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
have "\<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i)))
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2)
x \<in> carrier_vec (n + m)

goal (1 subgoal):
 1. P (vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P (vec n (($) x) @\<^sub>v vec m (\<lambda>i. x $ (n + i)))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x1\<in>carrier_vec n. \<forall>x2\<in>carrier_vec m. P (x1 @\<^sub>v x2); x \<in> carrier_vec (n + m)\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
P x
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P x

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

goal:
No subgoals!
[PROOF STEP]
qed