[STATEMENT]
lemma total_linorder_matrix_1:
  fixes f :: "('a::finite,'b::linorder_stone_relation_algebra_expansion) square"
  assumes "matrix_stone_relation_algebra.total_var f"
    shows "\<exists>j . f (i,j) = top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
have "mone (i,i) \<le> (f \<odot> f\<^sup>t) (i,i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mone (i, i) \<le> (f \<odot> f\<^sup>t) (i, i)
[PROOF STEP]
using assms less_eq_matrix_def
[PROOF STATE]
proof (prove)
using this:
matrix_stone_relation_algebra.total_var f
(?f \<preceq> ?g) = (\<forall>e. ?f e \<le> ?g e)

goal (1 subgoal):
 1. mone (i, i) \<le> (f \<odot> f\<^sup>t) (i, i)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
mone (i, i) \<le> (f \<odot> f\<^sup>t) (i, i)

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
hence "top = (f \<odot> f\<^sup>t) (i,i)"
[PROOF STATE]
proof (prove)
using this:
mone (i, i) \<le> (f \<odot> f\<^sup>t) (i, i)

goal (1 subgoal):
 1. top = (f \<odot> f\<^sup>t) (i, i)
[PROOF STEP]
by (simp add: one_matrix_def top.extremum_unique)
[PROOF STATE]
proof (state)
this:
top = (f \<odot> f\<^sup>t) (i, i)

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
top = (f \<odot> f\<^sup>t) (i, i)

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
have "... = (\<Squnion>\<^sub>j f (i,j) * (f\<^sup>t) (j,i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<odot> f\<^sup>t) (i, i) = sup_monoid.sum (\<lambda>j. f (i, j) * (f\<^sup>t) (j, i)) {j. True}
[PROOF STEP]
by (simp add: times_matrix_def)
[PROOF STATE]
proof (state)
this:
(f \<odot> f\<^sup>t) (i, i) = sup_monoid.sum (\<lambda>j. f (i, j) * (f\<^sup>t) (j, i)) {j. True}

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(f \<odot> f\<^sup>t) (i, i) = sup_monoid.sum (\<lambda>j. f (i, j) * (f\<^sup>t) (j, i)) {j. True}

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
have "... = (\<Squnion>\<^sub>j f (i,j) * f (i,j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sup_monoid.sum (\<lambda>j. f (i, j) * (f\<^sup>t) (j, i)) {j. True} = sup_monoid.sum (\<lambda>j. f (i, j) * f (i, j)) {j. True}
[PROOF STEP]
by (simp add: conv_matrix_def)
[PROOF STATE]
proof (state)
this:
sup_monoid.sum (\<lambda>j. f (i, j) * (f\<^sup>t) (j, i)) {j. True} = sup_monoid.sum (\<lambda>j. f (i, j) * f (i, j)) {j. True}

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sup_monoid.sum (\<lambda>j. f (i, j) * (f\<^sup>t) (j, i)) {j. True} = sup_monoid.sum (\<lambda>j. f (i, j) * f (i, j)) {j. True}

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
have "... = (\<Squnion>\<^sub>j f (i,j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sup_monoid.sum (\<lambda>j. f (i, j) * f (i, j)) {j. True} = sup_monoid.sum (\<lambda>j. f (i, j)) {j. True}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sup_monoid.sum (\<lambda>j. f (i, j) * f (i, j)) {j. True} = sup_monoid.sum (\<lambda>j. f (i, j)) {j. True}

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
top = sup_monoid.sum (\<lambda>j. f (i, j)) {j. True}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
top = sup_monoid.sum (\<lambda>j. f (i, j)) {j. True}

goal (1 subgoal):
 1. \<exists>j. f (i, j) = top
[PROOF STEP]
by (metis linorder_top_finite_sup)
[PROOF STATE]
proof (state)
this:
\<exists>j. f (i, j) = top

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma zero_le_divide_ereal[simp]:
  fixes a :: ereal
  assumes "0 \<le> a"
    and "0 \<le> b"
  shows "0 \<le> a / b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> a / b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> a
0 \<le> b

goal (1 subgoal):
 1. 0 \<le> a / b
[PROOF STEP]
by (cases rule: ereal2_cases[of a b]) (auto simp: zero_le_divide_iff)


[STATEMENT]
lemma syl: assumes c: "c \<ge> 0"
  shows "syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2^n) (2^n)
    \<and> det (syl c n) = det_bound_hadamard (2^n) c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
proof (cases "n = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
 2. n \<noteq> 0 \<Longrightarrow> syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
 2. n \<noteq> 0 \<Longrightarrow> syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
using c
[PROOF STATE]
proof (prove)
using this:
n = 0
0 \<le> c

goal (1 subgoal):
 1. syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
unfolding det_bound_hadamard_altdef
[PROOF STATE]
proof (prove)
using this:
n = 0
0 \<le> c

goal (1 subgoal):
 1. syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = (if 2 ^ n = 1 \<or> even (2 ^ n) then int (2 ^ n) ^ (2 ^ n div 2) * \<bar>c\<bar> ^ 2 ^ n else sqrt_int_floor ((int (2 ^ n) * c\<^sup>2) ^ 2 ^ n))
[PROOF STEP]
by (auto simp: Bounded_mat_def det_single)
[PROOF STATE]
proof (state)
this:
syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n \<noteq> 0
[PROOF STEP]
obtain m where n: "n = Suc m"
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. (\<And>m. n = Suc m \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases n, auto)
[PROOF STATE]
proof (state)
this:
n = Suc m

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c
[PROOF STEP]
unfolding n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c
[PROOF STEP]
proof (induct m)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. syl c (Suc 0) \<in> Bounded_mat c \<and> syl c (Suc 0) \<in> carrier_mat (2 ^ Suc 0) (2 ^ Suc 0) \<and> det (syl c (Suc 0)) = det_bound_hadamard (2 ^ Suc 0) c
 2. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. syl c (Suc 0) \<in> Bounded_mat c \<and> syl c (Suc 0) \<in> carrier_mat (2 ^ Suc 0) (2 ^ Suc 0) \<and> det (syl c (Suc 0)) = det_bound_hadamard (2 ^ Suc 0) c
 2. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. syl c (Suc 0) \<in> Bounded_mat c \<and> syl c (Suc 0) \<in> carrier_mat (2 ^ Suc 0) (2 ^ Suc 0) \<and> det (syl c (Suc 0)) = det_bound_hadamard (2 ^ Suc 0) c
[PROOF STEP]
unfolding syl.simps Let_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat (mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) (- mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) \<in> Bounded_mat c \<and> four_block_mat (mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) (- mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) \<in> carrier_mat (2 ^ Suc 0) (2 ^ Suc 0) \<and> det (four_block_mat (mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) (- mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c))) = det_bound_hadamard (2 ^ Suc 0) c
[PROOF STEP]
using c
[PROOF STATE]
proof (prove)
using this:
0 \<le> c

goal (1 subgoal):
 1. four_block_mat (mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) (- mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) \<in> Bounded_mat c \<and> four_block_mat (mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) (- mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) \<in> carrier_mat (2 ^ Suc 0) (2 ^ Suc 0) \<and> det (four_block_mat (mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) (- mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c))) = det_bound_hadamard (2 ^ Suc 0) c
[PROOF STEP]
apply (subst det_four_block_mat[of _ 1]; force?)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> c \<Longrightarrow> four_block_mat (mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) (- mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) \<in> Bounded_mat c \<and> four_block_mat (mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) (- mat 1 1 (\<lambda>_. c)) (mat 1 1 (\<lambda>_. c)) \<in> carrier_mat (2 ^ Suc 0) (2 ^ Suc 0) \<and> det (mat 1 1 (\<lambda>_. c) * mat 1 1 (\<lambda>_. c) - mat 1 1 (\<lambda>_. c) * - mat 1 1 (\<lambda>_. c)) = det_bound_hadamard (2 ^ Suc 0) c
[PROOF STEP]
apply (subst det_single,
        auto simp: Bounded_mat_def scalar_prod_def det_bound_hadamard_altdef power2_eq_square)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
syl c (Suc 0) \<in> Bounded_mat c \<and> syl c (Suc 0) \<in> carrier_mat (2 ^ Suc 0) (2 ^ Suc 0) \<and> det (syl c (Suc 0)) = det_bound_hadamard (2 ^ Suc 0) c

goal (1 subgoal):
 1. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c

goal (1 subgoal):
 1. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
define A where "A = syl c (Suc m)"
[PROOF STATE]
proof (state)
this:
A = syl c (Suc m)

goal (1 subgoal):
 1. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
let ?FB = "four_block_mat A A (- A) A"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
define n :: nat where "n = 2 ^ Suc m"
[PROOF STATE]
proof (state)
this:
n = 2 ^ Suc m

goal (1 subgoal):
 1. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
from Suc[folded A_def n_def]
[PROOF STATE]
proof (chain)
picking this:
A \<in> Bounded_mat c \<and> A \<in> carrier_mat n n \<and> det A = det_bound_hadamard n c
[PROOF STEP]
have Bnd: "A \<in> Bounded_mat c"
      and A: "A \<in> carrier_mat n n"
      and detA: "det A = det_bound_hadamard n c"
[PROOF STATE]
proof (prove)
using this:
A \<in> Bounded_mat c \<and> A \<in> carrier_mat n n \<and> det A = det_bound_hadamard n c

goal (1 subgoal):
 1. A \<in> Bounded_mat c &&& A \<in> carrier_mat n n &&& det A = det_bound_hadamard n c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A \<in> Bounded_mat c
A \<in> carrier_mat n n
det A = det_bound_hadamard n c

goal (1 subgoal):
 1. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
have n2: "2 ^ Suc (Suc m) = 2 * n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ Suc (Suc m) = 2 * n
[PROOF STEP]
unfolding n_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ Suc (Suc m) = 2 * 2 ^ Suc m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 ^ Suc (Suc m) = 2 * n

goal (1 subgoal):
 1. \<And>m. syl c (Suc m) \<in> Bounded_mat c \<and> syl c (Suc m) \<in> carrier_mat (2 ^ Suc m) (2 ^ Suc m) \<and> det (syl c (Suc m)) = det_bound_hadamard (2 ^ Suc m) c \<Longrightarrow> syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c
[PROOF STEP]
unfolding syl.simps(2)[of _ "Suc m"] A_def[symmetric] Let_def n2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat A A (- A) A \<in> Bounded_mat c \<and> four_block_mat A A (- A) A \<in> carrier_mat (2 * n) (2 * n) \<and> det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
proof (intro conjI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. four_block_mat A A (- A) A \<in> Bounded_mat c
 2. four_block_mat A A (- A) A \<in> carrier_mat (2 * n) (2 * n)
 3. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
show "?FB \<in> carrier_mat (2 * n) (2 * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat A A (- A) A \<in> carrier_mat (2 * n) (2 * n)
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n

goal (1 subgoal):
 1. four_block_mat A A (- A) A \<in> carrier_mat (2 * n) (2 * n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
four_block_mat A A (- A) A \<in> carrier_mat (2 * n) (2 * n)

goal (2 subgoals):
 1. four_block_mat A A (- A) A \<in> Bounded_mat c
 2. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
show "?FB \<in> Bounded_mat c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. four_block_mat A A (- A) A \<in> Bounded_mat c
[PROOF STEP]
using Bnd A
[PROOF STATE]
proof (prove)
using this:
A \<in> Bounded_mat c
A \<in> carrier_mat n n

goal (1 subgoal):
 1. four_block_mat A A (- A) A \<in> Bounded_mat c
[PROOF STEP]
unfolding Bounded_mat_elements_mat
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>elements_mat A. \<bar>x\<bar> \<le> c
A \<in> carrier_mat n n

goal (1 subgoal):
 1. \<forall>x\<in>elements_mat (four_block_mat A A (- A) A). \<bar>x\<bar> \<le> c
[PROOF STEP]
by (subst elements_four_block_mat_id, auto)
[PROOF STATE]
proof (state)
this:
four_block_mat A A (- A) A \<in> Bounded_mat c

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
have ev: "even n" and sum: "n div 2 + n div 2 = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. even n &&& n div 2 + n div 2 = n
[PROOF STEP]
unfolding n_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. even (2 ^ Suc m) &&& 2 ^ Suc m div 2 + 2 ^ Suc m div 2 = 2 ^ Suc m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
even n
n div 2 + n div 2 = n

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
have n2: "n * 2 = n + n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n * 2 = n + n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
n * 2 = n + n

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
have "det ?FB = det (A * A - A * - A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det (A * A - A * - A)
[PROOF STEP]
by (rule det_four_block_mat[OF A A _ A], insert A, auto)
[PROOF STATE]
proof (state)
this:
det (four_block_mat A A (- A) A) = det (A * A - A * - A)

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
det (four_block_mat A A (- A) A) = det (A * A - A * - A)

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
have "A * A - A * - A = A * A + A * A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A * A - A * - A = A * A + A * A
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n

goal (1 subgoal):
 1. A * A - A * - A = A * A + A * A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A * A - A * - A = A * A + A * A

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
A * A - A * - A = A * A + A * A

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
have "\<dots> = 2 \<cdot>\<^sub>m (A * A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A * A + A * A = 2 \<cdot>\<^sub>m (A * A)
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n

goal (1 subgoal):
 1. A * A + A * A = 2 \<cdot>\<^sub>m (A * A)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A * A + A * A = 2 \<cdot>\<^sub>m (A * A)

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
A * A + A * A = 2 \<cdot>\<^sub>m (A * A)

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
have "det \<dots> = 2^n * det (A * A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (2 \<cdot>\<^sub>m (A * A)) = 2 ^ n * det (A * A)
[PROOF STEP]
by (subst det_smult, insert A, auto)
[PROOF STATE]
proof (state)
this:
det (2 \<cdot>\<^sub>m (A * A)) = 2 ^ n * det (A * A)

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
det (2 \<cdot>\<^sub>m (A * A)) = 2 ^ n * det (A * A)

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
have "det (A * A) = det A * det A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det (A * A) = det A * det A
[PROOF STEP]
by (rule det_mult[OF A A])
[PROOF STATE]
proof (state)
this:
det (A * A) = det A * det A

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
det (A * A) = det A * det A

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
have "2^n * \<dots> = det_bound_hadamard (2 * n) c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ n * (det A * det A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
unfolding detA
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ n * (det_bound_hadamard n c * det_bound_hadamard n c) = det_bound_hadamard (2 * n) c
[PROOF STEP]
unfolding det_bound_hadamard_altdef
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ n * ((if n = 1 \<or> even n then int n ^ (n div 2) * \<bar>c\<bar> ^ n else sqrt_int_floor ((int n * c\<^sup>2) ^ n)) * (if n = 1 \<or> even n then int n ^ (n div 2) * \<bar>c\<bar> ^ n else sqrt_int_floor ((int n * c\<^sup>2) ^ n))) = (if 2 * n = 1 \<or> even (2 * n) then int (2 * n) ^ (2 * n div 2) * \<bar>c\<bar> ^ (2 * n) else sqrt_int_floor ((int (2 * n) * c\<^sup>2) ^ (2 * n)))
[PROOF STEP]
by (simp add: ev ac_simps power_add[symmetric] sum n2)
[PROOF STATE]
proof (state)
this:
2 ^ n * (det A * det A) = det_bound_hadamard (2 * n) c

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
show "det ?FB = det_bound_hadamard (2 * n) c"
[PROOF STATE]
proof (prove)
using this:
det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c

goal (1 subgoal):
 1. det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
det (four_block_mat A A (- A) A) = det_bound_hadamard (2 * n) c

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
syl c (Suc (Suc m)) \<in> Bounded_mat c \<and> syl c (Suc (Suc m)) \<in> carrier_mat (2 ^ Suc (Suc m)) (2 ^ Suc (Suc m)) \<and> det (syl c (Suc (Suc m))) = det_bound_hadamard (2 ^ Suc (Suc m)) c

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
syl c n \<in> Bounded_mat c \<and> syl c n \<in> carrier_mat (2 ^ n) (2 ^ n) \<and> det (syl c n) = det_bound_hadamard (2 ^ n) c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma reduction_signs_is_get_signs_R: "reduction_signs_R p qs signs subsets m =  get_signs_R (reduce_system_R p (qs, (m, (subsets, signs))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. reduction_signs_R p qs signs subsets m = get_signs_R (reduce_system_R p (qs, m, subsets, signs))
[PROOF STEP]
unfolding reduction_signs_R_def get_signs_R_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take_indices signs (find_nonzeros_from_input_vec (solve_for_lhs_R p qs subsets m)) = snd (snd (reduce_system_R p (qs, m, subsets, signs)))
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take_indices signs (find_nonzeros_from_input_vec (solve_for_lhs_R p qs subsets m)) = snd (snd (let reduce_cols_A = take_cols_from_matrix m (find_nonzeros_from_input_vec (solve_for_lhs_R p qs subsets m)); rows_keep = rows_to_keep reduce_cols_A in (take_rows_from_matrix reduce_cols_A rows_keep, take_indices subsets rows_keep, take_indices signs (find_nonzeros_from_input_vec (solve_for_lhs_R p qs subsets m)))))
[PROOF STEP]
using reduction_step_R.elims snd_conv
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>reduction_step_R ?x ?xa ?xb ?xc = ?y; \<And>A signs subsets lhs_vec. \<lbrakk>?x = A; ?xa = signs; ?xb = subsets; ?xc = lhs_vec; ?y = (let reduce_cols_A = reduce_mat_cols A lhs_vec; rows_keep = rows_to_keep reduce_cols_A in (take_rows_from_matrix reduce_cols_A rows_keep, take_indices subsets rows_keep, take_indices signs (find_nonzeros_from_input_vec lhs_vec)))\<rbrakk> \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P
snd (?x1.0, ?x2.0) = ?x2.0

goal (1 subgoal):
 1. take_indices signs (find_nonzeros_from_input_vec (solve_for_lhs_R p qs subsets m)) = snd (snd (let reduce_cols_A = take_cols_from_matrix m (find_nonzeros_from_input_vec (solve_for_lhs_R p qs subsets m)); rows_keep = rows_to_keep reduce_cols_A in (take_rows_from_matrix reduce_cols_A rows_keep, take_indices subsets rows_keep, take_indices signs (find_nonzeros_from_input_vec (solve_for_lhs_R p qs subsets m)))))
[PROOF STEP]
by metis


[STATEMENT]
lemma OrdmemD: "Ord k \<Longrightarrow> j \<in> elts k \<Longrightarrow> j < k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ord k; j \<in> elts k\<rbrakk> \<Longrightarrow> j < k
[PROOF STEP]
using Ord_def Transset_def less_V_def
[PROOF STATE]
proof (prove)
using this:
Ord ?x \<equiv> Transset ?x \<and> (\<forall>y\<in>elts ?x. Transset y)
Transset ?x \<equiv> \<forall>y\<in>elts ?x. y \<le> ?x
?x < ?y \<equiv> ?x \<le> ?y \<and> ?x \<noteq> ?y

goal (1 subgoal):
 1. \<lbrakk>Ord k; j \<in> elts k\<rbrakk> \<Longrightarrow> j < k
[PROOF STEP]
by auto


[STATEMENT]
lemma state_eq:
  fixes \<nu> \<nu>' :: "'sz state"
  shows "(\<And>i. (fst \<nu>) $ i = (fst \<nu>') $ i) \<Longrightarrow> (\<And>i. (snd \<nu>) $ i = (snd \<nu>') $ i) \<Longrightarrow> \<nu>  = \<nu>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>i. fst \<nu> $ i = fst \<nu>' $ i; \<And>i. snd \<nu> $ i = snd \<nu>' $ i\<rbrakk> \<Longrightarrow> \<nu> = \<nu>'
[PROOF STEP]
apply (cases "\<nu>", cases "\<nu>'", auto)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b aa ba. \<lbrakk>\<And>i. a $ i = aa $ i; \<And>i. b $ i = ba $ i; \<nu> = (a, b); \<nu>' = (aa, ba)\<rbrakk> \<Longrightarrow> a = aa
 2. \<And>a b aa ba. \<lbrakk>\<And>i. a $ i = aa $ i; \<And>i. b $ i = ba $ i; \<nu> = (a, b); \<nu>' = (aa, ba)\<rbrakk> \<Longrightarrow> b = ba
[PROOF STEP]
by(rule vec_extensionality, auto)+


[STATEMENT]
theorem Resolution_complete:
  fixes F :: "'a :: countable formula"
  shows "\<Turnstile> F \<Longrightarrow> cnf (nnf (\<^bold>\<not>F)) \<turnstile> \<box>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Turnstile> F \<Longrightarrow> cnf (nnf (\<^bold>\<not> F)) \<turnstile> \<box>
[PROOF STEP]
proof(erule contrapos_pp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (cnf (nnf (\<^bold>\<not> F)) \<turnstile> \<box>) \<Longrightarrow> \<not> \<Turnstile> F
[PROOF STEP]
assume c: "\<not> (cnf (nnf (\<^bold>\<not> F)) \<turnstile> \<box>)"
[PROOF STATE]
proof (state)
this:
\<not> (cnf (nnf (\<^bold>\<not> F)) \<turnstile> \<box>)

goal (1 subgoal):
 1. \<not> (cnf (nnf (\<^bold>\<not> F)) \<turnstile> \<box>) \<Longrightarrow> \<not> \<Turnstile> F
[PROOF STEP]
have "{cnf_form_of (nnf (\<^bold>\<not>F))} \<in> {\<Gamma> |\<Gamma>. \<not> ((\<forall>\<gamma>\<in>\<Gamma>. is_cnf \<gamma>) \<longrightarrow> \<Union> (cnf ` \<Gamma>) \<turnstile> \<box>)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {cnf_form_of (nnf (\<^bold>\<not> F))} \<in> {\<Gamma> |\<Gamma>. \<not> ((\<forall>\<gamma>\<in>\<Gamma>. is_cnf \<gamma>) \<longrightarrow> \<Union> (cnf ` \<Gamma>) \<turnstile> \<box>)}
[PROOF STEP]
by(simp add: cnf_cnf[OF is_nnf_nnf] c cnf_form_of_is[OF is_nnf_nnf])
[PROOF STATE]
proof (state)
this:
{cnf_form_of (nnf (\<^bold>\<not> F))} \<in> {\<Gamma> |\<Gamma>. \<not> ((\<forall>\<gamma>\<in>\<Gamma>. is_cnf \<gamma>) \<longrightarrow> \<Union> (cnf ` \<Gamma>) \<turnstile> \<box>)}

goal (1 subgoal):
 1. \<not> (cnf (nnf (\<^bold>\<not> F)) \<turnstile> \<box>) \<Longrightarrow> \<not> \<Turnstile> F
[PROOF STEP]
from pcp_sat[OF R_consistent this]
[PROOF STATE]
proof (chain)
picking this:
sat {cnf_form_of (nnf (\<^bold>\<not> F))}
[PROOF STEP]
have "sat {cnf_form_of (nnf (\<^bold>\<not> F))}"
[PROOF STATE]
proof (prove)
using this:
sat {cnf_form_of (nnf (\<^bold>\<not> F))}

goal (1 subgoal):
 1. sat {cnf_form_of (nnf (\<^bold>\<not> F))}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
sat {cnf_form_of (nnf (\<^bold>\<not> F))}

goal (1 subgoal):
 1. \<not> (cnf (nnf (\<^bold>\<not> F)) \<turnstile> \<box>) \<Longrightarrow> \<not> \<Turnstile> F
[PROOF STEP]
thus "\<not> \<Turnstile> F"
[PROOF STATE]
proof (prove)
using this:
sat {cnf_form_of (nnf (\<^bold>\<not> F))}

goal (1 subgoal):
 1. \<not> \<Turnstile> F
[PROOF STEP]
by(simp add: sat_def cnf_form_semantics[OF is_nnf_nnf] nnf_semantics)
[PROOF STATE]
proof (state)
this:
\<not> \<Turnstile> F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma abs_summable_hurwitz_zeta:
  assumes "Re s > 1" "a + real b > 0"
  shows   "(\<lambda>n. 1 / (of_nat n + a) powr s) abs_summable_on {b..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
1 < Re s
0 < a + real b
[PROOF STEP]
have "summable (\<lambda>n. cmod (1 / (of_nat (n + b) + a) powr s))"
[PROOF STATE]
proof (prove)
using this:
1 < Re s
0 < a + real b

goal (1 subgoal):
 1. summable (\<lambda>n. cmod (1 / complex_of_real (real (n + b) + a) powr s))
[PROOF STEP]
using summable_hurwitz_zeta_real[of "Re s" "a + b"]
[PROOF STATE]
proof (prove)
using this:
1 < Re s
0 < a + real b
\<lbrakk>1 < Re s; 0 < a + real b\<rbrakk> \<Longrightarrow> summable (\<lambda>n. (real n + (a + real b)) powr - Re s)

goal (1 subgoal):
 1. summable (\<lambda>n. cmod (1 / complex_of_real (real (n + b) + a) powr s))
[PROOF STEP]
by (auto simp: norm_divide powr_minus field_simps norm_powr_real_powr)
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. cmod (1 / complex_of_real (real (n + b) + a) powr s))

goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
hence "(\<lambda>n. 1 / (of_nat (n + b) + a) powr s) abs_summable_on UNIV"
[PROOF STATE]
proof (prove)
using this:
summable (\<lambda>n. cmod (1 / complex_of_real (real (n + b) + a) powr s))

goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real (n + b) + a) powr s) abs_summable_on UNIV
[PROOF STEP]
by (auto simp: abs_summable_on_nat_iff' add_ac)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / complex_of_real (real (n + b) + a) powr s) abs_summable_on UNIV

goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / complex_of_real (real (n + b) + a) powr s) abs_summable_on UNIV

goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
have "?this \<longleftrightarrow> (\<lambda>n. 1 / (of_nat n + a) powr s) abs_summable_on range (\<lambda>n. n + b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>n. 1 / complex_of_real (real (n + b) + a) powr s) abs_summable_on UNIV) = ((\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on range (\<lambda>n. n + b))
[PROOF STEP]
by (rule abs_summable_on_reindex_iff) auto
[PROOF STATE]
proof (state)
this:
((\<lambda>n. 1 / complex_of_real (real (n + b) + a) powr s) abs_summable_on UNIV) = ((\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on range (\<lambda>n. n + b))

goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((\<lambda>n. 1 / complex_of_real (real (n + b) + a) powr s) abs_summable_on UNIV) = ((\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on range (\<lambda>n. n + b))

goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
have "range (\<lambda>n. n + b) = {b..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (\<lambda>n. n + b) = {b..}
[PROOF STEP]
by (rule range_add_nat)
[PROOF STATE]
proof (state)
this:
range (\<lambda>n. n + b) = {b..}

goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}

goal (1 subgoal):
 1. (\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / complex_of_real (real n + a) powr s) abs_summable_on {b..}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma branchDone_contradiction: \<open>branchDone z \<longleftrightarrow> (\<exists>p. p \<in> set z \<and> Neg p \<in> set z)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. branchDone z = (\<exists>p. p \<in> set z \<and> Neg p \<in> set z)
[PROOF STEP]
by (induct z rule: branchDone.induct) auto


[STATEMENT]
lemma coprime_h_c_poly:
fixes h::"'a mod_ring poly"
assumes "c1 \<noteq> c2"
shows "coprime (h - [:c1:]) (h - [:c2:])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comm_monoid_mult_class.coprime (h - [:c1:]) (h - [:c2:])
[PROOF STEP]
proof (intro coprimeI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. \<lbrakk>r dvd h - [:c1:]; r dvd h - [:c2:]\<rbrakk> \<Longrightarrow> is_unit r
[PROOF STEP]
fix d
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. \<lbrakk>r dvd h - [:c1:]; r dvd h - [:c2:]\<rbrakk> \<Longrightarrow> is_unit r
[PROOF STEP]
assume "d dvd h - [:c1:]"
  and "d dvd h - [:c2:]"
[PROOF STATE]
proof (state)
this:
d dvd h - [:c1:]
d dvd h - [:c2:]

goal (1 subgoal):
 1. \<And>r. \<lbrakk>r dvd h - [:c1:]; r dvd h - [:c2:]\<rbrakk> \<Longrightarrow> is_unit r
[PROOF STEP]
hence "h mod d = [:c1:] mod d" and "h mod d = [:c2:] mod d"
[PROOF STATE]
proof (prove)
using this:
d dvd h - [:c1:]
d dvd h - [:c2:]

goal (1 subgoal):
 1. h mod d = [:c1:] mod d &&& h mod d = [:c2:] mod d
[PROOF STEP]
using mod_eq_dvd_iff_poly
[PROOF STATE]
proof (prove)
using this:
d dvd h - [:c1:]
d dvd h - [:c2:]
(?x mod ?n = ?y mod ?n) = (?n dvd ?x - ?y)

goal (1 subgoal):
 1. h mod d = [:c1:] mod d &&& h mod d = [:c2:] mod d
[PROOF STEP]
by simp+
[PROOF STATE]
proof (state)
this:
h mod d = [:c1:] mod d
h mod d = [:c2:] mod d

goal (1 subgoal):
 1. \<And>r. \<lbrakk>r dvd h - [:c1:]; r dvd h - [:c2:]\<rbrakk> \<Longrightarrow> is_unit r
[PROOF STEP]
hence "[:c1:] mod d = [:c2:] mod d"
[PROOF STATE]
proof (prove)
using this:
h mod d = [:c1:] mod d
h mod d = [:c2:] mod d

goal (1 subgoal):
 1. [:c1:] mod d = [:c2:] mod d
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
[:c1:] mod d = [:c2:] mod d

goal (1 subgoal):
 1. \<And>r. \<lbrakk>r dvd h - [:c1:]; r dvd h - [:c2:]\<rbrakk> \<Longrightarrow> is_unit r
[PROOF STEP]
hence "d dvd [:c2 - c1:]"
[PROOF STATE]
proof (prove)
using this:
[:c1:] mod d = [:c2:] mod d

goal (1 subgoal):
 1. d dvd [:c2 - c1:]
[PROOF STEP]
by (metis (no_types) mod_eq_dvd_iff_poly diff_pCons right_minus_eq)
[PROOF STATE]
proof (state)
this:
d dvd [:c2 - c1:]

goal (1 subgoal):
 1. \<And>r. \<lbrakk>r dvd h - [:c1:]; r dvd h - [:c2:]\<rbrakk> \<Longrightarrow> is_unit r
[PROOF STEP]
thus "is_unit d"
[PROOF STATE]
proof (prove)
using this:
d dvd [:c2 - c1:]

goal (1 subgoal):
 1. is_unit d
[PROOF STEP]
by (metis (no_types) assms dvd_trans is_unit_monom_0 monom_0 right_minus_eq)
[PROOF STATE]
proof (state)
this:
is_unit d

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma smallest_prime_between_None:
  "smallest_prime_between m n = None \<longleftrightarrow> (\<forall>q. m \<le> q \<and> q \<le> n \<longrightarrow> \<not> prime q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (smallest_prime_between m n = None) = (\<forall>q. m \<le> q \<and> q \<le> n \<longrightarrow> \<not> prime q)
[PROOF STEP]
by (auto simp add: smallest_prime_between_def)


[STATEMENT]
lemma gauss_int_norm_not_3_mod_4: "[gauss_int_norm z \<noteq> 3] (mod 4)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
have A: "ReZ z mod 4 \<in> {0..3}" "ImZ z mod 4 \<in> {0..3}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ReZ z mod 4 \<in> {0..3} &&& ImZ z mod 4 \<in> {0..3}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ReZ z mod 4 \<in> {0..3}
ImZ z mod 4 \<in> {0..3}

goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
have B: "{0..3} = {0, 1, 2, 3 :: int}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {0..3} = {0, 1, 2, 3}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{0..3} = {0, 1, 2, 3}

goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
have "[ReZ z ^ 2 + ImZ z ^ 2 = (ReZ z mod 4) ^ 2 + (ImZ z mod 4) ^ 2] (mod 4)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [(ReZ z)\<^sup>2 + (ImZ z)\<^sup>2 = (ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2] (mod 4)
[PROOF STEP]
by (intro cong_add cong_pow) (auto simp: cong_def)
[PROOF STATE]
proof (state)
this:
[(ReZ z)\<^sup>2 + (ImZ z)\<^sup>2 = (ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2] (mod 4)

goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
[(ReZ z)\<^sup>2 + (ImZ z)\<^sup>2 = (ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2] (mod 4)

goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
have "((ReZ z mod 4) ^ 2 + (ImZ z mod 4) ^ 2) mod 4 \<noteq> 3 mod 4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2) mod 4 \<noteq> 3 mod 4
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
ReZ z mod 4 \<in> {0..3}
ImZ z mod 4 \<in> {0..3}

goal (1 subgoal):
 1. ((ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2) mod 4 \<noteq> 3 mod 4
[PROOF STEP]
unfolding B
[PROOF STATE]
proof (prove)
using this:
ReZ z mod 4 \<in> {0, 1, 2, 3}
ImZ z mod 4 \<in> {0, 1, 2, 3}

goal (1 subgoal):
 1. ((ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2) mod 4 \<noteq> 3 mod 4
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2) mod 4 \<noteq> 3 mod 4

goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
[(ReZ z)\<^sup>2 + (ImZ z)\<^sup>2 = (ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2] (mod 4)
((ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2) mod 4 \<noteq> 3 mod 4
[PROOF STEP]
have "[ReZ z ^ 2 + ImZ z ^ 2 \<noteq> 3] (mod 4)"
[PROOF STATE]
proof (prove)
using this:
[(ReZ z)\<^sup>2 + (ImZ z)\<^sup>2 = (ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2] (mod 4)
((ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2) mod 4 \<noteq> 3 mod 4

goal (1 subgoal):
 1. [(ReZ z)\<^sup>2 + (ImZ z)\<^sup>2 \<noteq> 3] (mod 4)
[PROOF STEP]
unfolding cong_def
[PROOF STATE]
proof (prove)
using this:
((ReZ z)\<^sup>2 + (ImZ z)\<^sup>2) mod 4 = ((ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2) mod 4
((ReZ z mod 4)\<^sup>2 + (ImZ z mod 4)\<^sup>2) mod 4 \<noteq> 3 mod 4

goal (1 subgoal):
 1. ((ReZ z)\<^sup>2 + (ImZ z)\<^sup>2) mod 4 \<noteq> 3 mod 4
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
[(ReZ z)\<^sup>2 + (ImZ z)\<^sup>2 \<noteq> 3] (mod 4)

goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
hence "[int (nat (ReZ z ^ 2 + ImZ z ^ 2)) \<noteq> int 3] (mod (int 4))"
[PROOF STATE]
proof (prove)
using this:
[(ReZ z)\<^sup>2 + (ImZ z)\<^sup>2 \<noteq> 3] (mod 4)

goal (1 subgoal):
 1. [int (nat ((ReZ z)\<^sup>2 + (ImZ z)\<^sup>2)) \<noteq> int 3] (mod int 4)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
[int (nat ((ReZ z)\<^sup>2 + (ImZ z)\<^sup>2)) \<noteq> int 3] (mod int 4)

goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
[int (nat ((ReZ z)\<^sup>2 + (ImZ z)\<^sup>2)) \<noteq> int 3] (mod int 4)

goal (1 subgoal):
 1. [gauss_int_norm z \<noteq> 3] (mod 4)
[PROOF STEP]
unfolding gauss_int_norm_def
[PROOF STATE]
proof (prove)
using this:
[int (nat ((ReZ z)\<^sup>2 + (ImZ z)\<^sup>2)) \<noteq> int 3] (mod int 4)

goal (1 subgoal):
 1. [nat ((ReZ z)\<^sup>2 + (ImZ z)\<^sup>2) \<noteq> 3] (mod 4)
[PROOF STEP]
by (subst (asm) cong_int_iff)
[PROOF STATE]
proof (state)
this:
[gauss_int_norm z \<noteq> 3] (mod 4)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma roots2: fixes p :: "'a :: field_char_0 poly"
  assumes p2: "p = [: c, b, a :]" and a: "a \<noteq> 0"
  shows "{x. poly p x = 0} = { - ( b / (2 * a)) + e | e. e^2 = ( b / (2 * a))^2 - c/a}" (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
define b2a where "b2a = b / (2 * a)"
[PROOF STATE]
proof (state)
this:
b2a = b / ((2::'a) * a)

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
b2a = b / ((2::'a) * a)

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
have "(x \<in> ?l) = (x * x * a + x * b + c = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> {x. poly p x = (0::'a)}) = (x * x * a + x * b + c = (0::'a))
[PROOF STEP]
unfolding p2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> {x. poly [:c, b, a:] x = (0::'a)}) = (x * x * a + x * b + c = (0::'a))
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
(x \<in> {x. poly p x = (0::'a)}) = (x * x * a + x * b + c = (0::'a))

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x \<in> {x. poly p x = (0::'a)}) = (x * x * a + x * b + c = (0::'a))

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
have "\<dots> = ((x * x + 2 * x * b2a) + c/a = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x * x * a + x * b + c = (0::'a)) = (x * x + (2::'a) * x * b2a + c / a = (0::'a))
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a)

goal (1 subgoal):
 1. (x * x * a + x * b + c = (0::'a)) = (x * x + (2::'a) * x * b2a + c / a = (0::'a))
[PROOF STEP]
by (auto simp: b2a_def field_simps)
[PROOF STATE]
proof (state)
this:
(x * x * a + x * b + c = (0::'a)) = (x * x + (2::'a) * x * b2a + c / a = (0::'a))

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x * x * a + x * b + c = (0::'a)) = (x * x + (2::'a) * x * b2a + c / a = (0::'a))

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
have "x * x + 2 * x * b2a = (x * x + 2 * x * b2a + b2a^2) - b2a^2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * x + (2::'a) * x * b2a = x * x + (2::'a) * x * b2a + b2a\<^sup>2 - b2a\<^sup>2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x * x + (2::'a) * x * b2a = x * x + (2::'a) * x * b2a + b2a\<^sup>2 - b2a\<^sup>2

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x * x + (2::'a) * x * b2a = x * x + (2::'a) * x * b2a + b2a\<^sup>2 - b2a\<^sup>2

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
have "\<dots> = (x + b2a) ^ 2 - b2a ^ 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * x + (2::'a) * x * b2a + b2a\<^sup>2 - b2a\<^sup>2 = (x + b2a)\<^sup>2 - b2a\<^sup>2
[PROOF STEP]
by (simp add: field_simps power2_eq_square)
[PROOF STATE]
proof (state)
this:
x * x + (2::'a) * x * b2a + b2a\<^sup>2 - b2a\<^sup>2 = (x + b2a)\<^sup>2 - b2a\<^sup>2

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x * x + (2::'a) * x * b2a + b2a\<^sup>2 - b2a\<^sup>2 = (x + b2a)\<^sup>2 - b2a\<^sup>2

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
have "(\<dots> + c / a = 0) = ((x + b2a) ^ 2 = b2a^2 - c/a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x + b2a)\<^sup>2 - b2a\<^sup>2 + c / a = (0::'a)) = ((x + b2a)\<^sup>2 = b2a\<^sup>2 - c / a)
[PROOF STEP]
by algebra
[PROOF STATE]
proof (state)
this:
((x + b2a)\<^sup>2 - b2a\<^sup>2 + c / a = (0::'a)) = ((x + b2a)\<^sup>2 = b2a\<^sup>2 - c / a)

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((x + b2a)\<^sup>2 - b2a\<^sup>2 + c / a = (0::'a)) = ((x + b2a)\<^sup>2 = b2a\<^sup>2 - c / a)

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
have "\<dots> = (x \<in> ?r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x + b2a)\<^sup>2 = b2a\<^sup>2 - c / a) = (x \<in> {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a})
[PROOF STEP]
unfolding b2a_def[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x + b2a)\<^sup>2 = b2a\<^sup>2 - c / a) = (x \<in> {- b2a + e |e. e\<^sup>2 = b2a\<^sup>2 - c / a})
[PROOF STEP]
by (auto simp: field_simps)
[PROOF STATE]
proof (state)
this:
((x + b2a)\<^sup>2 = b2a\<^sup>2 - c / a) = (x \<in> {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a})

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(x \<in> {x. poly p x = (0::'a)}) = (x \<in> {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a})
[PROOF STEP]
have "(x \<in> ?l) = (x \<in> ?r)"
[PROOF STATE]
proof (prove)
using this:
(x \<in> {x. poly p x = (0::'a)}) = (x \<in> {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a})

goal (1 subgoal):
 1. (x \<in> {x. poly p x = (0::'a)}) = (x \<in> {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a})
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(x \<in> {x. poly p x = (0::'a)}) = (x \<in> {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a})

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
(?x2 \<in> {x. poly p x = (0::'a)}) = (?x2 \<in> {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a})

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(?x2 \<in> {x. poly p x = (0::'a)}) = (?x2 \<in> {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a})

goal (1 subgoal):
 1. {x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x. poly p x = (0::'a)} = {- (b / ((2::'a) * a)) + e |e. e\<^sup>2 = (b / ((2::'a) * a))\<^sup>2 - c / a}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma star_subdist_var:  "x\<^sup>\<star> + y\<^sup>\<star> \<le> (x + y)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<star> + y\<^sup>\<star> \<le> (x + y)\<^sup>\<star>
[PROOF STEP]
using join.sup_commute star_subdist
[PROOF STATE]
proof (prove)
using this:
?x + ?y = ?y + ?x
?x\<^sup>\<star> \<le> (?x + ?y)\<^sup>\<star>

goal (1 subgoal):
 1. x\<^sup>\<star> + y\<^sup>\<star> \<le> (x + y)\<^sup>\<star>
[PROOF STEP]
by force


[STATEMENT]
lemma isLub_lub: "(\<exists>L. isLub S cl L) \<longleftrightarrow> isLub S cl (lub S cl)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>L. isLub S cl L) = isLub S cl (lub S cl)
[PROOF STEP]
by (simp add: lub_def least_def isLub_def some_eq_ex [symmetric])


[STATEMENT]
lemma homeomorphic_map_openness_eq:
     "homeomorphic_map X Y f \<Longrightarrow> openin X U \<longleftrightarrow> U \<subseteq> topspace X \<and> openin Y (f ` U)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homeomorphic_map X Y f \<Longrightarrow> openin X U = (U \<subseteq> topspace X \<and> openin Y (f ` U))
[PROOF STEP]
by (meson homeomorphic_map_openness openin_closedin_eq)


[STATEMENT]
lemma poincare_line_sym:
  assumes "u \<in> unit_disc" "v \<in> unit_disc" "u \<noteq> v"
  shows "poincare_line u v = poincare_line v u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_line u v = poincare_line v u
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v

goal (1 subgoal):
 1. poincare_line u v = poincare_line v u
[PROOF STEP]
using unique_poincare_line[of u v "poincare_line v u"]
[PROOF STATE]
proof (prove)
using this:
u \<in> unit_disc
v \<in> unit_disc
u \<noteq> v
\<lbrakk>u \<noteq> v; u \<in> unit_disc; v \<in> unit_disc; u \<in> circline_set (poincare_line v u); v \<in> circline_set (poincare_line v u); is_poincare_line (poincare_line v u)\<rbrakk> \<Longrightarrow> poincare_line v u = poincare_line u v

goal (1 subgoal):
 1. poincare_line u v = poincare_line v u
[PROOF STEP]
by simp


[STATEMENT]
lemma well_com_hadamard_k:
  "k \<le> n \<Longrightarrow> well_com (hadamard_n k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k \<le> n \<Longrightarrow> well_com (hadamard_n k)
[PROOF STEP]
proof (induct k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> well_com (hadamard_n 0)
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> well_com (hadamard_n k); Suc k \<le> n\<rbrakk> \<Longrightarrow> well_com (hadamard_n (Suc k))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
0 \<le> n

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> well_com (hadamard_n 0)
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> well_com (hadamard_n k); Suc k \<le> n\<rbrakk> \<Longrightarrow> well_com (hadamard_n (Suc k))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
0 \<le> n

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

goal (1 subgoal):
 1. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> well_com (hadamard_n k); Suc k \<le> n\<rbrakk> \<Longrightarrow> well_com (hadamard_n (Suc k))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> well_com (hadamard_n k); Suc k \<le> n\<rbrakk> \<Longrightarrow> well_com (hadamard_n (Suc k))
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
n \<le> n \<Longrightarrow> well_com (hadamard_n n)
Suc n \<le> n

goal (1 subgoal):
 1. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> well_com (hadamard_n k); Suc k \<le> n\<rbrakk> \<Longrightarrow> well_com (hadamard_n (Suc k))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n \<le> n \<Longrightarrow> well_com (hadamard_n n)
Suc n \<le> n
[PROOF STEP]
have "well_com (hadamard_n n)"
[PROOF STATE]
proof (prove)
using this:
n \<le> n \<Longrightarrow> well_com (hadamard_n n)
Suc n \<le> n

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

goal (1 subgoal):
 1. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> well_com (hadamard_n k); Suc k \<le> n\<rbrakk> \<Longrightarrow> well_com (hadamard_n (Suc k))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
well_com (hadamard_n n)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
well_com (hadamard_n n)

goal (1 subgoal):
 1. well_com (hadamard_n (Suc n))
[PROOF STEP]
unfolding hadamard_n.simps well_com.simps
[PROOF STATE]
proof (prove)
using this:
well_com (hadamard_n n)

goal (1 subgoal):
 1. well_com (hadamard_n n) \<and> tensor_P (hadamard_on_i n) (1\<^sub>m K) \<in> carrier_mat d d \<and> unitary (tensor_P (hadamard_on_i n) (1\<^sub>m K))
[PROOF STEP]
using tensor_P_dim unitary_exhadamard_on_i Suc
[PROOF STATE]
proof (prove)
using this:
well_com (hadamard_n n)
tensor_P ?A ?B \<in> carrier_mat d d
?k < n \<Longrightarrow> unitary (tensor_P (hadamard_on_i ?k) (1\<^sub>m K))
n \<le> n \<Longrightarrow> well_com (hadamard_n n)
Suc n \<le> n

goal (1 subgoal):
 1. well_com (hadamard_n n) \<and> tensor_P (hadamard_on_i n) (1\<^sub>m K) \<in> carrier_mat d d \<and> unitary (tensor_P (hadamard_on_i n) (1\<^sub>m K))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
well_com (hadamard_n (Suc n))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma member_empty_empty: "(\<forall>x :: 'a. \<not> member dxs x) \<longleftrightarrow> dxs = empty"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. \<not> member dxs x) = (dxs = DList_Set.empty)
[PROOF STEP]
by(transfer)(simp add: equal.equal_eq[OF equal_ceq] List.member_def)


[STATEMENT]
lemma not_less_zero_hmset[simp]: "\<not> M < 0" for M :: hmultiset
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> M < 0
[PROOF STEP]
using not_le zero_le_hmset
[PROOF STATE]
proof (prove)
using this:
(\<not> ?x \<le> ?y) = (?y < ?x)
0 \<le> ?M

goal (1 subgoal):
 1. \<not> M < 0
[PROOF STEP]
by blast


[STATEMENT]
lemma sum_sum_distl:
  assumes "finite (X :: 'a::dioid_one_zero set)"
  and "finite Y"
  shows "\<Sum>((\<lambda>x. x \<cdot> (\<Sum>Y)) ` X) = \<Sum>{x \<cdot> y |x y. x \<in> X \<and> y \<in> Y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum> ((\<lambda>x. x \<cdot> \<Sum> Y) ` X) = \<Sum> {x \<cdot> y |x y. x \<in> X \<and> y \<in> Y}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Sum> ((\<lambda>x. x \<cdot> \<Sum> Y) ` X) = \<Sum> {x \<cdot> y |x y. x \<in> X \<and> y \<in> Y}
[PROOF STEP]
have "\<Sum>((\<lambda>x. x \<cdot> (\<Sum>Y)) ` X) = \<Sum>{\<Sum>{x \<cdot> y |y. y \<in> Y} |x. x \<in> X}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum> ((\<lambda>x. x \<cdot> \<Sum> Y) ` X) = \<Sum> {\<Sum> {x \<cdot> y |y. y \<in> Y} |x. x \<in> X}
[PROOF STEP]
by (auto simp add: sum_distl assms fset_to_im)
[PROOF STATE]
proof (state)
this:
\<Sum> ((\<lambda>x. x \<cdot> \<Sum> Y) ` X) = \<Sum> {\<Sum> {x \<cdot> y |y. y \<in> Y} |x. x \<in> X}

goal (1 subgoal):
 1. \<Sum> ((\<lambda>x. x \<cdot> \<Sum> Y) ` X) = \<Sum> {x \<cdot> y |x y. x \<in> X \<and> y \<in> Y}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Sum> ((\<lambda>x. x \<cdot> \<Sum> Y) ` X) = \<Sum> {\<Sum> {x \<cdot> y |y. y \<in> Y} |x. x \<in> X}

goal (1 subgoal):
 1. \<Sum> ((\<lambda>x. x \<cdot> \<Sum> Y) ` X) = \<Sum> {x \<cdot> y |x y. x \<in> X \<and> y \<in> Y}
[PROOF STEP]
by (simp add: assms sum_flatten1)
[PROOF STATE]
proof (state)
this:
\<Sum> ((\<lambda>x. x \<cdot> \<Sum> Y) ` X) = \<Sum> {x \<cdot> y |x y. x \<in> X \<and> y \<in> Y}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma strict_part_mono_by_steps:
  "strict_part_mono {..n :: nat} f = (n \<noteq> 0 \<longrightarrow> f (n - 1) < f n \<and> strict_part_mono {.. n - 1} f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. strict_part_mono {..n} f = (n \<noteq> 0 \<longrightarrow> f (n - 1) < f n \<and> strict_part_mono {..n - 1} f)
[PROOF STEP]
apply (cases n; simp add: strict_part_mono_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> (\<forall>A\<in>{..Suc nat}. \<forall>B\<in>{..Suc nat}. A < B \<longrightarrow> f A < f B) = (f nat < f (Suc nat) \<and> (\<forall>A\<in>{..nat}. \<forall>B\<in>{..nat}. A < B \<longrightarrow> f A < f B))
[PROOF STEP]
apply (safe; clarsimp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>nat A B. \<lbrakk>n = Suc nat; B \<le> Suc nat; f nat < f (Suc nat); \<forall>A\<in>{..nat}. \<forall>B\<in>{..nat}. A < B \<longrightarrow> f A < f B; A < B\<rbrakk> \<Longrightarrow> f A < f B
[PROOF STEP]
apply (case_tac "B = Suc nat"; simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>nat A B. \<lbrakk>n = Suc nat; f nat < f (Suc nat); \<forall>A\<in>{..nat}. \<forall>B\<in>{..nat}. A < B \<longrightarrow> f A < f B; A < Suc nat; B = Suc nat\<rbrakk> \<Longrightarrow> f A < f (Suc nat)
[PROOF STEP]
apply (case_tac "A = nat"; clarsimp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>nat A. \<lbrakk>n = Suc nat; f nat < f (Suc nat); \<forall>A\<in>{..nat}. \<forall>B\<in>{..nat}. A < B \<longrightarrow> f A < f B; A < Suc nat; A \<noteq> nat\<rbrakk> \<Longrightarrow> f A < f (Suc nat)
[PROOF STEP]
apply (erule order_less_trans [rotated])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>nat A. \<lbrakk>n = Suc nat; \<forall>A\<in>{..nat}. \<forall>B\<in>{..nat}. A < B \<longrightarrow> f A < f B; A < Suc nat; A \<noteq> nat\<rbrakk> \<Longrightarrow> f A < f nat
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in finite_distrib_lattice) join_irreducibles_meet_homomorphism:
  "\<lbrace> x \<sqinter> y \<rbrace> = \<lbrace> x \<rbrace> \<inter> \<lbrace> y \<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrace> x \<sqinter> y \<rbrace> = \<lbrace> x \<rbrace> \<inter> \<lbrace> y \<rbrace>
[PROOF STEP]
unfolding
    join_irreducibles_embedding_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a \<in> \<J>. a \<le> x \<sqinter> y} = {a \<in> \<J>. a \<le> x} \<inter> {a \<in> \<J>. a \<le> y}
[PROOF STEP]
by auto


[STATEMENT]
lemma int_shiftl_numeral [simp]:
  "push_bit (numeral w') (numeral w :: int) = push_bit (pred_numeral w') (numeral (num.Bit0 w))"
  "push_bit (numeral w') (- numeral w :: int) = push_bit (pred_numeral w') (- numeral (num.Bit0 w))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. push_bit (numeral w') (numeral w) = push_bit (pred_numeral w') (numeral (num.Bit0 w)) &&& push_bit (numeral w') (- numeral w) = push_bit (pred_numeral w') (- numeral (num.Bit0 w))
[PROOF STEP]
by(simp_all add: numeral_eq_Suc shiftl_int_def)
  (metis add_One mult_inc semiring_norm(11) semiring_norm(13) semiring_norm(2) semiring_norm(6) semiring_norm(87))+


[STATEMENT]
lemma (in comm_monoid) Units_Lower: "Units G = Lower (division_rel G) (carrier G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Units G = Lower (division_rel G) (carrier G)
[PROOF STEP]
apply (auto simp add: Units_def Lower_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa xb. \<lbrakk>x \<in> carrier G; xa \<in> carrier G; xa \<otimes> x = \<one>; x \<otimes> xa = \<one>; xb \<in> carrier G\<rbrakk> \<Longrightarrow> x divides xb
 2. \<And>x. \<lbrakk>x \<in> carrier G; \<forall>xa. xa \<in> carrier G \<longrightarrow> x divides xa\<rbrakk> \<Longrightarrow> \<exists>xa\<in>carrier G. xa \<otimes> x = \<one> \<and> x \<otimes> xa = \<one>
[PROOF STEP]
apply (metis Units_one_closed unit_divides unit_factor)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> carrier G; \<forall>xa. xa \<in> carrier G \<longrightarrow> x divides xa\<rbrakk> \<Longrightarrow> \<exists>xa\<in>carrier G. xa \<otimes> x = \<one> \<and> x \<otimes> xa = \<one>
[PROOF STEP]
apply (metis Unit_eq_dividesone Units_r_inv_ex m_ac(2) one_closed)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma n_eq1: "n x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z \<longleftrightarrow> y \<le> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (y \<le> z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (y \<le> z)
[PROOF STEP]
have  "n x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z \<longleftrightarrow> n x \<cdot> y + t x \<cdot> y \<le> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (!x \<cdot> y + t x \<cdot> y \<le> z)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (!x \<cdot> y + t x \<cdot> y \<le> z)

goal (1 subgoal):
 1. (!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (y \<le> z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (!x \<cdot> y + t x \<cdot> y \<le> z)

goal (1 subgoal):
 1. (!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (y \<le> z)
[PROOF STEP]
have "... \<longleftrightarrow> (n x + t x) \<cdot> y \<le> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (!x \<cdot> y + t x \<cdot> y \<le> z) = ((!x + t x) \<cdot> y \<le> z)
[PROOF STEP]
using local.distrib_right'
[PROOF STATE]
proof (prove)
using this:
(?x + ?y) \<cdot> ?z = ?x \<cdot> ?z + ?y \<cdot> ?z

goal (1 subgoal):
 1. (!x \<cdot> y + t x \<cdot> y \<le> z) = ((!x + t x) \<cdot> y \<le> z)
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
(!x \<cdot> y + t x \<cdot> y \<le> z) = ((!x + t x) \<cdot> y \<le> z)

goal (1 subgoal):
 1. (!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (y \<le> z)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = ((!x + t x) \<cdot> y \<le> z)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = ((!x + t x) \<cdot> y \<le> z)

goal (1 subgoal):
 1. (!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (y \<le> z)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(!x \<cdot> y \<le> z \<and> t x \<cdot> y \<le> z) = (y \<le> z)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem FormP_Disj:
  "{FormP x, FormP y} \<turnstile> FormP (Q_Disj x y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {FormP x, FormP y} \<turnstile> FormP (Q_Disj x y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {FormP x, FormP y} \<turnstile> FormP (Q_Disj x y)
[PROOF STEP]
obtain k1::name and s1::name and k2::name and s2::name and k::name and s::name
    where "atom s1 \<sharp> (x,y)"        "atom k1 \<sharp> (x,y,s1)"
      "atom s2 \<sharp> (x,y,k1,s1)"  "atom k2 \<sharp> (x,y,s2,k1,s1)"
      "atom s  \<sharp> (x,y,k2,s2,k1,s1)" "atom k  \<sharp> (x,y,s,k2,s2,k1,s1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>s1 k1 s2 k2 s k. \<lbrakk>atom s1 \<sharp> (x, y); atom k1 \<sharp> (x, y, s1); atom s2 \<sharp> (x, y, k1, s1); atom k2 \<sharp> (x, y, s2, k1, s1); atom s \<sharp> (x, y, k2, s2, k1, s1); atom k \<sharp> (x, y, s, k2, s2, k1, s1)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis obtain_fresh)
[PROOF STATE]
proof (state)
this:
atom s1 \<sharp> (x, y)
atom k1 \<sharp> (x, y, s1)
atom s2 \<sharp> (x, y, k1, s1)
atom k2 \<sharp> (x, y, s2, k1, s1)
atom s \<sharp> (x, y, k2, s2, k1, s1)
atom k \<sharp> (x, y, s, k2, s2, k1, s1)

goal (1 subgoal):
 1. {FormP x, FormP y} \<turnstile> FormP (Q_Disj x y)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
atom s1 \<sharp> (x, y)
atom k1 \<sharp> (x, y, s1)
atom s2 \<sharp> (x, y, k1, s1)
atom k2 \<sharp> (x, y, s2, k1, s1)
atom s \<sharp> (x, y, k2, s2, k1, s1)
atom k \<sharp> (x, y, s, k2, s2, k1, s1)

goal (1 subgoal):
 1. {FormP x, FormP y} \<turnstile> FormP (Q_Disj x y)
[PROOF STEP]
by (force simp: FormP.simps [of k s "Q_Disj x y"]
        FormP.simps [of k1 s1 x]
        FormP.simps [of k2 s2 y]
        intro: SeqFormP_Disj [THEN cut2])
[PROOF STATE]
proof (state)
this:
{FormP x, FormP y} \<turnstile> FormP (Q_Disj x y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma list_all_list[simp]:
assumes "finite A" shows "list_all \<phi> (list A) \<longleftrightarrow> (\<forall> a \<in> A. \<phi> a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all \<phi> (list A) = (\<forall>a\<in>A. \<phi> a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. list_all \<phi> (list A) = (\<forall>a\<in>A. \<phi> a)
[PROOF STEP]
unfolding list_all_iff
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. Ball (set (list A)) \<phi> = (\<forall>a\<in>A. \<phi> a)
[PROOF STEP]
by simp


[STATEMENT]
lemma lead_coeff_prod: "(\<And>x. x \<in> A \<Longrightarrow> f x \<noteq> 0) \<Longrightarrow> lead_coeff (prod f A) = (\<Prod>x\<in>A. lead_coeff (f x))"
  for f :: "'a \<Rightarrow> 'b :: {comm_semiring_1, semiring_no_zero_divisors} poly"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> A \<Longrightarrow> f x \<noteq> 0) \<Longrightarrow> lead_coeff (prod f A) = (\<Prod>x\<in>A. lead_coeff (f x))
[PROOF STEP]
by (induction A rule: infinite_finite_induct) (auto simp: lead_coeff_mult prod_zero_iff')


[STATEMENT]
lemma face_of_empty [simp]: "S face_of {} \<longleftrightarrow> S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S face_of {}) = (S = {})
[PROOF STEP]
by (meson empty_face_of face_of_def subset_empty)


[STATEMENT]
lemma ReZ_numeral [simp]: "ReZ (numeral n) = numeral n"
  and ImZ_numeral [simp]: "ImZ (numeral n) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ReZ (numeral n) = numeral n &&& ImZ (numeral n) = 0
[PROOF STEP]
by (subst of_nat_numeral [symmetric], subst ReZ_of_nat ImZ_of_nat, simp)+


[STATEMENT]
lemma variety_ofI: "(\<And>f. f \<in> F \<Longrightarrow> poly_eval a f = 0) \<Longrightarrow> a \<in> \<V> F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>f. f \<in> F \<Longrightarrow> poly_eval a f = (0::'b)) \<Longrightarrow> a \<in> \<V> F
[PROOF STEP]
by (simp add: variety_of_def)


[STATEMENT]
lemma division_decomp:
  assumes "a dvd b * c"
  shows "\<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
proof (cases "gcd a b = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. gcd a b = (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
 2. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
gcd a b = (0::'a)

goal (2 subgoals):
 1. gcd a b = (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
 2. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
gcd a b = (0::'a)
[PROOF STEP]
have "a = 0 \<and> b = 0"
[PROOF STATE]
proof (prove)
using this:
gcd a b = (0::'a)

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

goal (2 subgoals):
 1. gcd a b = (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
 2. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a = (0::'a) \<and> b = (0::'a)
[PROOF STEP]
have "a = 0 * c \<and> 0 dvd b \<and> c dvd c"
[PROOF STATE]
proof (prove)
using this:
a = (0::'a) \<and> b = (0::'a)

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

goal (2 subgoals):
 1. gcd a b = (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
 2. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a = (0::'a) * c \<and> (0::'a) dvd b \<and> c dvd c
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a = (0::'a) * c \<and> (0::'a) dvd b \<and> c dvd c

goal (1 subgoal):
 1. \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
gcd a b \<noteq> (0::'a)

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
let ?d = "gcd a b"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
from gcd_coprime_exists [OF False]
[PROOF STATE]
proof (chain)
picking this:
\<exists>a' b'. a = a' * gcd a b \<and> b = b' * gcd a b \<and> coprime a' b'
[PROOF STEP]
obtain a' b' where ab': "a = a' * ?d" "b = b' * ?d" "coprime a' b'"
[PROOF STATE]
proof (prove)
using this:
\<exists>a' b'. a = a' * gcd a b \<and> b = b' * gcd a b \<and> coprime a' b'

goal (1 subgoal):
 1. (\<And>a' b'. \<lbrakk>a = a' * gcd a b; b = b' * gcd a b; coprime a' b'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a = a' * gcd a b
b = b' * gcd a b
coprime a' b'

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
from ab'(1)
[PROOF STATE]
proof (chain)
picking this:
a = a' * gcd a b
[PROOF STEP]
have "a' dvd a"
[PROOF STATE]
proof (prove)
using this:
a = a' * gcd a b

goal (1 subgoal):
 1. a' dvd a
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
a' dvd a

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
a dvd b * c
a' dvd a
[PROOF STEP]
have "a' dvd b * c"
[PROOF STATE]
proof (prove)
using this:
a dvd b * c
a' dvd a

goal (1 subgoal):
 1. a' dvd b * c
[PROOF STEP]
using dvd_trans [of a' a "b * c"]
[PROOF STATE]
proof (prove)
using this:
a dvd b * c
a' dvd a
\<lbrakk>a' dvd a; a dvd b * c\<rbrakk> \<Longrightarrow> a' dvd b * c

goal (1 subgoal):
 1. a' dvd b * c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a' dvd b * c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
from assms ab'(1,2)
[PROOF STATE]
proof (chain)
picking this:
a dvd b * c
a = a' * gcd a b
b = b' * gcd a b
[PROOF STEP]
have "a' * ?d dvd (b' * ?d) * c"
[PROOF STATE]
proof (prove)
using this:
a dvd b * c
a = a' * gcd a b
b = b' * gcd a b

goal (1 subgoal):
 1. a' * gcd a b dvd b' * gcd a b * c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a' * gcd a b dvd b' * gcd a b * c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a' * gcd a b dvd b' * gcd a b * c
[PROOF STEP]
have "?d * a' dvd ?d * (b' * c)"
[PROOF STATE]
proof (prove)
using this:
a' * gcd a b dvd b' * gcd a b * c

goal (1 subgoal):
 1. gcd a b * a' dvd gcd a b * (b' * c)
[PROOF STEP]
by (simp add: mult_ac)
[PROOF STATE]
proof (state)
this:
gcd a b * a' dvd gcd a b * (b' * c)

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
with \<open>?d \<noteq> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
gcd a b \<noteq> (0::'a)
gcd a b * a' dvd gcd a b * (b' * c)
[PROOF STEP]
have "a' dvd b' * c"
[PROOF STATE]
proof (prove)
using this:
gcd a b \<noteq> (0::'a)
gcd a b * a' dvd gcd a b * (b' * c)

goal (1 subgoal):
 1. a' dvd b' * c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a' dvd b' * c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a' dvd b' * c
[PROOF STEP]
have "a' dvd c"
[PROOF STATE]
proof (prove)
using this:
a' dvd b' * c

goal (1 subgoal):
 1. a' dvd c
[PROOF STEP]
using \<open>coprime a' b'\<close>
[PROOF STATE]
proof (prove)
using this:
a' dvd b' * c
coprime a' b'

goal (1 subgoal):
 1. a' dvd c
[PROOF STEP]
by (simp add: coprime_dvd_mult_right_iff)
[PROOF STATE]
proof (state)
this:
a' dvd c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
with ab'(1)
[PROOF STATE]
proof (chain)
picking this:
a = a' * gcd a b
a' dvd c
[PROOF STEP]
have "a = ?d * a' \<and> ?d dvd b \<and> a' dvd c"
[PROOF STATE]
proof (prove)
using this:
a = a' * gcd a b
a' dvd c

goal (1 subgoal):
 1. a = gcd a b * a' \<and> gcd a b dvd b \<and> a' dvd c
[PROOF STEP]
by (simp add: ac_simps)
[PROOF STATE]
proof (state)
this:
a = gcd a b * a' \<and> gcd a b dvd b \<and> a' dvd c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a = gcd a b * a' \<and> gcd a b dvd b \<and> a' dvd c
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a = gcd a b * a' \<and> gcd a b dvd b \<and> a' dvd c

goal (1 subgoal):
 1. \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subcocycle_cmult:
  assumes "subcocycle u" "c \<ge> 0"
  shows "subcocycle (\<lambda>n x. c * u n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subcocycle (\<lambda>n x. c * u n x)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
subcocycle u
0 \<le> c

goal (1 subgoal):
 1. subcocycle (\<lambda>n x. c * u n x)
[PROOF STEP]
unfolding subcocycle_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>n. integrable M (u n)) \<and> (\<forall>n m x. u (n + m) x \<le> u n x + u m ((T ^^ n) x))
0 \<le> c

goal (1 subgoal):
 1. (\<forall>n. integrable M (\<lambda>x. c * u n x)) \<and> (\<forall>n m x. c * u (n + m) x \<le> c * u n x + c * u m ((T ^^ n) x))
[PROOF STEP]
by (auto, metis distrib_left mult_left_mono)


[STATEMENT]
lemma vint_addition_law_of_order:
  assumes "x \<in>\<^sub>\<circ> \<int>\<^sub>\<circ>" and "y \<in>\<^sub>\<circ> \<int>\<^sub>\<circ>" and "z \<in>\<^sub>\<circ> \<int>\<^sub>\<circ>" and "x <\<^sub>\<int> y"
  shows "x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
have "x' < y' \<Longrightarrow> x' + z' < y' + z'" for x' y' z' :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x' < y' \<Longrightarrow> x' + z' < y' + z'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?x' < ?y' \<Longrightarrow> ?x' + ?z' < ?y' + ?z'

goal (1 subgoal):
 1. x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
from this[untransferred, OF assms]
[PROOF STATE]
proof (chain)
picking this:
x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z

goal (1 subgoal):
 1. x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma AG_mono: "p \<subseteq> q \<Longrightarrow> \<^bold>A\<^bold>G p \<subseteq> \<^bold>A\<^bold>G q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<subseteq> q \<Longrightarrow> \<^bold>A\<^bold>G p \<subseteq> \<^bold>A\<^bold>G q
[PROOF STEP]
by (simp only: AG_gfp, rule gfp_mono) auto


[STATEMENT]
lemma edges_are_in_V: assumes "v\<rightarrow>w" shows "v \<in> V" "w \<in> V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<in> V &&& w \<in> V
[PROOF STEP]
using assms valid_edge_set
[PROOF STATE]
proof (prove)
using this:
v \<rightarrow> w
E \<subseteq> V \<times> V

goal (1 subgoal):
 1. v \<in> V &&& w \<in> V
[PROOF STEP]
by blast+


[STATEMENT]
lemma act_sup_distl: "\<alpha> x (p \<squnion> q) = (\<alpha> x p) \<squnion> (\<alpha> x q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
have "\<alpha> x (p \<squnion> q) = \<alpha> x (\<Squnion>{p,q})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x (\<Squnion>{p, q})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<alpha> x (p \<squnion> q) = \<alpha> x (\<Squnion>{p, q})

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<alpha> x (p \<squnion> q) = \<alpha> x (\<Squnion>{p, q})

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
have "... = \<Squnion>{\<alpha> x y |y. y \<in> {p,q}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> x (\<Squnion>{p, q}) = \<Squnion>{\<alpha> x y |y. y \<in> {p, q}}
[PROOF STEP]
by (rule act4)
[PROOF STATE]
proof (state)
this:
\<alpha> x (\<Squnion>{p, q}) = \<Squnion>{\<alpha> x y |y. y \<in> {p, q}}

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<alpha> x (\<Squnion>{p, q}) = \<Squnion>{\<alpha> x y |y. y \<in> {p, q}}

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
have "... = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion>{\<alpha> x y |y. y \<in> {p, q}} = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}
[PROOF STEP]
by (metis empty_iff insert_iff)
[PROOF STATE]
proof (state)
this:
\<Squnion>{\<alpha> x y |y. y \<in> {p, q}} = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<alpha> x (p \<squnion> q) = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<alpha> x (p \<squnion> q) = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
by (metis Collect_disj_eq Sup_insert ccpo_Sup_singleton insert_def singleton_conv)
[PROOF STATE]
proof (state)
this:
\<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma length_mirror2: "length ps = length (mirror2 ps)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length ps = length (mirror2 ps)
[PROOF STEP]
unfolding mirror2_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length ps = length (mirror2_aux (max2 ps + min2 ps) ps)
[PROOF STEP]
using length_mirror2_aux
[PROOF STATE]
proof (prove)
using this:
length ?ps = length (mirror2_aux ?n ?ps)

goal (1 subgoal):
 1. length ps = length (mirror2_aux (max2 ps + min2 ps) ps)
[PROOF STEP]
by auto


[STATEMENT]
lemma map_in_lists: "inj f \<Longrightarrow> map f u \<in> lists (f ` A) \<longleftrightarrow> u \<in> lists A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj f \<Longrightarrow> (map f u \<in> lists (f ` A)) = (u \<in> lists A)
[PROOF STEP]
by (simp add: lists_image inj_image_mem_iff inj_mapI)