[STATEMENT]
lemma pos_mat_lim_is_pos:
  fixes X :: "nat \<Rightarrow> complex mat" and A :: "complex mat" and m :: nat
  assumes limX: "limit_mat X A m" and posX: "\<forall>n. positive (X n)"
  shows "positive A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. positive A
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
have  dimX : "\<forall>n. X n \<in> carrier_mat m m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. X n \<in> carrier_mat m m
[PROOF STEP]
using limX
[PROOF STATE]
proof (prove)
using this:
limit_mat X A m

goal (1 subgoal):
 1. \<forall>n. X n \<in> carrier_mat m m
[PROOF STEP]
unfolding limit_mat_def
[PROOF STATE]
proof (prove)
using this:
\<forall>n. X n \<in> carrier_mat m m \<and> A \<in> carrier_mat m m \<and> (\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j))

goal (1 subgoal):
 1. \<forall>n. X n \<in> carrier_mat m m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>n. X n \<in> carrier_mat m m

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
have dimA : "A \<in> carrier_mat m m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<in> carrier_mat m m
[PROOF STEP]
using limX
[PROOF STATE]
proof (prove)
using this:
limit_mat X A m

goal (1 subgoal):
 1. A \<in> carrier_mat m m
[PROOF STEP]
unfolding limit_mat_def
[PROOF STATE]
proof (prove)
using this:
\<forall>n. X n \<in> carrier_mat m m \<and> A \<in> carrier_mat m m \<and> (\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j))

goal (1 subgoal):
 1. A \<in> carrier_mat m m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<in> carrier_mat m m

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
have herX : "\<forall> n. hermitian (X n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. hermitian (X n)
[PROOF STEP]
using posX positive_is_hermitian
[PROOF STATE]
proof (prove)
using this:
\<forall>n. positive (X n)
positive ?A \<Longrightarrow> hermitian ?A

goal (1 subgoal):
 1. \<forall>n. hermitian (X n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>n. hermitian (X n)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>n. hermitian (X n)
[PROOF STEP]
have herA : "hermitian A"
[PROOF STATE]
proof (prove)
using this:
\<forall>n. hermitian (X n)

goal (1 subgoal):
 1. hermitian A
[PROOF STEP]
using hermitian_mat_lim_is_hermitian limX
[PROOF STATE]
proof (prove)
using this:
\<forall>n. hermitian (X n)
\<lbrakk>limit_mat ?X ?A ?m; \<forall>n. hermitian (?X n)\<rbrakk> \<Longrightarrow> hermitian ?A
limit_mat X A m

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

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
hermitian A
[PROOF STEP]
have herprod: "\<forall> v. dim_vec v = dim_col A \<longrightarrow> inner_prod v (A *\<^sub>v v) \<in> Reals"
[PROOF STATE]
proof (prove)
using this:
hermitian A

goal (1 subgoal):
 1. \<forall>v. dim_vec v = dim_col A \<longrightarrow> inner_prod v (A *\<^sub>v v) \<in> \<real>
[PROOF STEP]
using hermitian_inner_prod_real dimA
[PROOF STATE]
proof (prove)
using this:
hermitian A
\<lbrakk>?A \<in> carrier_mat ?n ?n; ?v \<in> carrier_vec ?n; hermitian ?A\<rbrakk> \<Longrightarrow> inner_prod ?v (?A *\<^sub>v ?v) \<in> \<real>
A \<in> carrier_mat m m

goal (1 subgoal):
 1. \<forall>v. dim_vec v = dim_col A \<longrightarrow> inner_prod v (A *\<^sub>v v) \<in> \<real>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>v. dim_vec v = dim_col A \<longrightarrow> inner_prod v (A *\<^sub>v v) \<in> \<real>

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
assume npA: " \<not> positive A"
[PROOF STATE]
proof (state)
this:
\<not> positive A

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
from npA
[PROOF STATE]
proof (chain)
picking this:
\<not> positive A
[PROOF STEP]
have "\<not> (A \<in> carrier_mat (dim_col A) (dim_col A)) \<or> \<not> (\<forall>v. dim_vec v = dim_col A \<longrightarrow> 0 \<le> inner_prod v (A *\<^sub>v v))"
[PROOF STATE]
proof (prove)
using this:
\<not> positive A

goal (1 subgoal):
 1. A \<notin> carrier_mat (dim_col A) (dim_col A) \<or> \<not> (\<forall>v. dim_vec v = dim_col A \<longrightarrow> 0 \<le> inner_prod v (A *\<^sub>v v))
[PROOF STEP]
unfolding positive_def
[PROOF STATE]
proof (prove)
using this:
\<not> (A \<in> carrier_mat (dim_col A) (dim_col A) \<and> (\<forall>v. dim_vec v = dim_col A \<longrightarrow> 0 \<le> inner_prod v (A *\<^sub>v v)))

goal (1 subgoal):
 1. A \<notin> carrier_mat (dim_col A) (dim_col A) \<or> \<not> (\<forall>v. dim_vec v = dim_col A \<longrightarrow> 0 \<le> inner_prod v (A *\<^sub>v v))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A \<notin> carrier_mat (dim_col A) (dim_col A) \<or> \<not> (\<forall>v. dim_vec v = dim_col A \<longrightarrow> 0 \<le> inner_prod v (A *\<^sub>v v))

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A \<notin> carrier_mat (dim_col A) (dim_col A) \<or> \<not> (\<forall>v. dim_vec v = dim_col A \<longrightarrow> 0 \<le> inner_prod v (A *\<^sub>v v))
[PROOF STEP]
have evA: "\<exists> v. dim_vec v = dim_col A \<and> \<not> inner_prod v (A *\<^sub>v v) \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
A \<notin> carrier_mat (dim_col A) (dim_col A) \<or> \<not> (\<forall>v. dim_vec v = dim_col A \<longrightarrow> 0 \<le> inner_prod v (A *\<^sub>v v))

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
using dimA
[PROOF STATE]
proof (prove)
using this:
A \<notin> carrier_mat (dim_col A) (dim_col A) \<or> \<not> (\<forall>v. dim_vec v = dim_col A \<longrightarrow> 0 \<le> inner_prod v (A *\<^sub>v v))
A \<in> carrier_mat m m

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
have "\<exists> v. dim_vec v = dim_col A \<and>  inner_prod v (A *\<^sub>v v) < 0"
[PROOF STATE]
proof (prove)
using this:
\<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<Longrightarrow> \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
obtain v where vA: "dim_vec v = dim_col A \<and> \<not> inner_prod v (A *\<^sub>v v) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using evA
[PROOF STATE]
proof (prove)
using this:
\<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. (\<And>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<Longrightarrow> \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
from vA herprod
[PROOF STATE]
proof (chain)
picking this:
dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)
\<forall>v. dim_vec v = dim_col A \<longrightarrow> inner_prod v (A *\<^sub>v v) \<in> \<real>
[PROOF STEP]
have "\<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<and> inner_prod v (A *\<^sub>v v) \<in> Reals"
[PROOF STATE]
proof (prove)
using this:
dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)
\<forall>v. dim_vec v = dim_col A \<longrightarrow> inner_prod v (A *\<^sub>v v) \<in> \<real>

goal (1 subgoal):
 1. \<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<and> inner_prod v (A *\<^sub>v v) \<in> \<real>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<and> inner_prod v (A *\<^sub>v v) \<in> \<real>

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<Longrightarrow> \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<and> inner_prod v (A *\<^sub>v v) \<in> \<real>
[PROOF STEP]
have "inner_prod v (A *\<^sub>v v) < 0"
[PROOF STATE]
proof (prove)
using this:
\<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<and> inner_prod v (A *\<^sub>v v) \<in> \<real>

goal (1 subgoal):
 1. inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
using complex_is_Real_iff
[PROOF STATE]
proof (prove)
using this:
\<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<and> inner_prod v (A *\<^sub>v v) \<in> \<real>
(?z \<in> \<real>) = (Im ?z = 0)

goal (1 subgoal):
 1. inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
by (auto simp: less_complex_def less_eq_complex_def)
[PROOF STATE]
proof (state)
this:
inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<Longrightarrow> \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
have  "\<exists> v. dim_vec v = dim_col A \<and>  inner_prod v (A *\<^sub>v v) < 0"
[PROOF STATE]
proof (prove)
using this:
inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
using vA
[PROOF STATE]
proof (prove)
using this:
inner_prod v (A *\<^sub>v v) < 0
dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> \<not> 0 \<le> inner_prod v (A *\<^sub>v v) \<Longrightarrow> \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
obtain v where neg: "dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0"
[PROOF STATE]
proof (prove)
using this:
\<exists>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. (\<And>v. dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
have   nzero: "v \<noteq> 0\<^sub>v m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<noteq> 0\<^sub>v m
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
assume nega: " \<not> v \<noteq> 0\<^sub>v m"
[PROOF STATE]
proof (state)
this:
\<not> v \<noteq> 0\<^sub>v m

goal (1 subgoal):
 1. \<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
have zero: "v = 0\<^sub>v m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v = 0\<^sub>v m
[PROOF STEP]
using nega
[PROOF STATE]
proof (prove)
using this:
\<not> v \<noteq> 0\<^sub>v m

goal (1 subgoal):
 1. v = 0\<^sub>v m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
v = 0\<^sub>v m

goal (1 subgoal):
 1. \<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
have "(A *\<^sub>v v) = 0\<^sub>v m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A *\<^sub>v v = 0\<^sub>v m
[PROOF STEP]
unfolding mult_mat_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec (dim_row A) (\<lambda>i. row A i \<bullet> v) = 0\<^sub>v m
[PROOF STEP]
using zero
[PROOF STATE]
proof (prove)
using this:
v = 0\<^sub>v m

goal (1 subgoal):
 1. vec (dim_row A) (\<lambda>i. row A i \<bullet> v) = 0\<^sub>v m
[PROOF STEP]
using dimA
[PROOF STATE]
proof (prove)
using this:
v = 0\<^sub>v m
A \<in> carrier_mat m m

goal (1 subgoal):
 1. vec (dim_row A) (\<lambda>i. row A i \<bullet> v) = 0\<^sub>v m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A *\<^sub>v v = 0\<^sub>v m

goal (1 subgoal):
 1. \<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A *\<^sub>v v = 0\<^sub>v m
[PROOF STEP]
have zerov: "inner_prod v (A *\<^sub>v v) = 0"
[PROOF STATE]
proof (prove)
using this:
A *\<^sub>v v = 0\<^sub>v m

goal (1 subgoal):
 1. inner_prod v (A *\<^sub>v v) = 0
[PROOF STEP]
by (simp add: zero)
[PROOF STATE]
proof (state)
this:
inner_prod v (A *\<^sub>v v) = 0

goal (1 subgoal):
 1. \<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
from neg zerov
[PROOF STATE]
proof (chain)
picking this:
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
inner_prod v (A *\<^sub>v v) = 0
[PROOF STEP]
have "\<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False"
[PROOF STATE]
proof (prove)
using this:
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
inner_prod v (A *\<^sub>v v) = 0

goal (1 subgoal):
 1. \<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
using dimA
[PROOF STATE]
proof (prove)
using this:
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
inner_prod v (A *\<^sub>v v) = 0
A \<in> carrier_mat m m

goal (1 subgoal):
 1. \<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False

goal (1 subgoal):
 1. \<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
with nega
[PROOF STATE]
proof (chain)
picking this:
\<not> v \<noteq> 0\<^sub>v m
\<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> v \<noteq> 0\<^sub>v m
\<not> v \<noteq> 0\<^sub>v m \<Longrightarrow> False

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
v \<noteq> 0\<^sub>v m

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
have invgeq: "inner_prod v v > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < inner_prod v v
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < inner_prod v v
[PROOF STEP]
have "inner_prod v v = vec_norm v * vec_norm v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v v = vec_norm v * vec_norm v
[PROOF STEP]
unfolding vec_norm_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v v = csqrt (inner_prod v v) * csqrt (inner_prod v v)
[PROOF STEP]
by (metis carrier_matD(2) carrier_vec_dim_vec dimA mult_cancel_left1 neg normalized_cscalar_prod normalized_vec_norm nzero vec_norm_def)
[PROOF STATE]
proof (state)
this:
inner_prod v v = vec_norm v * vec_norm v

goal (1 subgoal):
 1. 0 < inner_prod v v
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
inner_prod v v = vec_norm v * vec_norm v

goal (1 subgoal):
 1. 0 < inner_prod v v
[PROOF STEP]
have "vec_norm v > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < vec_norm v
[PROOF STEP]
using nzero vec_norm_ge_0 neg dimA
[PROOF STATE]
proof (prove)
using this:
v \<noteq> 0\<^sub>v m
\<lbrakk>?v \<in> carrier_vec ?n; ?v \<noteq> 0\<^sub>v ?n\<rbrakk> \<Longrightarrow> 0 < vec_norm ?v
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
A \<in> carrier_mat m m

goal (1 subgoal):
 1. 0 < vec_norm v
[PROOF STEP]
by (metis carrier_matD(2) carrier_vec_dim_vec)
[PROOF STATE]
proof (state)
this:
0 < vec_norm v

goal (1 subgoal):
 1. 0 < inner_prod v v
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
inner_prod v v = vec_norm v * vec_norm v
0 < vec_norm v
[PROOF STEP]
have "inner_prod v v > 0"
[PROOF STATE]
proof (prove)
using this:
inner_prod v v = vec_norm v * vec_norm v
0 < vec_norm v

goal (1 subgoal):
 1. 0 < inner_prod v v
[PROOF STEP]
by (auto simp: less_eq_complex_def less_complex_def)
[PROOF STATE]
proof (state)
this:
0 < inner_prod v v

goal (1 subgoal):
 1. 0 < inner_prod v v
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < inner_prod v v
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < inner_prod v v

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 < inner_prod v v

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
have invv: "inner_prod v v = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * (v $ i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
have "\<forall> i < m. conjugate (v $ i) * (v $ i) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<m. 0 \<le> conjugate (v $ i) * v $ i
[PROOF STEP]
using conjugate_square_smaller_0
[PROOF STATE]
proof (prove)
using this:
\<not> ?x * conjugate ?x < (0::?'a)

goal (1 subgoal):
 1. \<forall>i<m. 0 \<le> conjugate (v $ i) * v $ i
[PROOF STEP]
by (simp add: less_eq_complex_def)
[PROOF STATE]
proof (state)
this:
\<forall>i<m. 0 \<le> conjugate (v $ i) * v $ i

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<m. 0 \<le> conjugate (v $ i) * v $ i
[PROOF STEP]
have vi: "\<forall> i < m. conjugate (v $ i) * (v $ i) = cmod (conjugate (v $ i) * (v $ i))"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. 0 \<le> conjugate (v $ i) * v $ i

goal (1 subgoal):
 1. \<forall>i<m. conjugate (v $ i) * v $ i = complex_of_real (cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
using cmod_eq_Re
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. 0 \<le> conjugate (v $ i) * v $ i
Im ?z = 0 \<Longrightarrow> cmod ?z = \<bar>Re ?z\<bar>

goal (1 subgoal):
 1. \<forall>i<m. conjugate (v $ i) * v $ i = complex_of_real (cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
by (simp add: complex.expand)
[PROOF STATE]
proof (state)
this:
\<forall>i<m. conjugate (v $ i) * v $ i = complex_of_real (cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
have "inner_prod v v= (\<Sum>i = 0..<m. ((v $ i) * conjugate (v $ i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v v = (\<Sum>i = 0..<m. v $ i * conjugate (v $ i))
[PROOF STEP]
unfolding scalar_prod_def conjugate_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec (vec (dim_vec v) (\<lambda>i. conjugate (v $ i))). v $ i * vec (dim_vec v) (\<lambda>i. conjugate (v $ i)) $ i) = (\<Sum>i = 0..<m. v $ i * conjugate (v $ i))
[PROOF STEP]
using neg dimA
[PROOF STATE]
proof (prove)
using this:
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
A \<in> carrier_mat m m

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec (vec (dim_vec v) (\<lambda>i. conjugate (v $ i))). v $ i * vec (dim_vec v) (\<lambda>i. conjugate (v $ i)) $ i) = (\<Sum>i = 0..<m. v $ i * conjugate (v $ i))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod v v = (\<Sum>i = 0..<m. v $ i * conjugate (v $ i))

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
inner_prod v v = (\<Sum>i = 0..<m. v $ i * conjugate (v $ i))

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
have "\<dots> = (\<Sum>i = 0..<m. (conjugate (v $ i) * (v $ i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<m. v $ i * conjugate (v $ i)) = (\<Sum>i = 0..<m. conjugate (v $ i) * v $ i)
[PROOF STEP]
by (meson mult.commute)
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. v $ i * conjugate (v $ i)) = (\<Sum>i = 0..<m. conjugate (v $ i) * v $ i)

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. v $ i * conjugate (v $ i)) = (\<Sum>i = 0..<m. conjugate (v $ i) * v $ i)

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
have "\<dots> = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * (v $ i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<m. conjugate (v $ i) * v $ i) = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
using vi
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. conjugate (v $ i) * v $ i = complex_of_real (cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. conjugate (v $ i) * v $ i) = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. conjugate (v $ i) * v $ i) = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
have  "inner_prod v v = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * (v $ i)))"
[PROOF STATE]
proof (prove)
using this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
let ?r = "inner_prod v (A *\<^sub>v v)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
have rl: "?r < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
using neg
[PROOF STATE]
proof (prove)
using this:
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. inner_prod v (A *\<^sub>v v) < 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
have vAv: "inner_prod v (A *\<^sub>v v) =  (\<Sum>i=0..<m. (\<Sum>j=0..<m.
                conjugate (v$i) * A$$(i, j) * v$j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j)
[PROOF STEP]
using quadratic_form_mat dimA neg
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>dim_vec ?v = ?m; ?A \<in> carrier_mat ?m ?m\<rbrakk> \<Longrightarrow> inner_prod ?v (?A *\<^sub>v ?v) = (\<Sum>i = 0..<?m. \<Sum>j = 0..<?m. conjugate (?v $ i) * ?A $$ (i, j) * ?v $ j)
A \<in> carrier_mat m m
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
from limX
[PROOF STATE]
proof (chain)
picking this:
limit_mat X A m
[PROOF STEP]
have limij: "\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)"
[PROOF STATE]
proof (prove)
using this:
limit_mat X A m

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
[PROOF STEP]
unfolding limit_mat_def
[PROOF STATE]
proof (prove)
using this:
\<forall>n. X n \<in> carrier_mat m m \<and> A \<in> carrier_mat m m \<and> (\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j))

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
[PROOF STEP]
have limXv: "(\<lambda> n. inner_prod v ((X n) *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)

goal (1 subgoal):
 1. (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j) \<Longrightarrow> (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
have XAless: "cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le>
      (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
have "\<forall> i < m. \<forall> j < m. conjugate (v$i) * X n $$(i, j) * v$j - conjugate (v$i) * A$$(i, j) * v$j =
        conjugate (v$i) * (X n $$(i, j)-A$$(i, j)) * v$j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j = conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j
[PROOF STEP]
by (simp add: mult.commute right_diff_distrib)
[PROOF STATE]
proof (state)
this:
\<forall>i<m. \<forall>j<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j = conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<m. \<forall>j<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j = conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j
[PROOF STEP]
have ele: "\<forall> i < m.(\<Sum>j=0..<m.(conjugate (v$i) * X n $$(i, j) * v$j - conjugate (v$i) * A$$(i, j) * v$j)) = (\<Sum>j=0..<m.(
              conjugate (v$i) * (X n $$(i, j)-A$$(i, j)) * v$j))"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. \<forall>j<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j = conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j

goal (1 subgoal):
 1. \<forall>i<m. (\<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i<m. (\<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
have "\<forall> i < m. \<forall> j < m. cmod(conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) =
                cmod(conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod(v $ j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) = cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)
[PROOF STEP]
by (simp add: norm_mult)
[PROOF STATE]
proof (state)
this:
\<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) = cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) = cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)
[PROOF STEP]
have less: "\<forall> i < m.(\<Sum>j = 0..<m. cmod(conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)) =
                (\<Sum>j = 0..<m. cmod(conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod(v $ j))"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) = cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)

goal (1 subgoal):
 1. \<forall>i<m. (\<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)) = (\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i<m. (\<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)) = (\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
have "inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i=0..<m. (\<Sum>j=0..<m.
              conjugate (v$i) * X n $$(i, j) * v$j)) - (\<Sum>i=0..<m. (\<Sum>j=0..<m.
              conjugate (v$i) * A$$(i, j) * v$j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j) - (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j)
[PROOF STEP]
using quadratic_form_mat neg dimA dimX
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>dim_vec ?v = ?m; ?A \<in> carrier_mat ?m ?m\<rbrakk> \<Longrightarrow> inner_prod ?v (?A *\<^sub>v ?v) = (\<Sum>i = 0..<?m. \<Sum>j = 0..<?m. conjugate (?v $ i) * ?A $$ (i, j) * ?v $ j)
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0
A \<in> carrier_mat m m
\<forall>n. X n \<in> carrier_mat m m

goal (1 subgoal):
 1. inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j) - (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j) - (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j) - (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
have "\<dots> = (\<Sum>i=0..<m. (\<Sum>j=0..<m.(
              conjugate (v$i) * X n $$(i, j) * v$j - conjugate (v$i) * A$$(i, j) * v$j)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j) - (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j)
[PROOF STEP]
using sum_subtractff[of "\<lambda> i j. conjugate (v $ i) * X n $$ (i, j) * v $ j" "\<lambda> i j. conjugate (v $ i) * A $$ (i, j) * v $ j" "{0..<m}"]
[PROOF STATE]
proof (prove)
using this:
(\<Sum>x\<in>?A. \<Sum>y = 0..<m. conjugate (v $ x) * X n $$ (x, y) * v $ y - conjugate (v $ x) * A $$ (x, y) * v $ y) = (\<Sum>x\<in>?A. \<Sum>y = 0..<m. conjugate (v $ x) * X n $$ (x, y) * v $ y) - (\<Sum>x\<in>?A. \<Sum>y = 0..<m. conjugate (v $ x) * A $$ (x, y) * v $ y)

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j) - (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j) - (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j) - (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
have "\<dots> = (\<Sum>i=0..<m. (\<Sum>j=0..<m.(
              conjugate (v$i) * (X n $$(i, j)-A$$(i, j)) * v$j)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)
[PROOF STEP]
using ele
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. (\<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * X n $$ (i, j) * v $ j - conjugate (v $ i) * A $$ (i, j) * v $ j) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)
[PROOF STEP]
have minusXA: "inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)"
[PROOF STATE]
proof (prove)
using this:
inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)

goal (1 subgoal):
 1. inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
from minusXA
[PROOF STATE]
proof (chain)
picking this:
inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)
[PROOF STEP]
have "cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) =
              cmod (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)"
[PROOF STATE]
proof (prove)
using this:
inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
have "\<dots> \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod(conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j))
[PROOF STEP]
using sum_abs_complex
[PROOF STATE]
proof (prove)
using this:
cmod (\<Sum>x\<in>?A. sum (?h x) ?B) \<le> (\<Sum>x\<in>?A. \<Sum>y\<in>?B. cmod (?h x y))

goal (1 subgoal):
 1. cmod (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cmod (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j))

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod (\<Sum>i = 0..<m. \<Sum>j = 0..<m. conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j))

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
have "\<dots> = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod(conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod(v $ j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
using less
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. (\<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)) = (\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i) * (X n $$ (i, j) - A $$ (i, j)) * v $ j)) = (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))

goal (1 subgoal):
 1. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
cmod (inner_prod v (X ?n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X ?n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j) \<Longrightarrow> (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
from limij
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)
[PROOF STEP]
have limijm: " \<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j)

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r
[PROOF STEP]
unfolding LIMSEQ_def dist_norm
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j) \<Longrightarrow> (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
from limX
[PROOF STATE]
proof (chain)
picking this:
limit_mat X A m
[PROOF STEP]
have mg: "m > 0"
[PROOF STATE]
proof (prove)
using this:
limit_mat X A m

goal (1 subgoal):
 1. 0 < m
[PROOF STEP]
using limit_mat_def
[PROOF STATE]
proof (prove)
using this:
limit_mat X A m
limit_mat ?X ?A ?m = (\<forall>n. ?X n \<in> carrier_mat ?m ?m \<and> ?A \<in> carrier_mat ?m ?m \<and> (\<forall>i<?m. \<forall>j<?m. (\<lambda>n. ?X n $$ (i, j)) \<longlonglongrightarrow> ?A $$ (i, j)))

goal (1 subgoal):
 1. 0 < m
[PROOF STEP]
by (metis carrier_matD(1) carrier_matD(2) mat_eq_iff neq0_conv not_less0 npA posX)
[PROOF STATE]
proof (state)
this:
0 < m

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j) \<Longrightarrow> (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
have cmoda: "\<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r"
      if r: "r > 0" for r
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
let ?u = "(\<Sum>i = 0..<m. \<Sum>j = 0..<m.((cmod (conjugate (v $ i)) * cmod (v $ j))))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
have ug: "?u > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
have ur: "?u = (\<Sum>i = 0..<m. (cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m.( cmod (v $ j)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j)))
[PROOF STEP]
by (simp add: sum_distrib_left)
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j)))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
have "(\<Sum>j = 0..<m.( cmod (v $ j))) \<ge> cmod (v $ i)" if i: "i < m" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (v $ i) \<le> (\<Sum>j = 0..<m. cmod (v $ j))
[PROOF STEP]
using member_le_sum[of i "{0..<m}" "\<lambda> j. cmod (v$j)"] cmod_def i
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>i \<in> {0..<m}; \<And>x. x \<in> {0..<m} - {i} \<Longrightarrow> 0 \<le> cmod (v $ x); finite {0..<m}\<rbrakk> \<Longrightarrow> cmod (v $ i) \<le> (\<Sum>j = 0..<m. cmod (v $ j))
cmod ?z = sqrt ((Re ?z)\<^sup>2 + (Im ?z)\<^sup>2)
i < m

goal (1 subgoal):
 1. cmod (v $ i) \<le> (\<Sum>j = 0..<m. cmod (v $ j))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?i < m \<Longrightarrow> cmod (v $ ?i) \<le> (\<Sum>j = 0..<m. cmod (v $ j))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?i < m \<Longrightarrow> cmod (v $ ?i) \<le> (\<Sum>j = 0..<m. cmod (v $ j))
[PROOF STEP]
have "\<forall> i < m. (cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m.( cmod (v $ j)))) \<ge> (cmod (conjugate (v $ i)) * cmod (v $ i))"
[PROOF STATE]
proof (prove)
using this:
?i < m \<Longrightarrow> cmod (v $ ?i) \<le> (\<Sum>j = 0..<m. cmod (v $ j))

goal (1 subgoal):
 1. \<forall>i<m. cmod (conjugate (v $ i)) * cmod (v $ i) \<le> cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j))
[PROOF STEP]
by (simp add: mult_left_mono)
[PROOF STATE]
proof (state)
this:
\<forall>i<m. cmod (conjugate (v $ i)) * cmod (v $ i) \<le> cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<m. cmod (conjugate (v $ i)) * cmod (v $ i) \<le> cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j))
[PROOF STEP]
have "?u \<ge> (\<Sum>i = 0..<m. (cmod (conjugate (v $ i)) *cmod (v $ i)))"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. cmod (conjugate (v $ i)) * cmod (v $ i) \<le> cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j))

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ i)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
using ur sum_mono[of "{0..<m}" "\<lambda> i.  cmod (conjugate (v $ i)) * cmod (v $ i)" "\<lambda> i. cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j))"]
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. cmod (conjugate (v $ i)) * cmod (v $ i) \<le> cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j))
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j)))
(\<And>i. i \<in> {0..<m} \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (v $ i) \<le> cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ i)) \<le> (\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * (\<Sum>j = 0..<m. cmod (v $ j)))

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ i)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ i)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ i)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
have "(\<Sum>i = 0..<m. cmod (conjugate (v $ i)  *cmod (v $ i))) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * (v $ i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * complex_of_real (cmod (v $ i)))) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
using norm_ge_zero norm_mult norm_of_real
[PROOF STATE]
proof (prove)
using this:
0 \<le> norm ?x
norm (?x * ?y) = norm ?x * norm ?y
norm (of_real ?r) = \<bar>?r\<bar>

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * complex_of_real (cmod (v $ i)))) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
[PROOF STEP]
by (metis (no_types, opaque_lifting) abs_of_nonneg)
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. cmod (conjugate (v $ i) * complex_of_real (cmod (v $ i)))) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. cmod (conjugate (v $ i) * complex_of_real (cmod (v $ i)))) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
have "(\<Sum>i = 0..<m. cmod (conjugate (v $ i) * (v $ i))) = inner_prod v v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i)) = inner_prod v v
[PROOF STEP]
using invv
[PROOF STATE]
proof (prove)
using this:
inner_prod v v = complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))

goal (1 subgoal):
 1. complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i)) = inner_prod v v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i)) = inner_prod v v

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ i)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
(\<Sum>i = 0..<m. cmod (conjugate (v $ i) * complex_of_real (cmod (v $ i)))) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i)) = inner_prod v v
[PROOF STEP]
have "?u \<ge>  inner_prod v v"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ i)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
(\<Sum>i = 0..<m. cmod (conjugate (v $ i) * complex_of_real (cmod (v $ i)))) = (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i))
complex_of_real (\<Sum>i = 0..<m. cmod (conjugate (v $ i) * v $ i)) = inner_prod v v

goal (1 subgoal):
 1. inner_prod v v \<le> complex_of_real (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by (metis (no_types, lifting) Im_complex_of_real Re_complex_of_real invv less_eq_complex_def norm_mult sum.cong)
[PROOF STATE]
proof (state)
this:
inner_prod v v \<le> complex_of_real (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inner_prod v v \<le> complex_of_real (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
have "?u > 0"
[PROOF STATE]
proof (prove)
using this:
inner_prod v v \<le> complex_of_real (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
using invgeq
[PROOF STATE]
proof (prove)
using this:
inner_prod v v \<le> complex_of_real (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
0 < inner_prod v v

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by (auto simp: less_eq_complex_def less_complex_def)
[PROOF STATE]
proof (state)
this:
0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. 0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
let ?s = "r / (2 * ?u)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
have sgz: "?s > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
using ug rl
[PROOF STATE]
proof (prove)
using this:
0 < (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. 0 < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
by (smt divide_pos_pos dual_order.strict_iff_order linordered_semiring_strict_class.mult_pos_pos zero_less_norm_iff r)
[PROOF STATE]
proof (state)
this:
0 < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
from limijm
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r
[PROOF STEP]
have sij: "\<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < ?s" if i: "i < m" and j: "j < m" for i j
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
obtain N where Ns: "\<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < ?s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>N. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using sgz limijm i j
[PROOF STATE]
proof (prove)
using this:
0 < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
\<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r
i < m
j < m

goal (1 subgoal):
 1. (\<And>N. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (?i, ?j) - A $$ (?i, ?j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (?i, ?j) - A $$ (?i, ?j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
have "\<exists>no. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < ?s"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (?i, ?j) - A $$ (?i, ?j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. \<exists>no. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
using quantifier_change_order_twice[of m m "\<lambda> n i j. (cmod (X n $$ (i, j) - A $$ (i, j))<?s)"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i < m; ?j < m\<rbrakk> \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (?i, ?j) - A $$ (?i, ?j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
\<forall>i<m. \<forall>j<m. \<exists>no. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> \<exists>no. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. \<exists>no. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>no. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>no. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
obtain N where Nno: "\<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < ?s"
[PROOF STATE]
proof (prove)
using this:
\<exists>no. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>no. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. (\<And>N. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
have mmN: "cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)
                       \<le> ?s * (cmod (conjugate (v $ i)) * cmod (v $ j))"
        if i: "i < m" and j: "j < m" and n: "n \<ge> N" for i j n
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
have geq: "cmod (conjugate (v $ i)) \<ge> 0 \<and> cmod (v $ j)\<ge>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> cmod (conjugate (v $ i)) \<and> 0 \<le> cmod (v $ j)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> cmod (conjugate (v $ i)) \<and> 0 \<le> cmod (v $ j)

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> cmod (conjugate (v $ i)) \<and> 0 \<le> cmod (v $ j)
[PROOF STEP]
have "cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) \<le>cmod (conjugate (v $ i)) * ?s"
[PROOF STATE]
proof (prove)
using this:
0 \<le> cmod (conjugate (v $ i)) \<and> 0 \<le> cmod (v $ j)

goal (1 subgoal):
 1. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))))
[PROOF STEP]
using Nno i j n
[PROOF STATE]
proof (prove)
using this:
0 \<le> cmod (conjugate (v $ i)) \<and> 0 \<le> cmod (v $ j)
\<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))
i < m
j < m
N \<le> n

goal (1 subgoal):
 1. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))))
[PROOF STEP]
by (smt mult_left_mono)
[PROOF STATE]
proof (state)
this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))))

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))))
[PROOF STEP]
have "cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)
                    \<le> cmod (conjugate (v $ i)) *?s * cmod (v $ j)"
[PROOF STATE]
proof (prove)
using this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))))

goal (1 subgoal):
 1. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))) * cmod (v $ j)
[PROOF STEP]
using geq mult_right_mono
[PROOF STATE]
proof (prove)
using this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))))
0 \<le> cmod (conjugate (v $ i)) \<and> 0 \<le> cmod (v $ j)
\<lbrakk>?a \<le> ?b; (0::?'a) \<le> ?c\<rbrakk> \<Longrightarrow> ?a * ?c \<le> ?b * ?c

goal (1 subgoal):
 1. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))) * cmod (v $ j)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))) * cmod (v $ j)

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))) * cmod (v $ j)

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
have "\<dots> = ?s * (cmod (conjugate (v $ i)) * cmod (v $ j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))) * cmod (v $ j) = r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
cmod (conjugate (v $ i)) * (r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))) * cmod (v $ j) = r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. \<forall>n\<ge>N. cmod (X n $$ (i, j) - A $$ (i, j)) < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i < m; ?j < m; N \<le> ?n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ ?i)) * cmod (X ?n $$ (?i, ?j) - A $$ (?i, ?j)) * cmod (v $ ?j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ ?i)) * cmod (v $ ?j))

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?i < m; ?j < m; N \<le> ?n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ ?i)) * cmod (X ?n $$ (?i, ?j) - A $$ (?i, ?j)) * cmod (v $ ?j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ ?i)) * cmod (v $ ?j))
[PROOF STEP]
have "(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r"
        if n: "n \<ge> N" for n
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i < m; ?j < m; N \<le> ?n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ ?i)) * cmod (X ?n $$ (?i, ?j) - A $$ (?i, ?j)) * cmod (v $ ?j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ ?i)) * cmod (v $ ?j))

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>i j n. \<lbrakk>i < m; j < m; N \<le> n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
have mmX: "\<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)
                   \<le> ?s * (cmod (conjugate (v $ i)) * cmod (v $ j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
using n mmN
[PROOF STATE]
proof (prove)
using this:
N \<le> n
\<lbrakk>?i < m; ?j < m; N \<le> ?n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ ?i)) * cmod (X ?n $$ (?i, ?j) - A $$ (?i, ?j)) * cmod (v $ ?j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ ?i)) * cmod (v $ ?j))

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. (\<And>i j n. \<lbrakk>i < m; j < m; N \<le> n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
have "(\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
                   \<le> (\<Sum>j = 0..<m.(?s * (cmod (conjugate (v $ i)) * cmod (v $ j))))" if i: "i < m" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
have "\<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)
                 \<le> ?s * (cmod (conjugate (v $ i)) * cmod (v $ j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
using mmX i
[PROOF STATE]
proof (prove)
using this:
\<forall>i<m. \<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
i < m

goal (1 subgoal):
 1. \<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. (\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. (\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
using sum_mono[of "{0..<m}" "\<lambda> j. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)" "\<lambda> j. (?s * (cmod (conjugate (v $ i)) * cmod (v $ j)))"]
            atLeastLessThan_iff
[PROOF STATE]
proof (prove)
using this:
\<forall>j<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))
(\<And>ia. ia \<in> {0..<m} \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, ia) - A $$ (i, ia)) * cmod (v $ ia) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ ia))) \<Longrightarrow> (\<Sum>ia = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, ia) - A $$ (i, ia)) * cmod (v $ ia)) \<le> (\<Sum>ia = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ ia)))
(?i \<in> {?l..<?u}) = (?l \<le> ?i \<and> ?i < ?u)

goal (1 subgoal):
 1. (\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?i < m \<Longrightarrow> (\<Sum>j = 0..<m. cmod (conjugate (v $ ?i)) * cmod (X n $$ (?i, j) - A $$ (?i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ ?i)) * cmod (v $ j)))

goal (1 subgoal):
 1. (\<And>i j n. \<lbrakk>i < m; j < m; N \<le> n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?i < m \<Longrightarrow> (\<Sum>j = 0..<m. cmod (conjugate (v $ ?i)) * cmod (X n $$ (?i, j) - A $$ (?i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ ?i)) * cmod (v $ j)))
[PROOF STEP]
have "(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
                  \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m.(?s * (cmod (conjugate (v $ i)) * cmod (v $ j))))"
[PROOF STATE]
proof (prove)
using this:
?i < m \<Longrightarrow> (\<Sum>j = 0..<m. cmod (conjugate (v $ ?i)) * cmod (X n $$ (?i, j) - A $$ (?i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ ?i)) * cmod (v $ j)))

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
using sum_mono atLeastLessThan_iff
[PROOF STATE]
proof (prove)
using this:
?i < m \<Longrightarrow> (\<Sum>j = 0..<m. cmod (conjugate (v $ ?i)) * cmod (X n $$ (?i, j) - A $$ (?i, j)) * cmod (v $ j)) \<le> (\<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ ?i)) * cmod (v $ j)))
(\<And>i. i \<in> ?K \<Longrightarrow> ?f i \<le> ?g i) \<Longrightarrow> sum ?f ?K \<le> sum ?g ?K
(?i \<in> {?l..<?u}) = (?l \<le> ?i \<and> ?i < ?u)

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))
[PROOF STEP]
by (metis (no_types, lifting))
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. (\<And>i j n. \<lbrakk>i < m; j < m; N \<le> n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. (\<And>i j n. \<lbrakk>i < m; j < m; N \<le> n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
have "\<dots> = ?s * (\<Sum>i = 0..<m. \<Sum>j = 0..<m.((cmod (conjugate (v $ i)) * cmod (v $ j))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) = r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))
[PROOF STEP]
by (simp add: sum_distrib_left)
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) = r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. (\<And>i j n. \<lbrakk>i < m; j < m; N \<le> n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) = r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))

goal (1 subgoal):
 1. (\<And>i j n. \<lbrakk>i < m; j < m; N \<le> n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
have "\<dots> = r / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)) = r / 2
[PROOF STEP]
using nonzero_mult_divide_mult_cancel_right sgz
[PROOF STATE]
proof (prove)
using this:
?c \<noteq> (0::?'a) \<Longrightarrow> ?a * ?c / (?b * ?c) = ?a / ?b
0 < r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)))

goal (1 subgoal):
 1. r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)) = r / 2
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j)) = r / 2

goal (1 subgoal):
 1. (\<And>i j n. \<lbrakk>i < m; j < m; N \<le> n\<rbrakk> \<Longrightarrow> cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j) \<le> r / (2 * (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (v $ j))) * (cmod (conjugate (v $ i)) * cmod (v $ j))) \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> r / 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> r / 2

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
using r
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) \<le> r / 2
0 < r

goal (1 subgoal):
 1. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
N \<le> ?n \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X ?n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
N \<le> ?n \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X ?n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
N \<le> ?n \<Longrightarrow> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X ?n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 < ?r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < ?r

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j) \<Longrightarrow> (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < ?r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < ?r
[PROOF STEP]
have XnAv:"\<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r" if r: "r > 0" for r
[PROOF STATE]
proof (prove)
using this:
0 < ?r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < ?r

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r) \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
obtain no where nno: "\<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using r cmoda neg
[PROOF STATE]
proof (prove)
using this:
0 < r
0 < ?r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < ?r
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. (\<And>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r

goal (1 subgoal):
 1. (\<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r) \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
[PROOF STEP]
have "\<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r"
[PROOF STATE]
proof (prove)
using this:
\<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r

goal (1 subgoal):
 1. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
using XAless neg
[PROOF STATE]
proof (prove)
using this:
\<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r
cmod (inner_prod v (X ?n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) \<le> (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X ?n $$ (i, j) - A $$ (i, j)) * cmod (v $ j))
dim_vec v = dim_col A \<and> inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
by smt
[PROOF STATE]
proof (state)
this:
\<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r

goal (1 subgoal):
 1. (\<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. (\<Sum>i = 0..<m. \<Sum>j = 0..<m. cmod (conjugate (v $ i)) * cmod (X n $$ (i, j) - A $$ (i, j)) * cmod (v $ j)) < r) \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
0 < ?r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < ?r

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j) \<Longrightarrow> (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < ?r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < ?r
[PROOF STEP]
have "(\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)"
[PROOF STATE]
proof (prove)
using this:
0 < ?r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < ?r

goal (1 subgoal):
 1. (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
unfolding LIMSEQ_def dist_norm
[PROOF STATE]
proof (prove)
using this:
0 < ?r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < ?r

goal (1 subgoal):
 1. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<forall>i<m. \<forall>j<m. (\<lambda>n. X n $$ (i, j)) \<longlonglongrightarrow> A $$ (i, j) \<Longrightarrow> (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. (\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
from limXv
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)
[PROOF STEP]
have "\<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. inner_prod v (X n *\<^sub>v v)) \<longlonglongrightarrow> inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
unfolding LIMSEQ_def dist_norm
[PROOF STATE]
proof (prove)
using this:
\<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r

goal (1 subgoal):
 1. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
[PROOF STEP]
have "\<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < -?r"
[PROOF STATE]
proof (prove)
using this:
\<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
[PROOF STEP]
using rl
[PROOF STATE]
proof (prove)
using this:
\<forall>r>0. \<exists>no. \<forall>n\<ge>no. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < r
inner_prod v (A *\<^sub>v v) < 0

goal (1 subgoal):
 1. \<exists>no. \<forall>n\<ge>no. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
[PROOF STEP]
by (auto simp: less_eq_complex_def less_complex_def)
[PROOF STATE]
proof (state)
this:
\<exists>no. \<forall>n\<ge>no. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>no. \<forall>n\<ge>no. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
[PROOF STEP]
obtain N where Ng: "\<forall>n\<ge>N. cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < -?r"
[PROOF STATE]
proof (prove)
using this:
\<exists>no. \<forall>n\<ge>no. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. (\<And>N. \<forall>n\<ge>N. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>n\<ge>N. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>n\<ge>N. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
[PROOF STEP]
have XN: "cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) < -?r"
[PROOF STATE]
proof (prove)
using this:
\<forall>n\<ge>N. complex_of_real (cmod (inner_prod v (X n *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. complex_of_real (cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
complex_of_real (cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
from posX
[PROOF STATE]
proof (chain)
picking this:
\<forall>n. positive (X n)
[PROOF STEP]
have "positive (X N)"
[PROOF STATE]
proof (prove)
using this:
\<forall>n. positive (X n)

goal (1 subgoal):
 1. positive (X N)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
positive (X N)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
positive (X N)
[PROOF STEP]
have XNv:"inner_prod v (X N *\<^sub>v v) \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
positive (X N)

goal (1 subgoal):
 1. 0 \<le> inner_prod v (X N *\<^sub>v v)
[PROOF STEP]
by (metis Complex_Matrix.positive_def carrier_matD(2) dimA dimX neg)
[PROOF STATE]
proof (state)
this:
0 \<le> inner_prod v (X N *\<^sub>v v)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
from rl XNv
[PROOF STATE]
proof (chain)
picking this:
inner_prod v (A *\<^sub>v v) < 0
0 \<le> inner_prod v (X N *\<^sub>v v)
[PROOF STEP]
have XX: "cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod(inner_prod v (X N *\<^sub>v v)) - cmod(inner_prod v (A *\<^sub>v v))"
[PROOF STATE]
proof (prove)
using this:
inner_prod v (A *\<^sub>v v) < 0
0 \<le> inner_prod v (X N *\<^sub>v v)

goal (1 subgoal):
 1. cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))
[PROOF STEP]
using XN cmod_eq_Re
[PROOF STATE]
proof (prove)
using this:
inner_prod v (A *\<^sub>v v) < 0
0 \<le> inner_prod v (X N *\<^sub>v v)
complex_of_real (cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
Im ?z = 0 \<Longrightarrow> cmod ?z = \<bar>Re ?z\<bar>

goal (1 subgoal):
 1. cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))
[PROOF STEP]
by (auto simp: less_eq_complex_def less_complex_def)
[PROOF STATE]
proof (state)
this:
cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))
[PROOF STEP]
have YY: "cmod(inner_prod v (X N *\<^sub>v v)) - cmod(inner_prod v (A *\<^sub>v v)) < -?r"
[PROOF STATE]
proof (prove)
using this:
cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))

goal (1 subgoal):
 1. complex_of_real (cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
[PROOF STEP]
using XN
[PROOF STATE]
proof (prove)
using this:
cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))
complex_of_real (cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. complex_of_real (cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
complex_of_real (cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
complex_of_real (cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
[PROOF STEP]
have "cmod(inner_prod v (X N *\<^sub>v v)) - cmod(inner_prod v (A *\<^sub>v v)) < cmod(inner_prod v (A *\<^sub>v v))"
[PROOF STATE]
proof (prove)
using this:
complex_of_real (cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)

goal (1 subgoal):
 1. cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v)) < cmod (inner_prod v (A *\<^sub>v v))
[PROOF STEP]
using rl cmod_eq_Re
[PROOF STATE]
proof (prove)
using this:
complex_of_real (cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
inner_prod v (A *\<^sub>v v) < 0
Im ?z = 0 \<Longrightarrow> cmod ?z = \<bar>Re ?z\<bar>

goal (1 subgoal):
 1. cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v)) < cmod (inner_prod v (A *\<^sub>v v))
[PROOF STEP]
by (auto simp: less_eq_complex_def less_complex_def)
[PROOF STATE]
proof (state)
this:
cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v)) < cmod (inner_prod v (A *\<^sub>v v))

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v)) < cmod (inner_prod v (A *\<^sub>v v))
[PROOF STEP]
have  "cmod(inner_prod v (X N *\<^sub>v v)) < 0"
[PROOF STATE]
proof (prove)
using this:
cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v)) < cmod (inner_prod v (A *\<^sub>v v))

goal (1 subgoal):
 1. cmod (inner_prod v (X N *\<^sub>v v)) < 0
[PROOF STEP]
using XNv XX YY cmod_eq_Re
[PROOF STATE]
proof (prove)
using this:
cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v)) < cmod (inner_prod v (A *\<^sub>v v))
0 \<le> inner_prod v (X N *\<^sub>v v)
cmod (inner_prod v (X N *\<^sub>v v) - inner_prod v (A *\<^sub>v v)) = cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))
complex_of_real (cmod (inner_prod v (X N *\<^sub>v v)) - cmod (inner_prod v (A *\<^sub>v v))) < - inner_prod v (A *\<^sub>v v)
Im ?z = 0 \<Longrightarrow> cmod ?z = \<bar>Re ?z\<bar>

goal (1 subgoal):
 1. cmod (inner_prod v (X N *\<^sub>v v)) < 0
[PROOF STEP]
by (auto simp: less_eq_complex_def less_complex_def)
[PROOF STATE]
proof (state)
this:
cmod (inner_prod v (X N *\<^sub>v v)) < 0

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
cmod (inner_prod v (X N *\<^sub>v v)) < 0
[PROOF STEP]
have "False"
[PROOF STATE]
proof (prove)
using this:
cmod (inner_prod v (X N *\<^sub>v v)) < 0

goal (1 subgoal):
 1. False
[PROOF STEP]
using XNv
[PROOF STATE]
proof (prove)
using this:
cmod (inner_prod v (X N *\<^sub>v v)) < 0
0 \<le> inner_prod v (X N *\<^sub>v v)

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

goal (1 subgoal):
 1. \<not> positive A \<Longrightarrow> False
[PROOF STEP]
with npA
[PROOF STATE]
proof (chain)
picking this:
\<not> positive A
False
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<not> positive A
False

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

goal:
No subgoals!
[PROOF STEP]
qed