[STATEMENT]
lemma fold_compose1: "(% x. f (g x)) = (f o g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f (g x)) = f \<circ> g
[PROOF STEP]
apply(rule ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. f (g x) = (f \<circ> g) x
[PROOF STEP]
apply(force)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma card_of_Pow_mono[simp]:
assumes "|A| \<le>o |B|"
shows "|Pow A| \<le>o |Pow B|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |Pow A| \<le>o |Pow B|
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. |Pow A| \<le>o |Pow B|
[PROOF STEP]
obtain f where "inj_on f A \<and> f ` A \<le> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>f. inj_on f A \<and> f ` A \<subseteq> B \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms card_of_ordLeq[of A B]
[PROOF STATE]
proof (prove)
using this:
|A| \<le>o |B|
(\<exists>f. inj_on f A \<and> f ` A \<subseteq> B) = (|A| \<le>o |B|)

goal (1 subgoal):
 1. (\<And>f. inj_on f A \<and> f ` A \<subseteq> B \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inj_on f A \<and> f ` A \<subseteq> B

goal (1 subgoal):
 1. |Pow A| \<le>o |Pow B|
[PROOF STEP]
hence "inj_on (image f) (Pow A) \<and> (image f) ` (Pow A) \<le> (Pow B)"
[PROOF STATE]
proof (prove)
using this:
inj_on f A \<and> f ` A \<subseteq> B

goal (1 subgoal):
 1. inj_on ((`) f) (Pow A) \<and> (`) f ` Pow A \<subseteq> Pow B
[PROOF STEP]
by (auto simp add: inj_on_image_Pow image_Pow_mono)
[PROOF STATE]
proof (state)
this:
inj_on ((`) f) (Pow A) \<and> (`) f ` Pow A \<subseteq> Pow B

goal (1 subgoal):
 1. |Pow A| \<le>o |Pow B|
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
inj_on ((`) f) (Pow A) \<and> (`) f ` Pow A \<subseteq> Pow B

goal (1 subgoal):
 1. |Pow A| \<le>o |Pow B|
[PROOF STEP]
using card_of_ordLeq[of "Pow A"]
[PROOF STATE]
proof (prove)
using this:
inj_on ((`) f) (Pow A) \<and> (`) f ` Pow A \<subseteq> Pow B
(\<exists>f. inj_on f (Pow A) \<and> f ` Pow A \<subseteq> ?B) = (|Pow A| \<le>o |?B|)

goal (1 subgoal):
 1. |Pow A| \<le>o |Pow B|
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
|Pow A| \<le>o |Pow B|

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem infsetsum_Sigma:
  fixes A :: "'a set" and B :: "'a \<Rightarrow> 'b set"
  assumes [simp]: "countable A" and "\<And>i. countable (B i)"
  assumes summable: "f abs_summable_on (Sigma A B)"
  shows   "infsetsum f (Sigma A B) = infsetsum (\<lambda>x. infsetsum (\<lambda>y. f (x, y)) (B x)) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
define B' where "B' = (\<Union>i\<in>A. B i)"
[PROOF STATE]
proof (state)
this:
B' = \<Union> (B ` A)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
have [simp]: "countable B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable B'
[PROOF STEP]
unfolding B'_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable (\<Union> (B ` A))
[PROOF STEP]
by (intro countable_UN assms)
[PROOF STATE]
proof (state)
this:
countable B'

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
interpret pair_sigma_finite "count_space A" "count_space B'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pair_sigma_finite (count_space A) (count_space B')
[PROOF STEP]
by (intro pair_sigma_finite.intro sigma_finite_measure_count_space_countable) fact+
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
have "integrable (count_space (A \<times> B')) (\<lambda>z. indicator (Sigma A B) z *\<^sub>R f z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (count_space (A \<times> B')) (\<lambda>z. indicat_real (Sigma A B) z *\<^sub>R f z)
[PROOF STEP]
using summable
[PROOF STATE]
proof (prove)
using this:
f abs_summable_on Sigma A B

goal (1 subgoal):
 1. integrable (count_space (A \<times> B')) (\<lambda>z. indicat_real (Sigma A B) z *\<^sub>R f z)
[PROOF STEP]
by (metis (mono_tags, lifting) abs_summable_on_altdef abs_summable_on_def integrable_cong integrable_mult_indicator set_integrable_def sets_UNIV)
[PROOF STATE]
proof (state)
this:
integrable (count_space (A \<times> B')) (\<lambda>z. indicat_real (Sigma A B) z *\<^sub>R f z)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integrable (count_space (A \<times> B')) (\<lambda>z. indicat_real (Sigma A B) z *\<^sub>R f z)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
have "?this \<longleftrightarrow> integrable (count_space A \<Otimes>\<^sub>M count_space B') (\<lambda>(x, y). indicator (B x) y *\<^sub>R f (x, y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (count_space (A \<times> B')) (\<lambda>z. indicat_real (Sigma A B) z *\<^sub>R f z) = integrable (count_space A \<Otimes>\<^sub>M count_space B') (\<lambda>(x, y). indicat_real (B x) y *\<^sub>R f (x, y))
[PROOF STEP]
by (intro Bochner_Integration.integrable_cong)
       (auto simp: pair_measure_countable indicator_def split: if_splits)
[PROOF STATE]
proof (state)
this:
integrable (count_space (A \<times> B')) (\<lambda>z. indicat_real (Sigma A B) z *\<^sub>R f z) = integrable (count_space A \<Otimes>\<^sub>M count_space B') (\<lambda>(x, y). indicat_real (B x) y *\<^sub>R f (x, y))

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
integrable (count_space A \<Otimes>\<^sub>M count_space B') (\<lambda>(x, y). indicat_real (B x) y *\<^sub>R f (x, y))
[PROOF STEP]
have integrable: \<dots>
[PROOF STATE]
proof (prove)
using this:
integrable (count_space A \<Otimes>\<^sub>M count_space B') (\<lambda>(x, y). indicat_real (B x) y *\<^sub>R f (x, y))

goal (1 subgoal):
 1. integrable (count_space A \<Otimes>\<^sub>M count_space B') (\<lambda>(x, y). indicat_real (B x) y *\<^sub>R f (x, y))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
integrable (count_space A \<Otimes>\<^sub>M count_space B') (\<lambda>(x, y). indicat_real (B x) y *\<^sub>R f (x, y))

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
have "infsetsum (\<lambda>x. infsetsum (\<lambda>y. f (x, y)) (B x)) A =
          (\<integral>x. infsetsum (\<lambda>y. f (x, y)) (B x) \<partial>count_space A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT x|count_space A. (\<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
unfolding infsetsum_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|count_space A. LINT y|count_space (B x). f (x, y) = LINT x|count_space A. LINT y|count_space (B x). f (x, y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT x|count_space A. (\<Sum>\<^sub>ay\<in>B x. f (x, y))

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT x|count_space A. (\<Sum>\<^sub>ay\<in>B x. f (x, y))

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
have "\<dots> = (\<integral>x. \<integral>y. indicator (B x) y *\<^sub>R f (x, y) \<partial>count_space B' \<partial>count_space A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|count_space A. (\<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT x|count_space A. LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y)
[PROOF STEP]
proof (rule Bochner_Integration.integral_cong [OF refl])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> space (count_space A) \<Longrightarrow> (\<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y)
[PROOF STEP]
show "\<And>x. x \<in> space (count_space A) \<Longrightarrow>
         (\<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> space (count_space A) \<Longrightarrow> (\<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y)
[PROOF STEP]
using infsetsum_altdef'[of _ B']
[PROOF STATE]
proof (prove)
using this:
?A \<subseteq> B' \<Longrightarrow> infsetsum ?f ?A = set_lebesgue_integral (count_space B') ?A ?f

goal (1 subgoal):
 1. \<And>x. x \<in> space (count_space A) \<Longrightarrow> (\<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y)
[PROOF STEP]
unfolding set_lebesgue_integral_def B'_def
[PROOF STATE]
proof (prove)
using this:
?A \<subseteq> \<Union> (B ` A) \<Longrightarrow> infsetsum ?f ?A = LINT x|count_space (\<Union> (B ` A)). indicat_real ?A x *\<^sub>R ?f x

goal (1 subgoal):
 1. \<And>x. x \<in> space (count_space A) \<Longrightarrow> (\<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT y|count_space (\<Union> (B ` A)). indicat_real (B x) y *\<^sub>R f (x, y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?x \<in> space (count_space A) \<Longrightarrow> (\<Sum>\<^sub>ay\<in>B ?x. f (?x, y)) = LINT y|count_space B'. indicat_real (B ?x) y *\<^sub>R f (?x, y)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
LINT x|count_space A. (\<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT x|count_space A. LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LINT x|count_space A. (\<Sum>\<^sub>ay\<in>B x. f (x, y)) = LINT x|count_space A. LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
have "\<dots> = (\<integral>(x,y). indicator (B x) y *\<^sub>R f (x, y) \<partial>(count_space A \<Otimes>\<^sub>M count_space B'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|count_space A. LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y) = LINT (x, y)|(count_space A \<Otimes>\<^sub>M count_space B'). indicat_real (B x) y *\<^sub>R f (x, y)
[PROOF STEP]
by (subst integral_fst [OF integrable]) auto
[PROOF STATE]
proof (state)
this:
LINT x|count_space A. LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y) = LINT (x, y)|(count_space A \<Otimes>\<^sub>M count_space B'). indicat_real (B x) y *\<^sub>R f (x, y)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LINT x|count_space A. LINT y|count_space B'. indicat_real (B x) y *\<^sub>R f (x, y) = LINT (x, y)|(count_space A \<Otimes>\<^sub>M count_space B'). indicat_real (B x) y *\<^sub>R f (x, y)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
have "\<dots> = (\<integral>z. indicator (Sigma A B) z *\<^sub>R f z \<partial>count_space (A \<times> B'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT (x, y)|(count_space A \<Otimes>\<^sub>M count_space B'). indicat_real (B x) y *\<^sub>R f (x, y) = LINT z|count_space (A \<times> B'). indicat_real (Sigma A B) z *\<^sub>R f z
[PROOF STEP]
by (intro Bochner_Integration.integral_cong)
       (auto simp: pair_measure_countable indicator_def split: if_splits)
[PROOF STATE]
proof (state)
this:
LINT (x, y)|(count_space A \<Otimes>\<^sub>M count_space B'). indicat_real (B x) y *\<^sub>R f (x, y) = LINT z|count_space (A \<times> B'). indicat_real (Sigma A B) z *\<^sub>R f z

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LINT (x, y)|(count_space A \<Otimes>\<^sub>M count_space B'). indicat_real (B x) y *\<^sub>R f (x, y) = LINT z|count_space (A \<times> B'). indicat_real (Sigma A B) z *\<^sub>R f z

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
have "\<dots> = infsetsum f (Sigma A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT z|count_space (A \<times> B'). indicat_real (Sigma A B) z *\<^sub>R f z = infsetsum f (Sigma A B)
[PROOF STEP]
unfolding set_lebesgue_integral_def [symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_lebesgue_integral (count_space (A \<times> B')) (Sigma A B) f = infsetsum f (Sigma A B)
[PROOF STEP]
by (rule infsetsum_altdef' [symmetric]) (auto simp: B'_def)
[PROOF STATE]
proof (state)
this:
LINT z|count_space (A \<times> B'). indicat_real (Sigma A B) z *\<^sub>R f z = infsetsum f (Sigma A B)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y)) = infsetsum f (Sigma A B)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y)) = infsetsum f (Sigma A B)

goal (1 subgoal):
 1. infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
infsetsum f (Sigma A B) = (\<Sum>\<^sub>ax\<in>A. \<Sum>\<^sub>ay\<in>B x. f (x, y))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sorted_key_list_of_set_remove:
  assumes "insert x A \<subseteq> S" and "finite A"
  shows "sorted_key_list_of_set f (A - {x}) = remove1 x (sorted_key_list_of_set f A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
proof (cases "x \<in> A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x \<in> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
 2. x \<notin> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<notin> A

goal (2 subgoals):
 1. x \<in> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
 2. x \<notin> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
insert x A \<subseteq> S
finite A
x \<notin> A
[PROOF STEP]
have "x \<notin> set (sorted_key_list_of_set f A)"
[PROOF STATE]
proof (prove)
using this:
insert x A \<subseteq> S
finite A
x \<notin> A

goal (1 subgoal):
 1. x \<notin> set (lo.sorted_key_list_of_set f A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<notin> set (lo.sorted_key_list_of_set f A)

goal (2 subgoals):
 1. x \<in> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
 2. x \<notin> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
with False
[PROOF STATE]
proof (chain)
picking this:
x \<notin> A
x \<notin> set (lo.sorted_key_list_of_set f A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<notin> A
x \<notin> set (lo.sorted_key_list_of_set f A)

goal (1 subgoal):
 1. lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
by (simp add: remove1_idem)
[PROOF STATE]
proof (state)
this:
lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)

goal (1 subgoal):
 1. x \<in> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<in> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x \<in> A

goal (1 subgoal):
 1. x \<in> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> A
[PROOF STEP]
obtain B where A: "A = insert x B"
[PROOF STATE]
proof (prove)
using this:
x \<in> A

goal (1 subgoal):
 1. (\<And>B. A = insert x B \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule Set.set_insert)
[PROOF STATE]
proof (state)
this:
A = insert x B

goal (1 subgoal):
 1. x \<in> A \<Longrightarrow> lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
insert x A \<subseteq> S
finite A
A = insert x B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
insert x A \<subseteq> S
finite A
A = insert x B

goal (1 subgoal):
 1. lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lo.sorted_key_list_of_set f (A - {x}) = remove1 x (lo.sorted_key_list_of_set f A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma carr_prodrg_mem_eq:"\<lbrakk>f \<in> carrier (r\<Pi>\<^bsub>I\<^esub> A); g \<in> carrier (r\<Pi>\<^bsub>I\<^esub> A);
       \<forall>i\<in>I. f i = g i \<rbrakk> \<Longrightarrow> f = g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> carrier (r\<Pi>\<^bsub>I\<^esub> A); g \<in> carrier (r\<Pi>\<^bsub>I\<^esub> A); \<forall>i\<in>I. f i = g i\<rbrakk> \<Longrightarrow> f = g
[PROOF STEP]
by (simp add:prodrg_def carr_prodag_def, (erule conjE)+,
    rule funcset_eq[of _ I], assumption+)


[STATEMENT]
lemma locally_finite_on_closure:
  "locally_finite_on X I (\<lambda>x. closure (U x))"
  if "locally_finite_on X I U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally_finite_on X I (\<lambda>x. closure (U x))
[PROOF STEP]
proof (rule locally_finite_onI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>p. p \<in> X \<Longrightarrow> \<exists>N. p \<in> N \<and> open N \<and> finite {i \<in> I. closure (U i) \<inter> N \<noteq> {}}
[PROOF STEP]
fix p
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>p. p \<in> X \<Longrightarrow> \<exists>N. p \<in> N \<and> open N \<and> finite {i \<in> I. closure (U i) \<inter> N \<noteq> {}}
[PROOF STEP]
assume "p \<in> X"
[PROOF STATE]
proof (state)
this:
p \<in> X

goal (1 subgoal):
 1. \<And>p. p \<in> X \<Longrightarrow> \<exists>N. p \<in> N \<and> open N \<and> finite {i \<in> I. closure (U i) \<inter> N \<noteq> {}}
[PROOF STEP]
from locally_finite_onE[OF that this]
[PROOF STATE]
proof (chain)
picking this:
(\<And>N. \<lbrakk>p \<in> N; open N; finite {i \<in> I. U i \<inter> N \<noteq> {}}\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
obtain N
    where "p \<in> N" "open N" "finite {i \<in> I. U i \<inter> N \<noteq> {}}"
[PROOF STATE]
proof (prove)
using this:
(\<And>N. \<lbrakk>p \<in> N; open N; finite {i \<in> I. U i \<inter> N \<noteq> {}}\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>N. \<lbrakk>p \<in> N; open N; finite {i \<in> I. U i \<inter> N \<noteq> {}}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
p \<in> N
open N
finite {i \<in> I. U i \<inter> N \<noteq> {}}

goal (1 subgoal):
 1. \<And>p. p \<in> X \<Longrightarrow> \<exists>N. p \<in> N \<and> open N \<and> finite {i \<in> I. closure (U i) \<inter> N \<noteq> {}}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p \<in> N
open N
finite {i \<in> I. U i \<inter> N \<noteq> {}}
[PROOF STEP]
show "\<exists>N. p \<in> N \<and> open N \<and> finite {i \<in> I. closure (U i) \<inter> N \<noteq> {}}"
[PROOF STATE]
proof (prove)
using this:
p \<in> N
open N
finite {i \<in> I. U i \<inter> N \<noteq> {}}

goal (1 subgoal):
 1. \<exists>N. p \<in> N \<and> open N \<and> finite {i \<in> I. closure (U i) \<inter> N \<noteq> {}}
[PROOF STEP]
by (auto intro!: exI[where x=N] simp: closure_Int_open_eq_empty)
[PROOF STATE]
proof (state)
this:
\<exists>N. p \<in> N \<and> open N \<and> finite {i \<in> I. closure (U i) \<inter> N \<noteq> {}}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in is_semifunctor) smcf_smcf_comp_smcf_id_left[smc_cs_simps]:
  \<comment>\<open>See Chapter I-3 in \cite{mac_lane_categories_2010}).\<close>
  "smcf_id \<BB> \<circ>\<^sub>S\<^sub>M\<^sub>C\<^sub>F \<FF> = \<FF>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dghm_id \<BB> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<FF> = \<FF>
[PROOF STEP]
by (rule smcf_eqI, unfold dghm_id_components dghm_comp_components)
    (auto simp: smcf_ObjMap_vrange smcf_ArrMap_vrange intro: smc_cs_intros)


[STATEMENT]
lemma lhopital_at_top_at_bot:
  fixes f g :: "real \<Rightarrow> real"
  assumes f_0: "LIM x at a. f x :> at_top"
  assumes g_0: "LIM x at a. g x :> at_bot"
    and ev:
      "eventually (\<lambda>x. DERIV f x :> f' x) (at a)"
      "eventually (\<lambda>x. DERIV g x :> g' x) (at a)"
    and lim: "filterlim (\<lambda> x. (f' x / g' x)) at_bot (at a)"
  shows "filterlim (\<lambda> x. f x / g x) at_bot (at a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at a. f x / g x :> at_bot
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
filterlim f at_top (at a)
filterlim g at_bot (at a)
\<forall>\<^sub>F x in at a. (f has_real_derivative f' x) (at x)
\<forall>\<^sub>F x in at a. (g has_real_derivative g' x) (at x)
LIM x at a. f' x / g' x :> at_bot

goal (1 subgoal):
 1. LIM x at a. f x / g x :> at_bot
[PROOF STEP]
unfolding eventually_at_split filterlim_at_split
[PROOF STATE]
proof (prove)
using this:
filterlim f at_top (at_left a) \<and> filterlim f at_top (at_right a)
filterlim g at_bot (at_left a) \<and> filterlim g at_bot (at_right a)
(\<forall>\<^sub>F x in at_left a. (f has_real_derivative f' x) (at x)) \<and> (\<forall>\<^sub>F x in at_right a. (f has_real_derivative f' x) (at x))
(\<forall>\<^sub>F x in at_left a. (g has_real_derivative g' x) (at x)) \<and> (\<forall>\<^sub>F x in at_right a. (g has_real_derivative g' x) (at x))
(LIM x at_left a. f' x / g' x :> at_bot) \<and> (LIM x at_right a. f' x / g' x :> at_bot)

goal (1 subgoal):
 1. (LIM x at_left a. f x / g x :> at_bot) \<and> (LIM x at_right a. f x / g x :> at_bot)
[PROOF STEP]
by (auto intro!: lhopital_right_at_top_at_bot[of f a g f' g']
                   lhopital_left_at_top_at_bot[of f a g f' g'])


[STATEMENT]
lemma symmetry1: assumes "symp R"
shows "\<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*
[PROOF STEP]
have  "R x y \<longrightarrow>  R y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R x y \<longrightarrow> R y x
[PROOF STEP]
by (metis assms sympD)
[PROOF STATE]
proof (state)
this:
R x y \<longrightarrow> R y x

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
R x y \<longrightarrow> R y x
[PROOF STEP]
have " (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}"
[PROOF STATE]
proof (prove)
using this:
R x y \<longrightarrow> R y x

goal (1 subgoal):
 1. (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}
[PROOF STEP]
have 2:"\<forall> x y. (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}"
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}
[PROOF STEP]
by (metis (full_types) assms mem_Collect_eq split_conv sympE)
[PROOF STATE]
proof (state)
this:
\<forall>x y. (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x y. (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}
[PROOF STEP]
have "sym {(x, y). R x y}"
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}

goal (1 subgoal):
 1. sym {(x, y). R x y}
[PROOF STEP]
unfolding sym_def
[PROOF STATE]
proof (prove)
using this:
\<forall>x y. (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y} \<longrightarrow> (y, x) \<in> {(x, y). R x y}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sym {(x, y). R x y}

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sym {(x, y). R x y}
[PROOF STEP]
have 3: "sym (rtrancl {(x, y). R x y})"
[PROOF STATE]
proof (prove)
using this:
sym {(x, y). R x y}

goal (1 subgoal):
 1. sym ({(x, y). R x y}\<^sup>*)
[PROOF STEP]
using sym_rtrancl
[PROOF STATE]
proof (prove)
using this:
sym {(x, y). R x y}
sym ?r \<Longrightarrow> sym (?r\<^sup>*)

goal (1 subgoal):
 1. sym ({(x, y). R x y}\<^sup>*)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sym ({(x, y). R x y}\<^sup>*)

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sym ({(x, y). R x y}\<^sup>*)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sym ({(x, y). R x y}\<^sup>*)

goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*
[PROOF STEP]
by (metis symE)
[PROOF STATE]
proof (state)
this:
\<forall>x y. (x, y) \<in> {(x, y). R x y}\<^sup>* \<longrightarrow> (y, x) \<in> {(x, y). R x y}\<^sup>*

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_less_eq_aux_finite_total:
  "\<lbrakk> finite A; finite B \<rbrakk> \<Longrightarrow> A \<sqsubseteq>' B \<or> A = B \<or> B \<sqsubseteq>' A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; finite B\<rbrakk> \<Longrightarrow> A \<sqsubseteq>' B \<or> A = B \<or> B \<sqsubseteq>' A
[PROOF STEP]
by(drule (1) set_less_aux_finite_total)(auto simp add: set_less_eq_aux_def)


[STATEMENT]
lemma measurable_on_bilinear:
  fixes h :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space \<Rightarrow> 'c::euclidean_space"
  assumes h: "bilinear h" and f: "f measurable_on S" and g: "g measurable_on S"
  shows "(\<lambda>x. h (f x) (g x)) measurable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. h (f x) (g x)) measurable_on S
[PROOF STEP]
proof (rule measurable_on_combine [where h = h])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. f measurable_on S
 2. g measurable_on S
 3. continuous_on UNIV (\<lambda>x. h (fst x) (snd x))
 4. h (0::'a) (0::'b) = (0::'c)
[PROOF STEP]
show "continuous_on UNIV (\<lambda>x. h (fst x) (snd x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on UNIV (\<lambda>x. h (fst x) (snd x))
[PROOF STEP]
by (simp add: bilinear_continuous_on_compose [OF continuous_on_fst continuous_on_snd h])
[PROOF STATE]
proof (state)
this:
continuous_on UNIV (\<lambda>x. h (fst x) (snd x))

goal (3 subgoals):
 1. f measurable_on S
 2. g measurable_on S
 3. h (0::'a) (0::'b) = (0::'c)
[PROOF STEP]
show "h 0 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h (0::'a) (0::'b) = (0::'c)
[PROOF STEP]
by (simp add: bilinear_lzero h)
[PROOF STATE]
proof (state)
this:
h (0::'a) (0::'b) = (0::'c)

goal (2 subgoals):
 1. f measurable_on S
 2. g measurable_on S
[PROOF STEP]
qed (auto intro: assms)


[STATEMENT]
lemma orthogonal_real_eq: "RV_inner.orthogonal = real_inner_class.orthogonal"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. RV_inner.orthogonal = real_inner_class.orthogonal
[PROOF STEP]
unfolding RV_inner.orthogonal_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x y. x \<bullet> y = 0) = real_inner_class.orthogonal
[PROOF STEP]
unfolding real_inner_class.orthogonal_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x y. x \<bullet> y = 0) = (\<lambda>x y. x \<bullet> y = 0)
[PROOF STEP]
..


[STATEMENT]
lemma i_join_finite_nth_ge_card_eq_nth_Max: "
  \<lbrakk> finite I; I \<noteq> {}; card I \<le> Suc n \<rbrakk> \<Longrightarrow> (f \<Join>\<^sub>i I) n = f (Max I)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite I; I \<noteq> {}; card I \<le> Suc n\<rbrakk> \<Longrightarrow> (f \<Join>\<^sub> I) n = f (Max I)
[PROOF STEP]
by (simp add: i_join_nth inext_nth_card_Max)


[STATEMENT]
lemma closed_Collect_neg: "open {x. P x} \<Longrightarrow> closed {x. \<not> P x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open {x. P x} \<Longrightarrow> closed {x. \<not> P x}
[PROOF STEP]
unfolding Collect_neg_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open {x. P x} \<Longrightarrow> closed (- {x. P x})
[PROOF STEP]
by (rule closed_Compl)


[STATEMENT]
lemma make_set_suc [simp]: "make_set (Suc k) p = make_set k p \<union> {x. p k x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. make_set (Suc k) p = make_set k p \<union> {x. p k x}
[PROOF STEP]
using less_Suc_eq
[PROOF STATE]
proof (prove)
using this:
(?m < Suc ?n) = (?m < ?n \<or> ?m = ?n)

goal (1 subgoal):
 1. make_set (Suc k) p = make_set k p \<union> {x. p k x}
[PROOF STEP]
by (simp add:make_set_def, blast)


[STATEMENT]
lemma finprod_Un_Int:
  "\<lbrakk>finite A; finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow>
     finprod G g (A Un B) \<otimes> finprod G g (A Int B) =
     finprod G g A \<otimes> finprod G g B"
\<comment> \<open>The reversed orientation looks more natural, but LOOPS as a simprule!\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (A \<union> B) \<otimes> finprod G g (A \<inter> B) = finprod G g A \<otimes> finprod G g B
[PROOF STEP]
proof (induct set: finite)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>finite B; g \<in> {} \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g ({} \<union> B) \<otimes> finprod G g ({} \<inter> B) = finprod G g {} \<otimes> finprod G g B
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>finite B; g \<in> F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (F \<union> B) \<otimes> finprod G g (F \<inter> B) = finprod G g F \<otimes> finprod G g B; finite B; g \<in> insert x F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (insert x F \<union> B) \<otimes> finprod G g (insert x F \<inter> B) = finprod G g (insert x F) \<otimes> finprod G g B
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:
finite B
g \<in> {} \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G

goal (2 subgoals):
 1. \<lbrakk>finite B; g \<in> {} \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g ({} \<union> B) \<otimes> finprod G g ({} \<inter> B) = finprod G g {} \<otimes> finprod G g B
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>finite B; g \<in> F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (F \<union> B) \<otimes> finprod G g (F \<inter> B) = finprod G g F \<otimes> finprod G g B; finite B; g \<in> insert x F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (insert x F \<union> B) \<otimes> finprod G g (insert x F \<inter> B) = finprod G g (insert x F) \<otimes> finprod G g B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite B
g \<in> {} \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite B
g \<in> {} \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G

goal (1 subgoal):
 1. finprod G g ({} \<union> B) \<otimes> finprod G g ({} \<inter> B) = finprod G g {} \<otimes> finprod G g B
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finprod G g ({} \<union> B) \<otimes> finprod G g ({} \<inter> B) = finprod G g {} \<otimes> finprod G g B

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>finite B; g \<in> F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (F \<union> B) \<otimes> finprod G g (F \<inter> B) = finprod G g F \<otimes> finprod G g B; finite B; g \<in> insert x F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (insert x F \<union> B) \<otimes> finprod G g (insert x F \<inter> B) = finprod G g (insert x F) \<otimes> finprod G g B
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>finite B; g \<in> F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (F \<union> B) \<otimes> finprod G g (F \<inter> B) = finprod G g F \<otimes> finprod G g B; finite B; g \<in> insert x F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (insert x F \<union> B) \<otimes> finprod G g (insert x F \<inter> B) = finprod G g (insert x F) \<otimes> finprod G g B
[PROOF STEP]
case (insert a A)
[PROOF STATE]
proof (state)
this:
finite A
a \<notin> A
\<lbrakk>finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (A \<union> B) \<otimes> finprod G g (A \<inter> B) = finprod G g A \<otimes> finprod G g B
finite B
g \<in> insert a A \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>finite B; g \<in> F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (F \<union> B) \<otimes> finprod G g (F \<inter> B) = finprod G g F \<otimes> finprod G g B; finite B; g \<in> insert x F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (insert x F \<union> B) \<otimes> finprod G g (insert x F \<inter> B) = finprod G g (insert x F) \<otimes> finprod G g B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite A
a \<notin> A
\<lbrakk>finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (A \<union> B) \<otimes> finprod G g (A \<inter> B) = finprod G g A \<otimes> finprod G g B
finite B
g \<in> insert a A \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G
[PROOF STEP]
have a: "g a \<in> carrier G"
[PROOF STATE]
proof (prove)
using this:
finite A
a \<notin> A
\<lbrakk>finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (A \<union> B) \<otimes> finprod G g (A \<inter> B) = finprod G g A \<otimes> finprod G g B
finite B
g \<in> insert a A \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G

goal (1 subgoal):
 1. g a \<in> carrier G
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
g a \<in> carrier G

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>finite B; g \<in> F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (F \<union> B) \<otimes> finprod G g (F \<inter> B) = finprod G g F \<otimes> finprod G g B; finite B; g \<in> insert x F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (insert x F \<union> B) \<otimes> finprod G g (insert x F \<inter> B) = finprod G g (insert x F) \<otimes> finprod G g B
[PROOF STEP]
from insert
[PROOF STATE]
proof (chain)
picking this:
finite A
a \<notin> A
\<lbrakk>finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (A \<union> B) \<otimes> finprod G g (A \<inter> B) = finprod G g A \<otimes> finprod G g B
finite B
g \<in> insert a A \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G
[PROOF STEP]
have A: "g \<in> A \<rightarrow> carrier G"
[PROOF STATE]
proof (prove)
using this:
finite A
a \<notin> A
\<lbrakk>finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (A \<union> B) \<otimes> finprod G g (A \<inter> B) = finprod G g A \<otimes> finprod G g B
finite B
g \<in> insert a A \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G

goal (1 subgoal):
 1. g \<in> A \<rightarrow> carrier G
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
g \<in> A \<rightarrow> carrier G

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>finite B; g \<in> F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (F \<union> B) \<otimes> finprod G g (F \<inter> B) = finprod G g F \<otimes> finprod G g B; finite B; g \<in> insert x F \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (insert x F \<union> B) \<otimes> finprod G g (insert x F \<inter> B) = finprod G g (insert x F) \<otimes> finprod G g B
[PROOF STEP]
from insert A a
[PROOF STATE]
proof (chain)
picking this:
finite A
a \<notin> A
\<lbrakk>finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (A \<union> B) \<otimes> finprod G g (A \<inter> B) = finprod G g A \<otimes> finprod G g B
finite B
g \<in> insert a A \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G
g \<in> A \<rightarrow> carrier G
g a \<in> carrier G
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite A
a \<notin> A
\<lbrakk>finite B; g \<in> A \<rightarrow> carrier G; g \<in> B \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> finprod G g (A \<union> B) \<otimes> finprod G g (A \<inter> B) = finprod G g A \<otimes> finprod G g B
finite B
g \<in> insert a A \<rightarrow> carrier G
g \<in> B \<rightarrow> carrier G
g \<in> A \<rightarrow> carrier G
g a \<in> carrier G

goal (1 subgoal):
 1. finprod G g (insert a A \<union> B) \<otimes> finprod G g (insert a A \<inter> B) = finprod G g (insert a A) \<otimes> finprod G g B
[PROOF STEP]
by (simp add: m_ac Int_insert_left insert_absorb Int_mono2)
[PROOF STATE]
proof (state)
this:
finprod G g (insert a A \<union> B) \<otimes> finprod G g (insert a A \<inter> B) = finprod G g (insert a A) \<otimes> finprod G g B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma antisymmetric_union:
  fixes less_eq (infix "\<sqsubseteq>" 50)
  assumes A: "antisymmetric A (\<sqsubseteq>)" and B: "antisymmetric B (\<sqsubseteq>)"
    and AB: "\<forall>a \<in> A. \<forall>b \<in> B. a \<sqsubseteq> b \<longrightarrow> b \<sqsubseteq> a \<longrightarrow> a = b"
  shows "antisymmetric (A \<union> B) (\<sqsubseteq>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. antisymmetric (A \<union> B) (\<sqsubseteq>)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. antisymmetric (A \<union> B) (\<sqsubseteq>)
[PROOF STEP]
interpret A: antisymmetric A "(\<sqsubseteq>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. antisymmetric A (\<sqsubseteq>)
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
antisymmetric A (\<sqsubseteq>)

goal (1 subgoal):
 1. antisymmetric A (\<sqsubseteq>)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. antisymmetric (A \<union> B) (\<sqsubseteq>)
[PROOF STEP]
interpret B: antisymmetric B "(\<sqsubseteq>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. antisymmetric B (\<sqsubseteq>)
[PROOF STEP]
using B
[PROOF STATE]
proof (prove)
using this:
antisymmetric B (\<sqsubseteq>)

goal (1 subgoal):
 1. antisymmetric B (\<sqsubseteq>)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. antisymmetric (A \<union> B) (\<sqsubseteq>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. antisymmetric (A \<union> B) (\<sqsubseteq>)
[PROOF STEP]
by (auto dest: AB[rule_format] A.antisym B.antisym)
[PROOF STATE]
proof (state)
this:
antisymmetric (A \<union> B) (\<sqsubseteq>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma
  fixes f g :: "nat \<Rightarrow> 'a :: {banach, real_normed_field, second_countable_topology, nat_power}"
  fixes s :: 'a
  assumes [simp]: "f 0 = 0" "g 0 = 0"
  assumes summable: "summable (\<lambda>n. norm (f n / nat_power n s))"
                    "summable (\<lambda>n. norm (g n / nat_power n s))"
  shows   summable_dirichlet_prod: "summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))"
    and   suminf_dirichlet_prod:
            "(\<Sum>n. dirichlet_prod f g n / nat_power n s) =
               (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s)) &&& (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have summable': "(\<lambda>n. f n / nat_power n s) abs_summable_on A"
                  "(\<lambda>n. g n / nat_power n s) abs_summable_on A" for A
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. f n / nat_power n s) abs_summable_on A &&& (\<lambda>n. g n / nat_power n s) abs_summable_on A
[PROOF STEP]
by ((rule abs_summable_on_subset[OF _ subset_UNIV], insert summable,
        simp add: abs_summable_on_nat_iff'); fail)+
[PROOF STATE]
proof (state)
this:
(\<lambda>n. f n / nat_power n s) abs_summable_on ?A
(\<lambda>n. g n / nat_power n s) abs_summable_on ?A

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have f_g: "f a / nat_power a s * (g b / nat_power b s) =
              f a * g b / nat_power (a * b) s" for a b
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f a / nat_power a s * (g b / nat_power b s) = f a * g b / nat_power (a * b) s
[PROOF STEP]
by (cases "a * b = 0") (auto simp: nat_power_mult_distrib)
[PROOF STATE]
proof (state)
this:
f ?a / nat_power ?a s * (g ?b / nat_power ?b s) = f ?a * g ?b / nat_power (?a * ?b) s

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have eq: "(\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) =
              dirichlet_prod f g x / nat_power x s" for x :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
proof (cases "x > 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
 2. \<not> 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> 0 < x

goal (2 subgoals):
 1. 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
 2. \<not> 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
hence "(\<Sum>\<^sub>a(m,n) | m * n = x. f m * g n / nat_power x s) = (\<Sum>\<^sub>a(m,n) | m * n = x. 0)"
[PROOF STATE]
proof (prove)
using this:
\<not> 0 < x

goal (1 subgoal):
 1. (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. (0::'a))
[PROOF STEP]
by (intro infsetsum_cong) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. (0::'a))

goal (2 subgoals):
 1. 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
 2. \<not> 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
with False
[PROOF STATE]
proof (chain)
picking this:
\<not> 0 < x
(\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. (0::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> 0 < x
(\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. (0::'a))

goal (1 subgoal):
 1. (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s

goal (1 subgoal):
 1. 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
0 < x

goal (1 subgoal):
 1. 0 < x \<Longrightarrow> (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
from finite_divisors_nat'[OF this]
[PROOF STATE]
proof (chain)
picking this:
finite {(a, b). a * b = x}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite {(a, b). a * b = x}

goal (1 subgoal):
 1. (\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s
[PROOF STEP]
by (simp add: dirichlet_prod_altdef2 case_prod_unfold sum_divide_distrib)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = x}. f m * g n / nat_power x s) = dirichlet_prod f g x / nat_power x s

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(m, n)\<in>{(m, n). m * n = ?x}. f m * g n / nat_power ?x s) = dirichlet_prod f g ?x / nat_power ?x s

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "(\<lambda>(m,n). (f m / nat_power m s) * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(m, n). f m / nat_power m s * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV
[PROOF STEP]
using summable'
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. f n / nat_power n s) abs_summable_on ?A
(\<lambda>n. g n / nat_power n s) abs_summable_on ?A

goal (1 subgoal):
 1. (\<lambda>(m, n). f m / nat_power m s * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV
[PROOF STEP]
by (intro abs_summable_on_product) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>(m, n). f m / nat_power m s * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>(m, n). f m / nat_power m s * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "?this \<longleftrightarrow> (\<lambda>(m,n). f m * g n / nat_power (m*n) s) abs_summable_on UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>(m, n). f m / nat_power m s * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV) = ((\<lambda>(m, n). f m * g n / nat_power (m * n) s) abs_summable_on UNIV)
[PROOF STEP]
using f_g
[PROOF STATE]
proof (prove)
using this:
f ?a / nat_power ?a s * (g ?b / nat_power ?b s) = f ?a * g ?b / nat_power (?a * ?b) s

goal (1 subgoal):
 1. ((\<lambda>(m, n). f m / nat_power m s * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV) = ((\<lambda>(m, n). f m * g n / nat_power (m * n) s) abs_summable_on UNIV)
[PROOF STEP]
by (intro abs_summable_on_cong) auto
[PROOF STATE]
proof (state)
this:
((\<lambda>(m, n). f m / nat_power m s * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV) = ((\<lambda>(m, n). f m * g n / nat_power (m * n) s) abs_summable_on UNIV)

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((\<lambda>(m, n). f m / nat_power m s * (g n / nat_power n s)) abs_summable_on UNIV \<times> UNIV) = ((\<lambda>(m, n). f m * g n / nat_power (m * n) s) abs_summable_on UNIV)

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "\<dots> \<longleftrightarrow> (\<lambda>(x,(m,n)). f m * g n / nat_power (m*n) s) abs_summable_on
                           (SIGMA x:UNIV. {(m,n). m * n = x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>(m, n). f m * g n / nat_power (m * n) s) abs_summable_on UNIV) = ((\<lambda>(x, m, n). f m * g n / nat_power (m * n) s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x}))
[PROOF STEP]
unfolding case_prod_unfold
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>p. f (fst p) * g (snd p) / nat_power (fst p * snd p) s) abs_summable_on UNIV) = ((\<lambda>p. f (fst (snd p)) * g (snd (snd p)) / nat_power (fst (snd p) * snd (snd p)) s) abs_summable_on (SIGMA x:UNIV. {p. fst p * snd p = x}))
[PROOF STEP]
by (rule abs_summable_on_reindex_bij_betw [symmetric])
       (auto simp: bij_betw_def inj_on_def image_iff)
[PROOF STATE]
proof (state)
this:
((\<lambda>(m, n). f m * g n / nat_power (m * n) s) abs_summable_on UNIV) = ((\<lambda>(x, m, n). f m * g n / nat_power (m * n) s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x}))

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((\<lambda>(m, n). f m * g n / nat_power (m * n) s) abs_summable_on UNIV) = ((\<lambda>(x, m, n). f m * g n / nat_power (m * n) s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x}))

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "\<dots> \<longleftrightarrow> (\<lambda>(x,(m,n)). f m * g n / nat_power x s) abs_summable_on
                           (SIGMA x:UNIV. {(m,n). m * n = x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>(x, m, n). f m * g n / nat_power (m * n) s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x})) = ((\<lambda>(x, m, n). f m * g n / nat_power x s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x}))
[PROOF STEP]
by (intro abs_summable_on_cong) auto
[PROOF STATE]
proof (state)
this:
((\<lambda>(x, m, n). f m * g n / nat_power (m * n) s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x})) = ((\<lambda>(x, m, n). f m * g n / nat_power x s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x}))

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>(x, m, n). f m * g n / nat_power x s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x})
[PROOF STEP]
have summable'': \<dots>
[PROOF STATE]
proof (prove)
using this:
(\<lambda>(x, m, n). f m * g n / nat_power x s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x})

goal (1 subgoal):
 1. (\<lambda>(x, m, n). f m * g n / nat_power x s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x})
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>(x, m, n). f m * g n / nat_power x s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x})

goal (2 subgoals):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
 2. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
from abs_summable_on_Sigma_project1'[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>countable UNIV; \<And>x. x \<in> UNIV \<Longrightarrow> countable {(m, n). m * n = x}\<rbrakk> \<Longrightarrow> (\<lambda>x. \<Sum>\<^sub>ay\<in>{(m, n). m * n = x}. case y of (m, n) \<Rightarrow> f m * g n / nat_power x s) abs_summable_on UNIV
[PROOF STEP]
show summable''': "summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>countable UNIV; \<And>x. x \<in> UNIV \<Longrightarrow> countable {(m, n). m * n = x}\<rbrakk> \<Longrightarrow> (\<lambda>x. \<Sum>\<^sub>ay\<in>{(m, n). m * n = x}. case y of (m, n) \<Rightarrow> f m * g n / nat_power x s) abs_summable_on UNIV

goal (1 subgoal):
 1. summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))
[PROOF STEP]
by (simp add: eq abs_summable_on_nat_iff')
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "(\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s) =
          (\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s) = (\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s)
[PROOF STEP]
using summable'
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. f n / nat_power n s) abs_summable_on ?A
(\<lambda>n. g n / nat_power n s) abs_summable_on ?A

goal (1 subgoal):
 1. (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s) = (\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s)
[PROOF STEP]
by (simp add: infsetsum_nat')
[PROOF STATE]
proof (state)
this:
(\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s) = (\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s) = (\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "\<dots> = (\<Sum>\<^sub>a(m,n). (f m / nat_power m s) * (g n / nat_power n s))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s) = (\<Sum>\<^sub>a(m, n). f m / nat_power m s * (g n / nat_power n s))
[PROOF STEP]
using summable'
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. f n / nat_power n s) abs_summable_on ?A
(\<lambda>n. g n / nat_power n s) abs_summable_on ?A

goal (1 subgoal):
 1. (\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s) = (\<Sum>\<^sub>a(m, n). f m / nat_power m s * (g n / nat_power n s))
[PROOF STEP]
by (subst infsetsum_product [symmetric]) simp_all
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s) = (\<Sum>\<^sub>a(m, n). f m / nat_power m s * (g n / nat_power n s))

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>an. f n / nat_power n s) * (\<Sum>\<^sub>an. g n / nat_power n s) = (\<Sum>\<^sub>a(m, n). f m / nat_power m s * (g n / nat_power n s))

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "\<dots> = (\<Sum>\<^sub>a(m,n). f m * g n / nat_power (m * n) s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>a(m, n). f m / nat_power m s * (g n / nat_power n s)) = (\<Sum>\<^sub>a(m, n). f m * g n / nat_power (m * n) s)
[PROOF STEP]
using f_g
[PROOF STATE]
proof (prove)
using this:
f ?a / nat_power ?a s * (g ?b / nat_power ?b s) = f ?a * g ?b / nat_power (?a * ?b) s

goal (1 subgoal):
 1. (\<Sum>\<^sub>a(m, n). f m / nat_power m s * (g n / nat_power n s)) = (\<Sum>\<^sub>a(m, n). f m * g n / nat_power (m * n) s)
[PROOF STEP]
by (intro infsetsum_cong refl) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(m, n). f m / nat_power m s * (g n / nat_power n s)) = (\<Sum>\<^sub>a(m, n). f m * g n / nat_power (m * n) s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(m, n). f m / nat_power m s * (g n / nat_power n s)) = (\<Sum>\<^sub>a(m, n). f m * g n / nat_power (m * n) s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "\<dots> = (\<Sum>\<^sub>a(x,(m,n))\<in>(SIGMA x:UNIV. {(m,n). m * n = x}).
                      f m * g n / nat_power (m * n) s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>a(m, n). f m * g n / nat_power (m * n) s) = (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power (m * n) s)
[PROOF STEP]
unfolding case_prod_unfold
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>ap. f (fst p) * g (snd p) / nat_power (fst p * snd p) s) = (\<Sum>\<^sub>ap\<in>(SIGMA x:UNIV. {p. fst p * snd p = x}). f (fst (snd p)) * g (snd (snd p)) / nat_power (fst (snd p) * snd (snd p)) s)
[PROOF STEP]
by (rule infsetsum_reindex_bij_betw [symmetric]) (auto simp: bij_betw_def inj_on_def image_iff)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(m, n). f m * g n / nat_power (m * n) s) = (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power (m * n) s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(m, n). f m * g n / nat_power (m * n) s) = (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power (m * n) s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "\<dots> = (\<Sum>\<^sub>a(x,(m,n))\<in>(SIGMA x:UNIV. {(m,n). m * n = x}).
                      f m * g n / nat_power x s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power (m * n) s) = (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power x s)
[PROOF STEP]
by (intro infsetsum_cong refl) (auto simp: case_prod_unfold)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power (m * n) s) = (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power x s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power (m * n) s) = (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power x s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "\<dots> = (\<Sum>\<^sub>ax. dirichlet_prod f g x / nat_power x s)"
    (is "_ = infsetsum ?T _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power x s) = (\<Sum>\<^sub>ax. dirichlet_prod f g x / nat_power x s)
[PROOF STEP]
using summable''
[PROOF STATE]
proof (prove)
using this:
(\<lambda>(x, m, n). f m * g n / nat_power x s) abs_summable_on (SIGMA x:UNIV. {(m, n). m * n = x})

goal (1 subgoal):
 1. (\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power x s) = (\<Sum>\<^sub>ax. dirichlet_prod f g x / nat_power x s)
[PROOF STEP]
by (subst infsetsum_Sigma) (auto simp: eq)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power x s) = (\<Sum>\<^sub>ax. dirichlet_prod f g x / nat_power x s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>a(x, m, n)\<in>(SIGMA x:UNIV. {(m, n). m * n = x}). f m * g n / nat_power x s) = (\<Sum>\<^sub>ax. dirichlet_prod f g x / nat_power x s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
have "\<dots> = (\<Sum>x. dirichlet_prod f g x / nat_power x s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sub>ax. dirichlet_prod f g x / nat_power x s) = (\<Sum>x. dirichlet_prod f g x / nat_power x s)
[PROOF STEP]
using summable'''
[PROOF STATE]
proof (prove)
using this:
summable (\<lambda>n. norm (dirichlet_prod f g n / nat_power n s))

goal (1 subgoal):
 1. (\<Sum>\<^sub>ax. dirichlet_prod f g x / nat_power x s) = (\<Sum>x. dirichlet_prod f g x / nat_power x s)
[PROOF STEP]
by (intro infsetsum_nat') (simp_all add: abs_summable_on_nat_iff')
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sub>ax. dirichlet_prod f g x / nat_power x s) = (\<Sum>x. dirichlet_prod f g x / nat_power x s)

goal (1 subgoal):
 1. (\<Sum>n. dirichlet_prod f g n / nat_power n s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s) = (\<Sum>x. dirichlet_prod f g x / nat_power x s)
[PROOF STEP]
show "\<dots> = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s) = (\<Sum>x. dirichlet_prod f g x / nat_power x s)

goal (1 subgoal):
 1. (\<Sum>x. dirichlet_prod f g x / nat_power x s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(\<Sum>x. dirichlet_prod f g x / nat_power x s) = (\<Sum>n. f n / nat_power n s) * (\<Sum>n. g n / nat_power n s)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sol_dim_in_min_lp: "x \<in> min_lp A b c \<Longrightarrow> dim_vec x = dim_row A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> optimal_set (\<lambda>x y. x \<bullet> c \<le> y \<bullet> c) (sat_dual A c) \<Longrightarrow> dim_vec x = dim_row A
[PROOF STEP]
unfolding optimal_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> {x \<in> sat_dual A c. \<forall>y\<in>sat_dual A c. x \<bullet> c \<le> y \<bullet> c} \<Longrightarrow> dim_vec x = dim_row A
[PROOF STEP]
using sol_dim_in_sat_dual[of x A]
[PROOF STATE]
proof (prove)
using this:
x \<in> sat_dual A ?c \<Longrightarrow> dim_vec x = dim_row A

goal (1 subgoal):
 1. x \<in> {x \<in> sat_dual A c. \<forall>y\<in>sat_dual A c. x \<bullet> c \<le> y \<bullet> c} \<Longrightarrow> dim_vec x = dim_row A
[PROOF STEP]
by blast


[STATEMENT]
lemma unitary_exmat_incr:
  "unitary (tensor_P (1\<^sub>m N) (mat_incr K))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unitary (tensor_P (1\<^sub>m N) (mat_incr K))
[PROOF STEP]
unfolding ps2_P.ptensor_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unitary (ps_P.tensor_mat (1\<^sub>m N) (mat_incr K))
[PROOF STEP]
apply (subst ps_P.tensor_mat_unitary)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. 1\<^sub>m N \<in> carrier_mat ps_P.d1 ps_P.d1
 2. mat_incr K \<in> carrier_mat ps_P.d2 ps_P.d2
 3. unitary (1\<^sub>m N)
 4. unitary (mat_incr K)
 5. True
[PROOF STEP]
using  unitary_mat_incr K unitary_one
[PROOF STATE]
proof (prove)
using this:
unitary (mat_incr ?n)
R < K
unitary (1\<^sub>m ?n)

goal (5 subgoals):
 1. 1\<^sub>m N \<in> carrier_mat ps_P.d1 ps_P.d1
 2. mat_incr K \<in> carrier_mat ps_P.d2 ps_P.d2
 3. unitary (1\<^sub>m N)
 4. unitary (mat_incr K)
 5. True
[PROOF STEP]
by (auto simp add: ps_P_d1 ps_P_d2 mat_incr_def)


[STATEMENT]
lemma sum_of_powers_nat: "(x - 1::nat) * (\<Sum>i=0..n . x^i) = x ^ Suc n - 1"
   (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
[PROOF STEP]
proof (cases "x = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
 2. x \<noteq> 0 \<Longrightarrow> (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> 0

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
 2. x \<noteq> 0 \<Longrightarrow> (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> 0
[PROOF STEP]
have "int ((x - 1) * sum ((^) x) {0..n}) = int (x ^ Suc n - 1)"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> 0

goal (1 subgoal):
 1. int ((x - 1) * sum ((^) x) {0..n}) = int (x ^ Suc n - 1)
[PROOF STEP]
using sum_of_powers_int [of "int x" n]
[PROOF STATE]
proof (prove)
using this:
x \<noteq> 0
(int x - 1) * sum ((^) (int x)) {0..n} = int x ^ Suc n - 1

goal (1 subgoal):
 1. int ((x - 1) * sum ((^) x) {0..n}) = int (x ^ Suc n - 1)
[PROOF STEP]
by (simp add: of_nat_diff)
[PROOF STATE]
proof (state)
this:
int ((x - 1) * sum ((^) x) {0..n}) = int (x ^ Suc n - 1)

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
 2. x \<noteq> 0 \<Longrightarrow> (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
int ((x - 1) * sum ((^) x) {0..n}) = int (x ^ Suc n - 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
int ((x - 1) * sum ((^) x) {0..n}) = int (x ^ Suc n - 1)

goal (1 subgoal):
 1. (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
[PROOF STEP]
using of_nat_eq_iff
[PROOF STATE]
proof (prove)
using this:
int ((x - 1) * sum ((^) x) {0..n}) = int (x ^ Suc n - 1)
(of_nat ?m = of_nat ?n) = (?m = ?n)

goal (1 subgoal):
 1. (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1

goal (1 subgoal):
 1. x = 0 \<Longrightarrow> (x - 1) * sum ((^) x) {0..n} = x ^ Suc n - 1
[PROOF STEP]
qed auto


[STATEMENT]
lemma sign_swap_id: "sign (transpose a b) = (if a = b then 1 else - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sign (Transposition.transpose a b) = (if a = b then 1 else - 1)
[PROOF STEP]
by (simp add: sign_def evenperm_swap)