[STATEMENT]
lemma interior_simplex_nonempty:
  fixes S :: "'N :: euclidean_space set"
  assumes "independent S" "finite S" "card S = DIM('N)"
  obtains a where "a \<in> interior (convex hull (insert 0 S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>a. a \<in> interior (convex hull insert (0::'N) S) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>a. a \<in> interior (convex hull insert (0::'N) S) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "affine hull (insert 0 S) = UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. affine hull insert (0::'N) S = UNIV
[PROOF STEP]
by (simp add: hull_inc affine_hull_span_0 dim_eq_full[symmetric]
         assms(1) assms(3) dim_eq_card_independent)
[PROOF STATE]
proof (state)
this:
affine hull insert (0::'N) S = UNIV

goal (1 subgoal):
 1. (\<And>a. a \<in> interior (convex hull insert (0::'N) S) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
affine hull insert (0::'N) S = UNIV

goal (1 subgoal):
 1. (\<And>a. a \<in> interior (convex hull insert (0::'N) S) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "rel_interior (convex hull insert 0 S) \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel_interior (convex hull insert (0::'N) S) \<noteq> {}
[PROOF STEP]
using rel_interior_eq_empty [of "convex hull (insert 0 S)"]
[PROOF STATE]
proof (prove)
using this:
convex (convex hull insert (0::'N) S) \<Longrightarrow> (rel_interior (convex hull insert (0::'N) S) = {}) = (convex hull insert (0::'N) S = {})

goal (1 subgoal):
 1. rel_interior (convex hull insert (0::'N) S) \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
rel_interior (convex hull insert (0::'N) S) \<noteq> {}

goal (1 subgoal):
 1. (\<And>a. a \<in> interior (convex hull insert (0::'N) S) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
affine hull insert (0::'N) S = UNIV
rel_interior (convex hull insert (0::'N) S) \<noteq> {}
[PROOF STEP]
have "interior (convex hull insert 0 S) \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
affine hull insert (0::'N) S = UNIV
rel_interior (convex hull insert (0::'N) S) \<noteq> {}

goal (1 subgoal):
 1. interior (convex hull insert (0::'N) S) \<noteq> {}
[PROOF STEP]
by (simp add: rel_interior_interior)
[PROOF STATE]
proof (state)
this:
interior (convex hull insert (0::'N) S) \<noteq> {}

goal (1 subgoal):
 1. (\<And>a. a \<in> interior (convex hull insert (0::'N) S) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
?a \<in> interior (convex hull insert (0::'N) S) \<Longrightarrow> thesis
interior (convex hull insert (0::'N) S) \<noteq> {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?a \<in> interior (convex hull insert (0::'N) S) \<Longrightarrow> thesis
interior (convex hull insert (0::'N) S) \<noteq> {}

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in monoid) m_concat_append[simp]:
  assumes "set a \<subseteq> carrier G"
      and "set b \<subseteq> carrier G"
  shows "m_concat (a@b) = m_concat a \<otimes> m_concat b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m_concat (a @ b) = m_concat a \<otimes> m_concat b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
set a \<subseteq> carrier G
set b \<subseteq> carrier G

goal (1 subgoal):
 1. m_concat (a @ b) = m_concat a \<otimes> m_concat b
[PROOF STEP]
by(induct a)(auto simp add: m_assoc)


[STATEMENT]
lemma (in field) degree_one_imp_singleton_roots:
  assumes "p \<in> carrier (poly_ring R)" and "degree p = 1"
  shows "roots p = {# \<ominus> (inv (lead_coeff p) \<otimes> (const_term p)) #}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. roots p = {#\<ominus> (inv lead_coeff p \<otimes> const_term p)#}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. roots p = {#\<ominus> (inv lead_coeff p \<otimes> const_term p)#}
[PROOF STEP]
from \<open>p \<in> carrier (poly_ring R)\<close> and \<open>degree p = 1\<close>
[PROOF STATE]
proof (chain)
picking this:
p \<in> carrier (poly_ring R)
degree p = 1
[PROOF STEP]
obtain a b where "p = [ a, b ]" and "a \<in> carrier R" "a \<noteq> \<zero>" and "b \<in> carrier R"
[PROOF STATE]
proof (prove)
using this:
p \<in> carrier (poly_ring R)
degree p = 1

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>p = [a, b]; a \<in> carrier R; a \<noteq> \<zero>; b \<in> carrier R\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p = [a, b]
a \<in> carrier R
a \<noteq> \<zero>
b \<in> carrier R

goal (1 subgoal):
 1. roots p = {#\<ominus> (inv lead_coeff p \<otimes> const_term p)#}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
p = [a, b]
a \<in> carrier R
a \<noteq> \<zero>
b \<in> carrier R

goal (1 subgoal):
 1. roots p = {#\<ominus> (inv lead_coeff p \<otimes> const_term p)#}
[PROOF STEP]
using degree_one_roots[of a "inv a" b]
[PROOF STATE]
proof (prove)
using this:
p = [a, b]
a \<in> carrier R
a \<noteq> \<zero>
b \<in> carrier R
\<lbrakk>a \<in> carrier R; inv a \<in> carrier R; b \<in> carrier R; a \<otimes> inv a = \<one>\<rbrakk> \<Longrightarrow> roots [a, b] = {#\<ominus> (inv a \<otimes> b)#}

goal (1 subgoal):
 1. roots p = {#\<ominus> (inv lead_coeff p \<otimes> const_term p)#}
[PROOF STEP]
by (auto simp add: const_term_def field_Units)
[PROOF STATE]
proof (state)
this:
roots p = {#\<ominus> (inv lead_coeff p \<otimes> const_term p)#}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_less_eq_trans: "\<lbrakk> A \<sqsubseteq> B; B \<sqsubseteq> C \<rbrakk> \<Longrightarrow> A \<sqsubseteq> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<sqsubseteq> B; B \<sqsubseteq> C\<rbrakk> \<Longrightarrow> A \<sqsubseteq> C
[PROOF STEP]
by(auto simp add: set_less_eq_def split: if_split_asm intro: set_less_eq_aux''_trans)


[STATEMENT]
lemma absolutely_integrable_mult_Fejer_kernel_reflected_part1:
  assumes f: "f absolutely_integrable_on {-pi..pi}"
    and periodic: "\<And>x. f(x + 2*pi) = f x" and "d \<le> pi"
  shows "(\<lambda>x. Fejer_kernel n x * f(t + x)) absolutely_integrable_on {0..d}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. Fejer_kernel n x * f (t + x)) absolutely_integrable_on {0..d}
[PROOF STEP]
by (rule absolutely_integrable_on_subinterval [OF absolutely_integrable_mult_Fejer_kernel_reflected1]) (auto simp: assms)


[STATEMENT]
lemma minus_cancel_vec[simp]: "(v :: 'a :: group_add vec) \<in> carrier_vec n \<Longrightarrow> v - v = 0\<^sub>v n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<in> carrier_vec n \<Longrightarrow> v - v = 0\<^sub>v n
[PROOF STEP]
by (intro eq_vecI, auto)


[STATEMENT]
lemma arccos_arctan:
  assumes "-1 < x" "x < 1"
    shows "arccos x = pi/2 - arctan(x / sqrt(1 - x\<^sup>2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arccos x = pi / 2 - arctan (x / sqrt (1 - x\<^sup>2))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. arccos x = pi / 2 - arctan (x / sqrt (1 - x\<^sup>2))
[PROOF STEP]
have "arctan(x / sqrt(1 - x\<^sup>2)) - (pi/2 - arccos x) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) = 0
[PROOF STEP]
proof (rule sin_eq_0_pi)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. - pi < arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)
 2. arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) < pi
 3. sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0
[PROOF STEP]
show "- pi < arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - pi < arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)
[PROOF STEP]
using arctan_lbound [of "x / sqrt(1 - x\<^sup>2)"]  arccos_bounded [of x] assms
[PROOF STATE]
proof (prove)
using this:
- (pi / 2) < arctan (x / sqrt (1 - x\<^sup>2))
\<lbrakk>- 1 \<le> x; x \<le> 1\<rbrakk> \<Longrightarrow> 0 \<le> arccos x \<and> arccos x \<le> pi
- 1 < x
x < 1

goal (1 subgoal):
 1. - pi < arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
- pi < arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)

goal (2 subgoals):
 1. arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) < pi
 2. sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) < pi
 2. sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0
[PROOF STEP]
show "arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) < pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) < pi
[PROOF STEP]
using arctan_ubound [of "x / sqrt(1 - x\<^sup>2)"]  arccos_bounded [of x] assms
[PROOF STATE]
proof (prove)
using this:
arctan (x / sqrt (1 - x\<^sup>2)) < pi / 2
\<lbrakk>- 1 \<le> x; x \<le> 1\<rbrakk> \<Longrightarrow> 0 \<le> arccos x \<and> arccos x \<le> pi
- 1 < x
x < 1

goal (1 subgoal):
 1. arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) < pi
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) < pi

goal (1 subgoal):
 1. sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0
[PROOF STEP]
show "sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
- 1 < x
x < 1

goal (1 subgoal):
 1. sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0
[PROOF STEP]
by (simp add: algebra_simps sin_diff cos_add sin_arccos sin_arctan cos_arctan
                    power2_eq_square square_eq_1_iff)
[PROOF STATE]
proof (state)
this:
sin (arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x)) = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) = 0

goal (1 subgoal):
 1. arccos x = pi / 2 - arctan (x / sqrt (1 - x\<^sup>2))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
arctan (x / sqrt (1 - x\<^sup>2)) - (pi / 2 - arccos x) = 0

goal (1 subgoal):
 1. arccos x = pi / 2 - arctan (x / sqrt (1 - x\<^sup>2))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
arccos x = pi / 2 - arctan (x / sqrt (1 - x\<^sup>2))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma map_image_dom_ran [simp]:
  "dom (map_image f m) = dom m"
  "ran (map_image f m) = f ` (ran m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dom (map_image f m) = dom m &&& ran (map_image f m) = f ` ran m
[PROOF STEP]
unfolding dom_def ran_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a. map_image f m a \<noteq> None} = {a. m a \<noteq> None} &&& {b. \<exists>a. map_image f m a = Some b} = f ` {b. \<exists>a. m a = Some b}
[PROOF STEP]
by auto


[STATEMENT]
lemma sints_subset:
  "m \<le> n \<Longrightarrow> sints m \<subseteq> sints n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> sints m \<subseteq> sints n
[PROOF STEP]
apply (simp add: sints_num)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> {i. - (2 ^ (m - Suc 0)) \<le> i \<and> i < 2 ^ (m - Suc 0)} \<subseteq> {i. - (2 ^ (n - Suc 0)) \<le> i \<and> i < 2 ^ (n - Suc 0)}
[PROOF STEP]
apply clarsimp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>m \<le> n; - (2 ^ (m - Suc 0)) \<le> x; x < 2 ^ (m - Suc 0)\<rbrakk> \<Longrightarrow> - (2 ^ (n - Suc 0)) \<le> x \<and> x < 2 ^ (n - Suc 0)
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>m \<le> n; - (2 ^ (m - Suc 0)) \<le> x; x < 2 ^ (m - Suc 0)\<rbrakk> \<Longrightarrow> - (2 ^ (n - Suc 0)) \<le> x
 2. \<And>x. \<lbrakk>m \<le> n; - (2 ^ (m - Suc 0)) \<le> x; x < 2 ^ (m - Suc 0)\<rbrakk> \<Longrightarrow> x < 2 ^ (n - Suc 0)
[PROOF STEP]
apply (erule order_trans[rotated])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>m \<le> n; x < 2 ^ (m - Suc 0)\<rbrakk> \<Longrightarrow> - (2 ^ (n - Suc 0)) \<le> - (2 ^ (m - Suc 0))
 2. \<And>x. \<lbrakk>m \<le> n; - (2 ^ (m - Suc 0)) \<le> x; x < 2 ^ (m - Suc 0)\<rbrakk> \<Longrightarrow> x < 2 ^ (n - Suc 0)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>m \<le> n; - (2 ^ (m - Suc 0)) \<le> x; x < 2 ^ (m - Suc 0)\<rbrakk> \<Longrightarrow> x < 2 ^ (n - Suc 0)
[PROOF STEP]
apply (erule order_less_le_trans)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>m \<le> n; - (2 ^ (m - Suc 0)) \<le> x\<rbrakk> \<Longrightarrow> 2 ^ (m - Suc 0) \<le> 2 ^ (n - Suc 0)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma lex_pm_alt: "lex_pm s t = (s = t \<or> (\<exists>x. lookup s x < lookup t x \<and> (\<forall>y<x. lookup s y = lookup t y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lex_pm s t = (s = t \<or> (\<exists>x. lookup s x < lookup t x \<and> (\<forall>y<x. lookup s y = lookup t y)))
[PROOF STEP]
unfolding lex_pm_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (s \<le> t) = (s = t \<or> (\<exists>x. lookup s x < lookup t x \<and> (\<forall>y<x. lookup s y = lookup t y)))
[PROOF STEP]
by (metis less_eq_poly_mapping.rep_eq less_funE less_funI poly_mapping_eq_iff)


[STATEMENT]
lemma open_Collect_neq:
  fixes f g :: "'a::topological_space \<Rightarrow> 'b::t2_space"
  assumes f: "continuous_on UNIV f" and g: "continuous_on UNIV g"
  shows "open {x. f x \<noteq> g x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open {x. f x \<noteq> g x}
[PROOF STEP]
proof (rule openI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {x. f x \<noteq> g x} \<Longrightarrow> \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> {x. f x \<noteq> g x}
[PROOF STEP]
fix t
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {x. f x \<noteq> g x} \<Longrightarrow> \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> {x. f x \<noteq> g x}
[PROOF STEP]
assume "t \<in> {x. f x \<noteq> g x}"
[PROOF STATE]
proof (state)
this:
t \<in> {x. f x \<noteq> g x}

goal (1 subgoal):
 1. \<And>x. x \<in> {x. f x \<noteq> g x} \<Longrightarrow> \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> {x. f x \<noteq> g x}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t \<in> {x. f x \<noteq> g x}
[PROOF STEP]
obtain U V where *: "open U" "open V" "f t \<in> U" "g t \<in> V" "U \<inter> V = {}"
[PROOF STATE]
proof (prove)
using this:
t \<in> {x. f x \<noteq> g x}

goal (1 subgoal):
 1. (\<And>U V. \<lbrakk>open U; open V; f t \<in> U; g t \<in> V; U \<inter> V = {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp add: separation_t2)
[PROOF STATE]
proof (state)
this:
open U
open V
f t \<in> U
g t \<in> V
U \<inter> V = {}

goal (1 subgoal):
 1. \<And>x. x \<in> {x. f x \<noteq> g x} \<Longrightarrow> \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> {x. f x \<noteq> g x}
[PROOF STEP]
with open_vimage[OF \<open>open U\<close> f] open_vimage[OF \<open>open V\<close> g]
[PROOF STATE]
proof (chain)
picking this:
open (f -` U)
open (g -` V)
open U
open V
f t \<in> U
g t \<in> V
U \<inter> V = {}
[PROOF STEP]
show "\<exists>T. open T \<and> t \<in> T \<and> T \<subseteq> {x. f x \<noteq> g x}"
[PROOF STATE]
proof (prove)
using this:
open (f -` U)
open (g -` V)
open U
open V
f t \<in> U
g t \<in> V
U \<inter> V = {}

goal (1 subgoal):
 1. \<exists>T. open T \<and> t \<in> T \<and> T \<subseteq> {x. f x \<noteq> g x}
[PROOF STEP]
by (intro exI[of _ "f -` U \<inter> g -` V"]) auto
[PROOF STATE]
proof (state)
this:
\<exists>T. open T \<and> t \<in> T \<and> T \<subseteq> {x. f x \<noteq> g x}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in group) subgroups_Inter_pair :
  assumes  "subgroup I G"
    and  "subgroup J G"
  shows "subgroup (I\<inter>J) G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup (I \<inter> J) G
[PROOF STEP]
using subgroups_Inter[ where ?A = "{I,J}"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>H. H \<in> {I, J} \<Longrightarrow> subgroup H G; {I, J} \<noteq> {}\<rbrakk> \<Longrightarrow> subgroup (\<Inter> {I, J}) G
subgroup I G
subgroup J G

goal (1 subgoal):
 1. subgroup (I \<inter> J) G
[PROOF STEP]
by auto


[STATEMENT]
lemma open_vector_box: "\<forall>i. open (S i) \<Longrightarrow> open {x. \<forall>i. x $ i \<in> S i}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i. open (S i) \<Longrightarrow> open {x. \<forall>i. x $ i \<in> S i}
[PROOF STEP]
unfolding open_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i. open (S i) \<Longrightarrow> \<forall>x\<in>{x. \<forall>i. x $ i \<in> S i}. \<exists>A. (\<forall>i. open (A i) \<and> x $ i \<in> A i) \<and> (\<forall>y. (\<forall>i. y $ i \<in> A i) \<longrightarrow> y \<in> {x. \<forall>i. x $ i \<in> S i})
[PROOF STEP]
by auto


[STATEMENT]
lemma rank_take_cols_leq:
  assumes R:"R \<in> carrier_mat n nc"
  shows "rank (take_cols R ls) \<le> rank R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rank (take_cols R ls) \<le> rank R
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. rank (take_cols R ls) \<le> rank R
[PROOF STEP]
from take_cols_mat_mul[OF R]
[PROOF STATE]
proof (chain)
picking this:
?B \<in> carrier_mat nc ?nc \<Longrightarrow> R * take_cols ?B ?inds = take_cols (R * ?B) ?inds
[PROOF STEP]
have "take_cols R ls =  R * take_cols (1\<^sub>m nc) ls"
[PROOF STATE]
proof (prove)
using this:
?B \<in> carrier_mat nc ?nc \<Longrightarrow> R * take_cols ?B ?inds = take_cols (R * ?B) ?inds

goal (1 subgoal):
 1. take_cols R ls = R * take_cols (1\<^sub>m nc) ls
[PROOF STEP]
by (metis assms one_carrier_mat right_mult_one_mat)
[PROOF STATE]
proof (state)
this:
take_cols R ls = R * take_cols (1\<^sub>m nc) ls

goal (1 subgoal):
 1. rank (take_cols R ls) \<le> rank R
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
take_cols R ls = R * take_cols (1\<^sub>m nc) ls

goal (1 subgoal):
 1. rank (take_cols R ls) \<le> rank R
[PROOF STEP]
by (metis assms one_carrier_mat take_cols_carrier_mat vec_space.rank_mat_mul_right)
[PROOF STATE]
proof (state)
this:
rank (take_cols R ls) \<le> rank R

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma replicate_mset_Suc [simp]: "replicate_mset (Suc n) x = add_mset x (replicate_mset n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. replicate_mset (Suc n) x = add_mset x (replicate_mset n x)
[PROOF STEP]
unfolding replicate_mset_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (add_mset x ^^ Suc n) {#} = add_mset x ((add_mset x ^^ n) {#})
[PROOF STEP]
by (induct n) (auto intro: add.commute)


[STATEMENT]
theorem content_simplex:
  fixes X :: "(real ^ 'n :: {finite, wellorder}) set" and f :: "'n :: _ \<Rightarrow> real ^ ('n :: _)"
  assumes "finite X" "card X = Suc CARD('n)" and x0: "x0 \<in> X" and bij: "bij_betw f UNIV (X - {x0})"
  defines "M \<equiv> (\<chi> i. \<chi> j. f j $ i - x0 $ i)"
  shows "content (convex hull X) = \<bar>det M\<bar> / fact (CARD('n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
define g where "g = (\<lambda>x. M *v x)"
[PROOF STATE]
proof (state)
this:
g = (*v) M

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have [simp]: "M *v axis i 1 = f i - x0" for i :: 'n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M *v axis i 1 = f i - x0
[PROOF STEP]
by (simp add: M_def matrix_vector_mult_basis column_def vec_eq_iff)
[PROOF STATE]
proof (state)
this:
M *v axis ?i 1 = f ?i - x0

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
define std where "std = (convex hull insert 0 Basis :: (real ^ 'n :: _) set)"
[PROOF STATE]
proof (state)
this:
std = convex hull insert 0 Basis

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have compact: "compact std"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compact std
[PROOF STEP]
unfolding std_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compact (convex hull insert 0 Basis)
[PROOF STEP]
by (intro finite_imp_compact_convex_hull) auto
[PROOF STATE]
proof (state)
this:
compact std

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "measure lebesgue (convex hull X) = measure lebesgue (((+) (-x0)) ` (convex hull X))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure lebesgue (convex hull X) = Sigma_Algebra.measure lebesgue ((+) (- x0) ` (convex hull X))
[PROOF STEP]
by (rule measure_translation [symmetric])
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure lebesgue (convex hull X) = Sigma_Algebra.measure lebesgue ((+) (- x0) ` (convex hull X))

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure lebesgue (convex hull X) = Sigma_Algebra.measure lebesgue ((+) (- x0) ` (convex hull X))

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "((+) (-x0)) ` (convex hull X) = convex hull (((+) (-x0)) ` X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) (- x0) ` (convex hull X) = convex hull (+) (- x0) ` X
[PROOF STEP]
by (rule convex_hull_translation [symmetric])
[PROOF STATE]
proof (state)
this:
(+) (- x0) ` (convex hull X) = convex hull (+) (- x0) ` X

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(+) (- x0) ` (convex hull X) = convex hull (+) (- x0) ` X

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "((+) (-x0)) ` X = insert 0 ((\<lambda>x. x - x0) ` (X - {x0}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) (- x0) ` X = insert 0 ((\<lambda>x. x - x0) ` (X - {x0}))
[PROOF STEP]
using x0
[PROOF STATE]
proof (prove)
using this:
x0 \<in> X

goal (1 subgoal):
 1. (+) (- x0) ` X = insert 0 ((\<lambda>x. x - x0) ` (X - {x0}))
[PROOF STEP]
by (auto simp: image_iff)
[PROOF STATE]
proof (state)
this:
(+) (- x0) ` X = insert 0 ((\<lambda>x. x - x0) ` (X - {x0}))

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Sigma_Algebra.measure lebesgue (convex hull X) = Sigma_Algebra.measure lebesgue (convex hull insert 0 ((\<lambda>x. x - x0) ` (X - {x0})))
[PROOF STEP]
have eq: "measure lebesgue (convex hull X) = measure lebesgue (convex hull \<dots>)"
[PROOF STATE]
proof (prove)
using this:
Sigma_Algebra.measure lebesgue (convex hull X) = Sigma_Algebra.measure lebesgue (convex hull insert 0 ((\<lambda>x. x - x0) ` (X - {x0})))

goal (1 subgoal):
 1. Sigma_Algebra.measure lebesgue (convex hull X) = Sigma_Algebra.measure lebesgue (convex hull insert 0 ((\<lambda>x. x - x0) ` (X - {x0})))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure lebesgue (convex hull X) = Sigma_Algebra.measure lebesgue (convex hull insert 0 ((\<lambda>x. x - x0) ` (X - {x0})))

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
from compact
[PROOF STATE]
proof (chain)
picking this:
compact std
[PROOF STEP]
have "measure lebesgue (g ` std) = \<bar>det M\<bar> * measure lebesgue std"
[PROOF STATE]
proof (prove)
using this:
compact std

goal (1 subgoal):
 1. Sigma_Algebra.measure lebesgue (g ` std) = \<bar>det M\<bar> * Sigma_Algebra.measure lebesgue std
[PROOF STEP]
by (subst measure_lebesgue_linear_transformation)
       (auto intro: finite_imp_bounded_convex_hull dest: compact_imp_closed simp: g_def std_def)
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure lebesgue (g ` std) = \<bar>det M\<bar> * Sigma_Algebra.measure lebesgue std

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure lebesgue (g ` std) = \<bar>det M\<bar> * Sigma_Algebra.measure lebesgue std

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "measure lebesgue std = content std"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure lebesgue std = content std
[PROOF STEP]
using compact
[PROOF STATE]
proof (prove)
using this:
compact std

goal (1 subgoal):
 1. Sigma_Algebra.measure lebesgue std = content std
[PROOF STEP]
by (intro measure_completion) (auto dest: compact_imp_closed)
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure lebesgue std = content std

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure lebesgue std = content std

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "content std = 1 / fact CARD('n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content std = 1 / fact CARD('n)
[PROOF STEP]
unfolding std_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content (convex hull insert 0 Basis) = 1 / fact CARD('n)
[PROOF STEP]
by (simp add: content_std_simplex)
[PROOF STATE]
proof (state)
this:
content std = 1 / fact CARD('n)

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
content std = 1 / fact CARD('n)

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "g ` std = convex hull (g ` insert 0 Basis)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` std = convex hull g ` insert 0 Basis
[PROOF STEP]
unfolding std_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` (convex hull insert 0 Basis) = convex hull g ` insert 0 Basis
[PROOF STEP]
by (rule convex_hull_linear_image) (auto simp: g_def)
[PROOF STATE]
proof (state)
this:
g ` std = convex hull g ` insert 0 Basis

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
g ` std = convex hull g ` insert 0 Basis

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "g ` insert 0 Basis = insert 0 (g ` Basis)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` insert 0 Basis = insert 0 (g ` Basis)
[PROOF STEP]
by (auto simp: g_def)
[PROOF STATE]
proof (state)
this:
g ` insert 0 Basis = insert 0 (g ` Basis)

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
g ` insert 0 Basis = insert 0 (g ` Basis)

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "g ` Basis = (\<lambda>x. x - x0) ` range f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g ` Basis = (\<lambda>x. x - x0) ` range f
[PROOF STEP]
by (auto simp: g_def Basis_vec_def image_iff)
[PROOF STATE]
proof (state)
this:
g ` Basis = (\<lambda>x. x - x0) ` range f

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
g ` Basis = (\<lambda>x. x - x0) ` range f

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
have "range f = X - {x0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range f = X - {x0}
[PROOF STEP]
using bij
[PROOF STATE]
proof (prove)
using this:
bij_betw f UNIV (X - {x0})

goal (1 subgoal):
 1. range f = X - {x0}
[PROOF STEP]
using bij_betw_imp_surj_on
[PROOF STATE]
proof (prove)
using this:
bij_betw f UNIV (X - {x0})
bij_betw ?f ?A ?B \<Longrightarrow> ?f ` ?A = ?B

goal (1 subgoal):
 1. range f = X - {x0}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
range f = X - {x0}

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
range f = X - {x0}

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
note eq [symmetric]
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure lebesgue (convex hull insert 0 ((\<lambda>x. x - x0) ` (X - {x0}))) = Sigma_Algebra.measure lebesgue (convex hull X)

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Sigma_Algebra.measure lebesgue (convex hull X) = \<bar>det M\<bar> * (1 / fact CARD('n))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Sigma_Algebra.measure lebesgue (convex hull X) = \<bar>det M\<bar> * (1 / fact CARD('n))

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
using finite_imp_compact_convex_hull[OF \<open>finite X\<close>]
[PROOF STATE]
proof (prove)
using this:
Sigma_Algebra.measure lebesgue (convex hull X) = \<bar>det M\<bar> * (1 / fact CARD('n))
compact (convex hull X)

goal (1 subgoal):
 1. content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)
[PROOF STEP]
by (auto dest: compact_imp_closed)
[PROOF STATE]
proof (state)
this:
content (convex hull X) = \<bar>det M\<bar> / fact CARD('n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "simple_packet_set_toSet (simple_packet_set_union ps m) = simple_packet_set_toSet ps \<union> {p. simple_matches m p}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simple_packet_set_toSet (simple_packet_set_union ps m) = simple_packet_set_toSet ps \<union> {p. simple_matches m p}
[PROOF STEP]
unfolding simple_packet_set_toSet_def simple_packet_set_union_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {p. \<exists>m\<in>set (m # ps). simple_matches m p} = {p. \<exists>m\<in>set ps. simple_matches m p} \<union> {p. simple_matches m p}
[PROOF STEP]
by simp blast


[STATEMENT]
lemma change_eval_lt:
  fixes x y:: "real"
  assumes "((aEvalUni (LessUni (a,b,c)) x \<noteq> aEvalUni (LessUni (a,b,c)) y) \<and> x < y)"
  shows "(\<exists>w. x \<le> w \<and> w \<le> y \<and> a*w^2 + b*w + c = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
let ?p = "[:c, b, a:]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
have "sign ?p x \<noteq> sign ?p y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sign [:c, b, a:] x \<noteq> sign [:c, b, a:] y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
aEvalUni (LessUni (a, b, c)) x \<noteq> aEvalUni (LessUni (a, b, c)) y \<and> x < y

goal (1 subgoal):
 1. sign [:c, b, a:] x \<noteq> sign [:c, b, a:] y
[PROOF STEP]
unfolding sign_def
[PROOF STATE]
proof (prove)
using this:
aEvalUni (LessUni (a, b, c)) x \<noteq> aEvalUni (LessUni (a, b, c)) y \<and> x < y

goal (1 subgoal):
 1. (if poly [:c, b, a:] x = 0 then 0 else if 0 < poly [:c, b, a:] x then 1 else - 1) \<noteq> (if poly [:c, b, a:] y = 0 then 0 else if 0 < poly [:c, b, a:] y then 1 else - 1)
[PROOF STEP]
apply (simp add: distrib_left mult.commute mult.left_commute power2_eq_square)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a * (x * x) + b * x + c < 0) = (\<not> a * (y * y) + b * y + c < 0) \<and> x < y \<Longrightarrow> (0 < c + (b * x + a * (x * x)) \<longrightarrow> \<not> 0 < c + (b * y + a * (y * y))) \<and> (\<not> 0 < c + (b * x + a * (x * x)) \<longrightarrow> (c + (b * x + a * (x * x)) = 0 \<longrightarrow> \<not> 0 < c + (b * y + a * (y * y)) \<longrightarrow> c + (b * y + a * (y * y)) \<noteq> 0) \<and> (c + (b * x + a * (x * x)) \<noteq> 0 \<longrightarrow> \<not> 0 < c + (b * y + a * (y * y)) \<longrightarrow> c + (b * y + a * (y * y)) = 0))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
sign [:c, b, a:] x \<noteq> sign [:c, b, a:] y

goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sign [:c, b, a:] x \<noteq> sign [:c, b, a:] y
[PROOF STEP]
have "(\<exists>w \<in> (root_list ?p). x \<le> w \<and> w \<le> y)"
[PROOF STATE]
proof (prove)
using this:
sign [:c, b, a:] x \<noteq> sign [:c, b, a:] y

goal (1 subgoal):
 1. \<exists>w\<in>root_list [:c, b, a:]. x \<le> w \<and> w \<le> y
[PROOF STEP]
using changes_sign
      assms
[PROOF STATE]
proof (prove)
using this:
sign [:c, b, a:] x \<noteq> sign [:c, b, a:] y
\<forall>x y. sign ?p x \<noteq> sign ?p y \<and> x < y \<longrightarrow> (\<exists>c\<in>root_list ?p. x \<le> c \<and> c \<le> y)
aEvalUni (LessUni (a, b, c)) x \<noteq> aEvalUni (LessUni (a, b, c)) y \<and> x < y

goal (1 subgoal):
 1. \<exists>w\<in>root_list [:c, b, a:]. x \<le> w \<and> w \<le> y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>w\<in>root_list [:c, b, a:]. x \<le> w \<and> w \<le> y

goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>w\<in>root_list [:c, b, a:]. x \<le> w \<and> w \<le> y
[PROOF STEP]
obtain w where w_prop: "w \<in> (root_list ?p) \<and> x \<le> w \<and> w \<le> y"
[PROOF STATE]
proof (prove)
using this:
\<exists>w\<in>root_list [:c, b, a:]. x \<le> w \<and> w \<le> y

goal (1 subgoal):
 1. (\<And>w. w \<in> root_list [:c, b, a:] \<and> x \<le> w \<and> w \<le> y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<in> root_list [:c, b, a:] \<and> x \<le> w \<and> w \<le> y

goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
w \<in> root_list [:c, b, a:] \<and> x \<le> w \<and> w \<le> y
[PROOF STEP]
have "a*w^2 + b*w + c = 0"
[PROOF STATE]
proof (prove)
using this:
w \<in> root_list [:c, b, a:] \<and> x \<le> w \<and> w \<le> y

goal (1 subgoal):
 1. a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
unfolding root_list_def
[PROOF STATE]
proof (prove)
using this:
w \<in> {x. poly [:c, b, a:] x = 0} \<and> x \<le> w \<and> w \<le> y

goal (1 subgoal):
 1. a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
using add.commute distrib_right mult.assoc mult.commute power2_eq_square
[PROOF STATE]
proof (prove)
using this:
w \<in> {x. poly [:c, b, a:] x = 0} \<and> x \<le> w \<and> w \<le> y
?a + ?b = ?b + ?a
(?a + ?b) * ?c = ?a * ?c + ?b * ?c
?a * ?b * ?c = ?a * (?b * ?c)
?a * ?b = ?b * ?a
?a\<^sup>2 = ?a * ?a

goal (1 subgoal):
 1. a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
using quadratic_poly_eval
[PROOF STATE]
proof (prove)
using this:
w \<in> {x. poly [:c, b, a:] x = 0} \<and> x \<le> w \<and> w \<le> y
?a + ?b = ?b + ?a
(?a + ?b) * ?c = ?a * ?c + ?b * ?c
?a * ?b * ?c = ?a * (?b * ?c)
?a * ?b = ?b * ?a
?a\<^sup>2 = ?a * ?a
poly [:?c, ?b, ?a:] ?x = ?a * ?x\<^sup>2 + ?b * ?x + ?c

goal (1 subgoal):
 1. a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
a * w\<^sup>2 + b * w + c = 0

goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a * w\<^sup>2 + b * w + c = 0

goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
using w_prop
[PROOF STATE]
proof (prove)
using this:
a * w\<^sup>2 + b * w + c = 0
w \<in> root_list [:c, b, a:] \<and> x \<le> w \<and> w \<le> y

goal (1 subgoal):
 1. \<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>w\<ge>x. w \<le> y \<and> a * w\<^sup>2 + b * w + c = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_irrefl_trans_imp_wf: "finite r \<Longrightarrow> irrefl r \<Longrightarrow> trans r \<Longrightarrow> wf r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite r; irrefl r; trans r\<rbrakk> \<Longrightarrow> wf r
[PROOF STEP]
by (erule finite_acyclic_wf) (simp add: acyclic_irrefl)


[STATEMENT]
lemma spaceN_add [simp]:
  assumes "x \<in> space\<^sub>N N" "y \<in> space\<^sub>N N"
  shows "x + y \<in> space\<^sub>N N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x + y \<in> space\<^sub>N N
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x + y \<in> space\<^sub>N N
[PROOF STEP]
have "eNorm N x < \<infinity>" "eNorm N y < \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eNorm N x < \<infinity> &&& eNorm N y < \<infinity>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> space\<^sub>N N
y \<in> space\<^sub>N N

goal (1 subgoal):
 1. eNorm N x < \<infinity> &&& eNorm N y < \<infinity>
[PROOF STEP]
unfolding space\<^sub>N_def
[PROOF STATE]
proof (prove)
using this:
x \<in> {f. eNorm N f < \<infinity>}
y \<in> {f. eNorm N f < \<infinity>}

goal (1 subgoal):
 1. eNorm N x < \<infinity> &&& eNorm N y < \<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
eNorm N x < \<infinity>
eNorm N y < \<infinity>

goal (1 subgoal):
 1. x + y \<in> space\<^sub>N N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
eNorm N x < \<infinity>
eNorm N y < \<infinity>
[PROOF STEP]
have "defect N * eNorm N x + defect N * eNorm N y < \<infinity>"
[PROOF STATE]
proof (prove)
using this:
eNorm N x < \<infinity>
eNorm N y < \<infinity>

goal (1 subgoal):
 1. ennreal (defect N) * eNorm N x + ennreal (defect N) * eNorm N y < \<infinity>
[PROOF STEP]
by (simp add: ennreal_mult_less_top)
[PROOF STATE]
proof (state)
this:
ennreal (defect N) * eNorm N x + ennreal (defect N) * eNorm N y < \<infinity>

goal (1 subgoal):
 1. x + y \<in> space\<^sub>N N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ennreal (defect N) * eNorm N x + ennreal (defect N) * eNorm N y < \<infinity>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ennreal (defect N) * eNorm N x + ennreal (defect N) * eNorm N y < \<infinity>

goal (1 subgoal):
 1. x + y \<in> space\<^sub>N N
[PROOF STEP]
unfolding space\<^sub>N_def
[PROOF STATE]
proof (prove)
using this:
ennreal (defect N) * eNorm N x + ennreal (defect N) * eNorm N y < \<infinity>

goal (1 subgoal):
 1. x + y \<in> {f. eNorm N f < \<infinity>}
[PROOF STEP]
using eNorm_triangular_ineq[of N x y] le_less_trans
[PROOF STATE]
proof (prove)
using this:
ennreal (defect N) * eNorm N x + ennreal (defect N) * eNorm N y < \<infinity>
eNorm N (x + y) \<le> ennreal (defect N) * eNorm N x + ennreal (defect N) * eNorm N y
\<lbrakk>?x \<le> ?y; ?y < ?z\<rbrakk> \<Longrightarrow> ?x < ?z

goal (1 subgoal):
 1. x + y \<in> {f. eNorm N f < \<infinity>}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x + y \<in> space\<^sub>N N

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma multiplicity_characterization_nat:
  "S = {p. 0 < f (p::nat)} \<Longrightarrow> finite S \<Longrightarrow> \<forall>p\<in>S. prime p \<Longrightarrow> prime p \<Longrightarrow>
    n = (\<Prod>p\<in>S. p ^ f p) \<Longrightarrow> multiplicity p n = f p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S = {p. 0 < f p}; finite S; \<forall>p\<in>S. prime p; prime p; n = (\<Prod>p\<in>S. p ^ f p)\<rbrakk> \<Longrightarrow> multiplicity p n = f p
[PROOF STEP]
by (frule prime_factorization_unique_nat [of S f n, THEN conjunct2, rule_format, symmetric]) auto


[STATEMENT]
lemma fixed_degree_in_var_max_degree_monoms_in_var:
"max_degree_monoms_in_var R P i = fixed_degree_in_var R P i (degree_in_var R P i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max_degree_monoms_in_var R P i = fixed_degree_in_var R P i (degree_in_var R P i)
[PROOF STEP]
unfolding max_degree_monoms_in_var_def fixed_degree_in_var_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {m \<in> monomials_of R P. count m i = degree_in_var R P i} = {m \<in> monomials_of R P. count m i = degree_in_var R P i}
[PROOF STEP]
by auto


[STATEMENT]
lemma SUP_sup_continuous_ennreal:
  fixes f :: "ennreal \<Rightarrow> 'a::complete_lattice"
  assumes f: "sup_continuous f" and "I \<noteq> {}"
  shows "(SUP i\<in>I. f (g i)) = f (SUP i\<in>I. g i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i\<in>I. f (g i)) = f (Sup (g ` I))
[PROOF STEP]
proof (rule antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (SUP i\<in>I. f (g i)) \<le> f (Sup (g ` I))
 2. f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
show "(SUP i\<in>I. f (g i)) \<le> f (SUP i\<in>I. g i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i\<in>I. f (g i)) \<le> f (Sup (g ` I))
[PROOF STEP]
by (rule mono_SUP[OF sup_continuous_mono[OF f]])
[PROOF STATE]
proof (state)
this:
(SUP i\<in>I. f (g i)) \<le> f (Sup (g ` I))

goal (1 subgoal):
 1. f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
from ennreal_Sup_countable_SUP[of "g`I"] \<open>I \<noteq> {}\<close>
[PROOF STATE]
proof (chain)
picking this:
g ` I \<noteq> {} \<Longrightarrow> \<exists>f. incseq f \<and> range f \<subseteq> g ` I \<and> Sup (g ` I) = Sup (range f)
I \<noteq> {}
[PROOF STEP]
obtain M :: "nat \<Rightarrow> ennreal" where "incseq M" and M: "range M \<subseteq> g ` I" and eq: "(SUP i \<in> I. g i) = (SUP i. M i)"
[PROOF STATE]
proof (prove)
using this:
g ` I \<noteq> {} \<Longrightarrow> \<exists>f. incseq f \<and> range f \<subseteq> g ` I \<and> Sup (g ` I) = Sup (range f)
I \<noteq> {}

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>incseq M; range M \<subseteq> g ` I; Sup (g ` I) = Sup (range M)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
incseq M
range M \<subseteq> g ` I
Sup (g ` I) = Sup (range M)

goal (1 subgoal):
 1. f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
have "f (SUP i \<in> I. g i) = (SUP i \<in> range M. f i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (Sup (g ` I)) = Sup (f ` range M)
[PROOF STEP]
unfolding eq sup_continuousD[OF f \<open>mono M\<close>]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i. f (M i)) = Sup (f ` range M)
[PROOF STEP]
by (simp add: image_comp)
[PROOF STATE]
proof (state)
this:
f (Sup (g ` I)) = Sup (f ` range M)

goal (1 subgoal):
 1. f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f (Sup (g ` I)) = Sup (f ` range M)

goal (1 subgoal):
 1. f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
have "\<dots> \<le> (SUP i \<in> I. f (g i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup (f ` range M) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
by (insert M, drule SUP_subset_mono) (auto simp add: image_comp)
[PROOF STATE]
proof (state)
this:
Sup (f ` range M) \<le> (SUP i\<in>I. f (g i))

goal (1 subgoal):
 1. f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
show "f (SUP i \<in> I. g i) \<le> (SUP i \<in> I. f (g i))"
[PROOF STATE]
proof (prove)
using this:
f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))

goal (1 subgoal):
 1. f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
f (Sup (g ` I)) \<le> (SUP i\<in>I. f (g i))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lattice_of_HNF:
  assumes sound_HNF: "is_sound_HNF HNF associates res"
    and P1_H1: "(P,H) = HNF (mat_of_rows n fs)"
    and fs: "set fs \<subseteq> carrier_vec n" and len: "length fs = m"
  shows "lattice_of fs = lattice_of (rows H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lattice_of fs = lattice_of (rows H)
[PROOF STEP]
proof (rule mat_mult_invertible_lattice_eq[OF fs])
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. set (rows H) \<subseteq> carrier_vec n
 2. ?P \<in> carrier_mat ?m ?m
 3. invertible_mat ?P
 4. length fs = ?m
 5. length (rows H) = ?m
 6. mat_of_rows n fs = of_int_hom.mat_hom ?P * mat_of_rows n (rows H)
[PROOF STEP]
have H: "H \<in> carrier_mat m n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H \<in> carrier_mat m n
[PROOF STEP]
using sound_HNF P1_H1
[PROOF STATE]
proof (prove)
using this:
is_sound_HNF HNF associates res
(P, H) = HNF (mat_of_rows n fs)

goal (1 subgoal):
 1. H \<in> carrier_mat m n
[PROOF STEP]
unfolding is_sound_HNF_def Let_def
[PROOF STATE]
proof (prove)
using this:
\<forall>A. case HNF A of (P, H) \<Rightarrow> P \<in> carrier_mat (dim_row A) (dim_row A) \<and> H \<in> carrier_mat (dim_row A) (dim_col A) \<and> invertible_mat P \<and> A = P * H \<and> Hermite_JNF associates res H
(P, H) = HNF (mat_of_rows n fs)

goal (1 subgoal):
 1. H \<in> carrier_mat m n
[PROOF STEP]
by (metis (mono_tags, lifting) assms(4) mat_of_rows_carrier(2) mat_of_rows_carrier(3) prod.sel(2) split_beta)
[PROOF STATE]
proof (state)
this:
H \<in> carrier_mat m n

goal (6 subgoals):
 1. set (rows H) \<subseteq> carrier_vec n
 2. ?P \<in> carrier_mat ?m ?m
 3. invertible_mat ?P
 4. length fs = ?m
 5. length (rows H) = ?m
 6. mat_of_rows n fs = of_int_hom.mat_hom ?P * mat_of_rows n (rows H)
[PROOF STEP]
have H_rw: "mat_of_rows n (Matrix.rows H) = H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_of_rows n (rows H) = H
[PROOF STEP]
using mat_of_rows_rows H
[PROOF STATE]
proof (prove)
using this:
mat_of_rows (dim_col ?A) (rows ?A) = ?A
H \<in> carrier_mat m n

goal (1 subgoal):
 1. mat_of_rows n (rows H) = H
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
mat_of_rows n (rows H) = H

goal (6 subgoals):
 1. set (rows H) \<subseteq> carrier_vec n
 2. ?P \<in> carrier_mat ?m ?m
 3. invertible_mat ?P
 4. length fs = ?m
 5. length (rows H) = ?m
 6. mat_of_rows n fs = of_int_hom.mat_hom ?P * mat_of_rows n (rows H)
[PROOF STEP]
have PH_fs_init: "mat_of_rows n fs = P * H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_of_rows n fs = P * H
[PROOF STEP]
using sound_HNF P1_H1
[PROOF STATE]
proof (prove)
using this:
is_sound_HNF HNF associates res
(P, H) = HNF (mat_of_rows n fs)

goal (1 subgoal):
 1. mat_of_rows n fs = P * H
[PROOF STEP]
unfolding is_sound_HNF_def Let_def
[PROOF STATE]
proof (prove)
using this:
\<forall>A. case HNF A of (P, H) \<Rightarrow> P \<in> carrier_mat (dim_row A) (dim_row A) \<and> H \<in> carrier_mat (dim_row A) (dim_col A) \<and> invertible_mat P \<and> A = P * H \<and> Hermite_JNF associates res H
(P, H) = HNF (mat_of_rows n fs)

goal (1 subgoal):
 1. mat_of_rows n fs = P * H
[PROOF STEP]
by (metis (mono_tags, lifting) case_prodD)
[PROOF STATE]
proof (state)
this:
mat_of_rows n fs = P * H

goal (6 subgoals):
 1. set (rows H) \<subseteq> carrier_vec n
 2. ?P \<in> carrier_mat ?m ?m
 3. invertible_mat ?P
 4. length fs = ?m
 5. length (rows H) = ?m
 6. mat_of_rows n fs = of_int_hom.mat_hom ?P * mat_of_rows n (rows H)
[PROOF STEP]
show "mat_of_rows n fs = of_int_hom.mat_hom P * mat_of_rows n (Matrix.rows H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_of_rows n fs = of_int_hom.mat_hom P * mat_of_rows n (rows H)
[PROOF STEP]
unfolding H_rw of_int_mat_hom_int_id
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_of_rows n fs = P * H
[PROOF STEP]
using PH_fs_init
[PROOF STATE]
proof (prove)
using this:
mat_of_rows n fs = P * H

goal (1 subgoal):
 1. mat_of_rows n fs = P * H
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
mat_of_rows n fs = of_int_hom.mat_hom P * mat_of_rows n (rows H)

goal (5 subgoals):
 1. set (rows H) \<subseteq> carrier_vec n
 2. P \<in> carrier_mat ?m ?m
 3. invertible_mat P
 4. length fs = ?m
 5. length (rows H) = ?m
[PROOF STEP]
show "set (Matrix.rows H) \<subseteq> carrier_vec n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (rows H) \<subseteq> carrier_vec n
[PROOF STEP]
using H rows_carrier
[PROOF STATE]
proof (prove)
using this:
H \<in> carrier_mat m n
set (rows ?A) \<subseteq> carrier_vec (dim_col ?A)

goal (1 subgoal):
 1. set (rows H) \<subseteq> carrier_vec n
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
set (rows H) \<subseteq> carrier_vec n

goal (4 subgoals):
 1. P \<in> carrier_mat ?m ?m
 2. invertible_mat P
 3. length fs = ?m
 4. length (rows H) = ?m
[PROOF STEP]
show "P \<in> carrier_mat m m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<in> carrier_mat m m
[PROOF STEP]
using sound_HNF P1_H1
[PROOF STATE]
proof (prove)
using this:
is_sound_HNF HNF associates res
(P, H) = HNF (mat_of_rows n fs)

goal (1 subgoal):
 1. P \<in> carrier_mat m m
[PROOF STEP]
unfolding is_sound_HNF_def Let_def
[PROOF STATE]
proof (prove)
using this:
\<forall>A. case HNF A of (P, H) \<Rightarrow> P \<in> carrier_mat (dim_row A) (dim_row A) \<and> H \<in> carrier_mat (dim_row A) (dim_col A) \<and> invertible_mat P \<and> A = P * H \<and> Hermite_JNF associates res H
(P, H) = HNF (mat_of_rows n fs)

goal (1 subgoal):
 1. P \<in> carrier_mat m m
[PROOF STEP]
by (metis (no_types, lifting) len case_prodD mat_of_rows_carrier(2))
[PROOF STATE]
proof (state)
this:
P \<in> carrier_mat m m

goal (3 subgoals):
 1. invertible_mat P
 2. length fs = m
 3. length (rows H) = m
[PROOF STEP]
show "invertible_mat P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invertible_mat P
[PROOF STEP]
using sound_HNF P1_H1
[PROOF STATE]
proof (prove)
using this:
is_sound_HNF HNF associates res
(P, H) = HNF (mat_of_rows n fs)

goal (1 subgoal):
 1. invertible_mat P
[PROOF STEP]
unfolding is_sound_HNF_def Let_def
[PROOF STATE]
proof (prove)
using this:
\<forall>A. case HNF A of (P, H) \<Rightarrow> P \<in> carrier_mat (dim_row A) (dim_row A) \<and> H \<in> carrier_mat (dim_row A) (dim_col A) \<and> invertible_mat P \<and> A = P * H \<and> Hermite_JNF associates res H
(P, H) = HNF (mat_of_rows n fs)

goal (1 subgoal):
 1. invertible_mat P
[PROOF STEP]
by (metis (no_types, lifting) case_prodD)
[PROOF STATE]
proof (state)
this:
invertible_mat P

goal (2 subgoals):
 1. length fs = m
 2. length (rows H) = m
[PROOF STEP]
show "length fs = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length fs = m
[PROOF STEP]
using len
[PROOF STATE]
proof (prove)
using this:
length fs = m

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

goal (1 subgoal):
 1. length (rows H) = m
[PROOF STEP]
show "length (Matrix.rows H) = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (rows H) = m
[PROOF STEP]
using H
[PROOF STATE]
proof (prove)
using this:
H \<in> carrier_mat m n

goal (1 subgoal):
 1. length (rows H) = m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
length (rows H) = m

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Sup_nat_less_sets_singleton:
  fixes n::nat
  assumes "Sup T < n" "finite T"
  shows "less_sets T {n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T \<lless> {n}
[PROOF STEP]
using assms Max_less_iff
[PROOF STATE]
proof (prove)
using this:
Sup T < n
finite T
\<lbrakk>finite ?A; ?A \<noteq> {}\<rbrakk> \<Longrightarrow> (Max ?A < ?x) = (\<forall>a\<in>?A. a < ?x)

goal (1 subgoal):
 1. T \<lless> {n}
[PROOF STEP]
by (auto simp: Sup_nat_def less_sets_def split: if_split_asm)


[STATEMENT]
lemma dim_factorization_lattice_element:
  assumes "x \<in> set (factorization_lattice u d m)" shows "dim_vec x = degree u + d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec x = degree u + d
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> set (factorization_lattice u d m)

goal (1 subgoal):
 1. dim_vec x = degree u + d
[PROOF STEP]
by (auto simp: factorization_lattice_def Let_def)


[STATEMENT]
lemma word_integer_eq:
  "word_of_integer (integer_of_word w) = w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. word_of_integer (integer_of_word w) = w
[PROOF STEP]
unfolding word_of_integer_def integer_of_word_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. word_of_int (int_of_integer (integer_of_int (uint w))) = w
[PROOF STEP]
by (metis int_of_integer_of_int integer_of_int_eq_of_int word_uint.Rep_inverse')


[STATEMENT]
lemma Log_powreal_cancel [simp]:
  "\<lbrakk> 0 < a; a \<noteq> 1 \<rbrakk> \<Longrightarrow> Log a (a pow\<^sub>\<real> y) = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a; a \<noteq> 1\<rbrakk> \<Longrightarrow> Log a (a pow\<^sub>\<real> y) = y
[PROOF STEP]
by (metis powreal_ex1_eq powreal_gt_zero powreal_Log_cancel)


[STATEMENT]
lemma frechet_derivative_eq_vector_derivative:
  assumes "f differentiable (at x)"
    shows  "(frechet_derivative f (at x)) = (\<lambda>r. r *\<^sub>R vector_derivative f (at x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frechet_derivative f (at x) = (\<lambda>r. r *\<^sub>R vector_derivative f (at x))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f differentiable at x

goal (1 subgoal):
 1. frechet_derivative f (at x) = (\<lambda>r. r *\<^sub>R vector_derivative f (at x))
[PROOF STEP]
by (auto simp: differentiable_iff_scaleR vector_derivative_def has_vector_derivative_def
         intro: someI frechet_derivative_at [symmetric])


[STATEMENT]
lemma sumset_singletons_eq:
  assumes "a \<in> G" and "b \<in> G"
  shows "sumset {a} {b} = {a \<oplus> b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sumset {a} {b} = {a \<oplus> b}
[PROOF STEP]
using assms sumset.simps subset_antisym
[PROOF STATE]
proof (prove)
using this:
a \<in> G
b \<in> G
(?a \<in> sumset ?A ?B) = (\<exists>a b. ?a = a \<oplus> b \<and> a \<in> ?A \<and> a \<in> G \<and> b \<in> ?B \<and> b \<in> G)
\<lbrakk>?A \<subseteq> ?B; ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> ?A = ?B

goal (1 subgoal):
 1. sumset {a} {b} = {a \<oplus> b}
[PROOF STEP]
by auto


[STATEMENT]
lemma Gcd_fin_mult:
  "Gcd\<^sub>f\<^sub>i\<^sub>n (image (times b) A) = normalize (b * Gcd\<^sub>f\<^sub>i\<^sub>n A)" if "finite A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gcd\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Gcd\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. Gcd\<^sub>f\<^sub>i\<^sub>n ((*) b ` A) = normalize (b * Gcd\<^sub>f\<^sub>i\<^sub>n A)
[PROOF STEP]
by induction (auto simp: gcd_mult_left)


[STATEMENT]
lemma field_differentiable_mult [derivative_intros]:
  assumes "f field_differentiable (at a within S)"
          "g field_differentiable (at a within S)"
    shows "(\<lambda>z. f z * g z) field_differentiable (at a within S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>z. f z * g z) field_differentiable at a within S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f field_differentiable at a within S
g field_differentiable at a within S

goal (1 subgoal):
 1. (\<lambda>z. f z * g z) field_differentiable at a within S
[PROOF STEP]
unfolding field_differentiable_def
[PROOF STATE]
proof (prove)
using this:
\<exists>f'. (f has_field_derivative f') (at a within S)
\<exists>f'. (g has_field_derivative f') (at a within S)

goal (1 subgoal):
 1. \<exists>f'. ((\<lambda>z. f z * g z) has_field_derivative f') (at a within S)
[PROOF STEP]
by (metis DERIV_mult [of f _ a S g])


[STATEMENT]
lemma SNF_first_divides:
  assumes SNF_A: "Smith_normal_form_mat A" and "(A::('a::comm_ring_1) mat) \<in> carrier_mat n m"
  and i: "i < min (dim_row A) (dim_col A)"
shows "A $$ (0,0) dvd A $$ (i,i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $$ (0, 0) dvd A $$ (i, i)
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
i < min (dim_row A) (dim_col A)

goal (1 subgoal):
 1. A $$ (0, 0) dvd A $$ (i, i)
[PROOF STEP]
proof (induct i)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < min (dim_row A) (dim_col A) \<Longrightarrow> A $$ (0, 0) dvd A $$ (0, 0)
 2. \<And>i. \<lbrakk>i < min (dim_row A) (dim_col A) \<Longrightarrow> A $$ (0, 0) dvd A $$ (i, i); Suc i < min (dim_row A) (dim_col A)\<rbrakk> \<Longrightarrow> A $$ (0, 0) dvd A $$ (Suc i, Suc i)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
0 < min (dim_row A) (dim_col A)

goal (2 subgoals):
 1. 0 < min (dim_row A) (dim_col A) \<Longrightarrow> A $$ (0, 0) dvd A $$ (0, 0)
 2. \<And>i. \<lbrakk>i < min (dim_row A) (dim_col A) \<Longrightarrow> A $$ (0, 0) dvd A $$ (i, i); Suc i < min (dim_row A) (dim_col A)\<rbrakk> \<Longrightarrow> A $$ (0, 0) dvd A $$ (Suc i, Suc i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < min (dim_row A) (dim_col A)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
0 < min (dim_row A) (dim_col A)

goal (1 subgoal):
 1. A $$ (0, 0) dvd A $$ (0, 0)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
A $$ (0, 0) dvd A $$ (0, 0)

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i < min (dim_row A) (dim_col A) \<Longrightarrow> A $$ (0, 0) dvd A $$ (i, i); Suc i < min (dim_row A) (dim_col A)\<rbrakk> \<Longrightarrow> A $$ (0, 0) dvd A $$ (Suc i, Suc i)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>i < min (dim_row A) (dim_col A) \<Longrightarrow> A $$ (0, 0) dvd A $$ (i, i); Suc i < min (dim_row A) (dim_col A)\<rbrakk> \<Longrightarrow> A $$ (0, 0) dvd A $$ (Suc i, Suc i)
[PROOF STEP]
case (Suc i)
[PROOF STATE]
proof (state)
this:
i < min (dim_row A) (dim_col A) \<Longrightarrow> A $$ (0, 0) dvd A $$ (i, i)
Suc i < min (dim_row A) (dim_col A)

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i < min (dim_row A) (dim_col A) \<Longrightarrow> A $$ (0, 0) dvd A $$ (i, i); Suc i < min (dim_row A) (dim_col A)\<rbrakk> \<Longrightarrow> A $$ (0, 0) dvd A $$ (Suc i, Suc i)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $$ (0, 0) dvd A $$ (Suc i, Suc i)
[PROOF STEP]
by (metis (full_types) Smith_normal_form_mat_def Suc.hyps Suc.prems
        Suc_eq_plus1 Suc_lessD SNF_A dvd_trans)
[PROOF STATE]
proof (state)
this:
A $$ (0, 0) dvd A $$ (Suc i, Suc i)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma to_fun_X_minus[simp]:
  assumes "a \<in> carrier R"
  assumes "b \<in> carrier R"
  shows "to_fun (X_minus a) b = b \<ominus> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_fun (X_poly_minus R a) b = b \<ominus> a
[PROOF STEP]
using to_fun_X_plus[of "\<ominus> a" b] X_minus_plus[of a] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<ominus> a \<in> carrier R; b \<in> carrier R\<rbrakk> \<Longrightarrow> to_fun (X_poly_plus R (\<ominus> a)) b = b \<oplus> \<ominus> a
a \<in> carrier R \<Longrightarrow> X_poly_minus R a = X_poly_plus R (\<ominus> a)
a \<in> carrier R
b \<in> carrier R

goal (1 subgoal):
 1. to_fun (X_poly_minus R a) b = b \<ominus> a
[PROOF STEP]
by (simp add: R.minus_eq)


[STATEMENT]
lemma space_Sup_measure'2: "space (Sup_measure' M) = (\<Union>m\<in>M. space m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space (local.Sup_measure' M) = \<Union> (space ` M)
[PROOF STEP]
unfolding Sup_measure'_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space (measure_of (\<Union> (space ` M)) (\<Union> (sets ` M)) (\<lambda>X. SUP P\<in>{P. finite P \<and> P \<subseteq> M}. emeasure (sup_measure.F id P) X)) = \<Union> (space ` M)
[PROOF STEP]
by (intro space_measure_of[OF UN_space_closed])


[STATEMENT]
lemma Liminf_min_eq_min_Liminf:
  fixes u v::"nat \<Rightarrow> 'a::complete_linorder"
  shows "Liminf F (\<lambda>n. min (u n) (v n)) = min (Liminf F u) (Liminf F v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Liminf F (\<lambda>n. min (u n) (v n)) = min (Liminf F u) (Liminf F v)
[PROOF STEP]
proof (rule order_antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Liminf F (\<lambda>n. min (u n) (v n)) \<le> min (Liminf F u) (Liminf F v)
 2. min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
show "Liminf F (\<lambda>n. min (u n) (v n)) \<le> min (Liminf F u) (Liminf F v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Liminf F (\<lambda>n. min (u n) (v n)) \<le> min (Liminf F u) (Liminf F v)
[PROOF STEP]
by (auto simp add: Liminf_mono)
[PROOF STATE]
proof (state)
this:
Liminf F (\<lambda>n. min (u n) (v n)) \<le> min (Liminf F u) (Liminf F v)

goal (1 subgoal):
 1. min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
have "Liminf F (\<lambda>n. min (u n) (v n)) > w" if H: "min (Liminf F u) (Liminf F v) > w" for w
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
proof (cases "{w<..<min (Liminf F u) (Liminf F v)} = {}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {w<..<min (Liminf F u) (Liminf F v)} = {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
 2. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
{w<..<min (Liminf F u) (Liminf F v)} = {}

goal (2 subgoals):
 1. {w<..<min (Liminf F u) (Liminf F v)} = {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
 2. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
have "eventually (\<lambda>n. u n > w) F" "eventually (\<lambda>n. v n > w) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. w < u n &&& \<forall>\<^sub>F n in F. w < v n
[PROOF STEP]
using H le_Liminf_iff
[PROOF STATE]
proof (prove)
using this:
w < min (Liminf F u) (Liminf F v)
(?C \<le> Liminf ?F ?X) = (\<forall>y<?C. \<forall>\<^sub>F x in ?F. y < ?X x)

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. w < u n &&& \<forall>\<^sub>F n in F. w < v n
[PROOF STEP]
by fastforce+
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. w < u n
\<forall>\<^sub>F n in F. w < v n

goal (2 subgoals):
 1. {w<..<min (Liminf F u) (Liminf F v)} = {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
 2. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. w < u n
\<forall>\<^sub>F n in F. w < v n
[PROOF STEP]
have "eventually (\<lambda>n. min (u n) (v n) > w) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. w < u n
\<forall>\<^sub>F n in F. w < v n

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. w < min (u n) (v n)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>\<^sub>F n in F. w < u n; \<forall>\<^sub>F n in F. w < v n\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F n in F. w < u n \<and> w < v n
[PROOF STEP]
using eventually_elim2
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>eventually ?P ?F; eventually ?Q ?F; \<And>i. \<lbrakk>?P i; ?Q i\<rbrakk> \<Longrightarrow> ?R i\<rbrakk> \<Longrightarrow> eventually ?R ?F

goal (1 subgoal):
 1. \<lbrakk>\<forall>\<^sub>F n in F. w < u n; \<forall>\<^sub>F n in F. w < v n\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F n in F. w < u n \<and> w < v n
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. w < min (u n) (v n)

goal (2 subgoals):
 1. {w<..<min (Liminf F u) (Liminf F v)} = {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
 2. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. w < min (u n) (v n)

goal (2 subgoals):
 1. {w<..<min (Liminf F u) (Liminf F v)} = {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
 2. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
have "z > w \<Longrightarrow> z \<ge> min (Liminf F u) (Liminf F v)" for z
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w < z \<Longrightarrow> min (Liminf F u) (Liminf F v) \<le> z
[PROOF STEP]
using H True not_le_imp_less
[PROOF STATE]
proof (prove)
using this:
w < min (Liminf F u) (Liminf F v)
{w<..<min (Liminf F u) (Liminf F v)} = {}
\<not> ?y \<le> ?x \<Longrightarrow> ?x < ?y

goal (1 subgoal):
 1. w < z \<Longrightarrow> min (Liminf F u) (Liminf F v) \<le> z
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
w < ?z \<Longrightarrow> min (Liminf F u) (Liminf F v) \<le> ?z

goal (2 subgoals):
 1. {w<..<min (Liminf F u) (Liminf F v)} = {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
 2. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. w < min (u n) (v n)
w < ?z \<Longrightarrow> min (Liminf F u) (Liminf F v) \<le> ?z
[PROOF STEP]
have "eventually (\<lambda>n. min (u n) (v n) \<ge> min (Liminf F u) (Liminf F v)) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. w < min (u n) (v n)
w < ?z \<Longrightarrow> min (Liminf F u) (Liminf F v) \<le> ?z

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. min (Liminf F u) (Liminf F v) \<le> min (u n) (v n)
[PROOF STEP]
by (simp add: eventually_mono)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. min (Liminf F u) (Liminf F v) \<le> min (u n) (v n)

goal (2 subgoals):
 1. {w<..<min (Liminf F u) (Liminf F v)} = {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
 2. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. min (Liminf F u) (Liminf F v) \<le> min (u n) (v n)
[PROOF STEP]
have "min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. min (Liminf F u) (Liminf F v) \<le> min (u n) (v n)

goal (1 subgoal):
 1. min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
by (metis Liminf_bounded)
[PROOF STATE]
proof (state)
this:
min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))

goal (2 subgoals):
 1. {w<..<min (Liminf F u) (Liminf F v)} = {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
 2. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))

goal (1 subgoal):
 1. w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
using H less_le_trans
[PROOF STATE]
proof (prove)
using this:
min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))
w < min (Liminf F u) (Liminf F v)
\<lbrakk>?x < ?y; ?y \<le> ?z\<rbrakk> \<Longrightarrow> ?x < ?z

goal (1 subgoal):
 1. w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
w < Liminf F (\<lambda>n. min (u n) (v n))

goal (1 subgoal):
 1. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
{w<..<min (Liminf F u) (Liminf F v)} \<noteq> {}

goal (1 subgoal):
 1. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{w<..<min (Liminf F u) (Liminf F v)} \<noteq> {}
[PROOF STEP]
obtain z where "z \<in> {w<..<min (Liminf F u) (Liminf F v)}"
[PROOF STATE]
proof (prove)
using this:
{w<..<min (Liminf F u) (Liminf F v)} \<noteq> {}

goal (1 subgoal):
 1. (\<And>z. z \<in> {w<..<min (Liminf F u) (Liminf F v)} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z \<in> {w<..<min (Liminf F u) (Liminf F v)}

goal (1 subgoal):
 1. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<in> {w<..<min (Liminf F u) (Liminf F v)}
[PROOF STEP]
have H: "w < z" "z < min (Liminf F u) (Liminf F v)"
[PROOF STATE]
proof (prove)
using this:
z \<in> {w<..<min (Liminf F u) (Liminf F v)}

goal (1 subgoal):
 1. w < z &&& z < min (Liminf F u) (Liminf F v)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w < z
z < min (Liminf F u) (Liminf F v)

goal (1 subgoal):
 1. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
w < z
z < min (Liminf F u) (Liminf F v)
[PROOF STEP]
have "eventually (\<lambda>n. u n > z) F" "eventually (\<lambda>n. v n > z) F"
[PROOF STATE]
proof (prove)
using this:
w < z
z < min (Liminf F u) (Liminf F v)

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. z < u n &&& \<forall>\<^sub>F n in F. z < v n
[PROOF STEP]
using le_Liminf_iff
[PROOF STATE]
proof (prove)
using this:
w < z
z < min (Liminf F u) (Liminf F v)
(?C \<le> Liminf ?F ?X) = (\<forall>y<?C. \<forall>\<^sub>F x in ?F. y < ?X x)

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. z < u n &&& \<forall>\<^sub>F n in F. z < v n
[PROOF STEP]
by fastforce+
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. z < u n
\<forall>\<^sub>F n in F. z < v n

goal (1 subgoal):
 1. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. z < u n
\<forall>\<^sub>F n in F. z < v n
[PROOF STEP]
have "eventually (\<lambda>n. min (u n) (v n) > z) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. z < u n
\<forall>\<^sub>F n in F. z < v n

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. z < min (u n) (v n)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>\<^sub>F n in F. z < u n; \<forall>\<^sub>F n in F. z < v n\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F n in F. z < u n \<and> z < v n
[PROOF STEP]
using eventually_elim2
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>eventually ?P ?F; eventually ?Q ?F; \<And>i. \<lbrakk>?P i; ?Q i\<rbrakk> \<Longrightarrow> ?R i\<rbrakk> \<Longrightarrow> eventually ?R ?F

goal (1 subgoal):
 1. \<lbrakk>\<forall>\<^sub>F n in F. z < u n; \<forall>\<^sub>F n in F. z < v n\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F n in F. z < u n \<and> z < v n
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. z < min (u n) (v n)

goal (1 subgoal):
 1. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. z < min (u n) (v n)
[PROOF STEP]
have "Liminf F (\<lambda>n. min (u n) (v n)) \<ge> z"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. z < min (u n) (v n)

goal (1 subgoal):
 1. z \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
by (simp add: Liminf_bounded eventually_mono less_imp_le)
[PROOF STATE]
proof (state)
this:
z \<le> Liminf F (\<lambda>n. min (u n) (v n))

goal (1 subgoal):
 1. {w<..<min (Liminf F u) (Liminf F v)} \<noteq> {} \<Longrightarrow> w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
z \<le> Liminf F (\<lambda>n. min (u n) (v n))

goal (1 subgoal):
 1. w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
using H(1)
[PROOF STATE]
proof (prove)
using this:
z \<le> Liminf F (\<lambda>n. min (u n) (v n))
w < z

goal (1 subgoal):
 1. w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w < Liminf F (\<lambda>n. min (u n) (v n))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?w < min (Liminf F u) (Liminf F v) \<Longrightarrow> ?w < Liminf F (\<lambda>n. min (u n) (v n))

goal (1 subgoal):
 1. min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?w < min (Liminf F u) (Liminf F v) \<Longrightarrow> ?w < Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
show "min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))"
[PROOF STATE]
proof (prove)
using this:
?w < min (Liminf F u) (Liminf F v) \<Longrightarrow> ?w < Liminf F (\<lambda>n. min (u n) (v n))

goal (1 subgoal):
 1. min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
using not_le_imp_less
[PROOF STATE]
proof (prove)
using this:
?w < min (Liminf F u) (Liminf F v) \<Longrightarrow> ?w < Liminf F (\<lambda>n. min (u n) (v n))
\<not> ?y \<le> ?x \<Longrightarrow> ?x < ?y

goal (1 subgoal):
 1. min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
min (Liminf F u) (Liminf F v) \<le> Liminf F (\<lambda>n. min (u n) (v n))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Aleph_csquare_eq [simp]: "\<aleph>\<alpha> \<otimes> \<aleph>\<alpha> = \<aleph>\<alpha>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<aleph>\<alpha> \<otimes> \<aleph>\<alpha> = \<aleph>\<alpha>
[PROOF STEP]
using InfCard_csquare_eq
[PROOF STATE]
proof (prove)
using this:
InfCard ?\<kappa> \<Longrightarrow> ?\<kappa> \<otimes> ?\<kappa> = ?\<kappa>

goal (1 subgoal):
 1. \<aleph>\<alpha> \<otimes> \<aleph>\<alpha> = \<aleph>\<alpha>
[PROOF STEP]
by auto


[STATEMENT]
lemma io_targets_code[code] : "io_targets M io q = image (target q) (paths_for_io M q io)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. io_targets M io q = target q ` paths_for_io M q io
[PROOF STEP]
unfolding io_targets.simps paths_for_io_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {target q p |p. path M q p \<and> p_io p = io} = target q ` {p. path M q p \<and> p_io p = io}
[PROOF STEP]
by blast


[STATEMENT]
lemma injective_open_imp_embedding_map:
   "\<lbrakk>continuous_map X Y f; open_map X Y f; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> embedding_map X Y f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_map X Y f; open_map X Y f; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> embedding_map X Y f
[PROOF STEP]
unfolding embedding_map_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_map X Y f; open_map X Y f; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> homeomorphic_map X (subtopology Y (f ` topspace X)) f
[PROOF STEP]
by (simp add: continuous_map_in_subtopology continuous_open_quotient_map eq_iff homeomorphic_map_def open_map_imp_subset open_map_into_subtopology)


[STATEMENT]
lemma nat_mirror_diff: "
  \<lbrakk> k \<le> n; n \<le> l + r \<rbrakk> \<Longrightarrow>
  nat_mirror (n - k) l r = (nat_mirror n l r) + k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>k \<le> n; n \<le> l + r\<rbrakk> \<Longrightarrow> nat_mirror (n - k) l r = nat_mirror n l r + k
[PROOF STEP]
unfolding nat_mirror_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>k \<le> n; n \<le> l + r\<rbrakk> \<Longrightarrow> l + r - (n - k) = l + r - n + k
[PROOF STEP]
by simp


[STATEMENT]
lemma fds_right_inverse:
  "fds_nth f 1 \<noteq> (0 :: 'a :: field) \<Longrightarrow> f * inverse f = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_nth f 1 \<noteq> (0::'a) \<Longrightarrow> f * inverse f = 1
[PROOF STEP]
by (auto simp: fds_eq_iff fds_nth_mult fds_nth_inverse dirichlet_prod_inverse fds_nth_one)


[STATEMENT]
lemma gauss2complex_0 [simp]: "gauss2complex 0 = 0"
  and gauss2complex_1 [simp]: "gauss2complex 1 = 1"
  and gauss2complex_i [simp]: "gauss2complex \<i>\<^sub>\<int> = \<i>"
  and gauss2complex_add [simp]: "gauss2complex (x + y) = gauss2complex x + gauss2complex y"
  and gauss2complex_diff [simp]: "gauss2complex (x - y) = gauss2complex x - gauss2complex y"
  and gauss2complex_mult [simp]: "gauss2complex (x * y) = gauss2complex x * gauss2complex y"
  and gauss2complex_uminus [simp]: "gauss2complex (-x) = -gauss2complex x"
  and gauss2complex_cnj [simp]: "gauss2complex (gauss_cnj x) = cnj (gauss2complex x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((gauss2complex 0 = 0 &&& gauss2complex 1 = 1) &&& gauss2complex \<i>\<^sub>\<int> = \<i> &&& gauss2complex (x + y) = gauss2complex x + gauss2complex y) &&& (gauss2complex (x - y) = gauss2complex x - gauss2complex y &&& gauss2complex (x * y) = gauss2complex x * gauss2complex y) &&& gauss2complex (- x) = - gauss2complex x &&& gauss2complex (gauss_cnj x) = cnj (gauss2complex x)
[PROOF STEP]
by (simp_all add: complex_eq_iff)


[STATEMENT]
lemma product_nodes_card:
      assumes "list_all (finite \<circ> a.nodes) AA"
      shows "card (b.nodes (product AA)) \<le> prod_list (map (card \<circ> a.nodes) AA)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)
[PROOF STEP]
have "card (b.nodes (product AA)) \<le> card (listset (map a.nodes AA))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (b.nodes' (product AA)) \<le> card (listset (map a.nodes' AA))
[PROOF STEP]
using list.pred_map product_nodes assms
[PROOF STATE]
proof (prove)
using this:
list_all ?Q (map ?f ?x) = list_all (?Q \<circ> ?f) ?x
b.nodes' (product ?AA) \<subseteq> listset (map a.nodes' ?AA)
list_all (finite \<circ> a.nodes') AA

goal (1 subgoal):
 1. card (b.nodes' (product AA)) \<le> card (listset (map a.nodes' AA))
[PROOF STEP]
by (blast intro: card_mono)
[PROOF STATE]
proof (state)
this:
card (b.nodes' (product AA)) \<le> card (listset (map a.nodes' AA))

goal (1 subgoal):
 1. card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (b.nodes' (product AA)) \<le> card (listset (map a.nodes' AA))

goal (1 subgoal):
 1. card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)
[PROOF STEP]
have "\<dots> = prod_list (map (card \<circ> a.nodes) AA)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (listset (map a.nodes' AA)) = prod_list (map (card \<circ> a.nodes') AA)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card (listset (map a.nodes' AA)) = prod_list (map (card \<circ> a.nodes') AA)

goal (1 subgoal):
 1. card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)

goal (1 subgoal):
 1. card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)
[PROOF STEP]
by this
[PROOF STATE]
proof (state)
this:
card (b.nodes' (product AA)) \<le> prod_list (map (card \<circ> a.nodes') AA)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Ln_minus1 [simp]: "Ln(-1) = \<i> * pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ln (- 1) = \<i> * complex_of_real pi
[PROOF STEP]
proof (rule exp_complex_eqI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<bar>Im (Ln (- 1)) - Im (\<i> * complex_of_real pi)\<bar> < 2 * pi
 2. exp (Ln (- 1)) = exp (\<i> * complex_of_real pi)
[PROOF STEP]
show "\<bar>Im (Ln (- 1)) - Im (\<i> * pi)\<bar> < 2 * pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>Im (Ln (- 1)) - Im (\<i> * complex_of_real pi)\<bar> < 2 * pi
[PROOF STEP]
using Im_Ln_le_pi [of "-1"] mpi_less_Im_Ln [of "-1"]
[PROOF STATE]
proof (prove)
using this:
- 1 \<noteq> 0 \<Longrightarrow> Im (Ln (- 1)) \<le> pi
- 1 \<noteq> 0 \<Longrightarrow> - pi < Im (Ln (- 1))

goal (1 subgoal):
 1. \<bar>Im (Ln (- 1)) - Im (\<i> * complex_of_real pi)\<bar> < 2 * pi
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>Im (Ln (- 1)) - Im (\<i> * complex_of_real pi)\<bar> < 2 * pi

goal (1 subgoal):
 1. exp (Ln (- 1)) = exp (\<i> * complex_of_real pi)
[PROOF STEP]
qed auto


[STATEMENT]
lemma continuous_within_sequentially:
  fixes f :: "'a::{first_countable_topology, t2_space} \<Rightarrow> 'b::topological_space"
  shows "continuous (at a within s) f \<longleftrightarrow>
    (\<forall>x. (\<forall>n::nat. x n \<in> s) \<and> (x \<longlongrightarrow> a) sequentially
         \<longrightarrow> ((f \<circ> x) \<longlongrightarrow> f a) sequentially)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous (at a within s) f = (\<forall>x. (\<forall>n. x n \<in> s) \<and> x \<longlonglongrightarrow> a \<longrightarrow> (f \<circ> x) \<longlonglongrightarrow> f a)
[PROOF STEP]
using continuous_within_tendsto_compose'[of a s f _ sequentially]
    continuous_within_sequentiallyI[of a s f]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>continuous (at a within s) f; \<And>n. ?x n \<in> s; ?x \<longlonglongrightarrow> a\<rbrakk> \<Longrightarrow> (\<lambda>n. f (?x n)) \<longlonglongrightarrow> f a
(\<And>u. \<lbrakk>u \<longlonglongrightarrow> a; \<forall>n. u n \<in> s\<rbrakk> \<Longrightarrow> (\<lambda>n. f (u n)) \<longlonglongrightarrow> f a) \<Longrightarrow> continuous (at a within s) f

goal (1 subgoal):
 1. continuous (at a within s) f = (\<forall>x. (\<forall>n. x n \<in> s) \<and> x \<longlonglongrightarrow> a \<longrightarrow> (f \<circ> x) \<longlonglongrightarrow> f a)
[PROOF STEP]
by (auto simp: o_def)


[STATEMENT]
lemma simply_connected_imp_path_connected:
  fixes S :: "_::real_normed_vector set"
  shows "simply_connected S \<Longrightarrow> path_connected S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simply_connected S \<Longrightarrow> path_connected S
[PROOF STEP]
by (simp add: simply_connected_def path_connected_eq_homotopic_points)


[STATEMENT]
lemma dropWhile_filter'':
  "sorted xs \<Longrightarrow> \<forall>t \<in> set xs. t \<le> nt \<Longrightarrow>
  dropWhile (\<lambda>t. enat (nt - t) > c) xs = filter (\<lambda>t. enat (nt - t) \<le> c) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>sorted xs; \<forall>t\<in>set xs. t \<le> nt\<rbrakk> \<Longrightarrow> dropWhile (\<lambda>t. c < enat (nt - t)) xs = filter (\<lambda>t. enat (nt - t) \<le> c) xs
[PROOF STEP]
by (induction xs) (auto 0 3 intro!: filter_id_conv[THEN iffD2, symmetric] elim: order.trans[rotated])


[STATEMENT]
lemma has_sgnx_inverse: "(f has_sgnx c) F \<longleftrightarrow> ((inverse o f) has_sgnx (inverse c)) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_sgnx c) F = ((inverse \<circ> f) has_sgnx inverse c) F
[PROOF STEP]
unfolding has_sgnx_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>\<^sub>F x in F. sgn (f x) = c) = (\<forall>\<^sub>F x in F. sgn (inverse (f x)) = inverse c)
[PROOF STEP]
apply (rule eventually_subst)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. (sgn (f n) = c) = (sgn (inverse (f n)) = inverse c)
[PROOF STEP]
apply (rule always_eventually)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. (sgn (f x) = c) = (sgn (inverse (f x)) = inverse c)
[PROOF STEP]
by (metis inverse_inverse_eq sgn_inverse)


[STATEMENT]
lemma isometryD:
  assumes "isometry f"
  shows "isometry_on UNIV f"
        "dist (f x) (f y) = dist x y"
        "range f = UNIV"
        "1-lipschitz_on UNIV f"
        "uniformly_continuous_on UNIV f"
        "continuous_on UNIV f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (isometry_on UNIV f &&& dist (f x) (f y) = dist x y &&& surj f) &&& 1-lipschitz_on UNIV f &&& isUCont f &&& continuous_on UNIV f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
isometry f

goal (1 subgoal):
 1. (isometry_on UNIV f &&& dist (f x) (f y) = dist x y &&& surj f) &&& 1-lipschitz_on UNIV f &&& isUCont f &&& continuous_on UNIV f
[PROOF STEP]
unfolding isometry_def isometry_on_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>UNIV. \<forall>y\<in>UNIV. dist (f x) (f y) = dist x y) \<and> surj f

goal (1 subgoal):
 1. (\<forall>x\<in>UNIV. \<forall>y\<in>UNIV. dist (f x) (f y) = dist x y &&& dist (f x) (f y) = dist x y &&& surj f) &&& 1-lipschitz_on UNIV f &&& isUCont f &&& continuous_on UNIV f
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> 1-lipschitz_on UNIV f
 2. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> isUCont f
 3. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> continuous_on UNIV f
[PROOF STEP]
using isometry_on_lipschitz isometry_on_uniformly_continuous isometry_on_continuous assms
[PROOF STATE]
proof (prove)
using this:
isometry_on ?X ?f \<Longrightarrow> 1-lipschitz_on ?X ?f
isometry_on ?X ?f \<Longrightarrow> uniformly_continuous_on ?X ?f
isometry_on ?X ?f \<Longrightarrow> continuous_on ?X ?f
isometry f

goal (3 subgoals):
 1. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> 1-lipschitz_on UNIV f
 2. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> isUCont f
 3. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> continuous_on UNIV f
[PROOF STEP]
unfolding isometry_def
[PROOF STATE]
proof (prove)
using this:
isometry_on ?X ?f \<Longrightarrow> 1-lipschitz_on ?X ?f
isometry_on ?X ?f \<Longrightarrow> uniformly_continuous_on ?X ?f
isometry_on ?X ?f \<Longrightarrow> continuous_on ?X ?f
isometry_on UNIV f \<and> surj f

goal (3 subgoals):
 1. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> 1-lipschitz_on UNIV f
 2. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> isUCont f
 3. \<lbrakk>\<forall>x y. dist (f x) (f y) = dist x y; surj f\<rbrakk> \<Longrightarrow> continuous_on UNIV f
[PROOF STEP]
by blast+


[STATEMENT]
lemma euler_maclaurin_nat_int_transfer:
  fixes F and f :: "real \<Rightarrow> 'a :: real_normed_vector"
  assumes "((\<lambda>b. (\<Sum>k=a..b. f (real k)) - F (real b) - T (real b)) \<longlongrightarrow> C) at_top"
  shows   "((\<lambda>b. (\<Sum>k=int a..b. f (of_int k)) - F (of_int b) - T (of_int b)) \<longlongrightarrow> C) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>b. (\<Sum>k = int a..b. f (real_of_int k)) - F (real_of_int b) - T (real_of_int b)) \<longlongrightarrow> C) at_top
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>b. (\<Sum>k = int a..b. f (real_of_int k)) - F (real_of_int b) - T (real_of_int b)) \<longlongrightarrow> C) at_top
[PROOF STEP]
have *: "((\<lambda>b. (\<Sum>k=int a..int b. f (of_int k)) - F (of_int (int b)) - T (of_int (int b)))
            \<longlongrightarrow> C) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>b. (\<Sum>k = int a..int b. f (real_of_int k)) - F (real_of_int (int b)) - T (real_of_int (int b))) \<longlonglongrightarrow> C
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(\<lambda>b. (\<Sum>k = a..b. f (real k)) - F (real b) - T (real b)) \<longlonglongrightarrow> C

goal (1 subgoal):
 1. (\<lambda>b. (\<Sum>k = int a..int b. f (real_of_int k)) - F (real_of_int (int b)) - T (real_of_int (int b))) \<longlonglongrightarrow> C
[PROOF STEP]
by (subst sum_atLeastAtMost_of_int_nat_transfer) simp
[PROOF STATE]
proof (state)
this:
(\<lambda>b. (\<Sum>k = int a..int b. f (real_of_int k)) - F (real_of_int (int b)) - T (real_of_int (int b))) \<longlonglongrightarrow> C

goal (1 subgoal):
 1. ((\<lambda>b. (\<Sum>k = int a..b. f (real_of_int k)) - F (real_of_int b) - T (real_of_int b)) \<longlongrightarrow> C) at_top
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>b. (\<Sum>k = int a..int b. f (real_of_int k)) - F (real_of_int (int b)) - T (real_of_int (int b))) \<longlonglongrightarrow> C

goal (1 subgoal):
 1. ((\<lambda>b. (\<Sum>k = int a..b. f (real_of_int k)) - F (real_of_int b) - T (real_of_int b)) \<longlongrightarrow> C) at_top
[PROOF STEP]
by (rule filterlim_int_of_nat_at_topD)
[PROOF STATE]
proof (state)
this:
((\<lambda>b. (\<Sum>k = int a..b. f (real_of_int k)) - F (real_of_int b) - T (real_of_int b)) \<longlongrightarrow> C) at_top

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma aff_dim_affine_hull [simp]: "aff_dim (affine hull S) = aff_dim S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aff_dim (affine hull S) = aff_dim S
[PROOF STEP]
unfolding aff_dim_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SOME d. \<exists>B. affine hull B = affine hull (affine hull S) \<and> \<not> affine_dependent B \<and> int (card B) = d + 1) = (SOME d. \<exists>B. affine hull B = affine hull S \<and> \<not> affine_dependent B \<and> int (card B) = d + 1)
[PROOF STEP]
using hull_hull[of _ S]
[PROOF STATE]
proof (prove)
using this:
?S hull (?S hull S) = ?S hull S

goal (1 subgoal):
 1. (SOME d. \<exists>B. affine hull B = affine hull (affine hull S) \<and> \<not> affine_dependent B \<and> int (card B) = d + 1) = (SOME d. \<exists>B. affine hull B = affine hull S \<and> \<not> affine_dependent B \<and> int (card B) = d + 1)
[PROOF STEP]
by auto


[STATEMENT]
lemma E_linear_diff2: "finite (set_pmf A) \<Longrightarrow> E (map_pmf f A) - E (map_pmf g A) = E (map_pmf (\<lambda>x. (f x) - (g x)) A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (set_pmf A) \<Longrightarrow> E (map_pmf f A) - E (map_pmf g A) = E (map_pmf (\<lambda>x. f x - g x) A)
[PROOF STEP]
unfolding E_def integral_map_pmf
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (set_pmf A) \<Longrightarrow> measure_pmf.expectation A f - measure_pmf.expectation A g = measure_pmf.expectation A (\<lambda>x. f x - g x)
[PROOF STEP]
apply(rule Bochner_Integration.integral_diff[of "measure_pmf A" f g, symmetric])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. finite (set_pmf A) \<Longrightarrow> integrable (measure_pmf A) f
 2. finite (set_pmf A) \<Longrightarrow> integrable (measure_pmf A) g
[PROOF STEP]
by (simp_all add: integrable_measure_pmf_finite)


[STATEMENT]
lemma ball_eq_empty[simp]: "ball x e = {} \<longleftrightarrow> e \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ball x e = {}) = (e \<le> 0)
[PROOF STEP]
unfolding mem_ball set_eq_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>xa. (dist x xa < e) = (xa \<in> {})) = (e \<le> 0)
[PROOF STEP]
by (simp add: not_less) metric


[STATEMENT]
lemma sum_list_mono_complex_lex:
  assumes "list_all2 (\<le>\<^sub>\<complex>) xs ys"
  shows   "sum_list xs \<le>\<^sub>\<complex> sum_list ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list xs \<le>\<^sub>\<complex> sum_list ys
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
list_all2 (\<le>\<^sub>\<complex>) xs ys

goal (1 subgoal):
 1. sum_list xs \<le>\<^sub>\<complex> sum_list ys
[PROOF STEP]
by induction (auto intro: complex_lex.add_mono)


[STATEMENT]
lemma emeasure_erlang_density:
  "0 < l \<Longrightarrow> emeasure (density lborel (erlang_density k l)) {.. a} = erlang_CDF k l a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < l \<Longrightarrow> emeasure (density lborel (\<lambda>x. ennreal (erlang_density k l x))) {..a} = ennreal (erlang_CDF k l a)
[PROOF STEP]
by (simp add: emeasure_density nn_integral_erlang_density)


[STATEMENT]
lemma qe_eq_repeat_eval' : "
      (\<exists>xs. (length xs = var + 1) \<and> eval (list_conj (map fm.Atom L @ F)) (xs @ \<Gamma>)) =
      (\<exists>xs. (length xs = var + 1) \<and> eval (qe_eq_repeat var L F) (xs @ \<Gamma>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>xs. length xs = var + 1 \<and> eval (list_conj (map fm.Atom L @ F)) (xs @ \<Gamma>)) = (\<exists>xs. length xs = var + 1 \<and> eval (qe_eq_repeat var L F) (xs @ \<Gamma>))
[PROOF STEP]
apply(rule step_converter[of qe_eq_repeat var L F \<Gamma>])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xs var L F \<Gamma>. length xs = var \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom L @ F)) (xs @ x # \<Gamma>)) = (\<exists>x. eval (qe_eq_repeat var L F) (xs @ x # \<Gamma>))
[PROOF STEP]
using qe_eq_repeat_eval
[PROOF STATE]
proof (prove)
using this:
length ?xs = ?var \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom ?L @ ?F)) (?xs @ x # ?\<Gamma>)) = (\<exists>x. eval (qe_eq_repeat ?var ?L ?F) (?xs @ x # ?\<Gamma>))

goal (1 subgoal):
 1. \<And>xs var L F \<Gamma>. length xs = var \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom L @ F)) (xs @ x # \<Gamma>)) = (\<exists>x. eval (qe_eq_repeat var L F) (xs @ x # \<Gamma>))
[PROOF STEP]
by blast


[STATEMENT]
lemma frontier_Un_subset_Un_frontier:
     "frontier (s \<union> t) \<subseteq> (frontier s) \<union> (frontier t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frontier (s \<union> t) \<subseteq> frontier s \<union> frontier t
[PROOF STEP]
by (simp add: frontier_def Un_Diff) (auto simp add: closure_def interior_def islimpt_def)


[STATEMENT]
lemma atLeastatMost_empty_iff2[simp]: "{} = {a\<le>\<^sub>a..\<le>\<^sub>ab} \<longleftrightarrow> (\<not> a \<le>\<^sub>a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({} = {a\<le>\<^sub>a..\<le>\<^sub>ab}) = (\<not> a \<le>\<^sub>a b)
[PROOF STEP]
by auto (blast intro: order_trans)


[STATEMENT]
theorem Cauchy_integral_formula_convex_simple:
  assumes "convex S" and holf: "f holomorphic_on S" and "z \<in> interior S" "valid_path \<gamma>" "path_image \<gamma> \<subseteq> S - {z}"
      "pathfinish \<gamma> = pathstart \<gamma>"
    shows "((\<lambda>w. f w / (w - z)) has_contour_integral (2*pi * \<i> * winding_number \<gamma> z * f z)) \<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>w. f w / (w - z)) has_contour_integral complex_of_real (2 * pi) * \<i> * winding_number \<gamma> z * f z) \<gamma>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>w. f w / (w - z)) has_contour_integral complex_of_real (2 * pi) * \<i> * winding_number \<gamma> z * f z) \<gamma>
[PROOF STEP]
have "\<And>x. x \<in> interior S \<Longrightarrow> f field_differentiable at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> interior S \<Longrightarrow> f field_differentiable at x
[PROOF STEP]
using holf at_within_interior holomorphic_onD interior_subset
[PROOF STATE]
proof (prove)
using this:
f holomorphic_on S
?x \<in> interior ?S \<Longrightarrow> at ?x within ?S = at ?x
\<lbrakk>?f holomorphic_on ?s; ?x \<in> ?s\<rbrakk> \<Longrightarrow> ?f field_differentiable at ?x within ?s
interior ?S \<subseteq> ?S

goal (1 subgoal):
 1. \<And>x. x \<in> interior S \<Longrightarrow> f field_differentiable at x
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
?x \<in> interior S \<Longrightarrow> f field_differentiable at ?x

goal (1 subgoal):
 1. ((\<lambda>w. f w / (w - z)) has_contour_integral complex_of_real (2 * pi) * \<i> * winding_number \<gamma> z * f z) \<gamma>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x \<in> interior S \<Longrightarrow> f field_differentiable at ?x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<in> interior S \<Longrightarrow> f field_differentiable at ?x

goal (1 subgoal):
 1. ((\<lambda>w. f w / (w - z)) has_contour_integral complex_of_real (2 * pi) * \<i> * winding_number \<gamma> z * f z) \<gamma>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> interior S \<Longrightarrow> f field_differentiable at ?x
convex S
f holomorphic_on S
z \<in> interior S
valid_path \<gamma>
path_image \<gamma> \<subseteq> S - {z}
pathfinish \<gamma> = pathstart \<gamma>

goal (1 subgoal):
 1. ((\<lambda>w. f w / (w - z)) has_contour_integral complex_of_real (2 * pi) * \<i> * winding_number \<gamma> z * f z) \<gamma>
[PROOF STEP]
by (intro Cauchy_integral_formula_weak [where k = "{}"]) (auto simp: holomorphic_on_imp_continuous_on)
[PROOF STATE]
proof (state)
this:
((\<lambda>w. f w / (w - z)) has_contour_integral complex_of_real (2 * pi) * \<i> * winding_number \<gamma> z * f z) \<gamma>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "(\<Union>x \<in> C. f x \<union> g x) = \<Union>(f ` C)  \<union>  \<Union>(g ` C)"
  \<comment> \<open>Union-image, called \<open>Un_Union_image\<close> in Main HOL\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>x\<in>C. f x \<union> g x) = \<Union> (f ` C) \<union> \<Union> (g ` C)
[PROOF STEP]
by blast


[STATEMENT]
lemma "0 + (n::nat) = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 + n = n
[PROOF STEP]
by normalization


[STATEMENT]
lemma lebesgue_measure_ball:
  assumes "R \<ge> 0"
  shows "measure lborel (cball (x::('a::euclidean_space)) R) = R^(DIM('a)) * measure lborel (cball (0::'a) 1)"
        "emeasure lborel (cball (x::('a::euclidean_space)) R) = R^(DIM('a)) * emeasure lborel (cball (0::'a) 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content (cball x R) = R ^ DIM('a) * content (cball (0::'a) 1) &&& emeasure lborel (cball x R) = ennreal R ^ DIM('a) * emeasure lborel (cball (0::'a) 1)
[PROOF STEP]
apply (simp add: assms content_cball)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure lborel (cball x R) = ennreal R ^ DIM('a) * emeasure lborel (cball (0::'a) 1)
[PROOF STEP]
by (simp add: assms emeasure_cball ennreal_mult' ennreal_power mult.commute)


[STATEMENT]
lemma "wordinterval_intersection
          (RangeUnion (RangeUnion (WordInterval (1::32 word) 3) (WordInterval 8 10))
                      (WordInterval 1 3)) (WordInterval 1 3) =
          WordInterval 1 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wordinterval_intersection (RangeUnion (RangeUnion (WordInterval 1 3) (WordInterval 8 10)) (WordInterval 1 3)) (WordInterval 1 3) = WordInterval 1 3
[PROOF STEP]
by eval