[STATEMENT]
lemma freeword_funlift_Abs_freeword:
  "proper_signed_list xs \<Longrightarrow> freeword_funlift f (Abs_freeword xs) =
    (\<Sum>x\<leftarrow>xs. apply_sign f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proper_signed_list xs \<Longrightarrow> freeword_funlift f (Abs_freeword xs) = sum_list (map (apply_sign f) xs)
[PROOF STEP]
proof (induct xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. proper_signed_list [] \<Longrightarrow> freeword_funlift f (Abs_freeword []) = sum_list (map (apply_sign f) [])
 2. \<And>a xs. \<lbrakk>proper_signed_list xs \<Longrightarrow> freeword_funlift f (Abs_freeword xs) = sum_list (map (apply_sign f) xs); proper_signed_list (a # xs)\<rbrakk> \<Longrightarrow> freeword_funlift f (Abs_freeword (a # xs)) = sum_list (map (apply_sign f) (a # xs))
[PROOF STEP]
case (Cons x xs)
[PROOF STATE]
proof (state)
this:
proper_signed_list xs \<Longrightarrow> freeword_funlift f (Abs_freeword xs) = sum_list (map (apply_sign f) xs)
proper_signed_list (x # xs)

goal (2 subgoals):
 1. proper_signed_list [] \<Longrightarrow> freeword_funlift f (Abs_freeword []) = sum_list (map (apply_sign f) [])
 2. \<And>a xs. \<lbrakk>proper_signed_list xs \<Longrightarrow> freeword_funlift f (Abs_freeword xs) = sum_list (map (apply_sign f) xs); proper_signed_list (a # xs)\<rbrakk> \<Longrightarrow> freeword_funlift f (Abs_freeword (a # xs)) = sum_list (map (apply_sign f) (a # xs))
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
proper_signed_list xs \<Longrightarrow> freeword_funlift f (Abs_freeword xs) = sum_list (map (apply_sign f) xs)
proper_signed_list (x # xs)

goal (1 subgoal):
 1. freeword_funlift f (Abs_freeword (x # xs)) = sum_list (map (apply_sign f) (x # xs))
[PROOF STEP]
using freeword_funlift_Abs_freeword_Cons[of _ _ f]
          binrelchain_Cons_reduce[of _ x xs]
[PROOF STATE]
proof (prove)
using this:
proper_signed_list xs \<Longrightarrow> freeword_funlift f (Abs_freeword xs) = sum_list (map (apply_sign f) xs)
proper_signed_list (x # xs)
proper_signed_list (?x # ?xs) \<Longrightarrow> freeword_funlift f (Abs_freeword (?x # ?xs)) = apply_sign f ?x + freeword_funlift f (Abs_freeword ?xs)
binrelchain ?P (x # xs) \<Longrightarrow> binrelchain ?P xs

goal (1 subgoal):
 1. freeword_funlift f (Abs_freeword (x # xs)) = sum_list (map (apply_sign f) (x # xs))
[PROOF STEP]
by    simp
[PROOF STATE]
proof (state)
this:
freeword_funlift f (Abs_freeword (x # xs)) = sum_list (map (apply_sign f) (x # xs))

goal (1 subgoal):
 1. proper_signed_list [] \<Longrightarrow> freeword_funlift f (Abs_freeword []) = sum_list (map (apply_sign f) [])
[PROOF STEP]
qed (simp add: zero_freeword.abs_eq[THEN sym] freeword_funlift_0)


[STATEMENT]
lemma keysFor_mono: "G \<subseteq> H \<Longrightarrow> keysFor G \<subseteq> keysFor H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G \<subseteq> H \<Longrightarrow> keysFor G \<subseteq> keysFor H
[PROOF STEP]
by (unfold keysFor_def, blast)


[STATEMENT]
lemma norm_scaleC_sgn[simp]: \<open>complex_of_real (norm \<psi>) *\<^sub>C sgn \<psi> = \<psi>\<close> for \<psi> :: "'a::complex_normed_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (norm \<psi>) *\<^sub>C sgn \<psi> = \<psi>
[PROOF STEP]
apply (cases \<open>\<psi> = 0\<close>)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<psi> = (0::'a) \<Longrightarrow> complex_of_real (norm \<psi>) *\<^sub>C sgn \<psi> = \<psi>
 2. \<psi> \<noteq> (0::'a) \<Longrightarrow> complex_of_real (norm \<psi>) *\<^sub>C sgn \<psi> = \<psi>
[PROOF STEP]
by (auto simp: sgn_div_norm scaleR_scaleC)


[STATEMENT]
lemma unitary_col_norm_square:
  assumes "unitary U"
and "U\<in> carrier_mat n n"
  and "i < n"
shows "\<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
define vn::"complex Matrix.vec" where "vn = unit_vec n i"
[PROOF STATE]
proof (state)
this:
vn = unit_vec n i

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
have "\<parallel>Matrix.col U i\<parallel>\<^sup>2 = (vec_norm (Matrix.col U i))\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (\<parallel>Matrix.col U i\<parallel>\<^sup>2) = (vec_norm (Matrix.col U i))\<^sup>2
[PROOF STEP]
using vec_norm_sq_cpx_vec_length_sq
[PROOF STATE]
proof (prove)
using this:
(vec_norm ?v)\<^sup>2 = complex_of_real (\<parallel>?v\<parallel>\<^sup>2)

goal (1 subgoal):
 1. complex_of_real (\<parallel>Matrix.col U i\<parallel>\<^sup>2) = (vec_norm (Matrix.col U i))\<^sup>2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (\<parallel>Matrix.col U i\<parallel>\<^sup>2) = (vec_norm (Matrix.col U i))\<^sup>2

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
complex_of_real (\<parallel>Matrix.col U i\<parallel>\<^sup>2) = (vec_norm (Matrix.col U i))\<^sup>2

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
have "... = (vec_norm vn)\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (vec_norm (Matrix.col U i))\<^sup>2 = (vec_norm vn)\<^sup>2
[PROOF STEP]
using assms unitary_vec_norm
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.unitary U
U \<in> carrier_mat n n
i < n
\<lbrakk>?v \<in> carrier_vec ?n; ?U \<in> carrier_mat ?n ?n; Complex_Matrix.unitary ?U\<rbrakk> \<Longrightarrow> vec_norm (?U *\<^sub>v ?v) = vec_norm ?v

goal (1 subgoal):
 1. (vec_norm (Matrix.col U i))\<^sup>2 = (vec_norm vn)\<^sup>2
[PROOF STEP]
by (metis mat_unit_vec_col unit_vec_carrier vn_def)
[PROOF STATE]
proof (state)
this:
(vec_norm (Matrix.col U i))\<^sup>2 = (vec_norm vn)\<^sup>2

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(vec_norm (Matrix.col U i))\<^sup>2 = (vec_norm vn)\<^sup>2

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
have "... = \<parallel>vn\<parallel>\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (vec_norm vn)\<^sup>2 = complex_of_real (\<parallel>vn\<parallel>\<^sup>2)
[PROOF STEP]
using vec_norm_sq_cpx_vec_length_sq
[PROOF STATE]
proof (prove)
using this:
(vec_norm ?v)\<^sup>2 = complex_of_real (\<parallel>?v\<parallel>\<^sup>2)

goal (1 subgoal):
 1. (vec_norm vn)\<^sup>2 = complex_of_real (\<parallel>vn\<parallel>\<^sup>2)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(vec_norm vn)\<^sup>2 = complex_of_real (\<parallel>vn\<parallel>\<^sup>2)

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(vec_norm vn)\<^sup>2 = complex_of_real (\<parallel>vn\<parallel>\<^sup>2)

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
have "... = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (\<parallel>vn\<parallel>\<^sup>2) = 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.unitary U
U \<in> carrier_mat n n
i < n

goal (1 subgoal):
 1. complex_of_real (\<parallel>vn\<parallel>\<^sup>2) = 1
[PROOF STEP]
unfolding vn_def
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.unitary U
U \<in> carrier_mat n n
i < n

goal (1 subgoal):
 1. complex_of_real (\<parallel>unit_vec n i\<parallel>\<^sup>2) = 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real (\<parallel>vn\<parallel>\<^sup>2) = 1

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
complex_of_real (\<parallel>Matrix.col U i\<parallel>\<^sup>2) = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
complex_of_real (\<parallel>Matrix.col U i\<parallel>\<^sup>2) = 1

goal (1 subgoal):
 1. \<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<parallel>Matrix.col U i\<parallel>\<^sup>2 = 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma LIMSEQ_le_const2: "X \<longlonglongrightarrow> x \<Longrightarrow> \<exists>N. \<forall>n\<ge>N. X n \<le> a \<Longrightarrow> x \<le> a"
  for a x :: "'a::linorder_topology"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<longlonglongrightarrow> x; \<exists>N. \<forall>n\<ge>N. X n \<le> a\<rbrakk> \<Longrightarrow> x \<le> a
[PROOF STEP]
by (rule LIMSEQ_le[of X x "\<lambda>n. a"]) auto


[STATEMENT]
lemma product_nodes_finite[intro]:
      assumes "list_all (finite \<circ> a.nodes) AA"
      shows "finite (b.nodes (product AA))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (b.nodes' (product AA))
[PROOF STEP]
using list.pred_map product_nodes assms
[PROOF STATE]
proof (prove)
using this:
list_all ?Q (map ?f ?x) = list_all (?Q \<circ> ?f) ?x
b.nodes' (product ?AA) \<subseteq> listset (map a.nodes' ?AA)
list_all (finite \<circ> a.nodes') AA

goal (1 subgoal):
 1. finite (b.nodes' (product AA))
[PROOF STEP]
by (blast dest: finite_subset)


[STATEMENT]
lemma ipoly_roots_finite: "p \<noteq> 0 \<Longrightarrow> finite {x :: 'a :: {idom, ring_char_0}. ipoly p x = 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> finite {x. ipoly p x = (0::'a)}
[PROOF STEP]
by (rule poly_roots_finite, simp)


[STATEMENT]
lemma lowner_le_imp_trace_le:
  assumes "A \<in> carrier_mat n n" and "B \<in> carrier_mat n n"
    and "A \<le>\<^sub>L B"
  shows "trace A \<le> trace B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
have "positive (B - A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. positive (B - A)
[PROOF STEP]
using assms lowner_le_def
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
B \<in> carrier_mat n n
A \<le>\<^sub>L B
(?A \<le>\<^sub>L ?B) = (dim_row ?A = dim_row ?B \<and> dim_col ?A = dim_col ?B \<and> positive (?B - ?A))

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

goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
positive (B - A)

goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
have "B - A \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B - A \<in> carrier_mat n n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
B \<in> carrier_mat n n
A \<le>\<^sub>L B

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

goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
positive (B - A)
B - A \<in> carrier_mat n n
[PROOF STEP]
have "trace (B - A) \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
positive (B - A)
B - A \<in> carrier_mat n n

goal (1 subgoal):
 1. 0 \<le> trace (B - A)
[PROOF STEP]
using positive_trace
[PROOF STATE]
proof (prove)
using this:
positive (B - A)
B - A \<in> carrier_mat n n
\<lbrakk>?A \<in> carrier_mat ?n ?n; positive ?A\<rbrakk> \<Longrightarrow> 0 \<le> trace ?A

goal (1 subgoal):
 1. 0 \<le> trace (B - A)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> trace (B - A)

goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 \<le> trace (B - A)

goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
have "trace (B - A) = trace B - trace A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trace (B - A) = trace B - trace A
[PROOF STEP]
using trace_minus_linear assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A \<in> carrier_mat ?n ?n; ?B \<in> carrier_mat ?n ?n\<rbrakk> \<Longrightarrow> trace (?A - ?B) = trace ?A - trace ?B
A \<in> carrier_mat n n
B \<in> carrier_mat n n
A \<le>\<^sub>L B

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

goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 \<le> trace (B - A)
trace (B - A) = trace B - trace A
[PROOF STEP]
have "trace B - trace A \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> trace (B - A)
trace (B - A) = trace B - trace A

goal (1 subgoal):
 1. 0 \<le> trace B - trace A
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> trace B - trace A

goal (1 subgoal):
 1. trace A \<le> trace B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> trace B - trace A
[PROOF STEP]
show "trace A \<le> trace B"
[PROOF STATE]
proof (prove)
using this:
0 \<le> trace B - trace A

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma iter_partition:
  assumes "As partitions A"
  assumes "finite As"
  assumes "\<And>a. a \<in> As \<Longrightarrow> \<exists>Bs. finite Bs \<and> Bs partitions a \<and> (\<forall>b \<in> Bs. P b)"
  shows "\<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b \<in> Bs. P b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
obtain F where F_def: "F = (\<lambda>a. (SOME Bs.  finite Bs \<and> Bs partitions a \<and> (\<forall>b \<in> Bs. P b)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>F. F = (\<lambda>a. SOME Bs. finite Bs \<and> Bs partitions a \<and> (\<forall>b\<in>Bs. P b)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
F = (\<lambda>a. SOME Bs. finite Bs \<and> Bs partitions a \<and> (\<forall>b\<in>Bs. P b))

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
have FE: "\<And>a. a \<in> As \<Longrightarrow> finite (F a) \<and> (F a) partitions a \<and> (\<forall>b \<in> (F a). P b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. a \<in> As \<Longrightarrow> finite (F a) \<and> F a partitions a \<and> (\<forall>b\<in>F a. P b)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. a \<in> As \<Longrightarrow> finite (F a) \<and> F a partitions a \<and> (\<forall>b\<in>F a. P b)
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. a \<in> As \<Longrightarrow> finite (F a) \<and> F a partitions a \<and> (\<forall>b\<in>F a. P b)
[PROOF STEP]
assume A: "a \<in> As"
[PROOF STATE]
proof (state)
this:
a \<in> As

goal (1 subgoal):
 1. \<And>a. a \<in> As \<Longrightarrow> finite (F a) \<and> F a partitions a \<and> (\<forall>b\<in>F a. P b)
[PROOF STEP]
show "finite (F a) \<and> (F a) partitions a \<and> (\<forall>b \<in> (F a). P b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (F a) \<and> F a partitions a \<and> (\<forall>b\<in>F a. P b)
[PROOF STEP]
apply(rule SomeE'[of _ "\<lambda>Bs.  finite Bs \<and> Bs partitions a \<and> (\<forall>b \<in> Bs. P b)"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F a = (SOME x. finite x \<and> x partitions a \<and> (\<forall>b\<in>x. P b))
 2. \<exists>x. finite x \<and> x partitions a \<and> (\<forall>b\<in>x. P b)
[PROOF STEP]
unfolding F_def
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (SOME Bs. finite Bs \<and> Bs partitions a \<and> Ball Bs P) = (SOME x. finite x \<and> x partitions a \<and> (\<forall>b\<in>x. P b))
 2. \<exists>x. finite x \<and> x partitions a \<and> (\<forall>b\<in>x. P b)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. finite x \<and> x partitions a \<and> (\<forall>b\<in>x. P b)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
As partitions A
finite As
?a \<in> As \<Longrightarrow> \<exists>Bs. finite Bs \<and> Bs partitions ?a \<and> (\<forall>b\<in>Bs. P b)

goal (1 subgoal):
 1. \<exists>x. finite x \<and> x partitions a \<and> (\<forall>b\<in>x. P b)
[PROOF STEP]
by (simp add: A)
[PROOF STATE]
proof (state)
this:
finite (F a) \<and> F a partitions a \<and> (\<forall>b\<in>F a. P b)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?a \<in> As \<Longrightarrow> finite (F ?a) \<and> F ?a partitions ?a \<and> (\<forall>b\<in>F ?a. P b)

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
obtain Bs where Bs_def: "Bs = (\<Union> a \<in> As. F a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>Bs. Bs = \<Union> (F ` As) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Bs = \<Union> (F ` As)

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
have 0: "finite Bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite Bs
[PROOF STEP]
unfolding Bs_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (\<Union> (F ` As))
[PROOF STEP]
using FE assms
[PROOF STATE]
proof (prove)
using this:
?a \<in> As \<Longrightarrow> finite (F ?a) \<and> F ?a partitions ?a \<and> (\<forall>b\<in>F ?a. P b)
As partitions A
finite As
?a \<in> As \<Longrightarrow> \<exists>Bs. finite Bs \<and> Bs partitions ?a \<and> (\<forall>b\<in>Bs. P b)

goal (1 subgoal):
 1. finite (\<Union> (F ` As))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite Bs

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
have 1: "disjoint Bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjoint Bs
[PROOF STEP]
proof(rule disjointI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> Bs; B \<in> Bs; A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B = {}
[PROOF STEP]
fix a b
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> Bs; B \<in> Bs; A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B = {}
[PROOF STEP]
assume A: "a \<in> Bs" "b \<in> Bs" "a \<noteq> b"
[PROOF STATE]
proof (state)
this:
a \<in> Bs
b \<in> Bs
a \<noteq> b

goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> Bs; B \<in> Bs; A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B = {}
[PROOF STEP]
obtain c where c_def: "c \<in> As \<and> a \<in>  F c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>c. c \<in> As \<and> a \<in> F c \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Bs_def A
[PROOF STATE]
proof (prove)
using this:
Bs = \<Union> (F ` As)
a \<in> Bs
b \<in> Bs
a \<noteq> b

goal (1 subgoal):
 1. (\<And>c. c \<in> As \<and> a \<in> F c \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
c \<in> As \<and> a \<in> F c

goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> Bs; B \<in> Bs; A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B = {}
[PROOF STEP]
obtain d where d_def: "d \<in> As \<and> b \<in>  F d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>d. d \<in> As \<and> b \<in> F d \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Bs_def A
[PROOF STATE]
proof (prove)
using this:
Bs = \<Union> (F ` As)
a \<in> Bs
b \<in> Bs
a \<noteq> b

goal (1 subgoal):
 1. (\<And>d. d \<in> As \<and> b \<in> F d \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
d \<in> As \<and> b \<in> F d

goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> Bs; B \<in> Bs; A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B = {}
[PROOF STEP]
have 0: "a \<subseteq> c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<subseteq> c
[PROOF STEP]
using c_def FE[of c] is_partitionE(2)[of "F c" c]
[PROOF STATE]
proof (prove)
using this:
c \<in> As \<and> a \<in> F c
c \<in> As \<Longrightarrow> finite (F c) \<and> F c partitions c \<and> (\<forall>b\<in>F c. P b)
F c partitions c \<Longrightarrow> \<Union> (F c) = c

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

goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> Bs; B \<in> Bs; A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B = {}
[PROOF STEP]
have 1: "b \<subseteq> d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b \<subseteq> d
[PROOF STEP]
using d_def FE[of d] is_partitionE(2)[of "F d" d]
[PROOF STATE]
proof (prove)
using this:
d \<in> As \<and> b \<in> F d
d \<in> As \<Longrightarrow> finite (F d) \<and> F d partitions d \<and> (\<forall>b\<in>F d. P b)
F d partitions d \<Longrightarrow> \<Union> (F d) = d

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

goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> Bs; B \<in> Bs; A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B = {}
[PROOF STEP]
show "a \<inter> b = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<inter> b = {}
[PROOF STEP]
proof(cases "c = d")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. c = d \<Longrightarrow> a \<inter> b = {}
 2. c \<noteq> d \<Longrightarrow> a \<inter> b = {}
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
c = d

goal (2 subgoals):
 1. c = d \<Longrightarrow> a \<inter> b = {}
 2. c \<noteq> d \<Longrightarrow> a \<inter> b = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<inter> b = {}
[PROOF STEP]
apply(rule disjointE[of "F c"])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. disjoint (F c)
 2. a \<in> F c
 3. b \<in> F c
 4. a \<noteq> b
[PROOF STEP]
unfolding True
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. disjoint (F d)
 2. a \<in> F d
 3. b \<in> F d
 4. a \<noteq> b
[PROOF STEP]
using FE is_partitionE d_def
[PROOF STATE]
proof (prove)
using this:
?a \<in> As \<Longrightarrow> finite (F ?a) \<and> F ?a partitions ?a \<and> (\<forall>b\<in>F ?a. P b)
?S partitions ?A \<Longrightarrow> disjoint ?S
?S partitions ?A \<Longrightarrow> \<Union> ?S = ?A
d \<in> As \<and> b \<in> F d

goal (4 subgoals):
 1. disjoint (F d)
 2. a \<in> F d
 3. b \<in> F d
 4. a \<noteq> b
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. a \<in> F d
 2. b \<in> F d
 3. a \<noteq> b
[PROOF STEP]
using c_def
[PROOF STATE]
proof (prove)
using this:
c \<in> As \<and> a \<in> F c

goal (3 subgoals):
 1. a \<in> F d
 2. b \<in> F d
 3. a \<noteq> b
[PROOF STEP]
unfolding True
[PROOF STATE]
proof (prove)
using this:
d \<in> As \<and> a \<in> F d

goal (3 subgoals):
 1. a \<in> F d
 2. b \<in> F d
 3. a \<noteq> b
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. b \<in> F d
 2. a \<noteq> b
[PROOF STEP]
using d_def
[PROOF STATE]
proof (prove)
using this:
d \<in> As \<and> b \<in> F d

goal (2 subgoals):
 1. b \<in> F d
 2. a \<noteq> b
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> b
[PROOF STEP]
by(rule A)
[PROOF STATE]
proof (state)
this:
a \<inter> b = {}

goal (1 subgoal):
 1. c \<noteq> d \<Longrightarrow> a \<inter> b = {}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c \<noteq> d \<Longrightarrow> a \<inter> b = {}
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
c \<noteq> d

goal (1 subgoal):
 1. c \<noteq> d \<Longrightarrow> a \<inter> b = {}
[PROOF STEP]
have "c \<inter> d = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c \<inter> d = {}
[PROOF STEP]
apply(rule disjointE[of As])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. disjoint As
 2. c \<in> As
 3. d \<in> As
 4. c \<noteq> d
[PROOF STEP]
using assms is_partitionE
[PROOF STATE]
proof (prove)
using this:
As partitions A
finite As
?a \<in> As \<Longrightarrow> \<exists>Bs. finite Bs \<and> Bs partitions ?a \<and> (\<forall>b\<in>Bs. P b)
?S partitions ?A \<Longrightarrow> disjoint ?S
?S partitions ?A \<Longrightarrow> \<Union> ?S = ?A

goal (4 subgoals):
 1. disjoint As
 2. c \<in> As
 3. d \<in> As
 4. c \<noteq> d
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. c \<in> As
 2. d \<in> As
 3. c \<noteq> d
[PROOF STEP]
using c_def
[PROOF STATE]
proof (prove)
using this:
c \<in> As \<and> a \<in> F c

goal (3 subgoals):
 1. c \<in> As
 2. d \<in> As
 3. c \<noteq> d
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. d \<in> As
 2. c \<noteq> d
[PROOF STEP]
using d_def
[PROOF STATE]
proof (prove)
using this:
d \<in> As \<and> b \<in> F d

goal (2 subgoals):
 1. d \<in> As
 2. c \<noteq> d
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c \<noteq> d
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
c \<noteq> d

goal (1 subgoal):
 1. c \<noteq> d
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
c \<inter> d = {}

goal (1 subgoal):
 1. c \<noteq> d \<Longrightarrow> a \<inter> b = {}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
c \<inter> d = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
c \<inter> d = {}

goal (1 subgoal):
 1. a \<inter> b = {}
[PROOF STEP]
using 0 1
[PROOF STATE]
proof (prove)
using this:
c \<inter> d = {}
a \<subseteq> c
b \<subseteq> d

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
a \<inter> b = {}

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

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
have 2: "(\<forall>b \<in> Bs. P b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>b\<in>Bs. P b
[PROOF STEP]
apply(rule )
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b. b \<in> Bs \<Longrightarrow> P b
[PROOF STEP]
unfolding Bs_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b. b \<in> \<Union> (F ` As) \<Longrightarrow> P b
[PROOF STEP]
using FE
[PROOF STATE]
proof (prove)
using this:
?a \<in> As \<Longrightarrow> finite (F ?a) \<and> F ?a partitions ?a \<and> (\<forall>b\<in>F ?a. P b)

goal (1 subgoal):
 1. \<And>b. b \<in> \<Union> (F ` As) \<Longrightarrow> P b
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>b\<in>Bs. P b

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
have FE': "\<And>a. a \<in> As \<Longrightarrow> (\<Union> (F a)) = a "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. a \<in> As \<Longrightarrow> \<Union> (F a) = a
[PROOF STEP]
apply(rule is_partitionE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. a \<in> As \<Longrightarrow> F a partitions a
[PROOF STEP]
using FE
[PROOF STATE]
proof (prove)
using this:
?a \<in> As \<Longrightarrow> finite (F ?a) \<and> F ?a partitions ?a \<and> (\<forall>b\<in>F ?a. P b)

goal (1 subgoal):
 1. \<And>a. a \<in> As \<Longrightarrow> F a partitions a
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
?a \<in> As \<Longrightarrow> \<Union> (F ?a) = ?a

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
have 3: "Bs partitions A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Bs partitions A
[PROOF STEP]
apply(rule is_partitionI, rule 1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> Bs = A
[PROOF STEP]
apply(rule equalityI')
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> \<Union> Bs \<Longrightarrow> x \<in> A
 2. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> Bs
[PROOF STEP]
unfolding Bs_def
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> \<Union> (\<Union> (F ` As)) \<Longrightarrow> x \<in> A
 2. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
using assms is_partitionE(2)[of As A]
      FE' is_partitionE(2)
[PROOF STATE]
proof (prove)
using this:
As partitions A
finite As
?a \<in> As \<Longrightarrow> \<exists>Bs. finite Bs \<and> Bs partitions ?a \<and> (\<forall>b\<in>Bs. P b)
As partitions A \<Longrightarrow> \<Union> As = A
?a \<in> As \<Longrightarrow> \<Union> (F ?a) = ?a
?S partitions ?A \<Longrightarrow> \<Union> ?S = ?A

goal (2 subgoals):
 1. \<And>x. x \<in> \<Union> (\<Union> (F ` As)) \<Longrightarrow> x \<in> A
 2. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
assume A: "x \<in> A"
[PROOF STATE]
proof (state)
this:
x \<in> A

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> A
[PROOF STEP]
obtain a where a_def: "a \<in> As \<and> x \<in> a"
[PROOF STATE]
proof (prove)
using this:
x \<in> A

goal (1 subgoal):
 1. (\<And>a. a \<in> As \<and> x \<in> a \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms is_partitionE
[PROOF STATE]
proof (prove)
using this:
x \<in> A
As partitions A
finite As
?a \<in> As \<Longrightarrow> \<exists>Bs. finite Bs \<and> Bs partitions ?a \<and> (\<forall>b\<in>Bs. P b)
?S partitions ?A \<Longrightarrow> disjoint ?S
?S partitions ?A \<Longrightarrow> \<Union> ?S = ?A

goal (1 subgoal):
 1. (\<And>a. a \<in> As \<and> x \<in> a \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a \<in> As \<and> x \<in> a

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> As \<and> x \<in> a
[PROOF STEP]
have "x \<in> (\<Union> (F a))"
[PROOF STATE]
proof (prove)
using this:
a \<in> As \<and> x \<in> a

goal (1 subgoal):
 1. x \<in> \<Union> (F a)
[PROOF STEP]
using a_def FE'
[PROOF STATE]
proof (prove)
using this:
a \<in> As \<and> x \<in> a
a \<in> As \<and> x \<in> a
?a \<in> As \<Longrightarrow> \<Union> (F ?a) = ?a

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

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
thus " x \<in> \<Union> (\<Union> (F ` As))"
[PROOF STATE]
proof (prove)
using this:
x \<in> \<Union> (F a)

goal (1 subgoal):
 1. x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
using a_def A
[PROOF STATE]
proof (prove)
using this:
x \<in> \<Union> (F a)
a \<in> As \<and> x \<in> a
x \<in> A

goal (1 subgoal):
 1. x \<in> \<Union> (\<Union> (F ` As))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> \<Union> (\<Union> (F ` As))

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

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
show "\<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
using 0 2 3
[PROOF STATE]
proof (prove)
using this:
finite Bs
\<forall>b\<in>Bs. P b
Bs partitions A

goal (1 subgoal):
 1. \<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>Bs. finite Bs \<and> Bs partitions A \<and> (\<forall>b\<in>Bs. P b)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in -) distinct_length_le:"finite s \<Longrightarrow> set xs \<subseteq> s \<Longrightarrow> distinct xs \<Longrightarrow> length xs \<le> card s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite s; set xs \<subseteq> s; distinct xs\<rbrakk> \<Longrightarrow> length xs \<le> card s
[PROOF STEP]
by (metis card_mono distinct_card)


[STATEMENT]
lemma repeat_Cons_right: "repeat (Suc n) xs = repeat n xs @ xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. repeat (Suc n) xs = repeat n xs @ xs
[PROOF STEP]
by (induction n) simp_all


[STATEMENT]
lemma PosOrdeq_antisym:
  assumes "v1 :\<sqsubseteq>val v2" "v2 :\<sqsubseteq>val v1"
  shows "v1 = v2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v1 = v2
[PROOF STEP]
using assms PosOrd_ordering
[PROOF STATE]
proof (prove)
using this:
v1 :\<sqsubseteq>val v2
v2 :\<sqsubseteq>val v1
ordering PosOrd_ex_eq PosOrd_ex

goal (1 subgoal):
 1. v1 = v2
[PROOF STEP]
by (metis ordering.eq_iff)


[STATEMENT]
lemma essentially_equal_connect[simp]:
    "essentially_equal mk_monoid fs gs \<longleftrightarrow> rel_mset (ddvd) (mset fs) (mset gs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. essentially_equal mk_monoid fs gs = rel_mset (ddvd) (mset fs) (mset gs)
[PROOF STEP]
by (auto simp: essentially_equal_def rel_mset_via_perm)


[STATEMENT]
lemma p_eq_sum_p_f: "p x y n = (\<Sum>i\<le>n. p y y (n - i) * f x y i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p x y n = (\<Sum>i\<le>n. p y y (n - i) * f x y i)
[PROOF STEP]
by (cases n)
     (simp_all del: sum.atMost_Suc
               add: f_0 p_0 p_eq_sum_p_u atMost_Suc_eq_insert_0 zero_notin_Suc_image sum.reindex
                    f_Suc f_Suc_eq)


[STATEMENT]
lemma countableI_bij1: "bij_betw f A B \<Longrightarrow> countable A \<Longrightarrow> countable B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>bij_betw f A B; countable A\<rbrakk> \<Longrightarrow> countable B
[PROOF STEP]
by (blast elim: countableE_bij intro: bij_betw_trans countableI_bij)


[STATEMENT]
lemma mem_ODnums_nonempty:"X \<in> ODnums \<Longrightarrow> \<exists>x. x \<in> X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<in> ODnums \<Longrightarrow> \<exists>x. x \<in> X
[PROOF STEP]
apply (simp add:ODnums_def, simp add:ordinal_number_def,
       erule exE, erule conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>S. \<lbrakk>Worder S; X = {X. Worder X \<and> ord_equiv X S}\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> X
[PROOF STEP]
apply (frule_tac S = S in Worder_refl, blast)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma mult_greater:
  assumes "greater_mask a b"
  shows "greater_mask (multiply_mask p a) (multiply_mask p b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. greater_mask (multiply_mask p a) (multiply_mask p b)
[PROOF STEP]
by (metis (full_types) assms greater_mask_equiv_def multiply_mask_def p_greater_exists pmult_distr)


[STATEMENT]
lemma setsum_negf_ereal: "\<not> {-\<infinity>, \<infinity>} \<subseteq> f`I \<Longrightarrow> (\<Sum>i\<in>I. - f i) = - (\<Sum>i\<in>I. f i::ereal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> {- \<infinity>, \<infinity>} \<subseteq> f ` I \<Longrightarrow> (\<Sum>i\<in>I. - f i) = - sum f I
[PROOF STEP]
by (induction I rule: infinite_finite_induct)
     (auto simp: minus_add_eq_ereal sum_Minfty sum_Pinfty,
      (subst minus_add_eq_ereal; auto simp: sum_Pinfty sum_Minfty image_iff minus_ereal_def)+)


[STATEMENT]
lemma extended_Gromov_product_at_commute:
  "extended_Gromov_product_at e x y = extended_Gromov_product_at e y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extended_Gromov_product_at e x y = extended_Gromov_product_at e y x
[PROOF STEP]
unfolding extended_Gromov_product_at_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = Inf {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = y \<and> abs_Gromov_completion v = x \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v}
[PROOF STEP]
proof (rule arg_cong[of _ _ Inf])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = y \<and> abs_Gromov_completion v = x \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v}
[PROOF STEP]
have "{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v.
          abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} =
        {liminf (\<lambda>n. ereal (Gromov_product_at e (v n) (u n))) |u v.
          abs_Gromov_completion v = y \<and> abs_Gromov_completion u = x \<and> Gromov_completion_rel v v \<and> Gromov_completion_rel u u}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = {liminf (\<lambda>n. ereal (Gromov_product_at e (v n) (u n))) |u v. abs_Gromov_completion v = y \<and> abs_Gromov_completion u = x \<and> Gromov_completion_rel v v \<and> Gromov_completion_rel u u}
[PROOF STEP]
by (auto simp add: Gromov_product_commute)
[PROOF STATE]
proof (state)
this:
{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = {liminf (\<lambda>n. ereal (Gromov_product_at e (v n) (u n))) |u v. abs_Gromov_completion v = y \<and> abs_Gromov_completion u = x \<and> Gromov_completion_rel v v \<and> Gromov_completion_rel u u}

goal (1 subgoal):
 1. {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = y \<and> abs_Gromov_completion v = x \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = {liminf (\<lambda>n. ereal (Gromov_product_at e (v n) (u n))) |u v. abs_Gromov_completion v = y \<and> abs_Gromov_completion u = x \<and> Gromov_completion_rel v v \<and> Gromov_completion_rel u u}
[PROOF STEP]
show "{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v.
      abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} =
      {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v.
      abs_Gromov_completion u = y \<and> abs_Gromov_completion v = x \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v}"
[PROOF STATE]
proof (prove)
using this:
{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = {liminf (\<lambda>n. ereal (Gromov_product_at e (v n) (u n))) |u v. abs_Gromov_completion v = y \<and> abs_Gromov_completion u = x \<and> Gromov_completion_rel v v \<and> Gromov_completion_rel u u}

goal (1 subgoal):
 1. {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = y \<and> abs_Gromov_completion v = x \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = x \<and> abs_Gromov_completion v = y \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v} = {liminf (\<lambda>n. ereal (Gromov_product_at e (u n) (v n))) |u v. abs_Gromov_completion u = y \<and> abs_Gromov_completion v = x \<and> Gromov_completion_rel u u \<and> Gromov_completion_rel v v}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eventually_le_le:
  fixes P :: "'a => ('b :: preorder)"
  assumes "eventually (\<lambda>x. P x \<le> Q x) net"
  assumes "eventually (\<lambda>x. Q x \<le> R  x) net"
  shows "eventually (\<lambda>x. P x \<le> R x) net"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in net. P x \<le> R x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in net. P x \<le> Q x
\<forall>\<^sub>F x in net. Q x \<le> R x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in net. P x \<le> R x
[PROOF STEP]
by eventually_elim (rule order_trans)


[STATEMENT]
lemma [simp]: "(a \<squnion> b) - c = (a - c) \<squnion>  (b - c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<squnion> b - c = a - c \<squnion> (b - c)
[PROOF STEP]
by (simp add: diff_conv_add_uminus del: add_uminus_conv_diff)


[STATEMENT]
lemma ccNeighbors_join[simp]: "ccNeighbors x (G \<squnion> G') = ccNeighbors x G \<union> ccNeighbors x G'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ccNeighbors x (G \<squnion> G') = ccNeighbors x G \<union> ccNeighbors x G'
[PROOF STEP]
by transfer auto


[STATEMENT]
lemma obtuse_sym:
  assumes "Obtuse A B C"
  shows "Obtuse C B A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Obtuse C B A
[PROOF STEP]
by (meson Obtuse_def Tarski_neutral_dimensionless.lta_right_comm Tarski_neutral_dimensionless_axioms assms)


[STATEMENT]
theorem main\<^sub>S\<^sub>4': \<open>{} \<TTurnstile>\<^sub>S\<^sub>4 p \<longleftrightarrow> (\<turnstile>\<^sub>T\<^sub>o\<^sub>p p)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({} \<TTurnstile>\<^sub>S\<^sub>4 p) = (\<turnstile>\<^sub>T\<^sub>o\<^sub>p p)
[PROOF STEP]
using main\<^sub>S\<^sub>4[of "{}"] S4_topoS4 topoS4_S4
[PROOF STATE]
proof (prove)
using this:
({} \<TTurnstile>\<^sub>S\<^sub>4 ?p) = ({} \<turnstile>\<^sub>S\<^sub>4 ?p)
{} \<turnstile>\<^sub>S\<^sub>4 ?p \<Longrightarrow> \<turnstile>\<^sub>T\<^sub>o\<^sub>p ?p
\<turnstile>\<^sub>T\<^sub>o\<^sub>p ?p \<Longrightarrow> {} \<turnstile>\<^sub>S\<^sub>4 ?p

goal (1 subgoal):
 1. ({} \<TTurnstile>\<^sub>S\<^sub>4 p) = (\<turnstile>\<^sub>T\<^sub>o\<^sub>p p)
[PROOF STEP]
by blast


[STATEMENT]
lemma bin_sign_rest [simp]: "bin_sign ((\<lambda>k::int. k div 2) w) = bin_sign w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bin_sign (w div 2) = bin_sign w
[PROOF STEP]
by (simp add: bin_sign_def)


[STATEMENT]
lemma (in Group) im_d_gchainTr1_0:"\<lbrakk>d_gchain G n f;
                 f l \<in> (f ` {i. i \<le> n}) - {f 0}\<rbrakk>  \<Longrightarrow>
                 0 < (LEAST j. f j \<in> (f ` {i. i \<le> n}) - {f 0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d_gchain G n f; f l \<in> f ` {i. i \<le> n} - {f 0}\<rbrakk> \<Longrightarrow> 0 < (LEAST j. f j \<in> f ` {i. i \<le> n} - {f 0})
[PROOF STEP]
apply (frule im_d_gchainTr1 [of "n" "f"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d_gchain G n f; f l \<in> f ` {i. i \<le> n} - {f 0}; f (LEAST j. f j \<in> f ` {i. i \<le> n} - {f 0}) \<in> f ` {i. i \<le> n} - {f 0}\<rbrakk> \<Longrightarrow> 0 < (LEAST j. f j \<in> f ` {i. i \<le> n} - {f 0})
[PROOF STEP]
apply (rule contrapos_pp, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d_gchain G n f; f l \<in> f ` {i. i \<le> n} - {f 0}; f (LEAST j. f j \<in> f ` {i. i \<le> n} - {f 0}) \<in> f ` {i. i \<le> n} - {f 0}; \<not> 0 < (LEAST j. f j \<in> f ` {i. i \<le> n} - {f 0})\<rbrakk> \<Longrightarrow> \<not> True
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma real_transfer_operator_charact:
  assumes "\<And>A. A \<in> sets M \<Longrightarrow> (\<integral>x. indicator A x * g x \<partial>M) = (\<integral>x. indicator A (T x) * f x \<partial>M)"
      and [measurable]: "integrable M f" "integrable M g"
  shows "AE x in M. real_transfer_operator f x = g x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. real_transfer_operator f x = g x
[PROOF STEP]
proof (rule AE_symmetric[OF density_unique_real])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
 3. \<And>A. A \<in> sets M \<Longrightarrow> set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
fix A
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
 3. \<And>A. A \<in> sets M \<Longrightarrow> set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
assume [measurable]: "A \<in> sets M"
[PROOF STATE]
proof (state)
this:
A \<in> sets M

goal (3 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
 3. \<And>A. A \<in> sets M \<Longrightarrow> set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
have "set_lebesgue_integral M A (real_transfer_operator f) = (\<integral>x. indicator A x * real_transfer_operator f x \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_lebesgue_integral M A (real_transfer_operator f) = LINT x|M. indicat_real A x * real_transfer_operator f x
[PROOF STEP]
unfolding set_lebesgue_integral_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|M. indicat_real A x *\<^sub>R real_transfer_operator f x = LINT x|M. indicat_real A x * real_transfer_operator f x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
set_lebesgue_integral M A (real_transfer_operator f) = LINT x|M. indicat_real A x * real_transfer_operator f x

goal (3 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
 3. \<And>A. A \<in> sets M \<Longrightarrow> set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set_lebesgue_integral M A (real_transfer_operator f) = LINT x|M. indicat_real A x * real_transfer_operator f x

goal (3 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
 3. \<And>A. A \<in> sets M \<Longrightarrow> set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
have "... = (\<integral>x. indicator A (T x) * f x \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|M. indicat_real A x * real_transfer_operator f x = LINT x|M. indicat_real A (T x) * f x
[PROOF STEP]
apply (rule real_transfer_operator_intg, auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable M (\<lambda>x. indicat_real A (T x) * f x)
[PROOF STEP]
by (rule Bochner_Integration.integrable_bound[of _ "\<lambda>x. abs(f x)"], auto simp add: assms indicator_def)
[PROOF STATE]
proof (state)
this:
LINT x|M. indicat_real A x * real_transfer_operator f x = LINT x|M. indicat_real A (T x) * f x

goal (3 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
 3. \<And>A. A \<in> sets M \<Longrightarrow> set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LINT x|M. indicat_real A x * real_transfer_operator f x = LINT x|M. indicat_real A (T x) * f x

goal (3 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
 3. \<And>A. A \<in> sets M \<Longrightarrow> set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
have "... = set_lebesgue_integral M A g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|M. indicat_real A (T x) * f x = set_lebesgue_integral M A g
[PROOF STEP]
unfolding set_lebesgue_integral_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|M. indicat_real A (T x) * f x = LINT x|M. indicat_real A x *\<^sub>R g x
[PROOF STEP]
using assms(1)[OF \<open>A \<in> sets M\<close>]
[PROOF STATE]
proof (prove)
using this:
LINT x|M. indicat_real A x * g x = LINT x|M. indicat_real A (T x) * f x

goal (1 subgoal):
 1. LINT x|M. indicat_real A (T x) * f x = LINT x|M. indicat_real A x *\<^sub>R g x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LINT x|M. indicat_real A (T x) * f x = set_lebesgue_integral M A g

goal (3 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
 3. \<And>A. A \<in> sets M \<Longrightarrow> set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
set_lebesgue_integral M A (real_transfer_operator f) = set_lebesgue_integral M A g
[PROOF STEP]
show "set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)"
[PROOF STATE]
proof (prove)
using this:
set_lebesgue_integral M A (real_transfer_operator f) = set_lebesgue_integral M A g

goal (1 subgoal):
 1. set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set_lebesgue_integral M A g = set_lebesgue_integral M A (real_transfer_operator f)

goal (2 subgoals):
 1. integrable M g
 2. integrable M (real_transfer_operator f)
[PROOF STEP]
qed (auto simp add: assms real_transfer_operator_int)


[STATEMENT]
lemma cinner_diff_left: "cinner (x - y) z = cinner x z - cinner y z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cinner (x - y) z = cinner x z - cinner y z
[PROOF STEP]
using cinner_add_left [of x "- y" z]
[PROOF STATE]
proof (prove)
using this:
cinner (x + - y) z = cinner x z + cinner (- y) z

goal (1 subgoal):
 1. cinner (x - y) z = cinner x z - cinner y z
[PROOF STEP]
by simp


[STATEMENT]
lemma contour_integral_add:
    "f1 contour_integrable_on g \<Longrightarrow> f2 contour_integrable_on g \<Longrightarrow> contour_integral g (\<lambda>x. f1 x + f2 x) =
                contour_integral g f1 + contour_integral g f2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f1 contour_integrable_on g; f2 contour_integrable_on g\<rbrakk> \<Longrightarrow> contour_integral g (\<lambda>x. f1 x + f2 x) = contour_integral g f1 + contour_integral g f2
[PROOF STEP]
by (simp add: contour_integral_unique has_contour_integral_integral has_contour_integral_add)


[STATEMENT]
lemma \<AA>'_language:
  "to_omega ` DRA.language (\<AA>' \<phi> xs ys) = (L\<^sub>1 \<phi> (set xs) \<inter> L\<^sub>2 (set xs) (set ys) \<inter> L\<^sub>3 (set xs) (set ys))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_omega ` DRA.language (\<AA>' \<phi> xs ys) = L\<^sub>1 \<phi> (set xs) \<inter> L\<^sub>2 (set xs) (set ys) \<inter> L\<^sub>3 (set xs) (set ys)
[PROOF STEP]
by (simp add: \<AA>'_def \<AA>\<^sub>1_language \<AA>\<^sub>2_language \<AA>\<^sub>3_language) fastforce


[STATEMENT]
lemma conjugate_square_0:
  fixes a :: "'a :: {conjugatable_ordered_ring, semiring_no_zero_divisors}"
  shows "a * conjugate a = 0 \<Longrightarrow> a = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * conjugate a = (0::'a) \<Longrightarrow> a = (0::'a)
[PROOF STEP]
by auto


[STATEMENT]
lemma mirror_elem_add: "
  finite I \<Longrightarrow> mirror_elem (n + k) I = mirror_elem n I - k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite I \<Longrightarrow> mirror_elem (n + k) I = mirror_elem n I - k
[PROOF STEP]
unfolding mirror_elem_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite I \<Longrightarrow> nat_mirror (n + k) (iMin I) (Max I) = nat_mirror n (iMin I) (Max I) - k
[PROOF STEP]
by (rule nat_mirror_add)


[STATEMENT]
lemma list_strict_asc_distinct: "list_strict_asc (xs::'a::preorder list) \<Longrightarrow> distinct xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_strict_asc xs \<Longrightarrow> distinct xs
[PROOF STEP]
apply (rule_tac ord="(<)" in list_ord_distinct)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. list_strict_asc xs \<Longrightarrow> irrefl {(a, b). a < b}
 2. list_strict_asc xs \<Longrightarrow> trans {(x, y). x < y}
 3. list_strict_asc xs \<Longrightarrow> list_ord (<) xs
[PROOF STEP]
apply (unfold irrefl_def list_strict_asc_def trans_def)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. list_ord (<) xs \<Longrightarrow> \<forall>a. (a, a) \<notin> {(x, y). x < y}
 2. list_ord (<) xs \<Longrightarrow> \<forall>x y z. (x, y) \<in> {(x, y). x < y} \<longrightarrow> (y, z) \<in> {(x, y). x < y} \<longrightarrow> (x, z) \<in> {(x, y). x < y}
 3. list_ord (<) xs \<Longrightarrow> list_ord (<) xs
[PROOF STEP]
apply (blast intro: less_trans)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma word_rsplit_no:
  "(word_rsplit (numeral bin :: 'b::len word) :: 'a word list) =
    map word_of_int (bin_rsplit (LENGTH('a::len))
      (LENGTH('b), take_bit (LENGTH('b)) (numeral bin)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. word_rsplit (numeral bin) = map word_of_int (bin_rsplit LENGTH('a) (LENGTH('b), take_bit LENGTH('b) (numeral bin)))
[PROOF STEP]
by (simp add: word_rsplit_def of_nat_take_bit)


[STATEMENT]
lemma div2_less_self[termination_simp]: "odd n \<Longrightarrow> n div 2 < n" for n :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. odd n \<Longrightarrow> n div 2 < n
[PROOF STEP]
by (simp add: odd_pos)


[STATEMENT]
lemma OrderingSetIsoI_orders_greater2less:
  fixes f :: "'a::order \<Rightarrow> 'b::order"
  assumes "inj_on f P" "\<And>a b. a \<in> P \<Longrightarrow> b \<in> P \<Longrightarrow> (b\<le>a) = (f a \<le> f b)"
  shows   "OrderingSetIso (greater_eq::'a\<Rightarrow>'a\<Rightarrow>bool) (greater::'a\<Rightarrow>'a\<Rightarrow>bool)
            (less_eq::'b\<Rightarrow>'b\<Rightarrow>bool) (less::'b\<Rightarrow>'b\<Rightarrow>bool) P f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. OrderingSetIso (\<lambda>x y. y \<le> x) (\<lambda>x y. y < x) (\<le>) (<) P f
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>a b. \<lbrakk>a \<in> P; b \<in> P; b \<le> a\<rbrakk> \<Longrightarrow> f a \<le> f b
 2. inj_on f P
 3. \<And>a b. \<lbrakk>a \<in> f ` P; b \<in> f ` P; a \<le> b\<rbrakk> \<Longrightarrow> the_inv_into P f b \<le> the_inv_into P f a
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?a \<in> P; ?b \<in> P\<rbrakk> \<Longrightarrow> (?b \<le> ?a) = (f ?a \<le> f ?b)
[PROOF STEP]
show "\<And>a b. a \<in> P \<Longrightarrow> b \<in> P \<Longrightarrow> b\<le>a \<Longrightarrow> f a \<le> f b"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> P; ?b \<in> P\<rbrakk> \<Longrightarrow> (?b \<le> ?a) = (f ?a \<le> f ?b)

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> P; b \<in> P; b \<le> a\<rbrakk> \<Longrightarrow> f a \<le> f b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a \<in> P; ?b \<in> P; ?b \<le> ?a\<rbrakk> \<Longrightarrow> f ?a \<le> f ?b

goal (2 subgoals):
 1. inj_on f P
 2. \<And>a b. \<lbrakk>a \<in> f ` P; b \<in> f ` P; a \<le> b\<rbrakk> \<Longrightarrow> the_inv_into P f b \<le> the_inv_into P f a
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?a \<in> P; ?b \<in> P\<rbrakk> \<Longrightarrow> (?b \<le> ?a) = (f ?a \<le> f ?b)
[PROOF STEP]
show  "\<And>a b. a \<in> f ` P \<Longrightarrow> b \<in> f ` P \<Longrightarrow> b\<le>a \<Longrightarrow>
            the_inv_into P f a \<le> the_inv_into P f b"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> P; ?b \<in> P\<rbrakk> \<Longrightarrow> (?b \<le> ?a) = (f ?a \<le> f ?b)

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> f ` P; b \<in> f ` P; b \<le> a\<rbrakk> \<Longrightarrow> the_inv_into P f a \<le> the_inv_into P f b
[PROOF STEP]
using the_inv_into_f_f[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> P; ?b \<in> P\<rbrakk> \<Longrightarrow> (?b \<le> ?a) = (f ?a \<le> f ?b)
?x \<in> P \<Longrightarrow> the_inv_into P f (f ?x) = ?x

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a \<in> f ` P; b \<in> f ` P; b \<le> a\<rbrakk> \<Longrightarrow> the_inv_into P f a \<le> the_inv_into P f b
[PROOF STEP]
by    force
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a \<in> f ` P; ?b \<in> f ` P; ?b \<le> ?a\<rbrakk> \<Longrightarrow> the_inv_into P f ?a \<le> the_inv_into P f ?b

goal (1 subgoal):
 1. inj_on f P
[PROOF STEP]
qed (rule assms(1))


[STATEMENT]
lemma unitarily_equivI:
  assumes "similar_mat_wit A B U (Complex_Matrix.adjoint U)"
  and "unitary U"
shows "unitarily_equiv A B U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unitarily_equiv A B U
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
similar_mat_wit A B U (Complex_Matrix.adjoint U)
Complex_Matrix.unitary U

goal (1 subgoal):
 1. unitarily_equiv A B U
[PROOF STEP]
unfolding unitarily_equiv_def
[PROOF STATE]
proof (prove)
using this:
similar_mat_wit A B U (Complex_Matrix.adjoint U)
Complex_Matrix.unitary U

goal (1 subgoal):
 1. Complex_Matrix.unitary U \<and> similar_mat_wit A B U (Complex_Matrix.adjoint U)
[PROOF STEP]
by simp


[STATEMENT]
lemma Liminf_eqI:
  "(\<And>P. eventually P F \<Longrightarrow> Inf (f ` (Collect P)) \<le> x) \<Longrightarrow>
    (\<And>y. (\<And>P. eventually P F \<Longrightarrow> Inf (f ` (Collect P)) \<le> y) \<Longrightarrow> x \<le> y) \<Longrightarrow> Liminf F f = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>P. eventually P F \<Longrightarrow> Inf (f ` Collect P) \<le> x; \<And>y. (\<And>P. eventually P F \<Longrightarrow> Inf (f ` Collect P) \<le> y) \<Longrightarrow> x \<le> y\<rbrakk> \<Longrightarrow> Liminf F f = x
[PROOF STEP]
unfolding Liminf_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>P. eventually P F \<Longrightarrow> Inf (f ` Collect P) \<le> x; \<And>y. (\<And>P. eventually P F \<Longrightarrow> Inf (f ` Collect P) \<le> y) \<Longrightarrow> x \<le> y\<rbrakk> \<Longrightarrow> (SUP P\<in>{P. eventually P F}. Inf (f ` Collect P)) = x
[PROOF STEP]
by (auto intro!: SUP_eqI)


[STATEMENT]
lemma l9_19_3:
  assumes "Coplanar A B C P" and
    "Col X Y P"
  shows "A B C OSP X Y \<longleftrightarrow> (P Out X Y \<and> \<not> Coplanar A B C X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A B C OSP X Y) = (P Out X Y \<and> \<not> Coplanar A B C X)
[PROOF STEP]
by (meson assms(1) assms(2) cop_out__osp l6_4_2 l9_18_3 not_col_permutation_5 osp__ncop1 osp__ncop2 tsp__nosp)


[STATEMENT]
lemma filt_equiv_imp_subalgebra:
  assumes "filt_equiv F M N"
shows "subalgebra N M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subalgebra N M
[PROOF STEP]
unfolding subalgebra_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space M = space N \<and> sets M \<subseteq> sets N
[PROOF STEP]
using assms filt_equiv_space filt_equiv_def
[PROOF STATE]
proof (prove)
using this:
filt_equiv F M N
filt_equiv ?F ?M ?N \<Longrightarrow> space ?M = space ?N
filt_equiv ?F ?M ?N = (sets ?M = sets ?N \<and> Filtration.filtration ?M ?F \<and> (\<forall>t A. A \<in> sets (?F t) \<longrightarrow> (emeasure ?M A = 0) = (emeasure ?N A = 0)))

goal (1 subgoal):
 1. space M = space N \<and> sets M \<subseteq> sets N
[PROOF STEP]
by blast


[STATEMENT]
lemma absolute_retract_imp_AR:
  fixes S :: "'a::euclidean_space set" and S' :: "'b::euclidean_space set"
  assumes "S retract_of UNIV" "S homeomorphic S'" "closed S'"
  shows "S' retract_of UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S' retract_of UNIV
[PROOF STEP]
using AR_imp_absolute_retract_UNIV assms retract_of_UNIV
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>AR ?S; ?S homeomorphic ?S'; closed ?S'\<rbrakk> \<Longrightarrow> ?S' retract_of UNIV
S retract_of UNIV
S homeomorphic S'
closed S'
(?S retract_of UNIV) = (AR ?S \<and> closed ?S)

goal (1 subgoal):
 1. S' retract_of UNIV
[PROOF STEP]
by blast