[STATEMENT]
lemma measure_UNION_le:
  "finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> measure M (\<Union>i\<in>I. F i) \<le> (\<Sum>i\<in>I. measure M (F i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite I; \<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
[PROOF STEP]
proof (induction I rule: finite_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` {})) \<le> (\<Sum>i\<in>{}. Sigma_Algebra.measure M (F i))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; (\<And>i. i \<in> Fa \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` Fa)) \<le> (\<Sum>i\<in>Fa. Sigma_Algebra.measure M (F i)); \<And>i. i \<in> insert x Fa \<Longrightarrow> F i \<in> sets M\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert x Fa)) \<le> (\<Sum>i\<in>insert x Fa. Sigma_Algebra.measure M (F i))
[PROOF STEP]
case (insert i I)
[PROOF STATE]
proof (state)
this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
?i \<in> insert i I \<Longrightarrow> F ?i \<in> sets M

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` {})) \<le> (\<Sum>i\<in>{}. Sigma_Algebra.measure M (F i))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; (\<And>i. i \<in> Fa \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` Fa)) \<le> (\<Sum>i\<in>Fa. Sigma_Algebra.measure M (F i)); \<And>i. i \<in> insert x Fa \<Longrightarrow> F i \<in> sets M\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert x Fa)) \<le> (\<Sum>i\<in>insert x Fa. Sigma_Algebra.measure M (F i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
?i \<in> insert i I \<Longrightarrow> F ?i \<in> sets M
[PROOF STEP]
have "measure M (\<Union>i\<in>insert i I. F i) = measure M (F i \<union> \<Union> (F ` I))"
[PROOF STATE]
proof (prove)
using this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
?i \<in> insert i I \<Longrightarrow> F ?i \<in> sets M

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (F ` insert i I)) = Sigma_Algebra.measure M (F i \<union> \<Union> (F ` I))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M (\<Union> (F ` insert i I)) = Sigma_Algebra.measure M (F i \<union> \<Union> (F ` I))

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` {})) \<le> (\<Sum>i\<in>{}. Sigma_Algebra.measure M (F i))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; (\<And>i. i \<in> Fa \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` Fa)) \<le> (\<Sum>i\<in>Fa. Sigma_Algebra.measure M (F i)); \<And>i. i \<in> insert x Fa \<Longrightarrow> F i \<in> sets M\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert x Fa)) \<le> (\<Sum>i\<in>insert x Fa. Sigma_Algebra.measure M (F i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M (\<Union> (F ` insert i I)) = Sigma_Algebra.measure M (F i \<union> \<Union> (F ` I))

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` {})) \<le> (\<Sum>i\<in>{}. Sigma_Algebra.measure M (F i))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; (\<And>i. i \<in> Fa \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` Fa)) \<le> (\<Sum>i\<in>Fa. Sigma_Algebra.measure M (F i)); \<And>i. i \<in> insert x Fa \<Longrightarrow> F i \<in> sets M\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert x Fa)) \<le> (\<Sum>i\<in>insert x Fa. Sigma_Algebra.measure M (F i))
[PROOF STEP]
from insert
[PROOF STATE]
proof (chain)
picking this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
?i \<in> insert i I \<Longrightarrow> F ?i \<in> sets M
[PROOF STEP]
have "measure M (F i \<union> \<Union> (F ` I)) \<le> measure M (F i) + measure M (\<Union> (F ` I))"
[PROOF STATE]
proof (prove)
using this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
?i \<in> insert i I \<Longrightarrow> F ?i \<in> sets M

goal (1 subgoal):
 1. Sigma_Algebra.measure M (F i \<union> \<Union> (F ` I)) \<le> Sigma_Algebra.measure M (F i) + Sigma_Algebra.measure M (\<Union> (F ` I))
[PROOF STEP]
by (intro measure_Un_le sets.finite_Union) auto
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M (F i \<union> \<Union> (F ` I)) \<le> Sigma_Algebra.measure M (F i) + Sigma_Algebra.measure M (\<Union> (F ` I))

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` {})) \<le> (\<Sum>i\<in>{}. Sigma_Algebra.measure M (F i))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; (\<And>i. i \<in> Fa \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` Fa)) \<le> (\<Sum>i\<in>Fa. Sigma_Algebra.measure M (F i)); \<And>i. i \<in> insert x Fa \<Longrightarrow> F i \<in> sets M\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert x Fa)) \<le> (\<Sum>i\<in>insert x Fa. Sigma_Algebra.measure M (F i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M (F i \<union> \<Union> (F ` I)) \<le> Sigma_Algebra.measure M (F i) + Sigma_Algebra.measure M (\<Union> (F ` I))

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` {})) \<le> (\<Sum>i\<in>{}. Sigma_Algebra.measure M (F i))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; (\<And>i. i \<in> Fa \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` Fa)) \<le> (\<Sum>i\<in>Fa. Sigma_Algebra.measure M (F i)); \<And>i. i \<in> insert x Fa \<Longrightarrow> F i \<in> sets M\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert x Fa)) \<le> (\<Sum>i\<in>insert x Fa. Sigma_Algebra.measure M (F i))
[PROOF STEP]
have "measure M (\<Union>i\<in>I. F i) \<le> (\<Sum>i\<in>I. measure M (F i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
[PROOF STEP]
using insert
[PROOF STATE]
proof (prove)
using this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
?i \<in> insert i I \<Longrightarrow> F ?i \<in> sets M

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` {})) \<le> (\<Sum>i\<in>{}. Sigma_Algebra.measure M (F i))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; (\<And>i. i \<in> Fa \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` Fa)) \<le> (\<Sum>i\<in>Fa. Sigma_Algebra.measure M (F i)); \<And>i. i \<in> insert x Fa \<Longrightarrow> F i \<in> sets M\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert x Fa)) \<le> (\<Sum>i\<in>insert x Fa. Sigma_Algebra.measure M (F i))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>x y. x \<le> y \<Longrightarrow> Sigma_Algebra.measure M (F i) + x \<le> Sigma_Algebra.measure M (F i) + y) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert i I)) \<le> Sigma_Algebra.measure M (F i) + (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. x \<le> y \<Longrightarrow> Sigma_Algebra.measure M (F i) + x \<le> Sigma_Algebra.measure M (F i) + y) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert i I)) \<le> Sigma_Algebra.measure M (F i) + (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (F ` insert i I)) \<le> (\<Sum>i\<in>insert i I. Sigma_Algebra.measure M (F i))
[PROOF STEP]
using insert
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. x \<le> y \<Longrightarrow> Sigma_Algebra.measure M (F i) + x \<le> Sigma_Algebra.measure M (F i) + y) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` insert i I)) \<le> Sigma_Algebra.measure M (F i) + (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` I)) \<le> (\<Sum>i\<in>I. Sigma_Algebra.measure M (F i))
?i \<in> insert i I \<Longrightarrow> F ?i \<in> sets M

goal (1 subgoal):
 1. Sigma_Algebra.measure M (\<Union> (F ` insert i I)) \<le> (\<Sum>i\<in>insert i I. Sigma_Algebra.measure M (F i))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure M (\<Union> (F ` insert i I)) \<le> (\<Sum>i\<in>insert i I. Sigma_Algebra.measure M (F i))

goal (1 subgoal):
 1. (\<And>i. i \<in> {} \<Longrightarrow> F i \<in> sets M) \<Longrightarrow> Sigma_Algebra.measure M (\<Union> (F ` {})) \<le> (\<Sum>i\<in>{}. Sigma_Algebra.measure M (F i))
[PROOF STEP]
qed simp


[STATEMENT]
lemma setVsList:
  assumes "\<forall>l \<in> set (g1 G). set (g2 l N) = f2 (set l) N"
  shows "set [set (g2 l N). l <- (g1 G)]  =  {f2 P N| P. P \<in> set (map set (g1 G))}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (map (\<lambda>l. set (g2 l N)) (g1 G)) = {f2 P N |P. P \<in> set (map set (g1 G))}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>l\<in>set (g1 G). set (g2 l N) = f2 (set l) N

goal (1 subgoal):
 1. set (map (\<lambda>l. set (g2 l N)) (g1 G)) = {f2 P N |P. P \<in> set (map set (g1 G))}
[PROOF STEP]
by auto


[STATEMENT]
lemma image_mset_eq_imp_set_eq:
  assumes "image_mset f s = image_mset g s"
  shows "f`(set_mset s) = g`set_mset s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` set_mset s = g ` set_mset s
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
image_mset f s = image_mset g s

goal (1 subgoal):
 1. f ` set_mset s = g ` set_mset s
[PROOF STEP]
by (metis set_image_mset)


[STATEMENT]
lemma Im_Arctan_of_real [simp]: "Im (Arctan (of_real x)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Im (Arctan (complex_of_real x)) = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Im (Arctan (complex_of_real x)) = 0
[PROOF STEP]
have ne: "1 + x\<^sup>2 \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 + x\<^sup>2 \<noteq> 0
[PROOF STEP]
by (metis power_one sum_power2_eq_zero_iff zero_neq_one)
[PROOF STATE]
proof (state)
this:
1 + x\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. Im (Arctan (complex_of_real x)) = 0
[PROOF STEP]
have ne1: "1 + \<i> * complex_of_real x \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 + \<i> * complex_of_real x \<noteq> 0
[PROOF STEP]
using Complex_eq complex_eq_cancel_iff2
[PROOF STATE]
proof (prove)
using this:
Complex ?a ?b = complex_of_real ?a + \<i> * complex_of_real ?b
(Complex ?x ?y = complex_of_real ?xa) = (?x = ?xa \<and> ?y = 0)

goal (1 subgoal):
 1. 1 + \<i> * complex_of_real x \<noteq> 0
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
1 + \<i> * complex_of_real x \<noteq> 0

goal (1 subgoal):
 1. Im (Arctan (complex_of_real x)) = 0
[PROOF STEP]
have "Re (Ln ((1 - \<i> * x) * inverse (1 + \<i> * x))) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re (Ln ((1 - \<i> * complex_of_real x) * inverse (1 + \<i> * complex_of_real x))) = 0
[PROOF STEP]
apply (rule norm_exp_imaginary)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (exp (Ln ((1 - \<i> * complex_of_real x) * inverse (1 + \<i> * complex_of_real x)))) = 1
[PROOF STEP]
using ne
[PROOF STATE]
proof (prove)
using this:
1 + x\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. cmod (exp (Ln ((1 - \<i> * complex_of_real x) * inverse (1 + \<i> * complex_of_real x)))) = 1
[PROOF STEP]
apply (simp add: ne1 cmod_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 + x\<^sup>2 \<noteq> 0 \<Longrightarrow> (1 / (1 + x\<^sup>2) - x * x / (1 + x\<^sup>2))\<^sup>2 + (2 * x / (1 + x\<^sup>2))\<^sup>2 = 1
[PROOF STEP]
apply (auto simp: field_split_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 + x\<^sup>2 \<noteq> 0 \<Longrightarrow> (1 - x * x)\<^sup>2 + 4 * x\<^sup>2 = (1 + x\<^sup>2)\<^sup>2
[PROOF STEP]
apply algebra
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
Re (Ln ((1 - \<i> * complex_of_real x) * inverse (1 + \<i> * complex_of_real x))) = 0

goal (1 subgoal):
 1. Im (Arctan (complex_of_real x)) = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Re (Ln ((1 - \<i> * complex_of_real x) * inverse (1 + \<i> * complex_of_real x))) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Re (Ln ((1 - \<i> * complex_of_real x) * inverse (1 + \<i> * complex_of_real x))) = 0

goal (1 subgoal):
 1. Im (Arctan (complex_of_real x)) = 0
[PROOF STEP]
unfolding Arctan_def divide_complex_def
[PROOF STATE]
proof (prove)
using this:
Re (Ln ((1 - \<i> * complex_of_real x) * inverse (1 + \<i> * complex_of_real x))) = 0

goal (1 subgoal):
 1. Im (\<i> * inverse 2 * Ln ((1 - \<i> * complex_of_real x) * inverse (1 + \<i> * complex_of_real x))) = 0
[PROOF STEP]
by (simp add: complex_eq_iff)
[PROOF STATE]
proof (state)
this:
Im (Arctan (complex_of_real x)) = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma isDiagonal_eq_upt_k_min:
"isDiagonal A = isDiagonal_upt_k A (min (nrows A) (ncols A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isDiagonal A = isDiagonal_upt_k A (min (nrows A) (ncols A))
[PROOF STEP]
unfolding isDiagonal_def isDiagonal_upt_k_def nrows_def ncols_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a b. to_nat a \<noteq> to_nat b \<longrightarrow> A $ a $ b = (0::'a)) = (\<forall>a b. to_nat a \<noteq> to_nat b \<and> (to_nat a < min CARD('c) CARD('b) \<or> to_nat b < min CARD('c) CARD('b)) \<longrightarrow> A $ a $ b = (0::'a))
[PROOF STEP]
by (auto, meson less_trans not_less_iff_gr_or_eq to_nat_less_card)


[STATEMENT]
lemma dist_round_complex_le: "dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2
[PROOF STEP]
have "dist z (gauss2complex (round_complex z)) ^ 2 =
        norm (z - gauss2complex (round_complex z)) ^ 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (dist z (gauss2complex (round_complex z)))\<^sup>2 = (cmod (z - gauss2complex (round_complex z)))\<^sup>2
[PROOF STEP]
by (simp add: dist_norm)
[PROOF STATE]
proof (state)
this:
(dist z (gauss2complex (round_complex z)))\<^sup>2 = (cmod (z - gauss2complex (round_complex z)))\<^sup>2

goal (1 subgoal):
 1. dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(dist z (gauss2complex (round_complex z)))\<^sup>2 = (cmod (z - gauss2complex (round_complex z)))\<^sup>2

goal (1 subgoal):
 1. dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2
[PROOF STEP]
have "\<dots> \<le> 1 / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cmod (z - gauss2complex (round_complex z)))\<^sup>2 \<le> 1 / 2
[PROOF STEP]
by (rule norm_round_complex_le)
[PROOF STATE]
proof (state)
this:
(cmod (z - gauss2complex (round_complex z)))\<^sup>2 \<le> 1 / 2

goal (1 subgoal):
 1. dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(cmod (z - gauss2complex (round_complex z)))\<^sup>2 \<le> 1 / 2

goal (1 subgoal):
 1. dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2
[PROOF STEP]
have "\<dots> = (sqrt 2 / 2) ^ 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / 2 = (sqrt 2 / 2)\<^sup>2
[PROOF STEP]
by (simp add: power2_eq_square)
[PROOF STATE]
proof (state)
this:
1 / 2 = (sqrt 2 / 2)\<^sup>2

goal (1 subgoal):
 1. dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(dist z (gauss2complex (round_complex z)))\<^sup>2 \<le> (sqrt 2 / 2)\<^sup>2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(dist z (gauss2complex (round_complex z)))\<^sup>2 \<le> (sqrt 2 / 2)\<^sup>2

goal (1 subgoal):
 1. dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2
[PROOF STEP]
by (rule power2_le_imp_le) auto
[PROOF STATE]
proof (state)
this:
dist z (gauss2complex (round_complex z)) \<le> sqrt 2 / 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma harm_mono: "m \<le> n \<Longrightarrow> harm m \<le> (harm n :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> harm m \<le> harm n
[PROOF STEP]
unfolding harm_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> (\<Sum>k = 1..m. inverse (real k)) \<le> (\<Sum>k = 1..n. inverse (real k))
[PROOF STEP]
by (intro sum_mono2) auto


[STATEMENT]
lemma aux_comp_with_sqrt2:
  shows "(sqrt 2)^n * (sqrt 2)^n = 2^n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt 2 ^ n * sqrt 2 ^ n = 2 ^ n
[PROOF STEP]
by (smt power_mult_distrib real_sqrt_mult_self)


[STATEMENT]
lemma gcd_left_idem: "gcd a (gcd a b) = gcd a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcd a (gcd a b) = gcd a b
[PROOF STEP]
by (fact gcd.left_idem)


[STATEMENT]
lemma padic_mult_comm0:
assumes "prime p"
shows  "(padic_mult p x y)= (padic_mult p y x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. padic_mult p x y = padic_mult p y x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
prime p

goal (1 subgoal):
 1. padic_mult p x y = padic_mult p y x
[PROOF STEP]
unfolding padic_mult_def
[PROOF STATE]
proof (prove)
using this:
prime p

goal (1 subgoal):
 1. (\<lambda>n. x n \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> y n) = (\<lambda>n. y n \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> x n)
[PROOF STEP]
using padic_integers.residue_mult_comm[of p]
[PROOF STATE]
proof (prove)
using this:
prime p
padic_integers p \<Longrightarrow> ?x \<otimes>\<^bsub>residue_ring (p ^ ?k)\<^esub> ?y = ?y \<otimes>\<^bsub>residue_ring (p ^ ?k)\<^esub> ?x

goal (1 subgoal):
 1. (\<lambda>n. x n \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> y n) = (\<lambda>n. y n \<otimes>\<^bsub>residue_ring (p ^ n)\<^esub> x n)
[PROOF STEP]
by (simp add: padic_integers_def)


[STATEMENT]
theorem set_vebt_pred: "invar_vebt t n \<Longrightarrow> vebt_pred t x = Some px \<longleftrightarrow> is_pred_in_set (set_vebt t) x px"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invar_vebt t n \<Longrightarrow> (vebt_pred t x = Some px) = is_pred_in_set (set_vebt t) x px
[PROOF STEP]
by (simp add: pred_corr set_vebt_set_vebt'_valid)


[STATEMENT]
lemma obtain_partition:
  assumes "finite A"
  assumes "number_partition (card A) N"
  shows "\<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A
number_partition (card A) N

goal (1 subgoal):
 1. \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N
[PROOF STEP]
proof (induct N arbitrary: A)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. \<lbrakk>finite A; number_partition (card A) {#}\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = {#}
 2. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:
finite A
number_partition (card A) {#}

goal (2 subgoals):
 1. \<And>A. \<lbrakk>finite A; number_partition (card A) {#}\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = {#}
 2. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
finite A
number_partition (card A) {#}
[PROOF STEP]
have "A = {}"
[PROOF STATE]
proof (prove)
using this:
finite A
number_partition (card A) {#}

goal (1 subgoal):
 1. A = {}
[PROOF STEP]
unfolding number_partition_def
[PROOF STATE]
proof (prove)
using this:
finite A
\<Sum>\<^sub># {#} = card A \<and> 0 \<notin># {#}

goal (1 subgoal):
 1. A = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A = {}

goal (2 subgoals):
 1. \<And>A. \<lbrakk>finite A; number_partition (card A) {#}\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = {#}
 2. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
A = {}
[PROOF STEP]
have "partition_on A {}"
[PROOF STATE]
proof (prove)
using this:
A = {}

goal (1 subgoal):
 1. partition_on A {}
[PROOF STEP]
by (simp add: partition_on_empty)
[PROOF STATE]
proof (state)
this:
partition_on A {}

goal (2 subgoals):
 1. \<And>A. \<lbrakk>finite A; number_partition (card A) {#}\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = {#}
 2. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
partition_on A {}

goal (2 subgoals):
 1. \<And>A. \<lbrakk>finite A; number_partition (card A) {#}\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = {#}
 2. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
have "image_mset card (mset_set {}) = {#}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. image_mset card (mset_set {}) = {#}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
image_mset card (mset_set {}) = {#}

goal (2 subgoals):
 1. \<And>A. \<lbrakk>finite A; number_partition (card A) {#}\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = {#}
 2. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
partition_on A {}
image_mset card (mset_set {}) = {#}
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
partition_on A {}
image_mset card (mset_set {}) = {#}

goal (1 subgoal):
 1. \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = {#}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>P. partition_on A P \<and> image_mset card (mset_set P) = {#}

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
case (add x N)
[PROOF STATE]
proof (state)
this:
\<lbrakk>finite ?A; number_partition (card ?A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on ?A P \<and> image_mset card (mset_set P) = N
finite A
number_partition (card A) (add_mset x N)

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from add.prems(2)
[PROOF STATE]
proof (chain)
picking this:
number_partition (card A) (add_mset x N)
[PROOF STEP]
have "0 \<notin># add_mset x N" and "sum_mset (add_mset x N) = card A"
[PROOF STATE]
proof (prove)
using this:
number_partition (card A) (add_mset x N)

goal (1 subgoal):
 1. 0 \<notin># add_mset x N &&& \<Sum>\<^sub># (add_mset x N) = card A
[PROOF STEP]
unfolding number_partition_def
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># (add_mset x N) = card A \<and> 0 \<notin># add_mset x N

goal (1 subgoal):
 1. 0 \<notin># add_mset x N &&& \<Sum>\<^sub># (add_mset x N) = card A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<notin># add_mset x N
\<Sum>\<^sub># (add_mset x N) = card A

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
0 \<notin># add_mset x N
\<Sum>\<^sub># (add_mset x N) = card A
[PROOF STEP]
have "x \<le> card A"
[PROOF STATE]
proof (prove)
using this:
0 \<notin># add_mset x N
\<Sum>\<^sub># (add_mset x N) = card A

goal (1 subgoal):
 1. x \<le> card A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<le> card A

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
x \<le> card A
[PROOF STEP]
obtain X where "X \<subseteq> A" and "card X = x"
[PROOF STATE]
proof (prove)
using this:
x \<le> card A

goal (1 subgoal):
 1. (\<And>X. \<lbrakk>X \<subseteq> A; card X = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using subset_with_given_card_exists
[PROOF STATE]
proof (prove)
using this:
x \<le> card A
?n \<le> card ?A \<Longrightarrow> \<exists>B\<subseteq>?A. card B = ?n

goal (1 subgoal):
 1. (\<And>X. \<lbrakk>X \<subseteq> A; card X = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
X \<subseteq> A
card X = x

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
X \<subseteq> A
card X = x
[PROOF STEP]
have "X \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
X \<subseteq> A
card X = x

goal (1 subgoal):
 1. X \<noteq> {}
[PROOF STEP]
using \<open>0 \<notin># add_mset x N\<close> \<open>finite A\<close>
[PROOF STATE]
proof (prove)
using this:
X \<subseteq> A
card X = x
0 \<notin># add_mset x N
finite A

goal (1 subgoal):
 1. X \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
X \<noteq> {}

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
have "sum_mset N = card (A - X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>\<^sub># N = card (A - X)
[PROOF STEP]
using \<open>sum_mset (add_mset x N) = card A\<close> \<open>card X = x\<close> \<open>X \<subseteq> A\<close>
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># (add_mset x N) = card A
card X = x
X \<subseteq> A

goal (1 subgoal):
 1. \<Sum>\<^sub># N = card (A - X)
[PROOF STEP]
by (metis add.commute add.prems(1) add_diff_cancel_right' card_Diff_subset infinite_super sum_mset.add_mset)
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># N = card (A - X)

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from this \<open>0 \<notin># add_mset x N\<close>
[PROOF STATE]
proof (chain)
picking this:
\<Sum>\<^sub># N = card (A - X)
0 \<notin># add_mset x N
[PROOF STEP]
have "number_partition (card (A - X)) N"
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># N = card (A - X)
0 \<notin># add_mset x N

goal (1 subgoal):
 1. number_partition (card (A - X)) N
[PROOF STEP]
unfolding number_partition_def
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># N = card (A - X)
0 \<notin># add_mset x N

goal (1 subgoal):
 1. \<Sum>\<^sub># N = card (A - X) \<and> 0 \<notin># N
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
number_partition (card (A - X)) N

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
number_partition (card (A - X)) N
[PROOF STEP]
obtain P where "partition_on (A - X) P" and eq_N: "image_mset card (mset_set P) = N"
[PROOF STATE]
proof (prove)
using this:
number_partition (card (A - X)) N

goal (1 subgoal):
 1. (\<And>P. \<lbrakk>partition_on (A - X) P; image_mset card (mset_set P) = N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using add.hyps \<open>finite A\<close>
[PROOF STATE]
proof (prove)
using this:
number_partition (card (A - X)) N
\<lbrakk>finite ?A; number_partition (card ?A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on ?A P \<and> image_mset card (mset_set P) = N
finite A

goal (1 subgoal):
 1. (\<And>P. \<lbrakk>partition_on (A - X) P; image_mset card (mset_set P) = N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
partition_on (A - X) P
image_mset card (mset_set P) = N

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from \<open>partition_on (A - X) P\<close>
[PROOF STATE]
proof (chain)
picking this:
partition_on (A - X) P
[PROOF STEP]
have "finite P"
[PROOF STATE]
proof (prove)
using this:
partition_on (A - X) P

goal (1 subgoal):
 1. finite P
[PROOF STEP]
using \<open>finite A\<close> finite_elements
[PROOF STATE]
proof (prove)
using this:
partition_on (A - X) P
finite A
\<lbrakk>finite ?A; partition_on ?A ?P\<rbrakk> \<Longrightarrow> finite ?P

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

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
from \<open>partition_on (A - X) P\<close>
[PROOF STATE]
proof (chain)
picking this:
partition_on (A - X) P
[PROOF STEP]
have "X \<notin> P"
[PROOF STATE]
proof (prove)
using this:
partition_on (A - X) P

goal (1 subgoal):
 1. X \<notin> P
[PROOF STEP]
using \<open>X \<noteq> {}\<close> partition_onD1
[PROOF STATE]
proof (prove)
using this:
partition_on (A - X) P
X \<noteq> {}
partition_on ?A ?P \<Longrightarrow> ?A = \<Union> ?P

goal (1 subgoal):
 1. X \<notin> P
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
X \<notin> P

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
have "partition_on A (insert X P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. partition_on A (insert X P)
[PROOF STEP]
using \<open>partition_on (A - X) P\<close> \<open>X \<subseteq> A\<close> \<open>X \<noteq> {}\<close>
[PROOF STATE]
proof (prove)
using this:
partition_on (A - X) P
X \<subseteq> A
X \<noteq> {}

goal (1 subgoal):
 1. partition_on A (insert X P)
[PROOF STEP]
by (rule partition_on_insert')
[PROOF STATE]
proof (state)
this:
partition_on A (insert X P)

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
partition_on A (insert X P)

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
have "image_mset card (mset_set (insert X P)) = add_mset x N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. image_mset card (mset_set (insert X P)) = add_mset x N
[PROOF STEP]
using eq_N \<open>card X = x\<close> \<open>finite P\<close> \<open>X \<notin> P\<close>
[PROOF STATE]
proof (prove)
using this:
image_mset card (mset_set P) = N
card X = x
finite P
X \<notin> P

goal (1 subgoal):
 1. image_mset card (mset_set (insert X P)) = add_mset x N
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
image_mset card (mset_set (insert X P)) = add_mset x N

goal (1 subgoal):
 1. \<And>x N A. \<lbrakk>\<And>A. \<lbrakk>finite A; number_partition (card A) N\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = N; finite A; number_partition (card A) (add_mset x N)\<rbrakk> \<Longrightarrow> \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
partition_on A (insert X P)
image_mset card (mset_set (insert X P)) = add_mset x N
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
partition_on A (insert X P)
image_mset card (mset_set (insert X P)) = add_mset x N

goal (1 subgoal):
 1. \<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>P. partition_on A P \<and> image_mset card (mset_set P) = add_mset x N

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma arcs_eq_2verts: "card (arcs G) = 2 * (card (verts G) - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (arcs G) = 2 * (card (verts G) - 1)
[PROOF STEP]
using psp_tree.arcs_undir_G_eq_2vertsG[OF psp_dir_tree_r undirected_tree_axioms] card_gt0
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?source \<in> verts G; Suc (card (verts G) - 1) = card (verts G)\<rbrakk> \<Longrightarrow> card (arcs G) = 2 * (card (verts G) - 1)
0 < card (verts G)

goal (1 subgoal):
 1. card (arcs G) = 2 * (card (verts G) - 1)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma ivl_integral_minus_sets':
  fixes f::"real \<Rightarrow> 'a::banach"
  shows "f integrable_on (closed_segment a c) \<Longrightarrow> f integrable_on (closed_segment b c) \<Longrightarrow> f integrable_on (closed_segment a b) \<Longrightarrow>
    ivl_integral a c f - ivl_integral b c f = ivl_integral a b f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f integrable_on closed_segment a c; f integrable_on closed_segment b c; f integrable_on closed_segment a b\<rbrakk> \<Longrightarrow> ivl_integral a c f - ivl_integral b c f = ivl_integral a b f
[PROOF STEP]
using ivl_integral_combine[of f a b c]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f integrable_on closed_segment a b; f integrable_on closed_segment b c; f integrable_on closed_segment a c\<rbrakk> \<Longrightarrow> ivl_integral a b f + ivl_integral b c f = ivl_integral a c f

goal (1 subgoal):
 1. \<lbrakk>f integrable_on closed_segment a c; f integrable_on closed_segment b c; f integrable_on closed_segment a b\<rbrakk> \<Longrightarrow> ivl_integral a c f - ivl_integral b c f = ivl_integral a b f
[PROOF STEP]
by (auto simp: algebra_simps closed_segment_commute)


[STATEMENT]
lemma index_list_set:
"set (index_list n) = {..<n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (index_list n) = {..<n}
[PROOF STEP]
apply(induction n)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. set (index_list 0) = {..<0}
 2. \<And>n. set (index_list n) = {..<n} \<Longrightarrow> set (index_list (Suc n)) = {..<Suc n}
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. set (index_list n) = {..<n} \<Longrightarrow> set (index_list (Suc n)) = {..<Suc n}
[PROOF STEP]
by (metis Zero_not_Suc atLeastLessThan_empty atLeastLessThan_singleton atLeastLessThan_upt
      diff_Suc_1 index_list.elims ivl_disj_un_singleton(2) lessI lessThan_Suc_atMost less_Suc_eq_le
      set_append sorted_list_of_set_empty sorted_list_of_set_range upt_rec)


[STATEMENT]
lemma step_eps_closure_set_unfold: "(\<And>q'. step_eps bs q q' \<longleftrightarrow> q' \<in> X) \<Longrightarrow>
  step_eps_closure_set {q} bs = {q} \<union> step_eps_closure_set X bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>q'. step_eps bs q q' = (q' \<in> X)) \<Longrightarrow> step_eps_closure_set {q} bs = {q} \<union> step_eps_closure_set X bs
[PROOF STEP]
unfolding step_eps_closure_set_def step_eps_closure_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>q'. step_eps bs q q' = (q' \<in> X)) \<Longrightarrow> (\<Union>q\<in>{q}. Collect ((step_eps bs)\<^sup>*\<^sup>* q)) = {q} \<union> (\<Union>q\<in>X. Collect ((step_eps bs)\<^sup>*\<^sup>* q))
[PROOF STEP]
using rtranclp_step[of "step_eps bs" q]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(step_eps bs)\<^sup>*\<^sup>* q ?q''; \<And>q'. step_eps bs q q' = (q' \<in> ?X)\<rbrakk> \<Longrightarrow> q = ?q'' \<or> (\<exists>q'\<in>?X. step_eps bs q q' \<and> (step_eps bs)\<^sup>*\<^sup>* q' ?q'')

goal (1 subgoal):
 1. (\<And>q'. step_eps bs q q' = (q' \<in> X)) \<Longrightarrow> (\<Union>q\<in>{q}. Collect ((step_eps bs)\<^sup>*\<^sup>* q)) = {q} \<union> (\<Union>q\<in>X. Collect ((step_eps bs)\<^sup>*\<^sup>* q))
[PROOF STEP]
by (auto simp add: converse_rtranclp_into_rtranclp)


[STATEMENT]
lemma bitwise_leq: "(\<forall>k. a \<exclamdown> k \<le>  b \<exclamdown> k) \<longrightarrow> a \<le> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>k. a \<exclamdown> k \<le> b \<exclamdown> k) \<longrightarrow> a \<le> b
[PROOF STEP]
using digitwise_leq[of 2]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>1 < 2; \<forall>t. nth_digit ?x t 2 \<le> nth_digit ?y t 2\<rbrakk> \<Longrightarrow> ?x \<le> ?y

goal (1 subgoal):
 1. (\<forall>k. a \<exclamdown> k \<le> b \<exclamdown> k) \<longrightarrow> a \<le> b
[PROOF STEP]
by (simp add: nth_digit_base2_equiv)


[STATEMENT]
lemma calc_x_axis_intersection_fun_mono:
  fixes x1 x2 :: real
  assumes "x1 > 1" and "x2 > x1"
  shows "x1 - sqrt(x1\<^sup>2 - 1) > x2 - sqrt(x2\<^sup>2 - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
1 < x1
x1 < x2

goal (1 subgoal):
 1. x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
have *: "sqrt(x1\<^sup>2 - 1) + sqrt(x2\<^sup>2 - 1) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
1 < x1
x1 < x2

goal (1 subgoal):
 1. 0 < sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)
[PROOF STEP]
by (smt one_less_power pos2 real_sqrt_gt_zero)
[PROOF STATE]
proof (state)
this:
0 < sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
have "sqrt(x1\<^sup>2 - 1) < x1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (x1\<^sup>2 - 1) < x1
[PROOF STEP]
using real_sqrt_less_iff[of "x1\<^sup>2 - 1" "x1\<^sup>2"] \<open>x1 > 1\<close>
[PROOF STATE]
proof (prove)
using this:
(sqrt (x1\<^sup>2 - 1) < sqrt (x1\<^sup>2)) = (x1\<^sup>2 - 1 < x1\<^sup>2)
1 < x1

goal (1 subgoal):
 1. sqrt (x1\<^sup>2 - 1) < x1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sqrt (x1\<^sup>2 - 1) < x1

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sqrt (x1\<^sup>2 - 1) < x1

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
have "sqrt(x2\<^sup>2 - 1) < x2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (x2\<^sup>2 - 1) < x2
[PROOF STEP]
using real_sqrt_less_iff[of "x2\<^sup>2 - 1" "x2\<^sup>2"] \<open>x1 > 1\<close> \<open>x2 > x1\<close>
[PROOF STATE]
proof (prove)
using this:
(sqrt (x2\<^sup>2 - 1) < sqrt (x2\<^sup>2)) = (x2\<^sup>2 - 1 < x2\<^sup>2)
1 < x1
x1 < x2

goal (1 subgoal):
 1. sqrt (x2\<^sup>2 - 1) < x2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sqrt (x2\<^sup>2 - 1) < x2

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sqrt (x1\<^sup>2 - 1) < x1
sqrt (x2\<^sup>2 - 1) < x2
[PROOF STEP]
have "sqrt(x1\<^sup>2 - 1) + sqrt(x2\<^sup>2 - 1) < x1 + x2"
[PROOF STATE]
proof (prove)
using this:
sqrt (x1\<^sup>2 - 1) < x1
sqrt (x2\<^sup>2 - 1) < x2

goal (1 subgoal):
 1. sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1) < x1 + x2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1) < x1 + x2

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
hence "(x1 + x2) / (sqrt(x1\<^sup>2 - 1) + sqrt(x2\<^sup>2 - 1)) > 1"
[PROOF STATE]
proof (prove)
using this:
sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1) < x1 + x2

goal (1 subgoal):
 1. 1 < (x1 + x2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1) < x1 + x2
0 < sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)

goal (1 subgoal):
 1. 1 < (x1 + x2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
[PROOF STEP]
using less_divide_eq_1_pos[of "sqrt(x1\<^sup>2 - 1) + sqrt(x2\<^sup>2 - 1)" "x1 + x2"]
[PROOF STATE]
proof (prove)
using this:
sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1) < x1 + x2
0 < sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)
0 < sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1) \<Longrightarrow> (1 < (x1 + x2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))) = (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1) < x1 + x2)

goal (1 subgoal):
 1. 1 < (x1 + x2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 < (x1 + x2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
hence "(x2\<^sup>2 - x1\<^sup>2) / (sqrt(x1\<^sup>2 - 1) + sqrt(x2\<^sup>2 - 1)) > x2 - x1"
[PROOF STATE]
proof (prove)
using this:
1 < (x1 + x2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))

goal (1 subgoal):
 1. x2 - x1 < (x2\<^sup>2 - x1\<^sup>2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
[PROOF STEP]
using \<open>x2 > x1\<close>
[PROOF STATE]
proof (prove)
using this:
1 < (x1 + x2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
x1 < x2

goal (1 subgoal):
 1. x2 - x1 < (x2\<^sup>2 - x1\<^sup>2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
[PROOF STEP]
using mult_less_cancel_left_pos[of "x2 - x1" 1 "(x2 + x1) / (sqrt(x1\<^sup>2 - 1) + sqrt(x2\<^sup>2 - 1))"]
[PROOF STATE]
proof (prove)
using this:
1 < (x1 + x2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
x1 < x2
0 < x2 - x1 \<Longrightarrow> ((x2 - x1) * 1 < (x2 - x1) * ((x2 + x1) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)))) = (1 < (x2 + x1) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)))

goal (1 subgoal):
 1. x2 - x1 < (x2\<^sup>2 - x1\<^sup>2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
[PROOF STEP]
by (simp add: power2_eq_square field_simps)
[PROOF STATE]
proof (state)
this:
x2 - x1 < (x2\<^sup>2 - x1\<^sup>2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x2 - x1 < (x2\<^sup>2 - x1\<^sup>2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
have "(x2\<^sup>2 - x1\<^sup>2) = (sqrt(x1\<^sup>2 - 1) + sqrt(x2\<^sup>2 - 1)) * ((sqrt(x2\<^sup>2 - 1) - sqrt(x1\<^sup>2 - 1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x2\<^sup>2 - x1\<^sup>2 = (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)) * (sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1))
[PROOF STEP]
using \<open>x1 > 1\<close> \<open>x2 > x1\<close>
[PROOF STATE]
proof (prove)
using this:
1 < x1
x1 < x2

goal (1 subgoal):
 1. x2\<^sup>2 - x1\<^sup>2 = (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)) * (sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1))
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
x2\<^sup>2 - x1\<^sup>2 = (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)) * (sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1))

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x2 - x1 < (x2\<^sup>2 - x1\<^sup>2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
x2\<^sup>2 - x1\<^sup>2 = (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)) * (sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1))
[PROOF STEP]
have "sqrt(x2\<^sup>2 - 1) - sqrt(x1\<^sup>2 - 1) > x2 - x1"
[PROOF STATE]
proof (prove)
using this:
x2 - x1 < (x2\<^sup>2 - x1\<^sup>2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
x2\<^sup>2 - x1\<^sup>2 = (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)) * (sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1))

goal (1 subgoal):
 1. x2 - x1 < sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
x2 - x1 < (x2\<^sup>2 - x1\<^sup>2) / (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1))
x2\<^sup>2 - x1\<^sup>2 = (sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)) * (sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1))
0 < sqrt (x1\<^sup>2 - 1) + sqrt (x2\<^sup>2 - 1)

goal (1 subgoal):
 1. x2 - x1 < sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x2 - x1 < sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1)

goal (1 subgoal):
 1. \<lbrakk>1 < x1; x1 < x2\<rbrakk> \<Longrightarrow> x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x2 - x1 < sqrt (x2\<^sup>2 - 1) - sqrt (x1\<^sup>2 - 1)

goal (1 subgoal):
 1. x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x2 - sqrt (x2\<^sup>2 - 1) < x1 - sqrt (x1\<^sup>2 - 1)

goal:
No subgoals!
[PROOF STEP]
qed