[STATEMENT]
lemma distr_convolution_real:
  assumes "has_density M lborel (f :: (real \<times> real) \<Rightarrow> ennreal)"
  shows "has_density (distr M borel (case_prod (+))) lborel (\<lambda>z. \<integral>\<^sup>+x. f (x, z - x) \<partial>lborel)"
            (is "has_density ?M' _ ?f'")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. has_density (distr M borel (\<lambda>(x, y). x + y)) lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel) \<in> borel_measurable lborel
 2. distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
 3. space lborel \<noteq> {}
[PROOF STEP]
from has_densityD[OF assms]
[PROOF STATE]
proof (chain)
picking this:
f \<in> borel_measurable lborel
M = density lborel f
space lborel \<noteq> {}
[PROOF STEP]
have Mf[measurable]: "f \<in> borel_measurable borel"
[PROOF STATE]
proof (prove)
using this:
f \<in> borel_measurable lborel
M = density lborel f
space lborel \<noteq> {}

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

goal (3 subgoals):
 1. (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel) \<in> borel_measurable lborel
 2. distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
 3. space lborel \<noteq> {}
[PROOF STEP]
show Mf': "(\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel) \<in> borel_measurable lborel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel) \<in> borel_measurable lborel
[PROOF STEP]
by measurable
[PROOF STATE]
proof (state)
this:
(\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel) \<in> borel_measurable lborel

goal (2 subgoals):
 1. distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
 2. space lborel \<noteq> {}
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
has_density M lborel f
[PROOF STEP]
have sets_M: "sets M = sets borel"
[PROOF STATE]
proof (prove)
using this:
has_density M lborel f

goal (1 subgoal):
 1. sets M = sets borel
[PROOF STEP]
by (auto dest: has_densityD)
[PROOF STATE]
proof (state)
this:
sets M = sets borel

goal (2 subgoals):
 1. distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
 2. space lborel \<noteq> {}
[PROOF STEP]
hence [simp]: "space M = UNIV"
[PROOF STATE]
proof (prove)
using this:
sets M = sets borel

goal (1 subgoal):
 1. space M = UNIV
[PROOF STEP]
by (subst sets_eq_imp_space_eq[OF sets_M]) simp
[PROOF STATE]
proof (state)
this:
space M = UNIV

goal (2 subgoals):
 1. distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
 2. space lborel \<noteq> {}
[PROOF STEP]
from sets_M
[PROOF STATE]
proof (chain)
picking this:
sets M = sets borel
[PROOF STEP]
have [simp]: "measurable M = measurable borel"
[PROOF STATE]
proof (prove)
using this:
sets M = sets borel

goal (1 subgoal):
 1. (\<rightarrow>\<^sub>M) M = (\<rightarrow>\<^sub>M) borel
[PROOF STEP]
by (intro ext measurable_cong_sets) simp_all
[PROOF STATE]
proof (state)
this:
(\<rightarrow>\<^sub>M) M = (\<rightarrow>\<^sub>M) borel

goal (2 subgoals):
 1. distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
 2. space lborel \<noteq> {}
[PROOF STEP]
have M_add: "case_prod (+) \<in> borel_measurable (borel :: (real \<times> real) measure)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, y). x + y) \<in> borel_measurable borel
[PROOF STEP]
by (simp add: borel_prod[symmetric])
[PROOF STATE]
proof (state)
this:
(\<lambda>(x, y). x + y) \<in> borel_measurable borel

goal (2 subgoals):
 1. distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
 2. space lborel \<noteq> {}
[PROOF STEP]
show "distr M borel (case_prod (+)) = density lborel ?f'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)
[PROOF STEP]
proof (rule measure_eqI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
fix X :: "real set"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
assume X[measurable]: "X \<in> sets (distr M borel (case_prod (+)))"
[PROOF STATE]
proof (state)
this:
X \<in> sets (distr M borel (\<lambda>(x, y). x + y))

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
hence "emeasure (distr M borel (case_prod (+))) X = emeasure M ((\<lambda>(x, y). x + y) -` X)"
[PROOF STATE]
proof (prove)
using this:
X \<in> sets (distr M borel (\<lambda>(x, y). x + y))

goal (1 subgoal):
 1. emeasure (distr M borel (\<lambda>(x, y). x + y)) X = emeasure M ((\<lambda>(x, y). x + y) -` X)
[PROOF STEP]
by (simp_all add: M_add emeasure_distr)
[PROOF STATE]
proof (state)
this:
emeasure (distr M borel (\<lambda>(x, y). x + y)) X = emeasure M ((\<lambda>(x, y). x + y) -` X)

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure (distr M borel (\<lambda>(x, y). x + y)) X = emeasure M ((\<lambda>(x, y). x + y) -` X)

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
from X
[PROOF STATE]
proof (chain)
picking this:
X \<in> sets (distr M borel (\<lambda>(x, y). x + y))
[PROOF STEP]
have "... = \<integral>\<^sup>+z. f z * indicator ((\<lambda>(x, y). x + y) -` X) z \<partial>(lborel \<Otimes>\<^sub>M lborel)"
[PROOF STATE]
proof (prove)
using this:
X \<in> sets (distr M borel (\<lambda>(x, y). x + y))

goal (1 subgoal):
 1. emeasure M ((\<lambda>(x, y). x + y) -` X) = set_nn_integral (lborel \<Otimes>\<^sub>M lborel) ((\<lambda>(x, y). x + y) -` X) f
[PROOF STEP]
by (simp add: emeasure_density has_densityD[OF assms]
                     measurable_sets_borel[OF M_add] lborel_prod)
[PROOF STATE]
proof (state)
this:
emeasure M ((\<lambda>(x, y). x + y) -` X) = set_nn_integral (lborel \<Otimes>\<^sub>M lborel) ((\<lambda>(x, y). x + y) -` X) f

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M ((\<lambda>(x, y). x + y) -` X) = set_nn_integral (lborel \<Otimes>\<^sub>M lborel) ((\<lambda>(x, y). x + y) -` X) f

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
have "... = \<integral>\<^sup>+x. \<integral>\<^sup>+y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x,y) \<partial>lborel \<partial>lborel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_nn_integral (lborel \<Otimes>\<^sub>M lborel) ((\<lambda>(x, y). x + y) -` X) f = \<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>lborel \<partial>lborel
[PROOF STEP]
apply (rule lborel.nn_integral_fst[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. f z * indicator ((\<lambda>(x, y). x + y) -` X) z) \<in> borel_measurable (lborel \<Otimes>\<^sub>M lborel)
[PROOF STEP]
apply measurable
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (\<lambda>x. x) \<in> borel_measurable (borel \<Otimes>\<^sub>M borel)
 2. indicator ((\<lambda>(x, y). x + y) -` X) \<in> borel_measurable (lborel \<Otimes>\<^sub>M lborel)
[PROOF STEP]
apply (simp_all add: borel_prod)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
set_nn_integral (lborel \<Otimes>\<^sub>M lborel) ((\<lambda>(x, y). x + y) -` X) f = \<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>lborel \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set_nn_integral (lborel \<Otimes>\<^sub>M lborel) ((\<lambda>(x, y). x + y) -` X) f = \<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>lborel \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
have "... = \<integral>\<^sup>+x. \<integral>\<^sup>+y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x,y)
                          \<partial>distr lborel borel ((+) (-x)) \<partial>lborel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>lborel \<partial>lborel = \<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>distr lborel borel ((+) (- x)) \<partial>lborel
[PROOF STEP]
by (rule nn_integral_cong, subst lborel_distr_plus) simp
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>lborel \<partial>lborel = \<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>distr lborel borel ((+) (- x)) \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>lborel \<partial>lborel = \<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>distr lborel borel ((+) (- x)) \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
have "... = \<integral>\<^sup>+x. \<integral>\<^sup>+z. f (x, z-x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z-x)
                          \<partial>lborel \<partial>lborel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>distr lborel borel ((+) (- x)) \<partial>lborel = \<integral>\<^sup>+ x. \<integral>\<^sup>+ z. f (x, z - x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z - x) \<partial>lborel \<partial>lborel
[PROOF STEP]
apply (rule nn_integral_cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> space lborel \<Longrightarrow> \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>distr lborel borel ((+) (- x)) = \<integral>\<^sup>+ z. f (x, z - x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z - x) \<partial>lborel
[PROOF STEP]
apply (subst nn_integral_distr)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. x \<in> space lborel \<Longrightarrow> (+) (- x) \<in> borel_measurable lborel
 2. \<And>x. x \<in> space lborel \<Longrightarrow> (\<lambda>y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y)) \<in> borel_measurable (distr lborel borel ((+) (- x)))
 3. \<And>x. x \<in> space lborel \<Longrightarrow> \<integral>\<^sup>+ xa. f (x, - x + xa) * indicator ((\<lambda>(x, y). x + y) -` X) (x, - x + xa) \<partial>lborel = \<integral>\<^sup>+ z. f (x, z - x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z - x) \<partial>lborel
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (\<lambda>y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y)) \<in> borel_measurable borel
[PROOF STEP]
apply measurable
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> space (?M1.20 x)
 2. \<And>x. (\<lambda>x. x) \<in> borel_measurable borel
[PROOF STEP]
apply (subst space_count_space)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> ?y24 x x
 2. \<And>x. (\<lambda>x. x) \<in> borel_measurable borel
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>distr lborel borel ((+) (- x)) \<partial>lborel = \<integral>\<^sup>+ x. \<integral>\<^sup>+ z. f (x, z - x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z - x) \<partial>lborel \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. \<integral>\<^sup>+ y. f (x, y) * indicator ((\<lambda>(x, y). x + y) -` X) (x, y) \<partial>distr lborel borel ((+) (- x)) \<partial>lborel = \<integral>\<^sup>+ x. \<integral>\<^sup>+ z. f (x, z - x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z - x) \<partial>lborel \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
have "... = \<integral>\<^sup>+x. \<integral>\<^sup>+z. f (x, z-x) * indicator X z \<partial>lborel \<partial>lborel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. \<integral>\<^sup>+ z. f (x, z - x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z - x) \<partial>lborel \<partial>lborel = \<integral>\<^sup>+ x. (\<integral>\<^sup>+z\<in>X. f (x, z - x)\<partial>lborel) \<partial>lborel
[PROOF STEP]
by (intro nn_integral_cong) (simp split: split_indicator)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. \<integral>\<^sup>+ z. f (x, z - x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z - x) \<partial>lborel \<partial>lborel = \<integral>\<^sup>+ x. (\<integral>\<^sup>+z\<in>X. f (x, z - x)\<partial>lborel) \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. \<integral>\<^sup>+ z. f (x, z - x) * indicator ((\<lambda>(x, y). x + y) -` X) (x, z - x) \<partial>lborel \<partial>lborel = \<integral>\<^sup>+ x. (\<integral>\<^sup>+z\<in>X. f (x, z - x)\<partial>lborel) \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
have "... = \<integral>\<^sup>+z. \<integral>\<^sup>+x. f (x, z-x) * indicator X z \<partial>lborel \<partial>lborel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. (\<integral>\<^sup>+z\<in>X. f (x, z - x)\<partial>lborel) \<partial>lborel = \<integral>\<^sup>+ z. \<integral>\<^sup>+ x. f (x, z - x) * indicator X z \<partial>lborel \<partial>lborel
[PROOF STEP]
using X
[PROOF STATE]
proof (prove)
using this:
X \<in> sets (distr M borel (\<lambda>(x, y). x + y))

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. (\<integral>\<^sup>+z\<in>X. f (x, z - x)\<partial>lborel) \<partial>lborel = \<integral>\<^sup>+ z. \<integral>\<^sup>+ x. f (x, z - x) * indicator X z \<partial>lborel \<partial>lborel
[PROOF STEP]
by (subst lborel_pair.Fubini')
         (simp_all add: pair_sigma_finite_def)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. (\<integral>\<^sup>+z\<in>X. f (x, z - x)\<partial>lborel) \<partial>lborel = \<integral>\<^sup>+ z. \<integral>\<^sup>+ x. f (x, z - x) * indicator X z \<partial>lborel \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. (\<integral>\<^sup>+z\<in>X. f (x, z - x)\<partial>lborel) \<partial>lborel = \<integral>\<^sup>+ z. \<integral>\<^sup>+ x. f (x, z - x) * indicator X z \<partial>lborel \<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
have "... = \<integral>\<^sup>+z. (\<integral>\<^sup>+x. f (x, z-x) \<partial>lborel) * indicator X z \<partial>lborel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ z. \<integral>\<^sup>+ x. f (x, z - x) * indicator X z \<partial>lborel \<partial>lborel = \<integral>\<^sup>+z\<in>X. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel\<partial>lborel
[PROOF STEP]
by (rule nn_integral_cong) (simp split: split_indicator)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ z. \<integral>\<^sup>+ x. f (x, z - x) * indicator X z \<partial>lborel \<partial>lborel = \<integral>\<^sup>+z\<in>X. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel\<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ z. \<integral>\<^sup>+ x. f (x, z - x) * indicator X z \<partial>lborel \<partial>lborel = \<integral>\<^sup>+z\<in>X. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel\<partial>lborel

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
have "... = emeasure (density lborel ?f') X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+z\<in>X. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel\<partial>lborel = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) X
[PROOF STEP]
using X
[PROOF STATE]
proof (prove)
using this:
X \<in> sets (distr M borel (\<lambda>(x, y). x + y))

goal (1 subgoal):
 1. \<integral>\<^sup>+z\<in>X. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel\<partial>lborel = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) X
[PROOF STEP]
by (simp add: emeasure_density)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+z\<in>X. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel\<partial>lborel = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) X

goal (2 subgoals):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
 2. \<And>A. A \<in> sets (distr M borel (\<lambda>(x, y). x + y)) \<Longrightarrow> emeasure (distr M borel (\<lambda>(x, y). x + y)) A = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) A
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure (distr M borel (\<lambda>(x, y). x + y)) X = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) X
[PROOF STEP]
show "emeasure (distr M borel (case_prod (+))) X = emeasure (density lborel ?f') X"
[PROOF STATE]
proof (prove)
using this:
emeasure (distr M borel (\<lambda>(x, y). x + y)) X = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) X

goal (1 subgoal):
 1. emeasure (distr M borel (\<lambda>(x, y). x + y)) X = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) X
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
emeasure (distr M borel (\<lambda>(x, y). x + y)) X = emeasure (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)) X

goal (1 subgoal):
 1. sets (distr M borel (\<lambda>(x, y). x + y)) = sets (density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel))
[PROOF STEP]
qed (insert assms, auto dest: has_densityD)
[PROOF STATE]
proof (state)
this:
distr M borel (\<lambda>(x, y). x + y) = density lborel (\<lambda>z. \<integral>\<^sup>+ x. f (x, z - x) \<partial>lborel)

goal (1 subgoal):
 1. space lborel \<noteq> {}
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma vsubstAbs_substAbs_compose1:
assumes "goodAbs A" and "good Y"
shows "((A $[Y / y]_ys) $[y1 // y]_ys) = (A $[(Y #[y1 // y]_ys) / y]_ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $[Y / y]_ys $[y1 // y]_ys = A $[Y #[y1 // y]_ys / y]_ys
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
goodAbs A
good Y

goal (1 subgoal):
 1. A $[Y / y]_ys $[y1 // y]_ys = A $[Y #[y1 // y]_ys / y]_ys
[PROOF STEP]
unfolding vsubstAbs_def vsubst_def
[PROOF STATE]
proof (prove)
using this:
goodAbs A
good Y

goal (1 subgoal):
 1. A $[Y / y]_ys $[Var ys y1 / y]_ys = A $[Y #[Var ys y1 / y]_ys / y]_ys
[PROOF STEP]
by(simp add: substAbs_compose1)


[STATEMENT]
lemma linepath_image0_right_open_real:
  assumes "t < (t'::real)"
  shows "linepath t t' ` {0..<1} = {t..<t'}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linepath t t' ` {0..<1} = {t..<t'}
[PROOF STEP]
unfolding linepath_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (1 - x) *\<^sub>R t + x *\<^sub>R t') ` {0..<1} = {t..<t'}
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xa. \<lbrakk>0 \<le> xa; xa < 1\<rbrakk> \<Longrightarrow> t \<le> (1 - xa) * t + xa * t'
 2. \<And>xa. \<lbrakk>0 \<le> xa; xa < 1\<rbrakk> \<Longrightarrow> (1 - xa) * t + xa * t' < t'
 3. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
apply (metis add.commute add_diff_cancel_left' assms diff_diff_eq2 diff_le_eq less_eq_real_def mult.commute mult.right_neutral mult_right_mono right_diff_distrib')
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>xa. \<lbrakk>0 \<le> xa; xa < 1\<rbrakk> \<Longrightarrow> (1 - xa) * t + xa * t' < t'
 2. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
apply (smt assms comm_semiring_class.distrib mult_diff_mult semiring_normalization_rules(2) zero_le_mult_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
assume "t \<le> x" "x < t'"
[PROOF STATE]
proof (state)
this:
t \<le> x
x < t'

goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
let ?u = "(x-t)/(t'-t)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
have "?u \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> (x - t) / (t' - t)
[PROOF STEP]
using \<open>t \<le> x\<close> assms
[PROOF STATE]
proof (prove)
using this:
t \<le> x
t < t'

goal (1 subgoal):
 1. 0 \<le> (x - t) / (t' - t)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> (x - t) / (t' - t)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 \<le> (x - t) / (t' - t)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
have "?u < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x - t) / (t' - t) < 1
[PROOF STEP]
by (simp add: \<open>x < t'\<close> assms)
[PROOF STATE]
proof (state)
this:
(x - t) / (t' - t) < 1

goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(x - t) / (t' - t) < 1

goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
have "x = (1-?u) * t + ?u*t'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'
[PROOF STEP]
have f1: "\<forall>r ra. (ra::real) * - r = r * - ra"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>r ra. ra * - r = r * - ra
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>r ra. ra * - r = r * - ra

goal (1 subgoal):
 1. x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'
[PROOF STEP]
have "t + (t' + - t) * ((x + - t) / (t' + - t)) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t + (t' + - t) * ((x + - t) / (t' + - t)) = x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
t < t'

goal (1 subgoal):
 1. t + (t' + - t) * ((x + - t) / (t' + - t)) = x
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
t + (t' + - t) * ((x + - t) / (t' + - t)) = x

goal (1 subgoal):
 1. x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t + (t' + - t) * ((x + - t) / (t' + - t)) = x
[PROOF STEP]
have "t' * ((x + - t) / (t' + - t)) + t * (1 + - ((x + - t) / (t' + - t))) = x"
[PROOF STATE]
proof (prove)
using this:
t + (t' + - t) * ((x + - t) / (t' + - t)) = x

goal (1 subgoal):
 1. t' * ((x + - t) / (t' + - t)) + t * (1 + - ((x + - t) / (t' + - t))) = x
[PROOF STEP]
using f1
[PROOF STATE]
proof (prove)
using this:
t + (t' + - t) * ((x + - t) / (t' + - t)) = x
\<forall>r ra. ra * - r = r * - ra

goal (1 subgoal):
 1. t' * ((x + - t) / (t' + - t)) + t * (1 + - ((x + - t) / (t' + - t))) = x
[PROOF STEP]
by (metis (no_types) add.left_commute distrib_left mult.commute mult.right_neutral)
[PROOF STATE]
proof (state)
this:
t' * ((x + - t) / (t' + - t)) + t * (1 + - ((x + - t) / (t' + - t))) = x

goal (1 subgoal):
 1. x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t' * ((x + - t) / (t' + - t)) + t * (1 + - ((x + - t) / (t' + - t))) = x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
t' * ((x + - t) / (t' + - t)) + t * (1 + - ((x + - t) / (t' + - t))) = x

goal (1 subgoal):
 1. x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'
[PROOF STEP]
by (simp add: mult.commute)
[PROOF STATE]
proof (state)
this:
x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'

goal (1 subgoal):
 1. \<And>x. \<lbrakk>t \<le> x; x < t'\<rbrakk> \<Longrightarrow> x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 \<le> (x - t) / (t' - t)
(x - t) / (t' - t) < 1
x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'
[PROOF STEP]
show "x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}"
[PROOF STATE]
proof (prove)
using this:
0 \<le> (x - t) / (t' - t)
(x - t) / (t' - t) < 1
x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'

goal (1 subgoal):
 1. x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
using atLeastLessThan_iff
[PROOF STATE]
proof (prove)
using this:
0 \<le> (x - t) / (t' - t)
(x - t) / (t' - t) < 1
x = (1 - (x - t) / (t' - t)) * t + (x - t) / (t' - t) * t'
(?i \<in> {?l..<?u}) = (?l \<le> ?i \<and> ?i < ?u)

goal (1 subgoal):
 1. x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> (\<lambda>x. (1 - x) * t + x * t') ` {0..<1}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mono2mono_eadd[THEN lfp.mono2mono2, cont_intro, simp]:
  shows monotone_eadd: "monotone (rel_prod (\<le>) (\<le>)) (\<le>) (\<lambda>(x, y). x + y :: enat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monotone (rel_prod (\<le>) (\<le>)) (\<le>) (\<lambda>(x, y). x + y)
[PROOF STEP]
by(simp add: monotone_eadd1 monotone_eadd2)


[STATEMENT]
lemma monomial_0I:
  assumes "c = 0"
  shows "monomial c t = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monomial c t = 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
c = (0::'a)

goal (1 subgoal):
 1. monomial c t = 0
[PROOF STEP]
by transfer (auto)


[STATEMENT]
lemma conv_radius_geI_ex':
  fixes f :: "nat \<Rightarrow> 'a :: {banach, real_normed_div_algebra}"
  assumes "\<And>r. 0 < r \<Longrightarrow> ereal r < R \<Longrightarrow> summable (\<lambda>n. f n * of_real r^n)"
  shows   "conv_radius f \<ge> R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R \<le> conv_radius f
[PROOF STEP]
proof (rule conv_radius_geI_ex)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. \<lbrakk>0 < r; ereal r < R\<rbrakk> \<Longrightarrow> \<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
fix r
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. \<lbrakk>0 < r; ereal r < R\<rbrakk> \<Longrightarrow> \<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
assume "0 < r" "ereal r < R"
[PROOF STATE]
proof (state)
this:
0 < r
ereal r < R

goal (1 subgoal):
 1. \<And>r. \<lbrakk>0 < r; ereal r < R\<rbrakk> \<Longrightarrow> \<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
with assms[of r]
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < r; ereal r < R\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * of_real r ^ n)
0 < r
ereal r < R
[PROOF STEP]
show "\<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z ^ n)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < r; ereal r < R\<rbrakk> \<Longrightarrow> summable (\<lambda>n. f n * of_real r ^ n)
0 < r
ereal r < R

goal (1 subgoal):
 1. \<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
by (intro exI[of _ "of_real r :: 'a"]) auto
[PROOF STATE]
proof (state)
this:
\<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z ^ n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nth_map2[simp]:
assumes "length bl = length al" and "i < length al"
shows "(map2 f al bl) ! i = f (al!i) (bl!i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map2 f al bl ! i = f (al ! i) (bl ! i)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length bl = length al
i < length al

goal (1 subgoal):
 1. map2 f al bl ! i = f (al ! i) (bl ! i)
[PROOF STEP]
by auto


[STATEMENT]
lemma le_zero_iff_zero_pprt: "a \<le> 0 \<longleftrightarrow> pprt a = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<le> (0::'a)) = (pprt a = (0::'a))
[PROOF STEP]
unfolding le_iff_sup
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sup a (0::'a) = (0::'a)) = (pprt a = (0::'a))
[PROOF STEP]
by (simp add: pprt_def sup_commute)


[STATEMENT]
lemma s2_gt_0: "s\<^sub>2 > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < s\<^sub>2
[PROOF STEP]
using \<epsilon>_range
[PROOF STATE]
proof (prove)
using this:
\<epsilon> \<in> {0<..<1}

goal (1 subgoal):
 1. 0 < s\<^sub>2
[PROOF STEP]
by (simp add:s\<^sub>2_def)


[STATEMENT]
lemma ANR_imp_locally_connected:
  fixes S :: "'a::euclidean_space set"
  assumes "ANR S"
    shows "locally connected S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally connected S
[PROOF STEP]
using locally_path_connected_imp_locally_connected ANR_imp_locally_path_connected assms
[PROOF STATE]
proof (prove)
using this:
locally path_connected ?S \<Longrightarrow> locally connected ?S
ANR ?S \<Longrightarrow> locally path_connected ?S
ANR S

goal (1 subgoal):
 1. locally connected S
[PROOF STEP]
by auto


[STATEMENT]
lemma nn_integral_cong': "(\<And>x. x \<in> space N =simp=> f x = g x) \<Longrightarrow> (\<integral>\<^sup>+x. f x \<partial>N) = (\<integral>\<^sup>+x. g x \<partial>N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> space N =simp=> f x = g x) \<Longrightarrow> integral\<^sup>N N f = integral\<^sup>N N g
[PROOF STEP]
by (simp add: simp_implies_def cong: nn_integral_cong)


[STATEMENT]
lemma pdevs_apply_pdevs_of_ivl:
  defines "B \<equiv> Basis_list::'a::executable_euclidean_space list"
  shows "pdevs_apply (pdevs_of_ivl l u) i = (if i < length B then ((u - l)\<bullet>(B!i)/2)*\<^sub>R(B!i) else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pdevs_apply (pdevs_of_ivl l u) i = (if i < length B then ((u - l) \<bullet> B ! i / 2) *\<^sub>R B ! i else (0::'a))
[PROOF STEP]
by (auto simp: pdevs_of_ivl_def B_def)


[STATEMENT]
lemma filterlim_shift_iff:
  fixes d :: "'a::real_normed_vector"
  shows "filterlim (f \<circ> (+) d) F (at (a - d)) = filterlim f F (at a)"   (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim (f \<circ> (+) d) F (at (a - d)) = filterlim f F (at a)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. filterlim (f \<circ> (+) d) F (at (a - d)) \<Longrightarrow> filterlim f F (at a)
 2. filterlim f F (at a) \<Longrightarrow> filterlim (f \<circ> (+) d) F (at (a - d))
[PROOF STEP]
assume L: ?lhs
[PROOF STATE]
proof (state)
this:
filterlim (f \<circ> (+) d) F (at (a - d))

goal (2 subgoals):
 1. filterlim (f \<circ> (+) d) F (at (a - d)) \<Longrightarrow> filterlim f F (at a)
 2. filterlim f F (at a) \<Longrightarrow> filterlim (f \<circ> (+) d) F (at (a - d))
[PROOF STEP]
show ?rhs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim f F (at a)
[PROOF STEP]
using filterlim_shift [OF L, of "-d"]
[PROOF STATE]
proof (prove)
using this:
filterlim (f \<circ> (+) d \<circ> (+) (- d)) F (at (a - d - - d))

goal (1 subgoal):
 1. filterlim f F (at a)
[PROOF STEP]
by (simp add: filterlim_iff)
[PROOF STATE]
proof (state)
this:
filterlim f F (at a)

goal (1 subgoal):
 1. filterlim f F (at a) \<Longrightarrow> filterlim (f \<circ> (+) d) F (at (a - d))
[PROOF STEP]
qed (metis filterlim_shift)


[STATEMENT]
lemma nth_minus_list [simp]:
  fixes xs :: "'a::minus list"
  assumes "i < length xs" "i < length ys"
  shows "(xs-ys)!i = xs!i - ys!i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (xs - ys) ! i = xs ! i - ys ! i
[PROOF STEP]
by (simp add: minus_list_def assms)


[STATEMENT]
lemma foldl_mono:
  assumes f: "\<And>x y y'. y < y' \<Longrightarrow> f y x < f y' x" and y: "y < y'"
  shows "foldl f y xs < foldl f y' xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. foldl f y xs < foldl f y' xs
[PROOF STEP]
using y
[PROOF STATE]
proof (prove)
using this:
y < y'

goal (1 subgoal):
 1. foldl f y xs < foldl f y' xs
[PROOF STEP]
by (induct xs arbitrary: y y') (simp_all add: f)


[STATEMENT]
theorem strong_fusion_eq: "\<exists>x. F x \<Longrightarrow> (\<sigma> x. F x) =
  (THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x. F x \<Longrightarrow> (\<sigma>x. F x) = (THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>x. F x \<Longrightarrow> (\<sigma>x. F x) = (THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)))
[PROOF STEP]
assume "\<exists>x. F x"
[PROOF STATE]
proof (state)
this:
\<exists>x. F x

goal (1 subgoal):
 1. \<exists>x. F x \<Longrightarrow> (\<sigma>x. F x) = (THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)))
[PROOF STEP]
have "(THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))) = (\<sigma> x. F x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))) = (\<sigma>x. F x)
[PROOF STEP]
proof (rule the_equality)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<forall>y. F y \<longrightarrow> P y (\<sigma>x. F x)) \<and> (\<forall>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z))
 2. \<And>x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)) \<Longrightarrow> x = (\<sigma>x. F x)
[PROOF STEP]
show "(\<forall>y. F y \<longrightarrow> P y (\<sigma> x. F x)) \<and> (\<forall>y. P y (\<sigma> x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>y. F y \<longrightarrow> P y (\<sigma>x. F x)) \<and> (\<forall>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>y. F y \<longrightarrow> P y (\<sigma>x. F x)
 2. \<forall>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)
[PROOF STEP]
show "\<forall>y. F y \<longrightarrow> P y (\<sigma> x. F x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y. F y \<longrightarrow> P y (\<sigma>x. F x)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. F y \<longrightarrow> P y (\<sigma>x. F x)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. F y \<longrightarrow> P y (\<sigma>x. F x)
[PROOF STEP]
show "F y \<longrightarrow> P y (\<sigma> x. F x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F y \<longrightarrow> P y (\<sigma>x. F x)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. F y \<Longrightarrow> P y (\<sigma>x. F x)
[PROOF STEP]
assume "F y"
[PROOF STATE]
proof (state)
this:
F y

goal (1 subgoal):
 1. F y \<Longrightarrow> P y (\<sigma>x. F x)
[PROOF STEP]
thus "P y (\<sigma> x. F x)"
[PROOF STATE]
proof (prove)
using this:
F y

goal (1 subgoal):
 1. P y (\<sigma>x. F x)
[PROOF STEP]
by (rule fusion_part)
[PROOF STATE]
proof (state)
this:
P y (\<sigma>x. F x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
F y \<longrightarrow> P y (\<sigma>x. F x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>y. F y \<longrightarrow> P y (\<sigma>x. F x)

goal (1 subgoal):
 1. \<forall>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)
[PROOF STEP]
show "(\<forall>y. P y (\<sigma> x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)
[PROOF STEP]
show "P y (\<sigma> x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P y (\<sigma>x. F x) \<Longrightarrow> \<exists>z. F z \<and> O y z
[PROOF STEP]
have  "\<forall>y. P y (\<sigma> v. F v) \<longleftrightarrow> (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y. P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))
[PROOF STEP]
using \<open>\<exists>x. F x\<close>
[PROOF STATE]
proof (prove)
using this:
\<exists>x. F x

goal (1 subgoal):
 1. \<forall>y. P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))
[PROOF STEP]
by (rule fusion_part_character)
[PROOF STATE]
proof (state)
this:
\<forall>y. P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))

goal (1 subgoal):
 1. P y (\<sigma>x. F x) \<Longrightarrow> \<exists>z. F z \<and> O y z
[PROOF STEP]
hence "P y (\<sigma> v. F v) \<longleftrightarrow> (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))"
[PROOF STATE]
proof (prove)
using this:
\<forall>y. P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))

goal (1 subgoal):
 1. P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))

goal (1 subgoal):
 1. P y (\<sigma>x. F x) \<Longrightarrow> \<exists>z. F z \<and> O y z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))

goal (1 subgoal):
 1. P y (\<sigma>x. F x) \<Longrightarrow> \<exists>z. F z \<and> O y z
[PROOF STEP]
assume "P y (\<sigma> x. F x)"
[PROOF STATE]
proof (state)
this:
P y (\<sigma>x. F x)

goal (1 subgoal):
 1. P y (\<sigma>x. F x) \<Longrightarrow> \<exists>z. F z \<and> O y z
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))
P y (\<sigma>x. F x)
[PROOF STEP]
have "\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v)"
[PROOF STATE]
proof (prove)
using this:
P y (\<sigma>v. F v) = (\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v))
P y (\<sigma>x. F x)

goal (1 subgoal):
 1. \<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v)

goal (1 subgoal):
 1. P y (\<sigma>x. F x) \<Longrightarrow> \<exists>z. F z \<and> O y z
[PROOF STEP]
hence "P y y \<longrightarrow> (\<exists>v. F v \<and> O y v)"
[PROOF STATE]
proof (prove)
using this:
\<forall>w. P w y \<longrightarrow> (\<exists>v. F v \<and> O w v)

goal (1 subgoal):
 1. P y y \<longrightarrow> (\<exists>v. F v \<and> O y v)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
P y y \<longrightarrow> (\<exists>v. F v \<and> O y v)

goal (1 subgoal):
 1. P y (\<sigma>x. F x) \<Longrightarrow> \<exists>z. F z \<and> O y z
[PROOF STEP]
thus "\<exists>v. F v \<and> O y v"
[PROOF STATE]
proof (prove)
using this:
P y y \<longrightarrow> (\<exists>v. F v \<and> O y v)

goal (1 subgoal):
 1. \<exists>v. F v \<and> O y v
[PROOF STEP]
using part_reflexivity
[PROOF STATE]
proof (prove)
using this:
P y y \<longrightarrow> (\<exists>v. F v \<and> O y v)
P ?x ?x

goal (1 subgoal):
 1. \<exists>v. F v \<and> O y v
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>v. F v \<and> O y v

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>y. F y \<longrightarrow> P y (\<sigma>x. F x)) \<and> (\<forall>y. P y (\<sigma>x. F x) \<longrightarrow> (\<exists>z. F z \<and> O y z))

goal (1 subgoal):
 1. \<And>x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)) \<Longrightarrow> x = (\<sigma>x. F x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)) \<Longrightarrow> x = (\<sigma>x. F x)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)) \<Longrightarrow> x = (\<sigma>x. F x)
[PROOF STEP]
assume x: "(\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))"
[PROOF STATE]
proof (state)
this:
(\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))

goal (1 subgoal):
 1. \<And>x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)) \<Longrightarrow> x = (\<sigma>x. F x)
[PROOF STEP]
have "\<forall>y. O y x \<longleftrightarrow> (\<exists>z. F z \<and> O y z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>y. O y x = (\<exists>z. F z \<and> O y z)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. O y x = (\<exists>z. F z \<and> O y z)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. O y x = (\<exists>z. F z \<and> O y z)
[PROOF STEP]
show "O y x \<longleftrightarrow> (\<exists>z. F z \<and> O y z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. O y x = (\<exists>z. F z \<and> O y z)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
assume "O y x"
[PROOF STATE]
proof (state)
this:
O y x

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
with overlap_eq
[PROOF STATE]
proof (chain)
picking this:
O ?x ?y = (\<exists>z. P z ?x \<and> P z ?y)
O y x
[PROOF STEP]
have "\<exists>v. P v y \<and> P v x"
[PROOF STATE]
proof (prove)
using this:
O ?x ?y = (\<exists>z. P z ?x \<and> P z ?y)
O y x

goal (1 subgoal):
 1. \<exists>v. P v y \<and> P v x
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>v. P v y \<and> P v x

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>v. P v y \<and> P v x
[PROOF STEP]
obtain v where v: "P v y \<and> P v x"
[PROOF STATE]
proof (prove)
using this:
\<exists>v. P v y \<and> P v x

goal (1 subgoal):
 1. (\<And>v. P v y \<and> P v x \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
P v y \<and> P v x

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
from x
[PROOF STATE]
proof (chain)
picking this:
(\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))
[PROOF STEP]
have "\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)"
[PROOF STATE]
proof (prove)
using this:
(\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))

goal (1 subgoal):
 1. \<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
hence "P v x \<longrightarrow> (\<exists>z. F z \<and> O v z)"
[PROOF STATE]
proof (prove)
using this:
\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)

goal (1 subgoal):
 1. P v x \<longrightarrow> (\<exists>z. F z \<and> O v z)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
P v x \<longrightarrow> (\<exists>z. F z \<and> O v z)

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
P v x \<longrightarrow> (\<exists>z. F z \<and> O v z)

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
from v
[PROOF STATE]
proof (chain)
picking this:
P v y \<and> P v x
[PROOF STEP]
have "P v x"
[PROOF STATE]
proof (prove)
using this:
P v y \<and> P v x

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

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
P v x \<longrightarrow> (\<exists>z. F z \<and> O v z)
P v x
[PROOF STEP]
have "\<exists>z. F z \<and> O v z"
[PROOF STATE]
proof (prove)
using this:
P v x \<longrightarrow> (\<exists>z. F z \<and> O v z)
P v x

goal (1 subgoal):
 1. \<exists>z. F z \<and> O v z
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>z. F z \<and> O v z

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>z. F z \<and> O v z
[PROOF STEP]
obtain z where z: "F z \<and> O v z"
[PROOF STATE]
proof (prove)
using this:
\<exists>z. F z \<and> O v z

goal (1 subgoal):
 1. (\<And>z. F z \<and> O v z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
F z \<and> O v z

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
hence "F z"
[PROOF STATE]
proof (prove)
using this:
F z \<and> O v z

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

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
from v
[PROOF STATE]
proof (chain)
picking this:
P v y \<and> P v x
[PROOF STEP]
have "P v y"
[PROOF STATE]
proof (prove)
using this:
P v y \<and> P v x

goal (1 subgoal):
 1. P v y
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
P v y

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
P v y

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
from z
[PROOF STATE]
proof (chain)
picking this:
F z \<and> O v z
[PROOF STEP]
have "O v z"
[PROOF STATE]
proof (prove)
using this:
F z \<and> O v z

goal (1 subgoal):
 1. O v z
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
O v z

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
hence "O z v"
[PROOF STATE]
proof (prove)
using this:
O v z

goal (1 subgoal):
 1. O z v
[PROOF STEP]
by (rule overlap_symmetry)
[PROOF STATE]
proof (state)
this:
O z v

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
P v y
O z v
[PROOF STEP]
have "O z y"
[PROOF STATE]
proof (prove)
using this:
P v y
O z v

goal (1 subgoal):
 1. O z y
[PROOF STEP]
by (rule overlap_monotonicity)
[PROOF STATE]
proof (state)
this:
O z y

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
hence "O y z"
[PROOF STATE]
proof (prove)
using this:
O z y

goal (1 subgoal):
 1. O y z
[PROOF STEP]
by (rule overlap_symmetry)
[PROOF STATE]
proof (state)
this:
O y z

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
with \<open>F z\<close>
[PROOF STATE]
proof (chain)
picking this:
F z
O y z
[PROOF STEP]
have "F z \<and> O y z"
[PROOF STATE]
proof (prove)
using this:
F z
O y z

goal (1 subgoal):
 1. F z \<and> O y z
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
F z \<and> O y z

goal (2 subgoals):
 1. O y x \<Longrightarrow> \<exists>z. F z \<and> O y z
 2. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
thus "\<exists>z. F z \<and> O y z"
[PROOF STATE]
proof (prove)
using this:
F z \<and> O y z

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>z. F z \<and> O y z

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
assume "\<exists>z. F z \<and> O y z"
[PROOF STATE]
proof (state)
this:
\<exists>z. F z \<and> O y z

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>z. F z \<and> O y z
[PROOF STEP]
obtain z where z: "F z \<and> O y z"
[PROOF STATE]
proof (prove)
using this:
\<exists>z. F z \<and> O y z

goal (1 subgoal):
 1. (\<And>z. F z \<and> O y z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
F z \<and> O y z

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
from x
[PROOF STATE]
proof (chain)
picking this:
(\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))
[PROOF STEP]
have "\<forall>y. F y \<longrightarrow> P y x"
[PROOF STATE]
proof (prove)
using this:
(\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))

goal (1 subgoal):
 1. \<forall>y. F y \<longrightarrow> P y x
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<forall>y. F y \<longrightarrow> P y x

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
hence "F z \<longrightarrow> P z x"
[PROOF STATE]
proof (prove)
using this:
\<forall>y. F y \<longrightarrow> P y x

goal (1 subgoal):
 1. F z \<longrightarrow> P z x
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
F z \<longrightarrow> P z x

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
F z \<longrightarrow> P z x

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
from z
[PROOF STATE]
proof (chain)
picking this:
F z \<and> O y z
[PROOF STEP]
have "F z"
[PROOF STATE]
proof (prove)
using this:
F z \<and> O y z

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

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
F z \<longrightarrow> P z x
F z
[PROOF STEP]
have "P z x"
[PROOF STATE]
proof (prove)
using this:
F z \<longrightarrow> P z x
F z

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

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
P z x

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
from z
[PROOF STATE]
proof (chain)
picking this:
F z \<and> O y z
[PROOF STEP]
have "O y z"
[PROOF STATE]
proof (prove)
using this:
F z \<and> O y z

goal (1 subgoal):
 1. O y z
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
O y z

goal (1 subgoal):
 1. \<exists>z. F z \<and> O y z \<Longrightarrow> O y x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
P z x
O y z
[PROOF STEP]
show "O y x"
[PROOF STATE]
proof (prove)
using this:
P z x
O y z

goal (1 subgoal):
 1. O y x
[PROOF STEP]
by (rule overlap_monotonicity)
[PROOF STATE]
proof (state)
this:
O y x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
O y x = (\<exists>z. F z \<and> O y z)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>y. O y x = (\<exists>z. F z \<and> O y z)

goal (1 subgoal):
 1. \<And>x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)) \<Longrightarrow> x = (\<sigma>x. F x)
[PROOF STEP]
hence "(\<sigma> x. F x) = x"
[PROOF STATE]
proof (prove)
using this:
\<forall>y. O y x = (\<exists>z. F z \<and> O y z)

goal (1 subgoal):
 1. (\<sigma>x. F x) = x
[PROOF STEP]
by (rule fusion_intro)
[PROOF STATE]
proof (state)
this:
(\<sigma>x. F x) = x

goal (1 subgoal):
 1. \<And>x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)) \<Longrightarrow> x = (\<sigma>x. F x)
[PROOF STEP]
thus "x = (\<sigma> x. F x)"
[PROOF STATE]
proof (prove)
using this:
(\<sigma>x. F x) = x

goal (1 subgoal):
 1. x = (\<sigma>x. F x)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
x = (\<sigma>x. F x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))) = (\<sigma>x. F x)

goal (1 subgoal):
 1. \<exists>x. F x \<Longrightarrow> (\<sigma>x. F x) = (THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z))) = (\<sigma>x. F x)

goal (1 subgoal):
 1. (\<sigma>x. F x) = (THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(\<sigma>x. F x) = (THE x. (\<forall>y. F y \<longrightarrow> P y x) \<and> (\<forall>y. P y x \<longrightarrow> (\<exists>z. F z \<and> O y z)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nth_nth_transpose_sorted[simp]:
  fixes xs :: "'a list list"
  assumes sorted: "sorted (rev (map length xs))"
  and i: "i < length (transpose xs)"
  and j: "j < length (filter (\<lambda>ys. i < length ys) xs)"
  shows "transpose xs ! i ! j = xs ! j  ! i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. transpose xs ! i ! j = xs ! j ! i
[PROOF STEP]
using j filter_equals_takeWhile_sorted_rev[OF sorted, of i]
    nth_transpose[OF i] nth_map[OF j]
[PROOF STATE]
proof (prove)
using this:
j < length (filter (\<lambda>ys. i < length ys) xs)
filter (\<lambda>x. i < length x) xs = takeWhile (\<lambda>x. i < length x) xs
transpose xs ! i = map (\<lambda>xs. xs ! i) (filter (\<lambda>ys. i < length ys) xs)
map ?f (filter (\<lambda>ys. i < length ys) xs) ! j = ?f (filter (\<lambda>ys. i < length ys) xs ! j)

goal (1 subgoal):
 1. transpose xs ! i ! j = xs ! j ! i
[PROOF STEP]
by (simp add: takeWhile_nth)


[STATEMENT]
lemma set_less_aux_Min_antimono:
  "\<lbrakk> Min A < Min B;  finite A; finite B; A \<noteq> {} \<rbrakk> \<Longrightarrow> B \<sqsubset>' A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Min A < Min B; finite A; finite B; A \<noteq> {}\<rbrakk> \<Longrightarrow> B \<sqsubset>' A
[PROOF STEP]
using set_less_aux_rec[of B A]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite B; finite A; B \<noteq> {}; A \<noteq> {}\<rbrakk> \<Longrightarrow> (B \<sqsubset>' A) = (Min A < Min B \<or> Min B = Min A \<and> B - {Min B} \<sqsubset>' A - {Min B})

goal (1 subgoal):
 1. \<lbrakk>Min A < Min B; finite A; finite B; A \<noteq> {}\<rbrakk> \<Longrightarrow> B \<sqsubset>' A
[PROOF STEP]
by(cases "B = {}")(simp_all add: empty_set_less_aux_finite_iff)


[STATEMENT]
lemma minSetOfComponentsTestL1p3:
"minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
have sg1:"outSetOfComponents level1 {data1, data10, data11} = {sA12, sA21}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outSetOfComponents level1 {data1, data10, data11} = {sA12, sA21}
[PROOF STEP]
by (simp add: outSetOfComponents_def  AbstrLevel1, auto)
[PROOF STATE]
proof (state)
this:
outSetOfComponents level1 {data1, data10, data11} = {sA12, sA21}

goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
have "DSources level1 sA12 = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. DSources level1 sA12 = {}
[PROOF STEP]
by (simp add: DSources_def AbstrLevel1, auto)
[PROOF STATE]
proof (state)
this:
DSources level1 sA12 = {}

goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
hence sg2:"Sources level1 sA12 = {}"
[PROOF STATE]
proof (prove)
using this:
DSources level1 sA12 = {}

goal (1 subgoal):
 1. Sources level1 sA12 = {}
[PROOF STEP]
by (simp add: DSourcesEmptySources)
[PROOF STATE]
proof (state)
this:
Sources level1 sA12 = {}

goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
have sg3:"DSources level1 sA21 = {sA11}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. DSources level1 sA21 = {sA11}
[PROOF STEP]
by (simp add: DSources_def AbstrLevel1, auto)
[PROOF STATE]
proof (state)
this:
DSources level1 sA21 = {sA11}

goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
have sg4:"DSources level1 sA11 = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. DSources level1 sA11 = {}
[PROOF STEP]
by (simp add: DSources_def AbstrLevel1, auto)
[PROOF STATE]
proof (state)
this:
DSources level1 sA11 = {}

goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
hence "Sources level1 sA21 = {sA11}"
[PROOF STATE]
proof (prove)
using this:
DSources level1 sA11 = {}

goal (1 subgoal):
 1. Sources level1 sA21 = {sA11}
[PROOF STEP]
by (metis SourcesOnlyDSources sg3 singleton_iff)
[PROOF STATE]
proof (state)
this:
Sources level1 sA21 = {sA11}

goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
from this and sg1 and sg2
[PROOF STATE]
proof (chain)
picking this:
Sources level1 sA21 = {sA11}
outSetOfComponents level1 {data1, data10, data11} = {sA12, sA21}
Sources level1 sA12 = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Sources level1 sA21 = {sA11}
outSetOfComponents level1 {data1, data10, data11} = {sA12, sA21}
Sources level1 sA12 = {}

goal (1 subgoal):
 1. minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}
[PROOF STEP]
by (simp add:  minSetOfComponents_def, blast)
[PROOF STATE]
proof (state)
this:
minSetOfComponents level1 {data1, data10, data11} = {sA12, sA11, sA21}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lincomb_empty[simp]: "lincomb a {} = \<zero>\<^bsub>M\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lincomb a {} = \<zero>\<^bsub>M\<^esub>
[PROOF STEP]
unfolding lincomb_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Oplus>\<^bsub>M\<^esub>v\<in>{}. a v \<odot>\<^bsub>M\<^esub> v) = \<zero>\<^bsub>M\<^esub>
[PROOF STEP]
by auto


[STATEMENT]
lemma Domain_rel_restrict:
  "Domain (rel_restrict R A) \<subseteq> Domain R - A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Domain (rel_restrict R A) \<subseteq> Domain R - A
[PROOF STEP]
unfolding rel_restrict_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Domain {(v, w). (v, w) \<in> R \<and> v \<notin> A \<and> w \<notin> A} \<subseteq> Domain R - A
[PROOF STEP]
by auto


[STATEMENT]
lemma residue_holomorphic_over_power':
  assumes "open A" "0 \<in> A" "f holomorphic_on A"
  shows   "residue (\<lambda>z. f z / z ^ Suc n) 0 = (deriv ^^ n) f 0 / fact n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. residue (\<lambda>z. f z / z ^ Suc n) 0 = (deriv ^^ n) f 0 / fact n
[PROOF STEP]
using residue_holomorphic_over_power[OF assms]
[PROOF STATE]
proof (prove)
using this:
residue (\<lambda>z. f z / (z - 0) ^ Suc ?n) 0 = (deriv ^^ ?n) f 0 / fact ?n

goal (1 subgoal):
 1. residue (\<lambda>z. f z / z ^ Suc n) 0 = (deriv ^^ n) f 0 / fact n
[PROOF STEP]
by simp


[STATEMENT]
lemma set_of_mkt_bal_r:
  "\<lbrakk> avl l; avl r \<rbrakk> \<Longrightarrow>
  set_of (mkt_bal_r n l r) = Set.insert n (set_of l \<union> set_of r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>avl l; avl r\<rbrakk> \<Longrightarrow> set_of (mkt_bal_r n l r) = Set.insert n (set_of l \<union> set_of r)
[PROOF STEP]
by (auto simp: mkt_def split:tree.splits)


[STATEMENT]
lemma rbt_comp_insert: "rbt_comp_insert = ord.rbt_insert (lt_of_comp c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.rbt_comp_insert = ord.rbt_insert (lt_of_comp c)
[PROOF STEP]
unfolding rbt_comp_insert_def[abs_def] ord.rbt_insert_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.rbt_comp_insert_with_key (\<lambda>_ _ nv. nv) = ord.rbt_insert_with_key (lt_of_comp c) (\<lambda>_ _ nv. nv)
[PROOF STEP]
unfolding rbt_comp_insert_with_key
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ord.rbt_insert_with_key (lt_of_comp c) (\<lambda>_ _ nv. nv) = ord.rbt_insert_with_key (lt_of_comp c) (\<lambda>_ _ nv. nv)
[PROOF STEP]
..


[STATEMENT]
lemma (in monoid) nunit_factors:
  assumes anunit: "a \<notin> Units G"
    and fs: "factors G as a"
  shows "length as > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < length as
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < length as
[PROOF STEP]
from anunit Units_one_closed
[PROOF STATE]
proof (chain)
picking this:
a \<notin> Units G
\<one> \<in> Units G
[PROOF STEP]
have "a \<noteq> \<one>"
[PROOF STATE]
proof (prove)
using this:
a \<notin> Units G
\<one> \<in> Units G

goal (1 subgoal):
 1. a \<noteq> \<one>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a \<noteq> \<one>

goal (1 subgoal):
 1. 0 < length as
[PROOF STEP]
with fs
[PROOF STATE]
proof (chain)
picking this:
factors G as a
a \<noteq> \<one>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
factors G as a
a \<noteq> \<one>

goal (1 subgoal):
 1. 0 < length as
[PROOF STEP]
by (auto elim: factorsE)
[PROOF STATE]
proof (state)
this:
0 < length as

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_derivative_in_compose2:
  assumes "\<And>x. x \<in> t \<Longrightarrow> (g has_derivative g' x) (at x within t)"
  assumes "f ` s \<subseteq> t" "x \<in> s"
  assumes "(f has_derivative f') (at x within s)"
  shows "((\<lambda>x. g (f x)) has_derivative (\<lambda>y. g' (f x) (f' y))) (at x within s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. g (f x)) has_derivative (\<lambda>y. g' (f x) (f' y))) (at x within s)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> t \<Longrightarrow> (g has_derivative g' ?x) (at ?x within t)
f ` s \<subseteq> t
x \<in> s
(f has_derivative f') (at x within s)

goal (1 subgoal):
 1. ((\<lambda>x. g (f x)) has_derivative (\<lambda>y. g' (f x) (f' y))) (at x within s)
[PROOF STEP]
by (auto intro: has_derivative_subset intro!: has_derivative_in_compose[of f f' x s g])


[STATEMENT]
lemma expands_to_exp_0_pull_out2_neg_nat:
  assumes "((\<lambda>x. exp (f x - c * ln (b x))) expands_to MS xs g) (b # basis)"
  assumes "basis_wf (b # basis)" "c = -real n"
  shows   "((\<lambda>x. exp (f x)) expands_to MS (shift_ms_aux c xs)
             (\<lambda>x. g x / b x ^ n)) (b # basis)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. exp (f x)) expands_to MS (shift_ms_aux c xs) (\<lambda>x. g x / b x ^ n)) (b # basis)
[PROOF STEP]
using expands_to_exp_0_pull_out2[OF assms(1-2)]
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. exp (f x)) expands_to MS (shift_ms_aux c xs) (\<lambda>x. b x powr c * g x)) (b # basis)

goal (1 subgoal):
 1. ((\<lambda>x. exp (f x)) expands_to MS (shift_ms_aux c xs) (\<lambda>x. g x / b x ^ n)) (b # basis)
[PROOF STEP]
proof (rule expands_to_cong')
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. b x powr c * g x = g x / b x ^ n
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
basis_wf (b # basis)
[PROOF STEP]
have "eventually (\<lambda>x. b x > 0) at_top"
[PROOF STATE]
proof (prove)
using this:
basis_wf (b # basis)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 0 < b x
[PROOF STEP]
by (simp add: filterlim_at_top_dense basis_wf_Cons)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. 0 < b x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. b x powr c * g x = g x / b x ^ n
[PROOF STEP]
with assms(3)
[PROOF STATE]
proof (chain)
picking this:
c = - real n
\<forall>\<^sub>F x in at_top. 0 < b x
[PROOF STEP]
show "eventually (\<lambda>x. b x powr c * g x = g x / b x ^ n) at_top"
[PROOF STATE]
proof (prove)
using this:
c = - real n
\<forall>\<^sub>F x in at_top. 0 < b x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. b x powr c * g x = g x / b x ^ n
[PROOF STEP]
by (auto elim!: eventually_mono simp: powr_realpow powr_minus field_split_simps)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. b x powr c * g x = g x / b x ^ n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma aux_gen_b_factor: "a > 0 \<Longrightarrow> b>1 \<Longrightarrow> \<exists>k c. ((a::nat) = (b^k) * c \<and> \<not>(c mod b = 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a; 1 < b\<rbrakk> \<Longrightarrow> \<exists>k c. a = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
proof(induction  a rule: full_nat_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<forall>m. Suc m \<le> n \<longrightarrow> 0 < m \<longrightarrow> 1 < b \<longrightarrow> (\<exists>k c. m = b ^ k * c \<and> c mod b \<noteq> 0); 0 < n; 1 < b\<rbrakk> \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
case (1 n)
[PROOF STATE]
proof (state)
this:
\<forall>m. Suc m \<le> n \<longrightarrow> 0 < m \<longrightarrow> 1 < b \<longrightarrow> (\<exists>k c. m = b ^ k * c \<and> c mod b \<noteq> 0)
0 < n
1 < b

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<forall>m. Suc m \<le> n \<longrightarrow> 0 < m \<longrightarrow> 1 < b \<longrightarrow> (\<exists>k c. m = b ^ k * c \<and> c mod b \<noteq> 0); 0 < n; 1 < b\<rbrakk> \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
proof(cases "n mod b = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n mod b = 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
 2. n mod b \<noteq> 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
n mod b = 0

goal (2 subgoals):
 1. n mod b = 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
 2. n mod b \<noteq> 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n mod b = 0
[PROOF STEP]
obtain t where n_def: "n = b * t"
[PROOF STATE]
proof (prove)
using this:
n mod b = 0

goal (1 subgoal):
 1. (\<And>t. n = b * t \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
n = b * t

goal (2 subgoals):
 1. n mod b = 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
 2. n mod b \<noteq> 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
hence "t < n"
[PROOF STATE]
proof (prove)
using this:
n = b * t

goal (1 subgoal):
 1. t < n
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
n = b * t
\<forall>m. Suc m \<le> n \<longrightarrow> 0 < m \<longrightarrow> 1 < b \<longrightarrow> (\<exists>k c. m = b ^ k * c \<and> c mod b \<noteq> 0)
0 < n
1 < b

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

goal (2 subgoals):
 1. n mod b = 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
 2. n mod b \<noteq> 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
with 1
[PROOF STATE]
proof (chain)
picking this:
\<forall>m. Suc m \<le> n \<longrightarrow> 0 < m \<longrightarrow> 1 < b \<longrightarrow> (\<exists>k c. m = b ^ k * c \<and> c mod b \<noteq> 0)
0 < n
1 < b
t < n
[PROOF STEP]
have ih:"\<exists>r s. t = b^r * s \<and> \<not>(s mod b = 0)"
[PROOF STATE]
proof (prove)
using this:
\<forall>m. Suc m \<le> n \<longrightarrow> 0 < m \<longrightarrow> 1 < b \<longrightarrow> (\<exists>k c. m = b ^ k * c \<and> c mod b \<noteq> 0)
0 < n
1 < b
t < n

goal (1 subgoal):
 1. \<exists>r s. t = b ^ r * s \<and> s mod b \<noteq> 0
[PROOF STEP]
by (metis Suc_leI gr0I mult_0_right n_def)
[PROOF STATE]
proof (state)
this:
\<exists>r s. t = b ^ r * s \<and> s mod b \<noteq> 0

goal (2 subgoals):
 1. n mod b = 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
 2. n mod b \<noteq> 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
hence "\<exists>r s. n = b^(Suc r) * s"
[PROOF STATE]
proof (prove)
using this:
\<exists>r s. t = b ^ r * s \<and> s mod b \<noteq> 0

goal (1 subgoal):
 1. \<exists>r s. n = b ^ Suc r * s
[PROOF STEP]
using n_def
[PROOF STATE]
proof (prove)
using this:
\<exists>r s. t = b ^ r * s \<and> s mod b \<noteq> 0
n = b * t

goal (1 subgoal):
 1. \<exists>r s. n = b ^ Suc r * s
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>r s. n = b ^ Suc r * s

goal (2 subgoals):
 1. n mod b = 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
 2. n mod b \<noteq> 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>r s. n = b ^ Suc r * s
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>r s. n = b ^ Suc r * s

goal (1 subgoal):
 1. \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
by (metis ih mult.commute mult.left_commute n_def power_Suc)
[PROOF STATE]
proof (state)
this:
\<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0

goal (1 subgoal):
 1. n mod b \<noteq> 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n mod b \<noteq> 0 \<Longrightarrow> \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
n mod b \<noteq> 0

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

goal (1 subgoal):
 1. \<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0
[PROOF STEP]
by (metis mult.commute power_0 power_Suc power_Suc0_right)
[PROOF STATE]
proof (state)
this:
\<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>k c. n = b ^ k * c \<and> c mod b \<noteq> 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inv_tm_skip_first_arg_len_gt_1_steps:
  assumes "length ns > 0"
  and "inv_tm_skip_first_arg_len_gt_1 n ns cf"
  shows "inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp)
[PROOF STEP]
proof (induct stp)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg 0)
 2. \<And>stp. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp) \<Longrightarrow> inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg (Suc stp))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg 0)
 2. \<And>stp. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp) \<Longrightarrow> inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg (Suc stp))
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
0 < length ns
inv_tm_skip_first_arg_len_gt_1 n ns cf
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
0 < length ns
inv_tm_skip_first_arg_len_gt_1 n ns cf

goal (1 subgoal):
 1. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg 0)
[PROOF STEP]
by (auto simp add: inv_tm_skip_first_arg_len_gt_1_step step.simps steps.simps)
[PROOF STATE]
proof (state)
this:
inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg 0)

goal (1 subgoal):
 1. \<And>stp. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp) \<Longrightarrow> inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg (Suc stp))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>stp. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp) \<Longrightarrow> inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg (Suc stp))
[PROOF STEP]
case (Suc stp)
[PROOF STATE]
proof (state)
this:
inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp)

goal (1 subgoal):
 1. \<And>stp. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp) \<Longrightarrow> inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg (Suc stp))
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
0 < length ns
inv_tm_skip_first_arg_len_gt_1 n ns cf
inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
0 < length ns
inv_tm_skip_first_arg_len_gt_1 n ns cf
inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp)

goal (1 subgoal):
 1. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg (Suc stp))
[PROOF STEP]
using inv_tm_skip_first_arg_len_gt_1_step step_red
[PROOF STATE]
proof (prove)
using this:
0 < length ns
inv_tm_skip_first_arg_len_gt_1 n ns cf
inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg stp)
\<lbrakk>0 < length ?ns; inv_tm_skip_first_arg_len_gt_1 ?n ?ns ?cf\<rbrakk> \<Longrightarrow> inv_tm_skip_first_arg_len_gt_1 ?n ?ns (step0 ?cf tm_skip_first_arg)
steps ?c ?p (Suc ?n) = step (steps ?c ?p ?n) ?p

goal (1 subgoal):
 1. inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg (Suc stp))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inv_tm_skip_first_arg_len_gt_1 n ns (steps0 cf tm_skip_first_arg (Suc stp))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eqd_equal_suf: "x \<cdot> y = u \<cdot> v \<Longrightarrow> \<^bold>|y\<^bold>| = \<^bold>|v\<^bold>| \<Longrightarrow> x = u \<and> y = v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<cdot> y = u \<cdot> v; \<^bold>|y\<^bold>| = \<^bold>|v\<^bold>|\<rbrakk> \<Longrightarrow> x = u \<and> y = v
[PROOF STEP]
by simp


[STATEMENT]
lemma locally_path_connected_1:
  assumes
    "\<And>v x. \<lbrakk>openin (top_of_set S) v; x \<in> v\<rbrakk>
              \<Longrightarrow> \<exists>u. openin (top_of_set S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v"
   shows "locally path_connected S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally path_connected S
[PROOF STEP]
by (force simp add: locally_def dest: assms)


[STATEMENT]
lemma lepoll_imp_gcard_le:
  assumes "A \<lesssim> B" "small B"
  shows "gcard A \<le> gcard B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcard A \<le> gcard B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. gcard A \<le> gcard B
[PROOF STEP]
have "elts (gcard A) \<approx> A" "elts (gcard B) \<approx> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. elts (gcard A) \<approx> A &&& elts (gcard B) \<approx> B
[PROOF STEP]
by (meson assms gcard_eqpoll lepoll_small)+
[PROOF STATE]
proof (state)
this:
elts (gcard A) \<approx> A
elts (gcard B) \<approx> B

goal (1 subgoal):
 1. gcard A \<le> gcard B
[PROOF STEP]
with \<open>A \<lesssim> B\<close>
[PROOF STATE]
proof (chain)
picking this:
A \<lesssim> B
elts (gcard A) \<approx> A
elts (gcard B) \<approx> B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A \<lesssim> B
elts (gcard A) \<approx> A
elts (gcard B) \<approx> B

goal (1 subgoal):
 1. gcard A \<le> gcard B
[PROOF STEP]
by (metis Ord_cardinal Ord_linear2 eqpoll_sym gcard_eq_vcard gcardinal_cong lepoll_antisym
              lepoll_trans2 less_V_def less_eq_V_def subset_imp_lepoll)
[PROOF STATE]
proof (state)
this:
gcard A \<le> gcard B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma length_flip [simp]: "length (flip xs i) = length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (flip xs i) = length xs
[PROOF STEP]
by (simp add: flip_def)


[STATEMENT]
lemma diff_pCons [simp]: "pCons a p - pCons b q = pCons (a - b) (p - q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pCons a p - pCons b q = pCons (a - b) (p - q)
[PROOF STEP]
by (rule poly_eqI) (simp add: coeff_pCons split: nat.split)


[STATEMENT]
lemma suffix_commute: "((\<sigma> |\<^sub>s n) |\<^sub>s m) = ((\<sigma> |\<^sub>s m) |\<^sub>s n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<sigma> |\<^sub>s n |\<^sub>s m = \<sigma> |\<^sub>s m |\<^sub>s n
[PROOF STEP]
by (simp add: suffix_plus add.commute)


[STATEMENT]
lemma subtuple_eq_fmrel_fmrestrict_fset:
  "subtuple r xm ym = fmrel r (fmrestrict_fset (fmdom ym) xm) ym"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subtuple r xm ym = fmrel r (fmrestrict_fset (fmdom ym) xm) ym
[PROOF STEP]
by (simp add: fmrel_on_fset_fmrel_restrict)


[STATEMENT]
lemma has_prod_of_real_iff [simp]:
  "(\<lambda>n. of_real (f n) :: 'a::{complete_space,real_normed_field}) has_prod of_real c \<longleftrightarrow> f has_prod c"
  (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. of_real (f n)) has_prod of_real c = f has_prod c
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>n. of_real (f n)) has_prod of_real c \<Longrightarrow> f has_prod c
 2. f has_prod c \<Longrightarrow> (\<lambda>n. of_real (f n)) has_prod of_real c
[PROOF STEP]
assume ?lhs
[PROOF STATE]
proof (state)
this:
(\<lambda>n. of_real (f n)) has_prod of_real c

goal (2 subgoals):
 1. (\<lambda>n. of_real (f n)) has_prod of_real c \<Longrightarrow> f has_prod c
 2. f has_prod c \<Longrightarrow> (\<lambda>n. of_real (f n)) has_prod of_real c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. of_real (f n)) has_prod of_real c
[PROOF STEP]
show ?rhs
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. of_real (f n)) has_prod of_real c

goal (1 subgoal):
 1. f has_prod c
[PROOF STEP]
apply (auto simp: prod_defs LIMSEQ_prod_0 tendsto_of_real_iff simp flip: of_real_prod)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i q. \<lbrakk>c = 0; f i = 0; (\<lambda>n. of_real (\<Prod>ia\<le>n. f (Suc (ia + i)))) \<longlonglongrightarrow> q; q \<noteq> (0::'a); \<forall>i. f i = 0 \<longrightarrow> (\<forall>q. (\<lambda>n. \<Prod>ia\<le>n. f (Suc (ia + i))) \<longlonglongrightarrow> q \<longrightarrow> q = 0)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
using tendsto_eq_of_real
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(\<lambda>n. of_real (?f n)) \<longlonglongrightarrow> ?q; \<And>r. ?q = of_real r \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>i q. \<lbrakk>c = 0; f i = 0; (\<lambda>n. of_real (\<Prod>ia\<le>n. f (Suc (ia + i)))) \<longlonglongrightarrow> q; q \<noteq> (0::'a); \<forall>i. f i = 0 \<longrightarrow> (\<forall>q. (\<lambda>n. \<Prod>ia\<le>n. f (Suc (ia + i))) \<longlonglongrightarrow> q \<longrightarrow> q = 0)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
by (metis of_real_0 tendsto_of_real_iff)
[PROOF STATE]
proof (state)
this:
f has_prod c

goal (1 subgoal):
 1. f has_prod c \<Longrightarrow> (\<lambda>n. of_real (f n)) has_prod of_real c
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f has_prod c \<Longrightarrow> (\<lambda>n. of_real (f n)) has_prod of_real c
[PROOF STEP]
assume ?rhs
[PROOF STATE]
proof (state)
this:
f has_prod c

goal (1 subgoal):
 1. f has_prod c \<Longrightarrow> (\<lambda>n. of_real (f n)) has_prod of_real c
[PROOF STEP]
with tendsto_of_real_iff
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>x. of_real (?f x)) \<longlongrightarrow> of_real ?c) ?F = (?f \<longlongrightarrow> ?c) ?F
f has_prod c
[PROOF STEP]
show ?lhs
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. of_real (?f x)) \<longlongrightarrow> of_real ?c) ?F = (?f \<longlongrightarrow> ?c) ?F
f has_prod c

goal (1 subgoal):
 1. (\<lambda>n. of_real (f n)) has_prod of_real c
[PROOF STEP]
by (fastforce simp: prod_defs simp flip: of_real_prod)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. of_real (f n)) has_prod of_real c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Inf_int_in:
  fixes S :: "int set"
  assumes "S \<noteq> {}" "bdd_below S"
  shows "Inf S \<in> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf S \<in> S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
S \<noteq> {}
bdd_below S

goal (1 subgoal):
 1. Inf S \<in> S
[PROOF STEP]
unfolding Inf_int_def
[PROOF STATE]
proof (prove)
using this:
S \<noteq> {}
bdd_below S

goal (1 subgoal):
 1. - Sup (uminus ` S) \<in> S
[PROOF STEP]
by (smt Sup_int_in bdd_above_uminus image_iff image_is_empty)


[STATEMENT]
lemma size_Diff_singleton: "x \<in># M \<Longrightarrow> size (M - {#x#}) = size M - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in># M \<Longrightarrow> size (M - {#x#}) = size M - 1
[PROOF STEP]
by (simp flip: size_Suc_Diff1)


[STATEMENT]
lemma eval_wp_Mu:
  "wp (\<mu> t. T t) = lfp_trans (\<lambda>t. wp (T (Embed t)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wp (\<mu>t. T t) = lfp_trans (\<lambda>t. wp (T (Embed t)))
[PROOF STEP]
unfolding wp_def Mu_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if True then lfp_trans (\<lambda>t. T (Embed t) True) else gfp_trans (\<lambda>t. T (Embed t) True)) = lfp_trans (\<lambda>t. T (Embed t) True)
[PROOF STEP]
by(simp)


[STATEMENT]
lemma vpairs_iff: "x \<in>\<^sub>\<circ> vpairs r \<longleftrightarrow> x \<in>\<^sub>\<circ> r \<and> (\<exists>a b. x = \<langle>a, b\<rangle>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in>\<^sub>\<circ> vpairs r) = (x \<in>\<^sub>\<circ> r \<and> (\<exists>a b. x = \<langle>a, b\<rangle>))
[PROOF STEP]
by auto