[STATEMENT]
lemma triangle_strict_inequality_2:
  assumes "Bet A' B' C'" and
    "Cong A B A' B'" and
    "Cong B C B' C'"  and
    "\<not> Bet A B C"
  shows "A C Lt A' C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A C Lt A' C'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A C Lt A' C'
[PROOF STEP]
obtain D where P1: "Bet A B D \<and> Cong B D B C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>D. Bet A B D \<and> Cong B D B C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using segment_construction
[PROOF STATE]
proof (prove)
using this:
\<forall>a b c q. \<exists>x. Bet q a x \<and> Cong a x b c

goal (1 subgoal):
 1. (\<And>D. Bet A B D \<and> Cong B D B C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Bet A B D \<and> Cong B D B C

goal (1 subgoal):
 1. A C Lt A' C'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Bet A B D \<and> Cong B D B C
[PROOF STEP]
have P2: "A C Lt A D"
[PROOF STATE]
proof (prove)
using this:
Bet A B D \<and> Cong B D B C

goal (1 subgoal):
 1. A C Lt A D
[PROOF STEP]
using P1 assms(4) cong_symmetry triangle_strict_inequality
[PROOF STATE]
proof (prove)
using this:
Bet A B D \<and> Cong B D B C
Bet A B D \<and> Cong B D B C
\<not> Bet A B C
Cong ?A ?B ?C ?D \<Longrightarrow> Cong ?C ?D ?A ?B
\<lbrakk>Bet ?A ?B ?D; Cong ?B ?C ?B ?D; \<not> Bet ?A ?B ?C\<rbrakk> \<Longrightarrow> ?A ?C Lt ?A ?D

goal (1 subgoal):
 1. A C Lt A D
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A C Lt A D

goal (1 subgoal):
 1. A C Lt A' C'
[PROOF STEP]
have "Cong A D A' C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cong A D A' C'
[PROOF STEP]
using P1 assms(1) assms(2) assms(3) cong_transitivity l2_11_b
[PROOF STATE]
proof (prove)
using this:
Bet A B D \<and> Cong B D B C
Bet A' B' C'
Cong A B A' B'
Cong B C B' C'
\<lbrakk>Cong ?A ?B ?C ?D; Cong ?C ?D ?E ?F\<rbrakk> \<Longrightarrow> Cong ?A ?B ?E ?F
\<lbrakk>Bet ?A ?B ?C; Bet ?A' ?B' ?C'; Cong ?A ?B ?A' ?B'; Cong ?B ?C ?B' ?C'\<rbrakk> \<Longrightarrow> Cong ?A ?C ?A' ?C'

goal (1 subgoal):
 1. Cong A D A' C'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Cong A D A' C'

goal (1 subgoal):
 1. A C Lt A' C'
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Cong A D A' C'

goal (1 subgoal):
 1. A C Lt A' C'
[PROOF STEP]
using P2 cong2_lt__lt cong_reflexivity
[PROOF STATE]
proof (prove)
using this:
Cong A D A' C'
A C Lt A D
\<lbrakk>?A ?B Lt ?C ?D; Cong ?A ?B ?A' ?B'; Cong ?C ?D ?C' ?D'\<rbrakk> \<Longrightarrow> ?A' ?B' Lt ?C' ?D'
Cong ?A ?B ?A ?B

goal (1 subgoal):
 1. A C Lt A' C'
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A C Lt A' C'

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma coplanar_perm_3:
  assumes "Coplanar A B C D"
  shows "Coplanar A C D B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A C D B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Coplanar A C D B
[PROOF STEP]
obtain X where P1: "(Col A B X \<and> Col C D X) \<or> (Col A C X \<and> Col B D X) \<or> (Col A D X \<and> Col B C X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Coplanar_def assms
[PROOF STATE]
proof (prove)
using this:
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Coplanar A B C D

goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar A C D B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar A C D B
[PROOF STEP]
using Coplanar_def col_permutation_4
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Col ?A ?B ?C \<Longrightarrow> Col ?B ?A ?C

goal (1 subgoal):
 1. Coplanar A C D B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar A C D B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma contour_integral_has_field_derivative:
  assumes A: "open A" "convex A" "a \<in> A" "z \<in> A"
  assumes integrable: "\<And>z. z \<in> A \<Longrightarrow> f contour_integrable_on linepath a z"
  assumes holo: "f holomorphic_on A"
  shows   "((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
have "(f has_field_derivative deriv f z) (at z)" if "z \<in> A" for z
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_field_derivative deriv f z) (at z)
[PROOF STEP]
using that assms
[PROOF STATE]
proof (prove)
using this:
z \<in> A
open A
convex A
a \<in> A
z \<in> A
?z \<in> A \<Longrightarrow> f contour_integrable_on linepath a ?z
f holomorphic_on A

goal (1 subgoal):
 1. (f has_field_derivative deriv f z) (at z)
[PROOF STEP]
by (auto intro!: holomorphic_derivI)
[PROOF STATE]
proof (state)
this:
?z \<in> A \<Longrightarrow> (f has_field_derivative deriv f ?z) (at ?z)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
note [derivative_intros] = DERIV_chain2[OF this]
[PROOF STATE]
proof (state)
this:
\<lbrakk>?g ?x \<in> A; (?g has_field_derivative ?Db) (at ?x within ?s)\<rbrakk> \<Longrightarrow> ((\<lambda>x. f (?g x)) has_field_derivative deriv f (?g ?x) * ?Db) (at ?x within ?s)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
note [continuous_intros] =
    continuous_on_compose2[OF holomorphic_on_imp_continuous_on [OF holo]]
    continuous_on_compose2[OF holomorphic_on_imp_continuous_on [OF holomorphic_deriv[OF holo]]]
[PROOF STATE]
proof (state)
this:
\<lbrakk>continuous_on ?s ?f; ?f ` ?s \<subseteq> A\<rbrakk> \<Longrightarrow> continuous_on ?s (\<lambda>x. f (?f x))
\<lbrakk>open A; continuous_on ?s ?f; ?f ` ?s \<subseteq> A\<rbrakk> \<Longrightarrow> continuous_on ?s (\<lambda>x. deriv f (?f x))

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
have [derivative_intros]:
      "((\<lambda>x. linepath a x t) has_field_derivative of_real t) (at x within A)" for t x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. linepath a x t) has_field_derivative complex_of_real t) (at x within A)
[PROOF STEP]
by (auto simp: linepath_def scaleR_conv_of_real intro!: derivative_eq_intros)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. linepath a x ?t) has_field_derivative complex_of_real ?t) (at ?x within A)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
have *: "linepath a b t \<in> A" if "a \<in> A" "b \<in> A" "t \<in> {0..1}" for a b t
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linepath a b t \<in> A
[PROOF STEP]
using that linepath_in_convex_hull[of a A b t] \<open>convex A\<close>
[PROOF STATE]
proof (prove)
using this:
a \<in> A
b \<in> A
t \<in> {0..1}
\<lbrakk>a \<in> convex hull A; b \<in> convex hull A; 0 \<le> t; t \<le> 1\<rbrakk> \<Longrightarrow> linepath a b t \<in> convex hull A
convex A

goal (1 subgoal):
 1. linepath a b t \<in> A
[PROOF STEP]
by (simp add: hull_same)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a \<in> A; ?b \<in> A; ?t \<in> {0..1}\<rbrakk> \<Longrightarrow> linepath ?a ?b ?t \<in> A

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
have "((\<lambda>z. integral {0..1} (\<lambda>x. f (linepath a z x)) * (z - a)) has_field_derivative
      integral {0..1} (\<lambda>t. deriv f (linepath a z t) * of_real t) * (z - a) +
      integral {0..1} (\<lambda>x. f (linepath a z x))) (at z within A)"
      (is "(_ has_field_derivative ?I) _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>z. integral {0..1} (\<lambda>x. f (linepath a z x)) * (z - a)) has_field_derivative integral {0..1} (\<lambda>t. deriv f (linepath a z t) * complex_of_real t) * (z - a) + integral {0..1} (\<lambda>x. f (linepath a z x))) (at z within A)
[PROOF STEP]
by (rule derivative_eq_intros leibniz_rule_field_derivative_real)+
       (insert assms,
        auto intro!: derivative_eq_intros leibniz_rule_field_derivative_real
                     integrable_continuous_real continuous_intros
             simp:   split_beta scaleR_conv_of_real *)
[PROOF STATE]
proof (state)
this:
((\<lambda>z. integral {0..1} (\<lambda>x. f (linepath a z x)) * (z - a)) has_field_derivative integral {0..1} (\<lambda>t. deriv f (linepath a z t) * complex_of_real t) * (z - a) + integral {0..1} (\<lambda>x. f (linepath a z x))) (at z within A)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((\<lambda>z. integral {0..1} (\<lambda>x. f (linepath a z x)) * (z - a)) has_field_derivative integral {0..1} (\<lambda>t. deriv f (linepath a z t) * complex_of_real t) * (z - a) + integral {0..1} (\<lambda>x. f (linepath a z x))) (at z within A)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
have "(\<lambda>z. integral {0..1} (\<lambda>x. f (linepath a z x)) * (z - a)) =
               (\<lambda>z. contour_integral (linepath a z) f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. integral {0..1} (\<lambda>x. f (linepath a z x)) * (z - a)) = (\<lambda>z. contour_integral (linepath a z) f)
[PROOF STEP]
by (simp add: contour_integral_integral)
[PROOF STATE]
proof (state)
this:
(\<lambda>z. integral {0..1} (\<lambda>x. f (linepath a z x)) * (z - a)) = (\<lambda>z. contour_integral (linepath a z) f)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>z. integral {0..1} (\<lambda>x. f (linepath a z x)) * (z - a)) = (\<lambda>z. contour_integral (linepath a z) f)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
have "?I = integral {0..1} (\<lambda>x. deriv f (linepath a z x) * of_real x * (z - a) +
                     f (linepath a z x))" (is "_ = integral _ ?g")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral {0..1} (\<lambda>t. deriv f (linepath a z t) * complex_of_real t) * (z - a) + integral {0..1} (\<lambda>x. f (linepath a z x)) = integral {0..1} (\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x))
[PROOF STEP]
by (subst integral_mult_left [symmetric], subst integral_add [symmetric])
       (insert assms, auto intro!: integrable_continuous_real continuous_intros simp: *)
[PROOF STATE]
proof (state)
this:
integral {0..1} (\<lambda>t. deriv f (linepath a z t) * complex_of_real t) * (z - a) + integral {0..1} (\<lambda>x. f (linepath a z x)) = integral {0..1} (\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x))

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integral {0..1} (\<lambda>t. deriv f (linepath a z t) * complex_of_real t) * (z - a) + integral {0..1} (\<lambda>x. f (linepath a z x)) = integral {0..1} (\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x))

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
have "(?g has_integral of_real 1 * f (linepath a z 1) - of_real 0 * f (linepath a z 0)) {0..1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x)) has_integral complex_of_real 1 * f (linepath a z 1) - complex_of_real 0 * f (linepath a z 0)) {0..1}
[PROOF STEP]
using * A
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> A; ?b \<in> A; ?t \<in> {0..1}\<rbrakk> \<Longrightarrow> linepath ?a ?b ?t \<in> A
open A
convex A
a \<in> A
z \<in> A

goal (1 subgoal):
 1. ((\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x)) has_integral complex_of_real 1 * f (linepath a z 1) - complex_of_real 0 * f (linepath a z 0)) {0..1}
[PROOF STEP]
by (intro fundamental_theorem_of_calculus)
       (auto intro!: derivative_eq_intros has_vector_derivative_real_field
             simp: linepath_def scaleR_conv_of_real)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x)) has_integral complex_of_real 1 * f (linepath a z 1) - complex_of_real 0 * f (linepath a z 0)) {0..1}

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
hence "integral {0..1} ?g = f (linepath a z 1)"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x)) has_integral complex_of_real 1 * f (linepath a z 1) - complex_of_real 0 * f (linepath a z 0)) {0..1}

goal (1 subgoal):
 1. integral {0..1} (\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x)) = f (linepath a z 1)
[PROOF STEP]
by (simp add: has_integral_iff)
[PROOF STATE]
proof (state)
this:
integral {0..1} (\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x)) = f (linepath a z 1)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integral {0..1} (\<lambda>x. deriv f (linepath a z x) * complex_of_real x * (z - a) + f (linepath a z x)) = f (linepath a z 1)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
have "linepath a z 1 = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linepath a z 1 = z
[PROOF STEP]
by (simp add: linepath_def)
[PROOF STATE]
proof (state)
this:
linepath a z 1 = z

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
linepath a z 1 = z

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
from \<open>z \<in> A\<close> and \<open>open A\<close>
[PROOF STATE]
proof (chain)
picking this:
z \<in> A
open A
[PROOF STEP]
have "at z within A = at z"
[PROOF STATE]
proof (prove)
using this:
z \<in> A
open A

goal (1 subgoal):
 1. at z within A = at z
[PROOF STEP]
by (rule at_within_open)
[PROOF STATE]
proof (state)
this:
at z within A = at z

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z)

goal (1 subgoal):
 1. ((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)
[PROOF STEP]
by (rule DERIV_subset) simp_all
[PROOF STATE]
proof (state)
this:
((\<lambda>z. contour_integral (linepath a z) f) has_field_derivative f z) (at z within B)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sorted_list_of_set_map_mono: assumes mono: \<open>\<forall> n m. n < m \<longrightarrow> f n < f m\<close> and fin: \<open>finite A\<close>
shows \<open>map f (sorted_list_of_set A) = sorted_list_of_set (f`A)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map f (sorted_list_of_set A) = sorted_list_of_set (f ` A)
[PROOF STEP]
using fin
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. map f (sorted_list_of_set A) = sorted_list_of_set (f ` A)
[PROOF STEP]
proof (induction)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. map f (sorted_list_of_set {}) = sorted_list_of_set (f ` {})
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. map f (sorted_list_of_set {}) = sorted_list_of_set (f ` {})
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
thus \<open>?case\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map f (sorted_list_of_set {}) = sorted_list_of_set (f ` {})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
map f (sorted_list_of_set {}) = sorted_list_of_set (f ` {})

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
case (insert x A)
[PROOF STATE]
proof (state)
this:
finite A
x \<notin> A
map f (sorted_list_of_set A) = sorted_list_of_set (f ` A)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
have [simp]:\<open>sorted_list_of_set (insert x A) = insort x (sorted_list_of_set A)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted_list_of_set (insert x A) = insort x (sorted_list_of_set A)
[PROOF STEP]
using insert sorted_list_of_set_insert
[PROOF STATE]
proof (prove)
using this:
finite A
x \<notin> A
map f (sorted_list_of_set A) = sorted_list_of_set (f ` A)
\<lbrakk>finite ?A; ?x \<notin> ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (insert ?x ?A) = insort ?x (sorted_list_of_set ?A)

goal (1 subgoal):
 1. sorted_list_of_set (insert x A) = insort x (sorted_list_of_set A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (insert x A) = insort x (sorted_list_of_set A)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
have \<open>f ` insert x A = insert (f x) (f ` A)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` insert x A = insert (f x) (f ` A)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` insert x A = insert (f x) (f ` A)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
f ` insert x A = insert (f x) (f ` A)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
have \<open>f x \<notin> f`A\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<notin> f ` A
[PROOF STEP]
apply (rule ccontr)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> f x \<notin> f ` A \<Longrightarrow> False
[PROOF STEP]
using insert(2) mono
[PROOF STATE]
proof (prove)
using this:
x \<notin> A
\<forall>n m. n < m \<longrightarrow> f n < f m

goal (1 subgoal):
 1. \<not> f x \<notin> f ` A \<Longrightarrow> False
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa. \<lbrakk>x \<notin> A; \<forall>n m. n < m \<longrightarrow> f n < f m; f x = f xa; xa \<in> A\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
by (metis insert.hyps(2) mono neq_iff)
[PROOF STATE]
proof (state)
this:
f x \<notin> f ` A

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
f ` insert x A = insert (f x) (f ` A)
f x \<notin> f ` A
[PROOF STEP]
have \<open>sorted_list_of_set (f ` insert x A) = insort (f x) (sorted_list_of_set (f`A))\<close>
[PROOF STATE]
proof (prove)
using this:
f ` insert x A = insert (f x) (f ` A)
f x \<notin> f ` A

goal (1 subgoal):
 1. sorted_list_of_set (f ` insert x A) = insort (f x) (sorted_list_of_set (f ` A))
[PROOF STEP]
using insert(1) sorted_list_of_set_insert
[PROOF STATE]
proof (prove)
using this:
f ` insert x A = insert (f x) (f ` A)
f x \<notin> f ` A
finite A
\<lbrakk>finite ?A; ?x \<notin> ?A\<rbrakk> \<Longrightarrow> sorted_list_of_set (insert ?x ?A) = insort ?x (sorted_list_of_set ?A)

goal (1 subgoal):
 1. sorted_list_of_set (f ` insert x A) = insort (f x) (sorted_list_of_set (f ` A))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (f ` insert x A) = insort (f x) (sorted_list_of_set (f ` A))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sorted_list_of_set (f ` insert x A) = insort (f x) (sorted_list_of_set (f ` A))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
have \<open>\<dots> = insort (f x) (map f (sorted_list_of_set A))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insort (f x) (sorted_list_of_set (f ` A)) = insort (f x) (map f (sorted_list_of_set A))
[PROOF STEP]
using insert.IH
[PROOF STATE]
proof (prove)
using this:
map f (sorted_list_of_set A) = sorted_list_of_set (f ` A)

goal (1 subgoal):
 1. insort (f x) (sorted_list_of_set (f ` A)) = insort (f x) (map f (sorted_list_of_set A))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
insort (f x) (sorted_list_of_set (f ` A)) = insort (f x) (map f (sorted_list_of_set A))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
insort (f x) (sorted_list_of_set (f ` A)) = insort (f x) (map f (sorted_list_of_set A))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
have \<open>\<dots> = map f (insort x (sorted_list_of_set A))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insort (f x) (map f (sorted_list_of_set A)) = map f (insort x (sorted_list_of_set A))
[PROOF STEP]
using insort_map_mono[OF mono]
[PROOF STATE]
proof (prove)
using this:
map f (insort ?n ?ns) = insort (f ?n) (map f ?ns)

goal (1 subgoal):
 1. insort (f x) (map f (sorted_list_of_set A)) = map f (insort x (sorted_list_of_set A))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
insort (f x) (map f (sorted_list_of_set A)) = map f (insort x (sorted_list_of_set A))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; map f (sorted_list_of_set F) = sorted_list_of_set (f ` F)\<rbrakk> \<Longrightarrow> map f (sorted_list_of_set (insert x F)) = sorted_list_of_set (f ` insert x F)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sorted_list_of_set (f ` insert x A) = map f (insort x (sorted_list_of_set A))
[PROOF STEP]
show \<open>map f (sorted_list_of_set (insert x A)) = sorted_list_of_set (f ` insert x A)\<close>
[PROOF STATE]
proof (prove)
using this:
sorted_list_of_set (f ` insert x A) = map f (insort x (sorted_list_of_set A))

goal (1 subgoal):
 1. map f (sorted_list_of_set (insert x A)) = sorted_list_of_set (f ` insert x A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
map f (sorted_list_of_set (insert x A)) = sorted_list_of_set (f ` insert x A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in sigma_algebra) sets_Collect_countable_Ex':
  assumes "\<And>i. i \<in> I \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M"
  assumes "countable I"
  shows "{x\<in>\<Omega>. \<exists>i\<in>I. P i x} \<in> M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> \<Omega>. \<exists>i\<in>I. P i x} \<in> M
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {x \<in> \<Omega>. \<exists>i\<in>I. P i x} \<in> M
[PROOF STEP]
have "{x\<in>\<Omega>. \<exists>i\<in>I. P i x} = (\<Union>i\<in>I. {x\<in>\<Omega>. P i x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> \<Omega>. \<exists>i\<in>I. P i x} = (\<Union>i\<in>I. {x \<in> \<Omega>. P i x})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x \<in> \<Omega>. \<exists>i\<in>I. P i x} = (\<Union>i\<in>I. {x \<in> \<Omega>. P i x})

goal (1 subgoal):
 1. {x \<in> \<Omega>. \<exists>i\<in>I. P i x} \<in> M
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
?i \<in> I \<Longrightarrow> {x \<in> \<Omega>. P ?i x} \<in> M
countable I
{x \<in> \<Omega>. \<exists>i\<in>I. P i x} = (\<Union>i\<in>I. {x \<in> \<Omega>. P i x})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?i \<in> I \<Longrightarrow> {x \<in> \<Omega>. P ?i x} \<in> M
countable I
{x \<in> \<Omega>. \<exists>i\<in>I. P i x} = (\<Union>i\<in>I. {x \<in> \<Omega>. P i x})

goal (1 subgoal):
 1. {x \<in> \<Omega>. \<exists>i\<in>I. P i x} \<in> M
[PROOF STEP]
by (auto intro!: countable_UN')
[PROOF STATE]
proof (state)
this:
{x \<in> \<Omega>. \<exists>i\<in>I. P i x} \<in> M

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma  vec_hom_zero_iff[simp]: "(map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
assume i: "i < n" "dim_vec x = n"
[PROOF STATE]
proof (state)
this:
i < n
dim_vec x = n

goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
hence "map_vec hom x $ i = 0 \<longleftrightarrow> x $ i = 0"
[PROOF STATE]
proof (prove)
using this:
i < n
dim_vec x = n

goal (1 subgoal):
 1. (map_vec hom x $ i = (0::'b)) = (x $ i = (0::'a))
[PROOF STEP]
using index_map_vec(1)[of i x]
[PROOF STATE]
proof (prove)
using this:
i < n
dim_vec x = n
i < dim_vec x \<Longrightarrow> map_vec ?f x $ i = ?f (x $ i)

goal (1 subgoal):
 1. (map_vec hom x $ i = (0::'b)) = (x $ i = (0::'a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(map_vec hom x $ i = (0::'b)) = (x $ i = (0::'a))

goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i2 < n; dim_vec x = n\<rbrakk> \<Longrightarrow> (map_vec hom x $ ?i2 = (0::'b)) = (x $ ?i2 = (0::'a))

goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
note main = this
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i2 < n; dim_vec x = n\<rbrakk> \<Longrightarrow> (map_vec hom x $ ?i2 = (0::'b)) = (x $ ?i2 = (0::'a))

goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)
[PROOF STEP]
unfolding vec_eq_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (dim_vec (map_vec hom x) = dim_vec (0\<^sub>v n) \<and> (\<forall>i<dim_vec (0\<^sub>v n). map_vec hom x $ i = 0\<^sub>v n $ i)) = (dim_vec x = dim_vec (0\<^sub>v n) \<and> (\<forall>i<dim_vec (0\<^sub>v n). x $ i = 0\<^sub>v n $ i))
[PROOF STEP]
by (simp, insert main, auto)
[PROOF STATE]
proof (state)
this:
(map_vec hom x = 0\<^sub>v n) = (x = 0\<^sub>v n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma path_image_part_circlepath_subset:
  assumes "a \<le> a'" "a' \<le> b'" "b' \<le> b"
  shows   "path_image (part_circlepath c r a' b') \<subseteq> path_image (part_circlepath c r a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (part_circlepath c r a' b') \<subseteq> path_image (part_circlepath c r a b)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<le> a'
a' \<le> b'
b' \<le> b

goal (1 subgoal):
 1. path_image (part_circlepath c r a' b') \<subseteq> path_image (part_circlepath c r a b)
[PROOF STEP]
by (subst (1 2) path_image_part_circlepath) auto


[STATEMENT]
lemma find_sort_containment :
  assumes "find P (sort xs) = Some x"
shows "x \<in> set xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> set xs
[PROOF STEP]
using assms find_set
[PROOF STATE]
proof (prove)
using this:
find P (sort xs) = Some x
find ?P ?xs = Some ?x \<Longrightarrow> ?x \<in> set ?xs

goal (1 subgoal):
 1. x \<in> set xs
[PROOF STEP]
by force


[STATEMENT]
lemma Bounded_mat_mono: "b \<le> B \<Longrightarrow> Bounded_mat b \<subseteq> Bounded_mat B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b \<le> B \<Longrightarrow> Bounded_mat b \<subseteq> Bounded_mat B
[PROOF STEP]
unfolding Bounded_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b \<le> B \<Longrightarrow> {A. \<forall>i<dim_row A. \<forall>j<dim_col A. \<bar>A $$ (i, j)\<bar> \<le> b} \<subseteq> {A. \<forall>i<dim_row A. \<forall>j<dim_col A. \<bar>A $$ (i, j)\<bar> \<le> B}
[PROOF STEP]
by force


[STATEMENT]
lemma coplanar_perm_2:
  assumes "Coplanar A B C D"
  shows "Coplanar A C B D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A C B D
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Coplanar A C B D
[PROOF STEP]
obtain X where P1: "(Col A B X \<and> Col C D X) \<or> (Col A C X \<and> Col B D X) \<or> (Col A D X \<and> Col B C X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Coplanar_def assms
[PROOF STATE]
proof (prove)
using this:
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Coplanar A B C D

goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar A C B D
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar A C B D
[PROOF STEP]
using Coplanar_def col_permutation_4
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Col ?A ?B ?C \<Longrightarrow> Col ?B ?A ?C

goal (1 subgoal):
 1. Coplanar A C B D
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar A C B D

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_field_derivative_cong_ev:
  assumes "x = y"
    and *: "eventually (\<lambda>x. x \<in> S \<longrightarrow> f x = g x) (nhds x)"
    and "u = v" "S = t" "x \<in> S"
  shows "(f has_field_derivative u) (at x within S) = (g has_field_derivative v) (at y within t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_field_derivative u) (at x within S) = (g has_field_derivative v) (at y within t)
[PROOF STEP]
unfolding has_field_derivative_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>y. (f y - f x) / (y - x)) \<longlongrightarrow> u) (at x within S) = ((\<lambda>ya. (g ya - g y) / (ya - y)) \<longlongrightarrow> v) (at y within t)
[PROOF STEP]
proof (rule filterlim_cong)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. nhds u = nhds v
 2. at x within S = at y within t
 3. \<forall>\<^sub>F xa in at x within S. (f xa - f x) / (xa - x) = (g xa - g y) / (xa - y)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
x = y
\<forall>\<^sub>F x in nhds x. x \<in> S \<longrightarrow> f x = g x
u = v
S = t
x \<in> S
[PROOF STEP]
have "f y = g y"
[PROOF STATE]
proof (prove)
using this:
x = y
\<forall>\<^sub>F x in nhds x. x \<in> S \<longrightarrow> f x = g x
u = v
S = t
x \<in> S

goal (1 subgoal):
 1. f y = g y
[PROOF STEP]
by (auto simp: eventually_nhds)
[PROOF STATE]
proof (state)
this:
f y = g y

goal (3 subgoals):
 1. nhds u = nhds v
 2. at x within S = at y within t
 3. \<forall>\<^sub>F xa in at x within S. (f xa - f x) / (xa - x) = (g xa - g y) / (xa - y)
[PROOF STEP]
with *
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in nhds x. x \<in> S \<longrightarrow> f x = g x
f y = g y
[PROOF STEP]
show "\<forall>\<^sub>F z in at x within S. (f z - f x) / (z - x) = (g z - g y) / (z - y)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in nhds x. x \<in> S \<longrightarrow> f x = g x
f y = g y

goal (1 subgoal):
 1. \<forall>\<^sub>F z in at x within S. (f z - f x) / (z - x) = (g z - g y) / (z - y)
[PROOF STEP]
unfolding eventually_at_filter
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in nhds x. x \<in> S \<longrightarrow> f x = g x
f y = g y

goal (1 subgoal):
 1. \<forall>\<^sub>F xa in nhds x. xa \<noteq> x \<longrightarrow> xa \<in> S \<longrightarrow> (f xa - f x) / (xa - x) = (g xa - g y) / (xa - y)
[PROOF STEP]
by eventually_elim (auto simp: assms \<open>f y = g y\<close>)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F z in at x within S. (f z - f x) / (z - x) = (g z - g y) / (z - y)

goal (2 subgoals):
 1. nhds u = nhds v
 2. at x within S = at y within t
[PROOF STEP]
qed (simp_all add: assms)


[STATEMENT]
lemma Union_included_in_supp:
  fixes S::"('a::fs set)"
  assumes fin: "finite S"
  shows "(\<Union>x\<in>S. supp x) \<subseteq> supp S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (supp ` S) \<subseteq> supp S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Union> (supp ` S) \<subseteq> supp S
[PROOF STEP]
have eqvt: "eqvt (\<lambda>S. \<Union>x \<in> S. supp x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eqvt (\<lambda>S. \<Union> (supp ` S))
[PROOF STEP]
unfolding eqvt_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>p. p \<bullet> (\<lambda>S. \<Union> (supp ` S)) = (\<lambda>S. \<Union> (supp ` S))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
eqvt (\<lambda>S. \<Union> (supp ` S))

goal (1 subgoal):
 1. \<Union> (supp ` S) \<subseteq> supp S
[PROOF STEP]
have "(\<Union>x\<in>S. supp x) = supp (\<Union>x\<in>S. supp x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (supp ` S) = supp (\<Union> (supp ` S))
[PROOF STEP]
by (rule supp_finite_atom_set[symmetric]) (rule Union_of_finite_supp_sets[OF fin])
[PROOF STATE]
proof (state)
this:
\<Union> (supp ` S) = supp (\<Union> (supp ` S))

goal (1 subgoal):
 1. \<Union> (supp ` S) \<subseteq> supp S
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Union> (supp ` S) = supp (\<Union> (supp ` S))

goal (1 subgoal):
 1. \<Union> (supp ` S) \<subseteq> supp S
[PROOF STEP]
have "\<dots> \<subseteq> supp S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp (\<Union> (supp ` S)) \<subseteq> supp S
[PROOF STEP]
using eqvt
[PROOF STATE]
proof (prove)
using this:
eqvt (\<lambda>S. \<Union> (supp ` S))

goal (1 subgoal):
 1. supp (\<Union> (supp ` S)) \<subseteq> supp S
[PROOF STEP]
by (rule supp_fun_app_eqvt)
[PROOF STATE]
proof (state)
this:
supp (\<Union> (supp ` S)) \<subseteq> supp S

goal (1 subgoal):
 1. \<Union> (supp ` S) \<subseteq> supp S
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Union> (supp ` S) \<subseteq> supp S
[PROOF STEP]
show "(\<Union>x\<in>S. supp x) \<subseteq> supp S"
[PROOF STATE]
proof (prove)
using this:
\<Union> (supp ` S) \<subseteq> supp S

goal (1 subgoal):
 1. \<Union> (supp ` S) \<subseteq> supp S
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<Union> (supp ` S) \<subseteq> supp S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma T_BIT_absch_le: assumes nqs: "n \<le> length qs"
  shows "T_BIT n \<le> (7 / 4) * T_A n - 3/4*n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T_BIT n \<le> 7 / 4 * real_of_int (T_A n) - 3 / 4 * real n
[PROOF STEP]
unfolding T_BIT_def T_A_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
from potential2[of "Phi", OF phi0 phi_pos myub] nqs
[PROOF STATE]
proof (chain)
picking this:
(\<And>m. m < ?n \<Longrightarrow> m < length qs) \<Longrightarrow> sum t_BIT {..<?n} \<le> (\<Sum>i<?n. 7 / 4 * real_of_int (t_A i) - 3 / 4)
n \<le> length qs
[PROOF STEP]
have
      "sum t_BIT {..<n} \<le> (\<Sum>i<n. 7 / 4 *   (t_A i) - 3 / 4)"
[PROOF STATE]
proof (prove)
using this:
(\<And>m. m < ?n \<Longrightarrow> m < length qs) \<Longrightarrow> sum t_BIT {..<?n} \<le> (\<Sum>i<?n. 7 / 4 * real_of_int (t_A i) - 3 / 4)
n \<le> length qs

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> (\<Sum>i<n. 7 / 4 * real_of_int (t_A i) - 3 / 4)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sum t_BIT {..<n} \<le> (\<Sum>i<n. 7 / 4 * real_of_int (t_A i) - 3 / 4)

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum t_BIT {..<n} \<le> (\<Sum>i<n. 7 / 4 * real_of_int (t_A i) - 3 / 4)

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
have "\<dots> = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - (\<Sum>i<n. (3/4))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i<n. 7 / 4 * real_of_int (t_A i) - 3 / 4) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - (\<Sum>i<n. 3 / 4)
[PROOF STEP]
by (rule sum_subtractf)
[PROOF STATE]
proof (state)
this:
(\<Sum>i<n. 7 / 4 * real_of_int (t_A i) - 3 / 4) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - (\<Sum>i<n. 3 / 4)

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i<n. 7 / 4 * real_of_int (t_A i) - 3 / 4) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - (\<Sum>i<n. 3 / 4)

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
have "\<dots> = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - (3/4)*(\<Sum>i<n. 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - (\<Sum>i<n. 3 / 4) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * (\<Sum>i<n. 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - (\<Sum>i<n. 3 / 4) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * (\<Sum>i<n. 1)

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - (\<Sum>i<n. 3 / 4) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * (\<Sum>i<n. 1)

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
have "\<dots> = (\<Sum>i<n. (7 / 4) * real_of_int (t_A i)) - (3/4)*n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * (\<Sum>i<n. 1) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * real n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * (\<Sum>i<n. 1) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * real n

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * (\<Sum>i<n. 1) = (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * real n

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
have "\<dots> =  (7 / 4) * (\<Sum>i<n. real_of_int (t_A i))  - (3/4)*n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * real n = 7 / 4 * (\<Sum>i<n. real_of_int (t_A i)) - 3 / 4 * real n
[PROOF STEP]
by (simp add: sum_distrib_left)
[PROOF STATE]
proof (state)
this:
(\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * real n = 7 / 4 * (\<Sum>i<n. real_of_int (t_A i)) - 3 / 4 * real n

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i<n. 7 / 4 * real_of_int (t_A i)) - 3 / 4 * real n = 7 / 4 * (\<Sum>i<n. real_of_int (t_A i)) - 3 / 4 * real n

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
have "\<dots> = (7 / 4) * real_of_int (\<Sum>i<n.(t_A i))  - (3/4)*n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 7 / 4 * (\<Sum>i<n. real_of_int (t_A i)) - 3 / 4 * real n = 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
7 / 4 * (\<Sum>i<n. real_of_int (t_A i)) - 3 / 4 * real n = 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
show "sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n})  - (3/4)*n"
[PROOF STATE]
proof (prove)
using this:
sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n

goal (1 subgoal):
 1. sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sum t_BIT {..<n} \<le> 7 / 4 * real_of_int (sum t_A {..<n}) - 3 / 4 * real n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_to_map_empty_iff: "set_to_map S = Map.empty \<longleftrightarrow> S = {}" (is ?T1)
                            "Map.empty = set_to_map S \<longleftrightarrow> S = {}" (is ?T2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (set_to_map S = Map.empty) = (S = {}) &&& (Map.empty = set_to_map S) = (S = {})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (set_to_map S = Map.empty) = (S = {})
 2. (Map.empty = set_to_map S) = (S = {})
[PROOF STEP]
show T1: ?T1
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (set_to_map S = Map.empty) = (S = {})
[PROOF STEP]
apply (simp only: set_eq_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (set_to_map S = Map.empty) = (\<forall>x. (x \<in> S) = (x \<in> {}))
[PROOF STEP]
apply (simp only: fun_eq_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. set_to_map S x = None) = (\<forall>x. (x \<in> S) = (x \<in> {}))
[PROOF STEP]
apply (simp add: set_to_map_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x v. (x, v) \<notin> S) = (S = {})
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(set_to_map S = Map.empty) = (S = {})

goal (1 subgoal):
 1. (Map.empty = set_to_map S) = (S = {})
[PROOF STEP]
from T1
[PROOF STATE]
proof (chain)
picking this:
(set_to_map S = Map.empty) = (S = {})
[PROOF STEP]
show ?T2
[PROOF STATE]
proof (prove)
using this:
(set_to_map S = Map.empty) = (S = {})

goal (1 subgoal):
 1. (Map.empty = set_to_map S) = (S = {})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(Map.empty = set_to_map S) = (S = {})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma diff_plus_sym_hmset: "(c - b) + b = (b - c) + c" for b c :: hmultiset
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c - b + b = b - c + c
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c - b + b = b - c + c
[PROOF STEP]
have f1: "\<And>h ha :: hmultiset. h - (ha + h) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>h ha. h - (ha + h) = 0
[PROOF STEP]
by (simp add: add.commute)
[PROOF STATE]
proof (state)
this:
?h - (?ha + ?h) = 0

goal (1 subgoal):
 1. c - b + b = b - c + c
[PROOF STEP]
have f2: "\<And>h ha hb :: hmultiset. h + ha - (h - hb) = hb + ha - (hb - h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>h ha hb. h + ha - (h - hb) = hb + ha - (hb - h)
[PROOF STEP]
by (metis (no_types) add_diff_cancel_right minus_diff_sym_hmset)
[PROOF STATE]
proof (state)
this:
?h + ?ha - (?h - ?hb) = ?hb + ?ha - (?hb - ?h)

goal (1 subgoal):
 1. c - b + b = b - c + c
[PROOF STEP]
have "\<And>h ha hb :: hmultiset. h + (ha + hb) - hb = h + ha"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>h ha hb. h + (ha + hb) - hb = h + ha
[PROOF STEP]
by (metis (no_types) add.assoc add_diff_cancel_right')
[PROOF STATE]
proof (state)
this:
?h + (?ha + ?hb) - ?hb = ?h + ?ha

goal (1 subgoal):
 1. c - b + b = b - c + c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?h + (?ha + ?hb) - ?hb = ?h + ?ha
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?h + (?ha + ?hb) - ?hb = ?h + ?ha

goal (1 subgoal):
 1. c - b + b = b - c + c
[PROOF STEP]
using f2 f1
[PROOF STATE]
proof (prove)
using this:
?h + (?ha + ?hb) - ?hb = ?h + ?ha
?h + ?ha - (?h - ?hb) = ?hb + ?ha - (?hb - ?h)
?h - (?ha + ?h) = 0

goal (1 subgoal):
 1. c - b + b = b - c + c
[PROOF STEP]
by (metis (no_types) add.commute add.right_neutral diff_diff_add_hmset)
[PROOF STATE]
proof (state)
this:
c - b + b = b - c + c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma b_least2_less_impl_eq2: "\<lbrakk>z < y; (f x z) \<noteq> 0\<rbrakk> \<Longrightarrow> (b_least2 f x y) = (Least (%z. (f x z) \<noteq> 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z < y; f x z \<noteq> 0\<rbrakk> \<Longrightarrow> b_least2 f x y = (LEAST z. f x z \<noteq> 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>z < y; f x z \<noteq> 0\<rbrakk> \<Longrightarrow> b_least2 f x y = (LEAST z. f x z \<noteq> 0)
[PROOF STEP]
assume A1: "z < y" and A2: "f x z \<noteq> 0"
[PROOF STATE]
proof (state)
this:
z < y
f x z \<noteq> 0

goal (1 subgoal):
 1. \<lbrakk>z < y; f x z \<noteq> 0\<rbrakk> \<Longrightarrow> b_least2 f x y = (LEAST z. f x z \<noteq> 0)
[PROOF STEP]
from A1 A2
[PROOF STATE]
proof (chain)
picking this:
z < y
f x z \<noteq> 0
[PROOF STEP]
have S1: "b_least2 f x y < y"
[PROOF STATE]
proof (prove)
using this:
z < y
f x z \<noteq> 0

goal (1 subgoal):
 1. b_least2 f x y < y
[PROOF STEP]
by (rule nz_b_least2_impl_less)
[PROOF STATE]
proof (state)
this:
b_least2 f x y < y

goal (1 subgoal):
 1. \<lbrakk>z < y; f x z \<noteq> 0\<rbrakk> \<Longrightarrow> b_least2 f x y = (LEAST z. f x z \<noteq> 0)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
b_least2 f x y < y

goal (1 subgoal):
 1. b_least2 f x y = (LEAST z. f x z \<noteq> 0)
[PROOF STEP]
by (rule b_least2_less_impl_eq)
[PROOF STATE]
proof (state)
this:
b_least2 f x y = (LEAST z. f x z \<noteq> 0)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_map_index[simp]: "x \<in> set (map_index f xs) = (\<exists>i < length xs. f i (xs ! i) = x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> set (map_index f xs)) = (\<exists>i<length xs. f i (xs ! i) = x)
[PROOF STEP]
unfolding map_index
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> set (map2 f [0..<length xs] xs)) = (\<exists>i<length xs. f i (xs ! i) = x)
[PROOF STEP]
by (auto simp: set_zip intro!: image_eqI[of _ "case_prod f"])


[STATEMENT]
lemma zeroseq_arctan_series:
  fixes x :: real
  assumes "\<bar>x\<bar> \<le> 1"
  shows "(\<lambda>n. 1 / real (n * 2 + 1) * x^(n * 2 + 1)) \<longlonglongrightarrow> 0"
    (is "?a \<longlonglongrightarrow> 0")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
proof (cases "x = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
 2. x \<noteq> 0 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = 0

goal (2 subgoals):
 1. x = 0 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
 2. x \<noteq> 0 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x = 0

goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. x \<noteq> 0 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> 0 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> 0

goal (1 subgoal):
 1. x \<noteq> 0 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
have "norm x \<le> 1" and "x \<le> 1" and "-1 \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm x \<le> 1 &&& x \<le> 1 &&& - 1 \<le> x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<bar>x\<bar> \<le> 1

goal (1 subgoal):
 1. norm x \<le> 1 &&& x \<le> 1 &&& - 1 \<le> x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
norm x \<le> 1
x \<le> 1
- 1 \<le> x

goal (1 subgoal):
 1. x \<noteq> 0 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
show "?a \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
proof (cases "\<bar>x\<bar> < 1")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
 2. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<bar>x\<bar> < 1

goal (2 subgoals):
 1. \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
 2. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<bar>x\<bar> < 1
[PROOF STEP]
have "norm x < 1"
[PROOF STATE]
proof (prove)
using this:
\<bar>x\<bar> < 1

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

goal (2 subgoals):
 1. \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
 2. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
from tendsto_mult[OF LIMSEQ_inverse_real_of_nat LIMSEQ_power_zero[OF \<open>norm x < 1\<close>, THEN LIMSEQ_Suc]]
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>xa. inverse (real (Suc xa)) * x ^ Suc xa) \<longlonglongrightarrow> 0 * 0
[PROOF STEP]
have "(\<lambda>n. 1 / real (n + 1) * x ^ (n + 1)) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>xa. inverse (real (Suc xa)) * x ^ Suc xa) \<longlonglongrightarrow> 0 * 0

goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n + 1) * x ^ (n + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
unfolding inverse_eq_divide Suc_eq_plus1
[PROOF STATE]
proof (prove)
using this:
(\<lambda>xa. 1 / real (xa + 1) * x ^ (xa + 1)) \<longlonglongrightarrow> 0 * 0

goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n + 1) * x ^ (n + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / real (n + 1) * x ^ (n + 1)) \<longlonglongrightarrow> 0

goal (2 subgoals):
 1. \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
 2. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. 1 / real (n + 1) * x ^ (n + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. 1 / real (n + 1) * x ^ (n + 1)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
using pos2
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. 1 / real (n + 1) * x ^ (n + 1)) \<longlonglongrightarrow> 0
0 < 2

goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (rule LIMSEQ_linear)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> \<bar>x\<bar> < 1

goal (1 subgoal):
 1. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> \<bar>x\<bar> < 1
[PROOF STEP]
have "x = -1 \<or> x = 1"
[PROOF STATE]
proof (prove)
using this:
\<not> \<bar>x\<bar> < 1

goal (1 subgoal):
 1. x = - 1 \<or> x = 1
[PROOF STEP]
using \<open>\<bar>x\<bar> \<le> 1\<close>
[PROOF STATE]
proof (prove)
using this:
\<not> \<bar>x\<bar> < 1
\<bar>x\<bar> \<le> 1

goal (1 subgoal):
 1. x = - 1 \<or> x = 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = - 1 \<or> x = 1

goal (1 subgoal):
 1. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = - 1 \<or> x = 1
[PROOF STEP]
have n_eq: "\<And> n. x ^ (n * 2 + 1) = x"
[PROOF STATE]
proof (prove)
using this:
x = - 1 \<or> x = 1

goal (1 subgoal):
 1. \<And>n. x ^ (n * 2 + 1) = x
[PROOF STEP]
unfolding One_nat_def
[PROOF STATE]
proof (prove)
using this:
x = - 1 \<or> x = 1

goal (1 subgoal):
 1. \<And>n. x ^ (n * 2 + Suc 0) = x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x ^ (?n * 2 + 1) = x

goal (1 subgoal):
 1. \<not> \<bar>x\<bar> < 1 \<Longrightarrow> (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
from tendsto_mult[OF LIMSEQ_inverse_real_of_nat[THEN LIMSEQ_linear, OF pos2, unfolded inverse_eq_divide] tendsto_const[of x]]
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>xa. 1 / real (Suc (xa * 2)) * x) \<longlonglongrightarrow> 0 * x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>xa. 1 / real (Suc (xa * 2)) * x) \<longlonglongrightarrow> 0 * x

goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0
[PROOF STEP]
unfolding n_eq Suc_eq_plus1
[PROOF STATE]
proof (prove)
using this:
(\<lambda>xa. 1 / real (xa * 2 + 1) * x) \<longlonglongrightarrow> 0 * x

goal (1 subgoal):
 1. (\<lambda>n. 1 / real (n * 2 + 1) * x) \<longlonglongrightarrow> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / real (n * 2 + 1) * x ^ (n * 2 + 1)) \<longlonglongrightarrow> 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vfinite_VPowI:
  assumes "vfinite A"
  shows "vfinite (VPow A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vfinite (VPow A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
vfinite A

goal (1 subgoal):
 1. vfinite (VPow A)
[PROOF STEP]
proof(induct rule: vfinite_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. vfinite (VPow 0)
 2. \<And>x F. \<lbrakk>vfinite F; x \<notin>\<^sub>\<circ> F; vfinite (VPow F)\<rbrakk> \<Longrightarrow> vfinite (VPow (vinsert x F))
[PROOF STEP]
case vempty
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. vfinite (VPow 0)
 2. \<And>x F. \<lbrakk>vfinite F; x \<notin>\<^sub>\<circ> F; vfinite (VPow F)\<rbrakk> \<Longrightarrow> vfinite (VPow (vinsert x F))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vfinite (VPow 0)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
vfinite (VPow 0)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>vfinite F; x \<notin>\<^sub>\<circ> F; vfinite (VPow F)\<rbrakk> \<Longrightarrow> vfinite (VPow (vinsert x F))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>vfinite F; x \<notin>\<^sub>\<circ> F; vfinite (VPow F)\<rbrakk> \<Longrightarrow> vfinite (VPow (vinsert x F))
[PROOF STEP]
case (vinsert x F)
[PROOF STATE]
proof (state)
this:
vfinite F
x \<notin>\<^sub>\<circ> F
vfinite (VPow F)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>vfinite F; x \<notin>\<^sub>\<circ> F; vfinite (VPow F)\<rbrakk> \<Longrightarrow> vfinite (VPow (vinsert x F))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
vfinite F
x \<notin>\<^sub>\<circ> F
vfinite (VPow F)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
vfinite F
x \<notin>\<^sub>\<circ> F
vfinite (VPow F)

goal (1 subgoal):
 1. vfinite (VPow (vinsert x F))
[PROOF STEP]
unfolding VPow_vinsert
[PROOF STATE]
proof (prove)
using this:
vfinite F
x \<notin>\<^sub>\<circ> F
vfinite (VPow F)

goal (1 subgoal):
 1. vfinite (VPow F \<union>\<^sub>\<circ> VLambda (VPow F) (vinsert x) `\<^sub>\<circ> VPow F)
[PROOF STEP]
using rel_VLambda.vfinite_vimage
[PROOF STATE]
proof (prove)
using this:
vfinite F
x \<notin>\<^sub>\<circ> F
vfinite (VPow F)
vfinite ?A \<Longrightarrow> vfinite (VLambda ?Aa ?f `\<^sub>\<circ> ?A)

goal (1 subgoal):
 1. vfinite (VPow F \<union>\<^sub>\<circ> VLambda (VPow F) (vinsert x) `\<^sub>\<circ> VPow F)
[PROOF STEP]
by (intro vfinite_vunionI) metis+
[PROOF STATE]
proof (state)
this:
vfinite (VPow (vinsert x F))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma conemem_commute: "conemem a b t = conemem b a (pi / 2 - t)" if "0 \<le> t" "t \<le> pi / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conemem a b t = conemem b a (pi / 2 - t)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
t \<le> pi / 2

goal (1 subgoal):
 1. conemem a b t = conemem b a (pi / 2 - t)
[PROOF STEP]
by (auto simp: conemem_def cos_sin_eq algebra_simps)


[STATEMENT]
lemma ldeep_s_revhd1_if_distinct: "distinct xs \<Longrightarrow> ldeep_s sel (rev xs) (hd xs) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct xs \<Longrightarrow> ldeep_s sel (rev xs) (hd xs) = 1
[PROOF STEP]
using ldeep_s_last1_if_distinct[of "rev xs"]
[PROOF STATE]
proof (prove)
using this:
distinct (rev xs) \<Longrightarrow> ldeep_s ?sel (rev xs) (last (rev xs)) = 1

goal (1 subgoal):
 1. distinct xs \<Longrightarrow> ldeep_s sel (rev xs) (hd xs) = 1
[PROOF STEP]
by (simp add: last_rev)


[STATEMENT]
lemma image_scaleR_ball:
  fixes a :: "'a::real_normed_vector"
  shows "c \<noteq> 0 \<Longrightarrow> (*\<^sub>R) c ` ball a r = ball (c *\<^sub>R a) (abs c *\<^sub>R r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> (*\<^sub>R) c ` ball a r = ball (c *\<^sub>R a) (\<bar>c\<bar> *\<^sub>R r)
[PROOF STEP]
proof (auto simp: mem_ball dist_norm, goal_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xa. \<lbrakk>c \<noteq> 0; norm (a - xa) < r\<rbrakk> \<Longrightarrow> norm (c *\<^sub>R a - c *\<^sub>R xa) < \<bar>c\<bar> * r
 2. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
case (1 b)
[PROOF STATE]
proof (state)
this:
c \<noteq> 0
norm (a - b) < r

goal (2 subgoals):
 1. \<And>xa. \<lbrakk>c \<noteq> 0; norm (a - xa) < r\<rbrakk> \<Longrightarrow> norm (c *\<^sub>R a - c *\<^sub>R xa) < \<bar>c\<bar> * r
 2. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
have "norm (c *\<^sub>R a - c *\<^sub>R b)  = abs c * norm (a - b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (c *\<^sub>R a - c *\<^sub>R b) = \<bar>c\<bar> * norm (a - b)
[PROOF STEP]
by (auto simp: norm_scaleR[symmetric] algebra_simps simp del: norm_scaleR)
[PROOF STATE]
proof (state)
this:
norm (c *\<^sub>R a - c *\<^sub>R b) = \<bar>c\<bar> * norm (a - b)

goal (2 subgoals):
 1. \<And>xa. \<lbrakk>c \<noteq> 0; norm (a - xa) < r\<rbrakk> \<Longrightarrow> norm (c *\<^sub>R a - c *\<^sub>R xa) < \<bar>c\<bar> * r
 2. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (c *\<^sub>R a - c *\<^sub>R b) = \<bar>c\<bar> * norm (a - b)

goal (2 subgoals):
 1. \<And>xa. \<lbrakk>c \<noteq> 0; norm (a - xa) < r\<rbrakk> \<Longrightarrow> norm (c *\<^sub>R a - c *\<^sub>R xa) < \<bar>c\<bar> * r
 2. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
have "\<dots> < abs c * r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>c\<bar> * norm (a - b) < \<bar>c\<bar> * r
[PROOF STEP]
apply (rule mult_strict_left_mono)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. norm (a - b) < r
 2. 0 < \<bar>c\<bar>
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
norm (a - b) < r

goal (2 subgoals):
 1. norm (a - b) < r
 2. 0 < \<bar>c\<bar>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>c\<bar> * norm (a - b) < \<bar>c\<bar> * r

goal (2 subgoals):
 1. \<And>xa. \<lbrakk>c \<noteq> 0; norm (a - xa) < r\<rbrakk> \<Longrightarrow> norm (c *\<^sub>R a - c *\<^sub>R xa) < \<bar>c\<bar> * r
 2. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
norm (c *\<^sub>R a - c *\<^sub>R b) < \<bar>c\<bar> * r
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
norm (c *\<^sub>R a - c *\<^sub>R b) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. norm (c *\<^sub>R a - c *\<^sub>R b) < \<bar>c\<bar> * r
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
norm (c *\<^sub>R a - c *\<^sub>R b) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
case (2 x)
[PROOF STATE]
proof (state)
this:
c \<noteq> 0
norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
have "norm (a - x /\<^sub>R c) < r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
have "norm (a - x /\<^sub>R c) = abs c *\<^sub>R norm (a - x /\<^sub>R c) /\<^sub>R abs c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) = \<bar>c\<bar> *\<^sub>R norm (a - x /\<^sub>R c) /\<^sub>R \<bar>c\<bar>
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) = \<bar>c\<bar> *\<^sub>R norm (a - x /\<^sub>R c) /\<^sub>R \<bar>c\<bar>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
norm (a - x /\<^sub>R c) = \<bar>c\<bar> *\<^sub>R norm (a - x /\<^sub>R c) /\<^sub>R \<bar>c\<bar>

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (a - x /\<^sub>R c) = \<bar>c\<bar> *\<^sub>R norm (a - x /\<^sub>R c) /\<^sub>R \<bar>c\<bar>

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
have "abs c *\<^sub>R norm (a - x /\<^sub>R c) = norm (c *\<^sub>R a - x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>c\<bar> *\<^sub>R norm (a - x /\<^sub>R c) = norm (c *\<^sub>R a - x)
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. \<bar>c\<bar> *\<^sub>R norm (a - x /\<^sub>R c) = norm (c *\<^sub>R a - x)
[PROOF STEP]
by (auto simp: norm_scaleR[symmetric] algebra_simps simp del: norm_scaleR)
[PROOF STATE]
proof (state)
this:
\<bar>c\<bar> *\<^sub>R norm (a - x /\<^sub>R c) = norm (c *\<^sub>R a - x)

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>c\<bar> *\<^sub>R norm (a - x /\<^sub>R c) = norm (c *\<^sub>R a - x)

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
have "\<dots> < \<bar>c\<bar> * r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
have "\<bar>c\<bar> * r /\<^sub>R \<bar>c\<bar> = r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>c\<bar> * r /\<^sub>R \<bar>c\<bar> = r
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. \<bar>c\<bar> * r /\<^sub>R \<bar>c\<bar> = r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>c\<bar> * r /\<^sub>R \<bar>c\<bar> = r

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>x y. x < y \<Longrightarrow> x /\<^sub>R \<bar>c\<bar> < y /\<^sub>R \<bar>c\<bar>) \<Longrightarrow> norm (a - x /\<^sub>R c) < r
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. x < y \<Longrightarrow> x /\<^sub>R \<bar>c\<bar> < y /\<^sub>R \<bar>c\<bar>) \<Longrightarrow> norm (a - x /\<^sub>R c) < r

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. x < y \<Longrightarrow> x /\<^sub>R \<bar>c\<bar> < y /\<^sub>R \<bar>c\<bar>) \<Longrightarrow> norm (a - x /\<^sub>R c) < r
c \<noteq> 0
norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. norm (a - x /\<^sub>R c) < r
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
norm (a - x /\<^sub>R c) < r

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
norm (a - x /\<^sub>R c) < r

goal (1 subgoal):
 1. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
norm (a - x /\<^sub>R c) < r
[PROOF STEP]
have xdc: "x /\<^sub>R c \<in> ball a r"
[PROOF STATE]
proof (prove)
using this:
norm (a - x /\<^sub>R c) < r

goal (1 subgoal):
 1. x /\<^sub>R c \<in> ball a r
[PROOF STEP]
by (auto simp: mem_ball dist_norm)
[PROOF STATE]
proof (state)
this:
x /\<^sub>R c \<in> ball a r

goal (1 subgoal):
 1. \<And>x. \<lbrakk>c \<noteq> 0; norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r\<rbrakk> \<Longrightarrow> x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> (*\<^sub>R) c ` ball a r
[PROOF STEP]
apply (rule image_eqI[OF _ xdc])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = c *\<^sub>R (x /\<^sub>R c)
[PROOF STEP]
using 2
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
norm (c *\<^sub>R a - x) < \<bar>c\<bar> * r

goal (1 subgoal):
 1. x = c *\<^sub>R (x /\<^sub>R c)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<in> (*\<^sub>R) c ` ball a r

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem sturm_interval:
  assumes "a < b" "poly p a \<noteq> 0" "poly p b \<noteq> 0"
  shows "card {x. poly p x = 0 \<and> a < x \<and> x < b} = changes_itv_smods a b p (pderiv p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (card {x. poly p x = 0 \<and> a < x \<and> x < b}) = changes_itv_smods a b p (pderiv p)
[PROOF STEP]
using sturm_tarski_interval[OF assms, unfolded taq_def,of 1]
[PROOF STATE]
proof (prove)
using this:
(\<Sum>x | poly p x = 0 \<and> a < x \<and> x < b. sign (poly 1 x)) = changes_itv_smods a b p (pderiv p * 1)

goal (1 subgoal):
 1. int (card {x. poly p x = 0 \<and> a < x \<and> x < b}) = changes_itv_smods a b p (pderiv p)
[PROOF STEP]
by force


[STATEMENT]
lemma "\<forall>(x::'a::linordered_field) y. x < y \<longrightarrow> (\<exists>z>0. x + z = y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. x < y \<longrightarrow> (\<exists>z>0::'a. x + z = y)
[PROOF STEP]
by ferrack