[STATEMENT]
lemma holomorphic_factor_order_of_zero_strong:
  assumes holf: "f holomorphic_on S" "open S"  "\<xi> \<in> S" "0 < n"
      and "(deriv ^^ n) f \<xi> \<noteq> 0"
      and "\<And>i. \<lbrakk>0 < i; i < n\<rbrakk> \<Longrightarrow> (deriv ^^ i) f \<xi> = 0"
   obtains g r where "0 < r"
                "g holomorphic_on ball \<xi> r"
                "\<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n"
                "\<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain g r where "0 < r"
               and holg: "g holomorphic_on ball \<xi> r"
               and feq: "\<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = (w - \<xi>)^n * g w"
               and gne: "\<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = (w - \<xi>) ^ n * g w; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto intro: holomorphic_factor_order_of_zero [OF assms])
[PROOF STATE]
proof (state)
this:
0 < r
g holomorphic_on ball \<xi> r
?w \<in> ball \<xi> r \<Longrightarrow> f ?w - f \<xi> = (?w - \<xi>) ^ n * g ?w
?w \<in> ball \<xi> r \<Longrightarrow> g ?w \<noteq> 0

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have con: "continuous_on (ball \<xi> r) (\<lambda>z. deriv g z / g z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on (ball \<xi> r) (\<lambda>z. deriv g z / g z)
[PROOF STEP]
by (rule continuous_intros) (auto simp: gne holg holomorphic_deriv holomorphic_on_imp_continuous_on)
[PROOF STATE]
proof (state)
this:
continuous_on (ball \<xi> r) (\<lambda>z. deriv g z / g z)

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have cd: "(\<lambda>z. deriv g z / g z) field_differentiable at x" if "dist \<xi> x < r" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. deriv g z / g z) field_differentiable at x
[PROOF STEP]
proof (intro derivative_intros)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. deriv g field_differentiable at x
 2. g field_differentiable at x
 3. g x \<noteq> 0
[PROOF STEP]
show "deriv g field_differentiable at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. deriv g field_differentiable at x
[PROOF STEP]
using that holg mem_ball
[PROOF STATE]
proof (prove)
using this:
dist \<xi> x < r
g holomorphic_on ball \<xi> r
(?y \<in> ball ?x ?e) = (dist ?x ?y < ?e)

goal (1 subgoal):
 1. deriv g field_differentiable at x
[PROOF STEP]
by (blast intro: holomorphic_deriv holomorphic_on_imp_differentiable_at)
[PROOF STATE]
proof (state)
this:
deriv g field_differentiable at x

goal (2 subgoals):
 1. g field_differentiable at x
 2. g x \<noteq> 0
[PROOF STEP]
show "g field_differentiable at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g field_differentiable at x
[PROOF STEP]
by (metis that open_ball at_within_open holg holomorphic_on_def mem_ball)
[PROOF STATE]
proof (state)
this:
g field_differentiable at x

goal (1 subgoal):
 1. g x \<noteq> 0
[PROOF STEP]
qed (simp add: gne that)
[PROOF STATE]
proof (state)
this:
dist \<xi> ?x < r \<Longrightarrow> (\<lambda>z. deriv g z / g z) field_differentiable at ?x

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain h where h: "\<And>x. x \<in> ball \<xi> r \<Longrightarrow> (h has_field_derivative deriv g x / g x) (at x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>h. (\<And>x. x \<in> ball \<xi> r \<Longrightarrow> (h has_field_derivative deriv g x / g x) (at x)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using holomorphic_convex_primitive [of "ball \<xi> r" "{}" "\<lambda>z. deriv g z / g z"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>convex (ball \<xi> r); finite {}; continuous_on (ball \<xi> r) (\<lambda>z. deriv g z / g z); \<And>x. x \<in> interior (ball \<xi> r) - {} \<Longrightarrow> (\<lambda>z. deriv g z / g z) field_differentiable at x; \<And>ga. (\<And>x. x \<in> ball \<xi> r \<Longrightarrow> (ga has_field_derivative deriv g x / g x) (at x within ball \<xi> r)) \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>h. (\<And>x. x \<in> ball \<xi> r \<Longrightarrow> (h has_field_derivative deriv g x / g x) (at x)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis (no_types, lifting) Diff_empty at_within_interior cd con convex_ball infinite_imp_nonempty interior_ball mem_ball)
[PROOF STATE]
proof (state)
this:
?x \<in> ball \<xi> r \<Longrightarrow> (h has_field_derivative deriv g ?x / g ?x) (at ?x)

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x \<in> ball \<xi> r \<Longrightarrow> (h has_field_derivative deriv g ?x / g ?x) (at ?x)
[PROOF STEP]
have "continuous_on (ball \<xi> r) h"
[PROOF STATE]
proof (prove)
using this:
?x \<in> ball \<xi> r \<Longrightarrow> (h has_field_derivative deriv g ?x / g ?x) (at ?x)

goal (1 subgoal):
 1. continuous_on (ball \<xi> r) h
[PROOF STEP]
by (metis open_ball holomorphic_on_imp_continuous_on holomorphic_on_open)
[PROOF STATE]
proof (state)
this:
continuous_on (ball \<xi> r) h

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_on (ball \<xi> r) h
[PROOF STEP]
have con: "continuous_on (ball \<xi> r) (\<lambda>x. exp (h x) / g x)"
[PROOF STATE]
proof (prove)
using this:
continuous_on (ball \<xi> r) h

goal (1 subgoal):
 1. continuous_on (ball \<xi> r) (\<lambda>x. exp (h x) / g x)
[PROOF STEP]
by (auto intro!: continuous_intros simp add: holg holomorphic_on_imp_continuous_on gne)
[PROOF STATE]
proof (state)
this:
continuous_on (ball \<xi> r) (\<lambda>x. exp (h x) / g x)

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have 0: "dist \<xi> x < r \<Longrightarrow> ((\<lambda>x. exp (h x) / g x) has_field_derivative 0) (at x)" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist \<xi> x < r \<Longrightarrow> ((\<lambda>x. exp (h x) / g x) has_field_derivative 0) (at x)
[PROOF STEP]
apply (rule h derivative_eq_intros DERIV_deriv_iff_field_differentiable [THEN iffD2] | simp)+
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. dist \<xi> x < r \<Longrightarrow> g field_differentiable at x
 2. dist \<xi> x < r \<Longrightarrow> g x \<noteq> 0
 3. dist \<xi> x < r \<Longrightarrow> (exp (h x) * deriv g x / g x * g x - exp (h x) * deriv g x) / (g x * g x) = 0
[PROOF STEP]
using holg
[PROOF STATE]
proof (prove)
using this:
g holomorphic_on ball \<xi> r

goal (3 subgoals):
 1. dist \<xi> x < r \<Longrightarrow> g field_differentiable at x
 2. dist \<xi> x < r \<Longrightarrow> g x \<noteq> 0
 3. dist \<xi> x < r \<Longrightarrow> (exp (h x) * deriv g x / g x * g x - exp (h x) * deriv g x) / (g x * g x) = 0
[PROOF STEP]
by (auto simp: holomorphic_on_imp_differentiable_at gne h)
[PROOF STATE]
proof (state)
this:
dist \<xi> ?x < r \<Longrightarrow> ((\<lambda>x. exp (h x) / g x) has_field_derivative 0) (at ?x)

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain c where c: "\<And>x. x \<in> ball \<xi> r \<Longrightarrow> exp (h x) / g x = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>c. (\<And>x. x \<in> ball \<xi> r \<Longrightarrow> exp (h x) / g x = c) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule DERIV_zero_connected_constant [of "ball \<xi> r" "{}" "\<lambda>x. exp(h x) / g x"]) (auto simp: con 0)
[PROOF STATE]
proof (state)
this:
?x \<in> ball \<xi> r \<Longrightarrow> exp (h ?x) / g ?x = c

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have hol: "(\<lambda>z. exp ((Ln (inverse c) + h z) / of_nat n)) holomorphic_on ball \<xi> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. exp ((Ln (inverse c) + h z) / of_nat n)) holomorphic_on ball \<xi> r
[PROOF STEP]
proof (intro holomorphic_intros holomorphic_on_compose [unfolded o_def, where g = exp])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. h holomorphic_on ball \<xi> r
 2. \<And>x. x \<in> ball \<xi> r \<Longrightarrow> of_nat n \<noteq> 0
[PROOF STEP]
show "h holomorphic_on ball \<xi> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h holomorphic_on ball \<xi> r
[PROOF STEP]
using h holomorphic_on_open
[PROOF STATE]
proof (prove)
using this:
?x \<in> ball \<xi> r \<Longrightarrow> (h has_field_derivative deriv g ?x / g ?x) (at ?x)
open ?s \<Longrightarrow> (?f holomorphic_on ?s) = (\<forall>x\<in>?s. \<exists>f'. (?f has_field_derivative f') (at x))

goal (1 subgoal):
 1. h holomorphic_on ball \<xi> r
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
h holomorphic_on ball \<xi> r

goal (1 subgoal):
 1. \<And>x. x \<in> ball \<xi> r \<Longrightarrow> of_nat n \<noteq> 0
[PROOF STEP]
qed (use \<open>0 < n\<close> in auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>z. exp ((Ln (inverse c) + h z) / of_nat n)) holomorphic_on ball \<xi> r

goal (1 subgoal):
 1. (\<And>r g. \<lbrakk>0 < r; g holomorphic_on ball \<xi> r; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * g w) ^ n; \<And>w. w \<in> ball \<xi> r \<Longrightarrow> g w \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. 0 < ?r
 2. ?g holomorphic_on ball \<xi> ?r
 3. \<And>w. w \<in> ball \<xi> ?r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * ?g w) ^ n
 4. \<And>w. w \<in> ball \<xi> ?r \<Longrightarrow> ?g w \<noteq> 0
[PROOF STEP]
show "\<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * exp ((Ln (inverse c) + h w) / of_nat n)) ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * exp ((Ln (inverse c) + h w) / of_nat n)) ^ n
[PROOF STEP]
using \<open>0 < n\<close>
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. \<And>w. w \<in> ball \<xi> r \<Longrightarrow> f w - f \<xi> = ((w - \<xi>) * exp ((Ln (inverse c) + h w) / of_nat n)) ^ n
[PROOF STEP]
by (auto simp: feq power_mult_distrib exp_divide_power_eq exp_add gne simp flip: c)
[PROOF STATE]
proof (state)
this:
?w \<in> ball \<xi> r \<Longrightarrow> f ?w - f \<xi> = ((?w - \<xi>) * exp ((Ln (inverse c) + h ?w) / of_nat n)) ^ n

goal (3 subgoals):
 1. 0 < r
 2. (\<lambda>w. exp ((Ln (inverse c) + h w) / of_nat n)) holomorphic_on ball \<xi> r
 3. \<And>w. w \<in> ball \<xi> r \<Longrightarrow> exp ((Ln (inverse c) + h w) / of_nat n) \<noteq> 0
[PROOF STEP]
qed (use hol \<open>0 < r\<close> in auto)
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Fract_eq_coprime:
  assumes "Rat.Fract a b = Rat.Fract c d" "b > 0" "d > 0" "coprime a b" "coprime c d"
  shows   "a = c" "b = d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a = c &&& b = d
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a = c
 2. b = d
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
Rat.Fract a b = Rat.Fract c d
0 < b
0 < d
coprime a b
coprime c d
[PROOF STEP]
have "a * d = c * b"
[PROOF STATE]
proof (prove)
using this:
Rat.Fract a b = Rat.Fract c d
0 < b
0 < d
coprime a b
coprime c d

goal (1 subgoal):
 1. a * d = c * b
[PROOF STEP]
by (auto simp: eq_rat)
[PROOF STATE]
proof (state)
this:
a * d = c * b

goal (2 subgoals):
 1. a = c
 2. b = d
[PROOF STEP]
hence "abs (a * d) = abs (c * b)"
[PROOF STATE]
proof (prove)
using this:
a * d = c * b

goal (1 subgoal):
 1. \<bar>a * d\<bar> = \<bar>c * b\<bar>
[PROOF STEP]
by (simp only:)
[PROOF STATE]
proof (state)
this:
\<bar>a * d\<bar> = \<bar>c * b\<bar>

goal (2 subgoals):
 1. a = c
 2. b = d
[PROOF STEP]
hence "abs a * abs d = abs c * abs b"
[PROOF STATE]
proof (prove)
using this:
\<bar>a * d\<bar> = \<bar>c * b\<bar>

goal (1 subgoal):
 1. \<bar>a\<bar> * \<bar>d\<bar> = \<bar>c\<bar> * \<bar>b\<bar>
[PROOF STEP]
by (simp only: abs_mult)
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar> * \<bar>d\<bar> = \<bar>c\<bar> * \<bar>b\<bar>

goal (2 subgoals):
 1. a = c
 2. b = d
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar> * \<bar>d\<bar> = \<bar>c\<bar> * \<bar>b\<bar>

goal (2 subgoals):
 1. a = c
 2. b = d
[PROOF STEP]
have "?this \<longleftrightarrow> abs a = abs c \<and> d = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<bar>a\<bar> * \<bar>d\<bar> = \<bar>c\<bar> * \<bar>b\<bar>) = (\<bar>a\<bar> = \<bar>c\<bar> \<and> d = b)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Rat.Fract a b = Rat.Fract c d
0 < b
0 < d
coprime a b
coprime c d

goal (1 subgoal):
 1. (\<bar>a\<bar> * \<bar>d\<bar> = \<bar>c\<bar> * \<bar>b\<bar>) = (\<bar>a\<bar> = \<bar>c\<bar> \<and> d = b)
[PROOF STEP]
by (subst coprime_crossproduct_int) simp_all
[PROOF STATE]
proof (state)
this:
(\<bar>a\<bar> * \<bar>d\<bar> = \<bar>c\<bar> * \<bar>b\<bar>) = (\<bar>a\<bar> = \<bar>c\<bar> \<and> d = b)

goal (2 subgoals):
 1. a = c
 2. b = d
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>a\<bar> = \<bar>c\<bar> \<and> d = b
[PROOF STEP]
show "b = d"
[PROOF STATE]
proof (prove)
using this:
\<bar>a\<bar> = \<bar>c\<bar> \<and> d = b

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

goal (1 subgoal):
 1. a = c
[PROOF STEP]
with \<open>a * d = c * b\<close> and \<open>b > 0\<close>
[PROOF STATE]
proof (chain)
picking this:
a * d = c * b
0 < b
b = d
[PROOF STEP]
show "a = c"
[PROOF STATE]
proof (prove)
using this:
a * d = c * b
0 < b
b = d

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sign_changes_cong:
  assumes "map sgn xs = map sgn ys"
  shows   "sign_changes xs = sign_changes ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sign_changes xs = sign_changes ys
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
map sgn xs = map sgn ys

goal (1 subgoal):
 1. sign_changes xs = sign_changes ys
[PROOF STEP]
unfolding sign_changes_def
[PROOF STATE]
proof (prove)
using this:
map sgn xs = map sgn ys

goal (1 subgoal):
 1. length (remdups_adj (filter (\<lambda>x. x \<noteq> (0::'a)) (map sgn xs))) - 1 = length (remdups_adj (filter (\<lambda>x. x \<noteq> (0::'a)) (map sgn ys))) - 1
[PROOF STEP]
by simp


[STATEMENT]
lemma equiv_EqF: "equiv (UNIV::'a list set) {\<cong>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equiv UNIV {\<cong>}
[PROOF STEP]
apply(unfold equiv_def sym_def trans_def refl_on_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({\<cong>} \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> {\<cong>})) \<and> (\<forall>x y. (x, y) \<in> {\<cong>} \<longrightarrow> (y, x) \<in> {\<cong>}) \<and> (\<forall>x y z. (x, y) \<in> {\<cong>} \<longrightarrow> (y, z) \<in> {\<cong>} \<longrightarrow> (x, z) \<in> {\<cong>})
[PROOF STEP]
apply(rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. {\<cong>} \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> {\<cong>})
 2. (\<forall>x y. (x, y) \<in> {\<cong>} \<longrightarrow> (y, x) \<in> {\<cong>}) \<and> (\<forall>x y z. (x, y) \<in> {\<cong>} \<longrightarrow> (y, z) \<in> {\<cong>} \<longrightarrow> (x, z) \<in> {\<cong>})
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x y. (x, y) \<in> {\<cong>} \<longrightarrow> (y, x) \<in> {\<cong>}) \<and> (\<forall>x y z. (x, y) \<in> {\<cong>} \<longrightarrow> (y, z) \<in> {\<cong>} \<longrightarrow> (x, z) \<in> {\<cong>})
[PROOF STEP]
apply(rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<forall>x y. (x, y) \<in> {\<cong>} \<longrightarrow> (y, x) \<in> {\<cong>}
 2. \<forall>x y z. (x, y) \<in> {\<cong>} \<longrightarrow> (y, z) \<in> {\<cong>} \<longrightarrow> (x, z) \<in> {\<cong>}
[PROOF STEP]
apply(fastforce intro:congs_sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y z. (x, y) \<in> {\<cong>} \<longrightarrow> (y, z) \<in> {\<cong>} \<longrightarrow> (x, z) \<in> {\<cong>}
[PROOF STEP]
apply(fastforce intro:congs_trans)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma interval_of_sum: "interval_of (sum f X) = sum (\<lambda>x. interval_of (f x)) X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interval_of (sum f X) = (\<Sum>x\<in>X. interval_of (f x))
[PROOF STEP]
by (induction X rule: infinite_finite_induct) (auto simp: interval_of_plus interval_of_zero)


[STATEMENT]
lemma monotone_comp: "\<lbrakk> monotone orda ordb g; monotone ordb ordc f \<rbrakk> \<Longrightarrow> monotone orda ordc (f \<circ> g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>monotone orda ordb g; monotone ordb ordc f\<rbrakk> \<Longrightarrow> monotone orda ordc (f \<circ> g)
[PROOF STEP]
by(rule monotoneI)(simp add: monotoneD)


[STATEMENT]
lemma iteration_idem [simp]: "x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> = x\<^sup>\<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> = x\<^sup>\<infinity>
[PROOF STEP]
proof (rule order.antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> x\<^sup>\<infinity>
 2. x\<^sup>\<infinity> \<le> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>
[PROOF STEP]
have "x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> 1 + x \<cdot> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> (1::'a) + x \<cdot> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>
[PROOF STEP]
by (metis add_assoc iteration_unfoldl_distr local.eq_refl local.iteration_unfoldl local.subdistl_eq mult_assoc)
[PROOF STATE]
proof (state)
this:
x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> (1::'a) + x \<cdot> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>

goal (2 subgoals):
 1. x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> x\<^sup>\<infinity>
 2. x\<^sup>\<infinity> \<le> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>
[PROOF STEP]
thus "x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> x\<^sup>\<infinity>"
[PROOF STATE]
proof (prove)
using this:
x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> (1::'a) + x \<cdot> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>

goal (1 subgoal):
 1. x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> x\<^sup>\<infinity>
[PROOF STEP]
using local.coinduction mult_assoc
[PROOF STATE]
proof (prove)
using this:
x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> (1::'a) + x \<cdot> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>
?y \<le> ?z + ?x \<cdot> ?y \<longrightarrow> ?y \<le> ?x\<^sup>\<infinity> \<cdot> ?z
?a \<cdot> ?b \<cdot> ?c = ?a \<cdot> (?b \<cdot> ?c)

goal (1 subgoal):
 1. x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> x\<^sup>\<infinity>
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity> \<le> x\<^sup>\<infinity>

goal (1 subgoal):
 1. x\<^sup>\<infinity> \<le> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>
[PROOF STEP]
show "x\<^sup>\<infinity> \<le>  x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<infinity> \<le> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>
[PROOF STEP]
using local.coinduction
[PROOF STATE]
proof (prove)
using this:
?y \<le> ?z + ?x \<cdot> ?y \<longrightarrow> ?y \<le> ?x\<^sup>\<infinity> \<cdot> ?z

goal (1 subgoal):
 1. x\<^sup>\<infinity> \<le> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x\<^sup>\<infinity> \<le> x\<^sup>\<infinity> \<cdot> x\<^sup>\<infinity>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trss_drop_context_s: "\<lbrakk> ((s,c+ce),e,(s',c'+ce))\<in>trss fg \<rbrakk>
  \<Longrightarrow> ((s,c),e,(s',c'))\<in>trss fg \<and> mon_e fg e \<inter> mon_c fg ce = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((s, c + ce), e, s', c' + ce) \<in> trss fg \<Longrightarrow> ((s, c), e, s', c') \<in> trss fg \<and> mon_e fg e \<inter> mon_c fg ce = {}
[PROOF STEP]
by (erule trss.cases) (auto intro!: trss.intros simp add: mon_c_unconc union_assoc[of _ c ce, symmetric])


[STATEMENT]
lemma RDirProd_hom3:
  assumes "f \<in> ring_hom R R'" and "g \<in> ring_hom S S'"
  shows "(\<lambda>(r, s). (f r, g s)) \<in> ring_hom (RDirProd R S) (RDirProd R' S')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(r, s). (f r, g s)) \<in> ring_hom (RDirProd R S) (RDirProd R' S')
[PROOF STEP]
using ring_hom_trans[OF RDirProd_hom2(2)[OF assms(1)] RDirProd_hom2(1)[OF assms(2)]]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>(x, y). (x, g y)) \<circ> (\<lambda>(x, y). (f x, y)) \<in> ring_hom (RDirProd R S) (RDirProd R' S')

goal (1 subgoal):
 1. (\<lambda>(r, s). (f r, g s)) \<in> ring_hom (RDirProd R S) (RDirProd R' S')
[PROOF STEP]
by (simp add: case_prod_beta' comp_def)


[STATEMENT]
lemma card_bit1 [simp]: "CARD('a bit1) = Suc (2 * CARD('a::finite))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. CARD('a bit1) = Suc (2 * CARD('a))
[PROOF STEP]
unfolding type_definition.card [OF type_definition_bit1]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {0..<1 + 2 * int CARD('a)} = Suc (2 * CARD('a))
[PROOF STEP]
by simp


[STATEMENT]
lemma islimpt_eq_infinite_ball: "x islimpt S \<longleftrightarrow> (\<forall>e>0. infinite(S \<inter> ball x e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x islimpt S = (\<forall>e>0. infinite (S \<inter> ball x e))
[PROOF STEP]
apply (simp add: islimpt_eq_acc_point, safe)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>e. \<lbrakk>\<forall>U. x \<in> U \<longrightarrow> open U \<longrightarrow> infinite (U \<inter> S); 0 < e; finite (S \<inter> ball x e)\<rbrakk> \<Longrightarrow> False
 2. \<And>U. \<lbrakk>\<forall>e>0. infinite (S \<inter> ball x e); x \<in> U; open U; finite (U \<inter> S)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (metis Int_commute open_ball centre_in_ball)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>U. \<lbrakk>\<forall>e>0. infinite (S \<inter> ball x e); x \<in> U; open U; finite (U \<inter> S)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
by (metis open_contains_ball Int_mono finite_subset inf_commute subset_refl)


[STATEMENT]
lemma Union_eq_VUnion: "\<Union>(elts ` elts A) = {a. \<exists>x \<in>\<^sub>\<circ> A. a \<in>\<^sub>\<circ> x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (elts ` elts A) = {a. \<exists>x\<in>elts A. a \<in>\<^sub>\<circ> x}
[PROOF STEP]
by auto


[STATEMENT]
lemma Not_eq_iff [simp]: "Not x1 = Not x2 \<longleftrightarrow> x1 = x2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Formula.Not x1 = Formula.Not x2) = (x1 = x2)
[PROOF STEP]
by (metis Not.rep_eq Not\<^sub>\<alpha>_eq_iff Rep_formula_inverse)


[STATEMENT]
lemma of_int_xor_eq:
  \<open>of_int (k XOR l) = of_int k XOR of_int l\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int (k XOR l) = of_int k XOR of_int l
[PROOF STEP]
by (rule bit_eqI) (simp add: bit_of_int_iff bit_xor_iff Bit_Operations.bit_xor_iff)


[STATEMENT]
lemma bigo_lesseq1: "f =o O(h) \<Longrightarrow> \<forall>x. \<bar>g x\<bar> <= \<bar>f x\<bar> \<Longrightarrow>
    g =o O(h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> O(h); \<forall>x. \<bar>g x\<bar> \<le> \<bar>f x\<bar>\<rbrakk> \<Longrightarrow> g \<in> O(h)
[PROOF STEP]
apply (unfold bigo_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> {ha. \<exists>c. \<forall>x. \<bar>ha x\<bar> \<le> c * \<bar>h x\<bar>}; \<forall>x. \<bar>g x\<bar> \<le> \<bar>f x\<bar>\<rbrakk> \<Longrightarrow> g \<in> {ha. \<exists>c. \<forall>x. \<bar>ha x\<bar> \<le> c * \<bar>h x\<bar>}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>c. \<lbrakk>\<forall>x. \<bar>g x\<bar> \<le> \<bar>f x\<bar>; \<forall>x. \<bar>f x\<bar> \<le> c * \<bar>h x\<bar>\<rbrakk> \<Longrightarrow> \<exists>c. \<forall>x. \<bar>g x\<bar> \<le> c * \<bar>h x\<bar>
[PROOF STEP]
apply (blast intro: order_trans)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma eNorm_Norm:
  assumes "x \<in> space\<^sub>N N"
  shows "eNorm N x = ennreal (Norm N x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eNorm N x = ennreal (Norm N x)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> space\<^sub>N N

goal (1 subgoal):
 1. eNorm N x = ennreal (Norm N x)
[PROOF STEP]
unfolding Norm_def
[PROOF STATE]
proof (prove)
using this:
x \<in> space\<^sub>N N

goal (1 subgoal):
 1. eNorm N x = ennreal (enn2real (eNorm N x))
[PROOF STEP]
by (simp add: spaceN_iff)


[STATEMENT]
theorem isomorphic_as_monoids_symmetric:
  "(M, composition, unit) \<cong>\<^sub>M (M', composition', unit') \<Longrightarrow> (M', composition', unit') \<cong>\<^sub>M (M, composition, unit)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (M, composition, unit) \<cong>\<^sub>M (M', composition', unit') \<Longrightarrow> (M', composition', unit') \<cong>\<^sub>M (M, composition, unit)
[PROOF STEP]
by (simp add: isomorphic_as_monoids_def) (meson monoid_isomorphism.inverse_monoid_isomorphism)


[STATEMENT]
lemma summable_iff_convergent: "summable f \<longleftrightarrow> convergent (\<lambda>n. \<Sum>i<n. f i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable f = convergent (\<lambda>n. sum f {..<n})
[PROOF STEP]
by (simp add: summable_def sums_def convergent_def)


[STATEMENT]
lemma le_numeral_iff: "m \<le> numeral n \<longleftrightarrow> m = numeral n \<or> m \<le> pred_numeral n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (m \<le> numeral n) = (m = numeral n \<or> m \<le> pred_numeral n)
[PROOF STEP]
using numeral_eq_Suc
[PROOF STATE]
proof (prove)
using this:
numeral ?k = Suc (pred_numeral ?k)

goal (1 subgoal):
 1. (m \<le> numeral n) = (m = numeral n \<or> m \<le> pred_numeral n)
[PROOF STEP]
by presburger


[STATEMENT]
lemma unicoherent_translation:
  fixes S :: "'a::real_normed_vector set"
  shows
   "unicoherent (image (\<lambda>x. a + x) S) \<longleftrightarrow> unicoherent S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unicoherent ((+) a ` S) = unicoherent S
[PROOF STEP]
using homeomorphic_translation homeomorphic_unicoherent_eq
[PROOF STATE]
proof (prove)
using this:
?S homeomorphic (+) ?a ` ?S
?S homeomorphic ?T \<Longrightarrow> unicoherent ?S = unicoherent ?T

goal (1 subgoal):
 1. unicoherent ((+) a ` S) = unicoherent S
[PROOF STEP]
by blast


[STATEMENT]
lemma lsc_liminf_at_eq:
  fixes f :: "'a::metric_space \<Rightarrow> ereal"
  shows "lsc_at x0 f \<longleftrightarrow> (f x0 = min (f x0) (Liminf (at x0) f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lsc_at x0 f = (f x0 = min (f x0) (Liminf (at x0) f))
[PROOF STEP]
by (metis inf_ereal_def le_iff_inf lsc_liminf_at)


[STATEMENT]
lemma sbintrunc_If:
  "- 3 * (2 ^ n) \<le> x \<and> x < 3 * (2 ^ n)
    \<Longrightarrow> (signed_take_bit :: nat \<Rightarrow> int \<Rightarrow> int) n x = (if x < - (2 ^ n) then x + 2 * (2 ^ n)
        else if x \<ge> 2 ^ n then x - 2 * (2 ^ n) else x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - 3 * 2 ^ n \<le> x \<and> x < 3 * 2 ^ n \<Longrightarrow> signed_take_bit n x = (if x < - (2 ^ n) then x + 2 * 2 ^ n else if 2 ^ n \<le> x then x - 2 * 2 ^ n else x)
[PROOF STEP]
apply (simp add: no_sbintr_alt2, safe)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>- (3 * 2 ^ n) \<le> x; x < 3 * 2 ^ n; 2 ^ n \<le> x\<rbrakk> \<Longrightarrow> 2 ^ n + (x + 2 ^ n) mod (2 * 2 ^ n) = x
 2. \<lbrakk>- (3 * 2 ^ n) \<le> x; x < 3 * 2 ^ n; \<not> 2 ^ n \<le> x; x < - (2 ^ n)\<rbrakk> \<Longrightarrow> (x + 2 ^ n) mod (2 * 2 ^ n) = 3 * 2 ^ n + x
[PROOF STEP]
apply (simp add: mod_pos_geq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>- (3 * 2 ^ n) \<le> x; x < 3 * 2 ^ n; \<not> 2 ^ n \<le> x; x < - (2 ^ n)\<rbrakk> \<Longrightarrow> (x + 2 ^ n) mod (2 * 2 ^ n) = 3 * 2 ^ n + x
[PROOF STEP]
apply (subst mod_add_self1[symmetric], simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma tendsto_compose_eventually:
  "g \<midarrow>l\<rightarrow> m \<Longrightarrow> (f \<longlongrightarrow> l) F \<Longrightarrow> eventually (\<lambda>x. f x \<noteq> l) F \<Longrightarrow> ((\<lambda>x. g (f x)) \<longlongrightarrow> m) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>g \<midarrow>l\<rightarrow> m; (f \<longlongrightarrow> l) F; \<forall>\<^sub>F x in F. f x \<noteq> l\<rbrakk> \<Longrightarrow> ((\<lambda>x. g (f x)) \<longlongrightarrow> m) F
[PROOF STEP]
by (rule filterlim_compose[of g _ "at l"]) (auto simp add: filterlim_at)


[STATEMENT]
lemma is_poincare_line_poincare_line [simp]:
  assumes "z \<noteq> w"
  shows "is_poincare_line (poincare_line z w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_poincare_line (poincare_line z w)
[PROOF STEP]
using poincare_line_type[of z w, OF assms]
[PROOF STATE]
proof (prove)
using this:
circline_type (poincare_line z w) = - 1

goal (1 subgoal):
 1. is_poincare_line (poincare_line z w)
[PROOF STEP]
proof (transfer, transfer)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>z w za wa. \<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero; circline_type_cmat (poincare_line_cvec_cmat z w) = - 1; circline_type_clmat (poincare_line_hcoords_clmat za wa) = - 1\<rbrakk> \<Longrightarrow> is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
fix z w
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>z w za wa. \<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero; circline_type_cmat (poincare_line_cvec_cmat z w) = - 1; circline_type_clmat (poincare_line_hcoords_clmat za wa) = - 1\<rbrakk> \<Longrightarrow> is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
assume vz: "z \<noteq> vec_zero" "w \<noteq> vec_zero"
[PROOF STATE]
proof (state)
this:
z \<noteq> vec_zero
w \<noteq> vec_zero

goal (1 subgoal):
 1. \<And>z w za wa. \<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero; circline_type_cmat (poincare_line_cvec_cmat z w) = - 1; circline_type_clmat (poincare_line_hcoords_clmat za wa) = - 1\<rbrakk> \<Longrightarrow> is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
obtain A B C D where *: "poincare_line_cvec_cmat z w = (A, B, C, D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A B C D. poincare_line_cvec_cmat z w = (A, B, C, D) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases "poincare_line_cvec_cmat z w") auto
[PROOF STATE]
proof (state)
this:
poincare_line_cvec_cmat z w = (A, B, C, D)

goal (1 subgoal):
 1. \<And>z w za wa. \<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero; circline_type_cmat (poincare_line_cvec_cmat z w) = - 1; circline_type_clmat (poincare_line_hcoords_clmat za wa) = - 1\<rbrakk> \<Longrightarrow> is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
assume "circline_type_cmat (poincare_line_cvec_cmat z w) = - 1"
[PROOF STATE]
proof (state)
this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1

goal (1 subgoal):
 1. \<And>z w za wa. \<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero; circline_type_cmat (poincare_line_cvec_cmat z w) = - 1; circline_type_clmat (poincare_line_hcoords_clmat za wa) = - 1\<rbrakk> \<Longrightarrow> is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
thus "is_poincare_line_cmat (poincare_line_cvec_cmat z w)"
[PROOF STATE]
proof (prove)
using this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1

goal (1 subgoal):
 1. is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
using vz *
[PROOF STATE]
proof (prove)
using this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1
z \<noteq> vec_zero
w \<noteq> vec_zero
poincare_line_cvec_cmat z w = (A, B, C, D)

goal (1 subgoal):
 1. is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
using poincare_line_cvec_cmat_hermitean[of z w]
[PROOF STATE]
proof (prove)
using this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1
z \<noteq> vec_zero
w \<noteq> vec_zero
poincare_line_cvec_cmat z w = (A, B, C, D)
hermitean (poincare_line_cvec_cmat z w)

goal (1 subgoal):
 1. is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
using poincare_line_cvec_cmat_nonzero[of z w]
[PROOF STATE]
proof (prove)
using this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1
z \<noteq> vec_zero
w \<noteq> vec_zero
poincare_line_cvec_cmat z w = (A, B, C, D)
hermitean (poincare_line_cvec_cmat z w)
\<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero\<rbrakk> \<Longrightarrow> poincare_line_cvec_cmat z w \<noteq> mat_zero

goal (1 subgoal):
 1. is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
using poincare_line_cvec_cmat_AeqD[of z w A B C D]
[PROOF STATE]
proof (prove)
using this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1
z \<noteq> vec_zero
w \<noteq> vec_zero
poincare_line_cvec_cmat z w = (A, B, C, D)
hermitean (poincare_line_cvec_cmat z w)
\<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero\<rbrakk> \<Longrightarrow> poincare_line_cvec_cmat z w \<noteq> mat_zero
poincare_line_cvec_cmat z w = (A, B, C, D) \<Longrightarrow> A = D

goal (1 subgoal):
 1. is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
using hermitean_elems[of A B C D]
[PROOF STATE]
proof (prove)
using this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1
z \<noteq> vec_zero
w \<noteq> vec_zero
poincare_line_cvec_cmat z w = (A, B, C, D)
hermitean (poincare_line_cvec_cmat z w)
\<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero\<rbrakk> \<Longrightarrow> poincare_line_cvec_cmat z w \<noteq> mat_zero
poincare_line_cvec_cmat z w = (A, B, C, D) \<Longrightarrow> A = D
hermitean (A, B, C, D) \<Longrightarrow> is_real A
hermitean (A, B, C, D) \<Longrightarrow> is_real D
hermitean (A, B, C, D) \<Longrightarrow> B = cnj C
hermitean (A, B, C, D) \<Longrightarrow> cnj B = C

goal (1 subgoal):
 1. is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
using cmod_power2[of D] cmod_power2[of C]
[PROOF STATE]
proof (prove)
using this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1
z \<noteq> vec_zero
w \<noteq> vec_zero
poincare_line_cvec_cmat z w = (A, B, C, D)
hermitean (poincare_line_cvec_cmat z w)
\<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero\<rbrakk> \<Longrightarrow> poincare_line_cvec_cmat z w \<noteq> mat_zero
poincare_line_cvec_cmat z w = (A, B, C, D) \<Longrightarrow> A = D
hermitean (A, B, C, D) \<Longrightarrow> is_real A
hermitean (A, B, C, D) \<Longrightarrow> is_real D
hermitean (A, B, C, D) \<Longrightarrow> B = cnj C
hermitean (A, B, C, D) \<Longrightarrow> cnj B = C
(cmod D)\<^sup>2 = (Re D)\<^sup>2 + (Im D)\<^sup>2
(cmod C)\<^sup>2 = (Re C)\<^sup>2 + (Im C)\<^sup>2

goal (1 subgoal):
 1. is_poincare_line_cmat (poincare_line_cvec_cmat z w)
[PROOF STEP]
unfolding is_poincare_line_cmat_def
[PROOF STATE]
proof (prove)
using this:
circline_type_cmat (poincare_line_cvec_cmat z w) = - 1
z \<noteq> vec_zero
w \<noteq> vec_zero
poincare_line_cvec_cmat z w = (A, B, C, D)
hermitean (poincare_line_cvec_cmat z w)
\<lbrakk>z \<noteq> vec_zero; w \<noteq> vec_zero\<rbrakk> \<Longrightarrow> poincare_line_cvec_cmat z w \<noteq> mat_zero
poincare_line_cvec_cmat z w = (A, B, C, D) \<Longrightarrow> A = D
hermitean (A, B, C, D) \<Longrightarrow> is_real A
hermitean (A, B, C, D) \<Longrightarrow> is_real D
hermitean (A, B, C, D) \<Longrightarrow> B = cnj C
hermitean (A, B, C, D) \<Longrightarrow> cnj B = C
(cmod D)\<^sup>2 = (Re D)\<^sup>2 + (Im D)\<^sup>2
(cmod C)\<^sup>2 = (Re C)\<^sup>2 + (Im C)\<^sup>2

goal (1 subgoal):
 1. let (A, B, C, D) = poincare_line_cvec_cmat z w in hermitean (A, B, C, D) \<and> A = D \<and> (cmod A)\<^sup>2 < (cmod B)\<^sup>2
[PROOF STEP]
by (simp del: poincare_line_cvec_cmat_def add: sgn_1_neg power2_eq_square)
[PROOF STATE]
proof (state)
this:
is_poincare_line_cmat (poincare_line_cvec_cmat z w)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ack_le_mono2: "j \<le> k \<Longrightarrow> ack i j \<le> ack i k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. j \<le> k \<Longrightarrow> ack i j \<le> ack i k
[PROOF STEP]
by (simp add: ack_less_mono2 less_mono_imp_le_mono)


[STATEMENT]
lemma fold_random_permutation_code [code]:
  "fold_random_permutation f x (set xs) =
     map_pmf (foldl (\<lambda>x y. f y x) x) (pmf_of_set (permutations_of_set (set xs)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fold_random_permutation f x (set xs) = map_pmf (foldl (\<lambda>x y. f y x) x) (pmf_of_set (permutations_of_set (set xs)))
[PROOF STEP]
by (simp add: fold_random_permutation_foldl)


[STATEMENT]
lemma [mono]:"
         (!! x. f x --> g x) ==> list_all (%b. b) (map f foo_list)-->
                    list_all (%b. b) (map g foo_list) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. f x \<longrightarrow> g x) \<Longrightarrow> list_all (\<lambda>b. b) (map f foo_list) \<longrightarrow> list_all (\<lambda>b. b) (map g foo_list)
[PROOF STEP]
apply(induct_tac foo_list, auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma \<dd>_foldr_Times: "\<dd> (foldr Times xs s) a =
  (let n = length (takeWhile \<oo> xs)
  in PLUS (map (\<lambda>zs. TIMES (\<dd> (hd zs) a # tl zs)) (take (Suc n) (tails (xs @ [s])))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<dd> (foldr Times xs s) a = (let n = length (takeWhile \<oo> xs) in PLUS (map (\<lambda>zs. TIMES (\<dd> (hd zs) a # tl zs)) (take (Suc n) (tails (xs @ [s])))))
[PROOF STEP]
by (induct xs) (auto simp: TIMES_def PLUS_def Let_def foldr_map o_def)


[STATEMENT]
lemma lemma_complex_mult_inverse_squared [simp]: "x \<noteq> 0 \<Longrightarrow> x * (inverse x)\<^sup>2 = inverse x"
  for x :: complex
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> 0 \<Longrightarrow> x * (inverse x)\<^sup>2 = inverse x
[PROOF STEP]
by (simp add: numeral_2_eq_2)


[STATEMENT]
lemma eval_fps_mult:
  fixes f g :: "'a :: {banach, real_normed_div_algebra, comm_ring_1} fps"
  assumes "norm z < fps_conv_radius f" "norm z < fps_conv_radius g"
  shows   "eval_fps (f * g) z = eval_fps f z * eval_fps g z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fps (f * g) z = eval_fps f z * eval_fps g z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eval_fps (f * g) z = eval_fps f z * eval_fps g z
[PROOF STEP]
have "eval_fps f z * eval_fps g z =
          (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_fps f z * eval_fps g z = (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i)))
[PROOF STEP]
unfolding eval_fps_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. fps_nth f n * z ^ n) * (\<Sum>n. fps_nth g n * z ^ n) = (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i)))
[PROOF STEP]
proof (subst Cauchy_product)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. summable (\<lambda>k. norm (fps_nth f k * z ^ k))
 2. summable (\<lambda>k. norm (fps_nth g k * z ^ k))
 3. (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * z ^ i * (fps_nth g (k - i) * z ^ (k - i))) = (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i)))
[PROOF STEP]
show "summable (\<lambda>k. norm (fps_nth f k * z ^ k))" "summable (\<lambda>k. norm (fps_nth g k * z ^ k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>k. norm (fps_nth f k * z ^ k)) &&& summable (\<lambda>k. norm (fps_nth g k * z ^ k))
[PROOF STEP]
by (rule norm_summable_fps assms)+
[PROOF STATE]
proof (state)
this:
summable (\<lambda>k. norm (fps_nth f k * z ^ k))
summable (\<lambda>k. norm (fps_nth g k * z ^ k))

goal (1 subgoal):
 1. (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * z ^ i * (fps_nth g (k - i) * z ^ (k - i))) = (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i)))
[PROOF STEP]
qed (simp_all add: algebra_simps)
[PROOF STATE]
proof (state)
this:
eval_fps f z * eval_fps g z = (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i)))

goal (1 subgoal):
 1. eval_fps (f * g) z = eval_fps f z * eval_fps g z
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
eval_fps f z * eval_fps g z = (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i)))

goal (1 subgoal):
 1. eval_fps (f * g) z = eval_fps f z * eval_fps g z
[PROOF STEP]
have "(\<lambda>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i))) =
               (\<lambda>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * z ^ k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i))) = (\<lambda>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * z ^ k)
[PROOF STEP]
by (intro ext sum.cong refl) (simp add: power_add [symmetric])
[PROOF STATE]
proof (state)
this:
(\<lambda>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i))) = (\<lambda>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * z ^ k)

goal (1 subgoal):
 1. eval_fps (f * g) z = eval_fps f z * eval_fps g z
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * (z ^ i * z ^ (k - i))) = (\<lambda>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * z ^ k)

goal (1 subgoal):
 1. eval_fps (f * g) z = eval_fps f z * eval_fps g z
[PROOF STEP]
have "suminf \<dots> = eval_fps (f * g) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * z ^ k) = eval_fps (f * g) z
[PROOF STEP]
by (simp add: eval_fps_def fps_mult_nth atLeast0AtMost sum_distrib_right)
[PROOF STATE]
proof (state)
this:
(\<Sum>k. \<Sum>i\<le>k. fps_nth f i * fps_nth g (k - i) * z ^ k) = eval_fps (f * g) z

goal (1 subgoal):
 1. eval_fps (f * g) z = eval_fps f z * eval_fps g z
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
eval_fps f z * eval_fps g z = eval_fps (f * g) z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
eval_fps f z * eval_fps g z = eval_fps (f * g) z

goal (1 subgoal):
 1. eval_fps (f * g) z = eval_fps f z * eval_fps g z
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
eval_fps (f * g) z = eval_fps f z * eval_fps g z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Ball_set_replicate[simp]:
  "(\<forall>x \<in> set(replicate n a). P x) = (P a \<or> n=0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>set (replicate n a). P x) = (P a \<or> n = 0)
[PROOF STEP]
by(simp add: set_replicate_conv_if)


[STATEMENT]
lemma inner_with_ge_0: "(P::(real, 'n::finite) vec) > 0 \<Longrightarrow> A \<ge> B \<Longrightarrow>  P \<bullet> A \<ge> P \<bullet> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < P; B \<le> A\<rbrakk> \<Longrightarrow> P \<bullet> B \<le> P \<bullet> A
[PROOF STEP]
by (metis dual_order.order_iff_strict inner_commute
      interval_inner_leI(2) ord_class.atLeastAtMost_iff)


[STATEMENT]
lemma powreal_inject [simp]:
  "0 < a \<Longrightarrow> a \<noteq> 1 \<Longrightarrow> (a pow\<^sub>\<real> r = a pow\<^sub>\<real> s) = (s = r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a; a \<noteq> 1\<rbrakk> \<Longrightarrow> (a pow\<^sub>\<real> r = a pow\<^sub>\<real> s) = (s = r)
[PROOF STEP]
using powreal_inject_base_less_one
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < ?a; ?a < 1\<rbrakk> \<Longrightarrow> (?a pow\<^sub>\<real> ?r = ?a pow\<^sub>\<real> ?s) = (?s = ?r)

goal (1 subgoal):
 1. \<lbrakk>0 < a; a \<noteq> 1\<rbrakk> \<Longrightarrow> (a pow\<^sub>\<real> r = a pow\<^sub>\<real> s) = (s = r)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma count_replicate_mset[simp]: "count (replicate_mset n x) y = (if y = x then n else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. count (replicate_mset n x) y = (if y = x then n else 0)
[PROOF STEP]
unfolding replicate_mset_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. count ((add_mset x ^^ n) {#}) y = (if y = x then n else 0)
[PROOF STEP]
by (induct n) auto


[STATEMENT]
lemma mod_sub_eq_mod_swap: "
  \<lbrakk> a \<le> (n::nat); b \<le> n \<rbrakk> \<Longrightarrow>
  ((n - a) mod m = b mod m) = ((n - b) mod m = a mod m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> n; b \<le> n\<rbrakk> \<Longrightarrow> ((n - a) mod m = b mod m) = ((n - b) mod m = a mod m)
[PROOF STEP]
by (simp add: mod_sub_add add.commute)


[STATEMENT]
lemma rtrancl_path_mono:
  "\<lbrakk> rtrancl_path R x p y; \<And>x y. R x y \<Longrightarrow> S x y \<rbrakk> \<Longrightarrow> rtrancl_path S x p y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>rtrancl_path R x p y; \<And>x y. R x y \<Longrightarrow> S x y\<rbrakk> \<Longrightarrow> rtrancl_path S x p y
[PROOF STEP]
by(induction rule: rtrancl_path.induct)(auto intro: rtrancl_path.intros)


[STATEMENT]
lemma closure_greaterThan[simp]:
  fixes a b::"'a::{no_top, linorder_topology, dense_order}"
  shows "closure {a<..} = {a..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closure {a<..} = {a..}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. closure {a<..} = {a..}
[PROOF STEP]
from gt_ex
[PROOF STATE]
proof (chain)
picking this:
\<exists>y. ?x < y
[PROOF STEP]
obtain b where "a < b"
[PROOF STATE]
proof (prove)
using this:
\<exists>y. ?x < y

goal (1 subgoal):
 1. (\<And>b. a < b \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a < b

goal (1 subgoal):
 1. closure {a<..} = {a..}
[PROOF STEP]
hence "{a<..} = {a<..<b} \<union> {b..}"
[PROOF STATE]
proof (prove)
using this:
a < b

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

goal (1 subgoal):
 1. closure {a<..} = {a..}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{a<..} = {a<..<b} \<union> {b..}

goal (1 subgoal):
 1. closure {a<..} = {a..}
[PROOF STEP]
have "closure \<dots> = {a..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closure ({a<..<b} \<union> {b..}) = {a..}
[PROOF STEP]
using \<open>a < b\<close>
[PROOF STATE]
proof (prove)
using this:
a < b

goal (1 subgoal):
 1. closure ({a<..<b} \<union> {b..}) = {a..}
[PROOF STEP]
unfolding closure_Un
[PROOF STATE]
proof (prove)
using this:
a < b

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

goal (1 subgoal):
 1. closure {a<..} = {a..}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
closure {a<..} = {a..}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
closure {a<..} = {a..}

goal (1 subgoal):
 1. closure {a<..} = {a..}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
closure {a<..} = {a..}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma homeomorphic_map_compactness:
  assumes hom: "homeomorphic_map X Y f" and U: "U \<subseteq> topspace X"
  shows "compactin Y (f ` U) \<longleftrightarrow> compactin X U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compactin Y (f ` U) = compactin X U
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. compactin Y (f ` U) = compactin X U
[PROOF STEP]
have "f ` U \<subseteq> topspace Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` U \<subseteq> topspace Y
[PROOF STEP]
using hom U homeomorphic_imp_surjective_map
[PROOF STATE]
proof (prove)
using this:
homeomorphic_map X Y f
U \<subseteq> topspace X
homeomorphic_map ?X ?Y ?f \<Longrightarrow> ?f ` topspace ?X = topspace ?Y

goal (1 subgoal):
 1. f ` U \<subseteq> topspace Y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f ` U \<subseteq> topspace Y

goal (1 subgoal):
 1. compactin Y (f ` U) = compactin X U
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
f ` U \<subseteq> topspace Y

goal (1 subgoal):
 1. compactin Y (f ` U) = compactin X U
[PROOF STEP]
have "homeomorphic_map (subtopology X U) (subtopology Y (f ` U)) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homeomorphic_map (subtopology X U) (subtopology Y (f ` U)) f
[PROOF STEP]
using U hom homeomorphic_imp_surjective_map
[PROOF STATE]
proof (prove)
using this:
U \<subseteq> topspace X
homeomorphic_map X Y f
homeomorphic_map ?X ?Y ?f \<Longrightarrow> ?f ` topspace ?X = topspace ?Y

goal (1 subgoal):
 1. homeomorphic_map (subtopology X U) (subtopology Y (f ` U)) f
[PROOF STEP]
by (blast intro: homeomorphic_map_subtopologies)
[PROOF STATE]
proof (state)
this:
homeomorphic_map (subtopology X U) (subtopology Y (f ` U)) f

goal (1 subgoal):
 1. compactin Y (f ` U) = compactin X U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
homeomorphic_map (subtopology X U) (subtopology Y (f ` U)) f
[PROOF STEP]
have "compact_space (subtopology Y (f ` U)) = compact_space (subtopology X U)"
[PROOF STATE]
proof (prove)
using this:
homeomorphic_map (subtopology X U) (subtopology Y (f ` U)) f

goal (1 subgoal):
 1. compact_space (subtopology Y (f ` U)) = compact_space (subtopology X U)
[PROOF STEP]
using homeomorphic_compact_space homeomorphic_map_imp_homeomorphic_space
[PROOF STATE]
proof (prove)
using this:
homeomorphic_map (subtopology X U) (subtopology Y (f ` U)) f
?X homeomorphic_space ?Y \<Longrightarrow> compact_space ?X = compact_space ?Y
homeomorphic_map ?X ?Y ?f \<Longrightarrow> ?X homeomorphic_space ?Y

goal (1 subgoal):
 1. compact_space (subtopology Y (f ` U)) = compact_space (subtopology X U)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
compact_space (subtopology Y (f ` U)) = compact_space (subtopology X U)

goal (1 subgoal):
 1. compactin Y (f ` U) = compactin X U
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
f ` U \<subseteq> topspace Y
compact_space (subtopology Y (f ` U)) = compact_space (subtopology X U)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f ` U \<subseteq> topspace Y
compact_space (subtopology Y (f ` U)) = compact_space (subtopology X U)

goal (1 subgoal):
 1. compactin Y (f ` U) = compactin X U
[PROOF STEP]
by (simp add: compactin_subspace U)
[PROOF STATE]
proof (state)
this:
compactin Y (f ` U) = compactin X U

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_real_derivative_powr':
  fixes f g :: "real \<Rightarrow> real"
  assumes "(f has_real_derivative f') (at x)"
  assumes "(g has_real_derivative g') (at x)"
  assumes "f x > 0"
  defines "h \<equiv> \<lambda>x. f x powr g x * (g' * ln (f x) + f' * g x / f x)"
  shows   "((\<lambda>x. f x powr g x) has_real_derivative h x) (at x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f x powr g x) has_real_derivative h x) (at x)
[PROOF STEP]
proof (subst DERIV_cong_ev[OF refl _ refl])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>\<^sub>F x in nhds x. f x powr g x = ?g x
 2. (?g has_real_derivative h x) (at x)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
(f has_real_derivative f') (at x)
(g has_real_derivative g') (at x)
0 < f x
h \<equiv> \<lambda>x. f x powr g x * (g' * ln (f x) + f' * g x / f x)
[PROOF STEP]
have "isCont f x"
[PROOF STATE]
proof (prove)
using this:
(f has_real_derivative f') (at x)
(g has_real_derivative g') (at x)
0 < f x
h \<equiv> \<lambda>x. f x powr g x * (g' * ln (f x) + f' * g x / f x)

goal (1 subgoal):
 1. isCont f x
[PROOF STEP]
by (simp add: DERIV_continuous)
[PROOF STATE]
proof (state)
this:
isCont f x

goal (2 subgoals):
 1. \<forall>\<^sub>F x in nhds x. f x powr g x = ?g x
 2. (?g has_real_derivative h x) (at x)
[PROOF STEP]
hence "f \<midarrow>x\<rightarrow> f x"
[PROOF STATE]
proof (prove)
using this:
isCont f x

goal (1 subgoal):
 1. f \<midarrow>x\<rightarrow> f x
[PROOF STEP]
by (simp add: continuous_at)
[PROOF STATE]
proof (state)
this:
f \<midarrow>x\<rightarrow> f x

goal (2 subgoals):
 1. \<forall>\<^sub>F x in nhds x. f x powr g x = ?g x
 2. (?g has_real_derivative h x) (at x)
[PROOF STEP]
with \<open>f x > 0\<close>
[PROOF STATE]
proof (chain)
picking this:
0 < f x
f \<midarrow>x\<rightarrow> f x
[PROOF STEP]
have "eventually (\<lambda>x. f x > 0) (nhds x)"
[PROOF STATE]
proof (prove)
using this:
0 < f x
f \<midarrow>x\<rightarrow> f x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in nhds x. 0 < f x
[PROOF STEP]
by (auto simp: tendsto_at_iff_tendsto_nhds dest: order_tendstoD)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in nhds x. 0 < f x

goal (2 subgoals):
 1. \<forall>\<^sub>F x in nhds x. f x powr g x = ?g x
 2. (?g has_real_derivative h x) (at x)
[PROOF STEP]
thus "eventually (\<lambda>x. f x powr g x = exp (g x * ln (f x))) (nhds x)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in nhds x. 0 < f x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in nhds x. f x powr g x = exp (g x * ln (f x))
[PROOF STEP]
by eventually_elim (simp add: powr_def)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in nhds x. f x powr g x = exp (g x * ln (f x))

goal (1 subgoal):
 1. ((\<lambda>x. exp (g x * ln (f x))) has_real_derivative h x) (at x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. exp (g x * ln (f x))) has_real_derivative h x) (at x)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
(f has_real_derivative f') (at x)
(g has_real_derivative g') (at x)
0 < f x
h \<equiv> \<lambda>x. f x powr g x * (g' * ln (f x) + f' * g x / f x)
[PROOF STEP]
show "((\<lambda>x. exp (g x * ln (f x))) has_real_derivative h x) (at x)"
[PROOF STATE]
proof (prove)
using this:
(f has_real_derivative f') (at x)
(g has_real_derivative g') (at x)
0 < f x
h \<equiv> \<lambda>x. f x powr g x * (g' * ln (f x) + f' * g x / f x)

goal (1 subgoal):
 1. ((\<lambda>x. exp (g x * ln (f x))) has_real_derivative h x) (at x)
[PROOF STEP]
by (auto intro!: derivative_eq_intros simp: h_def powr_def)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. exp (g x * ln (f x))) has_real_derivative h x) (at x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma swap_child_mset:
  assumes
    "arr_mset arr1 l r = arr_mset arr2 l r"
    "c = l_child l p \<or> c = r_child l p"
    "l \<le> p" "c < r"
  shows "arr_mset arr1 l r = arr_mset (swap arr2 p c) l r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arr_mset arr1 l r = arr_mset (swap arr2 p c) l r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. arr_mset arr1 l r = arr_mset (swap arr2 p c) l r
[PROOF STEP]
have child_bounded: "l < c \<and> c < r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l < c \<and> c < r
[PROOF STEP]
by (metis assms(2-4) parent_lower_bound parent_two_children)
[PROOF STATE]
proof (state)
this:
l < c \<and> c < r

goal (1 subgoal):
 1. arr_mset arr1 l r = arr_mset (swap arr2 p c) l r
[PROOF STEP]
have parent_bounded: "bounded l r p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded l r p
[PROOF STEP]
by (metis assms(2-4) dual_order.strict_trans parent_two_children parent_upper_bound_alt)
[PROOF STATE]
proof (state)
this:
bounded l r p

goal (1 subgoal):
 1. arr_mset arr1 l r = arr_mset (swap arr2 p c) l r
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
bounded l r p

goal (1 subgoal):
 1. arr_mset arr1 l r = arr_mset (swap arr2 p c) l r
[PROOF STEP]
using assms(1) child_bounded mset_ran_swap[of p "{l..<r}" c arr2] atLeastLessThan_iff
[PROOF STATE]
proof (prove)
using this:
bounded l r p
arr_mset arr1 l r = arr_mset arr2 l r
l < c \<and> c < r
\<lbrakk>p \<in> {l..<r}; c \<in> {l..<r}\<rbrakk> \<Longrightarrow> arr_mset (swap arr2 p c) l r = arr_mset arr2 l r
(?i \<in> {?l..<?u}) = (?l \<le> ?i \<and> ?i < ?u)

goal (1 subgoal):
 1. arr_mset arr1 l r = arr_mset (swap arr2 p c) l r
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
arr_mset arr1 l r = arr_mset (swap arr2 p c) l r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma monom_mult_inj_3:
  assumes "monom_mult c t p1 = monom_mult c t (p2::(_ \<Rightarrow>\<^sub>0 'b::semiring_no_zero_divisors_cancel))"
    and "c \<noteq> 0"
  shows "p1 = p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p1 = p2
[PROOF STEP]
proof (rule poly_mapping_eqI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. lookup p1 k = lookup p2 k
[PROOF STEP]
fix v
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k. lookup p1 k = lookup p2 k
[PROOF STEP]
from assms(1)
[PROOF STATE]
proof (chain)
picking this:
monom_mult c t p1 = monom_mult c t p2
[PROOF STEP]
have "lookup (monom_mult c t p1) (t \<oplus> v) = lookup (monom_mult c t p2) (t \<oplus> v)"
[PROOF STATE]
proof (prove)
using this:
monom_mult c t p1 = monom_mult c t p2

goal (1 subgoal):
 1. lookup (monom_mult c t p1) (t \<oplus> v) = lookup (monom_mult c t p2) (t \<oplus> v)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lookup (monom_mult c t p1) (t \<oplus> v) = lookup (monom_mult c t p2) (t \<oplus> v)

goal (1 subgoal):
 1. \<And>k. lookup p1 k = lookup p2 k
[PROOF STEP]
hence "c * lookup p1 v = c * lookup p2 v"
[PROOF STATE]
proof (prove)
using this:
lookup (monom_mult c t p1) (t \<oplus> v) = lookup (monom_mult c t p2) (t \<oplus> v)

goal (1 subgoal):
 1. c * lookup p1 v = c * lookup p2 v
[PROOF STEP]
by (simp only: lookup_monom_mult_plus)
[PROOF STATE]
proof (state)
this:
c * lookup p1 v = c * lookup p2 v

goal (1 subgoal):
 1. \<And>k. lookup p1 k = lookup p2 k
[PROOF STEP]
with assms(2)
[PROOF STATE]
proof (chain)
picking this:
c \<noteq> (0::'b)
c * lookup p1 v = c * lookup p2 v
[PROOF STEP]
show "lookup p1 v = lookup p2 v"
[PROOF STATE]
proof (prove)
using this:
c \<noteq> (0::'b)
c * lookup p1 v = c * lookup p2 v

goal (1 subgoal):
 1. lookup p1 v = lookup p2 v
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lookup p1 v = lookup p2 v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_le_x_sinh:
  fixes x::real
  assumes "0 \<le> x"
  shows "x \<le> (exp x - inverse(exp x)) / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<le> (exp x - inverse (exp x)) / 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<le> (exp x - inverse (exp x)) / 2
[PROOF STEP]
have *: "exp a - inverse(exp a) - 2*a \<le> exp b - inverse(exp b) - 2*b" if "a \<le> b" for a b::real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp a - inverse (exp a) - 2 * a \<le> exp b - inverse (exp b) - 2 * b
[PROOF STEP]
using exp_plus_inverse_exp
[PROOF STATE]
proof (prove)
using this:
2 \<le> exp ?x + inverse (exp ?x)

goal (1 subgoal):
 1. exp a - inverse (exp a) - 2 * a \<le> exp b - inverse (exp b) - 2 * b
[PROOF STEP]
by (fastforce intro: derivative_eq_intros DERIV_nonneg_imp_nondecreasing [OF that])
[PROOF STATE]
proof (state)
this:
?a \<le> ?b \<Longrightarrow> exp ?a - inverse (exp ?a) - 2 * ?a \<le> exp ?b - inverse (exp ?b) - 2 * ?b

goal (1 subgoal):
 1. x \<le> (exp x - inverse (exp x)) / 2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<le> (exp x - inverse (exp x)) / 2
[PROOF STEP]
using*[OF assms]
[PROOF STATE]
proof (prove)
using this:
exp 0 - inverse (exp 0) - 2 * 0 \<le> exp x - inverse (exp x) - 2 * x

goal (1 subgoal):
 1. x \<le> (exp x - inverse (exp x)) / 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<le> (exp x - inverse (exp x)) / 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nat_eventually_critical_path:
  fixes i :: nat
  assumes "P i" "\<not> P j" "i < j"
  shows "\<exists> k > i. k \<le> j \<and> \<not> P k \<and> (\<forall> m \<ge> i. m < k \<longrightarrow> P m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
let ?S = "{k. i < k \<and> k \<le> j \<and> \<not> P k}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
let ?k = "Min ?S"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
P i
\<not> P j
i < j
[PROOF STEP]
have "j \<in> ?S"
[PROOF STATE]
proof (prove)
using this:
P i
\<not> P j
i < j

goal (1 subgoal):
 1. j \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
j \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k}

goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
j \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k}

goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
have "finite ?S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {k. i < k \<and> k \<le> j \<and> \<not> P k}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {k. i < k \<and> k \<le> j \<and> \<not> P k}

goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
j \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k}
finite {k. i < k \<and> k \<le> j \<and> \<not> P k}
[PROOF STEP]
have "i < ?k" "?k \<le> j" "\<not> P ?k"
[PROOF STATE]
proof (prove)
using this:
j \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k}
finite {k. i < k \<and> k \<le> j \<and> \<not> P k}

goal (1 subgoal):
 1. i < Min {k. i < k \<and> k \<le> j \<and> \<not> P k} &&& Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j &&& \<not> P (Min {k. i < k \<and> k \<le> j \<and> \<not> P k})
[PROOF STEP]
using Min_in[of ?S]
[PROOF STATE]
proof (prove)
using this:
j \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k}
finite {k. i < k \<and> k \<le> j \<and> \<not> P k}
\<lbrakk>finite {k. i < k \<and> k \<le> j \<and> \<not> P k}; {k. i < k \<and> k \<le> j \<and> \<not> P k} \<noteq> {}\<rbrakk> \<Longrightarrow> Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k}

goal (1 subgoal):
 1. i < Min {k. i < k \<and> k \<le> j \<and> \<not> P k} &&& Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j &&& \<not> P (Min {k. i < k \<and> k \<le> j \<and> \<not> P k})
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
i < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}
Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j
\<not> P (Min {k. i < k \<and> k \<le> j \<and> \<not> P k})

goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
i < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}
Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j
\<not> P (Min {k. i < k \<and> k \<le> j \<and> \<not> P k})

goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
have "P m" if "i \<le> m" "m < ?k" for m
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P m
[PROOF STEP]
proof (cases "i = m")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i = m \<Longrightarrow> P m
 2. i \<noteq> m \<Longrightarrow> P m
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
i = m

goal (2 subgoals):
 1. i = m \<Longrightarrow> P m
 2. i \<noteq> m \<Longrightarrow> P m
[PROOF STEP]
with \<open>P i\<close>
[PROOF STATE]
proof (chain)
picking this:
P i
i = m
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P i
i = m

goal (1 subgoal):
 1. P m
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P m

goal (1 subgoal):
 1. i \<noteq> m \<Longrightarrow> P m
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i \<noteq> m \<Longrightarrow> P m
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
i \<noteq> m

goal (1 subgoal):
 1. i \<noteq> m \<Longrightarrow> P m
[PROOF STEP]
with \<open>i \<le> m\<close>
[PROOF STATE]
proof (chain)
picking this:
i \<le> m
i \<noteq> m
[PROOF STEP]
have "i < m"
[PROOF STATE]
proof (prove)
using this:
i \<le> m
i \<noteq> m

goal (1 subgoal):
 1. i < m
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
i < m

goal (1 subgoal):
 1. i \<noteq> m \<Longrightarrow> P m
[PROOF STEP]
with Min_le[OF \<open>finite _\<close>] \<open>m < ?k\<close> \<open>?k \<le> j\<close>
[PROOF STATE]
proof (chain)
picking this:
?x \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k} \<Longrightarrow> Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> ?x
m < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}
Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j
i < m
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<in> {k. i < k \<and> k \<le> j \<and> \<not> P k} \<Longrightarrow> Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> ?x
m < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}
Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j
i < m

goal (1 subgoal):
 1. P m
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
P m

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>i \<le> ?m; ?m < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}\<rbrakk> \<Longrightarrow> P ?m

goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
i < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}
Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j
\<not> P (Min {k. i < k \<and> k \<le> j \<and> \<not> P k})
\<lbrakk>i \<le> ?m; ?m < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}\<rbrakk> \<Longrightarrow> P ?m
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
i < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}
Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j
\<not> P (Min {k. i < k \<and> k \<le> j \<and> \<not> P k})
\<lbrakk>i \<le> ?m; ?m < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}\<rbrakk> \<Longrightarrow> P ?m

goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
using \<open>P i\<close>
[PROOF STATE]
proof (prove)
using this:
i < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}
Min {k. i < k \<and> k \<le> j \<and> \<not> P k} \<le> j
\<not> P (Min {k. i < k \<and> k \<le> j \<and> \<not> P k})
\<lbrakk>i \<le> ?m; ?m < Min {k. i < k \<and> k \<le> j \<and> \<not> P k}\<rbrakk> \<Longrightarrow> P ?m
P i

goal (1 subgoal):
 1. \<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)
[PROOF STEP]
by - (rule exI[where x = ?k]; blast)
[PROOF STATE]
proof (state)
this:
\<exists>k>i. k \<le> j \<and> \<not> P k \<and> (\<forall>m\<ge>i. m < k \<longrightarrow> P m)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eventually_nonneg_ident_nhds [eventually_nonzero_simps]:
  fixes a :: "'a :: {linorder_topology, linordered_field}"
  shows "a > 0 \<Longrightarrow> eventually_nonneg (nhds a) (\<lambda>x. x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < a \<Longrightarrow> eventually_nonneg (nhds a) (\<lambda>x. x)
[PROOF STEP]
unfolding eventually_nonneg_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < a \<Longrightarrow> eventually ((\<le>) (0::'a)) (nhds a)
[PROOF STEP]
using eventually_nhds_in_open[of "{0<..}" a]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>open {0::'a<..}; a \<in> {0::'a<..}\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F y in nhds a. y \<in> {0::'a<..}

goal (1 subgoal):
 1. (0::'a) < a \<Longrightarrow> eventually ((\<le>) (0::'a)) (nhds a)
[PROOF STEP]
by (auto simp: eventually_nonneg_def dest: eventually_nhds_x_imp_x elim!: eventually_mono)


[STATEMENT]
lemma expands_to_abs_neg:
  assumes "trimmed_neg F" "basis_wf basis" "(f expands_to F) basis"
  shows   "((\<lambda>x. abs (f x)) expands_to -F) basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<bar>f x\<bar>) expands_to - F) basis
[PROOF STEP]
using expands_to_uminus[OF assms(2,3)]
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. - f x) expands_to - F) basis

goal (1 subgoal):
 1. ((\<lambda>x. \<bar>f x\<bar>) expands_to - F) basis
[PROOF STEP]
proof (rule expands_to_cong)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. - f x = \<bar>f x\<bar>
[PROOF STEP]
from trimmed_imp_eventually_sgn[of basis F] assms
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>basis_wf basis; is_expansion F basis; trimmed F\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in at_top. sgn (eval F x) = sgn (fst (dominant_term F))
trimmed_neg F
basis_wf basis
(f expands_to F) basis
[PROOF STEP]
have "eventually (\<lambda>x. sgn (eval F x) = -1) at_top"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>basis_wf basis; is_expansion F basis; trimmed F\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in at_top. sgn (eval F x) = sgn (fst (dominant_term F))
trimmed_neg F
basis_wf basis
(f expands_to F) basis

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. sgn (eval F x) = - 1
[PROOF STEP]
by (simp add: expands_to.simps trimmed_neg_def)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. sgn (eval F x) = - 1

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. - f x = \<bar>f x\<bar>
[PROOF STEP]
with assms(3)
[PROOF STATE]
proof (chain)
picking this:
(f expands_to F) basis
\<forall>\<^sub>F x in at_top. sgn (eval F x) = - 1
[PROOF STEP]
show "eventually (\<lambda>x. -f x = abs (f x)) at_top"
[PROOF STATE]
proof (prove)
using this:
(f expands_to F) basis
\<forall>\<^sub>F x in at_top. sgn (eval F x) = - 1

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. - f x = \<bar>f x\<bar>
[PROOF STEP]
by (auto simp: expands_to.simps sgn_if split: if_splits elim: eventually_elim2)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. - f x = \<bar>f x\<bar>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma quicksort_post_set:
  assumes \<open>quicksort_post R h lo hi xs xs'\<close>
    and bounds: \<open>lo \<le> hi\<close> \<open>hi < length xs\<close>
  shows \<open>set (sublist xs' lo hi) = set (sublist xs lo hi)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (WB_Sort.sublist xs' lo hi) = set (WB_Sort.sublist xs lo hi)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. set (WB_Sort.sublist xs' lo hi) = set (WB_Sort.sublist xs lo hi)
[PROOF STEP]
have \<open>mset xs' = mset xs\<close> \<open>\<And> i. i<lo \<Longrightarrow> xs'!i = xs!i\<close> \<open>\<And> j. \<lbrakk>hi<j; j<length xs\<rbrakk> \<Longrightarrow> xs'!j = xs!j\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset xs' = mset xs &&& (\<And>i. i < lo \<Longrightarrow> xs' ! i = xs ! i) &&& (\<And>j. \<lbrakk>hi < j; j < length xs\<rbrakk> \<Longrightarrow> xs' ! j = xs ! j)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
quicksort_post R h lo hi xs xs'
lo \<le> hi
hi < length xs

goal (1 subgoal):
 1. mset xs' = mset xs &&& (\<And>i. i < lo \<Longrightarrow> xs' ! i = xs ! i) &&& (\<And>j. \<lbrakk>hi < j; j < length xs\<rbrakk> \<Longrightarrow> xs' ! j = xs ! j)
[PROOF STEP]
by (auto simp add: quicksort_post_def)
[PROOF STATE]
proof (state)
this:
mset xs' = mset xs
?i < lo \<Longrightarrow> xs' ! ?i = xs ! ?i
\<lbrakk>hi < ?j; ?j < length xs\<rbrakk> \<Longrightarrow> xs' ! ?j = xs ! ?j

goal (1 subgoal):
 1. set (WB_Sort.sublist xs' lo hi) = set (WB_Sort.sublist xs lo hi)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
mset xs' = mset xs
?i < lo \<Longrightarrow> xs' ! ?i = xs ! ?i
\<lbrakk>hi < ?j; ?j < length xs\<rbrakk> \<Longrightarrow> xs' ! ?j = xs ! ?j
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
mset xs' = mset xs
?i < lo \<Longrightarrow> xs' ! ?i = xs ! ?i
\<lbrakk>hi < ?j; ?j < length xs\<rbrakk> \<Longrightarrow> xs' ! ?j = xs ! ?j

goal (1 subgoal):
 1. set (WB_Sort.sublist xs' lo hi) = set (WB_Sort.sublist xs lo hi)
[PROOF STEP]
using bounds
[PROOF STATE]
proof (prove)
using this:
mset xs' = mset xs
?i < lo \<Longrightarrow> xs' ! ?i = xs ! ?i
\<lbrakk>hi < ?j; ?j < length xs\<rbrakk> \<Longrightarrow> xs' ! ?j = xs ! ?j
lo \<le> hi
hi < length xs

goal (1 subgoal):
 1. set (WB_Sort.sublist xs' lo hi) = set (WB_Sort.sublist xs lo hi)
[PROOF STEP]
by (rule mset_sublist_eq, auto)
[PROOF STATE]
proof (state)
this:
set (WB_Sort.sublist xs' lo hi) = set (WB_Sort.sublist xs lo hi)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma left_null_space_orthogonal_complement_col_space_complex:
  fixes A::"complex^'cols::{finite, wellorder}^'rows::{finite, wellorder}"
  shows "left_null_space A = complex_matrix.orthogonal_complement (col_space (\<chi> i j. cnj (A $ i $ j)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. left_null_space A = complex_matrix.orthogonal_complement (col_space (\<chi>i j. cnj_class.cnj (A $ i $ j)))
[PROOF STEP]
using complex_matrix.left_null_space_orthogonal_complement_col_space
[PROOF STATE]
proof (prove)
using this:
left_null_space ?A = complex_matrix.orthogonal_complement (col_space (\<chi>i j. cnj_class.cnj (?A $ i $ j)))

goal (1 subgoal):
 1. left_null_space A = complex_matrix.orthogonal_complement (col_space (\<chi>i j. cnj_class.cnj (A $ i $ j)))
[PROOF STEP]
.


[STATEMENT]
lemma mk_poly2_pre:
  fixes A :: "'a :: comm_semiring_1 mat"
  assumes i: "i < dim_row A"
  shows "mk_poly2 A $ i = (\<Sum>j'<dim_col A. monom (A $$ (i, dim_col A - Suc j')) j')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mk_poly2 A $ i = (\<Sum>j'<dim_col A. monom (A $$ (i, dim_col A - Suc j')) j')
[PROOF STEP]
unfolding mk_poly2_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mk_poly2_col A (0\<^sub>v (dim_row A)) (dim_col A) $ i = (\<Sum>j'<dim_col A. monom (A $$ (i, dim_col A - Suc j')) j')
[PROOF STEP]
apply(subst mk_poly2_col)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. i < dim_row A
 2. dim_row A = dim_vec (0\<^sub>v (dim_row A))
 3. 0\<^sub>v (dim_row A) $ i + (\<Sum>j'<dim_col A. monom (A $$ (i, dim_col A - Suc j')) j') = (\<Sum>j'<dim_col A. monom (A $$ (i, dim_col A - Suc j')) j')
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
i < dim_row A

goal (3 subgoals):
 1. i < dim_row A
 2. dim_row A = dim_vec (0\<^sub>v (dim_row A))
 3. 0\<^sub>v (dim_row A) $ i + (\<Sum>j'<dim_col A. monom (A $$ (i, dim_col A - Suc j')) j') = (\<Sum>j'<dim_col A. monom (A $$ (i, dim_col A - Suc j')) j')
[PROOF STEP]
by auto


[STATEMENT]
lemma deformation_retraction_imp_homotopy_equivalent_space:
  "\<lbrakk>homotopic_with (\<lambda>x. True) X X (s \<circ> r) id; retraction_maps X Y r s\<rbrakk>
    \<Longrightarrow> X homotopy_equivalent_space Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>homotopic_with (\<lambda>x. True) X X (s \<circ> r) id; retraction_maps X Y r s\<rbrakk> \<Longrightarrow> X homotopy_equivalent_space Y
[PROOF STEP]
unfolding homotopy_equivalent_space_def retraction_maps_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>homotopic_with (\<lambda>x. True) X X (s \<circ> r) id; continuous_map X Y r \<and> continuous_map Y X s \<and> (\<forall>x\<in>topspace Y. r (s x) = x)\<rbrakk> \<Longrightarrow> \<exists>f g. continuous_map X Y f \<and> continuous_map Y X g \<and> homotopic_with (\<lambda>x. True) X X (g \<circ> f) id \<and> homotopic_with (\<lambda>x. True) Y Y (f \<circ> g) id
[PROOF STEP]
using homotopic_with_id2
[PROOF STATE]
proof (prove)
using this:
(\<And>x. x \<in> topspace ?X \<Longrightarrow> ?g (?f x) = x) \<Longrightarrow> homotopic_with (\<lambda>x. True) ?X ?X (?g \<circ> ?f) id

goal (1 subgoal):
 1. \<lbrakk>homotopic_with (\<lambda>x. True) X X (s \<circ> r) id; continuous_map X Y r \<and> continuous_map Y X s \<and> (\<forall>x\<in>topspace Y. r (s x) = x)\<rbrakk> \<Longrightarrow> \<exists>f g. continuous_map X Y f \<and> continuous_map Y X g \<and> homotopic_with (\<lambda>x. True) X X (g \<circ> f) id \<and> homotopic_with (\<lambda>x. True) Y Y (f \<circ> g) id
[PROOF STEP]
by fastforce


[STATEMENT]
lemma augment:
  assumes "indep X" "indep Y" "card Y < card X"
  shows "\<exists>x \<in> X - Y. indep (insert x Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<in>X - Y. indep (insert x Y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>x\<in>X - Y. indep (insert x Y)
[PROOF STEP]
obtain X' where "X' \<subseteq> X" "card X' = Suc (card Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X'. \<lbrakk>X' \<subseteq> X; card X' = Suc (card Y)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms card_subset_ex[of X "Suc (card Y)"] indep_finite
[PROOF STATE]
proof (prove)
using this:
indep X
indep Y
card Y < card X
\<lbrakk>finite X; Suc (card Y) \<le> card X\<rbrakk> \<Longrightarrow> \<exists>B\<subseteq>X. card B = Suc (card Y)
indep ?A \<Longrightarrow> finite ?A

goal (1 subgoal):
 1. (\<And>X'. \<lbrakk>X' \<subseteq> X; card X' = Suc (card Y)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
X' \<subseteq> X
card X' = Suc (card Y)

goal (1 subgoal):
 1. \<exists>x\<in>X - Y. indep (insert x Y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
X' \<subseteq> X
card X' = Suc (card Y)
[PROOF STEP]
obtain x where "x \<in> X' - Y"  "indep (insert x Y)"
[PROOF STATE]
proof (prove)
using this:
X' \<subseteq> X
card X' = Suc (card Y)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> X' - Y; indep (insert x Y)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms augment_aux[of X' Y] indep_subset
[PROOF STATE]
proof (prove)
using this:
X' \<subseteq> X
card X' = Suc (card Y)
indep X
indep Y
card Y < card X
\<lbrakk>indep X'; indep Y; card X' = Suc (card Y)\<rbrakk> \<Longrightarrow> \<exists>x\<in>X' - Y. indep (insert x Y)
\<lbrakk>indep ?X; ?Y \<subseteq> ?X\<rbrakk> \<Longrightarrow> indep ?Y

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> X' - Y; indep (insert x Y)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> X' - Y
indep (insert x Y)

goal (1 subgoal):
 1. \<exists>x\<in>X - Y. indep (insert x Y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> X' - Y
indep (insert x Y)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<in> X' - Y
indep (insert x Y)

goal (1 subgoal):
 1. \<exists>x\<in>X - Y. indep (insert x Y)
[PROOF STEP]
using \<open>X' \<subseteq> X\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> X' - Y
indep (insert x Y)
X' \<subseteq> X

goal (1 subgoal):
 1. \<exists>x\<in>X - Y. indep (insert x Y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>x\<in>X - Y. indep (insert x Y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma open_exclude_finite:
  assumes "finite A"
  and "(x::'b::{t1_space})\<in> A"
shows open_set: "open (open_exclude_set x A)" and inter_x:"(open_exclude_set x A) \<inter> A = {x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open (open_exclude_set x A) &&& open_exclude_set x A \<inter> A = {x}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. open (open_exclude_set x A)
 2. open_exclude_set x A \<inter> A = {x}
[PROOF STEP]
have "\<exists>U. open U \<and> U\<inter> A = {x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>U. open U \<and> U \<inter> A = {x}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>U. open U \<and> U \<inter> A = {x}
[PROOF STEP]
have "\<exists>U. open U \<and> x\<in> U \<and> U\<inter> (A-{x}) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>U. open U \<and> x \<in> U \<and> U \<inter> (A - {x}) = {}
[PROOF STEP]
proof (rule open_except_set)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite (A - {x})
 2. x \<notin> A - {x}
[PROOF STEP]
show "finite (A -{x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (A - {x})
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A
x \<in> A

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

goal (1 subgoal):
 1. x \<notin> A - {x}
[PROOF STEP]
show "x\<notin> A -{x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> A - {x}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<notin> A - {x}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>U. open U \<and> x \<in> U \<and> U \<inter> (A - {x}) = {}

goal (1 subgoal):
 1. \<exists>U. open U \<and> U \<inter> A = {x}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>U. open U \<and> x \<in> U \<and> U \<inter> (A - {x}) = {}

goal (1 subgoal):
 1. \<exists>U. open U \<and> U \<inter> A = {x}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<exists>U. open U \<and> x \<in> U \<and> U \<inter> (A - {x}) = {}
finite A
x \<in> A

goal (1 subgoal):
 1. \<exists>U. open U \<and> U \<inter> A = {x}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>U. open U \<and> U \<inter> A = {x}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>U. open U \<and> U \<inter> A = {x}

goal (2 subgoals):
 1. open (open_exclude_set x A)
 2. open_exclude_set x A \<inter> A = {x}
[PROOF STEP]
thus "open (open_exclude_set x A)" and "(open_exclude_set x A) \<inter> A = {x}"
[PROOF STATE]
proof (prove)
using this:
\<exists>U. open U \<and> U \<inter> A = {x}

goal (1 subgoal):
 1. open (open_exclude_set x A) &&& open_exclude_set x A \<inter> A = {x}
[PROOF STEP]
by (auto simp add: open_exclude_setI)
[PROOF STATE]
proof (state)
this:
open (open_exclude_set x A)
open_exclude_set x A \<inter> A = {x}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma DERIV_pos_imp_increasing_open:
  fixes a b :: real
    and f :: "real \<Rightarrow> real"
  assumes "a < b"
    and "\<And>x. a < x \<Longrightarrow> x < b \<Longrightarrow> (\<exists>y. DERIV f x :> y \<and> y > 0)"
    and con: "continuous_on {a..b} f"
  shows "f a < f b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f a < f b
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> f a < f b \<Longrightarrow> False
[PROOF STEP]
assume f: "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
\<not> f a < f b

goal (1 subgoal):
 1. \<not> f a < f b \<Longrightarrow> False
[PROOF STEP]
have "\<exists>l z. a < z \<and> z < b \<and> DERIV f z :> l \<and> f b - f a = (b - a) * l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>l z. a < z \<and> z < b \<and> (f has_real_derivative l) (at z) \<and> f b - f a = (b - a) * l
[PROOF STEP]
by (rule MVT) (use assms real_differentiable_def in \<open>force+\<close>)
[PROOF STATE]
proof (state)
this:
\<exists>l z. a < z \<and> z < b \<and> (f has_real_derivative l) (at z) \<and> f b - f a = (b - a) * l

goal (1 subgoal):
 1. \<not> f a < f b \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>l z. a < z \<and> z < b \<and> (f has_real_derivative l) (at z) \<and> f b - f a = (b - a) * l
[PROOF STEP]
obtain l z where z: "a < z" "z < b" "DERIV f z :> l" and "f b - f a = (b - a) * l"
[PROOF STATE]
proof (prove)
using this:
\<exists>l z. a < z \<and> z < b \<and> (f has_real_derivative l) (at z) \<and> f b - f a = (b - a) * l

goal (1 subgoal):
 1. (\<And>z l. \<lbrakk>a < z; z < b; (f has_real_derivative l) (at z); f b - f a = (b - a) * l\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a < z
z < b
(f has_real_derivative l) (at z)
f b - f a = (b - a) * l

goal (1 subgoal):
 1. \<not> f a < f b \<Longrightarrow> False
[PROOF STEP]
with assms f
[PROOF STATE]
proof (chain)
picking this:
a < b
\<lbrakk>a < ?x; ?x < b\<rbrakk> \<Longrightarrow> \<exists>y. (f has_real_derivative y) (at ?x) \<and> 0 < y
continuous_on {a..b} f
\<not> f a < f b
a < z
z < b
(f has_real_derivative l) (at z)
f b - f a = (b - a) * l
[PROOF STEP]
have "\<not> l > 0"
[PROOF STATE]
proof (prove)
using this:
a < b
\<lbrakk>a < ?x; ?x < b\<rbrakk> \<Longrightarrow> \<exists>y. (f has_real_derivative y) (at ?x) \<and> 0 < y
continuous_on {a..b} f
\<not> f a < f b
a < z
z < b
(f has_real_derivative l) (at z)
f b - f a = (b - a) * l

goal (1 subgoal):
 1. \<not> 0 < l
[PROOF STEP]
by (metis linorder_not_le mult_le_0_iff diff_le_0_iff_le)
[PROOF STATE]
proof (state)
this:
\<not> 0 < l

goal (1 subgoal):
 1. \<not> f a < f b \<Longrightarrow> False
[PROOF STEP]
with assms z
[PROOF STATE]
proof (chain)
picking this:
a < b
\<lbrakk>a < ?x; ?x < b\<rbrakk> \<Longrightarrow> \<exists>y. (f has_real_derivative y) (at ?x) \<and> 0 < y
continuous_on {a..b} f
a < z
z < b
(f has_real_derivative l) (at z)
\<not> 0 < l
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
a < b
\<lbrakk>a < ?x; ?x < b\<rbrakk> \<Longrightarrow> \<exists>y. (f has_real_derivative y) (at ?x) \<and> 0 < y
continuous_on {a..b} f
a < z
z < b
(f has_real_derivative l) (at z)
\<not> 0 < l

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis DERIV_unique)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sigma_sets_Inter:
  assumes Asb: "A \<subseteq> Pow sp"
  shows "(\<And>i::nat. a i \<in> sigma_sets sp A) \<Longrightarrow> (\<Inter>i. a i) \<in> sigma_sets sp A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
assume ai: "\<And>i::nat. a i \<in> sigma_sets sp A"
[PROOF STATE]
proof (state)
this:
a ?i \<in> sigma_sets sp A

goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
hence "\<And>i::nat. sp-(a i) \<in> sigma_sets sp A"
[PROOF STATE]
proof (prove)
using this:
a ?i \<in> sigma_sets sp A

goal (1 subgoal):
 1. \<And>i. sp - a i \<in> sigma_sets sp A
[PROOF STEP]
by (rule sigma_sets.Compl)
[PROOF STATE]
proof (state)
this:
sp - a ?i \<in> sigma_sets sp A

goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
hence "(\<Union>i. sp-(a i)) \<in> sigma_sets sp A"
[PROOF STATE]
proof (prove)
using this:
sp - a ?i \<in> sigma_sets sp A

goal (1 subgoal):
 1. (\<Union>i. sp - a i) \<in> sigma_sets sp A
[PROOF STEP]
by (rule sigma_sets.Union)
[PROOF STATE]
proof (state)
this:
(\<Union>i. sp - a i) \<in> sigma_sets sp A

goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
hence "sp-(\<Union>i. sp-(a i)) \<in> sigma_sets sp A"
[PROOF STATE]
proof (prove)
using this:
(\<Union>i. sp - a i) \<in> sigma_sets sp A

goal (1 subgoal):
 1. sp - (\<Union>i. sp - a i) \<in> sigma_sets sp A
[PROOF STEP]
by (rule sigma_sets.Compl)
[PROOF STATE]
proof (state)
this:
sp - (\<Union>i. sp - a i) \<in> sigma_sets sp A

goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sp - (\<Union>i. sp - a i) \<in> sigma_sets sp A

goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
have "sp-(\<Union>i. sp-(a i)) = sp Int (\<Inter>i. a i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sp - (\<Union>i. sp - a i) = sp \<inter> \<Inter> (range a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sp - (\<Union>i. sp - a i) = sp \<inter> \<Inter> (range a)

goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sp - (\<Union>i. sp - a i) = sp \<inter> \<Inter> (range a)

goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
have "... = (\<Inter>i. a i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sp \<inter> \<Inter> (range a) = \<Inter> (range a)
[PROOF STEP]
using ai
[PROOF STATE]
proof (prove)
using this:
a ?i \<in> sigma_sets sp A

goal (1 subgoal):
 1. sp \<inter> \<Inter> (range a) = \<Inter> (range a)
[PROOF STEP]
by (blast dest: sigma_sets_into_sp [OF Asb])
[PROOF STATE]
proof (state)
this:
sp \<inter> \<Inter> (range a) = \<Inter> (range a)

goal (1 subgoal):
 1. (\<And>i. a i \<in> sigma_sets sp A) \<Longrightarrow> \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Inter> (range a) \<in> sigma_sets sp A

goal (1 subgoal):
 1. \<Inter> (range a) \<in> sigma_sets sp A
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<Inter> (range a) \<in> sigma_sets sp A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closure_constraint_mono':
  assumes "Closure\<^sub>\<alpha> g = g \<inter> V"
  shows "g \<inter> (Closure\<^sub>\<alpha> Z) \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<inter> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g \<inter> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z)
[PROOF STEP]
from assms closure_V_int
[PROOF STATE]
proof (chain)
picking this:
Closure\<^sub>\<alpha> g = g \<inter> V
Closure\<^sub>\<alpha> ?Z = Closure\<^sub>\<alpha> (?Z \<inter> V)
[PROOF STEP]
have "Closure\<^sub>\<alpha> (g \<inter> V) = g \<inter> V"
[PROOF STATE]
proof (prove)
using this:
Closure\<^sub>\<alpha> g = g \<inter> V
Closure\<^sub>\<alpha> ?Z = Closure\<^sub>\<alpha> (?Z \<inter> V)

goal (1 subgoal):
 1. Closure\<^sub>\<alpha> (g \<inter> V) = g \<inter> V
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Closure\<^sub>\<alpha> (g \<inter> V) = g \<inter> V

goal (1 subgoal):
 1. g \<inter> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z)
[PROOF STEP]
from closure_constraint_mono[OF this, of Z]
[PROOF STATE]
proof (chain)
picking this:
g \<inter> V \<inter> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> (g \<inter> V \<inter> Z)
[PROOF STEP]
have
    "g \<inter> (V \<inter> Closure\<^sub>\<alpha> Z) \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z \<inter> V)"
[PROOF STATE]
proof (prove)
using this:
g \<inter> V \<inter> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> (g \<inter> V \<inter> Z)

goal (1 subgoal):
 1. g \<inter> (V \<inter> Closure\<^sub>\<alpha> Z) \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z \<inter> V)
[PROOF STEP]
by (metis Int_assoc Int_commute)
[PROOF STATE]
proof (state)
this:
g \<inter> (V \<inter> Closure\<^sub>\<alpha> Z) \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z \<inter> V)

goal (1 subgoal):
 1. g \<inter> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z)
[PROOF STEP]
with closure_V[of Z] closure_V_int[of "g \<inter> Z"]
[PROOF STATE]
proof (chain)
picking this:
Closure\<^sub>\<alpha> Z \<subseteq> V
Closure\<^sub>\<alpha> (g \<inter> Z) = Closure\<^sub>\<alpha> (g \<inter> Z \<inter> V)
g \<inter> (V \<inter> Closure\<^sub>\<alpha> Z) \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z \<inter> V)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Closure\<^sub>\<alpha> Z \<subseteq> V
Closure\<^sub>\<alpha> (g \<inter> Z) = Closure\<^sub>\<alpha> (g \<inter> Z \<inter> V)
g \<inter> (V \<inter> Closure\<^sub>\<alpha> Z) \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z \<inter> V)

goal (1 subgoal):
 1. g \<inter> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
g \<inter> Closure\<^sub>\<alpha> Z \<subseteq> Closure\<^sub>\<alpha> (g \<inter> Z)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma isCont_powa_exponent_gt_one:
  assumes "a > 1"
  shows "isCont (\<lambda>x. a powa x) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont ((powa) a) x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. isCont ((powa) a) x
[PROOF STEP]
have "(\<lambda>h. a powa x * a powa h) \<midarrow>0\<rightarrow> a powa x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>h. a powa x * a powa h) \<midarrow>0\<rightarrow> a powa x
[PROOF STEP]
using LIM_powa_exponent_at_zero assms tendsto_mult_left
[PROOF STATE]
proof (prove)
using this:
1 < ?a \<Longrightarrow> (powa) ?a \<midarrow>0\<rightarrow> 1
1 < a
(?f \<longlongrightarrow> ?l) ?F \<Longrightarrow> ((\<lambda>x. ?c * ?f x) \<longlongrightarrow> ?c * ?l) ?F

goal (1 subgoal):
 1. (\<lambda>h. a powa x * a powa h) \<midarrow>0\<rightarrow> a powa x
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(\<lambda>h. a powa x * a powa h) \<midarrow>0\<rightarrow> a powa x

goal (1 subgoal):
 1. isCont ((powa) a) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>h. a powa x * a powa h) \<midarrow>0\<rightarrow> a powa x
[PROOF STEP]
have "(\<lambda>h. a powa (x + h)) \<midarrow>0\<rightarrow> a powa x"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>h. a powa x * a powa h) \<midarrow>0\<rightarrow> a powa x

goal (1 subgoal):
 1. (\<lambda>h. a powa (x + h)) \<midarrow>0\<rightarrow> a powa x
[PROOF STEP]
using assms powa_add
[PROOF STATE]
proof (prove)
using this:
(\<lambda>h. a powa x * a powa h) \<midarrow>0\<rightarrow> a powa x
1 < a
1 \<le> ?a \<Longrightarrow> ?a powa (?x + ?y) = ?a powa ?x * ?a powa ?y

goal (1 subgoal):
 1. (\<lambda>h. a powa (x + h)) \<midarrow>0\<rightarrow> a powa x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>h. a powa (x + h)) \<midarrow>0\<rightarrow> a powa x

goal (1 subgoal):
 1. isCont ((powa) a) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>h. a powa (x + h)) \<midarrow>0\<rightarrow> a powa x
[PROOF STEP]
have "(powa) a \<midarrow>x\<rightarrow> a powa x"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>h. a powa (x + h)) \<midarrow>0\<rightarrow> a powa x

goal (1 subgoal):
 1. (powa) a \<midarrow>x\<rightarrow> a powa x
[PROOF STEP]
using LIM_offset_zero_cancel
[PROOF STATE]
proof (prove)
using this:
(\<lambda>h. a powa (x + h)) \<midarrow>0\<rightarrow> a powa x
(\<lambda>h. ?f (?a + h)) \<midarrow>0::?'a\<rightarrow> ?L \<Longrightarrow> ?f \<midarrow>?a\<rightarrow> ?L

goal (1 subgoal):
 1. (powa) a \<midarrow>x\<rightarrow> a powa x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(powa) a \<midarrow>x\<rightarrow> a powa x

goal (1 subgoal):
 1. isCont ((powa) a) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(powa) a \<midarrow>x\<rightarrow> a powa x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(powa) a \<midarrow>x\<rightarrow> a powa x

goal (1 subgoal):
 1. isCont ((powa) a) x
[PROOF STEP]
using isCont_def
[PROOF STATE]
proof (prove)
using this:
(powa) a \<midarrow>x\<rightarrow> a powa x
isCont ?f ?a = ?f \<midarrow>?a\<rightarrow> ?f ?a

goal (1 subgoal):
 1. isCont ((powa) a) x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
isCont ((powa) a) x

goal:
No subgoals!
[PROOF STEP]
qed