[STATEMENT]
lemma conv_radius_cmult_left:
  assumes "c \<noteq> (0 :: 'a :: {banach, real_normed_div_algebra})"
  shows   "conv_radius (\<lambda>n. c * f n) = conv_radius f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
have "conv_radius (\<lambda>n. c * f n) =
          inverse (limsup (\<lambda>n. ereal (root n (norm (c * f n)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = inverse (limsup (\<lambda>n. ereal (root n (norm (c * f n)))))
[PROOF STEP]
unfolding conv_radius_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (limsup (\<lambda>n. ereal (root n (norm (c * f n))))) = inverse (limsup (\<lambda>n. ereal (root n (norm (c * f n)))))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
conv_radius (\<lambda>n. c * f n) = inverse (limsup (\<lambda>n. ereal (root n (norm (c * f n)))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
conv_radius (\<lambda>n. c * f n) = inverse (limsup (\<lambda>n. ereal (root n (norm (c * f n)))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
have "(\<lambda>n. ereal (root n (norm (c * f n)))) =
               (\<lambda>n. ereal (root n (norm c)) * ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. ereal (root n (norm (c * f n)))) = (\<lambda>n. ereal (root n (norm c)) * ereal (root n (norm (f n))))
[PROOF STEP]
by (rule ext) (auto simp: norm_mult real_root_mult)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ereal (root n (norm (c * f n)))) = (\<lambda>n. ereal (root n (norm c)) * ereal (root n (norm (f n))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ereal (root n (norm (c * f n)))) = (\<lambda>n. ereal (root n (norm c)) * ereal (root n (norm (f n))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
have "limsup \<dots> = ereal 1 * limsup (\<lambda>n. ereal (root n (norm (f n))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. limsup (\<lambda>n. ereal (root n (norm c)) * ereal (root n (norm (f n)))) = ereal 1 * limsup (\<lambda>n. ereal (root n (norm (f n))))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
c \<noteq> (0::'a)

goal (1 subgoal):
 1. limsup (\<lambda>n. ereal (root n (norm c)) * ereal (root n (norm (f n)))) = ereal 1 * limsup (\<lambda>n. ereal (root n (norm (f n))))
[PROOF STEP]
by (intro ereal_limsup_lim_mult tendsto_ereal LIMSEQ_root_const) auto
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>n. ereal (root n (norm c)) * ereal (root n (norm (f n)))) = ereal 1 * limsup (\<lambda>n. ereal (root n (norm (f n))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
limsup (\<lambda>n. ereal (root n (norm c)) * ereal (root n (norm (f n)))) = ereal 1 * limsup (\<lambda>n. ereal (root n (norm (f n))))

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
have "inverse \<dots> = conv_radius f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (ereal 1 * limsup (\<lambda>n. ereal (root n (norm (f n))))) = conv_radius f
[PROOF STEP]
by (simp add: conv_radius_def)
[PROOF STATE]
proof (state)
this:
inverse (ereal 1 * limsup (\<lambda>n. ereal (root n (norm (f n))))) = conv_radius f

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
conv_radius (\<lambda>n. c * f n) = conv_radius f

goal (1 subgoal):
 1. conv_radius (\<lambda>n. c * f n) = conv_radius f
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
conv_radius (\<lambda>n. c * f n) = conv_radius f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma gen_power_0:
  fixes r :: nat
  assumes "\<^bold>g [^] r = \<one>"
    and "r < order G"
  shows "r = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r = 0
[PROOF STEP]
using assms inj_onD inj_on_generator
[PROOF STATE]
proof (prove)
using this:
\<^bold>g [^] r = \<one>
r < order G
\<lbrakk>inj_on ?f ?A; ?f ?x = ?f ?y; ?x \<in> ?A; ?y \<in> ?A\<rbrakk> \<Longrightarrow> ?x = ?y
inj_on (([^]) \<^bold>g) {..<order G}

goal (1 subgoal):
 1. r = 0
[PROOF STEP]
by fastforce


[STATEMENT]
lemma continuous_at_Inf_mono:
  fixes f :: "'a::{linorder_topology,conditionally_complete_linorder} \<Rightarrow>
    'b::{linorder_topology,conditionally_complete_linorder}"
  assumes "mono f"
    and cont: "continuous (at_right (Inf S)) f"
    and S: "S \<noteq> {}" "bdd_below S"
  shows "f (Inf S) = (INF s\<in>S. f s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (Inf S) = Inf (f ` S)
[PROOF STEP]
proof (rule antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f (Inf S) \<le> Inf (f ` S)
 2. Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
have f: "(f \<longlongrightarrow> f (Inf S)) (at_right (Inf S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> f (Inf S)) (at_right (Inf S))
[PROOF STEP]
using cont
[PROOF STATE]
proof (prove)
using this:
continuous (at_right (Inf S)) f

goal (1 subgoal):
 1. (f \<longlongrightarrow> f (Inf S)) (at_right (Inf S))
[PROOF STEP]
unfolding continuous_within
[PROOF STATE]
proof (prove)
using this:
(f \<longlongrightarrow> f (Inf S)) (at_right (Inf S))

goal (1 subgoal):
 1. (f \<longlongrightarrow> f (Inf S)) (at_right (Inf S))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(f \<longlongrightarrow> f (Inf S)) (at_right (Inf S))

goal (2 subgoals):
 1. f (Inf S) \<le> Inf (f ` S)
 2. Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
show "(INF s\<in>S. f s) \<le> f (Inf S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
 2. \<not> ?P \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
assume "Inf S \<in> S"
[PROOF STATE]
proof (state)
this:
Inf S \<in> S

goal (2 subgoals):
 1. ?P \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
 2. \<not> ?P \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Inf S \<in> S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Inf S \<in> S

goal (1 subgoal):
 1. Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
by (rule cINF_lower[rotated]) (auto intro: bdd_below_image_mono S \<open>mono f\<close>)
[PROOF STATE]
proof (state)
this:
Inf (f ` S) \<le> f (Inf S)

goal (1 subgoal):
 1. Inf S \<notin> S \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Inf S \<notin> S \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
assume "Inf S \<notin> S"
[PROOF STATE]
proof (state)
this:
Inf S \<notin> S

goal (1 subgoal):
 1. Inf S \<notin> S \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
from \<open>S \<noteq> {}\<close>
[PROOF STATE]
proof (chain)
picking this:
S \<noteq> {}
[PROOF STEP]
obtain s where "s \<in> S"
[PROOF STATE]
proof (prove)
using this:
S \<noteq> {}

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

goal (1 subgoal):
 1. Inf S \<notin> S \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
with \<open>Inf S \<notin> S\<close> S
[PROOF STATE]
proof (chain)
picking this:
Inf S \<notin> S
S \<noteq> {}
bdd_below S
s \<in> S
[PROOF STEP]
have "Inf S < s"
[PROOF STATE]
proof (prove)
using this:
Inf S \<notin> S
S \<noteq> {}
bdd_below S
s \<in> S

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

goal (1 subgoal):
 1. Inf S \<le> s \<and> Inf S \<noteq> s
[PROOF STEP]
by (blast intro: cInf_lower)
[PROOF STATE]
proof (state)
this:
Inf S < s

goal (1 subgoal):
 1. Inf S \<notin> S \<Longrightarrow> Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> Inf (f ` S) \<le> f (Inf S) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
\<not> Inf (f ` S) \<le> f (Inf S)

goal (1 subgoal):
 1. \<not> Inf (f ` S) \<le> f (Inf S) \<Longrightarrow> False
[PROOF STEP]
with order_tendstoD(2)[OF f, of "INF s\<in>S. f s"]
[PROOF STATE]
proof (chain)
picking this:
f (Inf S) < Inf (f ` S) \<Longrightarrow> \<forall>\<^sub>F x in at_right (Inf S). f x < Inf (f ` S)
\<not> Inf (f ` S) \<le> f (Inf S)
[PROOF STEP]
obtain b where "Inf S < b"
        and *: "\<And>y. Inf S < y \<Longrightarrow> y < b \<Longrightarrow> f y < (INF s\<in>S. f s)"
[PROOF STATE]
proof (prove)
using this:
f (Inf S) < Inf (f ` S) \<Longrightarrow> \<forall>\<^sub>F x in at_right (Inf S). f x < Inf (f ` S)
\<not> Inf (f ` S) \<le> f (Inf S)

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>Inf S < b; \<And>y. \<lbrakk>Inf S < y; y < b\<rbrakk> \<Longrightarrow> f y < Inf (f ` S)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: not_le eventually_at_right[OF \<open>Inf S < s\<close>])
[PROOF STATE]
proof (state)
this:
Inf S < b
\<lbrakk>Inf S < ?y; ?y < b\<rbrakk> \<Longrightarrow> f ?y < Inf (f ` S)

goal (1 subgoal):
 1. \<not> Inf (f ` S) \<le> f (Inf S) \<Longrightarrow> False
[PROOF STEP]
with \<open>S \<noteq> {}\<close>
[PROOF STATE]
proof (chain)
picking this:
S \<noteq> {}
Inf S < b
\<lbrakk>Inf S < ?y; ?y < b\<rbrakk> \<Longrightarrow> f ?y < Inf (f ` S)
[PROOF STEP]
obtain c where "c \<in> S" "c < b"
[PROOF STATE]
proof (prove)
using this:
S \<noteq> {}
Inf S < b
\<lbrakk>Inf S < ?y; ?y < b\<rbrakk> \<Longrightarrow> f ?y < Inf (f ` S)

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>c \<in> S; c < b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using cInf_lessD[of S b]
[PROOF STATE]
proof (prove)
using this:
S \<noteq> {}
Inf S < b
\<lbrakk>Inf S < ?y; ?y < b\<rbrakk> \<Longrightarrow> f ?y < Inf (f ` S)
\<lbrakk>S \<noteq> {}; Inf S < b\<rbrakk> \<Longrightarrow> \<exists>x\<in>S. x < b

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>c \<in> S; c < b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
c \<in> S
c < b

goal (1 subgoal):
 1. \<not> Inf (f ` S) \<le> f (Inf S) \<Longrightarrow> False
[PROOF STEP]
with \<open>Inf S \<notin> S\<close> S
[PROOF STATE]
proof (chain)
picking this:
Inf S \<notin> S
S \<noteq> {}
bdd_below S
c \<in> S
c < b
[PROOF STEP]
have "Inf S < c"
[PROOF STATE]
proof (prove)
using this:
Inf S \<notin> S
S \<noteq> {}
bdd_below S
c \<in> S
c < b

goal (1 subgoal):
 1. Inf S < c
[PROOF STEP]
unfolding less_le
[PROOF STATE]
proof (prove)
using this:
Inf S \<notin> S
S \<noteq> {}
bdd_below S
c \<in> S
c \<le> b \<and> c \<noteq> b

goal (1 subgoal):
 1. Inf S \<le> c \<and> Inf S \<noteq> c
[PROOF STEP]
by (blast intro: cInf_lower)
[PROOF STATE]
proof (state)
this:
Inf S < c

goal (1 subgoal):
 1. \<not> Inf (f ` S) \<le> f (Inf S) \<Longrightarrow> False
[PROOF STEP]
from *[OF \<open>Inf S < c\<close> \<open>c < b\<close>] cINF_lower[OF bdd_below_image_mono[of f] \<open>c \<in> S\<close>]
[PROOF STATE]
proof (chain)
picking this:
f c < Inf (f ` S)
\<lbrakk>mono f; bdd_below S\<rbrakk> \<Longrightarrow> Inf (f ` S) \<le> f c
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
f c < Inf (f ` S)
\<lbrakk>mono f; bdd_below S\<rbrakk> \<Longrightarrow> Inf (f ` S) \<le> f c

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Inf (f ` S) \<le> f (Inf S)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Inf (f ` S) \<le> f (Inf S)

goal (1 subgoal):
 1. f (Inf S) \<le> Inf (f ` S)
[PROOF STEP]
qed (intro cINF_greatest \<open>mono f\<close>[THEN monoD] cInf_lower \<open>bdd_below S\<close> \<open>S \<noteq> {}\<close>)


[STATEMENT]
lemma permutes_image_mset: \<^marker>\<open>contributor \<open>Lukas Bulwahn\<close>\<close>
  assumes "p permutes A"
  shows "image_mset p (mset_set A) = mset_set A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. image_mset p (mset_set A) = mset_set A
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
p permutes A

goal (1 subgoal):
 1. image_mset p (mset_set A) = mset_set A
[PROOF STEP]
by (metis image_mset_mset_set bij_betw_imp_inj_on permutes_imp_bij permutes_image)


[STATEMENT]
lemma end_smult_distrib_left :
  assumes "range S \<subseteq> V" "range T \<subseteq> V"
  shows   "a \<cdot>\<cdot> (S + T) = a \<cdot>\<cdot> S + a \<cdot>\<cdot> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<cdot>\<cdot> (S + T) = a \<cdot>\<cdot> S + a \<cdot>\<cdot> T
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>v. (a \<cdot>\<cdot> (S + T)) v = (a \<cdot>\<cdot> S + a \<cdot>\<cdot> T) v
[PROOF STEP]
fix v
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>v. (a \<cdot>\<cdot> (S + T)) v = (a \<cdot>\<cdot> S + a \<cdot>\<cdot> T) v
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
range S \<subseteq> V
range T \<subseteq> V
[PROOF STEP]
show "(a \<cdot>\<cdot> (S + T)) v = (a \<cdot>\<cdot> S  + a \<cdot>\<cdot> T) v"
[PROOF STATE]
proof (prove)
using this:
range S \<subseteq> V
range T \<subseteq> V

goal (1 subgoal):
 1. (a \<cdot>\<cdot> (S + T)) v = (a \<cdot>\<cdot> S + a \<cdot>\<cdot> T) v
[PROOF STEP]
using smult_distrib_left[of a "S v" "T v"]
[PROOF STATE]
proof (prove)
using this:
range S \<subseteq> V
range T \<subseteq> V
\<lbrakk>a \<in> UNIV; S v \<in> V; T v \<in> V\<rbrakk> \<Longrightarrow> (a \<cdot>\<cdot> (+) (S v)) (T v) = (a \<cdot>\<cdot> S) v + (a \<cdot>\<cdot> T) v

goal (1 subgoal):
 1. (a \<cdot>\<cdot> (S + T)) v = (a \<cdot>\<cdot> S + a \<cdot>\<cdot> T) v
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(a \<cdot>\<cdot> (S + T)) v = (a \<cdot>\<cdot> S + a \<cdot>\<cdot> T) v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma filterlim_at_split:
  "filterlim f F (at x) \<longleftrightarrow> filterlim f F (at_left x) \<and> filterlim f F (at_right x)"
  for x :: "'a::linorder_topology"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim f F (at x) = (filterlim f F (at_left x) \<and> filterlim f F (at_right x))
[PROOF STEP]
by (subst at_eq_sup_left_right) (simp add: filterlim_def filtermap_sup)


[STATEMENT]
lemma one_less_of_rat_iff [simp]: "1 < (of_rat r :: 'a::linordered_field) \<longleftrightarrow> 1 < r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((1::'a) < of_rat r) = (1 < r)
[PROOF STEP]
using of_rat_less [of 1 r]
[PROOF STATE]
proof (prove)
using this:
(of_rat 1 < of_rat r) = (1 < r)

goal (1 subgoal):
 1. ((1::'a) < of_rat r) = (1 < r)
[PROOF STEP]
by simp


[STATEMENT]
lemma simply_connected_sphere:
  fixes a :: "'a::euclidean_space"
  assumes "3 \<le> DIM('a)"
    shows "simply_connected(sphere a r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simply_connected (sphere a r)
[PROOF STEP]
proof (cases rule: linorder_cases [of r 0])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. r < 0 \<Longrightarrow> simply_connected (sphere a r)
 2. r = 0 \<Longrightarrow> simply_connected (sphere a r)
 3. 0 < r \<Longrightarrow> simply_connected (sphere a r)
[PROOF STEP]
case less
[PROOF STATE]
proof (state)
this:
r < 0

goal (3 subgoals):
 1. r < 0 \<Longrightarrow> simply_connected (sphere a r)
 2. r = 0 \<Longrightarrow> simply_connected (sphere a r)
 3. 0 < r \<Longrightarrow> simply_connected (sphere a r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r < 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
r < 0

goal (1 subgoal):
 1. simply_connected (sphere a r)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
simply_connected (sphere a r)

goal (2 subgoals):
 1. r = 0 \<Longrightarrow> simply_connected (sphere a r)
 2. 0 < r \<Longrightarrow> simply_connected (sphere a r)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. r = 0 \<Longrightarrow> simply_connected (sphere a r)
 2. 0 < r \<Longrightarrow> simply_connected (sphere a r)
[PROOF STEP]
case equal
[PROOF STATE]
proof (state)
this:
r = 0

goal (2 subgoals):
 1. r = 0 \<Longrightarrow> simply_connected (sphere a r)
 2. 0 < r \<Longrightarrow> simply_connected (sphere a r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
r = 0

goal (1 subgoal):
 1. simply_connected (sphere a r)
[PROOF STEP]
by (auto simp: convex_imp_simply_connected)
[PROOF STATE]
proof (state)
this:
simply_connected (sphere a r)

goal (1 subgoal):
 1. 0 < r \<Longrightarrow> simply_connected (sphere a r)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < r \<Longrightarrow> simply_connected (sphere a r)
[PROOF STEP]
case greater
[PROOF STATE]
proof (state)
this:
0 < r

goal (1 subgoal):
 1. 0 < r \<Longrightarrow> simply_connected (sphere a r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < r
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < r

goal (1 subgoal):
 1. simply_connected (sphere a r)
[PROOF STEP]
using simply_connected_sphere_gen [of "cball a r"] assms
[PROOF STATE]
proof (prove)
using this:
0 < r
\<lbrakk>convex (cball a r); bounded (cball a r); 3 \<le> aff_dim (cball a r)\<rbrakk> \<Longrightarrow> simply_connected (rel_frontier (cball a r))
3 \<le> DIM('a)

goal (1 subgoal):
 1. simply_connected (sphere a r)
[PROOF STEP]
by (simp add: aff_dim_cball)
[PROOF STATE]
proof (state)
this:
simply_connected (sphere a r)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma relcompp_in_rel: "in_rel R OO in_rel S = in_rel (R O S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. in_rel R OO in_rel S = in_rel (R O S)
[PROOF STEP]
unfolding fun_eq_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x xa. (in_rel R OO in_rel S) x xa = in_rel (R O S) x xa
[PROOF STEP]
by auto


[STATEMENT]
lemma hermitean_transpose:
  shows "hermitean A \<longleftrightarrow> mat_transpose A = mat_cnj A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hermitean A = (mat_transpose A = mat_cnj A)
[PROOF STEP]
unfolding hermitean_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (mat_adj A = A) = (mat_transpose A = mat_cnj A)
[PROOF STEP]
by (cases A) (auto simp add: mat_adj_def mat_cnj_def)


[STATEMENT]
lemma padd_closed:
  "on_curvep a b p\<^sub>1 \<Longrightarrow> on_curvep a b p\<^sub>2 \<Longrightarrow> on_curvep a b (padd a p\<^sub>1 p\<^sub>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>on_curvep a b p\<^sub>1; on_curvep a b p\<^sub>2\<rbrakk> \<Longrightarrow> on_curvep a b (padd a p\<^sub>1 p\<^sub>2)
[PROOF STEP]
by (simp add: on_curvep_iff_on_curve padd_correct add_closed)


[STATEMENT]
lemma nonneg_of_real_in_complex_cone [simp, intro]:
  assumes "x \<ge> 0" "a \<le> 0" "0 \<le> b"
  shows   "of_real x \<in> complex_cone a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real x \<in> complex_cone a b
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. complex_of_real x \<in> complex_cone a b
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
0 \<le> x
a \<le> 0
0 \<le> b
[PROOF STEP]
have "rcis x 0 \<in> complex_cone a b"
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
a \<le> 0
0 \<le> b

goal (1 subgoal):
 1. rcis x 0 \<in> complex_cone a b
[PROOF STEP]
by (intro rcis_in_complex_cone) auto
[PROOF STATE]
proof (state)
this:
rcis x 0 \<in> complex_cone a b

goal (1 subgoal):
 1. complex_of_real x \<in> complex_cone a b
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
rcis x 0 \<in> complex_cone a b

goal (1 subgoal):
 1. complex_of_real x \<in> complex_cone a b
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complex_of_real x \<in> complex_cone a b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ladder_shift_n_drop: "ladder_shift_n N (drop n L) = drop n (ladder_shift_n N L)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ladder_shift_n N (drop n L) = drop n (ladder_shift_n N L)
[PROOF STEP]
proof (induct L arbitrary: n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>n. ladder_shift_n N (drop n []) = drop n (ladder_shift_n N [])
 2. \<And>a L n. (\<And>n. ladder_shift_n N (drop n L) = drop n (ladder_shift_n N L)) \<Longrightarrow> ladder_shift_n N (drop n (a # L)) = drop n (ladder_shift_n N (a # L))
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>n. ladder_shift_n N (drop n []) = drop n (ladder_shift_n N [])
 2. \<And>a L n. (\<And>n. ladder_shift_n N (drop n L) = drop n (ladder_shift_n N L)) \<Longrightarrow> ladder_shift_n N (drop n (a # L)) = drop n (ladder_shift_n N (a # L))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ladder_shift_n N (drop n []) = drop n (ladder_shift_n N [])
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ladder_shift_n N (drop n []) = drop n (ladder_shift_n N [])

goal (1 subgoal):
 1. \<And>a L n. (\<And>n. ladder_shift_n N (drop n L) = drop n (ladder_shift_n N L)) \<Longrightarrow> ladder_shift_n N (drop n (a # L)) = drop n (ladder_shift_n N (a # L))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a L n. (\<And>n. ladder_shift_n N (drop n L) = drop n (ladder_shift_n N L)) \<Longrightarrow> ladder_shift_n N (drop n (a # L)) = drop n (ladder_shift_n N (a # L))
[PROOF STEP]
case (Cons x L)
[PROOF STATE]
proof (state)
this:
ladder_shift_n N (drop ?n L) = drop ?n (ladder_shift_n N L)

goal (1 subgoal):
 1. \<And>a L n. (\<And>n. ladder_shift_n N (drop n L) = drop n (ladder_shift_n N L)) \<Longrightarrow> ladder_shift_n N (drop n (a # L)) = drop n (ladder_shift_n N (a # L))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))
[PROOF STEP]
proof (cases n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))
 2. \<And>nat. n = Suc nat \<Longrightarrow> ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))
 2. \<And>nat. n = Suc nat \<Longrightarrow> ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
na__ = Suc n

goal (1 subgoal):
 1. \<And>nat. na__ = Suc nat \<Longrightarrow> ladder_shift_n N (drop na__ (x # L)) = drop na__ (ladder_shift_n N (x # L))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
na__ = Suc n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
na__ = Suc n

goal (1 subgoal):
 1. ladder_shift_n N (drop na__ (x # L)) = drop na__ (ladder_shift_n N (x # L))
[PROOF STEP]
by (simp add: ladder_shift_n_cons Cons)
[PROOF STATE]
proof (state)
this:
ladder_shift_n N (drop na__ (x # L)) = drop na__ (ladder_shift_n N (x # L))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
ladder_shift_n N (drop n (x # L)) = drop n (ladder_shift_n N (x # L))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma continuous_on_joinpaths:
  assumes "continuous_on {0..1} g1" "continuous_on {0..1} g2" "pathfinish g1 = pathstart g2"
    shows "continuous_on {0..1} (g1 +++ g2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {0..1} (g1 +++ g2)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. continuous_on {0..1} (g1 +++ g2)
[PROOF STEP]
have "{0..1::real} = {0..1/2} \<union> {1/2..1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {0..1} = {0..1 / 2} \<union> {1 / 2..1}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{0..1} = {0..1 / 2} \<union> {1 / 2..1}

goal (1 subgoal):
 1. continuous_on {0..1} (g1 +++ g2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{0..1} = {0..1 / 2} \<union> {1 / 2..1}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{0..1} = {0..1 / 2} \<union> {1 / 2..1}

goal (1 subgoal):
 1. continuous_on {0..1} (g1 +++ g2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
{0..1} = {0..1 / 2} \<union> {1 / 2..1}
continuous_on {0..1} g1
continuous_on {0..1} g2
pathfinish g1 = pathstart g2

goal (1 subgoal):
 1. continuous_on {0..1} (g1 +++ g2)
[PROOF STEP]
by (metis path_def path_join)
[PROOF STATE]
proof (state)
this:
continuous_on {0..1} (g1 +++ g2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma residuated_Inf: "residuated f \<Longrightarrow> residual f(\<Sqinter> X) = \<Sqinter>{residual f x | x. x \<in> X}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. residuated f \<Longrightarrow> residual f (\<Sqinter> X) = \<Sqinter> {residual f x |x. x \<in> X}
[PROOF STEP]
proof (rule order.antisym, clarsimp intro!: Inf_greatest res_residual_iso Inf_lower)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. residuated f \<Longrightarrow> \<Sqinter> {residual f x |x. x \<in> X} \<le> residual f (\<Sqinter> X)
[PROOF STEP]
assume assm: "residuated f"
[PROOF STATE]
proof (state)
this:
residuated f

goal (1 subgoal):
 1. residuated f \<Longrightarrow> \<Sqinter> {residual f x |x. x \<in> X} \<le> residual f (\<Sqinter> X)
[PROOF STEP]
obtain y where y_def: "y = \<Sqinter>{residual f x |x. x \<in> X}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>y. y = \<Sqinter> {residual f x |x. x \<in> X} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y = \<Sqinter> {residual f x |x. x \<in> X}

goal (1 subgoal):
 1. residuated f \<Longrightarrow> \<Sqinter> {residual f x |x. x \<in> X} \<le> residual f (\<Sqinter> X)
[PROOF STEP]
hence "\<forall>x \<in> X. y \<le> residual f x"
[PROOF STATE]
proof (prove)
using this:
y = \<Sqinter> {residual f x |x. x \<in> X}

goal (1 subgoal):
 1. \<forall>x\<in>X. y \<le> residual f x
[PROOF STEP]
by (auto simp: y_def intro: Inf_lower)
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>X. y \<le> residual f x

goal (1 subgoal):
 1. residuated f \<Longrightarrow> \<Sqinter> {residual f x |x. x \<in> X} \<le> residual f (\<Sqinter> X)
[PROOF STEP]
hence "\<forall>x \<in> X. f y \<le> x"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>X. y \<le> residual f x

goal (1 subgoal):
 1. \<forall>x\<in>X. f y \<le> x
[PROOF STEP]
by (metis assm residual_galoisI2)
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>X. f y \<le> x

goal (1 subgoal):
 1. residuated f \<Longrightarrow> \<Sqinter> {residual f x |x. x \<in> X} \<le> residual f (\<Sqinter> X)
[PROOF STEP]
hence "f y \<le> \<Sqinter> X"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>X. f y \<le> x

goal (1 subgoal):
 1. f y \<le> \<Sqinter> X
[PROOF STEP]
by (auto intro: Inf_greatest)
[PROOF STATE]
proof (state)
this:
f y \<le> \<Sqinter> X

goal (1 subgoal):
 1. residuated f \<Longrightarrow> \<Sqinter> {residual f x |x. x \<in> X} \<le> residual f (\<Sqinter> X)
[PROOF STEP]
thus "\<Sqinter>{residual f x |x. x \<in> X} \<le> residual f (\<Sqinter>X)"
[PROOF STATE]
proof (prove)
using this:
f y \<le> \<Sqinter> X

goal (1 subgoal):
 1. \<Sqinter> {residual f x |x. x \<in> X} \<le> residual f (\<Sqinter> X)
[PROOF STEP]
by (auto simp: assm y_def intro!: residual_galoisI1)
[PROOF STATE]
proof (state)
this:
\<Sqinter> {residual f x |x. x \<in> X} \<le> residual f (\<Sqinter> X)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tree_has_edge:
  assumes "card V > 1"
  shows "\<exists>v w. v\<rightarrow>w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>v w. v \<rightarrow> w
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>v w. v \<rightarrow> w
[PROOF STEP]
obtain v where v: "v \<in> V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>v. v \<in> V \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
1 < card V

goal (1 subgoal):
 1. (\<And>v. v \<in> V \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis List.finite_set One_nat_def card.empty card_mono empty_set less_le_trans linear
        not_less subsetI zero_less_Suc)
[PROOF STATE]
proof (state)
this:
v \<in> V

goal (1 subgoal):
 1. \<exists>v w. v \<rightarrow> w
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
v \<in> V
[PROOF STEP]
obtain w where "w \<in> V" "v \<noteq> w"
[PROOF STATE]
proof (prove)
using this:
v \<in> V

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>w \<in> V; v \<noteq> w\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
v \<in> V
1 < card V

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>w \<in> V; v \<noteq> w\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis (no_types, lifting) One_nat_def card.empty card.insert distinct.simps(2) empty_set
      finite.intros(1) finite_distinct_list finite_vertex_set hd_in_set last.simps last_in_set
      less_or_eq_imp_le list.exhaust_sel list.simps(15) not_less path_singleton)
[PROOF STATE]
proof (state)
this:
w \<in> V
v \<noteq> w

goal (1 subgoal):
 1. \<exists>v w. v \<rightarrow> w
[PROOF STEP]
hence "v \<rightarrow> hd (tl (v\<leadsto>w))"
[PROOF STATE]
proof (prove)
using this:
w \<in> V
v \<noteq> w

goal (1 subgoal):
 1. v \<rightarrow> hd (tl (v \<leadsto> w))
[PROOF STEP]
using v
[PROOF STATE]
proof (prove)
using this:
w \<in> V
v \<noteq> w
v \<in> V

goal (1 subgoal):
 1. v \<rightarrow> hd (tl (v \<leadsto> w))
[PROOF STEP]
by (metis unique_connecting_path_properties last.simps list.exhaust_sel walk_first_edge')
[PROOF STATE]
proof (state)
this:
v \<rightarrow> hd (tl (v \<leadsto> w))

goal (1 subgoal):
 1. \<exists>v w. v \<rightarrow> w
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
v \<rightarrow> hd (tl (v \<leadsto> w))

goal (1 subgoal):
 1. \<exists>v w. v \<rightarrow> w
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>v w. v \<rightarrow> w

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma expands_to_sgn_zero:
  assumes "eventually (\<lambda>x. f x = 0) at_top" "basis_wf basis"
          "length basis = expansion_level TYPE('a :: multiseries)"
  shows   "((\<lambda>x. sgn (f x)) expands_to (zero_expansion :: 'a)) basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. sgn (f x)) expands_to zero_expansion) basis
[PROOF STEP]
by (rule expands_to_cong[OF expands_to_zero]) (insert assms, auto simp: sgn_eq_0_iff)


[STATEMENT]
lemma tendsto_vec_lambda [tendsto_intros]:
  assumes "\<And>i. ((\<lambda>x. f x i) \<longlongrightarrow> a i) net"
  shows "((\<lambda>x. \<chi> i. f x i) \<longlongrightarrow> (\<chi> i. a i)) net"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. \<chi>i. f x i) \<longlongrightarrow> (\<chi>i. a i)) net
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. f x ?i) \<longlongrightarrow> a ?i) net

goal (1 subgoal):
 1. ((\<lambda>x. \<chi>i. f x i) \<longlongrightarrow> (\<chi>i. a i)) net
[PROOF STEP]
by (simp add: vec_tendstoI)


[STATEMENT]
lemma real_of_complex_of:
  "(real_of \<circ> complex_of) = id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of \<circ> complex_of = id
[PROOF STEP]
unfolding complex_of_def real_of_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. eucl_of_list [Re x, Im x]) \<circ> (\<lambda>x. complex_of_real (x $\<^sub>e 0) + \<i> * complex_of_real (x $\<^sub>e 1)) = id
[PROOF STEP]
using complex_eq
[PROOF STATE]
proof (prove)
using this:
?a = complex_of_real (Re ?a) + \<i> * complex_of_real (Im ?a)

goal (1 subgoal):
 1. (\<lambda>x. eucl_of_list [Re x, Im x]) \<circ> (\<lambda>x. complex_of_real (x $\<^sub>e 0) + \<i> * complex_of_real (x $\<^sub>e 1)) = id
[PROOF STEP]
by (auto simp add:vec_simps)


[STATEMENT]
lemma lower_dim_ex:
  "\<exists> A B C. \<not> (Bet A B C \<or> Bet B C A \<or> Bet C A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>A B C. \<not> (Bet A B C \<or> Bet B C A \<or> Bet C A B)
[PROOF STEP]
using lower_dim
[PROOF STATE]
proof (prove)
using this:
\<exists>a b c. \<not> Bet a b c \<and> \<not> Bet b c a \<and> \<not> Bet c a b

goal (1 subgoal):
 1. \<exists>A B C. \<not> (Bet A B C \<or> Bet B C A \<or> Bet C A B)
[PROOF STEP]
by auto


[STATEMENT]
lemma numsub_nb[simp]: "\<lbrakk> numbound0 t ; numbound0 s\<rbrakk> \<Longrightarrow> numbound0 (numsub t s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>numbound0 t; numbound0 s\<rbrakk> \<Longrightarrow> numbound0 (numsub t s)
[PROOF STEP]
using numsub_def
[PROOF STATE]
proof (prove)
using this:
numsub ?s ?t = (if ?s = ?t then C 0 else numadd ?s (numneg ?t))

goal (1 subgoal):
 1. \<lbrakk>numbound0 t; numbound0 s\<rbrakk> \<Longrightarrow> numbound0 (numsub t s)
[PROOF STEP]
by simp


[STATEMENT]
lemma formulasI:
  assumes "\<And>A B. \<forall>i\<in>S. i \<in> A \<longleftrightarrow> i \<in> B
    \<Longrightarrow> A \<in> Rep_formula x \<longleftrightarrow> B \<in> Rep_formula x"
  shows "x \<in> formulas S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> formulas S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>S. (i \<in> ?A) = (i \<in> ?B) \<Longrightarrow> (?A \<in> Rep_formula x) = (?B \<in> Rep_formula x)

goal (1 subgoal):
 1. x \<in> formulas S
[PROOF STEP]
unfolding formulas_def
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>S. (i \<in> ?A) = (i \<in> ?B) \<Longrightarrow> (?A \<in> Rep_formula x) = (?B \<in> Rep_formula x)

goal (1 subgoal):
 1. x \<in> {x. \<forall>A B. (\<forall>i\<in>S. (i \<in> A) = (i \<in> B)) \<longrightarrow> (A \<in> Rep_formula x) = (B \<in> Rep_formula x)}
[PROOF STEP]
by simp


[STATEMENT]
lemma divide_poly_field:
  fixes f g :: "'a::field poly"
  defines "f' \<equiv> smult ((1 / coeff g (degree g)) ^ (Suc (degree f) - degree g)) f"
  shows "f div g = fst (pseudo_divmod f' g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
proof (cases "g = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. g = 0 \<Longrightarrow> f div g = fst (pseudo_divmod f' g)
 2. g \<noteq> 0 \<Longrightarrow> f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
g = 0

goal (2 subgoals):
 1. g = 0 \<Longrightarrow> f div g = fst (pseudo_divmod f' g)
 2. g \<noteq> 0 \<Longrightarrow> f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
unfolding divide_poly_def pseudo_divmod_def Let_def f'_def True
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if 0 = 0 then 0 else divide_poly_main (lead_coeff 0) 0 f 0 (degree f) (1 + length (coeffs f) - length (coeffs 0))) = fst (if 0 = 0 then (0, smult (((1::'a) / lead_coeff 0) ^ (Suc (degree f) - degree 0)) f) else pseudo_divmod_main (lead_coeff 0) 0 (smult (((1::'a) / lead_coeff 0) ^ (Suc (degree f) - degree 0)) f) 0 (degree (smult (((1::'a) / lead_coeff 0) ^ (Suc (degree f) - degree 0)) f)) (1 + length (coeffs (smult (((1::'a) / lead_coeff 0) ^ (Suc (degree f) - degree 0)) f)) - length (coeffs 0)))
[PROOF STEP]
by (simp add: divide_poly_main_0)
[PROOF STATE]
proof (state)
this:
f div g = fst (pseudo_divmod f' g)

goal (1 subgoal):
 1. g \<noteq> 0 \<Longrightarrow> f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g \<noteq> 0 \<Longrightarrow> f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
g \<noteq> 0

goal (1 subgoal):
 1. g \<noteq> 0 \<Longrightarrow> f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
from leading_coeff_neq_0[OF False]
[PROOF STATE]
proof (chain)
picking this:
lead_coeff g \<noteq> (0::'a)
[PROOF STEP]
have "degree f' = degree f"
[PROOF STATE]
proof (prove)
using this:
lead_coeff g \<noteq> (0::'a)

goal (1 subgoal):
 1. degree f' = degree f
[PROOF STEP]
by (auto simp: f'_def)
[PROOF STATE]
proof (state)
this:
degree f' = degree f

goal (1 subgoal):
 1. g \<noteq> 0 \<Longrightarrow> f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
degree f' = degree f
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
degree f' = degree f

goal (1 subgoal):
 1. f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
using length_coeffs_degree[of f'] length_coeffs_degree[of f]
[PROOF STATE]
proof (prove)
using this:
degree f' = degree f
f' \<noteq> 0 \<Longrightarrow> length (coeffs f') = Suc (degree f')
f \<noteq> 0 \<Longrightarrow> length (coeffs f) = Suc (degree f)

goal (1 subgoal):
 1. f div g = fst (pseudo_divmod f' g)
[PROOF STEP]
unfolding divide_poly_def pseudo_divmod_def Let_def
      divide_poly_main_field[OF False]
      length_coeffs_degree[OF False]
      f'_def
[PROOF STATE]
proof (prove)
using this:
degree (smult (((1::'a) / lead_coeff g) ^ (Suc (degree f) - degree g)) f) = degree f
smult (((1::'a) / lead_coeff g) ^ (Suc (degree f) - degree g)) f \<noteq> 0 \<Longrightarrow> length (coeffs (smult (((1::'a) / lead_coeff g) ^ (Suc (degree f) - degree g)) f)) = Suc (degree (smult (((1::'a) / lead_coeff g) ^ (Suc (degree f) - degree g)) f))
f \<noteq> 0 \<Longrightarrow> length (coeffs f) = Suc (degree f)

goal (1 subgoal):
 1. (if g = 0 then 0 else fst (pseudo_divmod_main (lead_coeff g) (smult (((1::'a) / lead_coeff g) ^ (1 + length (coeffs f) - Suc (degree g))) 0) (smult (((1::'a) / lead_coeff g) ^ (1 + length (coeffs f) - Suc (degree g))) f) g (degree f) (1 + length (coeffs f) - Suc (degree g)))) = fst (if g = 0 then (0, smult (((1::'a) / lead_coeff g) ^ (Suc (degree f) - degree g)) f) else pseudo_divmod_main (lead_coeff g) 0 (smult (((1::'a) / lead_coeff g) ^ (Suc (degree f) - degree g)) f) g (degree (smult (((1::'a) / lead_coeff g) ^ (Suc (degree f) - degree g)) f)) (1 + length (coeffs (smult (((1::'a) / lead_coeff g) ^ (Suc (degree f) - degree g)) f)) - Suc (degree g)))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
f div g = fst (pseudo_divmod f' g)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma strongly_connected_iso[simp]: "strongly_connected (app_iso hom G) \<longleftrightarrow> strongly_connected G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. strongly_connected (app_iso hom G) = strongly_connected G
[PROOF STEP]
using hom
[PROOF STATE]
proof (prove)
using this:
digraph_isomorphism hom

goal (1 subgoal):
 1. strongly_connected (app_iso hom G) = strongly_connected G
[PROOF STEP]
by (auto simp: strongly_connected_def reachable_app_iso_eq)


[STATEMENT]
lemma arctan_less_zero_iff [simp]: "arctan x < 0 \<longleftrightarrow> x < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (arctan x < 0) = (x < 0)
[PROOF STEP]
using arctan_less_iff [of x 0]
[PROOF STATE]
proof (prove)
using this:
(arctan x < arctan 0) = (x < 0)

goal (1 subgoal):
 1. (arctan x < 0) = (x < 0)
[PROOF STEP]
by simp


[STATEMENT]
lemma val_Zp_dist_infty:
  assumes "a \<in> carrier Zp"
  assumes "b \<in> carrier Zp"
  assumes "val_Zp_dist a b = \<infinity>"
  shows "a = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a = b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<in> carrier Zp
b \<in> carrier Zp
val_Zp_dist a b = \<infinity>

goal (1 subgoal):
 1. a = b
[PROOF STEP]
unfolding val_Zp_dist_def
[PROOF STATE]
proof (prove)
using this:
a \<in> carrier Zp
b \<in> carrier Zp
val_Zp (a \<ominus> b) = \<infinity>

goal (1 subgoal):
 1. a = b
[PROOF STEP]
by (metis R.r_right_minus_eq not_eint_eq val_ord_Zp)


[STATEMENT]
lemma one_less_of_rat_iff [simp]: "1 < (of_rat r :: 'a::linordered_field) \<longleftrightarrow> 1 < r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((1::'a) < of_rat r) = (1 < r)
[PROOF STEP]
using of_rat_less [of 1 r]
[PROOF STATE]
proof (prove)
using this:
(of_rat 1 < of_rat r) = (1 < r)

goal (1 subgoal):
 1. ((1::'a) < of_rat r) = (1 < r)
[PROOF STEP]
by simp


[STATEMENT]
lemma filterlim_at_split:
  "filterlim f F (at x) \<longleftrightarrow> filterlim f F (at_left x) \<and> filterlim f F (at_right x)"
  for x :: "'a::linorder_topology"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. filterlim f F (at x) = (filterlim f F (at_left x) \<and> filterlim f F (at_right x))
[PROOF STEP]
by (subst at_eq_sup_left_right) (simp add: filterlim_def filtermap_sup)


[STATEMENT]
lemma card_atLeastAtMost_word: fixes s::"('a::len) word" shows "card {s..e} = Suc (unat e) - (unat s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {s..e} = Suc (unat e) - unat s
[PROOF STEP]
apply(cases "s > e")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. e < s \<Longrightarrow> card {s..e} = Suc (unat e) - unat s
 2. \<not> e < s \<Longrightarrow> card {s..e} = Suc (unat e) - unat s
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. e < s \<Longrightarrow> Suc (unat e) \<le> unat s
 2. \<not> e < s \<Longrightarrow> card {s..e} = Suc (unat e) - unat s
[PROOF STEP]
apply(subst(asm) Word.word_less_nat_alt)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. unat e < unat s \<Longrightarrow> Suc (unat e) \<le> unat s
 2. \<not> e < s \<Longrightarrow> card {s..e} = Suc (unat e) - unat s
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> e < s \<Longrightarrow> card {s..e} = Suc (unat e) - unat s
[PROOF STEP]
apply(subst upto_enum_set_conv2[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> e < s \<Longrightarrow> card (set [s .e. e]) = Suc (unat e) - unat s
[PROOF STEP]
apply(subst List.card_set)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> e < s \<Longrightarrow> length (remdups [s .e. e]) = Suc (unat e) - unat s
[PROOF STEP]
apply(simp add: remdups_enum_upto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma inorder_del: "\<lbrakk> bal t ; sorted1(inorder t) \<rbrakk> \<Longrightarrow>
  inorder(tree\<^sub>d (del x t)) = del_list x (inorder t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>bal t; sorted1 (inorder t)\<rbrakk> \<Longrightarrow> inorder (tree\<^sub>d (Tree234_Map.del x t)) = AList_Upd_Del.del_list x (inorder t)
[PROOF STEP]
by(induction t rule: del.induct)
  (auto simp: del_list_simps inorder_nodes split_minD split!: if_splits prod.splits)


[STATEMENT]
lemma (in PolynRg) coeff_nonzero_polyn_nonzero:"\<lbrakk>pol_coeff S c; k \<le> (fst c)\<rbrakk>
    \<Longrightarrow> (polyn_expr R X k c \<noteq> \<zero>) = (\<exists>j\<le>k. (snd c) j \<noteq> \<zero>\<^bsub>S\<^esub> )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pol_coeff S c; k \<le> fst c\<rbrakk> \<Longrightarrow> (polyn_expr R X k c \<noteq> \<zero>) = (\<exists>j\<le>k. snd c j \<noteq> \<zero>\<^bsub>S\<^esub>)
[PROOF STEP]
by (simp add:coeff_0_pol_0[THEN sym, of c k])


[STATEMENT]
lemma ennexp_tendsto [tendsto_intros]:
  assumes "((\<lambda>n. u n) \<longlongrightarrow> l) F"
  shows "((\<lambda>n. ennexp(u n)) \<longlongrightarrow> ennexp l) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>n. ennexp (u n)) \<longlongrightarrow> ennexp l) F
[PROOF STEP]
using ennexp_continuous assms
[PROOF STATE]
proof (prove)
using this:
continuous_on UNIV ennexp
(u \<longlongrightarrow> l) F

goal (1 subgoal):
 1. ((\<lambda>n. ennexp (u n)) \<longlongrightarrow> ennexp l) F
[PROOF STEP]
by (metis UNIV_I continuous_on tendsto_compose)


[STATEMENT]
lemma measure_preserving_comp:
  assumes "f \<in> measure_preserving M N"
          "g \<in> measure_preserving N P"
  shows "g o f \<in> measure_preserving M P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<circ> f \<in> measure_preserving M P
[PROOF STEP]
unfolding o_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. g (f x)) \<in> measure_preserving M P
[PROOF STEP]
using measure_preserving_composition assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?f \<in> measure_preserving ?M ?N; ?g \<in> measure_preserving ?N ?P\<rbrakk> \<Longrightarrow> (\<lambda>x. ?g (?f x)) \<in> measure_preserving ?M ?P
f \<in> measure_preserving M N
g \<in> measure_preserving N P

goal (1 subgoal):
 1. (\<lambda>x. g (f x)) \<in> measure_preserving M P
[PROOF STEP]
by blast


[STATEMENT]
lemma cfs_a_inv [simp]:
  assumes R: "p \<in> carrier P"
  shows "(\<ominus>\<^bsub>P\<^esub> p) n = \<ominus> (p n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<ominus>\<^bsub>P\<^esub> p) n = \<ominus> p n
[PROOF STEP]
using P.add.inv_closed P_def UP_ring.coeff_a_inv UP_ring.coeff_simp UP_ring_axioms assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> carrier P \<Longrightarrow> \<ominus>\<^bsub>P\<^esub> ?x \<in> carrier P
P \<equiv> UP R
\<lbrakk>UP_ring ?R; ?p \<in> carrier (UP ?R)\<rbrakk> \<Longrightarrow> coeff (UP ?R) (\<ominus>\<^bsub>UP ?R\<^esub> ?p) ?n = \<ominus>\<^bsub>?R\<^esub> coeff (UP ?R) ?p ?n
\<lbrakk>UP_ring ?R; ?f \<in> carrier (UP ?R)\<rbrakk> \<Longrightarrow> coeff (UP ?R) ?f = ?f
UP_ring R
p \<in> carrier P

goal (1 subgoal):
 1. (\<ominus>\<^bsub>P\<^esub> p) n = \<ominus> p n
[PROOF STEP]
by fastforce


[STATEMENT]
lemma continuous_imp_homeomorphic_map:
   "\<lbrakk>continuous_map X Y f; compact_space X; Hausdorff_space Y;
     f ` (topspace X) = topspace Y; inj_on f (topspace X)\<rbrakk>
        \<Longrightarrow> homeomorphic_map X Y f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_map X Y f; compact_space X; Hausdorff_space Y; f ` topspace X = topspace Y; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> homeomorphic_map X Y f
[PROOF STEP]
by (simp add: continuous_imp_closed_map bijective_closed_imp_homeomorphic_map)


[STATEMENT]
lemma finite_lattice_complete_Sup_insert:
  fixes A :: "'a::finite_lattice_complete set"
  shows "Sup (insert x A) = sup x (Sup A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup (insert x A) = sup x (Sup A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Sup (insert x A) = sup x (Sup A)
[PROOF STEP]
interpret comp_fun_idem "sup :: 'a \<Rightarrow> _"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comp_fun_idem sup
[PROOF STEP]
by (fact comp_fun_idem_sup)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Sup (insert x A) = sup x (Sup A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup (insert x A) = sup x (Sup A)
[PROOF STEP]
by (simp add: Sup_def)
[PROOF STATE]
proof (state)
this:
Sup (insert x A) = sup x (Sup A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma minus_order: "-a \<le> -b \<Longrightarrow> b \<le> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - a \<le> - b \<Longrightarrow> b \<le> a
[PROOF STEP]
apply (cut_tac a = "-a" and b = "-b" and u = a and v = b in add_order_preserving)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. - a \<le> - b \<Longrightarrow> - a \<le> - b
 2. \<lbrakk>- a \<le> - b; a + - a + b \<le> a + - b + b\<rbrakk> \<Longrightarrow> b \<le> a
[PROOF STEP]
by simp_all


[STATEMENT]
lemma finite_nat_seg: "finite {x. elem_index x < n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {x. elem_index x < n}
[PROOF STEP]
proof (rule finite_imageD)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite (?f ` {x. elem_index x < n})
 2. inj_on ?f {x. elem_index x < n}
[PROOF STEP]
have "elem_index ` {x. elem_index x < n} \<subseteq> {0..<n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. elem_index ` {x. elem_index x < n} \<subseteq> {0..<n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
elem_index ` {x. elem_index x < n} \<subseteq> {0..<n}

goal (2 subgoals):
 1. finite (?f ` {x. elem_index x < n})
 2. inj_on ?f {x. elem_index x < n}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
elem_index ` {x. elem_index x < n} \<subseteq> {0..<n}

goal (2 subgoals):
 1. finite (?f ` {x. elem_index x < n})
 2. inj_on ?f {x. elem_index x < n}
[PROOF STEP]
have "finite ..."
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {0..<n}
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
finite {0..<n}

goal (2 subgoals):
 1. finite (?f ` {x. elem_index x < n})
 2. inj_on ?f {x. elem_index x < n}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
elem_index ` {x. elem_index x < n} \<subseteq> {0..<n}
finite {0..<n}
[PROOF STEP]
show "finite (elem_index ` {x. elem_index x < n})"
[PROOF STATE]
proof (prove)
using this:
elem_index ` {x. elem_index x < n} \<subseteq> {0..<n}
finite {0..<n}

goal (1 subgoal):
 1. finite (elem_index ` {x. elem_index x < n})
[PROOF STEP]
by (rule finite_subset)
[PROOF STATE]
proof (state)
this:
finite (elem_index ` {x. elem_index x < n})

goal (1 subgoal):
 1. inj_on elem_index {x. elem_index x < n}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on elem_index {x. elem_index x < n}
[PROOF STEP]
from inj_elem_index
[PROOF STATE]
proof (chain)
picking this:
inj elem_index
[PROOF STEP]
show "inj_on elem_index {x. elem_index x < n}"
[PROOF STATE]
proof (prove)
using this:
inj elem_index

goal (1 subgoal):
 1. inj_on elem_index {x. elem_index x < n}
[PROOF STEP]
using inj_on_subset
[PROOF STATE]
proof (prove)
using this:
inj elem_index
\<lbrakk>inj_on ?f ?A; ?B \<subseteq> ?A\<rbrakk> \<Longrightarrow> inj_on ?f ?B

goal (1 subgoal):
 1. inj_on elem_index {x. elem_index x < n}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inj_on elem_index {x. elem_index x < n}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma max_mult_left:
  assumes "(x::real) > 0"
  shows   "x * max y z = max (x*y) (x*z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * max y z = max (x * y) (x * z)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. x * max y z = max (x * y) (x * z)
[PROOF STEP]
by (auto simp add: max_def algebra_simps)


[STATEMENT]
lemma (in domain) bounded_degree_dimension:
  assumes "subfield K R"
  shows "ring.dimension (K[X]) n (poly_of_const ` K) { q \<in> carrier (K[X]). length q \<le> n }"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ring.dimension (K [X]) n (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ring.dimension (K [X]) n (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}
[PROOF STEP]
interpret UP: domain "K[X]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. domain (K [X])
[PROOF STEP]
using univ_poly_is_domain[OF subfieldE(1)[OF assms]]
[PROOF STATE]
proof (prove)
using this:
domain (K [X])

goal (1 subgoal):
 1. domain (K [X])
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. UP.dimension n (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}
[PROOF STEP]
have "length (UP.exp_base X n) = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (UP.exp_base X n) = n
[PROOF STEP]
unfolding UP.exp_base_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (map (([^]\<^bsub>K [X]\<^esub>) X) (rev [0..<n])) = n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (UP.exp_base X n) = n

goal (1 subgoal):
 1. UP.dimension n (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
length (UP.exp_base X n) = n

goal (1 subgoal):
 1. UP.dimension n (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}
[PROOF STEP]
using UP.dimension_independent[OF var_pow_base_independent[OF assms], of n]
[PROOF STATE]
proof (prove)
using this:
length (UP.exp_base X n) = n
UP.dimension (length (UP.exp_base X n)) (poly_of_const ` K) (UP.Span (poly_of_const ` K) (UP.exp_base X n))

goal (1 subgoal):
 1. UP.dimension n (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}
[PROOF STEP]
unfolding Span_var_pow_base[OF assms]
[PROOF STATE]
proof (prove)
using this:
length (UP.exp_base X n) = n
UP.dimension (length (UP.exp_base X n)) (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}

goal (1 subgoal):
 1. UP.dimension n (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
UP.dimension n (poly_of_const ` K) {q \<in> carrier (K [X]). length q \<le> n}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma euler_mascheroni_sequence_nonneg:
  assumes "n > 0"
  shows   "harm n - ln (real n) \<ge> (0 :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> harm n - ln (real n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 \<le> harm n - ln (real n)
[PROOF STEP]
have "ln (real n) \<le> ln (real n + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ln (real n) \<le> ln (real n + 1)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. ln (real n) \<le> ln (real n + 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ln (real n) \<le> ln (real n + 1)

goal (1 subgoal):
 1. 0 \<le> harm n - ln (real n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ln (real n) \<le> ln (real n + 1)

goal (1 subgoal):
 1. 0 \<le> harm n - ln (real n)
[PROOF STEP]
have "\<dots> \<le> harm n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ln (real n + 1) \<le> harm n
[PROOF STEP]
by (rule harm_ge_ln)
[PROOF STATE]
proof (state)
this:
ln (real n + 1) \<le> harm n

goal (1 subgoal):
 1. 0 \<le> harm n - ln (real n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ln (real n) \<le> harm n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ln (real n) \<le> harm n

goal (1 subgoal):
 1. 0 \<le> harm n - ln (real n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> harm n - ln (real n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma take_bit_minus:
  \<open>take_bit n (- take_bit n k) = take_bit n (- k)\<close>
    for k :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take_bit n (- take_bit n k) = take_bit n (- k)
[PROOF STEP]
by (simp add: take_bit_eq_mod mod_minus_eq)


[STATEMENT]
lemma isCont_minus [simp]: "isCont f a \<Longrightarrow> isCont (\<lambda>x. - f x) a"
  for f :: "'a::t2_space \<Rightarrow> 'b::real_normed_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont f a \<Longrightarrow> isCont (\<lambda>x. - f x) a
[PROOF STEP]
by (fact continuous_minus)


[STATEMENT]
lemma join_cont1:
  assumes "chain Y"
  assumes compat: "\<And> i. compatible (Y i) y"
  shows "(\<Squnion>i. Y i) \<squnion> y = (\<Squnion> i. Y i \<squnion> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>i. Y i) \<squnion> y = (\<Squnion>i. Y i \<squnion> y)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Squnion>i. Y i) \<squnion> y = (\<Squnion>i. Y i \<squnion> y)
[PROOF STEP]
have c: "chain (\<lambda>i. Y i \<squnion> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. chain (\<lambda>i. Y i \<squnion> y)
[PROOF STEP]
apply (rule chainI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. Y i \<squnion> y \<sqsubseteq> Y (Suc i) \<squnion> y
[PROOF STEP]
apply (rule join_mono[OF compat compat chainE[OF \<open>chain Y\<close>] below_refl])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
chain (\<lambda>i. Y i \<squnion> y)

goal (1 subgoal):
 1. (\<Squnion>i. Y i) \<squnion> y = (\<Squnion>i. Y i \<squnion> y)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion>i. Y i) \<squnion> y = (\<Squnion>i. Y i \<squnion> y)
[PROOF STEP]
apply (rule is_joinI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (\<Squnion>i. Y i) \<sqsubseteq> (\<Squnion>i. Y i \<squnion> y)
 2. y \<sqsubseteq> (\<Squnion>i. Y i \<squnion> y)
 3. \<And>a. \<lbrakk>(\<Squnion>i. Y i) \<sqsubseteq> a; y \<sqsubseteq> a\<rbrakk> \<Longrightarrow> (\<Squnion>i. Y i \<squnion> y) \<sqsubseteq> a
[PROOF STEP]
apply (rule lub_mono[OF \<open>chain Y\<close> c join_above1[OF compat]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. y \<sqsubseteq> (\<Squnion>i. Y i \<squnion> y)
 2. \<And>a. \<lbrakk>(\<Squnion>i. Y i) \<sqsubseteq> a; y \<sqsubseteq> a\<rbrakk> \<Longrightarrow> (\<Squnion>i. Y i \<squnion> y) \<sqsubseteq> a
[PROOF STEP]
apply (rule below_lub[OF c join_above2[OF compat]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>(\<Squnion>i. Y i) \<sqsubseteq> a; y \<sqsubseteq> a\<rbrakk> \<Longrightarrow> (\<Squnion>i. Y i \<squnion> y) \<sqsubseteq> a
[PROOF STEP]
apply (rule lub_below[OF c])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a i. \<lbrakk>(\<Squnion>i. Y i) \<sqsubseteq> a; y \<sqsubseteq> a\<rbrakk> \<Longrightarrow> Y i \<squnion> y \<sqsubseteq> a
[PROOF STEP]
apply (rule join_below[OF compat])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a i. \<lbrakk>(\<Squnion>i. Y i) \<sqsubseteq> a; y \<sqsubseteq> a\<rbrakk> \<Longrightarrow> Y i \<sqsubseteq> a
 2. \<And>a i. \<lbrakk>(\<Squnion>i. Y i) \<sqsubseteq> a; y \<sqsubseteq> a\<rbrakk> \<Longrightarrow> y \<sqsubseteq> a
[PROOF STEP]
apply (metis lub_below_iff[OF \<open>chain Y\<close>])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a i. \<lbrakk>(\<Squnion>i. Y i) \<sqsubseteq> a; y \<sqsubseteq> a\<rbrakk> \<Longrightarrow> y \<sqsubseteq> a
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(\<Squnion>i. Y i) \<squnion> y = (\<Squnion>i. Y i \<squnion> y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma p2r_simps[simp]:
  "\<lceil>P\<rceil> \<le> \<lceil>Q\<rceil> = (\<forall>s. P s \<longrightarrow> Q s)"
  "(\<lceil>P\<rceil> = \<lceil>Q\<rceil>) = (\<forall>s. P s = Q s)"
  "(\<lceil>P\<rceil> ; \<lceil>Q\<rceil>) = \<lceil>\<lambda> s. P s \<and> Q s\<rceil>"
  "(\<lceil>P\<rceil> \<union> \<lceil>Q\<rceil>) = \<lceil>\<lambda> s. P s \<or> Q s\<rceil>"
  "rel_tests.t \<lceil>P\<rceil> = \<lceil>P\<rceil>"
  "(- Id) \<union> \<lceil>P\<rceil> = - \<lceil>\<lambda>s. \<not> P s\<rceil>"
  "Id \<inter> (- \<lceil>P\<rceil>) = \<lceil>\<lambda>s. \<not> P s\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lceil>P\<rceil> \<subseteq> \<lceil>Q\<rceil>) = (\<forall>s. P s \<longrightarrow> Q s) &&& (\<lceil>P\<rceil> = \<lceil>Q\<rceil>) = (\<forall>s. P s = Q s) &&& \<lceil>P\<rceil> ; \<lceil>Q\<rceil> = \<lceil>\<lambda>s. P s \<and> Q s\<rceil>) &&& (\<lceil>P\<rceil> \<union> \<lceil>Q\<rceil> = \<lceil>\<lambda>s. P s \<or> Q s\<rceil> &&& rel_tests.t \<lceil>P\<rceil> = \<lceil>P\<rceil>) &&& - skip \<union> \<lceil>P\<rceil> = - \<lceil>\<lambda>s. \<not> P s\<rceil> &&& skip \<inter> - \<lceil>P\<rceil> = \<lceil>\<lambda>s. \<not> P s\<rceil>
[PROOF STEP]
unfolding p2r_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (({(s, s) |s. P s} \<subseteq> {(s, s) |s. Q s}) = (\<forall>s. P s \<longrightarrow> Q s) &&& ({(s, s) |s. P s} = {(s, s) |s. Q s}) = (\<forall>s. P s = Q s) &&& {(s, s) |s. P s} ; {(s, s) |s. Q s} = {(s, s) |s. P s \<and> Q s}) &&& ({(s, s) |s. P s} \<union> {(s, s) |s. Q s} = {(s, s) |s. P s \<or> Q s} &&& rel_tests.t {(s, s) |s. P s} = {(s, s) |s. P s}) &&& - skip \<union> {(s, s) |s. P s} = - {(s, s) |s. \<not> P s} &&& skip \<inter> - {(s, s) |s. P s} = {(s, s) |s. \<not> P s}
[PROOF STEP]
by auto


[STATEMENT]
lemma Qp_times_basic_semialg_left_is_semialgebraic':
  assumes "A \<in> basic_semialgs n"
  shows "is_semialgebraic (n + m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>m\<^esup>)) A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_semialgebraic (n + m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>m\<^esup>)) A)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_semialgebraic (n + m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>m\<^esup>)) A)
[PROOF STEP]
obtain k P where "k \<noteq> 0 \<and> P\<in>carrier (Q\<^sub>p[\<X>\<^bsub>n\<^esub>])\<and> A = basic_semialg_set n k P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k P. k \<noteq> 0 \<and> P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>]) \<and> A = basic_semialg_set n k P \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms  is_basic_semialg_def
[PROOF STATE]
proof (prove)
using this:
A \<in> {S. is_basic_semialg n S}
is_basic_semialg ?m ?S \<equiv> \<exists>n. n \<noteq> 0 \<and> (\<exists>P\<in>carrier (Q\<^sub>p [\<X>\<^bsub>?m\<^esub>]). ?S = basic_semialg_set ?m n P)

goal (1 subgoal):
 1. (\<And>k P. k \<noteq> 0 \<and> P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>]) \<and> A = basic_semialg_set n k P \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis mem_Collect_eq)
[PROOF STATE]
proof (state)
this:
k \<noteq> 0 \<and> P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>]) \<and> A = basic_semialg_set n k P

goal (1 subgoal):
 1. is_semialgebraic (n + m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>m\<^esup>)) A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k \<noteq> 0 \<and> P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>]) \<and> A = basic_semialg_set n k P
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
k \<noteq> 0 \<and> P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>]) \<and> A = basic_semialg_set n k P

goal (1 subgoal):
 1. is_semialgebraic (n + m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>m\<^esup>)) A)
[PROOF STEP]
using
      Qp_times_basic_semialg_left_is_semialgebraic[of k P]
[PROOF STATE]
proof (prove)
using this:
k \<noteq> 0 \<and> P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>]) \<and> A = basic_semialg_set n k P
\<lbrakk>0 < k; P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>?n\<^esub>])\<rbrakk> \<Longrightarrow> is_semialgebraic (?n + ?m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>?m\<^esup>)) (basic_semialg_set ?n k P))

goal (1 subgoal):
 1. is_semialgebraic (n + m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>m\<^esup>)) A)
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
k \<noteq> 0 \<and> P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>]) \<and> A = basic_semialg_set n k P
\<lbrakk>0 < k; P \<in> carrier (Q\<^sub>p [\<X>\<^bsub>?n\<^esub>])\<rbrakk> \<Longrightarrow> is_semialgebraic (?n + ?m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>?m\<^esup>)) (basic_semialg_set ?n k P))
A \<in> {S. is_basic_semialg n S}

goal (1 subgoal):
 1. is_semialgebraic (n + m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>m\<^esup>)) A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
is_semialgebraic (n + m) (cartesian_product (carrier (Q\<^sub>p\<^bsup>m\<^esup>)) A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Max_atm_of_set_mset_commute: "C \<noteq> {#} \<Longrightarrow> Max (atm_of ` set_mset C) = atm_of (Max_mset C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<noteq> {#} \<Longrightarrow> Max (atm_of ` set_mset C) = atm_of (Max_mset C)
[PROOF STEP]
by (rule mono_Max_commute[symmetric]) (auto simp: mono_def less_eq_literal_def)


[STATEMENT]
lemma closed_interval_left_cart:
  fixes b :: "real^'n"
  shows "closed {x::real^'n. \<forall>i. x$i \<le> b$i}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed {x. \<forall>i. x $ i \<le> b $ i}
[PROOF STEP]
by (simp add: Collect_all_eq closed_INT closed_Collect_le continuous_on_component)


[STATEMENT]
lemma wf_subst_subst_idem: "wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<theta> \<Longrightarrow> subst_idem \<theta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<theta> \<Longrightarrow> subst_idem \<theta>
[PROOF STEP]
using subst_idemI[of \<theta>]
[PROOF STATE]
proof (prove)
using this:
subst_domain \<theta> \<inter> range_vars \<theta> = {} \<Longrightarrow> subst_idem \<theta>

goal (1 subgoal):
 1. wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<theta> \<Longrightarrow> subst_idem \<theta>
[PROOF STEP]
unfolding wf\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t_def
[PROOF STATE]
proof (prove)
using this:
subst_domain \<theta> \<inter> range_vars \<theta> = {} \<Longrightarrow> subst_idem \<theta>

goal (1 subgoal):
 1. subst_domain \<theta> \<inter> range_vars \<theta> = {} \<and> finite (subst_domain \<theta>) \<Longrightarrow> subst_idem \<theta>
[PROOF STEP]
by fast


[STATEMENT]
lemma (in Group) one_unique:"\<lbrakk>a \<in> carrier G; x \<in> carrier G;  x \<cdot> a = x\<rbrakk> \<Longrightarrow>
                                a = \<one>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier G; x \<in> carrier G; x \<cdot> a = x\<rbrakk> \<Longrightarrow> a = \<one>
[PROOF STEP]
apply (frule mult_closed[of "x" "a"], assumption+,
       frule i_closed[of "x"],
       frule l_mult_eqn[of "x \<cdot> a" "x" "\<rho> x"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier G; x \<in> carrier G; x \<cdot> a = x; x \<cdot> a \<in> carrier G; \<rho> x \<in> carrier G; \<rho> x \<cdot> (x \<cdot> a) = \<rho> x \<cdot> x\<rbrakk> \<Longrightarrow> a = \<one>
[PROOF STEP]
apply (thin_tac "x \<cdot> a = x",
       simp add:tassoc[THEN sym, of "\<rho> x" "x" "a"],
       simp add:l_i l_unit)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in finite_measure) AE_support_countable:
  assumes [simp]: "sets M = UNIV"
  shows "(AE x in M. measure M {x} \<noteq> 0) \<longleftrightarrow> (\<exists>S. countable S \<and> (AE x in M. x \<in> S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0) = (\<exists>S. countable S \<and> (AE x in M. x \<in> S))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
assume "\<exists>S. countable S \<and> (AE x in M. x \<in> S)"
[PROOF STATE]
proof (state)
this:
\<exists>S. countable S \<and> (AE x in M. x \<in> S)

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>S. countable S \<and> (AE x in M. x \<in> S)
[PROOF STEP]
obtain S where S[intro]: "countable S" and ae: "AE x in M. x \<in> S"
[PROOF STATE]
proof (prove)
using this:
\<exists>S. countable S \<and> (AE x in M. x \<in> S)

goal (1 subgoal):
 1. (\<And>S. \<lbrakk>countable S; AE x in M. x \<in> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
countable S
AE x in M. x \<in> S

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
countable S
AE x in M. x \<in> S
[PROOF STEP]
have "emeasure M (\<Union>x\<in>{x\<in>S. emeasure M {x} \<noteq> 0}. {x}) =
    (\<integral>\<^sup>+ x. emeasure M {x} * indicator {x\<in>S. emeasure M {x} \<noteq> 0} x \<partial>count_space UNIV)"
[PROOF STATE]
proof (prove)
using this:
countable S
AE x in M. x \<in> S

goal (1 subgoal):
 1. emeasure M (\<Union>x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. {x}) = \<integral>\<^sup>+x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. emeasure M {x}\<partial>count_space UNIV
[PROOF STEP]
by (subst emeasure_UN_countable)
       (auto simp: disjoint_family_on_def nn_integral_restrict_space[symmetric] restrict_count_space)
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union>x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. {x}) = \<integral>\<^sup>+x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. emeasure M {x}\<partial>count_space UNIV

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union>x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. {x}) = \<integral>\<^sup>+x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. emeasure M {x}\<partial>count_space UNIV

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
have "\<dots> = (\<integral>\<^sup>+ x. emeasure M {x} * indicator S x \<partial>count_space UNIV)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. emeasure M {x}\<partial>count_space UNIV = \<integral>\<^sup>+x\<in>S. emeasure M {x}\<partial>count_space UNIV
[PROOF STEP]
by (auto intro!: nn_integral_cong split: split_indicator)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. emeasure M {x}\<partial>count_space UNIV = \<integral>\<^sup>+x\<in>S. emeasure M {x}\<partial>count_space UNIV

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. emeasure M {x}\<partial>count_space UNIV = \<integral>\<^sup>+x\<in>S. emeasure M {x}\<partial>count_space UNIV

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
have "\<dots> = emeasure M (\<Union>x\<in>S. {x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+x\<in>S. emeasure M {x}\<partial>count_space UNIV = emeasure M (\<Union>x\<in>S. {x})
[PROOF STEP]
by (subst emeasure_UN_countable)
       (auto simp: disjoint_family_on_def nn_integral_restrict_space[symmetric] restrict_count_space)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+x\<in>S. emeasure M {x}\<partial>count_space UNIV = emeasure M (\<Union>x\<in>S. {x})

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+x\<in>S. emeasure M {x}\<partial>count_space UNIV = emeasure M (\<Union>x\<in>S. {x})

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
have "\<dots> = emeasure M (space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (\<Union>x\<in>S. {x}) = emeasure M (space M)
[PROOF STEP]
using ae
[PROOF STATE]
proof (prove)
using this:
AE x in M. x \<in> S

goal (1 subgoal):
 1. emeasure M (\<Union>x\<in>S. {x}) = emeasure M (space M)
[PROOF STEP]
by (intro emeasure_eq_AE) auto
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union>x\<in>S. {x}) = emeasure M (space M)

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure M (\<Union>x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. {x}) = emeasure M (space M)
[PROOF STEP]
have "emeasure M {x \<in> space M. x\<in>S \<and> emeasure M {x} \<noteq> 0} = emeasure M (space M)"
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union>x\<in>{x \<in> S. emeasure M {x} \<noteq> 0}. {x}) = emeasure M (space M)

goal (1 subgoal):
 1. emeasure M {x \<in> space M. x \<in> S \<and> emeasure M {x} \<noteq> 0} = emeasure M (space M)
[PROOF STEP]
by (simp add: emeasure_single_in_space cong: rev_conj_cong)
[PROOF STATE]
proof (state)
this:
emeasure M {x \<in> space M. x \<in> S \<and> emeasure M {x} \<noteq> 0} = emeasure M (space M)

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
with finite_measure_compl[of "{x \<in> space M. x\<in>S \<and> emeasure M {x} \<noteq> 0}"]
[PROOF STATE]
proof (chain)
picking this:
{x \<in> space M. x \<in> S \<and> emeasure M {x} \<noteq> 0} \<in> sets M \<Longrightarrow> Sigma_Algebra.measure M (space M - {x \<in> space M. x \<in> S \<and> emeasure M {x} \<noteq> 0}) = Sigma_Algebra.measure M (space M) - \<P>(x in M. x \<in> S \<and> emeasure M {x} \<noteq> 0)
emeasure M {x \<in> space M. x \<in> S \<and> emeasure M {x} \<noteq> 0} = emeasure M (space M)
[PROOF STEP]
have "AE x in M. x \<in> S \<and> emeasure M {x} \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
{x \<in> space M. x \<in> S \<and> emeasure M {x} \<noteq> 0} \<in> sets M \<Longrightarrow> Sigma_Algebra.measure M (space M - {x \<in> space M. x \<in> S \<and> emeasure M {x} \<noteq> 0}) = Sigma_Algebra.measure M (space M) - \<P>(x in M. x \<in> S \<and> emeasure M {x} \<noteq> 0)
emeasure M {x \<in> space M. x \<in> S \<and> emeasure M {x} \<noteq> 0} = emeasure M (space M)

goal (1 subgoal):
 1. AE x in M. x \<in> S \<and> emeasure M {x} \<noteq> 0
[PROOF STEP]
by (intro AE_I[OF order_refl]) (auto simp: emeasure_eq_measure measure_nonneg set_diff_eq cong: conj_cong)
[PROOF STATE]
proof (state)
this:
AE x in M. x \<in> S \<and> emeasure M {x} \<noteq> 0

goal (2 subgoals):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
 2. \<exists>S. countable S \<and> (AE x in M. x \<in> S) \<Longrightarrow> AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
AE x in M. x \<in> S \<and> emeasure M {x} \<noteq> 0
[PROOF STEP]
show "AE x in M. measure M {x} \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
AE x in M. x \<in> S \<and> emeasure M {x} \<noteq> 0

goal (1 subgoal):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0
[PROOF STEP]
by (auto simp: emeasure_eq_measure)
[PROOF STATE]
proof (state)
this:
AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0

goal (1 subgoal):
 1. AE x in M. Sigma_Algebra.measure M {x} \<noteq> 0 \<Longrightarrow> \<exists>S. countable S \<and> (AE x in M. x \<in> S)
[PROOF STEP]
qed (auto intro!: exI[of _ "{x. measure M {x} \<noteq> 0}"] countable_support)


[STATEMENT]
lemma lex_pm_plus_monotone: "lex_pm s t \<Longrightarrow> lex_pm (s + u) (t + u)"
  for s t::"_ \<Rightarrow>\<^sub>0 _::{ordered_comm_monoid_add, ordered_ab_semigroup_add_imp_le}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lex_pm s t \<Longrightarrow> lex_pm (s + u) (t + u)
[PROOF STEP]
by (simp add: lex_pm_def add_right_mono)


[STATEMENT]
lemma smod_mod_positive:
    "\<lbrakk> 0 \<le> (a :: int); 0 \<le> b \<rbrakk> \<Longrightarrow> a smod b = a mod b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> a; 0 \<le> b\<rbrakk> \<Longrightarrow> a smod b = a mod b
[PROOF STEP]
by (clarsimp simp: smod_int_alt_def zsgn_def)


[STATEMENT]
lemma countable_iff_bij[simp]: "bij_betw f A B \<Longrightarrow> countable A \<longleftrightarrow> countable B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw f A B \<Longrightarrow> countable A = countable B
[PROOF STEP]
by (blast intro: countableI_bij1 countableI_bij2)


[STATEMENT]
theorem invmono:
  assumes h1: "\<turnstile> I \<longrightarrow> P"
      and h2: "|~ P \<and> [N]_f \<longrightarrow> \<circle>P"
  shows "\<turnstile> I \<and> \<box>[N]_f \<longrightarrow> \<box>P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> I \<and> \<box>[N]_f \<longrightarrow> \<box>P
[PROOF STEP]
using h1 INV1[OF h2]
[PROOF STATE]
proof (prove)
using this:
\<turnstile> I \<longrightarrow> P
\<turnstile> P \<and> \<box>[N]_f \<longrightarrow> \<box>P

goal (1 subgoal):
 1. \<turnstile> I \<and> \<box>[N]_f \<longrightarrow> \<box>P
[PROOF STEP]
by force


[STATEMENT]
lemma infinite_sumset_iff:
  shows  "infinite (sumset A B) \<longleftrightarrow> infinite (A \<inter> G) \<and> B \<inter> G \<noteq> {} \<or> A \<inter> G \<noteq> {} \<and> infinite (B \<inter> G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite (sumset A B) = (infinite (A \<inter> G) \<and> B \<inter> G \<noteq> {} \<or> A \<inter> G \<noteq> {} \<and> infinite (B \<inter> G))
[PROOF STEP]
by (metis (no_types, lifting) finite_sumset' infinite_sumset_aux sumset_commute)


[STATEMENT]
lemma create_opt_sol_in_LP:
  assumes "create_optimal_solutions A b c = Sat X"
  assumes "(x, y) = split_n_m_x (dim_vec c) (dim_vec b) X"
  shows "[A *\<^sub>v x]\<le>b" "[y \<^sub>v* A]=c" "x \<bullet> c \<ge> y \<bullet> b" "\<And>i. i < dim_vec y \<Longrightarrow> y$i \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([A*\<^sub>vx]\<le>b &&& [y\<^sub>v*A]=c) &&& y \<bullet> b \<le> x \<bullet> c &&& (\<And>i. i < dim_vec y \<Longrightarrow> 0 \<le> y $ i)
[PROOF STEP]
apply (metis Pair_inject assms(1) assms(2) create_opt_sol_sat_leq_mat dim_b_col_A dim_b_row_A split_i_j_x_def)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. [y\<^sub>v*A]=c
 2. y \<bullet> b \<le> x \<bullet> c
 3. \<And>i. i < dim_vec y \<Longrightarrow> 0 \<le> y $ i
[PROOF STEP]
using assms(1) assms(2) create_opt_sol_sat_eq_mat dim_b_col_A dim_b_row_A
[PROOF STATE]
proof (prove)
using this:
create_optimal_solutions A b c = Inr X
(x, y) = split_n_m_x (dim_vec c) (dim_vec b) X
\<lbrakk>dim_vec ?c = dim_row ?A\<^sup>T; dim_vec ?b = dim_col ?A\<^sup>T; create_optimal_solutions ?A ?b ?c = Inr ?X; (?x, ?y) = split_n_m_x (dim_vec ?c) (dim_vec ?b) ?X\<rbrakk> \<Longrightarrow> [?y\<^sub>v*?A]=?c
dim_vec c = dim_col A
dim_vec b = dim_row A

goal (3 subgoals):
 1. [y\<^sub>v*A]=c
 2. y \<bullet> b \<le> x \<bullet> c
 3. \<And>i. i < dim_vec y \<Longrightarrow> 0 \<le> y $ i
[PROOF STEP]
apply (metis index_transpose_mat(2) index_transpose_mat(3))
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. y \<bullet> b \<le> x \<bullet> c
 2. \<And>i. i < dim_vec y \<Longrightarrow> 0 \<le> y $ i
[PROOF STEP]
using assms(1) assms(2) create_opt_sol_satisfies_leq
[PROOF STATE]
proof (prove)
using this:
create_optimal_solutions A b c = Inr X
(x, y) = split_n_m_x (dim_vec c) (dim_vec b) X
\<lbrakk>create_optimal_solutions ?A ?b ?c = Inr ?X; (?x, ?y) = split_n_m_x (dim_vec ?c) (dim_vec ?b) ?X\<rbrakk> \<Longrightarrow> ?y \<bullet> ?b \<le> ?x \<bullet> ?c

goal (2 subgoals):
 1. y \<bullet> b \<le> x \<bullet> c
 2. \<And>i. i < dim_vec y \<Longrightarrow> 0 \<le> y $ i
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i < dim_vec y \<Longrightarrow> 0 \<le> y $ i
[PROOF STEP]
using assms(1) assms(2) create_opt_sol_satisfies_geq0
[PROOF STATE]
proof (prove)
using this:
create_optimal_solutions A b c = Inr X
(x, y) = split_n_m_x (dim_vec c) (dim_vec b) X
\<lbrakk>create_optimal_solutions ?A ?b ?c = Inr ?X; (?x, ?y) = split_n_m_x (dim_vec ?c) (dim_vec ?b) ?X; ?i < dim_vec ?y\<rbrakk> \<Longrightarrow> 0 \<le> ?y $ ?i

goal (1 subgoal):
 1. \<And>i. i < dim_vec y \<Longrightarrow> 0 \<le> y $ i
[PROOF STEP]
by blast


[STATEMENT]
theorem JF1map_comp: "JF1map (g o f) = JF1map g o JF1map f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. JF1map (g \<circ> f) = JF1map g \<circ> JF1map f
[PROOF STEP]
apply (rule sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. JF1map g \<circ> JF1map f = JF1map (g \<circ> f)
[PROOF STEP]
apply (rule conjunct1)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. JF1map g \<circ> JF1map f = JF1map (g \<circ> f) \<and> ?Q2
[PROOF STEP]
apply (rule JFmap_unique)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. dtor1 \<circ> (JF1map g \<circ> JF1map f) = F1map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor1
 2. dtor2 \<circ> ?v4 = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF o_assoc])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. dtor1 \<circ> JF1map g \<circ> JF1map f = F1map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor1
 2. dtor2 \<circ> ?v4 = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF arg_cong2[of _ _ _ _ "(o)", OF JF1map refl]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F1map g (JF1map g) (JF2map g) \<circ> dtor1 \<circ> JF1map f = F1map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor1
 2. dtor2 \<circ> ?v4 = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF sym[OF o_assoc]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F1map g (JF1map g) (JF2map g) \<circ> (dtor1 \<circ> JF1map f) = F1map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor1
 2. dtor2 \<circ> ?v4 = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF arg_cong[OF JF1map]])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F1map g (JF1map g) (JF2map g) \<circ> (F1map f (JF1map f) (JF2map f) \<circ> dtor1) = F1map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor1
 2. dtor2 \<circ> ?v4 = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF o_assoc])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. F1map g (JF1map g) (JF2map g) \<circ> F1map f (JF1map f) (JF2map f) \<circ> dtor1 = F1map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor1
 2. dtor2 \<circ> ?v4 = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) ?v4 \<circ> dtor2
[PROOF STEP]
apply (rule arg_cong2[of _ _ _ _ "(o)", OF sym[OF F1.map_comp0] refl])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dtor2 \<circ> (JF2map g \<circ> JF2map f) = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF o_assoc])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dtor2 \<circ> JF2map g \<circ> JF2map f = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF arg_cong2[of _ _ _ _ "(o)", OF JF2map refl]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F2map g (JF1map g) (JF2map g) \<circ> dtor2 \<circ> JF2map f = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF sym[OF o_assoc]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F2map g (JF1map g) (JF2map g) \<circ> (dtor2 \<circ> JF2map f) = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF arg_cong[OF JF2map]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F2map g (JF1map g) (JF2map g) \<circ> (F2map f (JF1map f) (JF2map f) \<circ> dtor2) = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor2
[PROOF STEP]
apply (rule trans[OF o_assoc])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F2map g (JF1map g) (JF2map g) \<circ> F2map f (JF1map f) (JF2map f) \<circ> dtor2 = F2map (g \<circ> f) (JF1map g \<circ> JF1map f) (JF2map g \<circ> JF2map f) \<circ> dtor2
[PROOF STEP]
apply (rule arg_cong2[of _ _ _ _ "(o)", OF sym[OF F2.map_comp0] refl])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma closed_Inter [continuous_intros, intro]: "\<forall>S\<in>K. closed S \<Longrightarrow> closed (\<Inter>K)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>S\<in>K. closed S \<Longrightarrow> closed (\<Inter> K)
[PROOF STEP]
unfolding closed_def uminus_Inf
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>S\<in>K. open (- S) \<Longrightarrow> open (\<Union> (uminus ` K))
[PROOF STEP]
by auto


[STATEMENT]
lemma (in rfr_disc_equity_market) discounted_rfr:
  shows "discounted_value r (prices Mkt risk_free_asset) n w = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. discounted_value r (prices Mkt risk_free_asset) n w = 1
[PROOF STEP]
unfolding discounted_value_def discount_factor_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (disc_rfr_proc r n w) * prices Mkt risk_free_asset n w = 1
[PROOF STEP]
using rf_price
[PROOF STATE]
proof (prove)
using this:
prices Mkt risk_free_asset = disc_rfr_proc r

goal (1 subgoal):
 1. inverse (disc_rfr_proc r n w) * prices Mkt risk_free_asset n w = 1
[PROOF STEP]
by (metis less_irrefl mult.commute positive right_inverse)


[STATEMENT]
lemma connected_component_trans:
  "connected_component S x y \<Longrightarrow> connected_component S y z \<Longrightarrow> connected_component S x z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>connected_component S x y; connected_component S y z\<rbrakk> \<Longrightarrow> connected_component S x z
[PROOF STEP]
unfolding connected_component_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<exists>T. connected T \<and> T \<subseteq> S \<and> x \<in> T \<and> y \<in> T; \<exists>T. connected T \<and> T \<subseteq> S \<and> y \<in> T \<and> z \<in> T\<rbrakk> \<Longrightarrow> \<exists>T. connected T \<and> T \<subseteq> S \<and> x \<in> T \<and> z \<in> T
[PROOF STEP]
by (metis Int_iff Un_iff Un_subset_iff equals0D connected_Un)


[STATEMENT]
lemma ball_times_subset: "ball a (c/2) \<times> ball b (c/2) \<subseteq> ball (a, b) c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
fix a' b'
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
have "sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) \<le> dist a a' + dist b b'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) \<le> dist a a' + dist b b'
[PROOF STEP]
by (rule real_le_lsqrt) (auto simp: power2_eq_square algebra_simps)
[PROOF STATE]
proof (state)
this:
sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) \<le> dist a a' + dist b b'

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) \<le> dist a a' + dist b b'

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
assume "a' \<in> ball a (c / 2)"
[PROOF STATE]
proof (state)
this:
a' \<in> ball a (c / 2)

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a' \<in> ball a (c / 2)
[PROOF STEP]
have "dist a a' < c / 2"
[PROOF STATE]
proof (prove)
using this:
a' \<in> ball a (c / 2)

goal (1 subgoal):
 1. dist a a' < c / 2
[PROOF STEP]
by (simp add:)
[PROOF STATE]
proof (state)
this:
dist a a' < c / 2

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
dist a a' < c / 2

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
assume "b' \<in> ball b (c / 2)"
[PROOF STATE]
proof (state)
this:
b' \<in> ball b (c / 2)

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
b' \<in> ball b (c / 2)
[PROOF STEP]
have "dist b b' < c / 2"
[PROOF STATE]
proof (prove)
using this:
b' \<in> ball b (c / 2)

goal (1 subgoal):
 1. dist b b' < c / 2
[PROOF STEP]
by (simp add:)
[PROOF STATE]
proof (state)
this:
dist b b' < c / 2

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<And>x y. x < y \<Longrightarrow> x + dist b b' < y + dist b b'; \<And>x y. x < y \<Longrightarrow> c / 2 + x < c / 2 + y\<rbrakk> \<Longrightarrow> sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) < c / 2 + c / 2
[PROOF STEP]
have "sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) < c"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x y. x < y \<Longrightarrow> x + dist b b' < y + dist b b'; \<And>x y. x < y \<Longrightarrow> c / 2 + x < c / 2 + y\<rbrakk> \<Longrightarrow> sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) < c / 2 + c / 2

goal (1 subgoal):
 1. sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) < c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sqrt ((dist a a')\<^sup>2 + (dist b b')\<^sup>2) < c

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>?a'2 \<in> ball a (c / 2); ?b'2 \<in> ball b (c / 2)\<rbrakk> \<Longrightarrow> sqrt ((dist a ?a'2)\<^sup>2 + (dist b ?b'2)\<^sup>2) < c

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a'2 \<in> ball a (c / 2); ?b'2 \<in> ball b (c / 2)\<rbrakk> \<Longrightarrow> sqrt ((dist a ?a'2)\<^sup>2 + (dist b ?b'2)\<^sup>2) < c

goal (1 subgoal):
 1. ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c
[PROOF STEP]
by (auto simp: dist_prod_def mem_cball)
[PROOF STATE]
proof (state)
this:
ball a (c / 2) \<times> ball b (c / 2) \<subseteq> ball (a, b) c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem catalan_asymptotics:
  "catalan \<sim>[at_top] (\<lambda>n. 4 ^ n / (sqrt pi * n powr (3/2)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
have "catalan \<sim>[at_top] (\<lambda>n. 2 * (- 4) ^ n * (1/2 gchoose (n+1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 2 * (- 4) ^ n * (1 / 2 gchoose (n + 1)))
[PROOF STEP]
by (subst catalan_closed_form_gbinomial) simp_all
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 2 * (- 4) ^ n * (1 / 2 gchoose (n + 1)))

goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 2 * (- 4) ^ n * (1 / 2 gchoose (n + 1)))

goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
have "(\<lambda>n. 1/2 gchoose (n+1)) \<sim>[at_top] (\<lambda>n. (-1)^(n+1) / (Gamma (-(1/2)) * real n powr (1/2 + 1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. 1 / 2 gchoose (n + 1)) \<sim>[sequentially] (\<lambda>n. (- 1) ^ (n + 1) / (Gamma (- (1 / 2)) * real n powr (1 / 2 + 1)))
[PROOF STEP]
using fraction_not_in_nats[of 2 1]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<not> is_unit 2; 2 \<noteq> 0\<rbrakk> \<Longrightarrow> of_int 1 / of_int 2 \<notin> \<nat>

goal (1 subgoal):
 1. (\<lambda>n. 1 / 2 gchoose (n + 1)) \<sim>[sequentially] (\<lambda>n. (- 1) ^ (n + 1) / (Gamma (- (1 / 2)) * real n powr (1 / 2 + 1)))
[PROOF STEP]
by (intro asymp_equiv_intros gbinomial_asymptotic') simp_all
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / 2 gchoose (n + 1)) \<sim>[sequentially] (\<lambda>n. (- 1) ^ (n + 1) / (Gamma (- (1 / 2)) * real n powr (1 / 2 + 1)))

goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 1 / 2 gchoose (n + 1)) \<sim>[sequentially] (\<lambda>n. (- 1) ^ (n + 1) / (Gamma (- (1 / 2)) * real n powr (1 / 2 + 1)))

goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
have "(\<lambda>n. 2 * (- 4) ^ n * \<dots> n) = (\<lambda>n. 4 ^ n / (sqrt pi * n powr (3/2)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. 2 * (- 4) ^ n * ((- 1) ^ (n + 1) / (Gamma (- (1 / 2)) * real n powr (1 / 2 + 1)))) = (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
by (intro ext) (simp add: Gamma_minus_one_half_real power_mult_distrib [symmetric])
[PROOF STATE]
proof (state)
this:
(\<lambda>n. 2 * (- 4) ^ n * ((- 1) ^ (n + 1) / (Gamma (- (1 / 2)) * real n powr (1 / 2 + 1)))) = (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))

goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>c d. c \<sim>[sequentially] d \<Longrightarrow> (\<lambda>a. 2 * (- 4) ^ a * c a) \<sim>[sequentially] (\<lambda>a. 2 * (- 4) ^ a * d a)) \<Longrightarrow> (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>a. 4 ^ a / (sqrt pi * real a powr (3 / 2)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<And>c d. c \<sim>[sequentially] d \<Longrightarrow> (\<lambda>a. 2 * (- 4) ^ a * c a) \<sim>[sequentially] (\<lambda>a. 2 * (- 4) ^ a * d a)) \<Longrightarrow> (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>a. 4 ^ a / (sqrt pi * real a powr (3 / 2)))

goal (1 subgoal):
 1. (\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))
[PROOF STEP]
by - (simp_all add: asymp_equiv_intros)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. real (catalan x)) \<sim>[sequentially] (\<lambda>n. 4 ^ n / (sqrt pi * real n powr (3 / 2)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma left_unique_mat_rel: "left_unique R \<Longrightarrow> left_unique (mat_rel R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. left_unique R \<Longrightarrow> left_unique (mat_rel R)
[PROOF STEP]
unfolding left_unique_def mat_rel_def mat_eq_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y z. R x z \<longrightarrow> R y z \<longrightarrow> x = y \<Longrightarrow> \<forall>x y z. dim_row x = dim_row z \<and> dim_col x = dim_col z \<and> (\<forall>i j. i < dim_row z \<longrightarrow> j < dim_col z \<longrightarrow> R (x $$ (i, j)) (z $$ (i, j))) \<longrightarrow> dim_row y = dim_row z \<and> dim_col y = dim_col z \<and> (\<forall>i j. i < dim_row z \<longrightarrow> j < dim_col z \<longrightarrow> R (y $$ (i, j)) (z $$ (i, j))) \<longrightarrow> dim_row x = dim_row y \<and> dim_col x = dim_col y \<and> (\<forall>i j. i < dim_row y \<longrightarrow> j < dim_col y \<longrightarrow> x $$ (i, j) = y $$ (i, j))
[PROOF STEP]
by (auto, blast)


[STATEMENT]
lemma conductor_gr_0: "conductor > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < conductor
[PROOF STEP]
unfolding conductor_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Min (Collect induced_modulus)
[PROOF STEP]
using zero_not_ind_mod
[PROOF STATE]
proof (prove)
using this:
\<not> induced_modulus 0

goal (1 subgoal):
 1. 0 < Min (Collect induced_modulus)
[PROOF STEP]
using conductor_def conductor_induced neq0_conv
[PROOF STATE]
proof (prove)
using this:
\<not> induced_modulus 0
conductor = Min (Collect induced_modulus)
induced_modulus conductor
(?n \<noteq> 0) = (0 < ?n)

goal (1 subgoal):
 1. 0 < Min (Collect induced_modulus)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma prime_elem_iff_irreducible: "prime_elem x \<longleftrightarrow> irreducible x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prime_elem x = irreducible x
[PROOF STEP]
by (blast intro: irreducible_imp_prime_elem prime_elem_imp_irreducible)