[STATEMENT]
lemma direct_decomp_span_some_basis:
  assumes "direct_decomp A ss" and "\<And>s. s \<in> set ss \<Longrightarrow> subspace s"
  shows "span (\<Union>(some_basis ` set ss)) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set ss)) = A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set ss)) = A
[PROOF STEP]
from assms(1)
[PROOF STATE]
proof (chain)
picking this:
direct_decomp A ss
[PROOF STEP]
have eq0[symmetric]: "sum_list ` listset ss = A"
[PROOF STATE]
proof (prove)
using this:
direct_decomp A ss

goal (1 subgoal):
 1. sum_list ` listset ss = A
[PROOF STEP]
by (rule direct_decompD)
[PROOF STATE]
proof (state)
this:
A = sum_list ` listset ss

goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set ss)) = A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set ss)) = A
[PROOF STEP]
unfolding eq0
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
?s \<in> set ss \<Longrightarrow> local.subspace ?s

goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss
[PROOF STEP]
proof (induct ss)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>s. s \<in> set [] \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set [])) = sum_list ` listset []
 2. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
?s \<in> set [] \<Longrightarrow> local.subspace ?s

goal (2 subgoals):
 1. (\<And>s. s \<in> set [] \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set [])) = sum_list ` listset []
 2. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set [])) = sum_list ` listset []
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
local.span (\<Union> (some_basis ` set [])) = sum_list ` listset []

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
case (Cons s ss)
[PROOF STATE]
proof (state)
this:
(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss
?s \<in> set (s # ss) \<Longrightarrow> local.subspace ?s

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
have "subspace s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.subspace s
[PROOF STEP]
by (rule Cons.prems) simp
[PROOF STATE]
proof (state)
this:
local.subspace s

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
hence eq1: "span (some_basis s) = s"
[PROOF STATE]
proof (prove)
using this:
local.subspace s

goal (1 subgoal):
 1. local.span (some_basis s) = s
[PROOF STEP]
by (rule span_some_basis)
[PROOF STATE]
proof (state)
this:
local.span (some_basis s) = s

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
have "\<And>s'. s' \<in> set ss \<Longrightarrow> subspace s'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s'. s' \<in> set ss \<Longrightarrow> local.subspace s'
[PROOF STEP]
by (rule Cons.prems) simp
[PROOF STATE]
proof (state)
this:
?s' \<in> set ss \<Longrightarrow> local.subspace ?s'

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
hence eq2: "span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss"
[PROOF STATE]
proof (prove)
using this:
?s' \<in> set ss \<Longrightarrow> local.subspace ?s'

goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss
[PROOF STEP]
by (rule Cons.hyps)
[PROOF STATE]
proof (state)
this:
local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
have "span (\<Union> (some_basis ` set (s # ss))) = {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set (s # ss))) = {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
by (simp add: span_Un eq1 eq2)
[PROOF STATE]
proof (state)
this:
local.span (\<Union> (some_basis ` set (s # ss))) = {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
local.span (\<Union> (some_basis ` set (s # ss))) = {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
have "\<dots> = sum_list ` listset (s # ss)" (is "?A = ?B")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} = sum_list ` listset (s # ss)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<subseteq> sum_list ` listset (s # ss)
 2. sum_list ` listset (s # ss) \<subseteq> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
show "?A \<subseteq> ?B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<subseteq> sum_list ` listset (s # ss)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
assume "a \<in> ?A"
[PROOF STATE]
proof (state)
this:
a \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}

goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
obtain x y where "x \<in> s" and "y \<in> sum_list ` listset ss" and a: "a = x + y"
[PROOF STATE]
proof (prove)
using this:
a \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}

goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>x \<in> s; y \<in> sum_list ` listset ss; a = x + y\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> s
y \<in> sum_list ` listset ss
a = x + y

goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
from this(2)
[PROOF STATE]
proof (chain)
picking this:
y \<in> sum_list ` listset ss
[PROOF STEP]
obtain qs where "qs \<in> listset ss" and y: "y = sum_list qs"
[PROOF STATE]
proof (prove)
using this:
y \<in> sum_list ` listset ss

goal (1 subgoal):
 1. (\<And>qs. \<lbrakk>qs \<in> listset ss; y = sum_list qs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
qs \<in> listset ss
y = sum_list qs

goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
from \<open>x \<in> s\<close> this(1) refl
[PROOF STATE]
proof (chain)
picking this:
x \<in> s
qs \<in> listset ss
?t = ?t
[PROOF STEP]
have "x # qs \<in> listset (s # ss)"
[PROOF STATE]
proof (prove)
using this:
x \<in> s
qs \<in> listset ss
?t = ?t

goal (1 subgoal):
 1. x # qs \<in> listset (s # ss)
[PROOF STEP]
by (rule listset_ConsI)
[PROOF STATE]
proof (state)
this:
x # qs \<in> listset (s # ss)

goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
hence "sum_list (x # qs) \<in> ?B"
[PROOF STATE]
proof (prove)
using this:
x # qs \<in> listset (s # ss)

goal (1 subgoal):
 1. sum_list (x # qs) \<in> sum_list ` listset (s # ss)
[PROOF STEP]
by (rule imageI)
[PROOF STATE]
proof (state)
this:
sum_list (x # qs) \<in> sum_list ` listset (s # ss)

goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum_list (x # qs) \<in> sum_list ` listset (s # ss)

goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
have "sum_list (x # qs) = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (x # qs) = a
[PROOF STEP]
by (simp add: a y)
[PROOF STATE]
proof (state)
this:
sum_list (x # qs) = a

goal (1 subgoal):
 1. \<And>x. x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<Longrightarrow> x \<in> sum_list ` listset (s # ss)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
a \<in> sum_list ` listset (s # ss)
[PROOF STEP]
show "a \<in> ?B"
[PROOF STATE]
proof (prove)
using this:
a \<in> sum_list ` listset (s # ss)

goal (1 subgoal):
 1. a \<in> sum_list ` listset (s # ss)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
a \<in> sum_list ` listset (s # ss)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} \<subseteq> sum_list ` listset (s # ss)

goal (1 subgoal):
 1. sum_list ` listset (s # ss) \<subseteq> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum_list ` listset (s # ss) \<subseteq> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
show "?B \<subseteq> ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list ` listset (s # ss) \<subseteq> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> sum_list ` listset (s # ss) \<Longrightarrow> x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> sum_list ` listset (s # ss) \<Longrightarrow> x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
assume "a \<in> ?B"
[PROOF STATE]
proof (state)
this:
a \<in> sum_list ` listset (s # ss)

goal (1 subgoal):
 1. \<And>x. x \<in> sum_list ` listset (s # ss) \<Longrightarrow> x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> sum_list ` listset (s # ss)
[PROOF STEP]
obtain qs' where "qs' \<in> listset (s # ss)" and a: "a = sum_list qs'"
[PROOF STATE]
proof (prove)
using this:
a \<in> sum_list ` listset (s # ss)

goal (1 subgoal):
 1. (\<And>qs'. \<lbrakk>qs' \<in> listset (s # ss); a = sum_list qs'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
qs' \<in> listset (s # ss)
a = sum_list qs'

goal (1 subgoal):
 1. \<And>x. x \<in> sum_list ` listset (s # ss) \<Longrightarrow> x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
from this(1)
[PROOF STATE]
proof (chain)
picking this:
qs' \<in> listset (s # ss)
[PROOF STEP]
obtain x qs where "x \<in> s" and "qs \<in> listset ss" and qs': "qs' = x # qs"
[PROOF STATE]
proof (prove)
using this:
qs' \<in> listset (s # ss)

goal (1 subgoal):
 1. (\<And>x qs. \<lbrakk>x \<in> s; qs \<in> listset ss; qs' = x # qs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule listset_ConsE)
[PROOF STATE]
proof (state)
this:
x \<in> s
qs \<in> listset ss
qs' = x # qs

goal (1 subgoal):
 1. \<And>x. x \<in> sum_list ` listset (s # ss) \<Longrightarrow> x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
from this(2)
[PROOF STATE]
proof (chain)
picking this:
qs \<in> listset ss
[PROOF STEP]
have "sum_list qs \<in> sum_list ` listset ss"
[PROOF STATE]
proof (prove)
using this:
qs \<in> listset ss

goal (1 subgoal):
 1. sum_list qs \<in> sum_list ` listset ss
[PROOF STEP]
by (rule imageI)
[PROOF STATE]
proof (state)
this:
sum_list qs \<in> sum_list ` listset ss

goal (1 subgoal):
 1. \<And>x. x \<in> sum_list ` listset (s # ss) \<Longrightarrow> x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sum_list qs \<in> sum_list ` listset ss

goal (1 subgoal):
 1. \<And>x. x \<in> sum_list ` listset (s # ss) \<Longrightarrow> x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
have "a = x + sum_list qs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a = x + sum_list qs
[PROOF STEP]
by (simp add: a qs')
[PROOF STATE]
proof (state)
this:
a = x + sum_list qs

goal (1 subgoal):
 1. \<And>x. x \<in> sum_list ` listset (s # ss) \<Longrightarrow> x \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sum_list qs \<in> sum_list ` listset ss
a = x + sum_list qs
[PROOF STEP]
show "a \<in> ?A"
[PROOF STATE]
proof (prove)
using this:
sum_list qs \<in> sum_list ` listset ss
a = x + sum_list qs

goal (1 subgoal):
 1. a \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
using \<open>x \<in> s\<close>
[PROOF STATE]
proof (prove)
using this:
sum_list qs \<in> sum_list ` listset ss
a = x + sum_list qs
x \<in> s

goal (1 subgoal):
 1. a \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a \<in> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sum_list ` listset (s # ss) \<subseteq> {x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{x + y |x y. x \<in> s \<and> y \<in> sum_list ` listset ss} = sum_list ` listset (s # ss)

goal (1 subgoal):
 1. \<And>a ss. \<lbrakk>(\<And>s. s \<in> set ss \<Longrightarrow> local.subspace s) \<Longrightarrow> local.span (\<Union> (some_basis ` set ss)) = sum_list ` listset ss; \<And>s. s \<in> set (a # ss) \<Longrightarrow> local.subspace s\<rbrakk> \<Longrightarrow> local.span (\<Union> (some_basis ` set (a # ss))) = sum_list ` listset (a # ss)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
local.span (\<Union> (some_basis ` set (s # ss))) = sum_list ` listset (s # ss)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
local.span (\<Union> (some_basis ` set (s # ss))) = sum_list ` listset (s # ss)

goal (1 subgoal):
 1. local.span (\<Union> (some_basis ` set (s # ss))) = sum_list ` listset (s # ss)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
local.span (\<Union> (some_basis ` set (s # ss))) = sum_list ` listset (s # ss)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
local.span (\<Union> (some_basis ` set ss)) = A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma smult_dvd_iff: "smult a p dvd q \<longleftrightarrow> (if a = 0 then q = 0 else p dvd q)"
  for a :: "'a::field"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (smult a p dvd q) = (if a = (0::'a) then q = 0 else p dvd q)
[PROOF STEP]
by (auto elim: smult_dvd smult_dvd_cancel)


[STATEMENT]
lemma merge_assoc [simp]: "map_of (merge m1 (merge m2 m3)) = map_of (merge (merge m1 m2) m3)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_of (merge m1 (merge m2 m3)) = map_of (merge (merge m1 m2) m3)
[PROOF STEP]
by (simp add: merge_conv')


[STATEMENT]
lemma pr_comp2_3': "\<lbrakk> pr_conv_2_to_1 f \<in> PrimRec1'; pr_conv_3_to_1 g \<in> PrimRec1'; pr_conv_3_to_1 h \<in> PrimRec1' \<rbrakk> \<Longrightarrow> pr_conv_3_to_1 (\<lambda> x y z. f (g x y z) (h x y z)) \<in> PrimRec1'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pr_conv_2_to_1 f \<in> PrimRec1'; pr_conv_3_to_1 g \<in> PrimRec1'; pr_conv_3_to_1 h \<in> PrimRec1'\<rbrakk> \<Longrightarrow> pr_conv_3_to_1 (\<lambda>x y z. f (g x y z) (h x y z)) \<in> PrimRec1'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>pr_conv_2_to_1 f \<in> PrimRec1'; pr_conv_3_to_1 g \<in> PrimRec1'; pr_conv_3_to_1 h \<in> PrimRec1'\<rbrakk> \<Longrightarrow> pr_conv_3_to_1 (\<lambda>x y z. f (g x y z) (h x y z)) \<in> PrimRec1'
[PROOF STEP]
assume "pr_conv_2_to_1 f \<in> PrimRec1'"
  and "pr_conv_3_to_1 g \<in> PrimRec1'" (is "?g1 \<in> PrimRec1'")
  and "pr_conv_3_to_1 h \<in> PrimRec1'" (is "?h1 \<in> PrimRec1'")
[PROOF STATE]
proof (state)
this:
pr_conv_2_to_1 f \<in> PrimRec1'
pr_conv_3_to_1 g \<in> PrimRec1'
pr_conv_3_to_1 h \<in> PrimRec1'

goal (1 subgoal):
 1. \<lbrakk>pr_conv_2_to_1 f \<in> PrimRec1'; pr_conv_3_to_1 g \<in> PrimRec1'; pr_conv_3_to_1 h \<in> PrimRec1'\<rbrakk> \<Longrightarrow> pr_conv_3_to_1 (\<lambda>x y z. f (g x y z) (h x y z)) \<in> PrimRec1'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
pr_conv_2_to_1 f \<in> PrimRec1'
pr_conv_3_to_1 g \<in> PrimRec1'
pr_conv_3_to_1 h \<in> PrimRec1'
[PROOF STEP]
have "(\<lambda> x. f (?g1 x) (?h1 x)) \<in> PrimRec1'"
[PROOF STATE]
proof (prove)
using this:
pr_conv_2_to_1 f \<in> PrimRec1'
pr_conv_3_to_1 g \<in> PrimRec1'
pr_conv_3_to_1 h \<in> PrimRec1'

goal (1 subgoal):
 1. (\<lambda>x. f (pr_conv_3_to_1 g x) (pr_conv_3_to_1 h x)) \<in> PrimRec1'
[PROOF STEP]
by (rule pr_comp2_1')
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f (pr_conv_3_to_1 g x) (pr_conv_3_to_1 h x)) \<in> PrimRec1'

goal (1 subgoal):
 1. \<lbrakk>pr_conv_2_to_1 f \<in> PrimRec1'; pr_conv_3_to_1 g \<in> PrimRec1'; pr_conv_3_to_1 h \<in> PrimRec1'\<rbrakk> \<Longrightarrow> pr_conv_3_to_1 (\<lambda>x y z. f (g x y z) (h x y z)) \<in> PrimRec1'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. f (pr_conv_3_to_1 g x) (pr_conv_3_to_1 h x)) \<in> PrimRec1'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f (pr_conv_3_to_1 g x) (pr_conv_3_to_1 h x)) \<in> PrimRec1'

goal (1 subgoal):
 1. pr_conv_3_to_1 (\<lambda>x y z. f (g x y z) (h x y z)) \<in> PrimRec1'
[PROOF STEP]
by (simp add: pr_conv_3_to_1_def)
[PROOF STATE]
proof (state)
this:
pr_conv_3_to_1 (\<lambda>x y z. f (g x y z) (h x y z)) \<in> PrimRec1'

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hfset_hinsert: "hfset (b \<triangleleft> a) = insert a (hfset b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hfset (b \<triangleleft> a) = insert a (hfset b)
[PROOF STEP]
by (metis finite_insert hinsert_def HF.finite_hfset hfset_HF)


[STATEMENT]
lemma subgame_\<omega>_subset [simp]: "\<omega>\<^bsub>subgame V'\<^esub> ` V\<^bsub>subgame V'\<^esub> \<subseteq> \<omega> ` V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<omega>\<^bsub>subgame V'\<^esub> ` V\<^bsub>subgame V'\<^esub> \<subseteq> \<omega> ` V
[PROOF STEP]
by (simp add: image_mono subgame_\<omega>)


[STATEMENT]
lemma isomorphic_homology_imp_path_connectedness:
  assumes "homology_group 0 X \<cong> homology_group 0 Y"
  shows "path_connected_space X \<longleftrightarrow> path_connected_space Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected_space X = path_connected_space Y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connected_space X = path_connected_space Y
[PROOF STEP]
obtain h where h: "bij_betw h (path_components_of X) (path_components_of Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>h. bij_betw h (path_components_of X) (path_components_of Y) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms isomorphic_homology_imp_path_components eqpoll_def
[PROOF STATE]
proof (prove)
using this:
homology_group 0 X \<cong> homology_group 0 Y
homology_group 0 ?X \<cong> homology_group 0 ?Y \<Longrightarrow> path_components_of ?X \<approx> path_components_of ?Y
?A \<approx> ?B \<equiv> \<exists>f. bij_betw f ?A ?B

goal (1 subgoal):
 1. (\<And>h. bij_betw h (path_components_of X) (path_components_of Y) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
bij_betw h (path_components_of X) (path_components_of Y)

goal (1 subgoal):
 1. path_connected_space X = path_connected_space Y
[PROOF STEP]
have 1: "path_components_of X \<subseteq> {a} \<Longrightarrow> path_components_of Y \<subseteq> {h a}" for a
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_components_of X \<subseteq> {a} \<Longrightarrow> path_components_of Y \<subseteq> {h a}
[PROOF STEP]
using h
[PROOF STATE]
proof (prove)
using this:
bij_betw h (path_components_of X) (path_components_of Y)

goal (1 subgoal):
 1. path_components_of X \<subseteq> {a} \<Longrightarrow> path_components_of Y \<subseteq> {h a}
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
using this:
inj_on h (path_components_of X) \<and> h ` path_components_of X = path_components_of Y

goal (1 subgoal):
 1. path_components_of X \<subseteq> {a} \<Longrightarrow> path_components_of Y \<subseteq> {h a}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
path_components_of X \<subseteq> {?a} \<Longrightarrow> path_components_of Y \<subseteq> {h ?a}

goal (1 subgoal):
 1. path_connected_space X = path_connected_space Y
[PROOF STEP]
have 2: "path_components_of Y \<subseteq> {a}
           \<Longrightarrow> path_components_of X \<subseteq> {inv_into (path_components_of X) h a}" for a
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_components_of Y \<subseteq> {a} \<Longrightarrow> path_components_of X \<subseteq> {inv_into (path_components_of X) h a}
[PROOF STEP]
using h [THEN bij_betw_inv_into]
[PROOF STATE]
proof (prove)
using this:
bij_betw (inv_into (path_components_of X) h) (path_components_of Y) (path_components_of X)

goal (1 subgoal):
 1. path_components_of Y \<subseteq> {a} \<Longrightarrow> path_components_of X \<subseteq> {inv_into (path_components_of X) h a}
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
using this:
inj_on (inv_into (path_components_of X) h) (path_components_of Y) \<and> inv_into (path_components_of X) h ` path_components_of Y = path_components_of X

goal (1 subgoal):
 1. path_components_of Y \<subseteq> {a} \<Longrightarrow> path_components_of X \<subseteq> {inv_into (path_components_of X) h a}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
path_components_of Y \<subseteq> {?a} \<Longrightarrow> path_components_of X \<subseteq> {inv_into (path_components_of X) h ?a}

goal (1 subgoal):
 1. path_connected_space X = path_connected_space Y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected_space X = path_connected_space Y
[PROOF STEP]
unfolding path_connected_space_iff_components_subset_singleton
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>a. path_components_of X \<subseteq> {a}) = (\<exists>a. path_components_of Y \<subseteq> {a})
[PROOF STEP]
by (blast intro: dest: 1 2)
[PROOF STATE]
proof (state)
this:
path_connected_space X = path_connected_space Y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma coprime_dvd_mult_nat2: "\<lbrakk>coprime (k::nat) n; k dvd n * m\<rbrakk> \<Longrightarrow> k dvd m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>coprime k n; k dvd n * m\<rbrakk> \<Longrightarrow> k dvd m
[PROOF STEP]
unfolding coprime_dvd_mult_right_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>coprime k n; k dvd m\<rbrakk> \<Longrightarrow> k dvd m
[PROOF STEP]
.


[STATEMENT]
lemma holomorphic_fun_eq_on_ball:
   "\<lbrakk>f holomorphic_on ball z r; g holomorphic_on ball z r;
     w \<in> ball z r;
     \<And>n. (deriv ^^ n) f z = (deriv ^^ n) g z\<rbrakk>
     \<Longrightarrow> f w = g w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f holomorphic_on ball z r; g holomorphic_on ball z r; w \<in> ball z r; \<And>n. (deriv ^^ n) f z = (deriv ^^ n) g z\<rbrakk> \<Longrightarrow> f w = g w
[PROOF STEP]
by (auto simp: holomorphic_iff_power_series sums_unique2 [of "\<lambda>n. (deriv ^^ n) f z / (fact n) * (w - z)^n"])


[STATEMENT]
lemma mat_append_row_vec_index:
  assumes "i < dim_col A"
    and "dim_col A = dim_vec b"
  shows "vec_index (col (mat_append_row A b) i) (dim_row A) = vec_index b i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. col (mat_append_row A b) i $ dim_row A = b $ i
[PROOF STEP]
by (metis One_nat_def add.right_neutral add_Suc_right assms(1) assms(2) carrier_matD(1)
      carrier_matD(2) index_col index_row(1) lessI mat_append_row_dims mat_append_row_row)


[STATEMENT]
lemma RP_union_card_is_suffix_length :
  assumes "OFSM M2"
  and     "io@xs \<in> L M2"
  and     "is_det_state_cover M2 V"
  and     "V'' \<in> Perm V M1"
shows "\<And> q . card (R M2 q io xs) \<le> card (RP M2 q io xs V'')"
      "sum (\<lambda> q . card (RP M2 q io xs V'')) (nodes M2) \<ge> length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>q. card (R M2 q io xs) \<le> card (RP M2 q io xs V'')) &&& length xs \<le> (\<Sum>q\<in>nodes M2. card (RP M2 q io xs V''))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>q. card (R M2 q io xs) \<le> card (RP M2 q io xs V'')
 2. length xs \<le> (\<Sum>q\<in>nodes M2. card (RP M2 q io xs V''))
[PROOF STEP]
have "sum (\<lambda> q . card (R M2 q io xs)) (nodes M2) = length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>q\<in>nodes M2. card (R M2 q io xs)) = length xs
[PROOF STEP]
using R_union_card_is_suffix_length[OF assms(1,2)]
[PROOF STATE]
proof (prove)
using this:
(\<Sum>q\<in>nodes M2. card (R M2 q io xs)) = length xs

goal (1 subgoal):
 1. (\<Sum>q\<in>nodes M2. card (R M2 q io xs)) = length xs
[PROOF STEP]
by assumption
[PROOF STATE]
proof (state)
this:
(\<Sum>q\<in>nodes M2. card (R M2 q io xs)) = length xs

goal (2 subgoals):
 1. \<And>q. card (R M2 q io xs) \<le> card (RP M2 q io xs V'')
 2. length xs \<le> (\<Sum>q\<in>nodes M2. card (RP M2 q io xs V''))
[PROOF STEP]
show "\<And> q . card (R M2 q io xs) \<le> card (RP M2 q io xs V'')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>q. card (R M2 q io xs) \<le> card (RP M2 q io xs V'')
[PROOF STEP]
by (metis RP_from_R assms(3) assms(4) card_insert_le eq_iff finite_R)
[PROOF STATE]
proof (state)
this:
card (R M2 ?q io xs) \<le> card (RP M2 ?q io xs V'')

goal (1 subgoal):
 1. length xs \<le> (\<Sum>q\<in>nodes M2. card (RP M2 q io xs V''))
[PROOF STEP]
show "sum (\<lambda> q . card (RP M2 q io xs V'')) (nodes M2) \<ge> length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length xs \<le> (\<Sum>q\<in>nodes M2. card (RP M2 q io xs V''))
[PROOF STEP]
by (metis (no_types, lifting) \<open>(\<Sum>q\<in>nodes M2. card (R M2 q io xs)) = length xs\<close>
        \<open>\<And>q. card (R M2 q io xs) \<le> card (RP M2 q io xs V'')\<close> sum_mono)
[PROOF STATE]
proof (state)
this:
length xs \<le> (\<Sum>q\<in>nodes M2. card (RP M2 q io xs V''))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Card_order_Un2:
shows "Card_order r \<Longrightarrow> |Field r| \<le>o |A \<union> (Field r)| "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Card_order r \<Longrightarrow> |Field r| \<le>o |A \<union> Field r|
[PROOF STEP]
using card_of_Un2 card_of_Field_ordIso ordIso_symmetric ordIso_ordLeq_trans
[PROOF STATE]
proof (prove)
using this:
|?A| \<le>o |?B \<union> ?A|
Card_order ?r \<Longrightarrow> |Field ?r| =o ?r
?r =o ?r' \<Longrightarrow> ?r' =o ?r
\<lbrakk>?r =o ?r'; ?r' \<le>o ?r''\<rbrakk> \<Longrightarrow> ?r \<le>o ?r''

goal (1 subgoal):
 1. Card_order r \<Longrightarrow> |Field r| \<le>o |A \<union> Field r|
[PROOF STEP]
by auto


[STATEMENT]
lemma normalized_cscalar_prod:
  fixes v w :: "complex vec"
  assumes dim_v: "v \<in> carrier_vec n" and dim_w: "w \<in> carrier_vec n"
  shows "v \<bullet>c w = (vec_norm v * vec_norm w) * (vec_normalize v \<bullet>c vec_normalize w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod w v = vec_norm v * vec_norm w * inner_prod (vec_normalize w) (vec_normalize v)
[PROOF STEP]
unfolding vec_normalize_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod w v = vec_norm v * vec_norm w * inner_prod (if w = 0\<^sub>v (dim_vec w) then w else 1 / vec_norm w \<cdot>\<^sub>v w) (if v = 0\<^sub>v (dim_vec v) then v else 1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
apply (split if_split, split if_split)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (w = 0\<^sub>v (dim_vec w) \<longrightarrow> (v = 0\<^sub>v (dim_vec v) \<longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v) \<and> (v \<noteq> 0\<^sub>v (dim_vec v) \<longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v))) \<and> (w \<noteq> 0\<^sub>v (dim_vec w) \<longrightarrow> (v = 0\<^sub>v (dim_vec v) \<longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v) \<and> (v \<noteq> 0\<^sub>v (dim_vec v) \<longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)))
[PROOF STEP]
proof (intro conjI impI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
note dim0 = dim_v dim_w
[PROOF STATE]
proof (state)
this:
v \<in> carrier_vec n
w \<in> carrier_vec n

goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
have dim: "dim_vec v = n" "dim_vec w = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec v = n &&& dim_vec w = n
[PROOF STEP]
using dim0
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec n
w \<in> carrier_vec n

goal (1 subgoal):
 1. dim_vec v = n &&& dim_vec w = n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dim_vec v = n
dim_vec w = n

goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
dim_vec v = n
dim_vec w = n

goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
assume "w = 0\<^sub>v n" "v = 0\<^sub>v n"
[PROOF STATE]
proof (state)
this:
w = 0\<^sub>v n
v = 0\<^sub>v n

goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
w = 0\<^sub>v n
v = 0\<^sub>v n
[PROOF STEP]
have lhs: "v \<bullet>c w = 0"
[PROOF STATE]
proof (prove)
using this:
w = 0\<^sub>v n
v = 0\<^sub>v n

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

goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inner_prod w v = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (chain)
picking this:
inner_prod w v = 0
[PROOF STEP]
have rhs: "vec_norm v * vec_norm w * (v \<bullet>c w) = 0"
[PROOF STATE]
proof (prove)
using this:
inner_prod w v = 0

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

goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
inner_prod w v = 0
vec_norm v * vec_norm w * inner_prod w v = 0
[PROOF STEP]
have "v \<bullet>c w = vec_norm v * vec_norm w * (v \<bullet>c w)"
[PROOF STATE]
proof (prove)
using this:
inner_prod w v = 0
vec_norm v * vec_norm w * inner_prod w v = 0

goal (1 subgoal):
 1. inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod w v = vec_norm v * vec_norm w * inner_prod w v

goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>w = 0\<^sub>v n; v = 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v

goal (4 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
 2. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 4. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
with dim
[PROOF STATE]
proof (chain)
picking this:
dim_vec v = n
dim_vec w = n
\<lbrakk>w = 0\<^sub>v n; v = 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
[PROOF STEP]
show "w = 0\<^sub>v (dim_vec w) \<Longrightarrow> v = 0\<^sub>v (dim_vec v) \<Longrightarrow> v \<bullet>c w = vec_norm v * vec_norm w * (v \<bullet>c w)"
[PROOF STATE]
proof (prove)
using this:
dim_vec v = n
dim_vec w = n
\<lbrakk>w = 0\<^sub>v n; v = 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v

goal (1 subgoal):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<lbrakk>w = 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w v

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
assume asm: "w = 0\<^sub>v n" "v \<noteq> 0\<^sub>v n"
[PROOF STATE]
proof (state)
this:
w = 0\<^sub>v n
v \<noteq> 0\<^sub>v n

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
w = 0\<^sub>v n
v \<noteq> 0\<^sub>v n
[PROOF STEP]
have w0: "conjugate w = 0\<^sub>v n"
[PROOF STATE]
proof (prove)
using this:
w = 0\<^sub>v n
v \<noteq> 0\<^sub>v n

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

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
with dim0
[PROOF STATE]
proof (chain)
picking this:
v \<in> carrier_vec n
w \<in> carrier_vec n
conjugate w = 0\<^sub>v n
[PROOF STEP]
have "(1 / vec_norm v \<cdot>\<^sub>v v) \<bullet>c w = 0"
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec n
w \<in> carrier_vec n
conjugate w = 0\<^sub>v n

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

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v) = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (chain)
picking this:
inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v) = 0
[PROOF STEP]
have rhs: "vec_norm v * vec_norm w * ((1 / vec_norm v \<cdot>\<^sub>v v) \<bullet>c w) = 0"
[PROOF STATE]
proof (prove)
using this:
inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v) = 0

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

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v) = 0

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
have "v \<bullet>c w = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod w v = 0
[PROOF STEP]
using w0 dim0
[PROOF STATE]
proof (prove)
using this:
conjugate w = 0\<^sub>v n
v \<in> carrier_vec n
w \<in> carrier_vec n

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

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v) = 0
vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v) = 0
inner_prod w v = 0
[PROOF STEP]
have "v \<bullet>c w = vec_norm v * vec_norm w * ((1 / vec_norm v \<cdot>\<^sub>v v) \<bullet>c w)"
[PROOF STATE]
proof (prove)
using this:
inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v) = 0
vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v) = 0
inner_prod w v = 0

goal (1 subgoal):
 1. inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>w = 0\<^sub>v n; v \<noteq> 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)

goal (3 subgoals):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 3. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
with dim
[PROOF STATE]
proof (chain)
picking this:
dim_vec v = n
dim_vec w = n
\<lbrakk>w = 0\<^sub>v n; v \<noteq> 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
show "w = 0\<^sub>v (dim_vec w) \<Longrightarrow> v \<noteq> 0\<^sub>v (dim_vec v) \<Longrightarrow> v \<bullet>c w = vec_norm v * vec_norm w * ((1 / vec_norm v \<cdot>\<^sub>v v) \<bullet>c w)"
[PROOF STATE]
proof (prove)
using this:
dim_vec v = n
dim_vec w = n
\<lbrakk>w = 0\<^sub>v n; v \<noteq> 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)

goal (1 subgoal):
 1. \<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<lbrakk>w = 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod w (1 / vec_norm v \<cdot>\<^sub>v v)

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
assume asm: "w \<noteq> 0\<^sub>v n" "v = 0\<^sub>v n"
[PROOF STATE]
proof (state)
this:
w \<noteq> 0\<^sub>v n
v = 0\<^sub>v n

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
with dim0
[PROOF STATE]
proof (chain)
picking this:
v \<in> carrier_vec n
w \<in> carrier_vec n
w \<noteq> 0\<^sub>v n
v = 0\<^sub>v n
[PROOF STEP]
have "v \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w) = 0"
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec n
w \<in> carrier_vec n
w \<noteq> 0\<^sub>v n
v = 0\<^sub>v n

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

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (chain)
picking this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 0
[PROOF STEP]
have rhs: "vec_norm v * vec_norm w * (v \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w)) = 0"
[PROOF STATE]
proof (prove)
using this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 0

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

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 0

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
have "v \<bullet>c w = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod w v = 0
[PROOF STEP]
using asm dim0
[PROOF STATE]
proof (prove)
using this:
w \<noteq> 0\<^sub>v n
v = 0\<^sub>v n
v \<in> carrier_vec n
w \<in> carrier_vec n

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

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 0
vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 0
inner_prod w v = 0
[PROOF STEP]
have "v \<bullet>c w = vec_norm v * vec_norm w * (v \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w))"
[PROOF STATE]
proof (prove)
using this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 0
vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 0
inner_prod w v = 0

goal (1 subgoal):
 1. inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>w \<noteq> 0\<^sub>v n; v = 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v

goal (2 subgoals):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
 2. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
with dim
[PROOF STATE]
proof (chain)
picking this:
dim_vec v = n
dim_vec w = n
\<lbrakk>w \<noteq> 0\<^sub>v n; v = 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
[PROOF STEP]
show "w \<noteq> 0\<^sub>v (dim_vec w) \<Longrightarrow> v = 0\<^sub>v (dim_vec v) \<Longrightarrow> v \<bullet>c w = vec_norm v * vec_norm w * (v \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w))"
[PROOF STATE]
proof (prove)
using this:
dim_vec v = n
dim_vec w = n
\<lbrakk>w \<noteq> 0\<^sub>v n; v = 0\<^sub>v n\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v = 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
assume asmw: "w \<noteq> 0\<^sub>v n" and asmv: "v \<noteq> 0\<^sub>v n"
[PROOF STATE]
proof (state)
this:
w \<noteq> 0\<^sub>v n
v \<noteq> 0\<^sub>v n

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
have "vec_norm w > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < vec_norm w
[PROOF STEP]
by (insert asmw dim0, rule vec_norm_ge_0, auto)
[PROOF STATE]
proof (state)
this:
0 < vec_norm w

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < vec_norm w
[PROOF STEP]
have cw: "conjugate (1 / vec_norm w) = 1 / vec_norm w"
[PROOF STATE]
proof (prove)
using this:
0 < vec_norm w

goal (1 subgoal):
 1. conjugate (1 / vec_norm w) = 1 / vec_norm w
[PROOF STEP]
by (simp add: complex_eq_iff complex_is_Real_iff less_complex_def)
[PROOF STATE]
proof (state)
this:
conjugate (1 / vec_norm w) = 1 / vec_norm w

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
from dim0
[PROOF STATE]
proof (chain)
picking this:
v \<in> carrier_vec n
w \<in> carrier_vec n
[PROOF STEP]
have
      "((1 / vec_norm v \<cdot>\<^sub>v v) \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w)) = 1 / vec_norm v * (v \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w))"
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec n
w \<in> carrier_vec n

goal (1 subgoal):
 1. inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
have "\<dots> = 1 / vec_norm v * (v \<bullet> (conjugate (1 / vec_norm w) \<cdot>\<^sub>v conjugate w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / vec_norm v * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 1 / vec_norm v * (v \<bullet> (conjugate (1 / vec_norm w) \<cdot>\<^sub>v conjugate w))
[PROOF STEP]
by (subst conjugate_smult_vec, auto)
[PROOF STATE]
proof (state)
this:
1 / vec_norm v * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 1 / vec_norm v * (v \<bullet> (conjugate (1 / vec_norm w) \<cdot>\<^sub>v conjugate w))

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
1 / vec_norm v * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) v = 1 / vec_norm v * (v \<bullet> (conjugate (1 / vec_norm w) \<cdot>\<^sub>v conjugate w))

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
have "\<dots> = 1 / vec_norm v * conjugate (1 / vec_norm w) * (v \<bullet> conjugate w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / vec_norm v * (v \<bullet> (conjugate (1 / vec_norm w) \<cdot>\<^sub>v conjugate w)) = 1 / vec_norm v * conjugate (1 / vec_norm w) * inner_prod w v
[PROOF STEP]
using dim
[PROOF STATE]
proof (prove)
using this:
dim_vec v = n
dim_vec w = n

goal (1 subgoal):
 1. 1 / vec_norm v * (v \<bullet> (conjugate (1 / vec_norm w) \<cdot>\<^sub>v conjugate w)) = 1 / vec_norm v * conjugate (1 / vec_norm w) * inner_prod w v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
1 / vec_norm v * (v \<bullet> (conjugate (1 / vec_norm w) \<cdot>\<^sub>v conjugate w)) = 1 / vec_norm v * conjugate (1 / vec_norm w) * inner_prod w v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
1 / vec_norm v * (v \<bullet> (conjugate (1 / vec_norm w) \<cdot>\<^sub>v conjugate w)) = 1 / vec_norm v * conjugate (1 / vec_norm w) * inner_prod w v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
have "\<dots> = 1 / vec_norm v * (1 / vec_norm w) * (v \<bullet>c w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / vec_norm v * conjugate (1 / vec_norm w) * inner_prod w v = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v
[PROOF STEP]
using vec_norm_ge_0 cw
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?v \<in> carrier_vec ?n; ?v \<noteq> 0\<^sub>v ?n\<rbrakk> \<Longrightarrow> 0 < vec_norm ?v
conjugate (1 / vec_norm w) = 1 / vec_norm w

goal (1 subgoal):
 1. 1 / vec_norm v * conjugate (1 / vec_norm w) * inner_prod w v = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
1 / vec_norm v * conjugate (1 / vec_norm w) * inner_prod w v = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v
[PROOF STEP]
have eq1: "(1 / vec_norm v \<cdot>\<^sub>v v) \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w) = 1 / vec_norm v * (1 / vec_norm w) * (v \<bullet>c w)"
[PROOF STATE]
proof (prove)
using this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v

goal (1 subgoal):
 1. inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v
[PROOF STEP]
have "vec_norm v * vec_norm w * ((1 / vec_norm v \<cdot>\<^sub>v v) \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w)) = (v \<bullet>c w)"
[PROOF STATE]
proof (prove)
using this:
inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = 1 / vec_norm v * (1 / vec_norm w) * inner_prod w v

goal (1 subgoal):
 1. vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = inner_prod w v
[PROOF STEP]
by (subst eq1, insert vec_norm_ge_0[of v n, OF dim_v asmv] vec_norm_ge_0[of w n, OF dim_w asmw], auto)
[PROOF STATE]
proof (state)
this:
vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = inner_prod w v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>w \<noteq> 0\<^sub>v n; v \<noteq> 0\<^sub>v n\<rbrakk> \<Longrightarrow> vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = inner_prod w v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
with dim
[PROOF STATE]
proof (chain)
picking this:
dim_vec v = n
dim_vec w = n
\<lbrakk>w \<noteq> 0\<^sub>v n; v \<noteq> 0\<^sub>v n\<rbrakk> \<Longrightarrow> vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = inner_prod w v
[PROOF STEP]
show " w \<noteq> 0\<^sub>v (dim_vec w) \<Longrightarrow> v \<noteq> 0\<^sub>v (dim_vec v) \<Longrightarrow> v \<bullet>c w = vec_norm v * vec_norm w * ((1 / vec_norm v \<cdot>\<^sub>v v) \<bullet>c (1 / vec_norm w \<cdot>\<^sub>v w))"
[PROOF STATE]
proof (prove)
using this:
dim_vec v = n
dim_vec w = n
\<lbrakk>w \<noteq> 0\<^sub>v n; v \<noteq> 0\<^sub>v n\<rbrakk> \<Longrightarrow> vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v) = inner_prod w v

goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>w \<noteq> 0\<^sub>v (dim_vec w); v \<noteq> 0\<^sub>v (dim_vec v)\<rbrakk> \<Longrightarrow> inner_prod w v = vec_norm v * vec_norm w * inner_prod (1 / vec_norm w \<cdot>\<^sub>v w) (1 / vec_norm v \<cdot>\<^sub>v v)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem mertens_bounded: "(\<lambda>x. \<MM> x - ln x) \<in> O(\<lambda>_. 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<MM> x - ln x) \<in> O(\<lambda>_. 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. \<MM> x - ln x) \<in> O(\<lambda>_. 1)
[PROOF STEP]
define f where "f = sum_upto (\<lambda>d. mangoldt d / d)"
[PROOF STATE]
proof (state)
this:
f = sum_upto (\<lambda>d. mangoldt d / real d)

goal (1 subgoal):
 1. (\<lambda>x. \<MM> x - ln x) \<in> O(\<lambda>_. 1)
[PROOF STEP]
have "(\<lambda>x. (f x - ln x) - (f x - \<MM> x)) \<in> O(\<lambda>_. 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x - ln x - (f x - \<MM> x)) \<in> O(\<lambda>_. 1)
[PROOF STEP]
using sum_upto_mangoldt_over_id_asymptotics
          sum_upto_mangoldt_over_id_minus_phi_bounded
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. sum_upto (\<lambda>d. mangoldt d / real d) x - ln x) \<in> O(\<lambda>_. 1)
(\<lambda>x. sum_upto (\<lambda>d. mangoldt d / real d) x - \<MM> x) \<in> O(\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>x. f x - ln x - (f x - \<MM> x)) \<in> O(\<lambda>_. 1)
[PROOF STEP]
unfolding f_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. sum_upto (\<lambda>d. mangoldt d / real d) x - ln x) \<in> O(\<lambda>_. 1)
(\<lambda>x. sum_upto (\<lambda>d. mangoldt d / real d) x - \<MM> x) \<in> O(\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>x. sum_upto (\<lambda>d. mangoldt d / real d) x - ln x - (sum_upto (\<lambda>d. mangoldt d / real d) x - \<MM> x)) \<in> O(\<lambda>_. 1)
[PROOF STEP]
by (rule sum_in_bigo)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x - ln x - (f x - \<MM> x)) \<in> O(\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>x. \<MM> x - ln x) \<in> O(\<lambda>_. 1)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x - ln x - (f x - \<MM> x)) \<in> O(\<lambda>_. 1)

goal (1 subgoal):
 1. (\<lambda>x. \<MM> x - ln x) \<in> O(\<lambda>_. 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<MM> x - ln x) \<in> O(\<lambda>_. 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nrows_mult: "nrows ((A::('a::semiring_0) matrix) * B) <= nrows A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nrows (A * B) \<le> nrows A
[PROOF STEP]
by (simp add: times_matrix_def mult_nrows)


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

goal (1 subgoal):
 1. \<lbrakk>j < dim_col M; i < dim_row M\<rbrakk> \<Longrightarrow> (col M j $ i)\<^sup>2 = col M j $ i
[PROOF STEP]
by auto


[STATEMENT]
lemma nat_diff_right_cancel_less: "n - k < (m::nat) - k \<Longrightarrow> n < m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n - k < m - k \<Longrightarrow> n < m
[PROOF STEP]
by simp


[STATEMENT]
lemma bool_sym: "Bool (a = b) = Bool (b = a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Bool (a = b) = Bool (b = a)
[PROOF STEP]
by auto


[STATEMENT]
lemma bitAND_commutes:"m && n = n && m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m && n = n && m
[PROOF STEP]
by (induct m n rule: bitAND_nat.induct, simp) (metis bitAND_rec mult.commute)


[STATEMENT]
lemma mat_of_cblinfun_1:
  "mat_of_cblinfun (1 :: ('a::one_dim \<Rightarrow>\<^sub>C\<^sub>L'b::one_dim)) = 1\<^sub>m 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_of_cblinfun 1 = 1\<^sub>m 1
[PROOF STEP]
apply (rule eq_matI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < dim_row (1\<^sub>m 1); j < dim_col (1\<^sub>m 1)\<rbrakk> \<Longrightarrow> mat_of_cblinfun 1 $$ (i, j) = 1\<^sub>m 1 $$ (i, j)
 2. dim_row (mat_of_cblinfun 1) = dim_row (1\<^sub>m 1)
 3. dim_col (mat_of_cblinfun 1) = dim_col (1\<^sub>m 1)
[PROOF STEP]
by (auto simp: mat_of_cblinfun_def complex_vector.representation_basis nth_eq_iff_index_eq)


[STATEMENT]
lemma lcm_neg_numeral_1 [simp]: "lcm (- numeral n) a = lcm (numeral n) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lcm (- numeral n) a = lcm (numeral n) a
[PROOF STEP]
by (fact lcm_neg1)


[STATEMENT]
lemma surjective_mult_closed:
  "surjective x \<Longrightarrow> surjective y \<Longrightarrow> surjective (x * y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>surjective x; surjective y\<rbrakk> \<Longrightarrow> surjective (x * y)
[PROOF STEP]
by (metis order.antisym mult_semi_associative top_greatest)


[STATEMENT]
lemma Shleg_altdef: "Shleg x = Gen_Shleg n x / fact n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.Shleg x = local.Gen_Shleg n x / fact n
[PROOF STEP]
by (simp add: Shleg_def Gen_Shleg_def gen_shleg_poly_n)


[STATEMENT]
lemma iWeakSince_True_disj: "
  (P t'. t' \<B> t I. True) =
  (I = {} \<or> (\<diamond> t1 I. \<box> t2 (I \<down>> t1). P t2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P t'. t' \<B> t I. True) = (I = {} \<or> (\<diamond> t1 I. \<box> t2 I \<down>> t1. P t2))
[PROOF STEP]
unfolding iTL_defs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<forall>t\<in>I. P t) \<or> (\<exists>t\<in>I. True \<and> Ball (I \<down>> t) P)) = (I = {} \<or> (\<exists>t\<in>I. Ball (I \<down>> t) P))
[PROOF STEP]
by blast


[STATEMENT]
lemma cond_override_filter:
  "\<lbrakk>\<And> k old new. \<lbrakk>s k = Some new; t k = Some old\<rbrakk>
    \<Longrightarrow> (\<not> overC new old \<longrightarrow>  \<not> filterC k new) \<and>
        (overC new old \<longrightarrow> filterC k old \<longrightarrow> filterC k new)
   \<rbrakk> \<Longrightarrow>
    cond_override overC (filter_tab filterC t) (filter_tab filterC s)
    = filter_tab filterC (cond_override overC t s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k old new. \<lbrakk>s k = Some new; t k = Some old\<rbrakk> \<Longrightarrow> (\<not> overC new old \<longrightarrow> \<not> filterC k new) \<and> (overC new old \<longrightarrow> filterC k old \<longrightarrow> filterC k new)) \<Longrightarrow> cond_override overC (filter_tab filterC t) (filter_tab filterC s) = filter_tab filterC (cond_override overC t s)
[PROOF STEP]
by (auto simp add: fun_eq_iff cond_override_def filter_tab_def )


[STATEMENT]
lemma nat_diff_right_cancel_eq1: "\<lbrakk> m - k = n - (k::nat); k < m \<rbrakk> \<Longrightarrow> m = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>m - k = n - k; k < m\<rbrakk> \<Longrightarrow> m = n
[PROOF STEP]
by simp


[STATEMENT]
lemma signed_arith_eq_checks_to_ord:
  "(sint a + sint b = sint (a + b ))
    = ((a <=s a + b) = (0 <=s b))"
  "(sint a - sint b = sint (a - b ))
    = ((0 <=s a - b) = (b <=s a))"
  "(- sint a = sint (- a)) = (0 <=s (- a) = (a <=s 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sint a + sint b = sint (a + b)) = ((a \<le>s a + b) = (0 \<le>s b)) &&& (sint a - sint b = sint (a - b)) = ((0 \<le>s a - b) = (b \<le>s a)) &&& (- sint a = sint (- a)) = ((0 \<le>s - a) = (a \<le>s 0))
[PROOF STEP]
using sint_range'[where x=a] sint_range'[where x=b]
[PROOF STATE]
proof (prove)
using this:
- (2 ^ (LENGTH('a) - Suc 0)) \<le> sint a \<and> sint a < 2 ^ (LENGTH('a) - Suc 0)
- (2 ^ (LENGTH('a) - Suc 0)) \<le> sint b \<and> sint b < 2 ^ (LENGTH('a) - Suc 0)

goal (1 subgoal):
 1. (sint a + sint b = sint (a + b)) = ((a \<le>s a + b) = (0 \<le>s b)) &&& (sint a - sint b = sint (a - b)) = ((0 \<le>s a - b) = (b \<le>s a)) &&& (- sint a = sint (- a)) = ((0 \<le>s - a) = (a \<le>s 0))
[PROOF STEP]
by (simp_all add: sint_word_ariths word_sle_eq word_sless_alt sbintrunc_If)


[STATEMENT]
lemma mat_arc_pos_zero:
  assumes n0: "n > 0"
  shows "\<not> mat_arc_posI arc_pos (0\<^sub>m n n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> mat_arc_pos (0\<^sub>m n n)
[PROOF STEP]
unfolding mat_arc_posI_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> arc_pos (0\<^sub>m n n $$ (0, 0))
[PROOF STEP]
unfolding index_zero_mat(1)[OF n0 n0]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> arc_pos (0::'a)
[PROOF STEP]
using arc_pos_zero
[PROOF STATE]
proof (prove)
using this:
\<not> arc_pos (0::'a)

goal (1 subgoal):
 1. \<not> arc_pos (0::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma gauss_int_norm_eq_Suc_0_iff: "gauss_int_norm x = Suc 0 \<longleftrightarrow> x dvd 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (gauss_int_norm x = Suc 0) = (x dvd 1)
[PROOF STEP]
by (simp add: is_unit_gauss_int_iff')


[STATEMENT]
theorem LT19: "\<turnstile> (A \<leadsto> (D \<or> B)) \<longrightarrow> (B \<leadsto> D) \<longrightarrow> (A \<leadsto> D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> (A \<leadsto> D \<or> B) \<longrightarrow> (B \<leadsto> D) \<longrightarrow> A \<leadsto> D
[PROOF STEP]
using LT18[of "A" "D" "B" "D"] LT1[of "D"]
[PROOF STATE]
proof (prove)
using this:
\<turnstile> (A \<leadsto> D \<or> B) \<longrightarrow> (D \<leadsto> D) \<longrightarrow> (B \<leadsto> D) \<longrightarrow> A \<leadsto> D
\<turnstile> D \<leadsto> D

goal (1 subgoal):
 1. \<turnstile> (A \<leadsto> D \<or> B) \<longrightarrow> (B \<leadsto> D) \<longrightarrow> A \<leadsto> D
[PROOF STEP]
by force


[STATEMENT]
lemma ncop__ncol:
  assumes "\<not> Coplanar A B C D"
  shows "\<not> Col A B C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col A B C
[PROOF STEP]
using assms col__coplanar
[PROOF STATE]
proof (prove)
using this:
\<not> Coplanar A B C D
Col ?A ?B ?C \<Longrightarrow> Coplanar ?A ?B ?C ?D

goal (1 subgoal):
 1. \<not> Col A B C
[PROOF STEP]
by blast


[STATEMENT]
lemma nat_intv_frac_gt0:
  fixes c :: nat fixes x :: real
  assumes "c < x" "x < real (c + 1)"
  shows "frac x > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < frac x
[PROOF STEP]
proof (rule ccontr, auto, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> \<int> \<Longrightarrow> False
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
x \<in> \<int>

goal (1 subgoal):
 1. x \<in> \<int> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> \<int>
[PROOF STEP]
obtain d :: int where d: "x = d"
[PROOF STATE]
proof (prove)
using this:
x \<in> \<int>

goal (1 subgoal):
 1. (\<And>d. x = real_of_int d \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis Ints_cases)
[PROOF STATE]
proof (state)
this:
x = real_of_int d

goal (1 subgoal):
 1. x \<in> \<int> \<Longrightarrow> False
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
real c < x
x < real (c + 1)
x = real_of_int d
[PROOF STEP]
have "c < d" "d < int c + 1"
[PROOF STATE]
proof (prove)
using this:
real c < x
x < real (c + 1)
x = real_of_int d

goal (1 subgoal):
 1. int c < d &&& d < int c + 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
int c < d
d < int c + 1

goal (1 subgoal):
 1. x \<in> \<int> \<Longrightarrow> False
[PROOF STEP]
with int_intv_frac_gt0[OF this] 1 d
[PROOF STATE]
proof (chain)
picking this:
0 < frac (real_of_int d)
x \<in> \<int>
x = real_of_int d
int c < d
d < int c + 1
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
0 < frac (real_of_int d)
x \<in> \<int>
x = real_of_int d
int c < d
d < int c + 1

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma arctan_lower_bound:
  assumes "0 \<le> x"
  shows "x / (1 + x\<^sup>2) \<le> arctan x" (is "?l x \<le> _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x / (1 + x\<^sup>2) \<le> arctan x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x / (1 + x\<^sup>2) \<le> arctan x
[PROOF STEP]
have "?l x - arctan x \<le> ?l 0 - arctan 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x / (1 + x\<^sup>2) - arctan x \<le> 0 / (1 + 0\<^sup>2) - arctan 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> x

goal (1 subgoal):
 1. x / (1 + x\<^sup>2) - arctan x \<le> 0 / (1 + 0\<^sup>2) - arctan 0
[PROOF STEP]
by (intro DERIV_nonpos_imp_nonincreasing[where f="\<lambda>x. ?l x - arctan x"])
      (auto intro!: derivative_eq_intros simp: add_nonneg_eq_0_iff field_simps)
[PROOF STATE]
proof (state)
this:
x / (1 + x\<^sup>2) - arctan x \<le> 0 / (1 + 0\<^sup>2) - arctan 0

goal (1 subgoal):
 1. x / (1 + x\<^sup>2) \<le> arctan x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x / (1 + x\<^sup>2) - arctan x \<le> 0 / (1 + 0\<^sup>2) - arctan 0

goal (1 subgoal):
 1. x / (1 + x\<^sup>2) \<le> arctan x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x / (1 + x\<^sup>2) \<le> arctan x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pmf_of_set_impl_code_alt:
  assumes "A \<noteq> {}" "finite A"
  shows   "pmf_of_set_impl A =
             (let p = 1 / real (card A)
              in  Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
define p where "p = 1 / real (card A)"
[PROOF STATE]
proof (state)
this:
p = 1 / real (card A)

goal (1 subgoal):
 1. pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
let ?m = "Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
interpret comp_fun_idem "\<lambda>x. Mapping.update x p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comp_fun_idem (\<lambda>x. Mapping.update x p)
[PROOF STEP]
by standard (transfer, force simp: fun_eq_iff)+
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
have keys: "Mapping.keys ?m = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Mapping.keys (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) = A
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. Mapping.keys (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) = A
[PROOF STEP]
by (induction A rule: finite_induct) simp_all
[PROOF STATE]
proof (state)
this:
Mapping.keys (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) = A

goal (1 subgoal):
 1. pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
have lookup: "Mapping.lookup ?m x = Some p" if "x \<in> A" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Mapping.lookup (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) x = Some p
[PROOF STEP]
using assms(2) that
[PROOF STATE]
proof (prove)
using this:
finite A
x \<in> A

goal (1 subgoal):
 1. Mapping.lookup (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) x = Some p
[PROOF STEP]
by (induction A rule: finite_induct) (auto simp: lookup_update')
[PROOF STATE]
proof (state)
this:
?x \<in> A \<Longrightarrow> Mapping.lookup (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) ?x = Some p

goal (1 subgoal):
 1. pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
from keys lookup assms
[PROOF STATE]
proof (chain)
picking this:
Mapping.keys (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) = A
?x \<in> A \<Longrightarrow> Mapping.lookup (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) ?x = Some p
A \<noteq> {}
finite A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Mapping.keys (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) = A
?x \<in> A \<Longrightarrow> Mapping.lookup (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) ?x = Some p
A \<noteq> {}
finite A

goal (1 subgoal):
 1. pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
unfolding pmf_of_set_impl_def
[PROOF STATE]
proof (prove)
using this:
Mapping.keys (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) = A
?x \<in> A \<Longrightarrow> Mapping.lookup (Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A) ?x = Some p
A \<noteq> {}
finite A

goal (1 subgoal):
 1. mapping_of_pmf (pmf_of_set A) = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)
[PROOF STEP]
by (intro mapping_of_pmfI) (simp_all add: Let_def p_def)
[PROOF STATE]
proof (state)
this:
pmf_of_set_impl A = (let p = 1 / real (card A) in Finite_Set.fold (\<lambda>x. Mapping.update x p) Mapping.empty A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finprod_singleton_set[simp]: assumes "f a \<in> carrier G"
  shows "finprod G f {a} = f a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finprod G f {a} = f a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finprod G f {a} = f a
[PROOF STEP]
have "finprod G f {a} = f a \<otimes> finprod G f {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finprod G f {a} = f a \<otimes> finprod G f {}
[PROOF STEP]
by (rule finprod_insert, insert assms, auto)
[PROOF STATE]
proof (state)
this:
finprod G f {a} = f a \<otimes> finprod G f {}

goal (1 subgoal):
 1. finprod G f {a} = f a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
finprod G f {a} = f a \<otimes> finprod G f {}

goal (1 subgoal):
 1. finprod G f {a} = f a
[PROOF STEP]
have "\<dots> = f a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f a \<otimes> finprod G f {} = f a
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f a \<in> carrier G

goal (1 subgoal):
 1. f a \<otimes> finprod G f {} = f a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f a \<otimes> finprod G f {} = f a

goal (1 subgoal):
 1. finprod G f {a} = f a
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
finprod G f {a} = f a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finprod G f {a} = f a

goal (1 subgoal):
 1. finprod G f {a} = f a
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
finprod G f {a} = f a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fls_mult_commute_subdegree_ge_0:
  fixes   f g :: "'a::comm_semiring_0 fls"
  assumes "fls_subdegree f \<ge> 0" "fls_subdegree g \<ge> 0"
  shows   "f * g = g * f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f * g = g * f
[PROOF STEP]
using   assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> fls_subdegree f
0 \<le> fls_subdegree g

goal (1 subgoal):
 1. f * g = g * f
[PROOF STEP]
by      (simp add: fls_times_conv_fps_times mult.commute)


[STATEMENT]
lemma diagonal_to_Smith_PQ_exists:
  fixes A::"'a::{bezout_ring}^'cols::{mod_type}^'rows::{mod_type}"
  assumes A: "isDiagonal A"
  shows "\<exists>P Q.
         invertible (P::'a^'rows::{mod_type}^'rows::{mod_type})
       \<and> invertible (Q::'a^'cols::{mod_type}^'cols::{mod_type})
       \<and> Smith_normal_form (P**A**Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)
[PROOF STEP]
obtain bezout::"'a bezout" where ib: "is_bezout_ext bezout"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>bezout. is_bezout_ext bezout \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using exists_bezout_ext
[PROOF STATE]
proof (prove)
using this:
\<exists>bezout_ext. is_bezout_ext bezout_ext

goal (1 subgoal):
 1. (\<And>bezout. is_bezout_ext bezout \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
is_bezout_ext bezout

goal (1 subgoal):
 1. \<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)
[PROOF STEP]
obtain P B Q where PBQ: "(P,B,Q) = diagonal_to_Smith_PQ A bezout"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>P B Q. (P, B, Q) = diagonal_to_Smith_PQ A bezout \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis prod_cases3)
[PROOF STATE]
proof (state)
this:
(P, B, Q) = diagonal_to_Smith_PQ A bezout

goal (1 subgoal):
 1. \<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)
[PROOF STEP]
have "B = P**A**Q \<and> invertible P \<and> invertible Q \<and> B = diagonal_to_Smith A bezout"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B = P ** A ** Q \<and> invertible P \<and> invertible Q \<and> B = diagonal_to_Smith A bezout
[PROOF STEP]
by (rule diagonal_to_Smith_PQ[OF A ib PBQ])
[PROOF STATE]
proof (state)
this:
B = P ** A ** Q \<and> invertible P \<and> invertible Q \<and> B = diagonal_to_Smith A bezout

goal (1 subgoal):
 1. \<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
B = P ** A ** Q \<and> invertible P \<and> invertible Q \<and> B = diagonal_to_Smith A bezout

goal (1 subgoal):
 1. \<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)
[PROOF STEP]
have "Smith_normal_form (P**A**Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Smith_normal_form (P ** A ** Q)
[PROOF STEP]
using Smith_normal_form_diagonal_to_Smith assms calculation ib
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>is_bezout_ext ?bezout; isDiagonal ?A\<rbrakk> \<Longrightarrow> Smith_normal_form (diagonal_to_Smith ?A ?bezout)
isDiagonal A
B = P ** A ** Q \<and> invertible P \<and> invertible Q \<and> B = diagonal_to_Smith A bezout
is_bezout_ext bezout

goal (1 subgoal):
 1. Smith_normal_form (P ** A ** Q)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
Smith_normal_form (P ** A ** Q)

goal (1 subgoal):
 1. \<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
B = P ** A ** Q \<and> invertible P \<and> invertible Q \<and> B = diagonal_to_Smith A bezout
Smith_normal_form (P ** A ** Q)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
B = P ** A ** Q \<and> invertible P \<and> invertible Q \<and> B = diagonal_to_Smith A bezout
Smith_normal_form (P ** A ** Q)

goal (1 subgoal):
 1. \<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>P Q. invertible P \<and> invertible Q \<and> Smith_normal_form (P ** A ** Q)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma coeffs_smult [code abstract]:
  "coeffs (smult a p) = (if a = 0 then [] else map (Groups.times a) (coeffs p))"
  for p :: "'a::{comm_semiring_0,semiring_no_zero_divisors} poly"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coeffs (smult a p) = (if a = (0::'a) then [] else map ((*) a) (coeffs p))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. coeffs (smult a p) = (if a = (0::'a) then [] else map ((*) a) (coeffs p))
[PROOF STEP]
have eq_0: "HOL.eq 0 \<circ> times a = HOL.eq (0::'a)" if "a \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (=) (0::'a) \<circ> (*) a = (=) (0::'a)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a)

goal (1 subgoal):
 1. (=) (0::'a) \<circ> (*) a = (=) (0::'a)
[PROOF STEP]
by (simp add: fun_eq_iff)
[PROOF STATE]
proof (state)
this:
a \<noteq> (0::'a) \<Longrightarrow> (=) (0::'a) \<circ> (*) a = (=) (0::'a)

goal (1 subgoal):
 1. coeffs (smult a p) = (if a = (0::'a) then [] else map ((*) a) (coeffs p))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coeffs (smult a p) = (if a = (0::'a) then [] else map ((*) a) (coeffs p))
[PROOF STEP]
by (rule coeffs_eqI) (auto simp add: no_trailing_map nth_default_map_eq nth_default_coeffs_eq eq_0)
[PROOF STATE]
proof (state)
this:
coeffs (smult a p) = (if a = (0::'a) then [] else map ((*) a) (coeffs p))

goal:
No subgoals!
[PROOF STEP]
qed