[STATEMENT]
lemma ln_ge_zero_imp_ge_one: "0 \<le> ln x \<Longrightarrow> 0 < x \<Longrightarrow> 1 \<le> x"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> ln x; 0 < x\<rbrakk> \<Longrightarrow> 1 \<le> x
[PROOF STEP]
using ln_le_cancel_iff [of 1 x]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < 1; 0 < x\<rbrakk> \<Longrightarrow> (ln 1 \<le> ln x) = (1 \<le> x)

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


[STATEMENT]
lemma nonzero_inverse_Qp:
  assumes "u \<in> nonzero Q\<^sub>p"
  shows "inv\<^bsub>Q\<^sub>p\<^esub> u \<in> nonzero Q\<^sub>p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv u \<in> nonzero Q\<^sub>p
[PROOF STEP]
using Units_eq_nonzero Units_inverse_Qp assms
[PROOF STATE]
proof (prove)
using this:
Units Q\<^sub>p = nonzero Q\<^sub>p
?u \<in> Units Q\<^sub>p \<Longrightarrow> inv ?u \<in> Units Q\<^sub>p
u \<in> nonzero Q\<^sub>p

goal (1 subgoal):
 1. inv u \<in> nonzero Q\<^sub>p
[PROOF STEP]
by auto


[STATEMENT]
lemma vintersection_function_mono:
  assumes "mono f"
  shows "f (A \<inter>\<^sub>\<circ> B) \<subseteq>\<^sub>\<circ> f A \<inter>\<^sub>\<circ> f B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (A \<inter>\<^sub>\<circ> B) \<subseteq>\<^sub>\<circ> f A \<inter>\<^sub>\<circ> f B
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
mono f

goal (1 subgoal):
 1. f (A \<inter>\<^sub>\<circ> B) \<subseteq>\<^sub>\<circ> f A \<inter>\<^sub>\<circ> f B
[PROOF STEP]
by (fact mono_inf)


[STATEMENT]
lemma subset_of_functions_of:
  assumes "finite A" "finite X" "card A = card X"
  shows "subset_of A (functions_of A X) = X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
finite A
finite X
card A = card X
[PROOF STEP]
obtain f where "f \<in> A \<rightarrow>\<^sub>E X" and "bij_betw f A X"
[PROOF STATE]
proof (prove)
using this:
finite A
finite X
card A = card X

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>f \<in> A \<rightarrow>\<^sub>E X; bij_betw f A X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using finite_same_card_bij_on_ext_funcset
[PROOF STATE]
proof (prove)
using this:
finite A
finite X
card A = card X
\<lbrakk>finite ?A; finite ?B; card ?A = card ?B\<rbrakk> \<Longrightarrow> \<exists>f. f \<in> ?A \<rightarrow>\<^sub>E ?B \<and> bij_betw f ?A ?B

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>f \<in> A \<rightarrow>\<^sub>E X; bij_betw f A X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f \<in> A \<rightarrow>\<^sub>E X
bij_betw f A X

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
f \<in> A \<rightarrow>\<^sub>E X
bij_betw f A X
[PROOF STEP]
have subset_of: "subset_of A (domain_permutation A X `` {f}) = f ` A"
[PROOF STATE]
proof (prove)
using this:
f \<in> A \<rightarrow>\<^sub>E X
bij_betw f A X

goal (1 subgoal):
 1. subset_of A (domain_permutation A X `` {f}) = f ` A
[PROOF STEP]
using equiv_domain_permutation image_respects_domain_permutation
[PROOF STATE]
proof (prove)
using this:
f \<in> A \<rightarrow>\<^sub>E X
bij_betw f A X
equiv (?A \<rightarrow>\<^sub>E ?B) (domain_permutation ?A ?B)
(\<lambda>f. f ` ?A) respects domain_permutation ?A ?B

goal (1 subgoal):
 1. subset_of A (domain_permutation A X `` {f}) = f ` A
[PROOF STEP]
unfolding subset_of_def
[PROOF STATE]
proof (prove)
using this:
f \<in> A \<rightarrow>\<^sub>E X
bij_betw f A X
equiv (?A \<rightarrow>\<^sub>E ?B) (domain_permutation ?A ?B)
(\<lambda>f. f ` ?A) respects domain_permutation ?A ?B

goal (1 subgoal):
 1. univ (\<lambda>f. f ` A) (domain_permutation A X `` {f}) = f ` A
[PROOF STEP]
by (intro univ_commute') auto
[PROOF STATE]
proof (state)
this:
subset_of A (domain_permutation A X `` {f}) = f ` A

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
from \<open>bij_betw f A X\<close>
[PROOF STATE]
proof (chain)
picking this:
bij_betw f A X
[PROOF STEP]
have "inj_on f A" and "f ` A = X"
[PROOF STATE]
proof (prove)
using this:
bij_betw f A X

goal (1 subgoal):
 1. inj_on f A &&& f ` A = X
[PROOF STEP]
by (auto simp add: bij_betw_def)
[PROOF STATE]
proof (state)
this:
inj_on f A
f ` A = X

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
have "subset_of A (functions_of A X) = subset_of A (functions_of A (f ` A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subset_of A (functions_of A X) = subset_of A (functions_of A (f ` A))
[PROOF STEP]
using \<open>f ` A = X\<close>
[PROOF STATE]
proof (prove)
using this:
f ` A = X

goal (1 subgoal):
 1. subset_of A (functions_of A X) = subset_of A (functions_of A (f ` A))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
subset_of A (functions_of A X) = subset_of A (functions_of A (f ` A))

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
subset_of A (functions_of A X) = subset_of A (functions_of A (f ` A))

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
have "\<dots> = subset_of A (domain_permutation A X `` {f})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subset_of A (functions_of A (f ` A)) = subset_of A (domain_permutation A X `` {f})
[PROOF STEP]
using \<open>finite A\<close> \<open>inj_on f A\<close> \<open>f \<in> A \<rightarrow>\<^sub>E X\<close>
[PROOF STATE]
proof (prove)
using this:
finite A
inj_on f A
f \<in> A \<rightarrow>\<^sub>E X

goal (1 subgoal):
 1. subset_of A (functions_of A (f ` A)) = subset_of A (domain_permutation A X `` {f})
[PROOF STEP]
by (auto simp add: functions_of_eq)
[PROOF STATE]
proof (state)
this:
subset_of A (functions_of A (f ` A)) = subset_of A (domain_permutation A X `` {f})

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
subset_of A (functions_of A (f ` A)) = subset_of A (domain_permutation A X `` {f})

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
have "\<dots> = f ` A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subset_of A (domain_permutation A X `` {f}) = f ` A
[PROOF STEP]
using \<open>inj_on f A\<close> \<open>f \<in> A \<rightarrow>\<^sub>E X\<close>
[PROOF STATE]
proof (prove)
using this:
inj_on f A
f \<in> A \<rightarrow>\<^sub>E X

goal (1 subgoal):
 1. subset_of A (domain_permutation A X `` {f}) = f ` A
[PROOF STEP]
by (simp add: subset_of)
[PROOF STATE]
proof (state)
this:
subset_of A (domain_permutation A X `` {f}) = f ` A

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
subset_of A (domain_permutation A X `` {f}) = f ` A

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
have "\<dots> = X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` A = X
[PROOF STEP]
using \<open>f ` A = X\<close>
[PROOF STATE]
proof (prove)
using this:
f ` A = X

goal (1 subgoal):
 1. f ` A = X
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f ` A = X

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

goal (1 subgoal):
 1. subset_of A (functions_of A X) = X
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
subset_of A (functions_of A X) = X

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Legacy_row_is_Matrix_row:
  assumes "i < mult.row_length A"
  shows "row A i = list_of_vec (Matrix.row (mat_of_cols_list (mult.row_length A) A) i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Matrix_Legacy.row A i = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i)
[PROOF STEP]
proof (rule nth_equalityI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. length (Matrix_Legacy.row A i) = length (list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i))
 2. \<And>ia. ia < length (Matrix_Legacy.row A i) \<Longrightarrow> Matrix_Legacy.row A i ! ia = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) ! ia
[PROOF STEP]
show "length (row A i) = length (list_of_vec (Matrix.row (mat_of_cols_list (mult.row_length A) A) i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (Matrix_Legacy.row A i) = length (list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i))
[PROOF STEP]
using row_def length_list_of_vec
[PROOF STATE]
proof (prove)
using this:
Matrix_Legacy.row ?m ?i \<equiv> map (\<lambda>w. w ! ?i) ?m
length (list_of_vec ?v) = dim_vec ?v

goal (1 subgoal):
 1. length (Matrix_Legacy.row A i) = length (list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i))
[PROOF STEP]
by(metis mat_of_cols_list_def dim_col_mat(1) index_row(2) length_map)
[PROOF STATE]
proof (state)
this:
length (Matrix_Legacy.row A i) = length (list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i))

goal (1 subgoal):
 1. \<And>ia. ia < length (Matrix_Legacy.row A i) \<Longrightarrow> Matrix_Legacy.row A i ! ia = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) ! ia
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>ia. ia < length (Matrix_Legacy.row A i) \<Longrightarrow> Matrix_Legacy.row A i ! ia = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) ! ia
[PROOF STEP]
fix j:: nat
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>ia. ia < length (Matrix_Legacy.row A i) \<Longrightarrow> Matrix_Legacy.row A i ! ia = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) ! ia
[PROOF STEP]
assume "j < length (row A i)"
[PROOF STATE]
proof (state)
this:
j < length (Matrix_Legacy.row A i)

goal (1 subgoal):
 1. \<And>ia. ia < length (Matrix_Legacy.row A i) \<Longrightarrow> Matrix_Legacy.row A i ! ia = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) ! ia
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
j < length (Matrix_Legacy.row A i)
[PROOF STEP]
show "row A i ! j = list_of_vec (Matrix.row (mat_of_cols_list (mult.row_length A) A) i) ! j"
[PROOF STATE]
proof (prove)
using this:
j < length (Matrix_Legacy.row A i)

goal (1 subgoal):
 1. Matrix_Legacy.row A i ! j = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) ! j
[PROOF STEP]
using assms index_mat_of_cols_list
[PROOF STATE]
proof (prove)
using this:
j < length (Matrix_Legacy.row A i)
i < mult.row_length A
\<lbrakk>?i < ?nr; ?j < length ?cs\<rbrakk> \<Longrightarrow> Tensor.mat_of_cols_list ?nr ?cs $$ (?i, ?j) = ?cs ! ?j ! ?i

goal (1 subgoal):
 1. Matrix_Legacy.row A i ! j = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) ! j
[PROOF STEP]
by(metis row_def mat_of_cols_list_def dim_col_mat(1) dim_row_mat(1) index_row(1) length_map list_of_vec_index nth_map)
[PROOF STATE]
proof (state)
this:
Matrix_Legacy.row A i ! j = list_of_vec (Matrix.row (Tensor.mat_of_cols_list (mult.row_length A) A) i) ! j

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma simple_set_image_id:
  assumes "\<forall>x\<in>X. f x = x"
  shows "Set.image f X = X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` X = X
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f ` X = X
[PROOF STEP]
have "Set.image f X = {f x |x. x \<in> X}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` X = {f x |x. x \<in> X}
[PROOF STEP]
by (simp add: Setcompr_eq_image)
[PROOF STATE]
proof (state)
this:
f ` X = {f x |x. x \<in> X}

goal (1 subgoal):
 1. f ` X = X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f ` X = {f x |x. x \<in> X}
[PROOF STEP]
have "... = {x |x. x \<in> X}"
[PROOF STATE]
proof (prove)
using this:
f ` X = {f x |x. x \<in> X}

goal (1 subgoal):
 1. {f x |x. x \<in> X} = {x |x. x \<in> X}
[PROOF STEP]
by (simp add: assms)
[PROOF STATE]
proof (state)
this:
{f x |x. x \<in> X} = {x |x. x \<in> X}

goal (1 subgoal):
 1. f ` X = X
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{f x |x. x \<in> X} = {x |x. x \<in> X}

goal (1 subgoal):
 1. f ` X = X
[PROOF STEP]
have "... = X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x |x. x \<in> X} = X
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
{x |x. x \<in> X} = X

goal (1 subgoal):
 1. f ` X = X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{x |x. x \<in> X} = X
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{x |x. x \<in> X} = X

goal (1 subgoal):
 1. f ` X = X
[PROOF STEP]
by (simp add: \<open>f ` X = {f x |x. x \<in> X}\<close> calculation)
[PROOF STATE]
proof (state)
this:
f ` X = X

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma T_mtf_ub: "\<forall>i<n. rs!i \<in> set s0 \<Longrightarrow> T_mtf n \<le> n * size s0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0)
[PROOF STEP]
proof(induction n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>i<0. rs ! i \<in> set s0 \<Longrightarrow> T_mtf 0 \<le> int (0 * length s0)
 2. \<And>n. \<lbrakk>\<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0); \<forall>i<Suc n. rs ! i \<in> set s0\<rbrakk> \<Longrightarrow> T_mtf (Suc n) \<le> int (Suc n * length s0)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
\<forall>i<0. rs ! i \<in> set s0

goal (2 subgoals):
 1. \<forall>i<0. rs ! i \<in> set s0 \<Longrightarrow> T_mtf 0 \<le> int (0 * length s0)
 2. \<And>n. \<lbrakk>\<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0); \<forall>i<Suc n. rs ! i \<in> set s0\<rbrakk> \<Longrightarrow> T_mtf (Suc n) \<le> int (Suc n * length s0)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T_mtf 0 \<le> int (0 * length s0)
[PROOF STEP]
by(simp add: T_mtf_def)
[PROOF STATE]
proof (state)
this:
T_mtf 0 \<le> int (0 * length s0)

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0); \<forall>i<Suc n. rs ! i \<in> set s0\<rbrakk> \<Longrightarrow> T_mtf (Suc n) \<le> int (Suc n * length s0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0); \<forall>i<Suc n. rs ! i \<in> set s0\<rbrakk> \<Longrightarrow> T_mtf (Suc n) \<le> int (Suc n * length s0)
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
\<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0)
\<forall>i<Suc n. rs ! i \<in> set s0

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0); \<forall>i<Suc n. rs ! i \<in> set s0\<rbrakk> \<Longrightarrow> T_mtf (Suc n) \<le> int (Suc n * length s0)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0)
\<forall>i<Suc n. rs ! i \<in> set s0

goal (1 subgoal):
 1. T_mtf (Suc n) \<le> int (Suc n * length s0)
[PROOF STEP]
using index_less_size_conv[of "s_mtf n" "rs!n"]
[PROOF STATE]
proof (prove)
using this:
\<forall>i<n. rs ! i \<in> set s0 \<Longrightarrow> T_mtf n \<le> int (n * length s0)
\<forall>i<Suc n. rs ! i \<in> set s0
(index (s_mtf n) (rs ! n) < length (s_mtf n)) = (rs ! n \<in> set (s_mtf n))

goal (1 subgoal):
 1. T_mtf (Suc n) \<le> int (Suc n * length s0)
[PROOF STEP]
by(simp add: T_mtf_def t_mtf_def less_Suc_eq del: index_less)
[PROOF STATE]
proof (state)
this:
T_mtf (Suc n) \<le> int (Suc n * length s0)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma conjugate_circline_set':
  shows "conjugate ` circline_set H \<subseteq> circline_set (conjugate_circline H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjugate ` circline_set H \<subseteq> circline_set (conjugate_circline H)
[PROOF STEP]
proof (safe)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. xa \<in> circline_set H \<Longrightarrow> conjugate xa \<in> circline_set (conjugate_circline H)
[PROOF STEP]
fix z
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. xa \<in> circline_set H \<Longrightarrow> conjugate xa \<in> circline_set (conjugate_circline H)
[PROOF STEP]
assume "z \<in> circline_set H"
[PROOF STATE]
proof (state)
this:
z \<in> circline_set H

goal (1 subgoal):
 1. \<And>x xa. xa \<in> circline_set H \<Longrightarrow> conjugate xa \<in> circline_set (conjugate_circline H)
[PROOF STEP]
thus "conjugate z \<in> circline_set (conjugate_circline H)"
[PROOF STATE]
proof (prove)
using this:
z \<in> circline_set H

goal (1 subgoal):
 1. conjugate z \<in> circline_set (conjugate_circline H)
[PROOF STEP]
unfolding circline_set_def
[PROOF STATE]
proof (prove)
using this:
z \<in> Collect (on_circline H)

goal (1 subgoal):
 1. conjugate z \<in> Collect (on_circline (conjugate_circline H))
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. on_circline H z \<Longrightarrow> on_circline (conjugate_circline H) (conjugate z)
[PROOF STEP]
apply (transfer, transfer)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>H z. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; z \<noteq> vec_zero; on_circline_cmat_cvec H z\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (conjugate_circline_cmat H) (conjugate_cvec z)
[PROOF STEP]
unfolding on_circline_cmat_cvec_def conjugate_cvec_def conjugate_circline_cmat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>H z. \<lbrakk>hermitean H \<and> H \<noteq> mat_zero; z \<noteq> vec_zero; quad_form z H = 0\<rbrakk> \<Longrightarrow> quad_form (vec_cnj z) (mat_cnj H) = 0
[PROOF STEP]
apply (subst quad_form_vec_cnj_mat_cnj, simp_all)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
conjugate z \<in> circline_set (conjugate_circline H)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma disjoint_family_Suc2:
  assumes Suc: "\<And>n. A (Suc n) \<subseteq> A n"
  shows "disjoint_family (\<lambda>i. A i - A (Suc i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjoint_family (\<lambda>i. A i - A (Suc i))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. disjoint_family (\<lambda>i. A i - A (Suc i))
[PROOF STEP]
have "A (m+n) \<subseteq> A n" for m n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A (m + n) \<subseteq> A n
[PROOF STEP]
proof (induct m)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A (0 + n) \<subseteq> A n
 2. \<And>m. A (m + n) \<subseteq> A n \<Longrightarrow> A (Suc m + n) \<subseteq> A n
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. A (0 + n) \<subseteq> A n
 2. \<And>m. A (m + n) \<subseteq> A n \<Longrightarrow> A (Suc m + n) \<subseteq> A n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A (0 + n) \<subseteq> A n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
A (0 + n) \<subseteq> A n

goal (1 subgoal):
 1. \<And>m. A (m + n) \<subseteq> A n \<Longrightarrow> A (Suc m + n) \<subseteq> A n
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. A (m + n) \<subseteq> A n \<Longrightarrow> A (Suc m + n) \<subseteq> A n
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
A (m + n) \<subseteq> A n

goal (1 subgoal):
 1. \<And>m. A (m + n) \<subseteq> A n \<Longrightarrow> A (Suc m + n) \<subseteq> A n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A (m + n) \<subseteq> A n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
A (m + n) \<subseteq> A n

goal (1 subgoal):
 1. A (Suc m + n) \<subseteq> A n
[PROOF STEP]
by (metis Suc_eq_plus1 assms add.commute add.left_commute subset_trans)
[PROOF STATE]
proof (state)
this:
A (Suc m + n) \<subseteq> A n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
A (?m + ?n) \<subseteq> A ?n

goal (1 subgoal):
 1. disjoint_family (\<lambda>i. A i - A (Suc i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A (?m + ?n) \<subseteq> A ?n
[PROOF STEP]
have "A m \<subseteq> A n" if "m > n" for m n
[PROOF STATE]
proof (prove)
using this:
A (?m + ?n) \<subseteq> A ?n

goal (1 subgoal):
 1. A m \<subseteq> A n
[PROOF STEP]
by (metis that add.commute le_add_diff_inverse nat_less_le)
[PROOF STATE]
proof (state)
this:
?n < ?m \<Longrightarrow> A ?m \<subseteq> A ?n

goal (1 subgoal):
 1. disjoint_family (\<lambda>i. A i - A (Suc i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?n < ?m \<Longrightarrow> A ?m \<subseteq> A ?n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?n < ?m \<Longrightarrow> A ?m \<subseteq> A ?n

goal (1 subgoal):
 1. disjoint_family (\<lambda>i. A i - A (Suc i))
[PROOF STEP]
by (auto simp add: disjoint_family_on_def)
       (metis insert_absorb insert_subset le_SucE le_antisym not_le_imp_less)
[PROOF STATE]
proof (state)
this:
disjoint_family (\<lambda>i. A i - A (Suc i))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma unitary_between_apply:
  fixes E F :: \<open>'a::chilbert_space set\<close>
  assumes \<open>is_onb E\<close> \<open>is_onb F\<close> \<open>e \<in> E\<close>
  shows \<open>unitary_between E F *\<^sub>V e = bij_between_bases E F e\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unitary_between E F *\<^sub>V e = bij_between_bases E F e
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. unitary_between E F *\<^sub>V e = bij_between_bases E F e
[PROOF STEP]
from \<open>is_onb E\<close> \<open>is_onb F\<close>
[PROOF STATE]
proof (chain)
picking this:
is_onb E
is_onb F
[PROOF STEP]
have EF: \<open>bij_between_bases E F e \<in> F\<close> if \<open>e \<in> E\<close> for e
[PROOF STATE]
proof (prove)
using this:
is_onb E
is_onb F

goal (1 subgoal):
 1. bij_between_bases E F e \<in> F
[PROOF STEP]
by (meson bij_betwE bij_between_bases_bij that)
[PROOF STATE]
proof (state)
this:
?e \<in> E \<Longrightarrow> bij_between_bases E F ?e \<in> F

goal (1 subgoal):
 1. unitary_between E F *\<^sub>V e = bij_between_bases E F e
[PROOF STEP]
have ortho: \<open>is_orthogonal (bij_between_bases E F x) (bij_between_bases E F y)\<close> if \<open>x \<noteq> y\<close> and \<open>x \<in> E\<close> and \<open>y \<in> E\<close> for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_orthogonal (bij_between_bases E F x) (bij_between_bases E F y)
[PROOF STEP]
by (smt (verit, del_insts) assms(1) assms(2) bij_betw_iff_bijections bij_between_bases_bij is_onb_def is_ortho_set_def that(1) that(2) that(3))
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<noteq> ?y; ?x \<in> E; ?y \<in> E\<rbrakk> \<Longrightarrow> is_orthogonal (bij_between_bases E F ?x) (bij_between_bases E F ?y)

goal (1 subgoal):
 1. unitary_between E F *\<^sub>V e = bij_between_bases E F e
[PROOF STEP]
have spanE: \<open>closure (cspan E) = UNIV\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closure (cspan E) = UNIV
[PROOF STEP]
by (metis assms(1) ccspan.rep_eq is_onb_def top_ccsubspace.rep_eq)
[PROOF STATE]
proof (state)
this:
closure (cspan E) = UNIV

goal (1 subgoal):
 1. unitary_between E F *\<^sub>V e = bij_between_bases E F e
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unitary_between E F *\<^sub>V e = bij_between_bases E F e
[PROOF STEP]
unfolding unitary_between_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cblinfun_extension E (bij_between_bases E F) *\<^sub>V e = bij_between_bases E F e
[PROOF STEP]
apply (rule cblinfun_extension_apply)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. cblinfun_extension_exists E (bij_between_bases E F)
 2. e \<in> E
[PROOF STEP]
apply (rule cblinfun_extension_exists_ortho[where B=1])
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. is_ortho_set E
 2. closure (cspan E) = UNIV
 3. \<And>x y. \<lbrakk>x \<in> E; y \<in> E; x \<noteq> y\<rbrakk> \<Longrightarrow> is_orthogonal (bij_between_bases E F x) (bij_between_bases E F y)
 4. \<And>x. x \<in> E \<Longrightarrow> norm (bij_between_bases E F x) \<le> 1 * norm x
 5. e \<in> E
[PROOF STEP]
using assms EF ortho spanE
[PROOF STATE]
proof (prove)
using this:
is_onb E
is_onb F
e \<in> E
?e \<in> E \<Longrightarrow> bij_between_bases E F ?e \<in> F
\<lbrakk>?x \<noteq> ?y; ?x \<in> E; ?y \<in> E\<rbrakk> \<Longrightarrow> is_orthogonal (bij_between_bases E F ?x) (bij_between_bases E F ?y)
closure (cspan E) = UNIV

goal (5 subgoals):
 1. is_ortho_set E
 2. closure (cspan E) = UNIV
 3. \<And>x y. \<lbrakk>x \<in> E; y \<in> E; x \<noteq> y\<rbrakk> \<Longrightarrow> is_orthogonal (bij_between_bases E F x) (bij_between_bases E F y)
 4. \<And>x. x \<in> E \<Longrightarrow> norm (bij_between_bases E F x) \<le> 1 * norm x
 5. e \<in> E
[PROOF STEP]
by (auto simp: is_onb_def)
[PROOF STATE]
proof (state)
this:
unitary_between E F *\<^sub>V e = bij_between_bases E F e

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_arg_max_eq_Max:
  assumes "finite (X :: 'c set)" "X \<noteq> {}"
  shows "(f :: 'c \<Rightarrow> real) (arg_max_on f X) = Max (f ` X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (arg_max_on f X) = Max (f ` X)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite X
X \<noteq> {}

goal (1 subgoal):
 1. f (arg_max_on f X) = Max (f ` X)
[PROOF STEP]
by (auto intro!: Max_eqI[symmetric] finite_arg_max_le arg_max_on_in)


[STATEMENT]
lemma diag_elem_indices_elem:
  assumes "a \<in> diag_elem_indices x B"
  shows "a < dim_row B \<and> B$$(a,a) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a < dim_row B \<and> B $$ (a, a) = x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<in> diag_elem_indices x B

goal (1 subgoal):
 1. a < dim_row B \<and> B $$ (a, a) = x
[PROOF STEP]
unfolding diag_elem_indices_def
[PROOF STATE]
proof (prove)
using this:
a \<in> {i |i. i < dim_row B \<and> B $$ (i, i) = x}

goal (1 subgoal):
 1. a < dim_row B \<and> B $$ (a, a) = x
[PROOF STEP]
by simp


[STATEMENT]
lemma card_ge_dim_independent:
  assumes BV: "B \<subseteq> V"
    and iB: "independent B"
    and dVB: "dim V \<le> card B"
  shows "V \<subseteq> span B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V \<subseteq> span B
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
assume aV: "a \<in> V"
[PROOF STATE]
proof (state)
this:
a \<in> V

goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
a \<in> V

goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
assume aB: "a \<notin> span B"
[PROOF STATE]
proof (state)
this:
a \<notin> span B

goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<notin> span B
[PROOF STEP]
have iaB: "independent (insert a B)"
[PROOF STATE]
proof (prove)
using this:
a \<notin> span B

goal (1 subgoal):
 1. independent (insert a B)
[PROOF STEP]
using iB aV BV
[PROOF STATE]
proof (prove)
using this:
a \<notin> span B
independent B
a \<in> V
B \<subseteq> V

goal (1 subgoal):
 1. independent (insert a B)
[PROOF STEP]
by (simp add: independent_insert)
[PROOF STATE]
proof (state)
this:
independent (insert a B)

goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
from aV BV
[PROOF STATE]
proof (chain)
picking this:
a \<in> V
B \<subseteq> V
[PROOF STEP]
have th0: "insert a B \<subseteq> V"
[PROOF STATE]
proof (prove)
using this:
a \<in> V
B \<subseteq> V

goal (1 subgoal):
 1. insert a B \<subseteq> V
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
insert a B \<subseteq> V

goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
from aB
[PROOF STATE]
proof (chain)
picking this:
a \<notin> span B
[PROOF STEP]
have "a \<notin>B"
[PROOF STATE]
proof (prove)
using this:
a \<notin> span B

goal (1 subgoal):
 1. a \<notin> B
[PROOF STEP]
by (auto simp add: span_base)
[PROOF STATE]
proof (state)
this:
a \<notin> B

goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
with independent_card_le_dim[OF th0 iaB] dVB finiteI_independent[OF iB]
[PROOF STATE]
proof (chain)
picking this:
card (insert a B) \<le> dim V
dim V \<le> card B
finite B
a \<notin> B
[PROOF STEP]
have False
[PROOF STATE]
proof (prove)
using this:
card (insert a B) \<le> dim V
dim V \<le> card B
finite B
a \<notin> B

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

goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
a \<notin> span B \<Longrightarrow> False

goal (1 subgoal):
 1. \<And>x. x \<in> V \<Longrightarrow> x \<in> span B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<notin> span B \<Longrightarrow> False
[PROOF STEP]
show "a \<in> span B"
[PROOF STATE]
proof (prove)
using this:
a \<notin> span B \<Longrightarrow> False

goal (1 subgoal):
 1. a \<in> span B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a \<in> span B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tl_listsN: "A \<subseteq> listsN (n + 1) S \<Longrightarrow> tl ` A \<subseteq> listsN n S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> listsN (n + 1) S \<Longrightarrow> tl ` A \<subseteq> listsN n S
[PROOF STEP]
proof (intro image_subsetI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>A \<subseteq> listsN (n + 1) S; x \<in> A\<rbrakk> \<Longrightarrow> tl x \<in> listsN n S
[PROOF STEP]
fix xs
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>A \<subseteq> listsN (n + 1) S; x \<in> A\<rbrakk> \<Longrightarrow> tl x \<in> listsN n S
[PROOF STEP]
assume "A \<subseteq> listsN (n + 1) S" "xs \<in> A"
[PROOF STATE]
proof (state)
this:
A \<subseteq> listsN (n + 1) S
xs \<in> A

goal (1 subgoal):
 1. \<And>x. \<lbrakk>A \<subseteq> listsN (n + 1) S; x \<in> A\<rbrakk> \<Longrightarrow> tl x \<in> listsN n S
[PROOF STEP]
thus "tl xs \<in> listsN n S"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> listsN (n + 1) S
xs \<in> A

goal (1 subgoal):
 1. tl xs \<in> listsN n S
[PROOF STEP]
by (induct xs) auto
[PROOF STATE]
proof (state)
this:
tl xs \<in> listsN n S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma geometric_sums_times_n:
  fixes c::"'a::{banach,real_normed_field}"
  assumes "norm c < 1"
  shows "(\<lambda>n. c^n * of_nat n) sums (c / (1 - c)\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
have "(\<lambda>n. c * z ^ n) sums (c / (1 - z))" if "norm z < 1" for z
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. c * z ^ n) sums (c / ((1::'a) - z))
[PROOF STEP]
using geometric_sums sums_mult that
[PROOF STATE]
proof (prove)
using this:
norm ?c < 1 \<Longrightarrow> (^) ?c sums ((1::?'a) / ((1::?'a) - ?c))
?f sums ?a \<Longrightarrow> (\<lambda>n. ?c * ?f n) sums (?c * ?a)
norm z < 1

goal (1 subgoal):
 1. (\<lambda>n. c * z ^ n) sums (c / ((1::'a) - z))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
norm ?z < 1 \<Longrightarrow> (\<lambda>n. c * ?z ^ n) sums (c / ((1::'a) - ?z))

goal (1 subgoal):
 1. (\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
norm ?z < 1 \<Longrightarrow> (\<lambda>n. c * ?z ^ n) sums (c / ((1::'a) - ?z))

goal (1 subgoal):
 1. (\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
have "((\<lambda>z. c / (1 - z)) has_field_derivative (c / (1 - c)\<^sup>2)) (at c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>z. c / ((1::'a) - z)) has_field_derivative c / ((1::'a) - c)\<^sup>2) (at c)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
norm c < 1

goal (1 subgoal):
 1. ((\<lambda>z. c / ((1::'a) - z)) has_field_derivative c / ((1::'a) - c)\<^sup>2) (at c)
[PROOF STEP]
by (auto intro!: derivative_eq_intros simp add: semiring_normalization_rules)
[PROOF STATE]
proof (state)
this:
((\<lambda>z. c / ((1::'a) - z)) has_field_derivative c / ((1::'a) - c)\<^sup>2) (at c)

goal (1 subgoal):
 1. (\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
norm ?z < 1 \<Longrightarrow> (\<lambda>n. c * ?z ^ n) sums (c / ((1::'a) - ?z))
((\<lambda>z. c / ((1::'a) - z)) has_field_derivative c / ((1::'a) - c)\<^sup>2) (at c)
[PROOF STEP]
have "(\<lambda>n. diffs (\<lambda>n. c) n * c ^ n) sums (c / (1 - c)\<^sup>2)"
[PROOF STATE]
proof (prove)
using this:
norm ?z < 1 \<Longrightarrow> (\<lambda>n. c * ?z ^ n) sums (c / ((1::'a) - ?z))
((\<lambda>z. c / ((1::'a) - z)) has_field_derivative c / ((1::'a) - c)\<^sup>2) (at c)

goal (1 subgoal):
 1. (\<lambda>n. diffs (\<lambda>n. c) n * c ^ n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
norm ?z < 1 \<Longrightarrow> (\<lambda>n. c * ?z ^ n) sums (c / ((1::'a) - ?z))
((\<lambda>z. c / ((1::'a) - z)) has_field_derivative c / ((1::'a) - c)\<^sup>2) (at c)
norm c < 1

goal (1 subgoal):
 1. (\<lambda>n. diffs (\<lambda>n. c) n * c ^ n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
by (intro termdiffs_sums_strong)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. diffs (\<lambda>n. c) n * c ^ n) sums (c / ((1::'a) - c)\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. diffs (\<lambda>n. c) n * c ^ n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
have "(\<lambda>n. of_nat (Suc n) * c ^ (Suc n)) sums (c / (1 - c)\<^sup>2)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. diffs (\<lambda>n. c) n * c ^ n) sums (c / ((1::'a) - c)\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>n. of_nat (Suc n) * c ^ Suc n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
unfolding diffs_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. of_nat (Suc n) * c * c ^ n) sums (c / ((1::'a) - c)\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>n. of_nat (Suc n) * c ^ Suc n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
by (simp add: power_eq_if mult.assoc)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. of_nat (Suc n) * c ^ Suc n) sums (c / ((1::'a) - c)\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. of_nat (Suc n) * c ^ Suc n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. of_nat (Suc n) * c ^ Suc n) sums (c / ((1::'a) - c)\<^sup>2)

goal (1 subgoal):
 1. (\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)
[PROOF STEP]
by (subst (asm) sums_Suc_iff) (auto simp add: mult.commute)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. c ^ n * of_nat n) sums (c / ((1::'a) - c)\<^sup>2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem interval_integral_FTC2:
  fixes a b c :: real and f :: "real \<Rightarrow> 'a::euclidean_space"
  assumes "a \<le> c" "c \<le> b"
  and contf: "continuous_on {a..b} f"
  fixes x :: real
  assumes "a \<le> x" and "x \<le> b"
  shows "((\<lambda>u. LBINT y=c..u. f y) has_vector_derivative (f x)) (at x within {a..b})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
let ?F = "(\<lambda>u. LBINT y=a..u. f y)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
have intf: "set_integrable lborel {a..b} f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_integrable lborel {a..b} f
[PROOF STEP]
by (rule borel_integrable_atLeastAtMost', rule contf)
[PROOF STATE]
proof (state)
this:
set_integrable lborel {a..b} f

goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
have "((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
using \<open>a \<le> x\<close> \<open>x \<le> b\<close>
[PROOF STATE]
proof (prove)
using this:
a \<le> x
x \<le> b

goal (1 subgoal):
 1. ((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
by (auto intro: integral_has_vector_derivative continuous_on_subset [OF contf])
[PROOF STATE]
proof (state)
this:
((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})

goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
have "((\<lambda>u. integral {a..u} f) has_vector_derivative (f x)) (at x within {a..b})"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})

goal (1 subgoal):
 1. ((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})

goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
have "(?F has_vector_derivative (f x)) (at x within {a..b})"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>u. integral {a..u} f) has_vector_derivative f x) (at x within {a..b})

goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal a) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
by (rule has_vector_derivative_weaken)
       (auto intro!: assms interval_integral_eq_integral[symmetric] set_integrable_subset [OF intf])
[PROOF STATE]
proof (state)
this:
((\<lambda>x. interval_lebesgue_integral lborel (ereal a) (ereal x) f) has_vector_derivative f x) (at x within {a..b})

goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. interval_lebesgue_integral lborel (ereal a) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
have "((\<lambda>x. (LBINT y=c..a. f y) + ?F x) has_vector_derivative (f x)) (at x within {a..b})"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. interval_lebesgue_integral lborel (ereal a) (ereal x) f) has_vector_derivative f x) (at x within {a..b})

goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
by (auto intro!: derivative_eq_intros)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal x) f) has_vector_derivative f x) (at x within {a..b})

goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal x) f) has_vector_derivative f x) (at x within {a..b})

goal (1 subgoal):
 1. ((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})
[PROOF STEP]
proof (rule has_vector_derivative_weaken)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. x \<in> {a..b}
 2. {a..b} \<subseteq> {a..b}
 3. \<And>x. x \<in> {a..b} \<Longrightarrow> interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal x) f = interval_lebesgue_integral lborel (ereal c) (ereal x) f
[PROOF STEP]
fix u
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. x \<in> {a..b}
 2. {a..b} \<subseteq> {a..b}
 3. \<And>x. x \<in> {a..b} \<Longrightarrow> interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal x) f = interval_lebesgue_integral lborel (ereal c) (ereal x) f
[PROOF STEP]
assume "u \<in> {a .. b}"
[PROOF STATE]
proof (state)
this:
u \<in> {a..b}

goal (3 subgoals):
 1. x \<in> {a..b}
 2. {a..b} \<subseteq> {a..b}
 3. \<And>x. x \<in> {a..b} \<Longrightarrow> interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal x) f = interval_lebesgue_integral lborel (ereal c) (ereal x) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u \<in> {a..b}
[PROOF STEP]
show "(LBINT y=c..a. f y) + (LBINT y=a..u. f y) = (LBINT y=c..u. f y)"
[PROOF STATE]
proof (prove)
using this:
u \<in> {a..b}

goal (1 subgoal):
 1. interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal u) f = interval_lebesgue_integral lborel (ereal c) (ereal u) f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
u \<in> {a..b}
a \<le> c
c \<le> b
continuous_on {a..b} f
a \<le> x
x \<le> b

goal (1 subgoal):
 1. interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal u) f = interval_lebesgue_integral lborel (ereal c) (ereal u) f
[PROOF STEP]
apply (intro interval_integral_sum)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<in> {a..b}; a \<le> c; c \<le> b; continuous_on {a..b} f; a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> interval_lebesgue_integrable lborel (min (ereal c) (min (ereal a) (ereal u))) (max (ereal c) (max (ereal a) (ereal u))) f
[PROOF STEP]
apply (auto simp: interval_lebesgue_integrable_def simp del: real_scaleR_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a \<le> c; c \<le> b; continuous_on {a..b} f; a \<le> x; x \<le> b; a \<le> u; u \<le> b; ereal a \<le> max (ereal c) (ereal u)\<rbrakk> \<Longrightarrow> set_integrable lborel (einterval (ereal a) (max (ereal c) (ereal u))) f
 2. \<lbrakk>a \<le> c; c \<le> b; continuous_on {a..b} f; a \<le> x; x \<le> b; a \<le> u; u \<le> b; \<not> ereal a \<le> max (ereal c) (ereal u)\<rbrakk> \<Longrightarrow> set_integrable lborel (einterval (max (ereal c) (ereal u)) (ereal a)) f
[PROOF STEP]
by (rule set_integrable_subset [OF intf], auto simp: min_def max_def)
[PROOF STATE]
proof (state)
this:
interval_lebesgue_integral lborel (ereal c) (ereal a) f + interval_lebesgue_integral lborel (ereal a) (ereal u) f = interval_lebesgue_integral lborel (ereal c) (ereal u) f

goal (2 subgoals):
 1. x \<in> {a..b}
 2. {a..b} \<subseteq> {a..b}
[PROOF STEP]
qed (insert assms, auto)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. interval_lebesgue_integral lborel (ereal c) (ereal x) f) has_vector_derivative f x) (at x within {a..b})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma r01_binary_expression_ex0:
  assumes "0 < r" "r < 1"
  shows "\<exists>i.  r01_binary_expansion' r i = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>i. r01_binary_expansion' r i = 0
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<nexists>i. r01_binary_expansion' r i = 0 \<Longrightarrow> False
[PROOF STEP]
assume "\<not> (\<exists> i. r01_binary_expansion' r i = 0)"
[PROOF STATE]
proof (state)
this:
\<nexists>i. r01_binary_expansion' r i = 0

goal (1 subgoal):
 1. \<nexists>i. r01_binary_expansion' r i = 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nexists>i. r01_binary_expansion' r i = 0
[PROOF STEP]
have "\<And>i. r01_binary_expansion' r i = 1"
[PROOF STATE]
proof (prove)
using this:
\<nexists>i. r01_binary_expansion' r i = 0

goal (1 subgoal):
 1. \<And>i. r01_binary_expansion' r i = 1
[PROOF STEP]
using real01_binary_expansion'_0or1[of r]
[PROOF STATE]
proof (prove)
using this:
\<nexists>i. r01_binary_expansion' r i = 0
r01_binary_expansion' r ?n \<in> {0, 1}

goal (1 subgoal):
 1. \<And>i. r01_binary_expansion' r i = 1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
r01_binary_expansion' r ?i = 1

goal (1 subgoal):
 1. \<nexists>i. r01_binary_expansion' r i = 0 \<Longrightarrow> False
[PROOF STEP]
hence 1:"r01_binary_expression r = (\<lambda>n. \<Sum>i=0..n. ((1/2)^(Suc i)))"
[PROOF STATE]
proof (prove)
using this:
r01_binary_expansion' r ?i = 1

goal (1 subgoal):
 1. r01_binary_expression r = (\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i)
[PROOF STEP]
by(auto simp: r01_binary_expression_def r01_binary_sum_def)
[PROOF STATE]
proof (state)
this:
r01_binary_expression r = (\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i)

goal (1 subgoal):
 1. \<nexists>i. r01_binary_expansion' r i = 0 \<Longrightarrow> False
[PROOF STEP]
have "LIMSEQ (r01_binary_expression r)  1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r01_binary_expression r \<longlonglongrightarrow> 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. r01_binary_expression r \<longlonglongrightarrow> 1
[PROOF STEP]
have "LIMSEQ (\<lambda>n. \<Sum>i=0..n. (((1::real)/2)^(Suc i))) 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i) \<longlonglongrightarrow> 1
[PROOF STEP]
using power_half_series sums_def'[of "\<lambda>n. ((1::real)/2)^(Suc n)" 1]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. (1 / 2) ^ Suc n) sums 1
(\<lambda>n. (1 / 2) ^ Suc n) sums 1 = (\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i) \<longlonglongrightarrow> 1

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i) \<longlonglongrightarrow> 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i) \<longlonglongrightarrow> 1

goal (1 subgoal):
 1. r01_binary_expression r \<longlonglongrightarrow> 1
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i) \<longlonglongrightarrow> 1

goal (1 subgoal):
 1. r01_binary_expression r \<longlonglongrightarrow> 1
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i) \<longlonglongrightarrow> 1
r01_binary_expression r = (\<lambda>n. \<Sum>i = 0..n. (1 / 2) ^ Suc i)

goal (1 subgoal):
 1. r01_binary_expression r \<longlonglongrightarrow> 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
r01_binary_expression r \<longlonglongrightarrow> 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
r01_binary_expression r \<longlonglongrightarrow> 1

goal (1 subgoal):
 1. \<nexists>i. r01_binary_expansion' r i = 0 \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
r01_binary_expression r \<longlonglongrightarrow> 1

goal (1 subgoal):
 1. \<nexists>i. r01_binary_expansion' r i = 0 \<Longrightarrow> False
[PROOF STEP]
have "LIMSEQ (r01_binary_expression r) r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r01_binary_expression r \<longlonglongrightarrow> r
[PROOF STEP]
using r01_binary_expression_converges_to_r[of r] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < r; r < 1\<rbrakk> \<Longrightarrow> r01_binary_expression r \<longlonglongrightarrow> r
0 < r
r < 1

goal (1 subgoal):
 1. r01_binary_expression r \<longlonglongrightarrow> r
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
r01_binary_expression r \<longlonglongrightarrow> r

goal (1 subgoal):
 1. \<nexists>i. r01_binary_expansion' r i = 0 \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
r01_binary_expression r \<longlonglongrightarrow> 1
r01_binary_expression r \<longlonglongrightarrow> r
[PROOF STEP]
have "r = 1"
[PROOF STATE]
proof (prove)
using this:
r01_binary_expression r \<longlonglongrightarrow> 1
r01_binary_expression r \<longlonglongrightarrow> r

goal (1 subgoal):
 1. r = 1
[PROOF STEP]
using LIMSEQ_unique
[PROOF STATE]
proof (prove)
using this:
r01_binary_expression r \<longlonglongrightarrow> 1
r01_binary_expression r \<longlonglongrightarrow> r
\<lbrakk>?X \<longlonglongrightarrow> ?a; ?X \<longlonglongrightarrow> ?b\<rbrakk> \<Longrightarrow> ?a = ?b

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

goal (1 subgoal):
 1. \<nexists>i. r01_binary_expansion' r i = 0 \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
r = 1

goal (1 subgoal):
 1. False
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
r = 1
0 < r
r < 1

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lzip_iterates:
  "lzip (iterates f x) (iterates g y) = iterates (\<lambda>(x, y). (f x, g y)) (x, y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lzip (iterates f x) (iterates g y) = iterates (\<lambda>(x, y). (f x, g y)) (x, y)
[PROOF STEP]
by(coinduction arbitrary: x y) auto


[STATEMENT]
lemma lt_implies_mask:
  fixes a b :: nat
  assumes "\<exists>k. a < 2^k \<and> (\<forall>r<k. nth_bit b r = 1)" (* this means a < b and b = xx11..11 *)
  shows "a \<preceq> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<preceq> b
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a \<preceq> b
[PROOF STEP]
obtain k where assms: "a < 2^k \<and> (\<forall>r<k. nth_bit b r = 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k. a < 2 ^ k \<and> (\<forall>r<k. b \<exclamdown> r = 1) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<exists>k. a < 2 ^ k \<and> (\<forall>r<k. b \<exclamdown> r = 1)

goal (1 subgoal):
 1. (\<And>k. a < 2 ^ k \<and> (\<forall>r<k. b \<exclamdown> r = 1) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a < 2 ^ k \<and> (\<forall>r<k. b \<exclamdown> r = 1)

goal (1 subgoal):
 1. a \<preceq> b
[PROOF STEP]
have k1: "\<forall>r<k. a \<exclamdown> r \<le> b \<exclamdown> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>r<k. a \<exclamdown> r \<le> b \<exclamdown> r
[PROOF STEP]
using nth_bit_bounded
[PROOF STATE]
proof (prove)
using this:
?a \<exclamdown> ?k \<le> 1

goal (1 subgoal):
 1. \<forall>r<k. a \<exclamdown> r \<le> b \<exclamdown> r
[PROOF STEP]
by (simp add: \<open>a < 2 ^ k \<and> (\<forall>r<k. b \<exclamdown> r = 1)\<close>)
[PROOF STATE]
proof (state)
this:
\<forall>r<k. a \<exclamdown> r \<le> b \<exclamdown> r

goal (1 subgoal):
 1. a \<preceq> b
[PROOF STEP]
hence k2: "\<forall>r\<ge>k. a \<exclamdown> r = 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>r<k. a \<exclamdown> r \<le> b \<exclamdown> r

goal (1 subgoal):
 1. \<forall>r\<ge>k. a \<exclamdown> r = 0
[PROOF STEP]
using aux_lt_implies_mask assms
[PROOF STATE]
proof (prove)
using this:
\<forall>r<k. a \<exclamdown> r \<le> b \<exclamdown> r
?a < 2 ^ ?k \<Longrightarrow> \<forall>r\<ge>?k. ?a \<exclamdown> r = 0
a < 2 ^ k \<and> (\<forall>r<k. b \<exclamdown> r = 1)

goal (1 subgoal):
 1. \<forall>r\<ge>k. a \<exclamdown> r = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>r\<ge>k. a \<exclamdown> r = 0

goal (1 subgoal):
 1. a \<preceq> b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<preceq> b
[PROOF STEP]
using masks_leq_equiv
[PROOF STATE]
proof (prove)
using this:
(?a \<preceq> ?b) = (\<forall>k. ?a \<exclamdown> k \<le> ?b \<exclamdown> k)

goal (1 subgoal):
 1. a \<preceq> b
[PROOF STEP]
by auto (metis k1 k2 le0 not_less)
[PROOF STATE]
proof (state)
this:
a \<preceq> b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma distinct_smult_nonneg: fixes c :: "'a :: field"
  assumes c: "c \<noteq> 0"
  shows "distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC)
[PROOF STEP]
proof (induction lC)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. distinct [] \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) [])
 2. \<And>a lC. \<lbrakk>distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC); distinct (a # lC)\<rbrakk> \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) (a # lC))
[PROOF STEP]
case (Cons v lC)
[PROOF STATE]
proof (state)
this:
distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC)
distinct (v # lC)

goal (2 subgoals):
 1. distinct [] \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) [])
 2. \<And>a lC. \<lbrakk>distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC); distinct (a # lC)\<rbrakk> \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) (a # lC))
[PROOF STEP]
from Cons.prems
[PROOF STATE]
proof (chain)
picking this:
distinct (v # lC)
[PROOF STEP]
have "v \<notin> set lC"
[PROOF STATE]
proof (prove)
using this:
distinct (v # lC)

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

goal (2 subgoals):
 1. distinct [] \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) [])
 2. \<And>a lC. \<lbrakk>distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC); distinct (a # lC)\<rbrakk> \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) (a # lC))
[PROOF STEP]
hence "c \<cdot>\<^sub>v v \<notin> set (map ((\<cdot>\<^sub>v) c) lC)"
[PROOF STATE]
proof (prove)
using this:
v \<notin> set lC

goal (1 subgoal):
 1. c \<cdot>\<^sub>v v \<notin> set (map ((\<cdot>\<^sub>v) c) lC)
[PROOF STEP]
using smult_vec_nonneg_eq[OF c]
[PROOF STATE]
proof (prove)
using this:
v \<notin> set lC
(c \<cdot>\<^sub>v ?x = c \<cdot>\<^sub>v ?y) = (?x = ?y)

goal (1 subgoal):
 1. c \<cdot>\<^sub>v v \<notin> set (map ((\<cdot>\<^sub>v) c) lC)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
c \<cdot>\<^sub>v v \<notin> set (map ((\<cdot>\<^sub>v) c) lC)

goal (2 subgoals):
 1. distinct [] \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) [])
 2. \<And>a lC. \<lbrakk>distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC); distinct (a # lC)\<rbrakk> \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) (a # lC))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
c \<cdot>\<^sub>v v \<notin> set (map ((\<cdot>\<^sub>v) c) lC)

goal (2 subgoals):
 1. distinct [] \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) [])
 2. \<And>a lC. \<lbrakk>distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC); distinct (a # lC)\<rbrakk> \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) (a # lC))
[PROOF STEP]
have "map ((\<cdot>\<^sub>v) c) (v # lC) = c \<cdot>\<^sub>v v # map ((\<cdot>\<^sub>v) c) lC"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map ((\<cdot>\<^sub>v) c) (v # lC) = c \<cdot>\<^sub>v v # map ((\<cdot>\<^sub>v) c) lC
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
map ((\<cdot>\<^sub>v) c) (v # lC) = c \<cdot>\<^sub>v v # map ((\<cdot>\<^sub>v) c) lC

goal (2 subgoals):
 1. distinct [] \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) [])
 2. \<And>a lC. \<lbrakk>distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC); distinct (a # lC)\<rbrakk> \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) (a # lC))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
c \<cdot>\<^sub>v v \<notin> set (map ((\<cdot>\<^sub>v) c) lC)
map ((\<cdot>\<^sub>v) c) (v # lC) = c \<cdot>\<^sub>v v # map ((\<cdot>\<^sub>v) c) lC
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
c \<cdot>\<^sub>v v \<notin> set (map ((\<cdot>\<^sub>v) c) lC)
map ((\<cdot>\<^sub>v) c) (v # lC) = c \<cdot>\<^sub>v v # map ((\<cdot>\<^sub>v) c) lC

goal (1 subgoal):
 1. distinct (map ((\<cdot>\<^sub>v) c) (v # lC))
[PROOF STEP]
using Cons.IH Cons.prems
[PROOF STATE]
proof (prove)
using this:
c \<cdot>\<^sub>v v \<notin> set (map ((\<cdot>\<^sub>v) c) lC)
map ((\<cdot>\<^sub>v) c) (v # lC) = c \<cdot>\<^sub>v v # map ((\<cdot>\<^sub>v) c) lC
distinct lC \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) lC)
distinct (v # lC)

goal (1 subgoal):
 1. distinct (map ((\<cdot>\<^sub>v) c) (v # lC))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
distinct (map ((\<cdot>\<^sub>v) c) (v # lC))

goal (1 subgoal):
 1. distinct [] \<Longrightarrow> distinct (map ((\<cdot>\<^sub>v) c) [])
[PROOF STEP]
qed auto


[STATEMENT]
lemma (in field) f_comm_group_2:
  assumes "x \<in> carrier R"
  assumes "x \<noteq> \<zero>"
  shows " \<exists>y\<in>carrier R - {\<zero>}. y \<otimes> x = \<one>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y\<in>carrier R - {\<zero>}. y \<otimes> x = \<one>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>y\<in>carrier R - {\<zero>}. y \<otimes> x = \<one>
[PROOF STEP]
have x_unit: "x \<in> Units R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> Units R
[PROOF STEP]
using field_Units assms
[PROOF STATE]
proof (prove)
using this:
Units R = carrier R - {\<zero>}
x \<in> carrier R
x \<noteq> \<zero>

goal (1 subgoal):
 1. x \<in> Units R
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<in> Units R

goal (1 subgoal):
 1. \<exists>y\<in>carrier R - {\<zero>}. y \<otimes> x = \<one>
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<in> Units R

goal (1 subgoal):
 1. \<exists>y\<in>carrier R - {\<zero>}. y \<otimes> x = \<one>
[PROOF STEP]
unfolding Units_def
[PROOF STATE]
proof (prove)
using this:
x \<in> {y \<in> carrier R. \<exists>x\<in>carrier R. x \<otimes> y = \<one> \<and> y \<otimes> x = \<one>}

goal (1 subgoal):
 1. \<exists>y\<in>carrier R - {\<zero>}. y \<otimes> x = \<one>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>y\<in>carrier R - {\<zero>}. y \<otimes> x = \<one>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma card_gr_1_iff:
  assumes "finite S"  "x \<in> S"  "y \<in> S"  "x \<noteq> y"
  shows "card S > 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < card S
[PROOF STEP]
using assms card_le_Suc0_iff_eq leI
[PROOF STATE]
proof (prove)
using this:
finite S
x \<in> S
y \<in> S
x \<noteq> y
finite ?A \<Longrightarrow> (card ?A \<le> Suc 0) = (\<forall>a1\<in>?A. \<forall>a2\<in>?A. a1 = a2)
\<not> ?x < ?y \<Longrightarrow> ?y \<le> ?x

goal (1 subgoal):
 1. 1 < card S
[PROOF STEP]
by auto


[STATEMENT]
lemma (in Corps) field_op_minus:"\<lbrakk>a \<in> carrier K; b \<in> carrier K; b \<noteq> \<zero>\<rbrakk> \<Longrightarrow>
                              -\<^sub>a (a \<cdot>\<^sub>r (b\<^bsup>\<hyphen>K\<^esup>)) = (-\<^sub>a a) \<cdot>\<^sub>r (b\<^bsup>\<hyphen>K\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier K; b \<in> carrier K; b \<noteq> \<zero>\<rbrakk> \<Longrightarrow> -\<^sub>a a \<cdot>\<^sub>r b\<^bsup>\<hyphen> K\<^esup> = (-\<^sub>a a) \<cdot>\<^sub>r b\<^bsup>\<hyphen> K\<^esup>
[PROOF STEP]
apply (cut_tac invf_closed1[of "b"], simp,
       erule conjE, cut_tac field_is_ring,
        simp add:Ring.ring_inv1[of "K" "a" "b\<^bsup>\<hyphen>K\<^esup>"], simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem pr_1_to_2: "f \<in> PrimRec1 \<Longrightarrow> (\<lambda> x y. f (c_pair x y)) \<in> PrimRec2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> PrimRec1 \<Longrightarrow> (\<lambda>x y. f (c_pair x y)) \<in> PrimRec2
[PROOF STEP]
by prec


[STATEMENT]
lemma circline_set_circline_reciprocal:
  shows "circline_set (circline_reciprocal H) = reciprocal ` circline_set H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. circline_set (circline_reciprocal H) = reciprocal ` circline_set H
[PROOF STEP]
unfolding circline_reciprocal_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. circline_set (conjugate_circline (circline_inversion H)) = reciprocal ` circline_set H
[PROOF STEP]
by (auto simp add: inversion_def image_iff)


[STATEMENT]
lemma euclid_ext_poly_dynamic:
  assumes cop: "coprime_m f g" and f: "Mp f = f" and g: "Mp g = g"
    and res: "euclid_ext_poly_dynamic p f g = (a,b)"
  shows "f * a + g * b =m 1"
    "Mp a = a" "Mp b = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f * a + g * b =m 1 &&& Mp a = a &&& Mp b = b
[PROOF STEP]
using euclid_ext_poly_mod_integer[OF cop f g, of p a b]
    euclid_ext_poly_mod_uint32[OF _ cop f g, of p a b]
    euclid_ext_poly_mod_uint64[OF _ cop f g, of p a b]
    res[unfolded euclid_ext_poly_dynamic_def]
[PROOF STATE]
proof (prove)
using this:
euclid_ext_poly_mod_main p (finite_field_ops_integer (integer_of_int p)) f g = (a, b) \<Longrightarrow> f * a + g * b =m 1
euclid_ext_poly_mod_main p (finite_field_ops_integer (integer_of_int p)) f g = (a, b) \<Longrightarrow> Mp a = a
euclid_ext_poly_mod_main p (finite_field_ops_integer (integer_of_int p)) f g = (a, b) \<Longrightarrow> Mp b = b
\<lbrakk>p \<le> 65535; euclid_ext_poly_mod_main p (finite_field_ops32 (uint32_of_int p)) f g = (a, b)\<rbrakk> \<Longrightarrow> f * a + g * b =m 1
\<lbrakk>p \<le> 65535; euclid_ext_poly_mod_main p (finite_field_ops32 (uint32_of_int p)) f g = (a, b)\<rbrakk> \<Longrightarrow> Mp a = a
\<lbrakk>p \<le> 65535; euclid_ext_poly_mod_main p (finite_field_ops32 (uint32_of_int p)) f g = (a, b)\<rbrakk> \<Longrightarrow> Mp b = b
\<lbrakk>p \<le> 4294967295; euclid_ext_poly_mod_main p (finite_field_ops64 (uint64_of_int p)) f g = (a, b)\<rbrakk> \<Longrightarrow> f * a + g * b =m 1
\<lbrakk>p \<le> 4294967295; euclid_ext_poly_mod_main p (finite_field_ops64 (uint64_of_int p)) f g = (a, b)\<rbrakk> \<Longrightarrow> Mp a = a
\<lbrakk>p \<le> 4294967295; euclid_ext_poly_mod_main p (finite_field_ops64 (uint64_of_int p)) f g = (a, b)\<rbrakk> \<Longrightarrow> Mp b = b
(if p \<le> 65535 then euclid_ext_poly_mod_main p (finite_field_ops32 (uint32_of_int p)) else if p \<le> 4294967295 then euclid_ext_poly_mod_main p (finite_field_ops64 (uint64_of_int p)) else euclid_ext_poly_mod_main p (finite_field_ops_integer (integer_of_int p))) f g = (a, b)

goal (1 subgoal):
 1. f * a + g * b =m 1 &&& Mp a = a &&& Mp b = b
[PROOF STEP]
by (auto split: if_splits)


[STATEMENT]
lemma (in Ring) bilinear_l_lin1:"\<lbrakk>R module M1; R module M2; R module N;
      m1 \<in> carrier M1; m2 \<in> carrier M2; r \<in> carrier R;
      bilinear_map f R M1 M2 N\<rbrakk> \<Longrightarrow>
         f (r \<cdot>\<^sub>s\<^bsub>M1\<^esub> m1, m2) \<plusminus>\<^bsub>N\<^esub> -\<^sub>a\<^bsub>N\<^esub> (r \<cdot>\<^sub>s\<^bsub>N\<^esub> (f (m1, m2))) = \<zero>\<^bsub>N\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M1; R module M2; R module N; m1 \<in> carrier M1; m2 \<in> carrier M2; r \<in> carrier R; bilinear_map f R M1 M2 N\<rbrakk> \<Longrightarrow> f (r \<cdot>\<^sub>s\<^bsub>M1\<^esub> m1, m2) \<plusminus>\<^bsub>N\<^esub> -\<^sub>a\<^bsub>N\<^esub> r \<cdot>\<^sub>s\<^bsub>N\<^esub> f (m1, m2) = \<zero>\<^bsub>N\<^esub>
[PROOF STEP]
apply (frule Module.module_is_ag[of N],
       subst aGroup.ag_eq_diffzero[of N, THEN sym], assumption+,
       frule_tac a = r and m = m1 in Module.sc_mem[of M1 R], assumption+,
       simp add:bilinear_mem)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>R module M1; R module M2; R module N; m1 \<in> carrier M1; m2 \<in> carrier M2; r \<in> carrier R; bilinear_map f R M1 M2 N; aGroup N\<rbrakk> \<Longrightarrow> r \<cdot>\<^sub>s\<^bsub>N\<^esub> f (m1, m2) \<in> carrier N
 2. \<lbrakk>R module M1; R module M2; R module N; m1 \<in> carrier M1; m2 \<in> carrier M2; r \<in> carrier R; bilinear_map f R M1 M2 N; aGroup N\<rbrakk> \<Longrightarrow> f (r \<cdot>\<^sub>s\<^bsub>M1\<^esub> m1, m2) = r \<cdot>\<^sub>s\<^bsub>N\<^esub> f (m1, m2)
[PROOF STEP]
apply (rule Module.sc_mem, assumption+, simp add:bilinear_mem,
        simp add:bilinear_l_lin)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma prv_neg_exi_imp_all_neg:
  assumes x: "x \<in> var" and \<phi>: "\<phi> \<in> fmla"
  shows "prv (imp (neg (exi x \<phi>)) (all x (neg \<phi>)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prv (imp (neg (exi x \<phi>)) (all x (neg \<phi>)))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> var
\<phi> \<in> fmla

goal (1 subgoal):
 1. prv (imp (neg (exi x \<phi>)) (all x (neg \<phi>)))
[PROOF STEP]
by (intro prv_all_imp_gen[of x "neg (exi x \<phi>)"])
    (auto simp: prv_exi_inst_same prv_imp_neg_rev)


[STATEMENT]
lemma has_integral_Union:
  fixes f :: "'n::euclidean_space \<Rightarrow> 'a::banach"
  assumes "finite \<T>"
    and "\<And>S. S \<in> \<T> \<Longrightarrow> (f has_integral (i S)) S"
    and "pairwise (\<lambda>S S'. negligible (S \<inter> S')) \<T>"
  shows "(f has_integral (sum i \<T>)) (\<Union>\<T>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral sum i \<T>) (\<Union> \<T>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (f has_integral sum i \<T>) (\<Union> \<T>)
[PROOF STEP]
have "(f has_integral (sum i \<T>)) (\<Union>S\<in>\<T>. S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral sum i \<T>) (\<Union>S\<in>\<T>. S)
[PROOF STEP]
by (intro has_integral_UN assms)
[PROOF STATE]
proof (state)
this:
(f has_integral sum i \<T>) (\<Union>S\<in>\<T>. S)

goal (1 subgoal):
 1. (f has_integral sum i \<T>) (\<Union> \<T>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(f has_integral sum i \<T>) (\<Union>S\<in>\<T>. S)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(f has_integral sum i \<T>) (\<Union>S\<in>\<T>. S)

goal (1 subgoal):
 1. (f has_integral sum i \<T>) (\<Union> \<T>)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
(f has_integral sum i \<T>) (\<Union> \<T>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma permChainBij:
  fixes xvec :: "name list"
  and   yvec :: "name list"
  and   p    :: "'a::pt_name"
  and   q    :: "'a::pt_name"

  assumes "length xvec = length yvec"

  shows "(([xvec yvec] \<bullet>\<^sub>v p) = ([xvec yvec] \<bullet>\<^sub>v q)) = (p = q)"
  and   "(([xvec yvec]\<^sup>- \<bullet>\<^sub>v p) = ([xvec yvec]\<^sup>- \<bullet>\<^sub>v q)) = (p = q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([xvec yvec] \<bullet>\<^sub>v p = [xvec yvec] \<bullet>\<^sub>v q) = (p = q) &&& ([xvec yvec]\<^sup>- \<bullet>\<^sub>v p = [xvec yvec]\<^sup>- \<bullet>\<^sub>v q) = (p = q)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length xvec = length yvec

goal (1 subgoal):
 1. ([xvec yvec] \<bullet>\<^sub>v p = [xvec yvec] \<bullet>\<^sub>v q) = (p = q) &&& ([xvec yvec]\<^sup>- \<bullet>\<^sub>v p = [xvec yvec]\<^sup>- \<bullet>\<^sub>v q) = (p = q)
[PROOF STEP]
by(induct rule: composePermInduct)
  (auto simp add: pt_bij[OF pt_name_inst, OF at_name_inst])


[STATEMENT]
lemma separation_by_Un_open:
  fixes S :: "'a :: euclidean_space set"
  assumes "open S" "open T" "S \<inter> T = {}" and cS: "connected(-S)" and cT: "connected(-T)"
    shows "connected(- (S \<union> T))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connected (- (S \<union> T))
[PROOF STEP]
using assms unicoherent_UNIV
[PROOF STATE]
proof (prove)
using this:
open S
open T
S \<inter> T = {}
connected (- S)
connected (- T)
unicoherent UNIV

goal (1 subgoal):
 1. connected (- (S \<union> T))
[PROOF STEP]
unfolding unicoherent_def
[PROOF STATE]
proof (prove)
using this:
open S
open T
S \<inter> T = {}
connected (- S)
connected (- T)
\<forall>S T. connected S \<and> connected T \<and> S \<union> T = UNIV \<and> closedin (top_of_set UNIV) S \<and> closedin (top_of_set UNIV) T \<longrightarrow> connected (S \<inter> T)

goal (1 subgoal):
 1. connected (- (S \<union> T))
[PROOF STEP]
by force


[STATEMENT]
lemma real_of_card: "real (card A) = sum (\<lambda>x. 1) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (card A) = (\<Sum>x\<in>A. 1)
[PROOF STEP]
by simp


[STATEMENT]
lemma tensor_butter: \<open>tensor_op (butterket i j) (butterket k l) = butterket (i,k) (j,l)\<close>
  for i :: "_" and j :: "_::finite" and k :: "_" and l :: "_::finite"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. butterket i j \<otimes>\<^sub>o butterket k l = butterket (i, k) (j, l)
[PROOF STEP]
apply (rule equal_ket, rename_tac x, case_tac x)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a b. x = (a, b) \<Longrightarrow> (butterket i j \<otimes>\<^sub>o butterket k l) *\<^sub>V ket x = butterket (i, k) (j, l) *\<^sub>V ket x
[PROOF STEP]
apply (auto simp flip: tensor_ell2_ket simp: cblinfun_apply_cblinfun_compose tensor_op_ell2 butterfly_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>aa ba. (ket j \<bullet>\<^sub>C ket aa) *\<^sub>C ket i \<otimes>\<^sub>s (ket l \<bullet>\<^sub>C ket ba) *\<^sub>C ket k = (ket j \<bullet>\<^sub>C ket aa * (ket l \<bullet>\<^sub>C ket ba)) *\<^sub>C (ket i \<otimes>\<^sub>s ket k)
[PROOF STEP]
by (auto simp: tensor_ell2_scaleC1 tensor_ell2_scaleC2)