[STATEMENT]
lemma AbGroup_inner_dirsum_pairwise_int0 :
  "\<lbrakk> \<forall>G \<in> set Gs. AbGroup G; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs;
        G \<noteq> G' \<rbrakk> \<Longrightarrow> G \<inter> G' = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>G\<in>set Gs. AbGroup G; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
proof (induct Gs arbitrary: G G')
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
case (Cons H Hs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<forall>a\<in>set Hs. AbGroup a; add_independentS Hs; ?G \<in> set Hs; ?G' \<in> set Hs; ?G \<noteq> ?G'\<rbrakk> \<Longrightarrow> ?G \<inter> ?G' = 0
\<forall>a\<in>set (H # Hs). AbGroup a
add_independentS (H # Hs)
G \<in> set (H # Hs)
G' \<in> set (H # Hs)
G \<noteq> G'

goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
from Cons(1-3)
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<forall>a\<in>set Hs. AbGroup a; add_independentS Hs; ?G \<in> set Hs; ?G' \<in> set Hs; ?G \<noteq> ?G'\<rbrakk> \<Longrightarrow> ?G \<inter> ?G' = 0
\<forall>a\<in>set (H # Hs). AbGroup a
add_independentS (H # Hs)
[PROOF STEP]
have "\<And>A B. \<lbrakk> A \<in> set Hs; B \<in> set Hs; A \<noteq> B \<rbrakk>
                            \<Longrightarrow> A \<inter> B \<subseteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>a\<in>set Hs. AbGroup a; add_independentS Hs; ?G \<in> set Hs; ?G' \<in> set Hs; ?G \<noteq> ?G'\<rbrakk> \<Longrightarrow> ?G \<inter> ?G' = 0
\<forall>a\<in>set (H # Hs). AbGroup a
add_independentS (H # Hs)

goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> set Hs; B \<in> set Hs; A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B \<subseteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<lbrakk>?A \<in> set Hs; ?B \<in> set Hs; ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<inter> ?B \<subseteq> 0

goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<lbrakk>?A \<in> set Hs; ?B \<in> set Hs; ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<inter> ?B \<subseteq> 0

goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
have "\<And>A. A \<in> set Hs \<Longrightarrow> A \<noteq> H \<Longrightarrow>  A \<inter> H \<subseteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>A. \<lbrakk>A \<in> set Hs; A \<noteq> H\<rbrakk> \<Longrightarrow> A \<inter> H \<subseteq> 0
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A x. \<lbrakk>A \<in> set Hs; A \<noteq> H; x \<in> A \<inter> H\<rbrakk> \<Longrightarrow> x \<in> 0
[PROOF STEP]
fix A g
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A x. \<lbrakk>A \<in> set Hs; A \<noteq> H; x \<in> A \<inter> H\<rbrakk> \<Longrightarrow> x \<in> 0
[PROOF STEP]
assume A: "A \<in> set Hs" "A \<noteq> H" and g: "g \<in> A \<inter> H"
[PROOF STATE]
proof (state)
this:
A \<in> set Hs
A \<noteq> H
g \<in> A \<inter> H

goal (1 subgoal):
 1. \<And>A x. \<lbrakk>A \<in> set Hs; A \<noteq> H; x \<in> A \<inter> H\<rbrakk> \<Longrightarrow> x \<in> 0
[PROOF STEP]
from A(1) g Cons(2)
[PROOF STATE]
proof (chain)
picking this:
A \<in> set Hs
g \<in> A \<inter> H
\<forall>a\<in>set (H # Hs). AbGroup a
[PROOF STEP]
have "-g \<in> (\<Sum>X\<leftarrow>Hs. X)"
[PROOF STATE]
proof (prove)
using this:
A \<in> set Hs
g \<in> A \<inter> H
\<forall>a\<in>set (H # Hs). AbGroup a

goal (1 subgoal):
 1. - g \<in> (\<Sum>X\<leftarrow>Hs. X)
[PROOF STEP]
using AbGroup.neg_closed AbGroup_subset_sum_list
[PROOF STATE]
proof (prove)
using this:
A \<in> set Hs
g \<in> A \<inter> H
\<forall>a\<in>set (H # Hs). AbGroup a
\<lbrakk>AbGroup ?G; ?g \<in> ?G\<rbrakk> \<Longrightarrow> - ?g \<in> ?G
\<lbrakk>\<forall>G\<in>set ?Gs. AbGroup G; ?H \<in> set ?Gs\<rbrakk> \<Longrightarrow> ?H \<subseteq> (\<Sum>G\<leftarrow>?Gs. G)

goal (1 subgoal):
 1. - g \<in> (\<Sum>X\<leftarrow>Hs. X)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
- g \<in> (\<Sum>X\<leftarrow>Hs. X)

goal (1 subgoal):
 1. \<And>A x. \<lbrakk>A \<in> set Hs; A \<noteq> H; x \<in> A \<inter> H\<rbrakk> \<Longrightarrow> x \<in> 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
- g \<in> (\<Sum>X\<leftarrow>Hs. X)

goal (1 subgoal):
 1. \<And>A x. \<lbrakk>A \<in> set Hs; A \<noteq> H; x \<in> A \<inter> H\<rbrakk> \<Longrightarrow> x \<in> 0
[PROOF STEP]
have "g + (-g) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g + - g = (0::'a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
g + - g = (0::'a)

goal (1 subgoal):
 1. \<And>A x. \<lbrakk>A \<in> set Hs; A \<noteq> H; x \<in> A \<inter> H\<rbrakk> \<Longrightarrow> x \<in> 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
- g \<in> (\<Sum>X\<leftarrow>Hs. X)
g + - g = (0::'a)
[PROOF STEP]
show "g \<in> 0"
[PROOF STATE]
proof (prove)
using this:
- g \<in> (\<Sum>X\<leftarrow>Hs. X)
g + - g = (0::'a)

goal (1 subgoal):
 1. g \<in> 0
[PROOF STEP]
using g Cons(3)
[PROOF STATE]
proof (prove)
using this:
- g \<in> (\<Sum>X\<leftarrow>Hs. X)
g + - g = (0::'a)
g \<in> A \<inter> H
add_independentS (H # Hs)

goal (1 subgoal):
 1. g \<in> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
g \<in> 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?A \<in> set Hs; ?A \<noteq> H\<rbrakk> \<Longrightarrow> ?A \<inter> H \<subseteq> 0

goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?A \<in> set Hs; ?B \<in> set Hs; ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<inter> ?B \<subseteq> 0
\<lbrakk>?A \<in> set Hs; ?A \<noteq> H\<rbrakk> \<Longrightarrow> ?A \<inter> H \<subseteq> 0
[PROOF STEP]
have "\<And>A B. \<lbrakk> A \<in> set (H#Hs); B \<in> set (H#Hs); A \<noteq> B \<rbrakk>
                        \<Longrightarrow> A \<inter> B \<subseteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A \<in> set Hs; ?B \<in> set Hs; ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<inter> ?B \<subseteq> 0
\<lbrakk>?A \<in> set Hs; ?A \<noteq> H\<rbrakk> \<Longrightarrow> ?A \<inter> H \<subseteq> 0

goal (1 subgoal):
 1. \<And>A B. \<lbrakk>A \<in> set (H # Hs); B \<in> set (H # Hs); A \<noteq> B\<rbrakk> \<Longrightarrow> A \<inter> B \<subseteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>?A \<in> set (H # Hs); ?B \<in> set (H # Hs); ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<inter> ?B \<subseteq> 0

goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
with Cons(4-6)
[PROOF STATE]
proof (chain)
picking this:
G \<in> set (H # Hs)
G' \<in> set (H # Hs)
G \<noteq> G'
\<lbrakk>?A \<in> set (H # Hs); ?B \<in> set (H # Hs); ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<inter> ?B \<subseteq> 0
[PROOF STEP]
have "G \<inter> G' \<subseteq> 0"
[PROOF STATE]
proof (prove)
using this:
G \<in> set (H # Hs)
G' \<in> set (H # Hs)
G \<noteq> G'
\<lbrakk>?A \<in> set (H # Hs); ?B \<in> set (H # Hs); ?A \<noteq> ?B\<rbrakk> \<Longrightarrow> ?A \<inter> ?B \<subseteq> 0

goal (1 subgoal):
 1. G \<inter> G' \<subseteq> 0
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
G \<inter> G' \<subseteq> 0

goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
G \<inter> G' \<subseteq> 0

goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
from Cons(2,4,5)
[PROOF STATE]
proof (chain)
picking this:
\<forall>a\<in>set (H # Hs). AbGroup a
G \<in> set (H # Hs)
G' \<in> set (H # Hs)
[PROOF STEP]
have "0 \<subseteq> G \<inter> G'"
[PROOF STATE]
proof (prove)
using this:
\<forall>a\<in>set (H # Hs). AbGroup a
G \<in> set (H # Hs)
G' \<in> set (H # Hs)

goal (1 subgoal):
 1. 0 \<subseteq> G \<inter> G'
[PROOF STEP]
using AbGroup.zero_closed
[PROOF STATE]
proof (prove)
using this:
\<forall>a\<in>set (H # Hs). AbGroup a
G \<in> set (H # Hs)
G' \<in> set (H # Hs)
AbGroup ?G \<Longrightarrow> (0::?'g) \<in> ?G

goal (1 subgoal):
 1. 0 \<subseteq> G \<inter> G'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<subseteq> G \<inter> G'

goal (2 subgoals):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
 2. \<And>a Gs G G'. \<lbrakk>\<And>G G'. \<lbrakk>Ball (set Gs) AbGroup; add_independentS Gs; G \<in> set Gs; G' \<in> set Gs; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0; Ball (set (a # Gs)) AbGroup; add_independentS (a # Gs); G \<in> set (a # Gs); G' \<in> set (a # Gs); G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
G \<inter> G' \<subseteq> 0
0 \<subseteq> G \<inter> G'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
G \<inter> G' \<subseteq> 0
0 \<subseteq> G \<inter> G'

goal (1 subgoal):
 1. G \<inter> G' = 0
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
G \<inter> G' = 0

goal (1 subgoal):
 1. \<And>G G'. \<lbrakk>Ball (set []) AbGroup; add_independentS []; G \<in> set []; G' \<in> set []; G \<noteq> G'\<rbrakk> \<Longrightarrow> G \<inter> G' = 0
[PROOF STEP]
qed simp


[STATEMENT]
lemma real_of_ereal_mult[simp]:
  fixes a b :: ereal
  shows "real_of_ereal (a * b) = real_of_ereal a * real_of_ereal b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_ereal (a * b) = real_of_ereal a * real_of_ereal b
[PROOF STEP]
by (cases rule: ereal2_cases[of a b]) auto


[STATEMENT]
lemma comparator_of_rep [simp]: "comparator_of (rep_nat x) (rep_nat y) = comparator_of x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comparator_of (rep_nat x) (rep_nat y) = comparator_of x y
[PROOF STEP]
by (simp add: comparator_of_def linorder_class.comparator_of_def ord_iff rep_inj)


[STATEMENT]
lemma square_integrable_sum [simp]:
  assumes I: "finite I" "\<And>i. i \<in> I \<Longrightarrow> f i square_integrable S" and S: "S \<in> sets lebesgue"
  shows "(\<lambda>x. \<Sum>i\<in>I. f i x) square_integrable S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>I. f i x) square_integrable S
[PROOF STEP]
using I
[PROOF STATE]
proof (prove)
using this:
finite I
?i \<in> I \<Longrightarrow> f ?i square_integrable S

goal (1 subgoal):
 1. (\<lambda>x. \<Sum>i\<in>I. f i x) square_integrable S
[PROOF STEP]
by induction (simp_all add: S)


[STATEMENT]
lemma strict_subset_divisors_adds: "{c. c adds a} \<subset> {c. c adds b} \<longleftrightarrow> a adds b \<and> \<not> b adds a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({c. c adds a} \<subset> {c. c adds b}) = strict (adds) a b
[PROOF STEP]
by (auto simp add: subset_iff intro: adds_trans)


[STATEMENT]
lemma str_eq_alt: "\<approx>A = {(x, y). fold Deriv x A = fold Deriv y A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<approx>A = {(x, y). fold Deriv x A = fold Deriv y A}
[PROOF STEP]
unfolding str_eq_def set_eq_iff in_fold_Deriv
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. (x \<in> {(x, y). \<forall>z. (x @ z \<in> A) = (y @ z \<in> A)}) = (x \<in> {(x, y). \<forall>xa. (x @ xa \<in> A) = (y @ xa \<in> A)})
[PROOF STEP]
by simp


[STATEMENT]
lemma inf_less_eq:
  "x \<sqinter> y \<le> z \<longleftrightarrow> x \<le> z \<or> y \<le> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<sqinter> y \<le> z) = (x \<le> z \<or> y \<le> z)
[PROOF STEP]
by (metis inf.coboundedI1 inf.coboundedI2 inf_selective)


[STATEMENT]
lemma [code]: "bplustree_ls_isin (Leaf ks) x = bplustree_ls_isin_list x ks"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bplustree_ls_isin (Leaf ks) x = bplustree_ls_isin_list x ks
[PROOF STEP]
by (simp add: bplustree_ls_isin_list_def)


[STATEMENT]
lemma AbstFormP_subst [simp]:
     "(AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')
[PROOF STEP]
obtain s::name and k::name  where "atom s \<sharp> (v,i,x,x',t,j,k)" "atom k \<sharp> (v,i,x,x',t,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>s k. \<lbrakk>atom s \<sharp> (v, i, x, x', t, j, k); atom k \<sharp> (v, i, x, x', t, j)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis obtain_fresh)
[PROOF STATE]
proof (state)
this:
atom s \<sharp> (v, i, x, x', t, j, k)
atom k \<sharp> (v, i, x, x', t, j)

goal (1 subgoal):
 1. (AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
atom s \<sharp> (v, i, x, x', t, j, k)
atom k \<sharp> (v, i, x, x', t, j)

goal (1 subgoal):
 1. (AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')
[PROOF STEP]
by (auto simp: AbstFormP.simps [of s _ _ _ _ k])
[PROOF STATE]
proof (state)
this:
(AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma powser_zero [simp]: "(\<Sum>n. f n * 0 ^ n) = f 0"
  for f :: "nat \<Rightarrow> 'a::real_normed_algebra_1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. f n * (0::'a) ^ n) = f 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>n. f n * (0::'a) ^ n) = f 0
[PROOF STEP]
have "(\<Sum>n<1. f n * 0 ^ n) = (\<Sum>n. f n * 0 ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n<1. f n * (0::'a) ^ n) = (\<Sum>n. f n * (0::'a) ^ n)
[PROOF STEP]
by (subst suminf_finite[where N="{0}"]) (auto simp: power_0_left)
[PROOF STATE]
proof (state)
this:
(\<Sum>n<1. f n * (0::'a) ^ n) = (\<Sum>n. f n * (0::'a) ^ n)

goal (1 subgoal):
 1. (\<Sum>n. f n * (0::'a) ^ n) = f 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>n<1. f n * (0::'a) ^ n) = (\<Sum>n. f n * (0::'a) ^ n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>n<1. f n * (0::'a) ^ n) = (\<Sum>n. f n * (0::'a) ^ n)

goal (1 subgoal):
 1. (\<Sum>n. f n * (0::'a) ^ n) = f 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>n. f n * (0::'a) ^ n) = f 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subgroup_inverse_iff [simp]:
  "\<lbrakk> invertible x; x \<in> M \<rbrakk> \<Longrightarrow> inverse x \<in> G \<longleftrightarrow> x \<in> G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>invertible x; x \<in> M\<rbrakk> \<Longrightarrow> (inverse x \<in> G) = (x \<in> G)
[PROOF STEP]
using invertible_inverse_inverse sub.invertible_inverse_closed
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>invertible ?u; ?u \<in> M\<rbrakk> \<Longrightarrow> inverse (inverse ?u) = ?u
\<lbrakk>sub.invertible ?u; ?u \<in> G\<rbrakk> \<Longrightarrow> sub.inverse ?u \<in> G

goal (1 subgoal):
 1. \<lbrakk>invertible x; x \<in> M\<rbrakk> \<Longrightarrow> (inverse x \<in> G) = (x \<in> G)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma limpt_closed_imp_exploding_subsequence:\<comment>\<open>TODO: improve name?!\<close>
  fixes f::"'a::{heine_borel,real_normed_vector} \<Rightarrow> 'b::{first_countable_topology, t2_space}"
  assumes cont[THEN continuous_on_compose2, continuous_intros]: "continuous_on T f"
  assumes closed: "closed T"
  assumes bound: "\<And>t. t \<in> T \<Longrightarrow> f t \<noteq> l"
  assumes limpt: "l islimpt (f ` T)"
  obtains s where
    "(f \<circ> s) \<longlonglongrightarrow> l"
    "\<And>i. s i \<in> T"
    "\<And>C. compact C \<Longrightarrow> C \<subseteq> T \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from countable_basis_at_decseq[of l]
[PROOF STATE]
proof (chain)
picking this:
(\<And>A. \<lbrakk>\<And>i. open (A i); \<And>i. l \<in> A i; \<And>S. \<lbrakk>open S; l \<in> S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. A i \<subseteq> S\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
obtain A where A: "\<And>i. open (A i)" "\<And>i. l \<in> A i"
    and evA: "\<And>S. open S \<Longrightarrow> l \<in> S \<Longrightarrow> eventually (\<lambda>i. A i \<subseteq> S) sequentially"
[PROOF STATE]
proof (prove)
using this:
(\<And>A. \<lbrakk>\<And>i. open (A i); \<And>i. l \<in> A i; \<And>S. \<lbrakk>open S; l \<in> S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. A i \<subseteq> S\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>A. \<lbrakk>\<And>i. open (A i); \<And>i. l \<in> A i; \<And>S. \<lbrakk>open S; l \<in> S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. A i \<subseteq> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
open (A ?i)
l \<in> A ?i
\<lbrakk>open ?S; l \<in> ?S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. A i \<subseteq> ?S

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from closed_Union_compact_subsets[OF closed]
[PROOF STATE]
proof (chain)
picking this:
(\<And>F. \<lbrakk>\<And>n. compact (F n); \<And>n. F n \<subseteq> T; \<And>n. F n \<subseteq> F (Suc n); \<Union> (range F) = T; \<And>K. \<lbrakk>compact K; K \<subseteq> T\<rbrakk> \<Longrightarrow> \<exists>N. \<forall>n\<ge>N. K \<subseteq> F n\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
obtain C
    where C: "(\<And>n. compact (C n))" "(\<And>n. C n \<subseteq> T)" "(\<And>n. C n \<subseteq> C (Suc n))" "\<Union> (range C) = T"
      and evC: "(\<And>K. compact K \<Longrightarrow> K \<subseteq> T \<Longrightarrow> \<forall>\<^sub>F i in sequentially. K \<subseteq> C i)"
[PROOF STATE]
proof (prove)
using this:
(\<And>F. \<lbrakk>\<And>n. compact (F n); \<And>n. F n \<subseteq> T; \<And>n. F n \<subseteq> F (Suc n); \<Union> (range F) = T; \<And>K. \<lbrakk>compact K; K \<subseteq> T\<rbrakk> \<Longrightarrow> \<exists>N. \<forall>n\<ge>N. K \<subseteq> F n\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>C. \<lbrakk>\<And>n. compact (C n); \<And>n. C n \<subseteq> T; \<And>n. C n \<subseteq> C (Suc n); \<Union> (range C) = T; \<And>K. \<lbrakk>compact K; K \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. K \<subseteq> C i\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis eventually_sequentially)
[PROOF STATE]
proof (state)
this:
compact (C ?n)
C ?n \<subseteq> T
C ?n \<subseteq> C (Suc ?n)
\<Union> (range C) = T
\<lbrakk>compact ?K; ?K \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. ?K \<subseteq> C i

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have AC: "l \<in> A i - f ` C i" "open (A i - f ` C i)" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l \<in> A i - f ` C i &&& open (A i - f ` C i)
[PROOF STEP]
using C bound
[PROOF STATE]
proof (prove)
using this:
compact (C ?n)
C ?n \<subseteq> T
C ?n \<subseteq> C (Suc ?n)
\<Union> (range C) = T
?t \<in> T \<Longrightarrow> f ?t \<noteq> l

goal (1 subgoal):
 1. l \<in> A i - f ` C i &&& open (A i - f ` C i)
[PROOF STEP]
by (fastforce intro!: open_Diff A compact_imp_closed compact_continuous_image continuous_intros)+
[PROOF STATE]
proof (state)
this:
l \<in> A ?i - f ` C ?i
open (A ?i - f ` C ?i)

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from islimptE[OF limpt AC]
[PROOF STATE]
proof (chain)
picking this:
(\<And>y. \<lbrakk>y \<in> f ` T; y \<in> A ?i1 - f ` C ?i1; y \<noteq> l\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
have "\<exists>t\<in>T. f t \<in> A i - f ` C i \<and> f t \<noteq> l" for i
[PROOF STATE]
proof (prove)
using this:
(\<And>y. \<lbrakk>y \<in> f ` T; y \<in> A ?i1 - f ` C ?i1; y \<noteq> l\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<exists>t\<in>T. f t \<in> A i - f ` C i \<and> f t \<noteq> l
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>t\<in>T. f t \<in> A ?i - f ` C ?i \<and> f t \<noteq> l

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>t\<in>T. f t \<in> A ?i - f ` C ?i \<and> f t \<noteq> l
[PROOF STEP]
obtain t where t: "\<And>i. t i \<in> T" "\<And>i. f (t i) \<in> A i - f ` C i" "\<And>i. f (t i) \<noteq> l"
[PROOF STATE]
proof (prove)
using this:
\<exists>t\<in>T. f t \<in> A ?i - f ` C ?i \<and> f t \<noteq> l

goal (1 subgoal):
 1. (\<And>t. \<lbrakk>\<And>i. t i \<in> T; \<And>i. f (t i) \<in> A i - f ` C i; \<And>i. f (t i) \<noteq> l\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
t ?i \<in> T
f (t ?i) \<in> A ?i - f ` C ?i
f (t ?i) \<noteq> l

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "(f o t) \<longlonglongrightarrow> l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<circ> t) \<longlonglongrightarrow> l
[PROOF STEP]
using t
[PROOF STATE]
proof (prove)
using this:
t ?i \<in> T
f (t ?i) \<in> A ?i - f ` C ?i
f (t ?i) \<noteq> l

goal (1 subgoal):
 1. (f \<circ> t) \<longlonglongrightarrow> l
[PROOF STEP]
by (auto intro!: topological_tendstoI dest!: evA elim!: eventually_mono)
[PROOF STATE]
proof (state)
this:
(f \<circ> t) \<longlonglongrightarrow> l

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(f \<circ> t) \<longlonglongrightarrow> l

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "\<And>i. t i \<in> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. t i \<in> T
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
t ?i \<in> T

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
t ?i \<in> T

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "\<forall>\<^sub>F i in sequentially. t i \<notin> K" if "compact K" "K \<subseteq> T" for K
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F i in sequentially. t i \<notin> K
[PROOF STEP]
using evC[OF that]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F i in sequentially. K \<subseteq> C i

goal (1 subgoal):
 1. \<forall>\<^sub>F i in sequentially. t i \<notin> K
[PROOF STEP]
by eventually_elim (use t in auto)
[PROOF STATE]
proof (state)
this:
\<lbrakk>compact ?K; ?K \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. t i \<notin> ?K

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>(f \<circ> s) \<longlonglongrightarrow> l; \<And>i. s i \<in> T; \<And>C. \<lbrakk>compact C; C \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. s i \<notin> C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(f \<circ> t) \<longlonglongrightarrow> l
t ?i \<in> T
\<lbrakk>compact ?K; ?K \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. t i \<notin> ?K
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(f \<circ> t) \<longlonglongrightarrow> l
t ?i \<in> T
\<lbrakk>compact ?K; ?K \<subseteq> T\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F i in sequentially. t i \<notin> ?K

goal (1 subgoal):
 1. thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_polynomial_function_eq: "real_polynomial_function p = polynomial_function p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_polynomial_function p = polynomial_function p
[PROOF STEP]
unfolding polynomial_function_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_polynomial_function p = (\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. real_polynomial_function p \<Longrightarrow> \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p)
 2. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p) \<Longrightarrow> real_polynomial_function p
[PROOF STEP]
assume "real_polynomial_function p"
[PROOF STATE]
proof (state)
this:
real_polynomial_function p

goal (2 subgoals):
 1. real_polynomial_function p \<Longrightarrow> \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p)
 2. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p) \<Longrightarrow> real_polynomial_function p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real_polynomial_function p
[PROOF STEP]
show " \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p)"
[PROOF STATE]
proof (prove)
using this:
real_polynomial_function p

goal (1 subgoal):
 1. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p)
[PROOF STEP]
proof (induction p rule: real_polynomial_function.induct)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>f. bounded_linear f \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f)
 2. \<And>c. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. c))
 3. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a + g a))
 4. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
case (linear h)
[PROOF STATE]
proof (state)
this:
bounded_linear h

goal (4 subgoals):
 1. \<And>f. bounded_linear f \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f)
 2. \<And>c. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. c))
 3. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a + g a))
 4. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bounded_linear h
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
bounded_linear h

goal (1 subgoal):
 1. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> h)
[PROOF STEP]
by (auto simp: bounded_linear_compose real_polynomial_function.linear)
[PROOF STATE]
proof (state)
this:
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> h)

goal (3 subgoals):
 1. \<And>c. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. c))
 2. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a + g a))
 3. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>c. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. c))
 2. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a + g a))
 3. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
case (const h)
[PROOF STATE]
proof (state)
this:

goal (3 subgoals):
 1. \<And>c. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. c))
 2. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a + g a))
 3. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. h))
[PROOF STEP]
by (simp add: real_polynomial_function.const)
[PROOF STATE]
proof (state)
this:
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. h))

goal (2 subgoals):
 1. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a + g a))
 2. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a + g a))
 2. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
case (add h)
[PROOF STATE]
proof (state)
this:
real_polynomial_function h
real_polynomial_function g_
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> h)
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g_)

goal (2 subgoals):
 1. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a + g a))
 2. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real_polynomial_function h
real_polynomial_function g_
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> h)
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g_)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
real_polynomial_function h
real_polynomial_function g_
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> h)
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g_)

goal (1 subgoal):
 1. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. h a + g_ a))
[PROOF STEP]
by (force simp add: bounded_linear_def linear_add real_polynomial_function.add)
[PROOF STATE]
proof (state)
this:
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. h a + g_ a))

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
case (mult h)
[PROOF STATE]
proof (state)
this:
real_polynomial_function h
real_polynomial_function g_
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> h)
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g_)

goal (1 subgoal):
 1. \<And>f g. \<lbrakk>real_polynomial_function f; \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> f); real_polynomial_function g; \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g)\<rbrakk> \<Longrightarrow> \<forall>fa. bounded_linear fa \<longrightarrow> real_polynomial_function (fa \<circ> (\<lambda>a. f a * g a))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real_polynomial_function h
real_polynomial_function g_
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> h)
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g_)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
real_polynomial_function h
real_polynomial_function g_
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> h)
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> g_)

goal (1 subgoal):
 1. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. h a * g_ a))
[PROOF STEP]
by (force simp add: real_bounded_linear const real_polynomial_function.mult)
[PROOF STATE]
proof (state)
this:
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> (\<lambda>a. h a * g_ a))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p)

goal (1 subgoal):
 1. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p) \<Longrightarrow> real_polynomial_function p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p) \<Longrightarrow> real_polynomial_function p
[PROOF STEP]
assume [rule_format, OF bounded_linear_ident]: "\<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p)"
[PROOF STATE]
proof (state)
this:
real_polynomial_function ((\<lambda>x. x) \<circ> p)

goal (1 subgoal):
 1. \<forall>f. bounded_linear f \<longrightarrow> real_polynomial_function (f \<circ> p) \<Longrightarrow> real_polynomial_function p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
real_polynomial_function ((\<lambda>x. x) \<circ> p)
[PROOF STEP]
show "real_polynomial_function p"
[PROOF STATE]
proof (prove)
using this:
real_polynomial_function ((\<lambda>x. x) \<circ> p)

goal (1 subgoal):
 1. real_polynomial_function p
[PROOF STEP]
by (simp add: o_def)
[PROOF STATE]
proof (state)
this:
real_polynomial_function p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma space_dens_ctxt_measure_dens_ctxt_measure':
  assumes "x \<in> V"
  shows "space (state_measure V \<Gamma>) =
             {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V-{x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space (state_measure V \<Gamma>) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. space (state_measure V \<Gamma>) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
x \<in> V
[PROOF STEP]
have "insert x (V-{x}) = V"
[PROOF STATE]
proof (prove)
using this:
x \<in> V

goal (1 subgoal):
 1. insert x (V - {x}) = V
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
insert x (V - {x}) = V

goal (1 subgoal):
 1. space (state_measure V \<Gamma>) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
hence "state_measure V \<Gamma> = Pi\<^sub>M (insert x (V-{x})) (\<lambda>y. stock_measure (\<Gamma> y))"
[PROOF STATE]
proof (prove)
using this:
insert x (V - {x}) = V

goal (1 subgoal):
 1. state_measure V \<Gamma> = Pi\<^sub>M (insert x (V - {x})) (\<lambda>y. stock_measure (\<Gamma> y))
[PROOF STEP]
unfolding state_measure_def
[PROOF STATE]
proof (prove)
using this:
insert x (V - {x}) = V

goal (1 subgoal):
 1. Pi\<^sub>M V (\<lambda>x. stock_measure (\<Gamma> x)) = Pi\<^sub>M (insert x (V - {x})) (\<lambda>y. stock_measure (\<Gamma> y))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
state_measure V \<Gamma> = Pi\<^sub>M (insert x (V - {x})) (\<lambda>y. stock_measure (\<Gamma> y))

goal (1 subgoal):
 1. space (state_measure V \<Gamma>) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
state_measure V \<Gamma> = Pi\<^sub>M (insert x (V - {x})) (\<lambda>y. stock_measure (\<Gamma> y))

goal (1 subgoal):
 1. space (state_measure V \<Gamma>) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
have "space ... = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V-{x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space (Pi\<^sub>M (insert x (V - {x})) (\<lambda>y. stock_measure (\<Gamma> y))) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
unfolding state_measure_def space_PiM PiE_insert_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(y, g). g(x := y)) ` (space (stock_measure (\<Gamma> x)) \<times> (\<Pi>\<^sub>E i\<in>V - {x}. space (stock_measure (\<Gamma> i)))) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> (\<Pi>\<^sub>E i\<in>V - {x}. space (stock_measure (\<Gamma> i))) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
by (simp add: image_def Bex_def) blast
[PROOF STATE]
proof (state)
this:
space (Pi\<^sub>M (insert x (V - {x})) (\<lambda>y. stock_measure (\<Gamma> y))) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}

goal (1 subgoal):
 1. space (state_measure V \<Gamma>) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
space (state_measure V \<Gamma>) = {uu_. \<exists>\<sigma> y. uu_ = \<sigma>(x := y) \<and> \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
space (state_measure V \<Gamma>) = {uu_. \<exists>\<sigma> y. uu_ = \<sigma>(x := y) \<and> \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}

goal (1 subgoal):
 1. space (state_measure V \<Gamma>) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
space (state_measure V \<Gamma>) = {\<sigma>(x := y) |\<sigma> y. \<sigma> \<in> space (state_measure (V - {x}) \<Gamma>) \<and> y \<in> type_universe (\<Gamma> x)}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sort_rev_eq_sort: "distinct xs \<Longrightarrow> sort (rev xs) = sort xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct xs \<Longrightarrow> sort (rev xs) = sort xs
[PROOF STEP]
by (rule sorted_distinct_set_unique) auto


[STATEMENT]
lemma distinct_permute_list [simp]:
  assumes "f permutes {..<length xs}"
  shows "distinct (permute_list f xs) = distinct xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (permute_list f xs) = distinct xs
[PROOF STEP]
by (simp add: distinct_count_atmost_1 assms)


[STATEMENT]
lemma tllist_all2_TCons2:
  "tllist_all2 P Q ts' (TCons x ts) \<longleftrightarrow> (\<exists>x' ts''. ts' = TCons x' ts'' \<and> P x' x \<and> tllist_all2 P Q ts'' ts)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tllist_all2 P Q ts' (TCons x ts) = (\<exists>x' ts''. ts' = TCons x' ts'' \<and> P x' x \<and> tllist_all2 P Q ts'' ts)
[PROOF STEP]
by transfer(fastforce simp add: llist_all2_LCons2 dest: llist_all2_lfiniteD)


[STATEMENT]
lemma no_bounded_connected_component_imp_winding_number_zero:
  assumes g: "path g" "path_image g \<subseteq> S" "pathfinish g = pathstart g" "z \<notin> S"
      and nb: "\<And>z. bounded (connected_component_set (- S) z) \<Longrightarrow> z \<in> S"
    shows "winding_number g z = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. winding_number g z = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. winding_number g z = 0
[PROOF STEP]
have "z \<in> outside (path_image g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> outside (path_image g)
[PROOF STEP]
by (metis nb [of z] \<open>path_image g \<subseteq> S\<close> \<open>z \<notin> S\<close> subsetD mem_Collect_eq outside outside_mono)
[PROOF STATE]
proof (state)
this:
z \<in> outside (path_image g)

goal (1 subgoal):
 1. winding_number g z = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<in> outside (path_image g)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
z \<in> outside (path_image g)

goal (1 subgoal):
 1. winding_number g z = 0
[PROOF STEP]
by (simp add: g winding_number_zero_in_outside)
[PROOF STATE]
proof (state)
this:
winding_number g z = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sum_over_permutations_insert:
  assumes fS: "finite S"
    and aS: "a \<notin> S"
  shows "sum f {p. p permutes (insert a S)} =
    sum (\<lambda>b. sum (\<lambda>q. f (transpose a b \<circ> q)) {p. p permutes S}) (insert a S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f {p. p permutes insert a S} = (\<Sum>b\<in>insert a S. \<Sum>q\<in>{p. p permutes S}. f (Transposition.transpose a b \<circ> q))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum f {p. p permutes insert a S} = (\<Sum>b\<in>insert a S. \<Sum>q\<in>{p. p permutes S}. f (Transposition.transpose a b \<circ> q))
[PROOF STEP]
have *: "\<And>f a b. (\<lambda>(b, p). f (transpose a b \<circ> p)) = f \<circ> (\<lambda>(b,p). transpose a b \<circ> p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f a b. (\<lambda>(b, p). f (Transposition.transpose a b \<circ> p)) = f \<circ> (\<lambda>(b, p). Transposition.transpose a b \<circ> p)
[PROOF STEP]
by (simp add: fun_eq_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>(b, p). ?f (Transposition.transpose ?a b \<circ> p)) = ?f \<circ> (\<lambda>(b, p). Transposition.transpose ?a b \<circ> p)

goal (1 subgoal):
 1. sum f {p. p permutes insert a S} = (\<Sum>b\<in>insert a S. \<Sum>q\<in>{p. p permutes S}. f (Transposition.transpose a b \<circ> q))
[PROOF STEP]
have **: "\<And>P Q. {(a, b). a \<in> P \<and> b \<in> Q} = P \<times> Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>P Q. {(a, b). a \<in> P \<and> b \<in> Q} = P \<times> Q
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{(a, b). a \<in> ?P1 \<and> b \<in> ?Q1} = ?P1 \<times> ?Q1

goal (1 subgoal):
 1. sum f {p. p permutes insert a S} = (\<Sum>b\<in>insert a S. \<Sum>q\<in>{p. p permutes S}. f (Transposition.transpose a b \<circ> q))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f {p. p permutes insert a S} = (\<Sum>b\<in>insert a S. \<Sum>q\<in>{p. p permutes S}. f (Transposition.transpose a b \<circ> q))
[PROOF STEP]
unfolding * ** sum.cartesian_product permutes_insert
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f ((\<lambda>(b, y). Transposition.transpose a b \<circ> y) ` (insert a S \<times> {p. p permutes S})) = sum (f \<circ> (\<lambda>(b, y). Transposition.transpose a b \<circ> y)) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
proof (rule sum.reindex)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
let ?f = "(\<lambda>(b, y). transpose a b \<circ> y)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
let ?P = "{p. p permutes S}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
fix b c p q
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
assume b: "b \<in> insert a S"
[PROOF STATE]
proof (state)
this:
b \<in> insert a S

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
assume c: "c \<in> insert a S"
[PROOF STATE]
proof (state)
this:
c \<in> insert a S

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
assume p: "p permutes S"
[PROOF STATE]
proof (state)
this:
p permutes S

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
assume q: "q permutes S"
[PROOF STATE]
proof (state)
this:
q permutes S

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
assume eq: "transpose a b \<circ> p = transpose a c \<circ> q"
[PROOF STATE]
proof (state)
this:
Transposition.transpose a b \<circ> p = Transposition.transpose a c \<circ> q

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
from p q aS
[PROOF STATE]
proof (chain)
picking this:
p permutes S
q permutes S
a \<notin> S
[PROOF STEP]
have pa: "p a = a" and qa: "q a = a"
[PROOF STATE]
proof (prove)
using this:
p permutes S
q permutes S
a \<notin> S

goal (1 subgoal):
 1. p a = a &&& q a = a
[PROOF STEP]
unfolding permutes_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>x. x \<notin> S \<longrightarrow> p x = x) \<and> (\<forall>y. \<exists>!x. p x = y)
(\<forall>x. x \<notin> S \<longrightarrow> q x = x) \<and> (\<forall>y. \<exists>!x. q x = y)
a \<notin> S

goal (1 subgoal):
 1. p a = a &&& q a = a
[PROOF STEP]
by metis+
[PROOF STATE]
proof (state)
this:
p a = a
q a = a

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
from eq
[PROOF STATE]
proof (chain)
picking this:
Transposition.transpose a b \<circ> p = Transposition.transpose a c \<circ> q
[PROOF STEP]
have "(transpose a b \<circ> p) a  = (transpose a c \<circ> q) a"
[PROOF STATE]
proof (prove)
using this:
Transposition.transpose a b \<circ> p = Transposition.transpose a c \<circ> q

goal (1 subgoal):
 1. (Transposition.transpose a b \<circ> p) a = (Transposition.transpose a c \<circ> q) a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(Transposition.transpose a b \<circ> p) a = (Transposition.transpose a c \<circ> q) a

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(Transposition.transpose a b \<circ> p) a = (Transposition.transpose a c \<circ> q) a
[PROOF STEP]
have bc: "b = c"
[PROOF STATE]
proof (prove)
using this:
(Transposition.transpose a b \<circ> p) a = (Transposition.transpose a c \<circ> q) a

goal (1 subgoal):
 1. b = c
[PROOF STEP]
by (simp add: permutes_def pa qa o_def fun_upd_def id_def
            cong del: if_weak_cong split: if_split_asm)
[PROOF STATE]
proof (state)
this:
b = c

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
from eq[unfolded bc]
[PROOF STATE]
proof (chain)
picking this:
Transposition.transpose a c \<circ> p = Transposition.transpose a c \<circ> q
[PROOF STEP]
have "(\<lambda>p. transpose a c \<circ> p) (transpose a c \<circ> p) =
        (\<lambda>p. transpose a c \<circ> p) (transpose a c \<circ> q)"
[PROOF STATE]
proof (prove)
using this:
Transposition.transpose a c \<circ> p = Transposition.transpose a c \<circ> q

goal (1 subgoal):
 1. Transposition.transpose a c \<circ> (Transposition.transpose a c \<circ> p) = Transposition.transpose a c \<circ> (Transposition.transpose a c \<circ> q)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Transposition.transpose a c \<circ> (Transposition.transpose a c \<circ> p) = Transposition.transpose a c \<circ> (Transposition.transpose a c \<circ> q)

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Transposition.transpose a c \<circ> (Transposition.transpose a c \<circ> p) = Transposition.transpose a c \<circ> (Transposition.transpose a c \<circ> q)
[PROOF STEP]
have "p = q"
[PROOF STATE]
proof (prove)
using this:
Transposition.transpose a c \<circ> (Transposition.transpose a c \<circ> p) = Transposition.transpose a c \<circ> (Transposition.transpose a c \<circ> q)

goal (1 subgoal):
 1. p = q
[PROOF STEP]
unfolding o_assoc swap_id_idempotent
[PROOF STATE]
proof (prove)
using this:
Transposition.transpose a c \<circ> Transposition.transpose a c \<circ> p = Transposition.transpose a c \<circ> Transposition.transpose a c \<circ> q

goal (1 subgoal):
 1. p = q
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
p = q

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
with bc
[PROOF STATE]
proof (chain)
picking this:
b = c
p = q
[PROOF STEP]
have "b = c \<and> p = q"
[PROOF STATE]
proof (prove)
using this:
b = c
p = q

goal (1 subgoal):
 1. b = c \<and> p = q
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
b = c \<and> p = q

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>?b5 \<in> insert a S; ?c5 \<in> insert a S; ?p5 permutes S; ?q5 permutes S; Transposition.transpose a ?b5 \<circ> ?p5 = Transposition.transpose a ?c5 \<circ> ?q5\<rbrakk> \<Longrightarrow> ?b5 = ?c5 \<and> ?p5 = ?q5

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?b5 \<in> insert a S; ?c5 \<in> insert a S; ?p5 permutes S; ?q5 permutes S; Transposition.transpose a ?b5 \<circ> ?p5 = Transposition.transpose a ?c5 \<circ> ?q5\<rbrakk> \<Longrightarrow> ?b5 = ?c5 \<and> ?p5 = ?q5
[PROOF STEP]
show "inj_on ?f (insert a S \<times> ?P)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?b5 \<in> insert a S; ?c5 \<in> insert a S; ?p5 permutes S; ?q5 permutes S; Transposition.transpose a ?b5 \<circ> ?p5 = Transposition.transpose a ?c5 \<circ> ?q5\<rbrakk> \<Longrightarrow> ?b5 = ?c5 \<and> ?p5 = ?q5

goal (1 subgoal):
 1. inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})
[PROOF STEP]
unfolding inj_on_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?b5 \<in> insert a S; ?c5 \<in> insert a S; ?p5 permutes S; ?q5 permutes S; Transposition.transpose a ?b5 \<circ> ?p5 = Transposition.transpose a ?c5 \<circ> ?q5\<rbrakk> \<Longrightarrow> ?b5 = ?c5 \<and> ?p5 = ?q5

goal (1 subgoal):
 1. \<forall>x\<in>insert a S \<times> {p. p permutes S}. \<forall>y\<in>insert a S \<times> {p. p permutes S}. (case x of (b, x) \<Rightarrow> Transposition.transpose a b \<circ> x) = (case y of (b, x) \<Rightarrow> Transposition.transpose a b \<circ> x) \<longrightarrow> x = y
[PROOF STEP]
by clarify metis
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>(b, y). Transposition.transpose a b \<circ> y) (insert a S \<times> {p. p permutes S})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sum f {p. p permutes insert a S} = (\<Sum>b\<in>insert a S. \<Sum>q\<in>{p. p permutes S}. f (Transposition.transpose a b \<circ> q))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ord_recp_total: "\<exists>y. ord_recp T G H x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. ord_recp T G H x y
[PROOF STEP]
proof (cases "Ord x")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Ord x \<Longrightarrow> \<exists>y. ord_recp T G H x y
 2. \<not> Ord x \<Longrightarrow> \<exists>y. ord_recp T G H x y
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
Ord x

goal (2 subgoals):
 1. Ord x \<Longrightarrow> \<exists>y. ord_recp T G H x y
 2. \<not> Ord x \<Longrightarrow> \<exists>y. ord_recp T G H x y
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Ord x

goal (1 subgoal):
 1. \<exists>y. ord_recp T G H x y
[PROOF STEP]
proof (induct x rule: Ord_induct2)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>y. ord_recp T G H 0 y
 2. \<And>k. \<lbrakk>Ord k; \<exists>y. ord_recp T G H k y\<rbrakk> \<Longrightarrow> \<exists>y. ord_recp T G H (succ k) y
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<exists>y. ord_recp T G H 0 y
 2. \<And>k. \<lbrakk>Ord k; \<exists>y. ord_recp T G H k y\<rbrakk> \<Longrightarrow> \<exists>y. ord_recp T G H (succ k) y
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. ord_recp T G H 0 y
[PROOF STEP]
by (simp add: ord_recp_def)
[PROOF STATE]
proof (state)
this:
\<exists>y. ord_recp T G H 0 y

goal (1 subgoal):
 1. \<And>k. \<lbrakk>Ord k; \<exists>y. ord_recp T G H k y\<rbrakk> \<Longrightarrow> \<exists>y. ord_recp T G H (succ k) y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. \<lbrakk>Ord k; \<exists>y. ord_recp T G H k y\<rbrakk> \<Longrightarrow> \<exists>y. ord_recp T G H (succ k) y
[PROOF STEP]
case (succ x)
[PROOF STATE]
proof (state)
this:
Ord x
\<exists>y. ord_recp T G H x y

goal (1 subgoal):
 1. \<And>k. \<lbrakk>Ord k; \<exists>y. ord_recp T G H k y\<rbrakk> \<Longrightarrow> \<exists>y. ord_recp T G H (succ k) y
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
Ord x
\<exists>y. ord_recp T G H x y

goal (1 subgoal):
 1. \<exists>y. ord_recp T G H (succ x) y
[PROOF STEP]
by (metis ord_recp_succ_iff)
[PROOF STATE]
proof (state)
this:
\<exists>y. ord_recp T G H (succ x) y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>y. ord_recp T G H x y

goal (1 subgoal):
 1. \<not> Ord x \<Longrightarrow> \<exists>y. ord_recp T G H x y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> Ord x \<Longrightarrow> \<exists>y. ord_recp T G H x y
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> Ord x

goal (1 subgoal):
 1. \<not> Ord x \<Longrightarrow> \<exists>y. ord_recp T G H x y
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> Ord x

goal (1 subgoal):
 1. \<exists>y. ord_recp T G H x y
[PROOF STEP]
by (auto simp: ord_recp_def)
[PROOF STATE]
proof (state)
this:
\<exists>y. ord_recp T G H x y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma well_founded_singleton:
  assumes "\<not>r x x" shows "well_founded {x} r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. well_founded {x} r
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<not> r x x

goal (1 subgoal):
 1. well_founded {x} r
[PROOF STEP]
by (auto simp: well_founded_iff_ex_extremal)


[STATEMENT]
lemma (in -) funpow_dist1_less_f:
  assumes "b \<in> orbit f a" "a \<in> orbit f a" "a \<noteq> b"
  shows "funpow_dist1 f a b < funpow_dist1 f a (f b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. funpow_dist1 f a b < funpow_dist1 f a (f b)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
b \<in> orbit f a
a \<in> orbit f a
a \<noteq> b

goal (1 subgoal):
 1. funpow_dist1 f a b < funpow_dist1 f a (f b)
[PROOF STEP]
by (simp add: funpow_dist1_f_eq)


[STATEMENT]
lemma "(Abs_perm id :: 'a perm) \<bullet> id = id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. atom_fun_permute.permute_fun (Abs_perm id) id = id
[PROOF STEP]
unfolding atom_fun_permute.permute_fun_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. permute_atom (Abs_perm id) (id (permute_atom (- Abs_perm id) x))) = id
[PROOF STEP]
unfolding permute_atom_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. Rep_perm (Abs_perm id) (id (Rep_perm (- Abs_perm id) x))) = id
[PROOF STEP]
by (metis Rep_perm_0 id_def inj_imp_inv_eq inj_on_id uminus_perm_def zero_perm_def)


[STATEMENT]
lemma comp_unique: "unique (comp G) = unique G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unique (TranslComp.comp G) = unique G
[PROOF STEP]
apply (simp add: comp_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unique (map (compClass G) G) = unique G
[PROOF STEP]
apply (rule unique_map_fst)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> set G \<Longrightarrow> fst x = fst (compClass G x)
[PROOF STEP]
apply (simp add: compClass_def split_beta)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done