[STATEMENT]
lemma unique_eigenvector_jnf: assumes jnf: "jordan_nf (A :: 'a :: field mat) n_as"
  and ord: "order lam (char_poly A) = 1"
  and ev: "eigenvector A v lam" "eigenvector A w lam"
shows "\<exists> a. v = a \<cdot>\<^sub>v w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
let ?cA = "char_matrix A lam"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from similar_matD jnf[unfolded jordan_nf_def]
[PROOF STATE]
proof (chain)
picking this:
similar_mat ?A ?B \<Longrightarrow> \<exists>n P Q. {?A, ?B, P, Q} \<subseteq> carrier_mat n n \<and> P * Q = 1\<^sub>m n \<and> Q * P = 1\<^sub>m n \<and> ?A = P * ?B * Q
0 \<notin> fst ` set n_as \<and> similar_mat A (jordan_matrix n_as)
[PROOF STEP]
obtain n where
    A: "A \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
using this:
similar_mat ?A ?B \<Longrightarrow> \<exists>n P Q. {?A, ?B, P, Q} \<subseteq> carrier_mat n n \<and> P * Q = 1\<^sub>m n \<and> Q * P = 1\<^sub>m n \<and> ?A = P * ?B * Q
0 \<notin> fst ` set n_as \<and> similar_mat A (jordan_matrix n_as)

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

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from dim_gen_eigenspace_order_char_poly[OF jnf, of lam 1, unfolded ord]
[PROOF STATE]
proof (chain)
picking this:
dim_gen_eigenspace A lam 1 \<le> 1
[PROOF STEP]
have dim: "kernel_dim ?cA \<le> 1"
[PROOF STATE]
proof (prove)
using this:
dim_gen_eigenspace A lam 1 \<le> 1

goal (1 subgoal):
 1. kernel_dim (char_matrix A lam) \<le> 1
[PROOF STEP]
unfolding dim_gen_eigenspace_def
[PROOF STATE]
proof (prove)
using this:
kernel_dim (char_matrix A lam ^\<^sub>m 1) \<le> 1

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

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from eigenvector_mat_kernel_char_matrix[OF A ev(1)]
[PROOF STATE]
proof (chain)
picking this:
v \<in> mat_kernel (char_matrix A lam)
[PROOF STEP]
have vk: "v \<in> mat_kernel ?cA"
[PROOF STATE]
proof (prove)
using this:
v \<in> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. v \<in> mat_kernel (char_matrix A lam)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
v \<in> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from eigenvector_mat_kernel_char_matrix[OF A ev(2)]
[PROOF STATE]
proof (chain)
picking this:
w \<in> mat_kernel (char_matrix A lam)
[PROOF STEP]
have wk: "w \<in> mat_kernel ?cA"
[PROOF STATE]
proof (prove)
using this:
w \<in> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. w \<in> mat_kernel (char_matrix A lam)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
w \<in> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from ev[unfolded eigenvector_def] A
[PROOF STATE]
proof (chain)
picking this:
v \<in> carrier_vec (dim_row A) \<and> v \<noteq> 0\<^sub>v (dim_row A) \<and> A *\<^sub>v v = lam \<cdot>\<^sub>v v
w \<in> carrier_vec (dim_row A) \<and> w \<noteq> 0\<^sub>v (dim_row A) \<and> A *\<^sub>v w = lam \<cdot>\<^sub>v w
A \<in> carrier_mat n n
[PROOF STEP]
have
    v: "v \<in> carrier_vec n" "v \<noteq> 0\<^sub>v n" and
    w: "w \<in> carrier_vec n" "w \<noteq> 0\<^sub>v n"
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec (dim_row A) \<and> v \<noteq> 0\<^sub>v (dim_row A) \<and> A *\<^sub>v v = lam \<cdot>\<^sub>v v
w \<in> carrier_vec (dim_row A) \<and> w \<noteq> 0\<^sub>v (dim_row A) \<and> A *\<^sub>v w = lam \<cdot>\<^sub>v w
A \<in> carrier_mat n n

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

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
have cA: "?cA \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. char_matrix A lam \<in> carrier_mat n n
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n

goal (1 subgoal):
 1. char_matrix A lam \<in> carrier_mat n n
[PROOF STEP]
unfolding char_matrix_def
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n

goal (1 subgoal):
 1. A + - lam \<cdot>\<^sub>m 1\<^sub>m (dim_row A) \<in> carrier_mat n n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
char_matrix A lam \<in> carrier_mat n n

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
interpret kernel n n ?cA
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Matrix_Kernel.kernel n n (char_matrix A lam)
[PROOF STEP]
by (unfold_locales, rule cA)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from kernel_basis_exists[OF A]
[PROOF STATE]
proof (chain)
picking this:
\<exists>B. finite B \<and> basis B
[PROOF STEP]
obtain B where B: "finite B" "basis B"
[PROOF STATE]
proof (prove)
using this:
\<exists>B. finite B \<and> basis B

goal (1 subgoal):
 1. (\<And>B. \<lbrakk>finite B; basis B\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite B
basis B

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from this[unfolded Ker.basis_def]
[PROOF STATE]
proof (chain)
picking this:
finite B
lin_indpt B \<and> local.span B = mat_kernel (char_matrix A lam) \<and> B \<subseteq> mat_kernel (char_matrix A lam)
[PROOF STEP]
have basis: "mat_kernel ?cA = span B"
[PROOF STATE]
proof (prove)
using this:
finite B
lin_indpt B \<and> local.span B = mat_kernel (char_matrix A lam) \<and> B \<subseteq> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. mat_kernel (char_matrix A lam) = local.span B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mat_kernel (char_matrix A lam) = local.span B

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
mat_kernel (char_matrix A lam) = local.span B

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
assume "card B = 0"
[PROOF STATE]
proof (state)
this:
card B = 0

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
with B basis
[PROOF STATE]
proof (chain)
picking this:
finite B
basis B
mat_kernel (char_matrix A lam) = local.span B
card B = 0
[PROOF STEP]
have bas: "mat_kernel ?cA = local.span {}"
[PROOF STATE]
proof (prove)
using this:
finite B
basis B
mat_kernel (char_matrix A lam) = local.span B
card B = 0

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

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
mat_kernel (char_matrix A lam) = local.span {}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
have "\<dots> = {0\<^sub>v n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.span {} = {0\<^sub>v n}
[PROOF STEP]
unfolding Ker.span_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {lincomb a A |a A. finite A \<and> A \<subseteq> {} \<and> a \<in> A \<rightarrow> UNIV} = {0\<^sub>v n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
local.span {} = {0\<^sub>v n}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
mat_kernel (char_matrix A lam) = {0\<^sub>v n}
[PROOF STEP]
have False
[PROOF STATE]
proof (prove)
using this:
mat_kernel (char_matrix A lam) = {0\<^sub>v n}

goal (1 subgoal):
 1. False
[PROOF STEP]
using v vk
[PROOF STATE]
proof (prove)
using this:
mat_kernel (char_matrix A lam) = {0\<^sub>v n}
v \<in> carrier_vec n
v \<noteq> 0\<^sub>v n
v \<in> mat_kernel (char_matrix A lam)

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

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
card B = 0 \<Longrightarrow> False

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
with Ker.dim_basis[OF B] dim
[PROOF STATE]
proof (chain)
picking this:
local.dim = card B
kernel_dim (char_matrix A lam) \<le> 1
card B = 0 \<Longrightarrow> False
[PROOF STEP]
have "card B = Suc 0"
[PROOF STATE]
proof (prove)
using this:
local.dim = card B
kernel_dim (char_matrix A lam) \<le> 1
card B = 0 \<Longrightarrow> False

goal (1 subgoal):
 1. card B = Suc 0
[PROOF STEP]
by (cases "card B", auto)
[PROOF STATE]
proof (state)
this:
card B = Suc 0

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
hence "\<exists> b. B = {b}"
[PROOF STATE]
proof (prove)
using this:
card B = Suc 0

goal (1 subgoal):
 1. \<exists>b. B = {b}
[PROOF STEP]
using card_eq_SucD
[PROOF STATE]
proof (prove)
using this:
card B = Suc 0
card ?A = Suc ?k \<Longrightarrow> \<exists>b B. ?A = insert b B \<and> b \<notin> B \<and> card B = ?k \<and> (?k = 0 \<longrightarrow> B = {})

goal (1 subgoal):
 1. \<exists>b. B = {b}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>b. B = {b}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>b. B = {b}
[PROOF STEP]
obtain b where Bb: "B = {b}"
[PROOF STATE]
proof (prove)
using this:
\<exists>b. B = {b}

goal (1 subgoal):
 1. (\<And>b. B = {b} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
B = {b}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from B(2)[unfolded Bb Ker.basis_def]
[PROOF STATE]
proof (chain)
picking this:
lin_indpt {b} \<and> local.span {b} = mat_kernel (char_matrix A lam) \<and> {b} \<subseteq> mat_kernel (char_matrix A lam)
[PROOF STEP]
have bk: "b \<in> mat_kernel ?cA"
[PROOF STATE]
proof (prove)
using this:
lin_indpt {b} \<and> local.span {b} = mat_kernel (char_matrix A lam) \<and> {b} \<subseteq> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. b \<in> mat_kernel (char_matrix A lam)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
b \<in> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
hence b: "b \<in> carrier_vec n"
[PROOF STATE]
proof (prove)
using this:
b \<in> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. b \<in> carrier_vec n
[PROOF STEP]
using cA mat_kernelD(1)
[PROOF STATE]
proof (prove)
using this:
b \<in> mat_kernel (char_matrix A lam)
char_matrix A lam \<in> carrier_mat n n
\<lbrakk>?A \<in> carrier_mat ?nr ?nc; ?v \<in> mat_kernel ?A\<rbrakk> \<Longrightarrow> ?v \<in> carrier_vec ?nc

goal (1 subgoal):
 1. b \<in> carrier_vec n
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
b \<in> carrier_vec n

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from Bb basis
[PROOF STATE]
proof (chain)
picking this:
B = {b}
mat_kernel (char_matrix A lam) = local.span B
[PROOF STEP]
have "mat_kernel ?cA = span {b}"
[PROOF STATE]
proof (prove)
using this:
B = {b}
mat_kernel (char_matrix A lam) = local.span B

goal (1 subgoal):
 1. mat_kernel (char_matrix A lam) = local.span {b}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mat_kernel (char_matrix A lam) = local.span {b}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
mat_kernel (char_matrix A lam) = local.span {b}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
have "\<dots> = NC.span {b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.span {b} = NC.span {b}
[PROOF STEP]
by (rule span_same, insert bk, auto)
[PROOF STATE]
proof (state)
this:
local.span {b} = NC.span {b}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
local.span {b} = NC.span {b}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
have "\<dots> \<subseteq> { a \<cdot>\<^sub>v b | a. True}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
assume "x \<in> NC.span {b}"
[PROOF STATE]
proof (state)
this:
x \<in> NC.span {b}

goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
from this[unfolded NC.span_def]
[PROOF STATE]
proof (chain)
picking this:
x \<in> {NC.lincomb a A |a A. finite A \<and> A \<subseteq> {b}}
[PROOF STEP]
obtain a A
        where x: "x = NC.lincomb a A" and A: "A \<subseteq> {b}"
[PROOF STATE]
proof (prove)
using this:
x \<in> {NC.lincomb a A |a A. finite A \<and> A \<subseteq> {b}}

goal (1 subgoal):
 1. (\<And>a A. \<lbrakk>x = NC.lincomb a A; A \<subseteq> {b}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = NC.lincomb a A
A \<subseteq> {b}

goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
hence "A = {} \<or> A = {b}"
[PROOF STATE]
proof (prove)
using this:
x = NC.lincomb a A
A \<subseteq> {b}

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

goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
hence "\<exists> a. x = a \<cdot>\<^sub>v b"
[PROOF STATE]
proof (prove)
using this:
A = {} \<or> A = {b}

goal (1 subgoal):
 1. \<exists>a. x = a \<cdot>\<^sub>v b
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A = {} \<Longrightarrow> \<exists>a. x = a \<cdot>\<^sub>v b
 2. A = {b} \<Longrightarrow> \<exists>a. x = a \<cdot>\<^sub>v b
[PROOF STEP]
assume "A = {}"
[PROOF STATE]
proof (state)
this:
A = {}

goal (2 subgoals):
 1. A = {} \<Longrightarrow> \<exists>a. x = a \<cdot>\<^sub>v b
 2. A = {b} \<Longrightarrow> \<exists>a. x = a \<cdot>\<^sub>v b
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
A = {}

goal (1 subgoal):
 1. \<exists>a. x = a \<cdot>\<^sub>v b
[PROOF STEP]
unfolding x
[PROOF STATE]
proof (prove)
using this:
A = {}

goal (1 subgoal):
 1. \<exists>aa. NC.lincomb a A = aa \<cdot>\<^sub>v b
[PROOF STEP]
using b
[PROOF STATE]
proof (prove)
using this:
A = {}
b \<in> carrier_vec n

goal (1 subgoal):
 1. \<exists>aa. NC.lincomb a A = aa \<cdot>\<^sub>v b
[PROOF STEP]
by (intro exI[of _ 0], auto)
[PROOF STATE]
proof (state)
this:
\<exists>a. x = a \<cdot>\<^sub>v b

goal (1 subgoal):
 1. A = {b} \<Longrightarrow> \<exists>a. x = a \<cdot>\<^sub>v b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A = {b} \<Longrightarrow> \<exists>a. x = a \<cdot>\<^sub>v b
[PROOF STEP]
assume "A = {b}"
[PROOF STATE]
proof (state)
this:
A = {b}

goal (1 subgoal):
 1. A = {b} \<Longrightarrow> \<exists>a. x = a \<cdot>\<^sub>v b
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
A = {b}

goal (1 subgoal):
 1. \<exists>a. x = a \<cdot>\<^sub>v b
[PROOF STEP]
unfolding x
[PROOF STATE]
proof (prove)
using this:
A = {b}

goal (1 subgoal):
 1. \<exists>aa. NC.lincomb a A = aa \<cdot>\<^sub>v b
[PROOF STEP]
using b
[PROOF STATE]
proof (prove)
using this:
A = {b}
b \<in> carrier_vec n

goal (1 subgoal):
 1. \<exists>aa. NC.lincomb a A = aa \<cdot>\<^sub>v b
[PROOF STEP]
by (intro exI[of _ "a b"], auto simp: NC.lincomb_def)
[PROOF STATE]
proof (state)
this:
\<exists>a. x = a \<cdot>\<^sub>v b

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>a. x = a \<cdot>\<^sub>v b

goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x3 \<in> NC.span {b} \<Longrightarrow> \<exists>a. ?x3 = a \<cdot>\<^sub>v b

goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
?x3 \<in> NC.span {b} \<Longrightarrow> \<exists>a. ?x3 = a \<cdot>\<^sub>v b

goal (1 subgoal):
 1. NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
NC.span {b} \<subseteq> {a \<cdot>\<^sub>v b |a. True}

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
mat_kernel (char_matrix A lam) \<subseteq> {a \<cdot>\<^sub>v b |a. True}
[PROOF STEP]
obtain vv ww where vb: "v = vv \<cdot>\<^sub>v b" and wb: "w = ww \<cdot>\<^sub>v b"
[PROOF STATE]
proof (prove)
using this:
mat_kernel (char_matrix A lam) \<subseteq> {a \<cdot>\<^sub>v b |a. True}

goal (1 subgoal):
 1. (\<And>vv ww. \<lbrakk>v = vv \<cdot>\<^sub>v b; w = ww \<cdot>\<^sub>v b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using vk wk
[PROOF STATE]
proof (prove)
using this:
mat_kernel (char_matrix A lam) \<subseteq> {a \<cdot>\<^sub>v b |a. True}
v \<in> mat_kernel (char_matrix A lam)
w \<in> mat_kernel (char_matrix A lam)

goal (1 subgoal):
 1. (\<And>vv ww. \<lbrakk>v = vv \<cdot>\<^sub>v b; w = ww \<cdot>\<^sub>v b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force+
[PROOF STATE]
proof (state)
this:
v = vv \<cdot>\<^sub>v b
w = ww \<cdot>\<^sub>v b

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from wb w b
[PROOF STATE]
proof (chain)
picking this:
w = ww \<cdot>\<^sub>v b
w \<in> carrier_vec n
w \<noteq> 0\<^sub>v n
b \<in> carrier_vec n
[PROOF STEP]
have ww: "ww \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
w = ww \<cdot>\<^sub>v b
w \<in> carrier_vec n
w \<noteq> 0\<^sub>v n
b \<in> carrier_vec n

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

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from arg_cong[OF wb, of "\<lambda> x. inverse ww \<cdot>\<^sub>v x"] w ww b
[PROOF STATE]
proof (chain)
picking this:
inverse ww \<cdot>\<^sub>v w = inverse ww \<cdot>\<^sub>v (ww \<cdot>\<^sub>v b)
w \<in> carrier_vec n
w \<noteq> 0\<^sub>v n
ww \<noteq> (0::'a)
b \<in> carrier_vec n
[PROOF STEP]
have "b = inverse ww \<cdot>\<^sub>v w"
[PROOF STATE]
proof (prove)
using this:
inverse ww \<cdot>\<^sub>v w = inverse ww \<cdot>\<^sub>v (ww \<cdot>\<^sub>v b)
w \<in> carrier_vec n
w \<noteq> 0\<^sub>v n
ww \<noteq> (0::'a)
b \<in> carrier_vec n

goal (1 subgoal):
 1. b = inverse ww \<cdot>\<^sub>v w
[PROOF STEP]
by (auto simp: smult_smult_assoc)
[PROOF STATE]
proof (state)
this:
b = inverse ww \<cdot>\<^sub>v w

goal (1 subgoal):
 1. \<exists>a. v = a \<cdot>\<^sub>v w
[PROOF STEP]
from vb[unfolded this smult_smult_assoc]
[PROOF STATE]
proof (chain)
picking this:
v = vv * inverse ww \<cdot>\<^sub>v w
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
v = vv * inverse ww \<cdot>\<^sub>v w

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma floor_numeral [simp]: "\<lfloor>numeral v\<rfloor> = numeral v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lfloor>numeral v\<rfloor> = numeral v
[PROOF STEP]
using floor_of_int [of "numeral v"]
[PROOF STATE]
proof (prove)
using this:
\<lfloor>of_int (numeral v)\<rfloor> = numeral v

goal (1 subgoal):
 1. \<lfloor>numeral v\<rfloor> = numeral v
[PROOF STEP]
by simp


[STATEMENT]
lemma cofactorM_row_code [code abstract]: "vec_nth (cofactorM_row A i) = cofactor A i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (cofactorM_row A i) = cofactor A i
[PROOF STEP]
by (simp add: fun_eq_iff cofactorM_row_def cofactor_def cofactorM_def)


[STATEMENT]
lemma lrev_work2_lrev_work1_eq: "lrev_work2 = lrev_work1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lrev_work2 = lrev_work1
[PROOF STEP]
by (unfold lrev_work2_def lrev_work1_def
     , rule cfun_arg_cong[OF lrev_body2_lrev_body1_eq])


[STATEMENT]
lemma trm_cases:
  assumes
    "M = Unit \<Longrightarrow> P M"
    "\<And>x. M = Var x \<Longrightarrow> P M"
    "\<And>A B. M = App A B \<Longrightarrow> P M"
    "\<And>x T A. M = Fn x T A \<Longrightarrow> P M"
    "\<And>A B. M = Pair A B \<Longrightarrow> P M"
    "\<And>A. M = Fst A \<Longrightarrow> P M"
    "\<And>A. M = Snd A \<Longrightarrow> P M"
  shows "P M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P M
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
M = Unit \<Longrightarrow> P M
M = Var ?x \<Longrightarrow> P M
M = App ?A ?B \<Longrightarrow> P M
M = Fn ?x ?T ?A \<Longrightarrow> P M
M = SimplyTyped.Pair ?A ?B \<Longrightarrow> P M
M = Fst ?A \<Longrightarrow> P M
M = Snd ?A \<Longrightarrow> P M

goal (1 subgoal):
 1. P M
[PROOF STEP]
by(induction rule: trm_induct, auto)


[STATEMENT]
lemma inj_on_word_of_int: \<open>inj_on (word_of_int :: int \<Rightarrow> 'a word) {0..<2 ^ LENGTH('a::len)}\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on word_of_int {0..<2 ^ LENGTH('a)}
[PROOF STEP]
unfolding inj_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>{0..<2 ^ LENGTH('a)}. \<forall>y\<in>{0..<2 ^ LENGTH('a)}. word_of_int x = word_of_int y \<longrightarrow> x = y
[PROOF STEP]
by (metis atLeastLessThan_iff word_of_int_inverse)


[STATEMENT]
lemma Upair_inject [simp]: "Upair a b = Upair c d \<longleftrightarrow> a = c \<and> b = d \<or> a = d \<and> b = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Upair a b = Upair c d) = (a = c \<and> b = d \<or> a = d \<and> b = c)
[PROOF STEP]
by transfer auto


[STATEMENT]
lemma DomAppendUnion[rule_format]: "\<forall> ab. Dom (a @ ab) = Dom a \<union> Dom ab"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>ab. Dom (a @ ab) = Dom a \<union> Dom ab
[PROOF STEP]
apply (induct a)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<forall>ab. Dom ([] @ ab) = Dom [] \<union> Dom ab
 2. \<And>a1 a2. \<forall>ab. Dom (a2 @ ab) = Dom a2 \<union> Dom ab \<Longrightarrow> \<forall>ab. Dom ((a1 # a2) @ ab) = Dom (a1 # a2) \<union> Dom ab
[PROOF STEP]
apply (simp add: Dom_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a1 a2. \<forall>ab. Dom (a2 @ ab) = Dom a2 \<union> Dom ab \<Longrightarrow> \<forall>ab. Dom ((a1 # a2) @ ab) = Dom (a1 # a2) \<union> Dom ab
[PROOF STEP]
apply (simp add: Dom_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a1 a2. \<forall>ab. {l. \<exists>a. lookup (a2 @ ab) l = Some a} = {l. \<exists>a. lookup a2 l = Some a} \<union> {l. \<exists>a. lookup ab l = Some a} \<Longrightarrow> \<forall>ab. {l. fst a1 \<noteq> l \<longrightarrow> (\<exists>a. lookup (a2 @ ab) l = Some a)} = {l. fst a1 \<noteq> l \<longrightarrow> (\<exists>a. lookup a2 l = Some a)} \<union> {l. \<exists>a. lookup ab l = Some a}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a a2 ab. \<forall>ab. {l. \<exists>a. lookup (a2 @ ab) l = Some a} = {l. \<exists>a. lookup a2 l = Some a} \<union> {l. \<exists>a. lookup ab l = Some a} \<Longrightarrow> {l. a \<noteq> l \<longrightarrow> (\<exists>a. lookup (a2 @ ab) l = Some a)} = {l. a \<noteq> l \<longrightarrow> (\<exists>a. lookup a2 l = Some a)} \<union> {l. \<exists>a. lookup ab l = Some a}
[PROOF STEP]
apply fast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma permute_profile_iff [simp]:
  fixes R :: "('agent, 'alt) pref_profile"
  assumes "\<sigma> permutes alts" "x \<in> alts" "y \<in> alts"
  defines "R' \<equiv> permute_profile \<sigma> R"
  shows   "\<sigma> x \<preceq>[R' i] \<sigma> y \<longleftrightarrow> x \<preceq>[R i] y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R' i (\<sigma> x) (\<sigma> y) = R i x y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<sigma> permutes alts
x \<in> alts
y \<in> alts
R' \<equiv> permute_profile \<sigma> R

goal (1 subgoal):
 1. R' i (\<sigma> x) (\<sigma> y) = R i x y
[PROOF STEP]
by (simp add: permute_profile_def permutes_inverses)


[STATEMENT]
lemma zero_aezfun_transfer : "Abs_aezfun ((0::'b::zero) \<delta> (0::'a::zero)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
define zb za where "zb = (0::'b)" and "za = (0::'a)"
[PROOF STATE]
proof (state)
this:
zb = (0::'b)
za = (0::'a)

goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
hence "zb \<delta> za = 0"
[PROOF STATE]
proof (prove)
using this:
zb = (0::'b)
za = (0::'a)

goal (1 subgoal):
 1. zb \<delta> za = 0
[PROOF STEP]
using deltafun0[of za]
[PROOF STATE]
proof (prove)
using this:
zb = (0::'b)
za = (0::'a)
(0::?'b) \<delta> za = 0

goal (1 subgoal):
 1. zb \<delta> za = 0
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
zb \<delta> za = 0

goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
zb \<delta> za = 0

goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
have "aezfun 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aezfun 0 = 0
[PROOF STEP]
using zero_aezfun.rep_eq
[PROOF STATE]
proof (prove)
using this:
aezfun 0 = 0

goal (1 subgoal):
 1. aezfun 0 = 0
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
aezfun 0 = 0

goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
zb \<delta> za = 0
aezfun 0 = 0
[PROOF STEP]
have "zb \<delta> za = aezfun 0"
[PROOF STATE]
proof (prove)
using this:
zb \<delta> za = 0
aezfun 0 = 0

goal (1 subgoal):
 1. zb \<delta> za = aezfun 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
zb \<delta> za = aezfun 0

goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
with zb_def za_def
[PROOF STATE]
proof (chain)
picking this:
zb = (0::'b)
za = (0::'a)
zb \<delta> za = aezfun 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
zb = (0::'b)
za = (0::'a)
zb \<delta> za = aezfun 0

goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
using aezfun_inverse
[PROOF STATE]
proof (prove)
using this:
zb = (0::'b)
za = (0::'a)
zb \<delta> za = aezfun 0
Abs_aezfun (aezfun ?x) = ?x

goal (1 subgoal):
 1. Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Abs_aezfun ((0::'b) \<delta> (0::'a)) = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma  vec_hom_inj: "map_vec hom v = map_vec hom w \<Longrightarrow> v = w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_vec hom v = map_vec hom w \<Longrightarrow> v = w
[PROOF STEP]
unfolding vec_eq_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec (map_vec hom v) = dim_vec (map_vec hom w) \<and> (\<forall>i<dim_vec (map_vec hom w). map_vec hom v $ i = map_vec hom w $ i) \<Longrightarrow> dim_vec v = dim_vec w \<and> (\<forall>i<dim_vec w. v $ i = w $ i)
[PROOF STEP]
by auto


[STATEMENT]
lemma ord_iso_Inf_pres:
  fixes f :: "'a::complete_lattice \<Rightarrow> 'b::complete_lattice"
  shows "ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
let ?g = "the_inv f"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
assume h: "ord_iso f"
[PROOF STATE]
proof (state)
this:
ord_iso f

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
hence a: "mono ?g"
[PROOF STATE]
proof (prove)
using this:
ord_iso f

goal (1 subgoal):
 1. mono (the_inv f)
[PROOF STEP]
by (simp add: ord_iso_the_inv)
[PROOF STATE]
proof (state)
this:
mono (the_inv f)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
mono (the_inv f)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
fix X :: "'a::complete_lattice set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
fix y :: "'b::complete_lattice"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
have "(y \<le> f (\<Sqinter>X)) = (?g y \<le> \<Sqinter>X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y \<le> f (\<Sqinter> X)) = (the_inv f y \<le> \<Sqinter> X)
[PROOF STEP]
by (metis (mono_tags, lifting) UNIV_I f_the_inv_into_f h monoD ord_embed_alt ord_embed_inj ord_iso_alt)
[PROOF STATE]
proof (state)
this:
(y \<le> f (\<Sqinter> X)) = (the_inv f y \<le> \<Sqinter> X)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(y \<le> f (\<Sqinter> X)) = (the_inv f y \<le> \<Sqinter> X)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
have "... = (\<forall>x \<in> X. ?g y \<le> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (the_inv f y \<le> \<Sqinter> X) = (\<forall>x\<in>X. the_inv f y \<le> x)
[PROOF STEP]
by (simp add: le_Inf_iff)
[PROOF STATE]
proof (state)
this:
(the_inv f y \<le> \<Sqinter> X) = (\<forall>x\<in>X. the_inv f y \<le> x)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(the_inv f y \<le> \<Sqinter> X) = (\<forall>x\<in>X. the_inv f y \<le> x)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
have "... = (\<forall>x \<in> X. y \<le> f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>X. the_inv f y \<le> x) = (\<forall>x\<in>X. y \<le> f x)
[PROOF STEP]
by (metis (mono_tags, lifting) UNIV_I f_the_inv_into_f h monoD ord_embed_alt ord_embed_inj ord_iso_alt)
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>X. the_inv f y \<le> x) = (\<forall>x\<in>X. y \<le> f x)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>X. the_inv f y \<le> x) = (\<forall>x\<in>X. y \<le> f x)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
have "... = (y \<le> \<Sqinter> (f ` X))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>X. y \<le> f x) = (y \<le> \<Sqinter> (f ` X))
[PROOF STEP]
by (simp add: le_INF_iff)
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>X. y \<le> f x) = (y \<le> \<Sqinter> (f ` X))

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(y \<le> f (\<Sqinter> X)) = (y \<le> \<Sqinter> (f ` X))
[PROOF STEP]
have "(y \<le> f (\<Sqinter>X)) = (y \<le> \<Sqinter> (f ` X))"
[PROOF STATE]
proof (prove)
using this:
(y \<le> f (\<Sqinter> X)) = (y \<le> \<Sqinter> (f ` X))

goal (1 subgoal):
 1. (y \<le> f (\<Sqinter> X)) = (y \<le> \<Sqinter> (f ` X))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(y \<le> f (\<Sqinter> X)) = (y \<le> \<Sqinter> (f ` X))

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
(?y2 \<le> f (\<Sqinter> X)) = (?y2 \<le> \<Sqinter> (f ` X))

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
hence "f (\<Sqinter>X) = \<Sqinter> (f ` X)"
[PROOF STATE]
proof (prove)
using this:
(?y2 \<le> f (\<Sqinter> X)) = (?y2 \<le> \<Sqinter> (f ` X))

goal (1 subgoal):
 1. f (\<Sqinter> X) = \<Sqinter> (f ` X)
[PROOF STEP]
by (meson dual_order.antisym order_refl)
[PROOF STATE]
proof (state)
this:
f (\<Sqinter> X) = \<Sqinter> (f ` X)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
f (\<Sqinter> ?X2) = \<Sqinter> (f ` ?X2)

goal (1 subgoal):
 1. ord_iso f \<Longrightarrow> Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
f (\<Sqinter> ?X2) = \<Sqinter> (f ` ?X2)

goal (1 subgoal):
 1. Inf \<circ> (`) f = f \<circ> Inf
[PROOF STEP]
unfolding fun_eq_iff
[PROOF STATE]
proof (prove)
using this:
f (\<Sqinter> ?X2) = \<Sqinter> (f ` ?X2)

goal (1 subgoal):
 1. \<forall>x. (Inf \<circ> (`) f) x = (f \<circ> Inf) x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Inf \<circ> (`) f = f \<circ> Inf

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ennreal_minus_cancel:
  fixes a b c :: ennreal
  shows "c \<noteq> top \<Longrightarrow> a \<le> c \<Longrightarrow> b \<le> c \<Longrightarrow> c - a = c - b \<Longrightarrow> a = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c \<noteq> top; a \<le> c; b \<le> c; c - a = c - b\<rbrakk> \<Longrightarrow> a = b
[PROOF STEP]
by (metis ennreal_add_diff_cancel_left ennreal_add_diff_cancel_right ennreal_add_eq_top less_eqE)


[STATEMENT]
lemma evalHeap_cong[fundef_cong]:
  "\<lbrakk> heap1 = heap2 ;  (\<And> e. e \<in> snd ` set heap2 \<Longrightarrow> eval1 e = eval2 e) \<rbrakk>
    \<Longrightarrow>  evalHeap heap1 eval1 = evalHeap heap2 eval2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>heap1 = heap2; \<And>e. e \<in> snd ` set heap2 \<Longrightarrow> eval1 e = eval2 e\<rbrakk> \<Longrightarrow> evalHeap heap1 eval1 = evalHeap heap2 eval2
[PROOF STEP]
by (induct heap2 eval2 arbitrary:heap1 rule:evalHeap.induct, auto)


[STATEMENT]
lemma invertible_iff_is_unit:
  fixes A::"'a::{comm_ring_1}^'n^'n"
  shows "invertible A \<longleftrightarrow> (det A) dvd 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invertible A = (det A dvd (1::'a))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
assume inv_A: "invertible A"
[PROOF STATE]
proof (state)
this:
invertible A

goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
obtain B where AB_mat: "A ** B = mat 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>B. A ** B = mat (1::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using inv_A
[PROOF STATE]
proof (prove)
using this:
invertible A

goal (1 subgoal):
 1. (\<And>B. A ** B = mat (1::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding invertible_def
[PROOF STATE]
proof (prove)
using this:
\<exists>A'. A ** A' = mat (1::'a) \<and> A' ** A = mat (1::'a)

goal (1 subgoal):
 1. (\<And>B. A ** B = mat (1::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A ** B = mat (1::'a)

goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
have "1 = det (mat 1::'a^'n^'n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) = det (mat (1::'a))
[PROOF STEP]
unfolding det_I
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) = (1::'a)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(1::'a) = det (mat (1::'a))

goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1::'a) = det (mat (1::'a))

goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
have "... = det (A ** B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (mat (1::'a)) = det (A ** B)
[PROOF STEP]
unfolding AB_mat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (mat (1::'a)) = det (mat (1::'a))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
det (mat (1::'a)) = det (A ** B)

goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
det (mat (1::'a)) = det (A ** B)

goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
have "... = det A * det B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (A ** B) = det A * det B
[PROOF STEP]
unfolding det_mul
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det A * det B = det A * det B
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
det (A ** B) = det A * det B

goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(1::'a) = det A * det B
[PROOF STEP]
have "1 = det A * det B"
[PROOF STATE]
proof (prove)
using this:
(1::'a) = det A * det B

goal (1 subgoal):
 1. (1::'a) = det A * det B
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(1::'a) = det A * det B

goal (2 subgoals):
 1. invertible A \<Longrightarrow> det A dvd (1::'a)
 2. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
thus "(det A) dvd 1"
[PROOF STATE]
proof (prove)
using this:
(1::'a) = det A * det B

goal (1 subgoal):
 1. det A dvd (1::'a)
[PROOF STEP]
unfolding dvd_def
[PROOF STATE]
proof (prove)
using this:
(1::'a) = det A * det B

goal (1 subgoal):
 1. \<exists>k. (1::'a) = det A * k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
det A dvd (1::'a)

goal (1 subgoal):
 1. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
assume det_unit: "(det A) dvd 1"
[PROOF STATE]
proof (state)
this:
det A dvd (1::'a)

goal (1 subgoal):
 1. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
det A dvd (1::'a)
[PROOF STEP]
obtain a where a: "(det A) * a = 1"
[PROOF STATE]
proof (prove)
using this:
det A dvd (1::'a)

goal (1 subgoal):
 1. (\<And>a. det A * a = (1::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding dvd_def
[PROOF STATE]
proof (prove)
using this:
\<exists>k. (1::'a) = det A * k

goal (1 subgoal):
 1. (\<And>a. det A * a = (1::'a) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
det A * a = (1::'a)

goal (1 subgoal):
 1. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
let ?A = "to_vec (Square_Matrix.adjugate (from_vec A))"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. det A dvd (1::'a) \<Longrightarrow> invertible A
[PROOF STEP]
show "invertible A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invertible A
[PROOF STEP]
proof (unfold invertible_def, rule exI[of _ "a *k ?A"])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A ** (a *k to_vec (Square_Matrix.adjugate (from_vec A))) = mat (1::'a) \<and> a *k to_vec (Square_Matrix.adjugate (from_vec A)) ** A = mat (1::'a)
[PROOF STEP]
have "from_vec A * (a *\<^sub>S Square_Matrix.adjugate (from_vec A)) = 1"
      "(a *\<^sub>S Square_Matrix.adjugate (from_vec A)) * from_vec A = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. from_vec A * a *\<^sub>S Square_Matrix.adjugate (from_vec A) = 1 &&& a *\<^sub>S Square_Matrix.adjugate (from_vec A) * from_vec A = 1
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
det A * a = (1::'a)

goal (1 subgoal):
 1. from_vec A * a *\<^sub>S Square_Matrix.adjugate (from_vec A) = 1 &&& a *\<^sub>S Square_Matrix.adjugate (from_vec A) * from_vec A = 1
[PROOF STEP]
unfolding smult_mult2[symmetric] mult_adjugate_det[of "from_vec A"] smult_diag det_sq_matrix_eq
         smult_mult1[symmetric] adjugate_mult_det[of "from_vec A"]
[PROOF STATE]
proof (prove)
using this:
det A * a = (1::'a)

goal (1 subgoal):
 1. diag (a * det A) = 1 &&& diag (a * det A) = 1
[PROOF STEP]
by (simp_all add: ac_simps diag_1)
[PROOF STATE]
proof (state)
this:
from_vec A * a *\<^sub>S Square_Matrix.adjugate (from_vec A) = 1
a *\<^sub>S Square_Matrix.adjugate (from_vec A) * from_vec A = 1

goal (1 subgoal):
 1. A ** (a *k to_vec (Square_Matrix.adjugate (from_vec A))) = mat (1::'a) \<and> a *k to_vec (Square_Matrix.adjugate (from_vec A)) ** A = mat (1::'a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
from_vec A * a *\<^sub>S Square_Matrix.adjugate (from_vec A) = 1
a *\<^sub>S Square_Matrix.adjugate (from_vec A) * from_vec A = 1
[PROOF STEP]
show "A ** (a *k ?A) = mat 1 \<and> a *k ?A ** A = mat 1"
[PROOF STATE]
proof (prove)
using this:
from_vec A * a *\<^sub>S Square_Matrix.adjugate (from_vec A) = 1
a *\<^sub>S Square_Matrix.adjugate (from_vec A) * from_vec A = 1

goal (1 subgoal):
 1. A ** (a *k to_vec (Square_Matrix.adjugate (from_vec A))) = mat (1::'a) \<and> a *k to_vec (Square_Matrix.adjugate (from_vec A)) ** A = mat (1::'a)
[PROOF STEP]
unfolding to_vec_eq_iff[symmetric] to_vec_matrix_matrix_mult to_vec_matrix_scalar_mult
        to_vec_from_vec to_vec_one
[PROOF STATE]
proof (prove)
using this:
A ** (a *k to_vec (Square_Matrix.adjugate (from_vec A))) = mat (1::'a)
a *k to_vec (Square_Matrix.adjugate (from_vec A)) ** A = mat (1::'a)

goal (1 subgoal):
 1. A ** (a *k to_vec (Square_Matrix.adjugate (from_vec A))) = mat (1::'a) \<and> a *k to_vec (Square_Matrix.adjugate (from_vec A)) ** A = mat (1::'a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
A ** (a *k to_vec (Square_Matrix.adjugate (from_vec A))) = mat (1::'a) \<and> a *k to_vec (Square_Matrix.adjugate (from_vec A)) ** A = mat (1::'a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
invertible A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sound_weaken:"\<And>SG SGS C. sound (SGS, C) \<Longrightarrow> sound (SG # SGS, C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>SG SGS C. sound (SGS, C) \<Longrightarrow> sound (SG # SGS, C)
[PROOF STEP]
subgoal for SG SGS C
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound (SGS, C) \<Longrightarrow> sound (SG # SGS, C)
[PROOF STEP]
apply(induction SGS)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. sound ([], C) \<Longrightarrow> sound ([SG], C)
 2. \<And>a SGS. \<lbrakk>sound (SGS, C) \<Longrightarrow> sound (SG # SGS, C); sound (a # SGS, C)\<rbrakk> \<Longrightarrow> sound (SG # a # SGS, C)
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound ([], C) \<Longrightarrow> sound ([SG], C)
[PROOF STEP]
unfolding sound_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>I. is_interp I \<longrightarrow> (\<forall>i\<ge>0. i < length (fst ([], C)) \<longrightarrow> seq_sem I (fst ([], C) ! i) = UNIV) \<longrightarrow> seq_sem I (snd ([], C)) = UNIV \<Longrightarrow> \<forall>I. is_interp I \<longrightarrow> (\<forall>i\<ge>0. i < length (fst ([SG], C)) \<longrightarrow> seq_sem I (fst ([SG], C) ! i) = UNIV) \<longrightarrow> seq_sem I (snd ([SG], C)) = UNIV
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a SGS. \<lbrakk>sound (SGS, C) \<Longrightarrow> sound (SG # SGS, C); sound (a # SGS, C)\<rbrakk> \<Longrightarrow> sound (SG # a # SGS, C)
[PROOF STEP]
subgoal for SG2 SGS
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>sound (SGS, C) \<Longrightarrow> sound (SG # SGS, C); sound (SG2 # SGS, C)\<rbrakk> \<Longrightarrow> sound (SG # SG2 # SGS, C)
[PROOF STEP]
unfolding sound_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>I. is_interp I \<longrightarrow> (\<forall>i\<ge>0. i < length (fst (SGS, C)) \<longrightarrow> seq_sem I (fst (SGS, C) ! i) = UNIV) \<longrightarrow> seq_sem I (snd (SGS, C)) = UNIV \<Longrightarrow> \<forall>I. is_interp I \<longrightarrow> (\<forall>i\<ge>0. i < length (fst (SG # SGS, C)) \<longrightarrow> seq_sem I (fst (SG # SGS, C) ! i) = UNIV) \<longrightarrow> seq_sem I (snd (SG # SGS, C)) = UNIV; \<forall>I. is_interp I \<longrightarrow> (\<forall>i\<ge>0. i < length (fst (SG2 # SGS, C)) \<longrightarrow> seq_sem I (fst (SG2 # SGS, C) ! i) = UNIV) \<longrightarrow> seq_sem I (snd (SG2 # SGS, C)) = UNIV\<rbrakk> \<Longrightarrow> \<forall>I. is_interp I \<longrightarrow> (\<forall>i\<ge>0. i < length (fst (SG # SG2 # SGS, C)) \<longrightarrow> seq_sem I (fst (SG # SG2 # SGS, C) ! i) = UNIV) \<longrightarrow> seq_sem I (snd (SG # SG2 # SGS, C)) = UNIV
[PROOF STEP]
by (metis fst_conv le0 length_Cons not_less_eq nth_Cons_Suc snd_conv)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma order_char_2:
  "x \<le> y \<longleftrightarrow> x \<squnion> -x \<le> y \<squnion> -x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<le> y) = (x \<squnion> - x \<le> y \<squnion> - x)
[PROOF STEP]
using order_char_1
[PROOF STATE]
proof (prove)
using this:
(?x \<le> ?y) = (?x \<le> ?y \<squnion> - ?x)

goal (1 subgoal):
 1. (x \<le> y) = (x \<squnion> - x \<le> y \<squnion> - x)
[PROOF STEP]
by auto


[STATEMENT]
lemma adjoint_dim':
  "A \<in> carrier_mat n m \<Longrightarrow> Complex_Matrix.adjoint A \<in> carrier_mat m n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<in> carrier_mat n m \<Longrightarrow> Complex_Matrix.adjoint A \<in> carrier_mat m n
[PROOF STEP]
using adjoint_dim_col adjoint_dim_row
[PROOF STATE]
proof (prove)
using this:
dim_col (Complex_Matrix.adjoint ?A) = dim_row ?A
dim_row (Complex_Matrix.adjoint ?A) = dim_col ?A

goal (1 subgoal):
 1. A \<in> carrier_mat n m \<Longrightarrow> Complex_Matrix.adjoint A \<in> carrier_mat m n
[PROOF STEP]
by blast


[STATEMENT]
lemma one_element_vec_dim [simp]: "dim_vec (one_element_vec n (r::rat)) = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec (one_element_vec n r) = n
[PROOF STEP]
by (simp add: one_element_vec_def)


[STATEMENT]
lemma list_of_pdevs_pdevs_of_list_eq:
  "(\<And>x. x \<in> set xs \<Longrightarrow> x \<noteq> 0) \<Longrightarrow>
    list_of_pdevs (pdevs_of_list xs) = zip (rev [0..<length xs]) (rev xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> set xs \<Longrightarrow> x \<noteq> (0::'a)) \<Longrightarrow> list_of_pdevs (pdevs_of_list xs) = zip (rev [0..<length xs]) (rev xs)
[PROOF STEP]
by (auto simp: nth_list_of_pdevs_pdevs_of_list length_list_of_pdevs_pdevs_of_list rev_nth
    intro!: nth_equalityI)


[STATEMENT]
lemma quorum_is_quorum_of_some_slice:
  assumes "quorum_of p Q" and "p \<in> W"
  obtains S where "S \<in> slices p" and "S \<subseteq> Q"
    and "\<And> p' . p' \<in> S \<inter> W \<Longrightarrow> quorum_of p' Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>S. \<lbrakk>S \<in> slices p; S \<subseteq> Q; \<And>p'. p' \<in> S \<inter> W \<Longrightarrow> quorum_of p' Q\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
quorum_of p Q
p \<in> W

goal (1 subgoal):
 1. (\<And>S. \<lbrakk>S \<in> slices p; S \<subseteq> Q; \<And>p'. p' \<in> S \<inter> W \<Longrightarrow> quorum_of p' Q\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding quorum_def quorum_of_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>p\<in>Q \<inter> W. \<exists>Sl\<in>slices p. Sl \<subseteq> Q) \<and> (p \<notin> W \<or> (\<exists>Sl\<in>slices p. Sl \<subseteq> Q))
p \<in> W

goal (1 subgoal):
 1. (\<And>S. \<lbrakk>S \<in> slices p; S \<subseteq> Q; \<And>p'. p' \<in> S \<inter> W \<Longrightarrow> (\<forall>p\<in>Q \<inter> W. \<exists>Sl\<in>slices p. Sl \<subseteq> Q) \<and> (p' \<notin> W \<or> (\<exists>Sl\<in>slices p'. Sl \<subseteq> Q))\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by fastforce


[STATEMENT]
lemma norm_axis_eq[simp]: "\<parallel>axis i k\<parallel> = \<parallel>k\<parallel>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<parallel>axis i k\<parallel> = \<parallel>k\<parallel>
[PROOF STEP]
proof(simp add: axis_def norm_vec_def L2_set_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sqrt (\<Sum>ia\<in>UNIV. \<parallel>if ia = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>
[PROOF STEP]
let "?\<delta>\<^sub>K" = "\<lambda>i j k. if i = j then k else 0"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sqrt (\<Sum>ia\<in>UNIV. \<parallel>if ia = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>
[PROOF STEP]
have "(\<Sum>j\<in>UNIV. (\<parallel>(?\<delta>\<^sub>K j i k)\<parallel>)\<^sup>2) = (\<Sum>j\<in>{i}. (\<parallel>(?\<delta>\<^sub>K j i k)\<parallel>)\<^sup>2) + (\<Sum>j\<in>(UNIV-{i}). (\<parallel>(?\<delta>\<^sub>K j i k)\<parallel>)\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j\<in>UNIV. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = (\<Sum>j\<in>{i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) + (\<Sum>j\<in>UNIV - {i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2)
[PROOF STEP]
using finite_sum_univ_singleton
[PROOF STATE]
proof (prove)
using this:
sum ?g UNIV = sum ?g {?i} + sum ?g (UNIV - {?i})

goal (1 subgoal):
 1. (\<Sum>j\<in>UNIV. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = (\<Sum>j\<in>{i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) + (\<Sum>j\<in>UNIV - {i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<in>UNIV. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = (\<Sum>j\<in>{i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) + (\<Sum>j\<in>UNIV - {i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2)

goal (1 subgoal):
 1. sqrt (\<Sum>ia\<in>UNIV. \<parallel>if ia = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<in>UNIV. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = (\<Sum>j\<in>{i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) + (\<Sum>j\<in>UNIV - {i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2)

goal (1 subgoal):
 1. sqrt (\<Sum>ia\<in>UNIV. \<parallel>if ia = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>
[PROOF STEP]
have "... = (\<parallel>k\<parallel>)\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j\<in>{i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) + (\<Sum>j\<in>UNIV - {i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>\<^sup>2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<in>{i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) + (\<Sum>j\<in>UNIV - {i}. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>\<^sup>2

goal (1 subgoal):
 1. sqrt (\<Sum>ia\<in>UNIV. \<parallel>if ia = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>j\<in>UNIV. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>\<^sup>2
[PROOF STEP]
show "sqrt (\<Sum>j\<in>UNIV. (norm (if j = i then k else 0))\<^sup>2) = norm k"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>j\<in>UNIV. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>\<^sup>2

goal (1 subgoal):
 1. sqrt (\<Sum>j\<in>UNIV. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sqrt (\<Sum>j\<in>UNIV. \<parallel>if j = i then k else (0::'a)\<parallel>\<^sup>2) = \<parallel>k\<parallel>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in aGroup) ag_inv_inj:"\<lbrakk>x \<in> carrier A; y \<in> carrier A; x \<noteq> y\<rbrakk> \<Longrightarrow>
                                          (-\<^sub>a x) \<noteq> (-\<^sub>a y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier A; y \<in> carrier A; x \<noteq> y\<rbrakk> \<Longrightarrow> -\<^sub>a x \<noteq> -\<^sub>a y
[PROOF STEP]
apply (rule contrapos_pp, simp+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier A; y \<in> carrier A; x \<noteq> y; -\<^sub>a x = -\<^sub>a y\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (frule ag_mOp_closed[of "y"],
       frule aassoc[of "y" "-\<^sub>a y" "x"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier A; y \<in> carrier A; x \<noteq> y; -\<^sub>a x = -\<^sub>a y; -\<^sub>a y \<in> carrier A; y \<plusminus> -\<^sub>a y \<plusminus> x = y \<plusminus> (-\<^sub>a y \<plusminus> x)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (simp only:ag_r_inv1,
       frule sym, thin_tac "-\<^sub>a x = -\<^sub>a y", simp add:l_m)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier A; y \<in> carrier A; x \<noteq> y; -\<^sub>a x \<in> carrier A; \<zero> \<plusminus> x = y \<plusminus> \<zero>; -\<^sub>a y = -\<^sub>a x\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (simp add:l_zero ag_r_zero)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma alg_dvd_int_rat:
  fixes y :: "'a :: field_char_0"
  assumes "of_int x alg_dvd y" and "y \<in> \<rat>"
  shows   "\<exists>n. y = of_int n \<and> x dvd n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>n. y = of_int n \<and> x dvd n
[PROOF STEP]
proof (cases "x = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
 2. x \<noteq> 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> 0

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
 2. x \<noteq> 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
[PROOF STEP]
have "y / of_int x \<in> \<int>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y / of_int x \<in> \<int>
[PROOF STEP]
by (intro rational_algebraic_int_is_int) (use assms in \<open>auto simp: alg_dvd_def\<close>)
[PROOF STATE]
proof (state)
this:
y / of_int x \<in> \<int>

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
 2. x \<noteq> 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y / of_int x \<in> \<int>
[PROOF STEP]
obtain n where n: "of_int n = y / (of_int x :: 'a)"
[PROOF STATE]
proof (prove)
using this:
y / of_int x \<in> \<int>

goal (1 subgoal):
 1. (\<And>n. of_int n = y / of_int x \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (elim Ints_cases) auto
[PROOF STATE]
proof (state)
this:
of_int n = y / of_int x

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
 2. x \<noteq> 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
[PROOF STEP]
hence "y = of_int (n * x)"
[PROOF STATE]
proof (prove)
using this:
of_int n = y / of_int x

goal (1 subgoal):
 1. y = of_int (n * x)
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
of_int n = y / of_int x
x \<noteq> 0

goal (1 subgoal):
 1. y = of_int (n * x)
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
y = of_int (n * x)

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
 2. x \<noteq> 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
y = of_int (n * x)

goal (1 subgoal):
 1. \<exists>n. y = of_int n \<and> x dvd n
[PROOF STEP]
by (intro exI[of _ "x * n"]) auto
[PROOF STATE]
proof (state)
this:
\<exists>n. y = of_int n \<and> x dvd n

goal (1 subgoal):
 1. x = 0 \<Longrightarrow> \<exists>n. y = of_int n \<and> x dvd n
[PROOF STEP]
qed (use assms in auto)


[STATEMENT]
lemma lookup_bs_env: "\<lbrakk> bs_env \<rho> \<rho>'; lookup \<rho> x = Some w \<rbrakk> \<Longrightarrow>
  \<exists> v. lookup \<rho>' x = Some v \<and> bs_val w v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>bs_env \<rho> \<rho>'; lookup \<rho> x = Some w\<rbrakk> \<Longrightarrow> \<exists>v. lookup \<rho>' x = Some v \<and> bs_val w v
[PROOF STEP]
by (induction \<rho> arbitrary: \<rho>' x w) auto


[STATEMENT]
lemma hereditarily_fs_implies_finite_supp:
  assumes "hereditarily_fs t\<^sub>\<alpha>"
  shows "finite (supp t\<^sub>\<alpha>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (supp t\<^sub>\<alpha>)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
hereditarily_fs t\<^sub>\<alpha>

goal (1 subgoal):
 1. finite (supp t\<^sub>\<alpha>)
[PROOF STEP]
by (induction rule: hereditarily_fs.induct)  (simp_all add: finite_supp)


[STATEMENT]
lemma ternary_to_bool_Some: "ternary_to_bool t = Some X \<longleftrightarrow>
  (t = TernaryTrue \<and> X = True) \<or> (t = TernaryFalse \<and> X = False)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ternary_to_bool t = Some X) = (t = TernaryTrue \<and> X = True \<or> t = TernaryFalse \<and> X = False)
[PROOF STEP]
by(cases t, simp_all)


[STATEMENT]
lemma finite_field_ops_int: "field_ops (finite_field_ops_int p) mod_ring_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. field_ops (finite_field_ops_int p) mod_ring_rel
[PROOF STEP]
by (unfold_locales, auto simp:
  finite_field_ops_int_def
  bi_unique_mod_ring_rel
  right_total_mod_ring_rel
  mod_ring_divide
  mod_ring_plus
  mod_ring_minus
  mod_ring_uminus
  mod_ring_inverse
  mod_ring_mod
  mod_ring_unit_factor
  mod_ring_normalize
  mod_ring_mult
  mod_ring_eq
  mod_ring_0
  mod_ring_1
  Domainp_mod_ring_rel)


[STATEMENT]
theorem RPO_SN_order_pair: "SN_order_pair RPO_S RPO_NS"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SN_order_pair RPO_S RPO_NS
[PROOF STEP]
unfolding rpo_eq_wpo
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SN_order_pair WPO_S WPO_NS
[PROOF STEP]
by (rule WPO_SN_order_pair)


[STATEMENT]
lemma par_strict_distinct:
  assumes "A B ParStrict C D"
  shows " A \<noteq> B \<and> C \<noteq> D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<noteq> B \<and> C \<noteq> D
[PROOF STEP]
using assms par_strict_neq1 par_strict_neq2
[PROOF STATE]
proof (prove)
using this:
A B ParStrict C D
?A ?B ParStrict ?C ?D \<Longrightarrow> ?A \<noteq> ?B
?A ?B ParStrict ?C ?D \<Longrightarrow> ?C \<noteq> ?D

goal (1 subgoal):
 1. A \<noteq> B \<and> C \<noteq> D
[PROOF STEP]
by auto


[STATEMENT]
lemma mann6:
"-(- 3\<times>x \<squnion> x) = -(-(-(- 3\<times>x \<squnion> x) \<squnion> - 3\<times>x) \<squnion> -(-(- 3\<times>x \<squnion> x) \<squnion> 5\<times>x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
have "3+2=(5::nat)" and "3\<noteq>(0::nat)" and "2\<noteq>(0::nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 3 + 2 = 5 &&& 3 \<noteq> 0 &&& 2 \<noteq> 0
[PROOF STEP]
by arith+
[PROOF STATE]
proof (state)
this:
3 + 2 = 5
3 \<noteq> 0
2 \<noteq> 0

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
with copy_arith
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?k \<noteq> 0; ?l \<noteq> 0\<rbrakk> \<Longrightarrow> (?k + ?l) \<times> ?x = ?k \<times> ?x \<squnion> ?l \<times> ?x
3 + 2 = 5
3 \<noteq> 0
2 \<noteq> 0
[PROOF STEP]
have \<heartsuit>: "3\<times>x \<squnion> 2\<times>x = 5\<times>x"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?k \<noteq> 0; ?l \<noteq> 0\<rbrakk> \<Longrightarrow> (?k + ?l) \<times> ?x = ?k \<times> ?x \<squnion> ?l \<times> ?x
3 + 2 = 5
3 \<noteq> 0
2 \<noteq> 0

goal (1 subgoal):
 1. 3 \<times> x \<squnion> 2 \<times> x = 5 \<times> x
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
3 \<times> x \<squnion> 2 \<times> x = 5 \<times> x

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
let ?p = "-(- 3\<times>x \<squnion> x)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
fix q
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_comm
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> ?y = ?y \<squnion> ?x
[PROOF STEP]
have
    "-(q \<squnion> 5\<times>x) = -(5\<times>x \<squnion> q)"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. - (q \<squnion> 5 \<times> x) = - (5 \<times> x \<squnion> q)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (q \<squnion> 5 \<times> x) = - (5 \<times> x \<squnion> q)

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (q \<squnion> 5 \<times> x) = - (5 \<times> x \<squnion> q)

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from \<heartsuit> mann0[where x="3\<times>x" and y="q \<squnion> 2\<times>x"] sup_assoc sup_comm
[PROOF STATE]
proof (chain)
picking this:
3 \<times> x \<squnion> 2 \<times> x = 5 \<times> x
- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z
?x \<squnion> ?y = ?y \<squnion> ?x
[PROOF STEP]
have
    "\<dots> = -(-(-(3\<times>x \<squnion> (q \<squnion> 2\<times>x)) \<squnion> - 3\<times>x \<squnion> (q \<squnion> 2\<times>x)) \<squnion> (q \<squnion> 2\<times>x))"
[PROOF STATE]
proof (prove)
using this:
3 \<times> x \<squnion> 2 \<times> x = 5 \<times> x
- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. - (5 \<times> x \<squnion> q) = - (- (- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (5 \<times> x \<squnion> q) = - (- (- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (5 \<times> x \<squnion> q) = - (- (- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_assoc
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z
[PROOF STEP]
have
    "\<dots> = -(-(-((3\<times>x \<squnion> q) \<squnion> 2\<times>x) \<squnion> - 3\<times>x \<squnion> (q \<squnion> 2\<times>x)) \<squnion> (q \<squnion> 2\<times>x))"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z

goal (1 subgoal):
 1. - (- (- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (3 \<times> x \<squnion> q \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (3 \<times> x \<squnion> q \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (3 \<times> x \<squnion> q \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_comm
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> ?y = ?y \<squnion> ?x
[PROOF STEP]
have
    "\<dots> = -(-(-((q \<squnion> 3\<times>x) \<squnion> 2\<times>x) \<squnion> - 3\<times>x \<squnion> (q \<squnion> 2\<times>x)) \<squnion> (q \<squnion> 2\<times>x))"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. - (- (- (3 \<times> x \<squnion> q \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 3 \<times> x \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (3 \<times> x \<squnion> q \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 3 \<times> x \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (3 \<times> x \<squnion> q \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 3 \<times> x \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_assoc
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z
[PROOF STEP]
have
    "\<dots> = -(-(-(q \<squnion> (3\<times>x \<squnion> 2\<times>x)) \<squnion> - 3\<times>x \<squnion> (q \<squnion> 2\<times>x)) \<squnion> (q \<squnion> 2\<times>x))"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z

goal (1 subgoal):
 1. - (- (- (q \<squnion> 3 \<times> x \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> (3 \<times> x \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> 3 \<times> x \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> (3 \<times> x \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> 3 \<times> x \<squnion> 2 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> (3 \<times> x \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from \<heartsuit>
[PROOF STATE]
proof (chain)
picking this:
3 \<times> x \<squnion> 2 \<times> x = 5 \<times> x
[PROOF STEP]
have
    "\<dots> = -(-(-(q \<squnion> 5\<times>x) \<squnion> - 3\<times>x \<squnion> (q \<squnion> 2\<times>x)) \<squnion> (q \<squnion> 2\<times>x))"
[PROOF STATE]
proof (prove)
using this:
3 \<times> x \<squnion> 2 \<times> x = 5 \<times> x

goal (1 subgoal):
 1. - (- (- (q \<squnion> (3 \<times> x \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> (3 \<times> x \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> (3 \<times> x \<squnion> 2 \<times> x)) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_assoc
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z
[PROOF STEP]
have
    "\<dots> = -(-(-(q \<squnion> 5\<times>x) \<squnion> (- 3\<times>x \<squnion> q) \<squnion> 2\<times>x) \<squnion> (q \<squnion> 2\<times>x))"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z

goal (1 subgoal):
 1. - (- (- (q \<squnion> 5 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> (- 3 \<times> x \<squnion> q) \<squnion> 2 \<times> x) \<squnion> (q \<squnion> 2 \<times> x))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> 5 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> (- 3 \<times> x \<squnion> q) \<squnion> 2 \<times> x) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> 5 \<times> x) \<squnion> - 3 \<times> x \<squnion> (q \<squnion> 2 \<times> x)) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> (- 3 \<times> x \<squnion> q) \<squnion> 2 \<times> x) \<squnion> (q \<squnion> 2 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_comm
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> ?y = ?y \<squnion> ?x
[PROOF STEP]
have
    "\<dots> = -(-(-(q \<squnion> 5\<times>x) \<squnion> (q \<squnion> - 3\<times>x) \<squnion> 2\<times>x) \<squnion> (2\<times>x \<squnion> q))"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. - (- (- (q \<squnion> 5 \<times> x) \<squnion> (- 3 \<times> x \<squnion> q) \<squnion> 2 \<times> x) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> (q \<squnion> - 3 \<times> x) \<squnion> 2 \<times> x) \<squnion> (2 \<times> x \<squnion> q))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> 5 \<times> x) \<squnion> (- 3 \<times> x \<squnion> q) \<squnion> 2 \<times> x) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> (q \<squnion> - 3 \<times> x) \<squnion> 2 \<times> x) \<squnion> (2 \<times> x \<squnion> q))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> 5 \<times> x) \<squnion> (- 3 \<times> x \<squnion> q) \<squnion> 2 \<times> x) \<squnion> (q \<squnion> 2 \<times> x)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> (q \<squnion> - 3 \<times> x) \<squnion> 2 \<times> x) \<squnion> (2 \<times> x \<squnion> q))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_assoc
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z
[PROOF STEP]
have
    "\<dots> = -(-(-(q \<squnion> 5\<times>x) \<squnion> q \<squnion> - 3\<times>x \<squnion> 2\<times>x) \<squnion> 2\<times>x \<squnion> q)"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z

goal (1 subgoal):
 1. - (- (- (q \<squnion> 5 \<times> x) \<squnion> (q \<squnion> - 3 \<times> x) \<squnion> 2 \<times> x) \<squnion> (2 \<times> x \<squnion> q)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> q \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> q)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (q \<squnion> 5 \<times> x) \<squnion> (q \<squnion> - 3 \<times> x) \<squnion> 2 \<times> x) \<squnion> (2 \<times> x \<squnion> q)) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> q \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> q)

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
- (q \<squnion> 5 \<times> x) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> q \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> q)
[PROOF STEP]
have
    "-(q \<squnion> 5\<times>x) = -(-(-(q \<squnion> 5\<times>x) \<squnion> q \<squnion> - 3\<times>x \<squnion> 2\<times>x) \<squnion> 2\<times>x \<squnion> q)"
[PROOF STATE]
proof (prove)
using this:
- (q \<squnion> 5 \<times> x) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> q \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> q)

goal (1 subgoal):
 1. - (q \<squnion> 5 \<times> x) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> q \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> q)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- (q \<squnion> 5 \<times> x) = - (- (- (q \<squnion> 5 \<times> x) \<squnion> q \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> q)

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
- (?q2 \<squnion> 5 \<times> x) = - (- (- (?q2 \<squnion> 5 \<times> x) \<squnion> ?q2 \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> ?q2)

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
hence \<spadesuit>:
    "-(?p \<squnion> 5\<times>x) = -(-(-(?p \<squnion> 5\<times>x) \<squnion> ?p \<squnion> - 3\<times>x \<squnion> 2\<times>x) \<squnion> 2\<times>x \<squnion> ?p)"
[PROOF STATE]
proof (prove)
using this:
- (?q2 \<squnion> 5 \<times> x) = - (- (- (?q2 \<squnion> 5 \<times> x) \<squnion> ?q2 \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> ?q2)

goal (1 subgoal):
 1. - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) = - (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) = - (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from mann5[where x="3\<times>x" and y="x" and z="2\<times>x" and u="?p"]
       sup_assoc three[where x=x] five[where x=x]
[PROOF STATE]
proof (chain)
picking this:
- (- 3 \<times> x \<squnion> x) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 3 \<times> x \<squnion> x \<squnion> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (x \<squnion> 2 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x)))
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z
3 \<times> x = x \<squnion> x \<squnion> x
5 \<times> x = x \<squnion> x \<squnion> x \<squnion> x \<squnion> x
[PROOF STEP]
have
  "?p =
   -(-(-(-(?p \<squnion> 5\<times>x) \<squnion> ?p \<squnion> -(x \<squnion> 2\<times>x) \<squnion> 2\<times>x) \<squnion> 2\<times>x \<squnion> ?p) \<squnion>
     -(-(x \<squnion> 2\<times>x) \<squnion> ?p))"
[PROOF STATE]
proof (prove)
using this:
- (- 3 \<times> x \<squnion> x) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 3 \<times> x \<squnion> x \<squnion> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (x \<squnion> 2 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x)))
?x \<squnion> (?y \<squnion> ?z) = ?x \<squnion> ?y \<squnion> ?z
3 \<times> x = x \<squnion> x \<squnion> x
5 \<times> x = x \<squnion> x \<squnion> x \<squnion> x \<squnion> x

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (x \<squnion> 2 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x)))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- 3 \<times> x \<squnion> x) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (x \<squnion> 2 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x)))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- 3 \<times> x \<squnion> x) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (x \<squnion> 2 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x)))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_comm
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> ?y = ?y \<squnion> ?x
[PROOF STEP]
have
  "\<dots> =
   -(-(-(-(?p \<squnion> 5\<times>x) \<squnion> ?p \<squnion> -(2\<times>x \<squnion> x) \<squnion> 2\<times>x) \<squnion> 2\<times>x \<squnion> ?p) \<squnion>
     -(-(2\<times>x \<squnion> x) \<squnion> ?p))"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (x \<squnion> 2 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (2 \<times> x \<squnion> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (2 \<times> x \<squnion> x) \<squnion> - (- 3 \<times> x \<squnion> x)))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (x \<squnion> 2 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (2 \<times> x \<squnion> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (2 \<times> x \<squnion> x) \<squnion> - (- 3 \<times> x \<squnion> x)))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (x \<squnion> 2 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (2 \<times> x \<squnion> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (2 \<times> x \<squnion> x) \<squnion> - (- 3 \<times> x \<squnion> x)))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from two[where x=x] three[where x=x]
[PROOF STATE]
proof (chain)
picking this:
2 \<times> x = x \<squnion> x
3 \<times> x = x \<squnion> x \<squnion> x
[PROOF STEP]
have
  "\<dots> =
   -(-(-(-(?p \<squnion> 5\<times>x) \<squnion> ?p \<squnion> - 3\<times>x \<squnion> 2\<times>x) \<squnion> 2\<times>x \<squnion> ?p) \<squnion>
     -(- 3\<times>x \<squnion> ?p))"
[PROOF STATE]
proof (prove)
using this:
2 \<times> x = x \<squnion> x
3 \<times> x = x \<squnion> x \<squnion> x

goal (1 subgoal):
 1. - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (2 \<times> x \<squnion> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (2 \<times> x \<squnion> x) \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)))
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
- (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (2 \<times> x \<squnion> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (2 \<times> x \<squnion> x) \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - (2 \<times> x \<squnion> x) \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- (2 \<times> x \<squnion> x) \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from \<spadesuit>
[PROOF STATE]
proof (chain)
picking this:
- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) = - (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))
[PROOF STEP]
have "\<dots> = -(-(?p \<squnion> 5\<times>x) \<squnion> -(- 3\<times>x \<squnion> ?p))"
[PROOF STATE]
proof (prove)
using this:
- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) = - (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))

goal (1 subgoal):
 1. - (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x \<squnion> 2 \<times> x) \<squnion> 2 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x)))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_comm
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> ?y = ?y \<squnion> ?x
[PROOF STEP]
have "\<dots> = -(-(?p \<squnion> 5\<times>x) \<squnion> -(?p \<squnion> - 3\<times>x))"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. - (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- 3 \<times> x \<squnion> - (- 3 \<times> x \<squnion> x))) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
from sup_comm
[PROOF STATE]
proof (chain)
picking this:
?x \<squnion> ?y = ?y \<squnion> ?x
[PROOF STEP]
have "\<dots> = -(-(?p \<squnion> - 3\<times>x) \<squnion> -(?p \<squnion> 5\<times>x))"
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> ?y = ?y \<squnion> ?x

goal (1 subgoal):
 1. - (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x)) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- (- (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x)) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
- (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
- (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))

goal (1 subgoal):
 1. - (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
- (- 3 \<times> x \<squnion> x) = - (- (- (- 3 \<times> x \<squnion> x) \<squnion> - 3 \<times> x) \<squnion> - (- (- 3 \<times> x \<squnion> x) \<squnion> 5 \<times> x))

goal:
No subgoals!
[PROOF STEP]
qed