[STATEMENT]
lemma iso_sum_groupI:
  assumes iso: "\<And>i. i \<in> I \<Longrightarrow> G i \<cong> H i"
    and G: "\<And>i. i \<in> I \<Longrightarrow> group (G i)" and H: "\<And>i. i \<in> I \<Longrightarrow> group (H i)"
  shows "sum_group I G \<cong> sum_group I H" (is "?IG \<cong> ?IH")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
have "\<And>i. i \<in> I \<Longrightarrow> \<exists>h. h \<in> iso (G i) (H i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>h. h \<in> Group.iso (G i) (H i)
[PROOF STEP]
using iso
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> G ?i \<cong> H ?i

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>h. h \<in> Group.iso (G i) (H i)
[PROOF STEP]
by (auto simp: is_iso_def)
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> \<exists>h. h \<in> Group.iso (G ?i) (H ?i)

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> \<exists>h. h \<in> Group.iso (G ?i) (H ?i)
[PROOF STEP]
obtain f where f: "\<And>i. i \<in> I \<Longrightarrow> f i \<in> iso (G i) (H i)"
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> \<exists>h. h \<in> Group.iso (G ?i) (H ?i)

goal (1 subgoal):
 1. (\<And>f. (\<And>i. i \<in> I \<Longrightarrow> f i \<in> Group.iso (G i) (H i)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)
[PROOF STEP]
have injf: "inj_on (f i) (carrier (G i))"
    and homf: "f i \<in> hom (G i) (H i)" if "i \<in> I" for i
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)

goal (1 subgoal):
 1. inj_on (f i) (carrier (G i)) &&& f i \<in> hom (G i) (H i)
[PROOF STEP]
using \<open>i \<in> I\<close> f
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)
i \<in> I
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)

goal (1 subgoal):
 1. inj_on (f i) (carrier (G i)) &&& f i \<in> hom (G i) (H i)
[PROOF STEP]
by (auto simp: iso_def bij_betw_def)
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> inj_on (f ?i) (carrier (G ?i))
?i \<in> I \<Longrightarrow> f ?i \<in> hom (G ?i) (H ?i)

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> inj_on (f ?i) (carrier (G ?i))
?i \<in> I \<Longrightarrow> f ?i \<in> hom (G ?i) (H ?i)
[PROOF STEP]
have one: "\<And>x. \<lbrakk>f i x = \<one>\<^bsub>H i\<^esub>; x \<in> carrier (G i)\<rbrakk> \<Longrightarrow> x = \<one>\<^bsub>G i\<^esub>" if "i \<in> I" for i
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> inj_on (f ?i) (carrier (G ?i))
?i \<in> I \<Longrightarrow> f ?i \<in> hom (G ?i) (H ?i)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>f i x = \<one>\<^bsub>H i\<^esub>; x \<in> carrier (G i)\<rbrakk> \<Longrightarrow> x = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
by (metis G H group.subgroup_self hom_one inj_on_eq_iff subgroup.one_closed that)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i1 \<in> I; f ?i1 ?x = \<one>\<^bsub>H ?i1\<^esub>; ?x \<in> carrier (G ?i1)\<rbrakk> \<Longrightarrow> ?x = \<one>\<^bsub>G ?i1\<^esub>

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
have fin1: "finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>} \<Longrightarrow> finite {i \<in> I. f i (x i) \<noteq> \<one>\<^bsub>H i\<^esub>}" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>} \<Longrightarrow> finite {i \<in> I. f i (x i) \<noteq> \<one>\<^bsub>H i\<^esub>}
[PROOF STEP]
using homf
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> hom (G ?i) (H ?i)

goal (1 subgoal):
 1. finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>} \<Longrightarrow> finite {i \<in> I. f i (x i) \<noteq> \<one>\<^bsub>H i\<^esub>}
[PROOF STEP]
by (auto simp: G H hom_one elim!: rev_finite_subset)
[PROOF STATE]
proof (state)
this:
finite {i \<in> I. ?x i \<noteq> \<one>\<^bsub>G i\<^esub>} \<Longrightarrow> finite {i \<in> I. f i (?x i) \<noteq> \<one>\<^bsub>H i\<^esub>}

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
define h where "h \<equiv> \<lambda>x. (\<lambda>i\<in>I. f i (x i))"
[PROOF STATE]
proof (state)
this:
h \<equiv> \<lambda>x. \<lambda>i\<in>I. f i (x i)

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
have hom: "h \<in> iso ?IG ?IH"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h \<in> Group.iso (sum_group I G) (sum_group I H)
[PROOF STEP]
proof (rule isoI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. h \<in> hom (sum_group I G) (sum_group I H)
 2. bij_betw h (carrier (sum_group I G)) (carrier (sum_group I H))
[PROOF STEP]
show hom: "h \<in> hom ?IG ?IH"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h \<in> hom (sum_group I G) (sum_group I H)
[PROOF STEP]
proof (rule homI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> carrier (sum_group I G) \<Longrightarrow> h x \<in> carrier (sum_group I H)
 2. \<And>x y. \<lbrakk>x \<in> carrier (sum_group I G); y \<in> carrier (sum_group I G)\<rbrakk> \<Longrightarrow> h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> carrier (sum_group I G) \<Longrightarrow> h x \<in> carrier (sum_group I H)
 2. \<And>x y. \<lbrakk>x \<in> carrier (sum_group I G); y \<in> carrier (sum_group I G)\<rbrakk> \<Longrightarrow> h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y
[PROOF STEP]
assume "x \<in> carrier ?IG"
[PROOF STATE]
proof (state)
this:
x \<in> carrier (sum_group I G)

goal (2 subgoals):
 1. \<And>x. x \<in> carrier (sum_group I G) \<Longrightarrow> h x \<in> carrier (sum_group I H)
 2. \<And>x y. \<lbrakk>x \<in> carrier (sum_group I G); y \<in> carrier (sum_group I G)\<rbrakk> \<Longrightarrow> h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y
[PROOF STEP]
with f fin1
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)
finite {i \<in> I. ?x i \<noteq> \<one>\<^bsub>G i\<^esub>} \<Longrightarrow> finite {i \<in> I. f i (?x i) \<noteq> \<one>\<^bsub>H i\<^esub>}
x \<in> carrier (sum_group I G)
[PROOF STEP]
show "h x \<in> carrier ?IH"
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)
finite {i \<in> I. ?x i \<noteq> \<one>\<^bsub>G i\<^esub>} \<Longrightarrow> finite {i \<in> I. f i (?x i) \<noteq> \<one>\<^bsub>H i\<^esub>}
x \<in> carrier (sum_group I G)

goal (1 subgoal):
 1. h x \<in> carrier (sum_group I H)
[PROOF STEP]
by (force simp: h_def PiE_def iso_def hom_def carrier_sum_group assms conj_commute cong: conj_cong)
[PROOF STATE]
proof (state)
this:
h x \<in> carrier (sum_group I H)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier (sum_group I G); y \<in> carrier (sum_group I G)\<rbrakk> \<Longrightarrow> h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier (sum_group I G); y \<in> carrier (sum_group I G)\<rbrakk> \<Longrightarrow> h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier (sum_group I G); y \<in> carrier (sum_group I G)\<rbrakk> \<Longrightarrow> h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y
[PROOF STEP]
assume "x \<in> carrier ?IG" "y \<in> carrier ?IG"
[PROOF STATE]
proof (state)
this:
x \<in> carrier (sum_group I G)
y \<in> carrier (sum_group I G)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier (sum_group I G); y \<in> carrier (sum_group I G)\<rbrakk> \<Longrightarrow> h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y
[PROOF STEP]
with homf
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> f ?i \<in> hom (G ?i) (H ?i)
x \<in> carrier (sum_group I G)
y \<in> carrier (sum_group I G)
[PROOF STEP]
show "h (x \<otimes>\<^bsub>?IG\<^esub> y) = h x \<otimes>\<^bsub>?IH\<^esub> h y"
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> hom (G ?i) (H ?i)
x \<in> carrier (sum_group I G)
y \<in> carrier (sum_group I G)

goal (1 subgoal):
 1. h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y
[PROOF STEP]
by (fastforce simp add: h_def PiE_def hom_def carrier_sum_group assms intro: restrict_ext)
[PROOF STATE]
proof (state)
this:
h (x \<otimes>\<^bsub>sum_group I G\<^esub> y) = h x \<otimes>\<^bsub>sum_group I H\<^esub> h y

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
h \<in> hom (sum_group I G) (sum_group I H)

goal (1 subgoal):
 1. bij_betw h (carrier (sum_group I G)) (carrier (sum_group I H))
[PROOF STEP]
with G H
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> Group.group (G ?i)
?i \<in> I \<Longrightarrow> Group.group (H ?i)
h \<in> hom (sum_group I G) (sum_group I H)
[PROOF STEP]
interpret GH : group_hom "?IG" "?IH" h
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> Group.group (G ?i)
?i \<in> I \<Longrightarrow> Group.group (H ?i)
h \<in> hom (sum_group I G) (sum_group I H)

goal (1 subgoal):
 1. group_hom (sum_group I G) (sum_group I H) h
[PROOF STEP]
by (simp add: group_hom_def group_hom_axioms_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bij_betw h (carrier (sum_group I G)) (carrier (sum_group I H))
[PROOF STEP]
show "bij_betw h (carrier ?IG) (carrier ?IH)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw h (carrier (sum_group I G)) (carrier (sum_group I H))
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on h (carrier (sum_group I G)) \<and> h ` carrier (sum_group I G) = carrier (sum_group I H)
[PROOF STEP]
proof (intro conjI subset_antisym)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. inj_on h (carrier (sum_group I G))
 2. h ` carrier (sum_group I G) \<subseteq> carrier (sum_group I H)
 3. carrier (sum_group I H) \<subseteq> h ` carrier (sum_group I G)
[PROOF STEP]
have \<gamma>: "\<gamma> i = \<one>\<^bsub>G i\<^esub>"
        if "\<gamma> \<in> (\<Pi>\<^sub>E i\<in>I. carrier (G i))" and eq: "(\<lambda>i\<in>I. f i (\<gamma> i)) = (\<lambda>i\<in>I. \<one>\<^bsub>H i\<^esub>)" and "i \<in> I"
        for \<gamma> i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<gamma> i = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
using \<open>i \<in> I\<close> one that
[PROOF STATE]
proof (prove)
using this:
i \<in> I
\<lbrakk>?i1 \<in> I; f ?i1 ?x = \<one>\<^bsub>H ?i1\<^esub>; ?x \<in> carrier (G ?i1)\<rbrakk> \<Longrightarrow> ?x = \<one>\<^bsub>G ?i1\<^esub>
\<gamma> \<in> (\<Pi>\<^sub>E i\<in>I. carrier (G i))
(\<lambda>i\<in>I. f i (\<gamma> i)) = (\<lambda>i\<in>I. \<one>\<^bsub>H i\<^esub>)
i \<in> I

goal (1 subgoal):
 1. \<gamma> i = \<one>\<^bsub>G i\<^esub>
[PROOF STEP]
by (simp add: fun_eq_iff) (meson PiE_iff)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?\<gamma> \<in> (\<Pi>\<^sub>E i\<in>I. carrier (G i)); (\<lambda>i\<in>I. f i (?\<gamma> i)) = (\<lambda>i\<in>I. \<one>\<^bsub>H i\<^esub>); ?i \<in> I\<rbrakk> \<Longrightarrow> ?\<gamma> ?i = \<one>\<^bsub>G ?i\<^esub>

goal (3 subgoals):
 1. inj_on h (carrier (sum_group I G))
 2. h ` carrier (sum_group I G) \<subseteq> carrier (sum_group I H)
 3. carrier (sum_group I H) \<subseteq> h ` carrier (sum_group I G)
[PROOF STEP]
show "inj_on h (carrier ?IG)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on h (carrier (sum_group I G))
[PROOF STEP]
apply (simp add: iso_def bij_betw_def GH.inj_on_one_iff assms one flip: carrier_sum_group)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. x \<in> carrier (sum_group I G) \<longrightarrow> h x = (\<lambda>i\<in>I. \<one>\<^bsub>H i\<^esub>) \<longrightarrow> x = (\<lambda>i\<in>I. \<one>\<^bsub>G i\<^esub>)
[PROOF STEP]
apply (auto simp: h_def fun_eq_iff carrier_sum_group assms PiE_def Pi_def extensional_def one)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
inj_on h (carrier (sum_group I G))

goal (2 subgoals):
 1. h ` carrier (sum_group I G) \<subseteq> carrier (sum_group I H)
 2. carrier (sum_group I H) \<subseteq> h ` carrier (sum_group I G)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. h ` carrier (sum_group I G) \<subseteq> carrier (sum_group I H)
 2. carrier (sum_group I H) \<subseteq> h ` carrier (sum_group I G)
[PROOF STEP]
show "h ` carrier ?IG \<subseteq> carrier ?IH"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h ` carrier (sum_group I G) \<subseteq> carrier (sum_group I H)
[PROOF STEP]
using homf GH.hom_closed
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> hom (G ?i) (H ?i)
?x \<in> carrier (sum_group I G) \<Longrightarrow> h ?x \<in> carrier (sum_group I H)

goal (1 subgoal):
 1. h ` carrier (sum_group I G) \<subseteq> carrier (sum_group I H)
[PROOF STEP]
by (fastforce simp: h_def PiE_def Pi_def dest!: bij_betwE)
[PROOF STATE]
proof (state)
this:
h ` carrier (sum_group I G) \<subseteq> carrier (sum_group I H)

goal (1 subgoal):
 1. carrier (sum_group I H) \<subseteq> h ` carrier (sum_group I G)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. carrier (sum_group I H) \<subseteq> h ` carrier (sum_group I G)
[PROOF STEP]
show "carrier ?IH \<subseteq> h ` carrier ?IG"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (sum_group I H) \<subseteq> h ` carrier (sum_group I G)
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (sum_group I H) \<subseteq> (\<lambda>x. \<lambda>i\<in>I. f i (x i)) ` carrier (sum_group I G)
[PROOF STEP]
proof (clarsimp simp: iso_def bij_betw_def carrier_sum_group assms)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i)); finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. \<lambda>i\<in>I. f i (x i)) ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i)); finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. \<lambda>i\<in>I. f i (x i)) ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
assume x: "x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i))" and fin: "finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}"
[PROOF STATE]
proof (state)
this:
x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i))
finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i)); finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. \<lambda>i\<in>I. f i (x i)) ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
with f
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)
x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i))
finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}
[PROOF STEP]
have xf: "x \<in> (\<Pi>\<^sub>E i\<in>I. f i ` carrier (G i))"
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)
x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i))
finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}

goal (1 subgoal):
 1. x \<in> (\<Pi>\<^sub>E i\<in>I. f i ` carrier (G i))
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)
x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i))
finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}

goal (1 subgoal):
 1. x \<in> (\<Pi>\<^sub>E i\<in>I. f i ` carrier (G i))
[PROOF STEP]
by (auto simp: iso_def bij_betw_def)
[PROOF STATE]
proof (state)
this:
x \<in> (\<Pi>\<^sub>E i\<in>I. f i ` carrier (G i))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i)); finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. \<lambda>i\<in>I. f i (x i)) ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
have "\<And>i. i \<in> I \<Longrightarrow> inj_on (f i) (carrier (G i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> inj_on (f i) (carrier (G i))
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> f ?i \<in> Group.iso (G ?i) (H ?i)

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> inj_on (f i) (carrier (G i))
[PROOF STEP]
by (auto simp: iso_def bij_betw_def)
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> inj_on (f ?i) (carrier (G ?i))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i)); finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. \<lambda>i\<in>I. f i (x i)) ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
let ?g = "\<lambda>i\<in>I. inv_into (carrier (G i)) (f i) (x i)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i)); finite {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. \<lambda>i\<in>I. f i (x i)) ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
show "x \<in> (\<lambda>g. \<lambda>i\<in>I. f i (g i))
                 ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> (\<lambda>g. \<lambda>i\<in>I. f i (g i)) ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = (\<lambda>i\<in>I. f i (?x i))
 2. ?x \<in> {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
show xeq: "x = (\<lambda>i\<in>I. f i (?g i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = (\<lambda>i\<in>I. f i ((\<lambda>i\<in>I. inv_into (carrier (G i)) (f i) (x i)) i))
[PROOF STEP]
using x
[PROOF STATE]
proof (prove)
using this:
x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i))

goal (1 subgoal):
 1. x = (\<lambda>i\<in>I. f i ((\<lambda>i\<in>I. inv_into (carrier (G i)) (f i) (x i)) i))
[PROOF STEP]
by (clarsimp simp: PiE_iff fun_eq_iff extensional_def) (metis iso_iff f_inv_into_f f)
[PROOF STATE]
proof (state)
this:
x = (\<lambda>i\<in>I. f i ((\<lambda>i\<in>I. inv_into (carrier (G i)) (f i) (x i)) i))

goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv_into (carrier (G i)) (f i) (x i)) \<in> {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
have "finite {i \<in> I. inv_into (carrier (G i)) (f i) (x i) \<noteq> \<one>\<^bsub>G i\<^esub>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {i \<in> I. inv_into (carrier (G i)) (f i) (x i) \<noteq> \<one>\<^bsub>G i\<^esub>}
[PROOF STEP]
apply (rule finite_subset [OF _ fin])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {i \<in> I. inv_into (carrier (G i)) (f i) (x i) \<noteq> \<one>\<^bsub>G i\<^esub>} \<subseteq> {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}
[PROOF STEP]
using G H group.subgroup_self hom_one homf injf inv_into_f_eq subgroup.one_closed
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> Group.group (G ?i)
?i \<in> I \<Longrightarrow> Group.group (H ?i)
Group.group ?G \<Longrightarrow> subgroup (carrier ?G) ?G
\<lbrakk>?h \<in> hom ?G ?H; Group.group ?G; Group.group ?H\<rbrakk> \<Longrightarrow> ?h \<one>\<^bsub>?G\<^esub> = \<one>\<^bsub>?H\<^esub>
?i \<in> I \<Longrightarrow> f ?i \<in> hom (G ?i) (H ?i)
?i \<in> I \<Longrightarrow> inj_on (f ?i) (carrier (G ?i))
\<lbrakk>inj_on ?f ?A; ?x \<in> ?A; ?f ?x = ?y\<rbrakk> \<Longrightarrow> inv_into ?A ?f ?y = ?x
subgroup ?H ?G \<Longrightarrow> \<one>\<^bsub>?G\<^esub> \<in> ?H

goal (1 subgoal):
 1. {i \<in> I. inv_into (carrier (G i)) (f i) (x i) \<noteq> \<one>\<^bsub>G i\<^esub>} \<subseteq> {i \<in> I. x i \<noteq> \<one>\<^bsub>H i\<^esub>}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
finite {i \<in> I. inv_into (carrier (G i)) (f i) (x i) \<noteq> \<one>\<^bsub>G i\<^esub>}

goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv_into (carrier (G i)) (f i) (x i)) \<in> {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
with x
[PROOF STATE]
proof (chain)
picking this:
x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i))
finite {i \<in> I. inv_into (carrier (G i)) (f i) (x i) \<noteq> \<one>\<^bsub>G i\<^esub>}
[PROOF STEP]
show "?g \<in> {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}"
[PROOF STATE]
proof (prove)
using this:
x \<in> (\<Pi>\<^sub>E i\<in>I. carrier (H i))
finite {i \<in> I. inv_into (carrier (G i)) (f i) (x i) \<noteq> \<one>\<^bsub>G i\<^esub>}

goal (1 subgoal):
 1. (\<lambda>i\<in>I. inv_into (carrier (G i)) (f i) (x i)) \<in> {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}
[PROOF STEP]
apply (auto simp: PiE_iff inv_into_into conj_commute cong: conj_cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>finite {i \<in> I. inv_into (carrier (G i)) (f i) (x i) \<noteq> \<one>\<^bsub>G i\<^esub>}; i \<in> I; x \<in> extensional I; \<forall>i\<in>I. x i \<in> carrier (H i)\<rbrakk> \<Longrightarrow> inv_into (carrier (G i)) (f i) (x i) \<in> carrier (G i)
[PROOF STEP]
by (metis (no_types, opaque_lifting) iso_iff f inv_into_into)
[PROOF STATE]
proof (state)
this:
(\<lambda>i\<in>I. inv_into (carrier (G i)) (f i) (x i)) \<in> {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x \<in> (\<lambda>g. \<lambda>i\<in>I. f i (g i)) ` {x \<in> \<Pi>\<^sub>E i\<in>I. carrier (G i). finite {i \<in> I. x i \<noteq> \<one>\<^bsub>G i\<^esub>}}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
carrier (sum_group I H) \<subseteq> h ` carrier (sum_group I G)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
bij_betw h (carrier (sum_group I G)) (carrier (sum_group I H))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
h \<in> Group.iso (sum_group I G) (sum_group I H)

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
h \<in> Group.iso (sum_group I G) (sum_group I H)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
h \<in> Group.iso (sum_group I G) (sum_group I H)

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
using is_iso_def
[PROOF STATE]
proof (prove)
using this:
h \<in> Group.iso (sum_group I G) (sum_group I H)
?G \<cong> ?H = (Group.iso ?G ?H \<noteq> {})

goal (1 subgoal):
 1. sum_group I G \<cong> sum_group I H
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sum_group I G \<cong> sum_group I H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma list_not_empty:
  "\<exists>a. a\<in>A \<Longrightarrow> \<exists>xs. xs \<in> list n A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a. a \<in> A \<Longrightarrow> \<exists>xs. xs \<in> list n A
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a. a \<in> A \<Longrightarrow> \<exists>xs. xs \<in> list n A
[PROOF STEP]
apply (induct "n")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<exists>a. a \<in> A \<Longrightarrow> \<exists>xs. xs \<in> list 0 A
 2. \<And>n. \<lbrakk>\<exists>a. a \<in> A \<Longrightarrow> \<exists>xs. xs \<in> list n A; \<exists>a. a \<in> A\<rbrakk> \<Longrightarrow> \<exists>xs. xs \<in> list (Suc n) A
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<exists>a. a \<in> A \<Longrightarrow> \<exists>xs. xs \<in> list n A; \<exists>a. a \<in> A\<rbrakk> \<Longrightarrow> \<exists>xs. xs \<in> list (Suc n) A
[PROOF STEP]
apply (simp add: in_list_Suc_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<exists>xs. xs \<in> list n A; \<exists>a. a \<in> A\<rbrakk> \<Longrightarrow> \<exists>xs. \<exists>y\<in>A. \<exists>ys\<in>list n A. xs = y # ys
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma morph_on_inj_on:
  "morphism_on f A" "inj_on f A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. morphism_on f A &&& inj_on f A
[PROOF STEP]
using morph code_morph_code
[PROOF STATE]
proof (prove)
using this:
f (?u \<cdot> ?v) = f ?u \<cdot> f ?v
f ?r = f ?s \<Longrightarrow> ?r = ?s

goal (1 subgoal):
 1. morphism_on f A &&& inj_on f A
[PROOF STEP]
unfolding morphism_on_def inj_on_def
[PROOF STATE]
proof (prove)
using this:
f (?u \<cdot> ?v) = f ?u \<cdot> f ?v
f ?r = f ?s \<Longrightarrow> ?r = ?s

goal (1 subgoal):
 1. \<forall>u v. u \<in> \<langle>A\<rangle> \<longrightarrow> v \<in> \<langle>A\<rangle> \<longrightarrow> f (u \<cdot> v) = f u \<cdot> f v &&& \<forall>x\<in>A. \<forall>y\<in>A. f x = f y \<longrightarrow> x = y
[PROOF STEP]
by blast+


[STATEMENT]
lemma analz_insert_Key [simp]:
    "K \<notin> keysFor (analz H) ==>
          analz (insert (Key K) H) = insert (Key K) (analz H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. K \<notin> keysFor (analz H) \<Longrightarrow> analz (insert (Key K) H) = insert (Key K) (analz H)
[PROOF STEP]
apply (unfold keysFor_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. K \<notin> invKey ` {K. \<exists>X. Crypt K X \<in> analz H} \<Longrightarrow> analz (insert (Key K) H) = insert (Key K) (analz H)
[PROOF STEP]
apply (rule analz_insert_eq_I)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>K \<notin> invKey ` {K. \<exists>X. Crypt K X \<in> analz H}; x \<in> analz (insert (Key K) H)\<rbrakk> \<Longrightarrow> x \<in> insert (Key K) (analz H)
[PROOF STEP]
apply (erule analz.induct, auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma reals_Archimedean2: "\<exists>n. x < of_nat n"
  for x :: "'a::archimedean_field"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
obtain z where "x < of_int z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>z. x < of_int z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ex_less_of_int
[PROOF STATE]
proof (prove)
using this:
\<exists>z. ?x < of_int z

goal (1 subgoal):
 1. (\<And>z. x < of_int z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
x < of_int z

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x < of_int z

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
have "\<dots> \<le> of_int (int (nat z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int z \<le> of_int (int (nat z))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
of_int z \<le> of_int (int (nat z))

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
of_int z \<le> of_int (int (nat z))

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
have "\<dots> = of_nat (nat z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int (int (nat z)) = of_nat (nat z)
[PROOF STEP]
by (simp only: of_int_of_nat_eq)
[PROOF STATE]
proof (state)
this:
of_int (int (nat z)) = of_nat (nat z)

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x < of_nat (nat z)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x < of_nat (nat z)

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>n. x < of_nat n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fact_ge_1 [simp]: "fact n \<ge> (1 :: 'a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<le> fact n
[PROOF STEP]
by (metis le0 fact_0 fact_mono)


[STATEMENT]
theorem realfun_mon_conv_times:
  assumes xy: "x\<up>(y::'a\<Rightarrow>real)" and nn: "0\<le>z"
  shows "(\<lambda>m w. z*x m w)\<up>(\<lambda>w. z*y w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>m w. z * x m w)\<up>(\<lambda>w. z * y w)
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>m w. z * x m w)\<up>(\<lambda>w. z * y w)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>m w. z * x m w)\<up>(\<lambda>w. z * y w)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
x\<up>y
0 \<le> z
[PROOF STEP]
have "\<And>w. (\<lambda>m. z*x m w)\<up>(z*y w)"
[PROOF STATE]
proof (prove)
using this:
x\<up>y
0 \<le> z

goal (1 subgoal):
 1. \<And>w. (\<lambda>m. z * x m w)\<up>z * y w
[PROOF STEP]
by (simp add: realfun_mon_conv_iff real_mon_conv_times)
[PROOF STATE]
proof (state)
this:
(\<lambda>m. z * x m ?w)\<up>z * y ?w

goal (1 subgoal):
 1. (\<lambda>m w. z * x m w)\<up>(\<lambda>w. z * y w)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>m. z * x m ?w)\<up>z * y ?w

goal (1 subgoal):
 1. (\<lambda>m w. z * x m w)\<up>(\<lambda>w. z * y w)
[PROOF STEP]
by (auto simp add: realfun_mon_conv_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>m w. z * x m w)\<up>(\<lambda>w. z * y w)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma conjugate_preserve_poincare_collinear_iff [simp]:
  shows "poincare_collinear (conjugate ` A) \<longleftrightarrow> poincare_collinear A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_collinear (conjugate ` A) = poincare_collinear A
[PROOF STEP]
using conjugate_preserve_poincare_collinear[of "A"]
[PROOF STATE]
proof (prove)
using this:
poincare_collinear A \<Longrightarrow> poincare_collinear (conjugate ` A)

goal (1 subgoal):
 1. poincare_collinear (conjugate ` A) = poincare_collinear A
[PROOF STEP]
using conjugate_preserve_poincare_collinear[of "conjugate ` A"]
[PROOF STATE]
proof (prove)
using this:
poincare_collinear A \<Longrightarrow> poincare_collinear (conjugate ` A)
poincare_collinear (conjugate ` A) \<Longrightarrow> poincare_collinear (conjugate ` conjugate ` A)

goal (1 subgoal):
 1. poincare_collinear (conjugate ` A) = poincare_collinear A
[PROOF STEP]
by (auto simp del: conjugate_preserve_poincare_collinear)


[STATEMENT]
lemma [code]:
    "nth_oo v a == nth_oo' v a o integer_of_nat"
    "upd_oo f == upd_oo' f o integer_of_nat"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (nth_oo v a \<equiv> nth_oo' v a \<circ> integer_of_nat) &&& upd_oo f \<equiv> upd_oo' f \<circ> integer_of_nat
[PROOF STEP]
by (simp_all add: nth_oo'_def upd_oo'_def o_def)


[STATEMENT]
lemma signed_take_bit_Suc_bit1 [simp]:
  \<open>signed_take_bit (Suc n) (numeral (Num.Bit1 k)) = signed_take_bit n (numeral k) * 2 + (1 :: int)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. signed_take_bit (Suc n) (numeral (num.Bit1 k)) = signed_take_bit n (numeral k) * 2 + 1
[PROOF STEP]
by (simp add: signed_take_bit_Suc)


[STATEMENT]
theorem skew_isEmpty_impl: "prio_isEmpty skew_\<alpha> skew_invar skew_isEmpty"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prio_isEmpty skew_\<alpha> (\<lambda>_. True) skew_isEmpty
[PROOF STEP]
by unfold_locales
     (simp add: skew_defs SkewBinomialHeap.isEmpty_correct SkewBinomialHeap.empty_correct)


[STATEMENT]
lemma \<P>\<^sub>X_bounded_r: "bounded (range (\<lambda>t. (\<P>\<^sub>X t (r_dec\<^sub>b (p t)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded (range (\<lambda>t. \<P>\<^sub>X t (r_dec\<^sub>b (p t))))
[PROOF STEP]
using \<P>\<^sub>X_bound_r
[PROOF STATE]
proof (prove)
using this:
norm (\<P>\<^sub>X ?t (r_dec\<^sub>b (p ?t))) \<le> r\<^sub>M

goal (1 subgoal):
 1. bounded (range (\<lambda>t. \<P>\<^sub>X t (r_dec\<^sub>b (p t))))
[PROOF STEP]
by (auto intro!: boundedI)


[STATEMENT]
lemma bij_to_nat: "bij_betw (to_nat) (UNIV::'a set) {0..<CARD('a)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw mod_type_class.to_nat UNIV {0..<CARD('a)}
[PROOF STEP]
using bij_betw_the_inv_into[OF bij_from_nat]
[PROOF STATE]
proof (prove)
using this:
bij_betw (the_inv_into {0..<CARD('a)} mod_type_class.from_nat) UNIV {0..<CARD('a)}

goal (1 subgoal):
 1. bij_betw mod_type_class.to_nat UNIV {0..<CARD('a)}
[PROOF STEP]
unfolding to_nat_is_inv
[PROOF STATE]
proof (prove)
using this:
bij_betw mod_type_class.to_nat UNIV {0..<CARD('a)}

goal (1 subgoal):
 1. bij_betw mod_type_class.to_nat UNIV {0..<CARD('a)}
[PROOF STEP]
.


[STATEMENT]
lemma same_upto_trans: "same_upto j A B \<Longrightarrow> same_upto j B C \<Longrightarrow> same_upto j A C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>same_upto j A B; same_upto j B C\<rbrakk> \<Longrightarrow> same_upto j A C
[PROOF STEP]
unfolding same_upto_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>i' j'. i' < n \<longrightarrow> j' < j \<longrightarrow> A $$ (i', j') = B $$ (i', j'); \<forall>i' j'. i' < n \<longrightarrow> j' < j \<longrightarrow> B $$ (i', j') = C $$ (i', j')\<rbrakk> \<Longrightarrow> \<forall>i' j'. i' < n \<longrightarrow> j' < j \<longrightarrow> A $$ (i', j') = C $$ (i', j')
[PROOF STEP]
by auto


[STATEMENT]
lemma homotopic_paths_subset: "\<lbrakk>homotopic_paths s p q; s \<subseteq> t\<rbrakk> \<Longrightarrow> homotopic_paths t p q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>homotopic_paths s p q; s \<subseteq> t\<rbrakk> \<Longrightarrow> homotopic_paths t p q
[PROOF STEP]
unfolding homotopic_paths
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<exists>h. continuous_on ({0..1} \<times> {0..1}) h \<and> h ` ({0..1} \<times> {0..1}) \<subseteq> s \<and> (\<forall>x\<in>{0..1}. h (0, x) = p x) \<and> (\<forall>x\<in>{0..1}. h (1, x) = q x) \<and> (\<forall>t\<in>{0..1}. pathstart (h \<circ> Pair t) = pathstart p \<and> pathfinish (h \<circ> Pair t) = pathfinish p); s \<subseteq> t\<rbrakk> \<Longrightarrow> \<exists>h. continuous_on ({0..1} \<times> {0..1}) h \<and> h ` ({0..1} \<times> {0..1}) \<subseteq> t \<and> (\<forall>x\<in>{0..1}. h (0, x) = p x) \<and> (\<forall>x\<in>{0..1}. h (1, x) = q x) \<and> (\<forall>t\<in>{0..1}. pathstart (h \<circ> Pair t) = pathstart p \<and> pathfinish (h \<circ> Pair t) = pathfinish p)
[PROOF STEP]
by fast


[STATEMENT]
lemma Transset_Vfrom: "Transset(A) \<Longrightarrow> Transset(Vfrom A i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Transset A \<Longrightarrow> Transset (Vfrom A i)
[PROOF STEP]
proof (induction i rule: eps_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<And>y. \<lbrakk>y \<in> elts x; Transset A\<rbrakk> \<Longrightarrow> Transset (Vfrom A y); Transset A\<rbrakk> \<Longrightarrow> Transset (Vfrom A x)
[PROOF STEP]
case (step i)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?y \<in> elts i; Transset A\<rbrakk> \<Longrightarrow> Transset (Vfrom A ?y)
Transset A

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<And>y. \<lbrakk>y \<in> elts x; Transset A\<rbrakk> \<Longrightarrow> Transset (Vfrom A y); Transset A\<rbrakk> \<Longrightarrow> Transset (Vfrom A x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?y \<in> elts i; Transset A\<rbrakk> \<Longrightarrow> Transset (Vfrom A ?y)
Transset A
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?y \<in> elts i; Transset A\<rbrakk> \<Longrightarrow> Transset (Vfrom A ?y)
Transset A

goal (1 subgoal):
 1. Transset (Vfrom A i)
[PROOF STEP]
by (metis Transset_SUP Transset_VPow Transset_sup Vfrom)
[PROOF STATE]
proof (state)
this:
Transset (Vfrom A i)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma powr_sum_distrib_real_left:
  assumes "\<And>x. x \<in> X \<Longrightarrow> a x \<ge> 0"
  shows   "(\<Prod>x\<in>X. a x powr e :: real) = (\<Prod>x\<in>X. a x) powr e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>x\<in>X. a x powr e) = prod a X powr e
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> X \<Longrightarrow> 0 \<le> a ?x

goal (1 subgoal):
 1. (\<Prod>x\<in>X. a x powr e) = prod a X powr e
[PROOF STEP]
by (induction X rule: infinite_finite_induct)
     (auto simp: powr_mult prod_nonneg)


[STATEMENT]
lemma take_Suc_prefix:
  "prefix (take n p) (take (Suc n) p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prefix (take n p) (take (Suc n) p)
[PROOF STEP]
proof(induct p arbitrary:n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>n. prefix (take n []) (take (Suc n) [])
 2. \<And>a p n. (\<And>n. prefix (take n p) (take (Suc n) p)) \<Longrightarrow> prefix (take n (a # p)) (take (Suc n) (a # p))
[PROOF STEP]
case (Cons a p n)
[PROOF STATE]
proof (state)
this:
prefix (take ?n p) (take (Suc ?n) p)

goal (2 subgoals):
 1. \<And>n. prefix (take n []) (take (Suc n) [])
 2. \<And>a p n. (\<And>n. prefix (take n p) (take (Suc n) p)) \<Longrightarrow> prefix (take n (a # p)) (take (Suc n) (a # p))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
prefix (take ?n p) (take (Suc ?n) p)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
prefix (take ?n p) (take (Suc ?n) p)

goal (1 subgoal):
 1. prefix (take n (a # p)) (take (Suc n) (a # p))
[PROOF STEP]
by(cases n,auto)
[PROOF STATE]
proof (state)
this:
prefix (take n (a # p)) (take (Suc n) (a # p))

goal (1 subgoal):
 1. \<And>n. prefix (take n []) (take (Suc n) [])
[PROOF STEP]
qed auto


[STATEMENT]
lemma fconverse_pred:
  assumes "small {[a, b]\<^sub>\<circ> | a b. P a b}"
  shows "(set {[a, b]\<^sub>\<circ> | a b. P a b})\<inverse>\<^sub>\<bullet> = set {[b, a]\<^sub>\<circ> | a b. P a b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (set {[a, b]\<^sub>\<circ> |a b. P a b})\<inverse>\<^sub>\<bullet> = set {[b, a]\<^sub>\<circ> |a b. P a b}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
small {[a, b]\<^sub>\<circ> |a b. P a b}

goal (1 subgoal):
 1. (set {[a, b]\<^sub>\<circ> |a b. P a b})\<inverse>\<^sub>\<bullet> = set {[b, a]\<^sub>\<circ> |a b. P a b}
[PROOF STEP]
unfolding fconverse_def
[PROOF STATE]
proof (prove)
using this:
small {[a, b]\<^sub>\<circ> |a b. P a b}

goal (1 subgoal):
 1. set {[b, a]\<^sub>\<circ> |a b. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> set {[a, b]\<^sub>\<circ> |a b. P a b}} = set {[b, a]\<^sub>\<circ> |a b. P a b}
[PROOF STEP]
by simp


[STATEMENT]
lemma aligned_add_offset_no_wrap:
  fixes off :: "('a::len) word"
  and     x :: "'a word"
  assumes al: "is_aligned x sz"
  and   offv: "off < 2 ^ sz"
  shows  "unat x + unat off < 2 ^ LENGTH('a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
 2. \<not> ?P \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
assume szv: "sz < LENGTH('a)"
[PROOF STATE]
proof (state)
this:
sz < LENGTH('a)

goal (2 subgoals):
 1. ?P \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
 2. \<not> ?P \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
from al
[PROOF STATE]
proof (chain)
picking this:
is_aligned x sz
[PROOF STEP]
obtain k where xv: "x = 2 ^ sz * (of_nat k)"
    and kl: "k < 2 ^ (LENGTH('a) - sz)"
[PROOF STATE]
proof (prove)
using this:
is_aligned x sz

goal (1 subgoal):
 1. (\<And>k. \<lbrakk>x = 2 ^ sz * word_of_nat k; k < 2 ^ (LENGTH('a) - sz)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto elim: is_alignedE)
[PROOF STATE]
proof (state)
this:
x = 2 ^ sz * word_of_nat k
k < 2 ^ (LENGTH('a) - sz)

goal (2 subgoals):
 1. ?P \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
 2. \<not> ?P \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
using szv
[PROOF STATE]
proof (prove)
using this:
sz < LENGTH('a)

goal (1 subgoal):
 1. unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
apply (subst xv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sz < LENGTH('a) \<Longrightarrow> unat (2 ^ sz * word_of_nat k) + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
apply (subst unat_mult_power_lem[OF kl])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sz < LENGTH('a) \<Longrightarrow> 2 ^ sz * k + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
apply (subst mult.commute, rule nat_add_offset_less)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. sz < LENGTH('a) \<Longrightarrow> unat off < 2 ^ sz
 2. sz < LENGTH('a) \<Longrightarrow> k < 2 ^ ?m1
 3. sz < LENGTH('a) \<Longrightarrow> LENGTH('a) = ?m1 + sz
[PROOF STEP]
apply (rule less_le_trans[OF unat_mono[OF offv, simplified]])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. sz < LENGTH('a) \<Longrightarrow> unat (2 ^ sz) \<le> 2 ^ sz
 2. sz < LENGTH('a) \<Longrightarrow> k < 2 ^ ?m1
 3. sz < LENGTH('a) \<Longrightarrow> LENGTH('a) = ?m1 + sz
[PROOF STEP]
apply (erule eq_imp_le[OF unat_power_lower])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. sz < LENGTH('a) \<Longrightarrow> k < 2 ^ ?m1
 2. sz < LENGTH('a) \<Longrightarrow> LENGTH('a) = ?m1 + sz
[PROOF STEP]
apply (rule kl)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sz < LENGTH('a) \<Longrightarrow> LENGTH('a) = LENGTH('a) - sz + sz
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
unat x + unat off < 2 ^ LENGTH('a)

goal (1 subgoal):
 1. \<not> sz < LENGTH('a) \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> sz < LENGTH('a) \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
assume "\<not> sz < LENGTH('a)"
[PROOF STATE]
proof (state)
this:
\<not> sz < LENGTH('a)

goal (1 subgoal):
 1. \<not> sz < LENGTH('a) \<Longrightarrow> unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
with offv
[PROOF STATE]
proof (chain)
picking this:
off < 2 ^ sz
\<not> sz < LENGTH('a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
off < 2 ^ sz
\<not> sz < LENGTH('a)

goal (1 subgoal):
 1. unat x + unat off < 2 ^ LENGTH('a)
[PROOF STEP]
by (simp add: not_less power_overflow )
[PROOF STATE]
proof (state)
this:
unat x + unat off < 2 ^ LENGTH('a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma of_int_complex_interval_tendsto: "(\<lambda>i. of_int_complex_interval n) \<longlonglongrightarrow>\<^sub>c of_int n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. of_int_complex_interval n) \<longlonglongrightarrow>\<^sub>c of_int n
[PROOF STEP]
by (auto simp: o_def of_int_complex_interval_def intro!:const_interval_tendsto interval_tendsto_0)


[STATEMENT]
theorem CYK_ix_correct: "CYK_ix S w n = yield S (slice w 0 n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.CYK_ix S w n = local.yield S (map w [0..<n])
[PROOF STEP]
by(simp add: CYK_ix_def cyk_ix_correct)


[STATEMENT]
lemma fresh_prod2[nominal_prod_simps,ms_fresh]: "x \<sharp> (a,b) = (x \<sharp> a \<and> x \<sharp> b )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<sharp> (a, b) = (x \<sharp> a \<and> x \<sharp> b)
[PROOF STEP]
using fresh_def supp_Pair
[PROOF STATE]
proof (prove)
using this:
?a \<sharp> ?x \<equiv> ?a \<notin> supp ?x
supp (?x, ?y) = supp ?x \<union> supp ?y

goal (1 subgoal):
 1. x \<sharp> (a, b) = (x \<sharp> a \<and> x \<sharp> b)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma atoms_nTimes: "atoms (nTimes r s) \<subseteq> atoms r \<union> atoms s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. atoms (nTimes r s) \<subseteq> atoms r \<union> atoms s
[PROOF STEP]
by (induct r s rule: nTimes.induct) auto


[STATEMENT]
lemma relabel_preserve_other: "u\<noteq>v \<Longrightarrow> relabel_effect f l u v = l v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u \<noteq> v \<Longrightarrow> relabel_effect f l u v = l v
[PROOF STEP]
unfolding relabel_effect_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u \<noteq> v \<Longrightarrow> (l(u := Min {l v |v. (u, v) \<in> cf.E} + 1)) v = l v
[PROOF STEP]
by auto


[STATEMENT]
lemma eval_monom_list[simp]: "eval_monom_list \<alpha> (m @ n) = eval_monom_list \<alpha> m * eval_monom_list \<alpha> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_monom_list \<alpha> (m @ n) = eval_monom_list \<alpha> m * eval_monom_list \<alpha> n
[PROOF STEP]
by (induct m, auto simp: field_simps)


[STATEMENT]
lemma C_1[simp]: "C 1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C (1::'a) = 1
[PROOF STEP]
by (simp add: C_def)


[STATEMENT]
lemma (in Corps) npowf_inverse:"\<lbrakk>x \<in> carrier K; x \<noteq> \<zero>\<rbrakk> \<Longrightarrow> x\<^bsub>K\<^esub>\<^bsup>j\<^esup> = (x\<^bsup>\<hyphen>K\<^esup>)\<^bsub>K\<^esub>\<^bsup>(-j)\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier K; x \<noteq> \<zero>\<rbrakk> \<Longrightarrow> x\<^bsub>K\<^esub>\<^bsup>j\<^esup> = x\<^bsup>\<hyphen> K\<^esup>\<^bsub>K\<^esub>\<^bsup>- j\<^esup>
[PROOF STEP]
apply (case_tac "0 \<le> j")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>x \<in> carrier K; x \<noteq> \<zero>; 0 \<le> j\<rbrakk> \<Longrightarrow> x\<^bsub>K\<^esub>\<^bsup>j\<^esup> = x\<^bsup>\<hyphen> K\<^esup>\<^bsub>K\<^esub>\<^bsup>- j\<^esup>
 2. \<lbrakk>x \<in> carrier K; x \<noteq> \<zero>; \<not> 0 \<le> j\<rbrakk> \<Longrightarrow> x\<^bsub>K\<^esub>\<^bsup>j\<^esup> = x\<^bsup>\<hyphen> K\<^esup>\<^bsub>K\<^esub>\<^bsup>- j\<^esup>
[PROOF STEP]
apply (simp add:npowf_inv, simp add:npowf_inv1)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma equiv_antisym: "x \<le> y \<Longrightarrow> y \<le> x \<Longrightarrow> x \<approx> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<le> y; y \<le> x\<rbrakk> \<Longrightarrow> x \<approx> y
[PROOF STEP]
by (simp only: equiv_def)


[STATEMENT]
lemma parts_UN [simp]: "parts(\<Union>x\<in>A. H x) = (\<Union>x\<in>A. parts(H x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. parts (\<Union> (H ` A)) = (\<Union>x\<in>A. parts (H x))
[PROOF STEP]
by (intro equalityI parts_UN_subset1 parts_UN_subset2)


[STATEMENT]
lemma path_connected_Iio[simp]: "path_connected {..<a}" for a :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected {..<a}
[PROOF STEP]
by (simp add: convex_imp_path_connected)


[STATEMENT]
lemma mat_of_row_index[simp]: "x < dim_vec y \<Longrightarrow> mat_of_row y $$ (0,x) = y $ x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < dim_vec y \<Longrightarrow> mat_of_row y $$ (0, x) = y $ x
[PROOF STEP]
unfolding mat_of_row_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < dim_vec y \<Longrightarrow> mat 1 (dim_vec y) (\<lambda>ij. y $ snd ij) $$ (0, x) = y $ x
[PROOF STEP]
by auto


[STATEMENT]
lemma prime_coprime: "\<lbrakk>Prime x; Prime y; x\<noteq>y\<rbrakk> \<Longrightarrow> coprime x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Prime x; Prime y; x \<noteq> y\<rbrakk> \<Longrightarrow> coprime x y
[PROOF STEP]
proof (simp only: Prime.simps coprime_def, auto simp: dvd_def,
    rule_tac classical, simp)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c k ka. \<lbrakk>Suc 0 < c * k; \<forall>u<c * k. \<forall>v<c * k. u * v \<noteq> c * k; Suc 0 < c * ka; \<forall>u<c * ka. \<forall>v<c * ka. u * v \<noteq> c * ka; x = c * k; y = c * ka; k \<noteq> ka; 0 < c; c \<noteq> Suc 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
fix d k ka
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>c k ka. \<lbrakk>Suc 0 < c * k; \<forall>u<c * k. \<forall>v<c * k. u * v \<noteq> c * k; Suc 0 < c * ka; \<forall>u<c * ka. \<forall>v<c * ka. u * v \<noteq> c * ka; x = c * k; y = c * ka; k \<noteq> ka; 0 < c; c \<noteq> Suc 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
assume case_ka: "\<forall>u<d * ka. \<forall>v<d * ka. u * v \<noteq> d * ka"
    and case_k: "\<forall>u<d * k. \<forall>v<d * k. u * v \<noteq> d * k"
    and h: "(0::nat) < d" "d \<noteq> Suc 0" "Suc 0 < d * ka"
    "ka \<noteq> k" "Suc 0 < d * k"
[PROOF STATE]
proof (state)
this:
\<forall>u<d * ka. \<forall>v<d * ka. u * v \<noteq> d * ka
\<forall>u<d * k. \<forall>v<d * k. u * v \<noteq> d * k
0 < d
d \<noteq> Suc 0
Suc 0 < d * ka
ka \<noteq> k
Suc 0 < d * k

goal (1 subgoal):
 1. \<And>c k ka. \<lbrakk>Suc 0 < c * k; \<forall>u<c * k. \<forall>v<c * k. u * v \<noteq> c * k; Suc 0 < c * ka; \<forall>u<c * ka. \<forall>v<c * ka. u * v \<noteq> c * ka; x = c * k; y = c * ka; k \<noteq> ka; 0 < c; c \<noteq> Suc 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
from h
[PROOF STATE]
proof (chain)
picking this:
0 < d
d \<noteq> Suc 0
Suc 0 < d * ka
ka \<noteq> k
Suc 0 < d * k
[PROOF STEP]
have "k > Suc 0 \<or> ka >Suc 0"
[PROOF STATE]
proof (prove)
using this:
0 < d
d \<noteq> Suc 0
Suc 0 < d * ka
ka \<noteq> k
Suc 0 < d * k

goal (1 subgoal):
 1. Suc 0 < k \<or> Suc 0 < ka
[PROOF STEP]
by (cases ka;cases k;force+)
[PROOF STATE]
proof (state)
this:
Suc 0 < k \<or> Suc 0 < ka

goal (1 subgoal):
 1. \<And>c k ka. \<lbrakk>Suc 0 < c * k; \<forall>u<c * k. \<forall>v<c * k. u * v \<noteq> c * k; Suc 0 < c * ka; \<forall>u<c * ka. \<forall>v<c * ka. u * v \<noteq> c * ka; x = c * k; y = c * ka; k \<noteq> ka; 0 < c; c \<noteq> Suc 0\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
Suc 0 < k \<or> Suc 0 < ka
[PROOF STEP]
show "False"
[PROOF STATE]
proof (prove)
using this:
Suc 0 < k \<or> Suc 0 < ka

goal (1 subgoal):
 1. False
[PROOF STEP]
proof(erule_tac disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Suc 0 < k \<Longrightarrow> False
 2. Suc 0 < ka \<Longrightarrow> False
[PROOF STEP]
assume  "(Suc 0::nat) < k"
[PROOF STATE]
proof (state)
this:
Suc 0 < k

goal (2 subgoals):
 1. Suc 0 < k \<Longrightarrow> False
 2. Suc 0 < ka \<Longrightarrow> False
[PROOF STEP]
hence "k < d*k \<and> d < d*k"
[PROOF STATE]
proof (prove)
using this:
Suc 0 < k

goal (1 subgoal):
 1. k < d * k \<and> d < d * k
[PROOF STEP]
using h
[PROOF STATE]
proof (prove)
using this:
Suc 0 < k
0 < d
d \<noteq> Suc 0
Suc 0 < d * ka
ka \<noteq> k
Suc 0 < d * k

goal (1 subgoal):
 1. k < d * k \<and> d < d * k
[PROOF STEP]
by(auto)
[PROOF STATE]
proof (state)
this:
k < d * k \<and> d < d * k

goal (2 subgoals):
 1. Suc 0 < k \<Longrightarrow> False
 2. Suc 0 < ka \<Longrightarrow> False
[PROOF STEP]
thus "?thesis"
[PROOF STATE]
proof (prove)
using this:
k < d * k \<and> d < d * k

goal (1 subgoal):
 1. False
[PROOF STEP]
using case_k
[PROOF STATE]
proof (prove)
using this:
k < d * k \<and> d < d * k
\<forall>u<d * k. \<forall>v<d * k. u * v \<noteq> d * k

goal (1 subgoal):
 1. False
[PROOF STEP]
apply(erule_tac x = d in allE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>k < d * k \<and> d < d * k; d < d * k \<longrightarrow> (\<forall>v<d * k. d * v \<noteq> d * k)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < k \<and> Suc 0 < d \<and> 0 < d \<and> Suc 0 < k; \<forall>v<d * k. v \<noteq> k\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply(erule_tac x = k in allE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < k \<and> Suc 0 < d \<and> 0 < d \<and> Suc 0 < k; k < d * k \<longrightarrow> k \<noteq> k\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
False

goal (1 subgoal):
 1. Suc 0 < ka \<Longrightarrow> False
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Suc 0 < ka \<Longrightarrow> False
[PROOF STEP]
assume "(Suc 0::nat) < ka"
[PROOF STATE]
proof (state)
this:
Suc 0 < ka

goal (1 subgoal):
 1. Suc 0 < ka \<Longrightarrow> False
[PROOF STEP]
hence "ka < d * ka \<and> d < d*ka"
[PROOF STATE]
proof (prove)
using this:
Suc 0 < ka

goal (1 subgoal):
 1. ka < d * ka \<and> d < d * ka
[PROOF STEP]
using h
[PROOF STATE]
proof (prove)
using this:
Suc 0 < ka
0 < d
d \<noteq> Suc 0
Suc 0 < d * ka
ka \<noteq> k
Suc 0 < d * k

goal (1 subgoal):
 1. ka < d * ka \<and> d < d * ka
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
ka < d * ka \<and> d < d * ka

goal (1 subgoal):
 1. Suc 0 < ka \<Longrightarrow> False
[PROOF STEP]
thus "?thesis"
[PROOF STATE]
proof (prove)
using this:
ka < d * ka \<and> d < d * ka

goal (1 subgoal):
 1. False
[PROOF STEP]
using case_ka
[PROOF STATE]
proof (prove)
using this:
ka < d * ka \<and> d < d * ka
\<forall>u<d * ka. \<forall>v<d * ka. u * v \<noteq> d * ka

goal (1 subgoal):
 1. False
[PROOF STEP]
apply(erule_tac x = d in allE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ka < d * ka \<and> d < d * ka; d < d * ka \<longrightarrow> (\<forall>v<d * ka. d * v \<noteq> d * ka)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < ka \<and> Suc 0 < d \<and> 0 < d \<and> Suc 0 < ka; \<forall>v<d * ka. v \<noteq> ka\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply(erule_tac x = ka in allE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < ka \<and> Suc 0 < d \<and> 0 < d \<and> Suc 0 < ka; ka < d * ka \<longrightarrow> ka \<noteq> ka\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
False

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma stream_rel_coinduct[case_names stream_rel, coinduct pred: stream_all2]:
    assumes "R u v"
    assumes "\<And> a u b v. R (a ## u) (b ## v) \<Longrightarrow> P a b \<and> R u v"
    shows "stream_all2 P u v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stream_all2 P u v
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
R u v
R (?a ## ?u) (?b ## ?v) \<Longrightarrow> P ?a ?b \<and> R ?u ?v

goal (1 subgoal):
 1. stream_all2 P u v
[PROOF STEP]
by (coinduct) (metis stream.collapse)


[STATEMENT]
lemma fps_integral0_fps_const:
  fixes c :: "'a::division_ring"
  shows "fps_integral0 (fps_const c) = fps_const c * fps_X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_integral0 (fps_const c) = fps_const c * fps_X
[PROOF STEP]
by    (rule fps_integral0_fps_const'[OF inverse_1])


[STATEMENT]
lemma img_unit_closed:"\<lbrakk>Group F; Group G; f \<in> gHom F G\<rbrakk> \<Longrightarrow>
                                            \<one>\<^bsub>G\<^esub> \<in> f `(carrier F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G\<rbrakk> \<Longrightarrow> \<one>\<^bsub>G\<^esub> \<in> f ` carrier F
[PROOF STEP]
apply (cut_tac Group.unit_closed[of "F"],
      frule ghom_unit_unit[THEN sym, of "F" "G" "f"], assumption+,
      simp add:image_def, blast,
      assumption)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma bitlen_bounds:
  "2 ^ nat (bitlen x - 1) \<le> x \<and> x < 2 ^ nat (bitlen x)" if "x > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ nat (bitlen x - 1) \<le> x \<and> x < 2 ^ nat (bitlen x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 ^ nat (bitlen x - 1) \<le> x \<and> x < 2 ^ nat (bitlen x)
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
0 < x
[PROOF STEP]
have "bitlen x \<ge> 1"
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. 1 \<le> bitlen x
[PROOF STEP]
by (auto simp: bitlen_alt_def)
[PROOF STATE]
proof (state)
this:
1 \<le> bitlen x

goal (1 subgoal):
 1. 2 ^ nat (bitlen x - 1) \<le> x \<and> x < 2 ^ nat (bitlen x)
[PROOF STEP]
with that floorlog_bounds[of "nat x" 2]
[PROOF STATE]
proof (chain)
picking this:
0 < x
\<lbrakk>0 < nat x; 1 < 2\<rbrakk> \<Longrightarrow> 2 ^ (floorlog 2 (nat x) - 1) \<le> nat x \<and> nat x < 2 ^ floorlog 2 (nat x)
1 \<le> bitlen x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < x
\<lbrakk>0 < nat x; 1 < 2\<rbrakk> \<Longrightarrow> 2 ^ (floorlog 2 (nat x) - 1) \<le> nat x \<and> nat x < 2 ^ floorlog 2 (nat x)
1 \<le> bitlen x

goal (1 subgoal):
 1. 2 ^ nat (bitlen x - 1) \<le> x \<and> x < 2 ^ nat (bitlen x)
[PROOF STEP]
by (auto simp add: bitlen_def le_nat_iff nat_less_iff nat_diff_distrib)
[PROOF STATE]
proof (state)
this:
2 ^ nat (bitlen x - 1) \<le> x \<and> x < 2 ^ nat (bitlen x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rbt_sorted_rbt_join2: "rbt_sorted l \<Longrightarrow> rbt_sorted r \<Longrightarrow>
  \<forall>x \<in> set (RBT_Impl.keys l). \<forall>y \<in> set (RBT_Impl.keys r). x < y \<Longrightarrow> rbt_sorted (rbt_join2 l r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>rbt_sorted l; rbt_sorted r; \<forall>x\<in>set (keys l). \<forall>y\<in>set (keys r). x < y\<rbrakk> \<Longrightarrow> rbt_sorted (rbt_join2 l r)
[PROOF STEP]
by (simp add: rbt_join2_def rbt_sorted_rbt_join rbt_split_min_set rbt_split_min_rbt_sorted set_rbt_join
      rbt_greater_prop rbt_less_prop split: prod.split)


[STATEMENT]
lemma reals_Archimedean2: "\<exists>n. x < of_nat n"
  for x :: "'a::archimedean_field"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
obtain z where "x < of_int z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>z. x < of_int z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using ex_less_of_int
[PROOF STATE]
proof (prove)
using this:
\<exists>z. ?x < of_int z

goal (1 subgoal):
 1. (\<And>z. x < of_int z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
x < of_int z

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x < of_int z

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
have "\<dots> \<le> of_int (int (nat z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int z \<le> of_int (int (nat z))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
of_int z \<le> of_int (int (nat z))

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
of_int z \<le> of_int (int (nat z))

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
have "\<dots> = of_nat (nat z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int (int (nat z)) = of_nat (nat z)
[PROOF STEP]
by (simp only: of_int_of_nat_eq)
[PROOF STATE]
proof (state)
this:
of_int (int (nat z)) = of_nat (nat z)

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x < of_nat (nat z)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x < of_nat (nat z)

goal (1 subgoal):
 1. \<exists>n. x < of_nat n
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>n. x < of_nat n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma r_constant_alt: "\<forall> x \<in> \<V>. \<B> rep x = \<Lambda> * (\<v> - 1) div (\<k> - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>\<V>. \<B> rep x = \<Lambda> * (\<v> - 1) div (\<k> - 1)
[PROOF STEP]
using r_constant replication_number_value
[PROOF STATE]
proof (prove)
using this:
?x \<in> \<V> \<Longrightarrow> \<B> rep ?x * (\<k> - 1) = \<Lambda> * (\<v> - 1)
?x \<in> \<V> \<Longrightarrow> \<B> rep ?x = \<Lambda> * (\<v> - 1) div (\<k> - 1)

goal (1 subgoal):
 1. \<forall>x\<in>\<V>. \<B> rep x = \<Lambda> * (\<v> - 1) div (\<k> - 1)
[PROOF STEP]
by blast


[STATEMENT]
lemma prob_space_restrict_space:
  "S \<in> sets M \<Longrightarrow> emeasure M S = 1 \<Longrightarrow> prob_space (restrict_space M S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S \<in> sets M; emeasure M S = 1\<rbrakk> \<Longrightarrow> prob_space (restrict_space M S)
[PROOF STEP]
by (intro prob_spaceI)
     (simp add: emeasure_restrict_space space_restrict_space)


[STATEMENT]
lemma foldli_diff:
    "det_fold_set X (\<lambda>_. True) (\<lambda>x s. op_set_delete x s) s ((-) s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det_fold_set X (\<lambda>_. True) op_set_delete s ((-) s)
[PROOF STEP]
proof (rule, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>l. \<lbrakk>distinct l; sorted_wrt X l\<rbrakk> \<Longrightarrow> foldli l (\<lambda>_. True) op_set_delete s = s - set l
[PROOF STEP]
case (1 l)
[PROOF STATE]
proof (state)
this:
distinct l
sorted_wrt X l

goal (1 subgoal):
 1. \<And>l. \<lbrakk>distinct l; sorted_wrt X l\<rbrakk> \<Longrightarrow> foldli l (\<lambda>_. True) op_set_delete s = s - set l
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
distinct l
sorted_wrt X l

goal (1 subgoal):
 1. foldli l (\<lambda>_. True) op_set_delete s = s - set l
[PROOF STEP]
by (induct l arbitrary: s) auto
[PROOF STATE]
proof (state)
this:
foldli l (\<lambda>_. True) op_set_delete s = s - set l

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closed_orbit_flow_compact:
  assumes "closed_orbit x"
  shows "compact(flow0 x ` UNIV)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
obtain Tp where "Tp \<noteq> 0" "Tp \<in> existence_ivl0 x" "flow0 x Tp = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>Tp. \<lbrakk>Tp \<noteq> 0; Tp \<in> existence_ivl0 x; flow0 x Tp = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
closed_orbit x

goal (1 subgoal):
 1. (\<And>Tp. \<lbrakk>Tp \<noteq> 0; Tp \<in> existence_ivl0 x; flow0 x Tp = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding closed_orbit_def
[PROOF STATE]
proof (prove)
using this:
\<exists>T\<in>existence_ivl0 x. T \<noteq> 0 \<and> flow0 x T = x

goal (1 subgoal):
 1. (\<And>Tp. \<lbrakk>Tp \<noteq> 0; Tp \<in> existence_ivl0 x; flow0 x Tp = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Tp \<noteq> 0
Tp \<in> existence_ivl0 x
flow0 x Tp = x

goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Tp \<noteq> 0
Tp \<in> existence_ivl0 x
flow0 x Tp = x
[PROOF STEP]
obtain T where T: "T \<in> existence_ivl0 x" "T > 0" "flow0 x T = x"
[PROOF STATE]
proof (prove)
using this:
Tp \<noteq> 0
Tp \<in> existence_ivl0 x
flow0 x Tp = x

goal (1 subgoal):
 1. (\<And>T. \<lbrakk>T \<in> existence_ivl0 x; 0 < T; flow0 x T = x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (smt recurrence_time_flip_sign)
[PROOF STATE]
proof (state)
this:
T \<in> existence_ivl0 x
0 < T
flow0 x T = x

goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
from recurrence_time_restricts_compact_flow[OF this]
[PROOF STATE]
proof (chain)
picking this:
range (flow0 x) = flow0 x ` {0..T}
[PROOF STEP]
have feq: "flow0 x ` UNIV = flow0 x ` {0..T}"
[PROOF STATE]
proof (prove)
using this:
range (flow0 x) = flow0 x ` {0..T}

goal (1 subgoal):
 1. range (flow0 x) = flow0 x ` {0..T}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
range (flow0 x) = flow0 x ` {0..T}

goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
have "continuous_on {0..T} (flow0 x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {0..T} (flow0 x)
[PROOF STEP]
by (meson T(1) continuous_on_sequentially in_mono local.flow_continuous_on local.ivl_subset_existence_ivl)
[PROOF STATE]
proof (state)
this:
continuous_on {0..T} (flow0 x)

goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
from compact_continuous_image[OF this]
[PROOF STATE]
proof (chain)
picking this:
compact {0..T} \<Longrightarrow> compact (flow0 x ` {0..T})
[PROOF STEP]
have "compact (flow0 x ` {0..T})"
[PROOF STATE]
proof (prove)
using this:
compact {0..T} \<Longrightarrow> compact (flow0 x ` {0..T})

goal (1 subgoal):
 1. compact (flow0 x ` {0..T})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
compact (flow0 x ` {0..T})

goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
compact (flow0 x ` {0..T})

goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
using feq
[PROOF STATE]
proof (prove)
using this:
compact (flow0 x ` {0..T})
range (flow0 x) = flow0 x ` {0..T}

goal (1 subgoal):
 1. compact (range (flow0 x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
compact (range (flow0 x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma continuous_pre_zeta [continuous_intros]:
  assumes "continuous (at x within A) f" "a > 0"
  shows   "continuous (at x within A) (\<lambda>x. pre_zeta a (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous (at x within A) (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. continuous (at x within A) (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
have "continuous (at z) (pre_zeta a)" for z
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont (pre_zeta a) z
[PROOF STEP]
by (rule continuous_on_interior[of UNIV]) (insert assms, auto intro!: continuous_intros)
[PROOF STATE]
proof (state)
this:
isCont (pre_zeta a) ?z

goal (1 subgoal):
 1. continuous (at x within A) (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
from continuous_within_compose3[OF this assms(1)]
[PROOF STATE]
proof (chain)
picking this:
continuous (at x within A) (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
continuous (at x within A) (\<lambda>x. pre_zeta a (f x))

goal (1 subgoal):
 1. continuous (at x within A) (\<lambda>x. pre_zeta a (f x))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
continuous (at x within A) (\<lambda>x. pre_zeta a (f x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma alternating_order2_cancel_1left:
  "s+s=0 \<Longrightarrow>
    sum_list (s # (alternating_list (Suc n) s t)) = sum_list (alternating_list n t s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s + s = (0::'a) \<Longrightarrow> sum_list (s # alternating_list (Suc n) s t) = sum_list (alternating_list n t s)
[PROOF STEP]
using add.assoc[of s s] alternating_list_Suc_Cons[of n s]
[PROOF STATE]
proof (prove)
using this:
s + s + ?c = s + (s + ?c)
alternating_list (Suc n) s ?t = s # alternating_list n ?t s

goal (1 subgoal):
 1. s + s = (0::'a) \<Longrightarrow> sum_list (s # alternating_list (Suc n) s t) = sum_list (alternating_list n t s)
[PROOF STEP]
by simp


[STATEMENT]
lemma sorted_group_sort: "sorted (map f (group_sort xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted (map f (group_sort xs))
[PROOF STEP]
by (auto simp: group_sort_correct intro!: sorted_group sorted_sort)


[STATEMENT]
lemma find_result_props :
  assumes "find P xs = Some x"
  shows "x \<in> set xs" and "P x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> set xs &&& P x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x \<in> set xs
 2. P x
[PROOF STEP]
show "x \<in> set xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> set xs
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
find P xs = Some x

goal (1 subgoal):
 1. x \<in> set xs
[PROOF STEP]
by (metis find_Some_iff nth_mem)
[PROOF STATE]
proof (state)
this:
x \<in> set xs

goal (1 subgoal):
 1. P x
[PROOF STEP]
show "P x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
find P xs = Some x

goal (1 subgoal):
 1. P x
[PROOF STEP]
by (metis find_Some_iff)
[PROOF STATE]
proof (state)
this:
P x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finvimage_small[simp]: "small {a. \<exists>b\<in>\<^sub>\<circ>A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small {a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. small {a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
have ss: "{a. \<exists>b\<in>\<^sub>\<circ>A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r} \<subseteq> (\<lambda>x. x\<lparr>0\<^sub>\<nat>\<rparr>) ` elts r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r} \<subseteq> (\<lambda>x. x\<lparr>0\<^sub>\<nat>\<rparr>) ` elts r
[PROOF STEP]
using image_iff
[PROOF STATE]
proof (prove)
using this:
(?z \<in> ?f ` ?A) = (\<exists>x\<in>?A. ?z = ?f x)

goal (1 subgoal):
 1. {a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r} \<subseteq> (\<lambda>x. x\<lparr>0\<^sub>\<nat>\<rparr>) ` elts r
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
{a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r} \<subseteq> (\<lambda>x. x\<lparr>0\<^sub>\<nat>\<rparr>) ` elts r

goal (1 subgoal):
 1. small {a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
have small: "small ((\<lambda>x. x\<lparr>0\<^sub>\<nat>\<rparr>) ` elts r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small ((\<lambda>x. x\<lparr>0\<^sub>\<nat>\<rparr>) ` elts r)
[PROOF STEP]
by (rule replacement) simp
[PROOF STATE]
proof (state)
this:
small ((\<lambda>x. x\<lparr>0\<^sub>\<nat>\<rparr>) ` elts r)

goal (1 subgoal):
 1. small {a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small {a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
by (rule smaller_than_small, rule small, rule ss)
[PROOF STATE]
proof (state)
this:
small {a. \<exists>b\<in>elts A. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inducedHOMTr0_2:"\<lbrakk>Group F; Group G; f \<in> gHom F G\<rbrakk> \<Longrightarrow>
    (f\<dieresis>\<^bsub>F,G\<^esub>) \<in> set_rcs F (gker\<^bsub>F,G\<^esub> f) \<rightarrow> f ` (carrier F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G\<rbrakk> \<Longrightarrow> f\<dieresis>\<^bsub>F,G\<^esub> \<in> set_rcs F (gker\<^bsub>F,G\<^esub> f) \<rightarrow> f ` carrier F
[PROOF STEP]
apply (rule Pi_I)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>Group F; Group G; f \<in> gHom F G; x \<in> set_rcs F (gker\<^bsub>F,G\<^esub> f)\<rbrakk> \<Longrightarrow> (f\<dieresis>\<^bsub>F,G\<^esub>) x \<in> f ` carrier F
[PROOF STEP]
apply (simp add:set_rcs_def, erule bexE, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a. \<lbrakk>Group F; Group G; f \<in> gHom F G; a \<in> carrier F; x = gker\<^bsub>F,G\<^esub> f \<bullet>\<^bsub>F\<^esub> a\<rbrakk> \<Longrightarrow> (f\<dieresis>\<^bsub>F,G\<^esub>) (gker\<^bsub>F,G\<^esub> f \<bullet>\<^bsub>F\<^esub> a) \<in> f ` carrier F
[PROOF STEP]
apply (subst inducedHOMTr0[of "F" "G" "f"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x a. \<lbrakk>Group F; Group G; f \<in> gHom F G; a \<in> carrier F; x = gker\<^bsub>F,G\<^esub> f \<bullet>\<^bsub>F\<^esub> a\<rbrakk> \<Longrightarrow> f a \<in> f ` carrier F
[PROOF STEP]
apply (simp add:image_def, blast)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma le_append_swap_iff:
  assumes "length y = length v"
  shows "y @ x \<le>\<^sub>v v @ w  \<longleftrightarrow> x @ y \<le>\<^sub>v w @ v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y @ x \<le>\<^sub>v v @ w) = (x @ y \<le>\<^sub>v w @ v)
[PROOF STEP]
using assms and le_append_swap
[PROOF STATE]
proof (prove)
using this:
length y = length v
\<lbrakk>length ?y = length ?v; ?x @ ?y \<le>\<^sub>v ?w @ ?v\<rbrakk> \<Longrightarrow> ?y @ ?x \<le>\<^sub>v ?v @ ?w

goal (1 subgoal):
 1. (y @ x \<le>\<^sub>v v @ w) = (x @ y \<le>\<^sub>v w @ v)
[PROOF STEP]
by (auto) (metis (no_types, lifting) add_left_imp_eq le_length length_append)


[STATEMENT]
lemma "\<And>s. (\<forall>l. I (l(x:=0)) s) = (\<forall>l. l x = 0 \<longrightarrow> I l s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s. (\<forall>l. I (l(x := 0::'c)) s) = (\<forall>l. l x = (0::'c) \<longrightarrow> I l s)
[PROOF STEP]
apply(auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s l. \<lbrakk>\<forall>l. I (l(x := 0::'c)) s; l x = (0::'c)\<rbrakk> \<Longrightarrow> I l s
[PROOF STEP]
by (metis fun_upd_triv)


[STATEMENT]
lemma parts_UN [simp]: "parts(\<Union>x\<in>A. H x) = (\<Union>x\<in>A. parts(H x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. parts (\<Union> (H ` A)) = (\<Union>x\<in>A. parts (H x))
[PROOF STEP]
by (intro equalityI parts_UN_subset1 parts_UN_subset2)


[STATEMENT]
lemma lossless_xor_funct: "lossless_spmf (xor_funct A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lossless_spmf (xor_funct A B)
[PROOF STEP]
by(simp add: xor_funct_def split_def)


[STATEMENT]
lemma (in Group) rcs_in_set_rcs:"\<lbrakk>G \<guillemotright> H; a \<in> carrier G\<rbrakk> \<Longrightarrow>
          H \<bullet> a \<in> set_rcs G H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G\<rbrakk> \<Longrightarrow> H \<bullet> a \<in> set_rcs G H
[PROOF STEP]
apply (simp add:set_rcs_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; a \<in> carrier G\<rbrakk> \<Longrightarrow> \<exists>aa\<in>carrier G. H \<bullet> a = H \<bullet> aa
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma map2_times_proj:
  "map2 (*) xs (map (proj_poly k) ys) = map (proj_poly k \<circ> (\<lambda>(x, y). x \<odot> y)) (zip xs ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map2 (*) xs (map (proj_poly k) ys) = map (proj_poly k \<circ> (\<lambda>(x, y). x \<odot> y)) (zip xs ys)
[PROOF STEP]
by (rule nth_equalityI, simp_all add: proj_mult_scalar)


[STATEMENT]
lemma take_prefix: "m \<le> n \<Longrightarrow> take m xs \<le> take n xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> take m xs \<le> take n xs
[PROOF STEP]
by (metis Prefix_Order.prefixI append_take_drop_id min_absorb2 take_append take_take)


[STATEMENT]
lemma (in Corps) val_Zmin_sym:"\<lbrakk>valuation K v; x \<in> carrier K; y \<in> carrier K\<rbrakk>
                 \<Longrightarrow>  amin (v x) (v y) = amin (v y ) (v x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; x \<in> carrier K; y \<in> carrier K\<rbrakk> \<Longrightarrow> amin (v x) (v y) = amin (v y) (v x)
[PROOF STEP]
by (simp add:amin_commute)


[STATEMENT]
lemma abundant220ex: "abundant_number 220"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abundant_number 220
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. abundant_number 220
[PROOF STEP]
have "220 Amic 284"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 220 Amic 284
[PROOF STEP]
using Amicable_Example_Pythagoras
[PROOF STATE]
proof (prove)
using this:
220 Amic 284

goal (1 subgoal):
 1. 220 Amic 284
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
220 Amic 284

goal (1 subgoal):
 1. abundant_number 220
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
220 Amic 284

goal (1 subgoal):
 1. abundant_number 220
[PROOF STEP]
have "(220::nat) < 284"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 220 < 284
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
220 < 284

goal (1 subgoal):
 1. abundant_number 220
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
220 Amic 284
220 < 284
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
220 Amic 284
220 < 284

goal (1 subgoal):
 1. abundant_number 220
[PROOF STEP]
using Amicable_pair_abundant Amicable_pair_sym
[PROOF STATE]
proof (prove)
using this:
220 Amic 284
220 < 284
\<lbrakk>?n < ?m; ?m Amic ?n\<rbrakk> \<Longrightarrow> abundant_number ?n
?m Amic ?n \<Longrightarrow> ?n Amic ?m

goal (1 subgoal):
 1. abundant_number 220
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
abundant_number 220

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_field_derivative_Beta2 [derivative_intros]:
  assumes "y \<notin> \<int>\<^sub>\<le>\<^sub>0" "x + y \<notin> \<int>\<^sub>\<le>\<^sub>0"
  shows   "((\<lambda>y. Beta x y) has_field_derivative (Beta x y * (Digamma y - Digamma (x + y))))
               (at y within A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Beta x has_field_derivative Beta x y * (Digamma y - Digamma (x + y))) (at y within A)
[PROOF STEP]
using has_field_derivative_Beta1[of y x A] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>y \<notin> \<int>\<^sub>\<le>\<^sub>0; y + x \<notin> \<int>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> ((\<lambda>xa. Beta xa x) has_field_derivative Beta y x * (Digamma y - Digamma (y + x))) (at y within A)
y \<notin> \<int>\<^sub>\<le>\<^sub>0
x + y \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. (Beta x has_field_derivative Beta x y * (Digamma y - Digamma (x + y))) (at y within A)
[PROOF STEP]
by (simp add: Beta_commute add_ac)


[STATEMENT]
lemma P920_example_gfp_F_match_value:
  shows "P920_example.match (P920_example_gfp_F UNIV) = {(D1, H1), (D2, H2)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P920_example.match (P920_example_gfp_F UNIV) = {(D1, H1), (D2, H2)}
[PROOF STEP]
unfolding P920_example_gfp_F_value
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P920_example.match ({(D1, H1), (D1, H2), (D2, H2)}, {(D1, H1), (D2, H1), (D2, H2)}) = {(D1, H1), (D2, H2)}
[PROOF STEP]
by simp


[STATEMENT]
lemma stream_rel_coinduct[case_names stream_rel, coinduct pred: stream_all2]:
    assumes "R u v"
    assumes "\<And> a u b v. R (a ## u) (b ## v) \<Longrightarrow> P a b \<and> R u v"
    shows "stream_all2 P u v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stream_all2 P u v
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
R u v
R (?a ## ?u) (?b ## ?v) \<Longrightarrow> P ?a ?b \<and> R ?u ?v

goal (1 subgoal):
 1. stream_all2 P u v
[PROOF STEP]
by (coinduct) (metis stream.collapse)


[STATEMENT]
lemma small_det_csmall_det:
assumes "\<forall>\<sigma>. small P \<sigma> = {} \<or> (\<exists>\<sigma>'. small P \<sigma> = {\<sigma>'})"
shows "\<forall>\<sigma>. csmall P \<sigma> = {} \<or> (\<exists>o'. csmall P \<sigma> = {o'})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<sigma>. csmall P \<sigma> = {} \<or> (\<exists>o'. csmall P \<sigma> = {o'})
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>\<sigma>. small P \<sigma> = {} \<or> (\<exists>\<sigma>'. small P \<sigma> = {\<sigma>'})

goal (1 subgoal):
 1. \<forall>\<sigma>. csmall P \<sigma> = {} \<or> (\<exists>o'. csmall P \<sigma> = {o'})
[PROOF STEP]
by(fastforce simp: csmall_def)


[STATEMENT]
lemma vector_smult_lzero[simp]: "(0::'a::mult_zero) *s x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) *s x = 0
[PROOF STEP]
by vector


[STATEMENT]
lemma sin_minus_converges: "(\<lambda>n. - (sin_coeff n *\<^sub>R (-x)^n)) sums sin x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. - (sin_coeff n *\<^sub>R (- x) ^ n)) sums sin x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. - (sin_coeff n *\<^sub>R (- x) ^ n)) sums sin x
[PROOF STEP]
have [simp]: "\<And>n. - (sin_coeff n *\<^sub>R (-x)^n) = (sin_coeff n *\<^sub>R x^n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. - (sin_coeff n *\<^sub>R (- x) ^ n) = sin_coeff n *\<^sub>R x ^ n
[PROOF STEP]
by (auto simp: sin_coeff_def elim!: oddE)
[PROOF STATE]
proof (state)
this:
- (sin_coeff ?n *\<^sub>R (- x) ^ ?n) = sin_coeff ?n *\<^sub>R x ^ ?n

goal (1 subgoal):
 1. (\<lambda>n. - (sin_coeff n *\<^sub>R (- x) ^ n)) sums sin x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. - (sin_coeff n *\<^sub>R (- x) ^ n)) sums sin x
[PROOF STEP]
by (simp add: sin_def summable_norm_sin [THEN summable_norm_cancel, THEN summable_sums])
[PROOF STATE]
proof (state)
this:
(\<lambda>n. - (sin_coeff n *\<^sub>R (- x) ^ n)) sums sin x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "~~P & ~~(P --> Q) --> ~~Q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> \<not> P \<and> \<not> \<not> (P \<longrightarrow> Q) \<longrightarrow> \<not> \<not> Q
[PROOF STEP]
by iprover


[STATEMENT]
lemma op_cf_cf_la_of_ra_op[cat_op_simps]:
  "op_cf (cf_la_of_ra F (op_cf \<FF>) \<epsilon>) = cf_ra_of_la F \<FF> \<epsilon>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. op_cf (cf_la_of_ra F (op_cf \<FF>) \<epsilon>) = cf_ra_of_la F \<FF> \<epsilon>
[PROOF STEP]
unfolding cf_ra_of_la_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. op_cf (cf_la_of_ra F (op_cf \<FF>) \<epsilon>) = op_cf (cf_la_of_ra F (op_cf \<FF>) \<epsilon>)
[PROOF STEP]
by simp


[STATEMENT]
lemma permutations_of_set_lists: "permutations_of_set A \<subseteq> lists A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. permutations_of_set A \<subseteq> lists A
[PROOF STEP]
unfolding permutations_of_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {xs. set xs = A \<and> distinct xs} \<subseteq> lists A
[PROOF STEP]
by auto


[STATEMENT]
lemma rbt_lookup_fold_rbt_insert_impl:
  "rbt_sorted t2 \<Longrightarrow>
  rbt_lookup (RBT_Impl.fold rbt_insert t1 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t1 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t1))
[PROOF STEP]
proof(induction t1 arbitrary: t2)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert rbt.Empty t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries rbt.Empty))
 2. \<And>x1 t11 x3 x4 t12 t2. \<lbrakk>\<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t11 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t11)); \<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t12 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t12)); rbt_sorted t2\<rbrakk> \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert (Branch x1 t11 x3 x4 t12) t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries (Branch x1 t11 x3 x4 t12)))
[PROOF STEP]
case Empty
[PROOF STATE]
proof (state)
this:
rbt_sorted t2

goal (2 subgoals):
 1. \<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert rbt.Empty t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries rbt.Empty))
 2. \<And>x1 t11 x3 x4 t12 t2. \<lbrakk>\<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t11 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t11)); \<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t12 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t12)); rbt_sorted t2\<rbrakk> \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert (Branch x1 t11 x3 x4 t12) t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries (Branch x1 t11 x3 x4 t12)))
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
rbt_sorted t2

goal (1 subgoal):
 1. rbt_lookup (RBT_Impl.fold rbt_insert rbt.Empty t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries rbt.Empty))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rbt_lookup (RBT_Impl.fold rbt_insert rbt.Empty t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries rbt.Empty))

goal (1 subgoal):
 1. \<And>x1 t11 x3 x4 t12 t2. \<lbrakk>\<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t11 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t11)); \<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t12 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t12)); rbt_sorted t2\<rbrakk> \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert (Branch x1 t11 x3 x4 t12) t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries (Branch x1 t11 x3 x4 t12)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x1 t11 x3 x4 t12 t2. \<lbrakk>\<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t11 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t11)); \<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t12 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t12)); rbt_sorted t2\<rbrakk> \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert (Branch x1 t11 x3 x4 t12) t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries (Branch x1 t11 x3 x4 t12)))
[PROOF STEP]
case (Branch c l x k r)
[PROOF STATE]
proof (state)
this:
rbt_sorted ?t2.0 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert l ?t2.0) = rbt_lookup ?t2.0 ++ map_of (rev (RBT_Impl.entries l))
rbt_sorted ?t2.0 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert r ?t2.0) = rbt_lookup ?t2.0 ++ map_of (rev (RBT_Impl.entries r))
rbt_sorted t2

goal (1 subgoal):
 1. \<And>x1 t11 x3 x4 t12 t2. \<lbrakk>\<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t11 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t11)); \<And>t2. rbt_sorted t2 \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert t12 t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries t12)); rbt_sorted t2\<rbrakk> \<Longrightarrow> rbt_lookup (RBT_Impl.fold rbt_insert (Branch x1 t11 x3 x4 t12) t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries (Branch x1 t11 x3 x4 t12)))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rbt_lookup (RBT_Impl.fold rbt_insert (Branch c l x k r) t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries (Branch c l x k r)))
[PROOF STEP]
using Branch.prems
[PROOF STATE]
proof (prove)
using this:
rbt_sorted t2

goal (1 subgoal):
 1. rbt_lookup (RBT_Impl.fold rbt_insert (Branch c l x k r) t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries (Branch c l x k r)))
[PROOF STEP]
by(simp add: map_add_def Branch.IH rbt_insert_rbt_sorted rbt_sorted_fold_insert rbt_lookup_rbt_insert' fun_eq_iff split: option.split)
[PROOF STATE]
proof (state)
this:
rbt_lookup (RBT_Impl.fold rbt_insert (Branch c l x k r) t2) = rbt_lookup t2 ++ map_of (rev (RBT_Impl.entries (Branch c l x k r)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma swap_length[simp]: "length (swap l i j) = length l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (swap l i j) = length l
[PROOF STEP]
unfolding swap_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (l[i := l ! j, j := l ! i]) = length l
[PROOF STEP]
by auto


[STATEMENT]
lemma min_set_obtains_helper:
  "A \<in> B \<Longrightarrow> \<exists>C. C |\<subseteq>| A \<and> C \<in> min_set B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<in> B \<Longrightarrow> \<exists>C. C |\<subseteq>| A \<and> C \<in> min_set B
[PROOF STEP]
proof (induction "fcard A" arbitrary: A rule: less_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A. \<lbrakk>\<And>Aa. \<lbrakk>fcard Aa < fcard A; Aa \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| Aa \<and> C \<in> min_set B; A \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| A \<and> C \<in> min_set B
[PROOF STEP]
case less
[PROOF STATE]
proof (state)
this:
\<lbrakk>fcard ?A < fcard A; ?A \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| ?A \<and> C \<in> min_set B
A \<in> B

goal (1 subgoal):
 1. \<And>A. \<lbrakk>\<And>Aa. \<lbrakk>fcard Aa < fcard A; Aa \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| Aa \<and> C \<in> min_set B; A \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| A \<and> C \<in> min_set B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>fcard ?A < fcard A; ?A \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| ?A \<and> C \<in> min_set B
A \<in> B
[PROOF STEP]
have "(\<forall>A'. A' \<notin> B \<or> \<not> A' |\<subseteq>| A \<or> A' = A) \<or> (\<exists>A'. A' |\<subseteq>| A \<and> A' \<in> min_set B)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>fcard ?A < fcard A; ?A \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| ?A \<and> C \<in> min_set B
A \<in> B

goal (1 subgoal):
 1. (\<forall>A'. A' \<notin> B \<or> \<not> A' |\<subseteq>| A \<or> A' = A) \<or> (\<exists>A'. A' |\<subseteq>| A \<and> A' \<in> min_set B)
[PROOF STEP]
by (metis (no_types) dual_order.trans order.not_eq_order_implies_strict pfsubset_fcard_mono)
[PROOF STATE]
proof (state)
this:
(\<forall>A'. A' \<notin> B \<or> \<not> A' |\<subseteq>| A \<or> A' = A) \<or> (\<exists>A'. A' |\<subseteq>| A \<and> A' \<in> min_set B)

goal (1 subgoal):
 1. \<And>A. \<lbrakk>\<And>Aa. \<lbrakk>fcard Aa < fcard A; Aa \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| Aa \<and> C \<in> min_set B; A \<in> B\<rbrakk> \<Longrightarrow> \<exists>C. C |\<subseteq>| A \<and> C \<in> min_set B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<forall>A'. A' \<notin> B \<or> \<not> A' |\<subseteq>| A \<or> A' = A) \<or> (\<exists>A'. A' |\<subseteq>| A \<and> A' \<in> min_set B)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(\<forall>A'. A' \<notin> B \<or> \<not> A' |\<subseteq>| A \<or> A' = A) \<or> (\<exists>A'. A' |\<subseteq>| A \<and> A' \<in> min_set B)

goal (1 subgoal):
 1. \<exists>C. C |\<subseteq>| A \<and> C \<in> min_set B
[PROOF STEP]
using less.prems min_set_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>A'. A' \<notin> B \<or> \<not> A' |\<subseteq>| A \<or> A' = A) \<or> (\<exists>A'. A' |\<subseteq>| A \<and> A' \<in> min_set B)
A \<in> B
min_set ?X = {y \<in> ?X. \<forall>x\<in>?X. x \<le> y \<longrightarrow> x = y}

goal (1 subgoal):
 1. \<exists>C. C |\<subseteq>| A \<and> C \<in> min_set B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>C. C |\<subseteq>| A \<and> C \<in> min_set B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rcis_mult_cis[simp]: "rcis n a * cis b = rcis n (a + b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rcis n a * cis b = rcis n (a + b)
[PROOF STEP]
unfolding cis_rcis_eq rcis_mult
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rcis (n * 1) (a + b) = rcis n (a + b)
[PROOF STEP]
by simp


[STATEMENT]
lemma RPDs_code[code]: "RPDs r = RPDs_aux {r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. RPDs r = RPDs_aux {r}
[PROOF STEP]
unfolding RPDs_aux_def RPDs_code
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. saturate (\<lambda>S. insert r S \<union> (insert r S \<bind> RPD)) {} = saturate (\<lambda>S. S \<union> \<Union> (RPD ` S)) {r}
[PROOF STEP]
by (rule saturate_commute[where C="RPDs r"])
     (auto 0 3 simp: mono_def subset_singleton_iff RPDs_refl RPDs_trans finite_RPDs)


[STATEMENT]
lemma finite_fun_graph:
  "finite A \<Longrightarrow> finite (fun_graph f \<inter> (A \<times> UNIV))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> finite (fun_graph f \<inter> A \<times> UNIV)
[PROOF STEP]
apply(rule bij_betw_finite[where A=A and f="\<lambda>x. (x, f x)", THEN iffD1])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. finite A \<Longrightarrow> bij_betw (\<lambda>x. (x, f x)) A (fun_graph f \<inter> A \<times> UNIV)
 2. finite A \<Longrightarrow> finite A
[PROOF STEP]
by(auto simp add: fun_graph_def bij_betw_def inj_on_def)


[STATEMENT]
lemma lset_llist_of [simp]: "lset (llist_of xs) = set xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lset (llist_of xs) = set xs
[PROOF STEP]
by(induct xs) simp_all


[STATEMENT]
lemma le_err_antisym [rule_format]:
  "order r \<Longrightarrow> e1 \<sqsubseteq>\<^bsub>le r\<^esub> e2 \<longrightarrow> e2 \<sqsubseteq>\<^bsub>le r\<^esub> e1 \<longrightarrow> e1=e2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order r \<Longrightarrow> e1 \<sqsubseteq>\<^bsub>le r\<^esub> e2 \<longrightarrow> e2 \<sqsubseteq>\<^bsub>le r\<^esub> e1 \<longrightarrow> e1 = e2
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order r \<Longrightarrow> e1 \<sqsubseteq>\<^bsub>le r\<^esub> e2 \<longrightarrow> e2 \<sqsubseteq>\<^bsub>le r\<^esub> e1 \<longrightarrow> e1 = e2
[PROOF STEP]
apply (unfold unfold_lesub_err le_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order r \<Longrightarrow> (case e2 of Err \<Rightarrow> True | OK y \<Rightarrow> case e1 of Err \<Rightarrow> False | OK x \<Rightarrow> x \<sqsubseteq>\<^bsub>r\<^esub> y) \<longrightarrow> (case e1 of Err \<Rightarrow> True | OK y \<Rightarrow> case e2 of Err \<Rightarrow> False | OK x \<Rightarrow> x \<sqsubseteq>\<^bsub>r\<^esub> y) \<longrightarrow> e1 = e2
[PROOF STEP]
apply (simp split: err.split)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order r \<Longrightarrow> \<forall>x2. e1 = OK x2 \<longrightarrow> (\<forall>x2a. e2 = OK x2a \<longrightarrow> x2 \<sqsubseteq>\<^bsub>r\<^esub> x2a \<longrightarrow> x2a \<sqsubseteq>\<^bsub>r\<^esub> x2 \<longrightarrow> x2 = x2a)
[PROOF STEP]
apply (blast intro: order_antisym)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma prod_list_nonneg:
  fixes xs :: "('a :: {ordered_semiring_0,linordered_nonzero_semiring}) list"
  assumes "\<And>x. x \<in> set xs \<Longrightarrow> x \<ge> 0"
  shows "prod_list xs \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) \<le> prod_list xs
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> set xs \<Longrightarrow> (0::'a) \<le> ?x

goal (1 subgoal):
 1. (0::'a) \<le> prod_list xs
[PROOF STEP]
by (induct xs) auto


[STATEMENT]
lemma Reals_in_Complexs: "\<real> \<subseteq> \<complex>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<real> \<subseteq> \<complex>
[PROOF STEP]
unfolding Reals_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range of_real \<subseteq> \<complex>
[PROOF STEP]
by auto


[STATEMENT]
lemma nn_integral_indicator_singleton[simp]:
  assumes [measurable]: "{y} \<in> sets M" shows "(\<integral>\<^sup>+x. f x * indicator {y} x \<partial>M) = f y * emeasure M {y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = f y * emeasure M {y}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = f y * emeasure M {y}
[PROOF STEP]
have "(\<integral>\<^sup>+x. f x * indicator {y} x \<partial>M) = (\<integral>\<^sup>+x. f y * indicator {y} x \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = \<integral>\<^sup>+ x. f y * indicator {y} x \<partial>M
[PROOF STEP]
by (auto intro!: nn_integral_cong split: split_indicator)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = \<integral>\<^sup>+ x. f y * indicator {y} x \<partial>M

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = f y * emeasure M {y}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = \<integral>\<^sup>+ x. f y * indicator {y} x \<partial>M
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = \<integral>\<^sup>+ x. f y * indicator {y} x \<partial>M

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = f y * emeasure M {y}
[PROOF STEP]
by (simp add: nn_integral_cmult)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. f x * indicator {y} x \<partial>M = f y * emeasure M {y}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma simp_Plus_simps[simp]:
  "simp_Plus p1 p2 = (if (fst p1 = Zero) then (fst p2, F_RIGHT (snd p2))
                    else (if (fst p2 = Zero) then (fst p1, F_LEFT (snd p1))
                    else (Plus (fst p1) (fst p2), F_Plus (snd p1) (snd p2))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simp_Plus p1 p2 = (if fst p1 = Zero then (fst p2, F_RIGHT (snd p2)) else if fst p2 = Zero then (fst p1, F_LEFT (snd p1)) else (Plus (fst p1) (fst p2), F_Plus (snd p1) (snd p2)))
[PROOF STEP]
by (induct p1 p2 rule: simp_Plus.induct) (auto)


[STATEMENT]
lemma subst_cls_lists_length[simp]: "length (Cs \<cdot>\<cdot>cl \<sigma>s) = min (length Cs) (length \<sigma>s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (Cs \<cdot>\<cdot>cl \<sigma>s) = min (length Cs) (length \<sigma>s)
[PROOF STEP]
unfolding subst_cls_lists_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (Map2.map2 (\<cdot>) Cs \<sigma>s) = min (length Cs) (length \<sigma>s)
[PROOF STEP]
by auto