[STATEMENT]
lemma llemma:
  assumes p: "standard_simplex p \<subseteq> \<Union>\<C>"
      and \<C>: "\<And>U. U \<in> \<C> \<Longrightarrow> openin (powertop_real UNIV) U"
  obtains d where "0 < d"
                  "\<And>K. \<lbrakk>K \<subseteq> standard_simplex p;
                        \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk>
                       \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "\<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and>
                (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)"
    if x: "x \<in> standard_simplex p" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
obtain U where U: "U \<in> \<C>" "x \<in> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>U. \<lbrakk>U \<in> \<C>; x \<in> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using x p
[PROOF STATE]
proof (prove)
using this:
x \<in> standard_simplex p
standard_simplex p \<subseteq> \<Union> \<C>

goal (1 subgoal):
 1. (\<And>U. \<lbrakk>U \<in> \<C>; x \<in> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
U \<in> \<C>
x \<in> U

goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
U \<in> \<C>
x \<in> U
[PROOF STEP]
obtain V where finV: "finite {i. V i \<noteq> UNIV}" and openV: "\<And>i. open (V i)"
                  and xV: "x \<in> Pi\<^sub>E UNIV V" and UV: "Pi\<^sub>E UNIV V \<subseteq> U"
[PROOF STATE]
proof (prove)
using this:
U \<in> \<C>
x \<in> U

goal (1 subgoal):
 1. (\<And>V. \<lbrakk>finite {i. V i \<noteq> UNIV}; \<And>i. open (V i); x \<in> Pi\<^sub>E UNIV V; Pi\<^sub>E UNIV V \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<C>
[PROOF STATE]
proof (prove)
using this:
U \<in> \<C>
x \<in> U
?U \<in> \<C> \<Longrightarrow> openin (powertop_real UNIV) ?U

goal (1 subgoal):
 1. (\<And>V. \<lbrakk>finite {i. V i \<noteq> UNIV}; \<And>i. open (V i); x \<in> Pi\<^sub>E UNIV V; Pi\<^sub>E UNIV V \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding openin_product_topology_alt
[PROOF STATE]
proof (prove)
using this:
U \<in> \<C>
x \<in> U
?U \<in> \<C> \<Longrightarrow> \<forall>x\<in>?U. \<exists>U. finite {i \<in> UNIV. U i \<noteq> topspace euclideanreal} \<and> (\<forall>i\<in>UNIV. openin euclideanreal (U i)) \<and> x \<in> Pi\<^sub>E UNIV U \<and> Pi\<^sub>E UNIV U \<subseteq> ?U

goal (1 subgoal):
 1. (\<And>V. \<lbrakk>finite {i. V i \<noteq> UNIV}; \<And>i. open (V i); x \<in> Pi\<^sub>E UNIV V; Pi\<^sub>E UNIV V \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
finite {i. V i \<noteq> UNIV}
open (V ?i)
x \<in> Pi\<^sub>E UNIV V
Pi\<^sub>E UNIV V \<subseteq> U

goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
have xVi: "x i \<in> V i" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x i \<in> V i
[PROOF STEP]
using PiE_mem [OF xV]
[PROOF STATE]
proof (prove)
using this:
?x \<in> UNIV \<Longrightarrow> x ?x \<in> V ?x

goal (1 subgoal):
 1. x i \<in> V i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x ?i \<in> V ?i

goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
have "\<And>i. \<exists>e>0. \<forall>x'. \<bar>x' - x i\<bar> < e \<longrightarrow> x' \<in> V i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. \<exists>e>0. \<forall>x'. \<bar>x' - x i\<bar> < e \<longrightarrow> x' \<in> V i
[PROOF STEP]
by (rule openV [unfolded open_real, rule_format, OF xVi])
[PROOF STATE]
proof (state)
this:
\<exists>e>0. \<forall>x'. \<bar>x' - x ?i\<bar> < e \<longrightarrow> x' \<in> V ?i

goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>e>0. \<forall>x'. \<bar>x' - x ?i\<bar> < e \<longrightarrow> x' \<in> V ?i
[PROOF STEP]
obtain d where d: "\<And>i. d i > 0" and dV: "\<And>i x'. \<bar>x' - x i\<bar> < d i \<Longrightarrow> x' \<in> V i"
[PROOF STATE]
proof (prove)
using this:
\<exists>e>0. \<forall>x'. \<bar>x' - x ?i\<bar> < e \<longrightarrow> x' \<in> V ?i

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>\<And>i. 0 < d i; \<And>i x'. \<bar>x' - x i\<bar> < d i \<Longrightarrow> x' \<in> V i\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
0 < d ?i
\<bar>?x' - x ?i\<bar> < d ?i \<Longrightarrow> ?x' \<in> V ?i

goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
define e where "e \<equiv> Inf (insert 1 (d ` {i. V i \<noteq> UNIV})) / 3"
[PROOF STATE]
proof (state)
this:
e \<equiv> Inf (insert 1 (d ` {i. V i \<noteq> UNIV})) / 3

goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
have ed3: "e \<le> d i / 3" if "V i \<noteq> UNIV" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. e \<le> d i / 3
[PROOF STEP]
using that finV
[PROOF STATE]
proof (prove)
using this:
V i \<noteq> UNIV
finite {i. V i \<noteq> UNIV}

goal (1 subgoal):
 1. e \<le> d i / 3
[PROOF STEP]
by (auto simp: e_def intro: cInf_le_finite)
[PROOF STATE]
proof (state)
this:
V ?i \<noteq> UNIV \<Longrightarrow> e \<le> d ?i / 3

goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
show "\<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and>
                (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
proof (intro exI conjI allI impI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. 0 < ?e
 2. ?U1 \<in> \<C>
 3. x \<in> ?U1
 4. \<And>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * ?e) \<and> (\<forall>i>p. y i = 0) \<Longrightarrow> y \<in> ?U1
[PROOF STEP]
show "e > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < e
[PROOF STEP]
using d finV
[PROOF STATE]
proof (prove)
using this:
0 < d ?i
finite {i. V i \<noteq> UNIV}

goal (1 subgoal):
 1. 0 < e
[PROOF STEP]
by (simp add: e_def finite_less_Inf_iff)
[PROOF STATE]
proof (state)
this:
0 < e

goal (3 subgoals):
 1. ?U1 \<in> \<C>
 2. x \<in> ?U1
 3. \<And>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<Longrightarrow> y \<in> ?U1
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?U1 \<in> \<C>
 2. x \<in> ?U1
 3. \<And>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<Longrightarrow> y \<in> ?U1
[PROOF STEP]
assume y: "(\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0)"
[PROOF STATE]
proof (state)
this:
(\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0)

goal (3 subgoals):
 1. ?U1 \<in> \<C>
 2. x \<in> ?U1
 3. \<And>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<Longrightarrow> y \<in> ?U1
[PROOF STEP]
have "y \<in> Pi\<^sub>E UNIV V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<in> Pi\<^sub>E UNIV V
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> y x \<in> V x
 2. \<And>x. x \<notin> UNIV \<Longrightarrow> y x = undefined
[PROOF STEP]
show "y i \<in> V i" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y i \<in> V i
[PROOF STEP]
proof (cases "p < i")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p < i \<Longrightarrow> y i \<in> V i
 2. \<not> p < i \<Longrightarrow> y i \<in> V i
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
p < i

goal (2 subgoals):
 1. p < i \<Longrightarrow> y i \<in> V i
 2. \<not> p < i \<Longrightarrow> y i \<in> V i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p < i
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
p < i

goal (1 subgoal):
 1. y i \<in> V i
[PROOF STEP]
by (metis (mono_tags, lifting) y x mem_Collect_eq standard_simplex_def xVi)
[PROOF STATE]
proof (state)
this:
y i \<in> V i

goal (1 subgoal):
 1. \<not> p < i \<Longrightarrow> y i \<in> V i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> p < i \<Longrightarrow> y i \<in> V i
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> p < i

goal (1 subgoal):
 1. \<not> p < i \<Longrightarrow> y i \<in> V i
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y i \<in> V i
[PROOF STEP]
proof (cases "V i = UNIV")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. V i = UNIV \<Longrightarrow> y i \<in> V i
 2. V i \<noteq> UNIV \<Longrightarrow> y i \<in> V i
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
V i \<noteq> UNIV

goal (2 subgoals):
 1. V i = UNIV \<Longrightarrow> y i \<in> V i
 2. V i \<noteq> UNIV \<Longrightarrow> y i \<in> V i
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y i \<in> V i
[PROOF STEP]
proof (rule dV)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>y i - x i\<bar> < d i
[PROOF STEP]
have "\<bar>y i - x i\<bar> \<le> 2 * e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>y i - x i\<bar> \<le> 2 * e
[PROOF STEP]
using y \<open>\<not> p < i\<close>
[PROOF STATE]
proof (prove)
using this:
(\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0)
\<not> p < i

goal (1 subgoal):
 1. \<bar>y i - x i\<bar> \<le> 2 * e
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>y i - x i\<bar> \<le> 2 * e

goal (1 subgoal):
 1. \<bar>y i - x i\<bar> < d i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>y i - x i\<bar> \<le> 2 * e

goal (1 subgoal):
 1. \<bar>y i - x i\<bar> < d i
[PROOF STEP]
have "\<dots> < d i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * e < d i
[PROOF STEP]
using ed3 [OF False] \<open>e > 0\<close>
[PROOF STATE]
proof (prove)
using this:
e \<le> d i / 3
0 < e

goal (1 subgoal):
 1. 2 * e < d i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
2 * e < d i

goal (1 subgoal):
 1. \<bar>y i - x i\<bar> < d i
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>y i - x i\<bar> < d i
[PROOF STEP]
show "\<bar>y i - x i\<bar> < d i"
[PROOF STATE]
proof (prove)
using this:
\<bar>y i - x i\<bar> < d i

goal (1 subgoal):
 1. \<bar>y i - x i\<bar> < d i
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<bar>y i - x i\<bar> < d i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
y i \<in> V i

goal (1 subgoal):
 1. V i = UNIV \<Longrightarrow> y i \<in> V i
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
y i \<in> V i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
y ?i \<in> V ?i

goal (1 subgoal):
 1. \<And>x. x \<notin> UNIV \<Longrightarrow> y x = undefined
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
y \<in> Pi\<^sub>E UNIV V

goal (3 subgoals):
 1. ?U1 \<in> \<C>
 2. x \<in> ?U1
 3. \<And>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<Longrightarrow> y \<in> ?U1
[PROOF STEP]
with UV
[PROOF STATE]
proof (chain)
picking this:
Pi\<^sub>E UNIV V \<subseteq> U
y \<in> Pi\<^sub>E UNIV V
[PROOF STEP]
show "y \<in> U"
[PROOF STATE]
proof (prove)
using this:
Pi\<^sub>E UNIV V \<subseteq> U
y \<in> Pi\<^sub>E UNIV V

goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y \<in> U

goal (2 subgoals):
 1. U \<in> \<C>
 2. x \<in> U
[PROOF STEP]
qed (use U in auto)
[PROOF STATE]
proof (state)
this:
\<exists>e U. 0 < e \<and> U \<in> \<C> \<and> x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x \<in> standard_simplex p \<Longrightarrow> \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> ?x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - ?x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x \<in> standard_simplex p \<Longrightarrow> \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> ?x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - ?x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)
[PROOF STEP]
obtain e U where
      eU: "\<And>x. x \<in> standard_simplex p \<Longrightarrow>
                0 < e x \<and> U x \<in> \<C> \<and> x \<in> U x"
      and  UI: "\<And>x y. \<lbrakk>x \<in> standard_simplex p;  \<And>i. i \<le> p \<Longrightarrow> \<bar>y i - x i\<bar> \<le> 2 * e x; \<And>i. i > p \<Longrightarrow> y i = 0\<rbrakk>
                       \<Longrightarrow> y \<in> U x"
[PROOF STATE]
proof (prove)
using this:
?x \<in> standard_simplex p \<Longrightarrow> \<exists>e U. 0 < e \<and> U \<in> \<C> \<and> ?x \<in> U \<and> (\<forall>y. (\<forall>i\<le>p. \<bar>y i - ?x i\<bar> \<le> 2 * e) \<and> (\<forall>i>p. y i = 0) \<longrightarrow> y \<in> U)

goal (1 subgoal):
 1. (\<And>e U. \<lbrakk>\<And>x. x \<in> standard_simplex p \<Longrightarrow> 0 < e x \<and> U x \<in> \<C> \<and> x \<in> U x; \<And>x y. \<lbrakk>x \<in> standard_simplex p; \<And>i. i \<le> p \<Longrightarrow> \<bar>y i - x i\<bar> \<le> 2 * e x; \<And>i. p < i \<Longrightarrow> y i = 0\<rbrakk> \<Longrightarrow> y \<in> U x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
?x \<in> standard_simplex p \<Longrightarrow> 0 < e ?x \<and> U ?x \<in> \<C> \<and> ?x \<in> U ?x
\<lbrakk>?x \<in> standard_simplex p; \<And>i. i \<le> p \<Longrightarrow> \<bar>?y i - ?x i\<bar> \<le> 2 * e ?x; \<And>i. p < i \<Longrightarrow> ?y i = 0\<rbrakk> \<Longrightarrow> ?y \<in> U ?x

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
define F where "F \<equiv> \<lambda>x. Pi\<^sub>E UNIV (\<lambda>i. if i \<le> p then {x i - e x<..<x i + e x} else UNIV)"
[PROOF STATE]
proof (state)
this:
F \<equiv> \<lambda>x. \<Pi>\<^sub>E i\<in>UNIV. if i \<le> p then {x i - e x<..<x i + e x} else UNIV

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "\<forall>S \<in> F ` standard_simplex p. openin (powertop_real UNIV) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>S\<in>F ` standard_simplex p. openin (powertop_real UNIV) S
[PROOF STEP]
by (simp add: F_def openin_PiE_gen)
[PROOF STATE]
proof (state)
this:
\<forall>S\<in>F ` standard_simplex p. openin (powertop_real UNIV) S

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>S\<in>F ` standard_simplex p. openin (powertop_real UNIV) S

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have pF: "standard_simplex p \<subseteq> \<Union>(F ` standard_simplex p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. standard_simplex p \<subseteq> \<Union> (F ` standard_simplex p)
[PROOF STEP]
by (force simp: F_def PiE_iff eU)
[PROOF STATE]
proof (state)
this:
standard_simplex p \<subseteq> \<Union> (F ` standard_simplex p)

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>S\<in>F ` standard_simplex p. openin (powertop_real UNIV) S
standard_simplex p \<subseteq> \<Union> (F ` standard_simplex p)
[PROOF STEP]
have "\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> F ` standard_simplex p \<and> standard_simplex p \<subseteq> \<Union>\<F>"
[PROOF STATE]
proof (prove)
using this:
\<forall>S\<in>F ` standard_simplex p. openin (powertop_real UNIV) S
standard_simplex p \<subseteq> \<Union> (F ` standard_simplex p)

goal (1 subgoal):
 1. \<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> F ` standard_simplex p \<and> standard_simplex p \<subseteq> \<Union> \<F>
[PROOF STEP]
using compactin_standard_simplex [of p]
[PROOF STATE]
proof (prove)
using this:
\<forall>S\<in>F ` standard_simplex p. openin (powertop_real UNIV) S
standard_simplex p \<subseteq> \<Union> (F ` standard_simplex p)
compactin (powertop_real UNIV) (standard_simplex p)

goal (1 subgoal):
 1. \<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> F ` standard_simplex p \<and> standard_simplex p \<subseteq> \<Union> \<F>
[PROOF STEP]
unfolding compactin_def
[PROOF STATE]
proof (prove)
using this:
\<forall>S\<in>F ` standard_simplex p. openin (powertop_real UNIV) S
standard_simplex p \<subseteq> \<Union> (F ` standard_simplex p)
standard_simplex p \<subseteq> topspace (powertop_real UNIV) \<and> (\<forall>\<U>. Ball \<U> (openin (powertop_real UNIV)) \<and> standard_simplex p \<subseteq> \<Union> \<U> \<longrightarrow> (\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> \<U> \<and> standard_simplex p \<subseteq> \<Union> \<F>))

goal (1 subgoal):
 1. \<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> F ` standard_simplex p \<and> standard_simplex p \<subseteq> \<Union> \<F>
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> F ` standard_simplex p \<and> standard_simplex p \<subseteq> \<Union> \<F>

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> F ` standard_simplex p \<and> standard_simplex p \<subseteq> \<Union> \<F>
[PROOF STEP]
obtain S where "finite S" and ssp: "S \<subseteq> standard_simplex p" "standard_simplex p \<subseteq> \<Union>(F ` S)"
[PROOF STATE]
proof (prove)
using this:
\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> F ` standard_simplex p \<and> standard_simplex p \<subseteq> \<Union> \<F>

goal (1 subgoal):
 1. (\<And>S. \<lbrakk>finite S; S \<subseteq> standard_simplex p; standard_simplex p \<subseteq> \<Union> (F ` S)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding ex_finite_subset_image
[PROOF STATE]
proof (prove)
using this:
\<exists>\<F>. finite \<F> \<and> \<F> \<subseteq> standard_simplex p \<and> standard_simplex p \<subseteq> \<Union> (F ` \<F>)

goal (1 subgoal):
 1. (\<And>S. \<lbrakk>finite S; S \<subseteq> standard_simplex p; standard_simplex p \<subseteq> \<Union> (F ` S)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: ex_finite_subset_image)
[PROOF STATE]
proof (state)
this:
finite S
S \<subseteq> standard_simplex p
standard_simplex p \<subseteq> \<Union> (F ` S)

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite S
S \<subseteq> standard_simplex p
standard_simplex p \<subseteq> \<Union> (F ` S)
[PROOF STEP]
have "S \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
finite S
S \<subseteq> standard_simplex p
standard_simplex p \<subseteq> \<Union> (F ` S)

goal (1 subgoal):
 1. S \<noteq> {}
[PROOF STEP]
by (auto simp: nonempty_standard_simplex)
[PROOF STATE]
proof (state)
this:
S \<noteq> {}

goal (1 subgoal):
 1. (\<And>d. \<lbrakk>0 < d; \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < ?d
 2. \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> ?d\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U
[PROOF STEP]
show "Inf (e ` S) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Inf (e ` S)
[PROOF STEP]
using \<open>finite S\<close> \<open>S \<noteq> {}\<close> ssp eU
[PROOF STATE]
proof (prove)
using this:
finite S
S \<noteq> {}
S \<subseteq> standard_simplex p
standard_simplex p \<subseteq> \<Union> (F ` S)
?x \<in> standard_simplex p \<Longrightarrow> 0 < e ?x \<and> U ?x \<in> \<C> \<and> ?x \<in> U ?x

goal (1 subgoal):
 1. 0 < Inf (e ` S)
[PROOF STEP]
by (auto simp: finite_less_Inf_iff)
[PROOF STATE]
proof (state)
this:
0 < Inf (e ` S)

goal (1 subgoal):
 1. \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> Inf (e ` S)\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U
[PROOF STEP]
fix k :: "(nat \<Rightarrow> real) set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> Inf (e ` S)\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U
[PROOF STEP]
assume k: "k \<subseteq> standard_simplex p"
         and kle: "\<And>x y i. \<lbrakk>i \<le> p; x \<in> k; y \<in> k\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> Inf (e ` S)"
[PROOF STATE]
proof (state)
this:
k \<subseteq> standard_simplex p
\<lbrakk>?i \<le> p; ?x \<in> k; ?y \<in> k\<rbrakk> \<Longrightarrow> \<bar>?x ?i - ?y ?i\<bar> \<le> Inf (e ` S)

goal (1 subgoal):
 1. \<And>K. \<lbrakk>K \<subseteq> standard_simplex p; \<And>x y i. \<lbrakk>i \<le> p; x \<in> K; y \<in> K\<rbrakk> \<Longrightarrow> \<bar>x i - y i\<bar> \<le> Inf (e ` S)\<rbrakk> \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> K \<subseteq> U
[PROOF STEP]
show "\<exists>U. U \<in> \<C> \<and> k \<subseteq> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
proof (cases "k = {}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. k = {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
 2. k \<noteq> {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
k = {}

goal (2 subgoals):
 1. k = {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
 2. k \<noteq> {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
k = {}

goal (1 subgoal):
 1. \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
using \<open>S \<noteq> {}\<close> eU equals0I ssp(1) subset_eq p
[PROOF STATE]
proof (prove)
using this:
k = {}
S \<noteq> {}
?x \<in> standard_simplex p \<Longrightarrow> 0 < e ?x \<and> U ?x \<in> \<C> \<and> ?x \<in> U ?x
(\<And>y. y \<in> ?A \<Longrightarrow> False) \<Longrightarrow> ?A = {}
S \<subseteq> standard_simplex p
(?A \<subseteq> ?B) = (\<forall>x\<in>?A. x \<in> ?B)
standard_simplex p \<subseteq> \<Union> \<C>

goal (1 subgoal):
 1. \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>U. U \<in> \<C> \<and> k \<subseteq> U

goal (1 subgoal):
 1. k \<noteq> {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k \<noteq> {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
k \<noteq> {}

goal (1 subgoal):
 1. k \<noteq> {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
with k ssp
[PROOF STATE]
proof (chain)
picking this:
k \<subseteq> standard_simplex p
S \<subseteq> standard_simplex p
standard_simplex p \<subseteq> \<Union> (F ` S)
k \<noteq> {}
[PROOF STEP]
obtain x a where "x \<in> k" "x \<in> standard_simplex p"
                            and a: "a \<in> S" and Fa: "x \<in> F a"
[PROOF STATE]
proof (prove)
using this:
k \<subseteq> standard_simplex p
S \<subseteq> standard_simplex p
standard_simplex p \<subseteq> \<Union> (F ` S)
k \<noteq> {}

goal (1 subgoal):
 1. (\<And>x a. \<lbrakk>x \<in> k; x \<in> standard_simplex p; a \<in> S; x \<in> F a\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> k
x \<in> standard_simplex p
a \<in> S
x \<in> F a

goal (1 subgoal):
 1. k \<noteq> {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> k
x \<in> standard_simplex p
a \<in> S
x \<in> F a
[PROOF STEP]
have le_ea: "\<And>i. i \<le> p \<Longrightarrow> abs (x i - a i) < e a"
[PROOF STATE]
proof (prove)
using this:
x \<in> k
x \<in> standard_simplex p
a \<in> S
x \<in> F a

goal (1 subgoal):
 1. \<And>i. i \<le> p \<Longrightarrow> \<bar>x i - a i\<bar> < e a
[PROOF STEP]
by (simp add: F_def PiE_iff if_distrib abs_diff_less_iff cong: if_cong)
[PROOF STATE]
proof (state)
this:
?i \<le> p \<Longrightarrow> \<bar>x ?i - a ?i\<bar> < e a

goal (1 subgoal):
 1. k \<noteq> {} \<Longrightarrow> \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>U. U \<in> \<C> \<and> k \<subseteq> U
[PROOF STEP]
proof (intro exI conjI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?U \<in> \<C>
 2. k \<subseteq> ?U
[PROOF STEP]
show "U a \<in> \<C>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. U a \<in> \<C>
[PROOF STEP]
using a eU ssp(1)
[PROOF STATE]
proof (prove)
using this:
a \<in> S
?x \<in> standard_simplex p \<Longrightarrow> 0 < e ?x \<and> U ?x \<in> \<C> \<and> ?x \<in> U ?x
S \<subseteq> standard_simplex p

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

goal (1 subgoal):
 1. k \<subseteq> U a
[PROOF STEP]
show "k \<subseteq> U a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k \<subseteq> U a
[PROOF STEP]
proof clarify
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> k \<Longrightarrow> x \<in> U a
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> k \<Longrightarrow> x \<in> U a
[PROOF STEP]
assume "y \<in> k"
[PROOF STATE]
proof (state)
this:
y \<in> k

goal (1 subgoal):
 1. \<And>x. x \<in> k \<Longrightarrow> x \<in> U a
[PROOF STEP]
with k
[PROOF STATE]
proof (chain)
picking this:
k \<subseteq> standard_simplex p
y \<in> k
[PROOF STEP]
have y: "y \<in> standard_simplex p"
[PROOF STATE]
proof (prove)
using this:
k \<subseteq> standard_simplex p
y \<in> k

goal (1 subgoal):
 1. y \<in> standard_simplex p
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
y \<in> standard_simplex p

goal (1 subgoal):
 1. \<And>x. x \<in> k \<Longrightarrow> x \<in> U a
[PROOF STEP]
show "y \<in> U a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<in> U a
[PROOF STEP]
proof (rule UI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. a \<in> standard_simplex p
 2. \<And>i. i \<le> p \<Longrightarrow> \<bar>y i - a i\<bar> \<le> 2 * e a
 3. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
show "a \<in> standard_simplex p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> standard_simplex p
[PROOF STEP]
using a ssp(1)
[PROOF STATE]
proof (prove)
using this:
a \<in> S
S \<subseteq> standard_simplex p

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

goal (2 subgoals):
 1. \<And>i. i \<le> p \<Longrightarrow> \<bar>y i - a i\<bar> \<le> 2 * e a
 2. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
fix i :: "nat"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. i \<le> p \<Longrightarrow> \<bar>y i - a i\<bar> \<le> 2 * e a
 2. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
assume "i \<le> p"
[PROOF STATE]
proof (state)
this:
i \<le> p

goal (2 subgoals):
 1. \<And>i. i \<le> p \<Longrightarrow> \<bar>y i - a i\<bar> \<le> 2 * e a
 2. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i \<le> p
[PROOF STEP]
have "\<bar>x i - y i\<bar> \<le> e a"
[PROOF STATE]
proof (prove)
using this:
i \<le> p

goal (1 subgoal):
 1. \<bar>x i - y i\<bar> \<le> e a
[PROOF STEP]
by (meson kle [OF \<open>i \<le> p\<close>] a \<open>finite S\<close> \<open>x \<in> k\<close> \<open>y \<in> k\<close> cInf_le_finite finite_imageI imageI order_trans)
[PROOF STATE]
proof (state)
this:
\<bar>x i - y i\<bar> \<le> e a

goal (2 subgoals):
 1. \<And>i. i \<le> p \<Longrightarrow> \<bar>y i - a i\<bar> \<le> 2 * e a
 2. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<bar>x i - y i\<bar> \<le> e a
[PROOF STEP]
show "\<bar>y i - a i\<bar> \<le> 2 * e a"
[PROOF STATE]
proof (prove)
using this:
\<bar>x i - y i\<bar> \<le> e a

goal (1 subgoal):
 1. \<bar>y i - a i\<bar> \<le> 2 * e a
[PROOF STEP]
using le_ea [OF \<open>i \<le> p\<close>]
[PROOF STATE]
proof (prove)
using this:
\<bar>x i - y i\<bar> \<le> e a
\<bar>x i - a i\<bar> < e a

goal (1 subgoal):
 1. \<bar>y i - a i\<bar> \<le> 2 * e a
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
\<bar>y i - a i\<bar> \<le> 2 * e a

goal (1 subgoal):
 1. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
assume "p < i"
[PROOF STATE]
proof (state)
this:
p < i

goal (1 subgoal):
 1. \<And>i. p < i \<Longrightarrow> y i = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p < i
[PROOF STEP]
show "y i = 0"
[PROOF STATE]
proof (prove)
using this:
p < i

goal (1 subgoal):
 1. y i = 0
[PROOF STEP]
using standard_simplex_def y
[PROOF STATE]
proof (prove)
using this:
p < i
standard_simplex ?p \<equiv> {x. (\<forall>i. 0 \<le> x i \<and> x i \<le> 1) \<and> (\<forall>i>?p. x i = 0) \<and> sum x {..?p} = 1}
y \<in> standard_simplex p

goal (1 subgoal):
 1. y i = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y i = 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
y \<in> U a

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
k \<subseteq> U a

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>U. U \<in> \<C> \<and> k \<subseteq> U

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>U. U \<in> \<C> \<and> k \<subseteq> U

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cat_simplicial_ArrE:
  assumes "f \<in>\<^sub>\<circ> cat_simplicial \<alpha> A\<lparr>Arr\<rparr>"
  obtains m n
    where "f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n" and "m \<in>\<^sub>\<circ> A" and "n \<in>\<^sub>\<circ> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>m n. \<lbrakk>f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n; m \<in>\<^sub>\<circ> A; n \<in>\<^sub>\<circ> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>m n. \<lbrakk>f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n; m \<in>\<^sub>\<circ> A; n \<in>\<^sub>\<circ> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from assms cat_ordinal_inj
[PROOF STATE]
proof (chain)
picking this:
f \<in>\<^sub>\<circ> cat_simplicial \<alpha> A\<lparr>Arr\<rparr>
cat_ordinal ?m = cat_ordinal ?n \<Longrightarrow> ?m = ?n
[PROOF STEP]
obtain m n
    where "m \<in>\<^sub>\<circ> A" "n \<in>\<^sub>\<circ> A" "f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n"
[PROOF STATE]
proof (prove)
using this:
f \<in>\<^sub>\<circ> cat_simplicial \<alpha> A\<lparr>Arr\<rparr>
cat_ordinal ?m = cat_ordinal ?n \<Longrightarrow> ?m = ?n

goal (1 subgoal):
 1. (\<And>m n. \<lbrakk>m \<in>\<^sub>\<circ> A; n \<in>\<^sub>\<circ> A; f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding cat_simplicial_components
[PROOF STATE]
proof (prove)
using this:
f \<in>\<^sub>\<circ> ZFC_in_HOL.set {f. \<exists>m n. f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n \<and> m \<in>\<^sub>\<circ> A \<and> n \<in>\<^sub>\<circ> A}
cat_ordinal ?m = cat_ordinal ?n \<Longrightarrow> ?m = ?n

goal (1 subgoal):
 1. (\<And>m n. \<lbrakk>m \<in>\<^sub>\<circ> A; n \<in>\<^sub>\<circ> A; f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (elim in_small_setE, intro small_cat_simplicial_Arr) auto
[PROOF STATE]
proof (state)
this:
m \<in>\<^sub>\<circ> A
n \<in>\<^sub>\<circ> A
f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n

goal (1 subgoal):
 1. (\<And>m n. \<lbrakk>f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n; m \<in>\<^sub>\<circ> A; n \<in>\<^sub>\<circ> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
with that
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>f : cat_ordinal ?m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal ?n; ?m \<in>\<^sub>\<circ> A; ?n \<in>\<^sub>\<circ> A\<rbrakk> \<Longrightarrow> thesis
m \<in>\<^sub>\<circ> A
n \<in>\<^sub>\<circ> A
f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f : cat_ordinal ?m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal ?n; ?m \<in>\<^sub>\<circ> A; ?n \<in>\<^sub>\<circ> A\<rbrakk> \<Longrightarrow> thesis
m \<in>\<^sub>\<circ> A
n \<in>\<^sub>\<circ> A
f : cat_ordinal m \<le>\<^sub>C\<^sub>.\<^sub>P\<^sub>E\<^sub>O\<^bsub>\<alpha>\<^esub> cat_ordinal n

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma leq_domainNameTrust_NOT_antisym: "\<exists>x y. x \<sqsubseteq>\<^sub>t\<^sub>r\<^sub>u\<^sub>s\<^sub>t y \<and> y \<sqsubseteq>\<^sub>t\<^sub>r\<^sub>u\<^sub>s\<^sub>t x \<and> x \<noteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x y. x \<sqsubseteq>\<^sub>t\<^sub>r\<^sub>u\<^sub>s\<^sub>t y \<and> y \<sqsubseteq>\<^sub>t\<^sub>r\<^sub>u\<^sub>s\<^sub>t x \<and> x \<noteq> y
[PROOF STEP]
apply(rule_tac x="DN (Leaf, 3)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. domainNameTrust.DN (Leaf, 3) \<sqsubseteq>\<^sub>t\<^sub>r\<^sub>u\<^sub>s\<^sub>t y \<and> y \<sqsubseteq>\<^sub>t\<^sub>r\<^sub>u\<^sub>s\<^sub>t domainNameTrust.DN (Leaf, 3) \<and> domainNameTrust.DN (Leaf, 3) \<noteq> y
[PROOF STEP]
apply(rule_tac x="DN (Leaf, 4)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. domainNameTrust.DN (Leaf, 3) \<sqsubseteq>\<^sub>t\<^sub>r\<^sub>u\<^sub>s\<^sub>t domainNameTrust.DN (Leaf, 4) \<and> domainNameTrust.DN (Leaf, 4) \<sqsubseteq>\<^sub>t\<^sub>r\<^sub>u\<^sub>s\<^sub>t domainNameTrust.DN (Leaf, 3) \<and> domainNameTrust.DN (Leaf, 3) \<noteq> domainNameTrust.DN (Leaf, 4)
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma uniform_limit2:
  "uniform_limit {z. Re z \<in> {x..y}}
        (\<lambda>a z. LBINT u=exp (-1)..a. f z u)
        (\<lambda>z. LBINT u=exp (-1)..1. f z u) (at_left 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. uniform_limit {z. Re z \<in> {x..y}} (\<lambda>a z. complex_interval_lebesgue_integral lborel (ereal (exp (- 1))) a (f z)) (\<lambda>z. complex_interval_lebesgue_integral lborel (ereal (exp (- 1))) 1 (f z)) (at_left 1)
[PROOF STEP]
by (intro uniform_limit_interval_integral_right[of _ _ g2] AE_I2 impI)
     (use bound2 integrable_bound2 in \<open>simp_all add: einterval_def f_def set_borel_measurable_def\<close>)


[STATEMENT]
lemma acute_sym:
  assumes "Acute A B C"
  shows "Acute C B A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Acute C B A
[PROOF STEP]
by (meson Acute_def Tarski_neutral_dimensionless.lta_left_comm Tarski_neutral_dimensionless_axioms assms)


[STATEMENT]
lemma short_ch_path: "short_ch {x,y} \<longleftrightarrow> path_ex x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. short_ch {x, y} = (\<exists>Q. path Q x y)
[PROOF STEP]
unfolding short_ch_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (card {x, y} = 2 \<and> (\<exists>P\<in>\<P>. {x, y} \<subseteq> P)) = (\<exists>Q. path Q x y)
[PROOF STEP]
by force


[STATEMENT]
lemma empty_ffilter: "ffilter P xs = {||} = (\<forall>x |\<in>| xs. \<not> P x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ffilter P xs = {||}) = (\<forall>x|\<in>|xs. \<not> P x)
[PROOF STEP]
by auto


[STATEMENT]
lemma simple_integral_sum[simp]:
  assumes "\<And>i x. i \<in> P \<Longrightarrow> 0 \<le> f i x"
  assumes "\<And>i. i \<in> P \<Longrightarrow> simple_function M (f i)"
  shows "(\<integral>\<^sup>Sx. (\<Sum>i\<in>P. f i x) \<partial>M) = (\<Sum>i\<in>P. integral\<^sup>S M (f i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>S x. (\<Sum>i\<in>P. f i x) \<partial>M = (\<Sum>i\<in>P. integral\<^sup>S M (f i))
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>S x. (\<Sum>i\<in>P. f i x) \<partial>M = (\<Sum>i\<in>P. integral\<^sup>S M (f i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>S x. (\<Sum>i\<in>P. f i x) \<partial>M = (\<Sum>i\<in>P. integral\<^sup>S M (f i))
[PROOF STEP]
assume "finite P"
[PROOF STATE]
proof (state)
this:
finite P

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>S x. (\<Sum>i\<in>P. f i x) \<partial>M = (\<Sum>i\<in>P. integral\<^sup>S M (f i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>S x. (\<Sum>i\<in>P. f i x) \<partial>M = (\<Sum>i\<in>P. integral\<^sup>S M (f i))
[PROOF STEP]
from this assms
[PROOF STATE]
proof (chain)
picking this:
finite P
?i \<in> P \<Longrightarrow> 0 \<le> f ?i ?x
?i \<in> P \<Longrightarrow> simple_function M (f ?i)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite P
?i \<in> P \<Longrightarrow> 0 \<le> f ?i ?x
?i \<in> P \<Longrightarrow> simple_function M (f ?i)

goal (1 subgoal):
 1. \<integral>\<^sup>S x. (\<Sum>i\<in>P. f i x) \<partial>M = (\<Sum>i\<in>P. integral\<^sup>S M (f i))
[PROOF STEP]
by induct (auto)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>S x. (\<Sum>i\<in>P. f i x) \<partial>M = (\<Sum>i\<in>P. integral\<^sup>S M (f i))

goal (1 subgoal):
 1. infinite P \<Longrightarrow> \<integral>\<^sup>S x. (\<Sum>i\<in>P. f i x) \<partial>M = (\<Sum>i\<in>P. integral\<^sup>S M (f i))
[PROOF STEP]
qed auto


[STATEMENT]
lemma "2 \<le> (x::real) \<and> x \<le> 4 \<and> 2 \<le> y \<and> y \<le> 4 \<and> 2 \<le> z \<and> z \<le> 4 \<longrightarrow>
    12 \<le> 2 * (x * z + x * y + y * z) - (x * x + y * y + z * z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 \<le> x \<and> x \<le> 4 \<and> 2 \<le> y \<and> y \<le> 4 \<and> 2 \<le> z \<and> z \<le> 4 \<longrightarrow> 12 \<le> 2 * (x * z + x * y + y * z) - (x * x + y * y + z * z)
[PROOF STEP]
by (sos "(((A<0 * R<1) + (((A<=4 * R<1) * (R<2/3 * [1]^2)) + (((A<=4 * (A<=5 * R<1)) * (R<1 * [1]^2)) + (((A<=3 * (A<=4 * R<1)) * (R<1/3 * [1]^2)) + (((A<=2 * R<1) * (R<2/3 * [1]^2)) + (((A<=2 * (A<=5 * R<1)) * (R<1/3 * [1]^2)) + (((A<=2 * (A<=4 * R<1)) * (R<8/3 * [1]^2)) + (((A<=2 * (A<=3 * R<1)) * (R<1 * [1]^2)) + (((A<=1 * (A<=4 * R<1)) * (R<1/3 * [1]^2)) + (((A<=1 * (A<=2 * R<1)) * (R<1/3 * [1]^2)) + (((A<=0 * R<1) * (R<2/3 * [1]^2)) + (((A<=0 * (A<=5 * R<1)) * (R<1/3 * [1]^2)) + (((A<=0 * (A<=4 * R<1)) * (R<8/3 * [1]^2)) + (((A<=0 * (A<=3 * R<1)) * (R<1/3 * [1]^2)) + (((A<=0 * (A<=2 * R<1)) * (R<8/3 * [1]^2)) + ((A<=0 * (A<=1 * R<1)) * (R<1 * [1]^2))))))))))))))))))")


[STATEMENT]
lemma implies_dist_sup:
  "(x \<squnion> y) \<leadsto> z = (x \<leadsto> z) \<sqinter> (y \<leadsto> z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<squnion> y \<leadsto> z = (x \<leadsto> z) \<sqinter> (y \<leadsto> z)
[PROOF STEP]
apply (rule order.antisym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. x \<squnion> y \<leadsto> z \<le> (x \<leadsto> z) \<sqinter> (y \<leadsto> z)
 2. (x \<leadsto> z) \<sqinter> (y \<leadsto> z) \<le> x \<squnion> y \<leadsto> z
[PROOF STEP]
apply (simp add: implies_antitone)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<leadsto> z) \<sqinter> (y \<leadsto> z) \<le> x \<squnion> y \<leadsto> z
[PROOF STEP]
by (simp add: implies_sup implies_galois)


[STATEMENT]
lemma nn_integral_count_space:
  assumes A: "finite {a\<in>A. 0 < f a}"
  shows "integral\<^sup>N (count_space A) f = (\<Sum>a|a\<in>A \<and> 0 < f a. f a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
have *: "(\<integral>\<^sup>+x. max 0 (f x) \<partial>count_space A) =
    (\<integral>\<^sup>+ x. (\<Sum>a|a\<in>A \<and> 0 < f a. f a * indicator {a} x) \<partial>count_space A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. max 0 (f x) \<partial>count_space A = \<integral>\<^sup>+ x. (\<Sum>a | a \<in> A \<and> 0 < f a. f a * indicator {a} x) \<partial>count_space A
[PROOF STEP]
by (auto intro!: nn_integral_cong
             simp add: indicator_def of_bool_def if_distrib sum.If_cases[OF A] max_def le_less)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. max 0 (f x) \<partial>count_space A = \<integral>\<^sup>+ x. (\<Sum>a | a \<in> A \<and> 0 < f a. f a * indicator {a} x) \<partial>count_space A

goal (1 subgoal):
 1. integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. max 0 (f x) \<partial>count_space A = \<integral>\<^sup>+ x. (\<Sum>a | a \<in> A \<and> 0 < f a. f a * indicator {a} x) \<partial>count_space A

goal (1 subgoal):
 1. integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
have "\<dots> = (\<Sum>a|a\<in>A \<and> 0 < f a. \<integral>\<^sup>+ x. f a * indicator {a} x \<partial>count_space A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. (\<Sum>a | a \<in> A \<and> 0 < f a. f a * indicator {a} x) \<partial>count_space A = (\<Sum>a | a \<in> A \<and> 0 < f a. \<integral>\<^sup>+ x. f a * indicator {a} x \<partial>count_space A)
[PROOF STEP]
by (subst nn_integral_sum) (simp_all add: AE_count_space  less_imp_le)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. (\<Sum>a | a \<in> A \<and> 0 < f a. f a * indicator {a} x) \<partial>count_space A = (\<Sum>a | a \<in> A \<and> 0 < f a. \<integral>\<^sup>+ x. f a * indicator {a} x \<partial>count_space A)

goal (1 subgoal):
 1. integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ x. (\<Sum>a | a \<in> A \<and> 0 < f a. f a * indicator {a} x) \<partial>count_space A = (\<Sum>a | a \<in> A \<and> 0 < f a. \<integral>\<^sup>+ x. f a * indicator {a} x \<partial>count_space A)

goal (1 subgoal):
 1. integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
have "\<dots> = (\<Sum>a|a\<in>A \<and> 0 < f a. f a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>a | a \<in> A \<and> 0 < f a. \<integral>\<^sup>+ x. f a * indicator {a} x \<partial>count_space A) = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
by (auto intro!: sum.cong simp: one_ennreal_def[symmetric] max_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>a | a \<in> A \<and> 0 < f a. \<integral>\<^sup>+ x. f a * indicator {a} x \<partial>count_space A) = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)

goal (1 subgoal):
 1. integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<integral>\<^sup>+ x. max 0 (f x) \<partial>count_space A = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ x. max 0 (f x) \<partial>count_space A = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)

goal (1 subgoal):
 1. integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)
[PROOF STEP]
by (simp add: max.absorb2)
[PROOF STATE]
proof (state)
this:
integral\<^sup>N (count_space A) f = (\<Sum>a | a \<in> A \<and> 0 < f a. f a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma is_processT5_S2a: "\<lbrakk>(s, X) \<in> F P; (s, X \<union> {c}) \<notin> F P\<rbrakk> \<Longrightarrow> (s @ [c], {}) \<in> F P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(s, X) \<in> F P; (s, X \<union> {c}) \<notin> F P\<rbrakk> \<Longrightarrow> (s @ [c], {}) \<in> F P
[PROOF STEP]
apply(erule contrapos_np)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(s, X) \<in> F P; (s @ [c], {}) \<notin> F P\<rbrakk> \<Longrightarrow> (s, X \<union> {c}) \<in> F P
[PROOF STEP]
apply(rule is_processT5_S2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>(s, X) \<in> F P; (s @ [c], {}) \<notin> F P\<rbrakk> \<Longrightarrow> (s, X) \<in> F P
 2. \<lbrakk>(s, X) \<in> F P; (s @ [c], {}) \<notin> F P\<rbrakk> \<Longrightarrow> (s @ [c], {}) \<notin> F P
[PROOF STEP]
apply(simp_all)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem (in hashedTa) hta_reindex_correct:
  "ta_lang (hta_\<alpha> (hta_reindex H)) = ta_lang (hta_\<alpha> H)"
  "hashedTa (hta_reindex H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ta_lang (hta_\<alpha> (hta_reindex H)) = ta_lang (hta_\<alpha> H) &&& hashedTa (hta_reindex H)
[PROOF STEP]
apply (unfold hta_reindex_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ta_lang (hta_\<alpha> (hta_remap (reindex_map H) H)) = ta_lang (hta_\<alpha> H)
 2. hashedTa (hta_remap (reindex_map H) H)
[PROOF STEP]
apply (simp_all
    add: hta_remap_correct tree_automaton.remap_lang[OF hta_\<alpha>_is_ta]
         reindex_map_correct)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma single_addition_pos:"\<lbrakk>commute_bpp f (aug_pm_set z i {(a::'a)});
      assoc_bpp (aug_pm_set z i {a}) f; ipp_cond1 {a} i; ipp_cond2 z {a} i f;
      ipp_cond3 z i; inv_ipp z i f {a}; commute_bpp f (aug_pm_set z i {a});
      zeroA z i f {a} z; 0 < (n::int); 0 < (m::int)\<rbrakk> \<Longrightarrow>
     (n\<Odot>a\<^bsub>f,i,z\<^esub>) \<^sub>f+ (m\<Odot>a\<^bsub>f,i,z\<^esub>) = (n + m)\<Odot>a\<^bsub>f,i,z\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>commute_bpp f (aug_pm_set z i {a}); assoc_bpp (aug_pm_set z i {a}) f; ipp_cond1 {a} i; ipp_cond2 z {a} i f; ipp_cond3 z i; inv_ipp z i f {a}; commute_bpp f (aug_pm_set z i {a}); zeroA z i f {a} z; 0 < n; 0 < m\<rbrakk> \<Longrightarrow> n\<Odot>a\<^bsub>f,i,z\<^esub> \<^sub>f+ m\<Odot>a\<^bsub>f,i,z\<^esub> = (n + m)\<Odot>a\<^bsub>f,i,z\<^esub>
[PROOF STEP]
apply (frule_tac single_addition_posTr [of f z i a n m], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>commute_bpp f (aug_pm_set z i {a}); assoc_bpp (aug_pm_set z i {a}) f; ipp_cond1 {a} i; ipp_cond2 z {a} i f; ipp_cond3 z i; inv_ipp z i f {a}; commute_bpp f (aug_pm_set z i {a}); zeroA z i f {a} z; 0 < n; 0 < m; (THE x. x \<in> add_set f {a} (nat (n - 1))) \<^sub>f+ (THE x. x \<in> add_set f {a} (nat (m - 1))) = (THE x. x \<in> add_set f {a} (nat (n + m - 1)))\<rbrakk> \<Longrightarrow> n\<Odot>a\<^bsub>f,i,z\<^esub> \<^sub>f+ m\<Odot>a\<^bsub>f,i,z\<^esub> = (n + m)\<Odot>a\<^bsub>f,i,z\<^esub>
[PROOF STEP]
apply (simp add:fg_elem_single_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma inv_Q_mono: "d \<in> D\<^sub>D \<Longrightarrow> u \<le> v \<Longrightarrow> (inv\<^sub>L (Q d)) u \<le> (inv\<^sub>L (Q d)) v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>d \<in> D\<^sub>D; u \<le> v\<rbrakk> \<Longrightarrow> blinfun_apply (inv\<^sub>L (Q d)) u \<le> blinfun_apply (inv\<^sub>L (Q d)) v
[PROOF STEP]
using is_splitting
[PROOF STATE]
proof (prove)
using this:
?d \<in> D\<^sub>D \<Longrightarrow> is_splitting_blin (id_blinfun - l *\<^sub>R \<P>\<^sub>1 (mk_dec_det ?d)) (Q ?d) (R ?d)

goal (1 subgoal):
 1. \<lbrakk>d \<in> D\<^sub>D; u \<le> v\<rbrakk> \<Longrightarrow> blinfun_apply (inv\<^sub>L (Q d)) u \<le> blinfun_apply (inv\<^sub>L (Q d)) v
[PROOF STEP]
by (auto intro!: nonneg_blinfun_mono)


[STATEMENT]
lemma (in product_sigma_finite) product_integral_prod:
  fixes f :: "'i \<Rightarrow> 'a \<Rightarrow> _::{real_normed_field,banach,second_countable_topology}"
  assumes "finite I" and integrable: "\<And>i. i \<in> I \<Longrightarrow> integrable (M i) (f i)"
  shows "(\<integral>x. (\<Prod>i\<in>I. f i (x i)) \<partial>Pi\<^sub>M I M) = (\<Prod>i\<in>I. integral\<^sup>L (M i) (f i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|Pi\<^sub>M I M. (\<Prod>i\<in>I. f i (x i)) = (\<Prod>i\<in>I. integral\<^sup>L (M i) (f i))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite I
?i \<in> I \<Longrightarrow> integrable (M ?i) (f ?i)

goal (1 subgoal):
 1. LINT x|Pi\<^sub>M I M. (\<Prod>i\<in>I. f i (x i)) = (\<Prod>i\<in>I. integral\<^sup>L (M i) (f i))
[PROOF STEP]
proof induct
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M {} M. (\<Prod>i\<in>{}. f i (x i)) = (\<Prod>i\<in>{}. integral\<^sup>L (M i) (f i))
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:
?i \<in> {} \<Longrightarrow> integrable (M ?i) (f ?i)

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M {} M. (\<Prod>i\<in>{}. f i (x i)) = (\<Prod>i\<in>{}. integral\<^sup>L (M i) (f i))
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
interpret finite_measure "Pi\<^sub>M {} M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_measure (Pi\<^sub>M {} M)
[PROOF STEP]
by rule (simp add: space_PiM)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M {} M. (\<Prod>i\<in>{}. f i (x i)) = (\<Prod>i\<in>{}. integral\<^sup>L (M i) (f i))
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|Pi\<^sub>M {} M. (\<Prod>i\<in>{}. f i (x i)) = (\<Prod>i\<in>{}. integral\<^sup>L (M i) (f i))
[PROOF STEP]
by (simp add: space_PiM measure_def)
[PROOF STATE]
proof (state)
this:
LINT x|Pi\<^sub>M {} M. (\<Prod>i\<in>{}. f i (x i)) = (\<Prod>i\<in>{}. integral\<^sup>L (M i) (f i))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
case (insert i I)
[PROOF STATE]
proof (state)
this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M I M. (\<Prod>i\<in>I. f i (x i)) = (\<Prod>i\<in>I. integral\<^sup>L (M i) (f i))
?i \<in> insert i I \<Longrightarrow> integrable (M ?i) (f ?i)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M I M. (\<Prod>i\<in>I. f i (x i)) = (\<Prod>i\<in>I. integral\<^sup>L (M i) (f i))
?i \<in> insert i I \<Longrightarrow> integrable (M ?i) (f ?i)
[PROOF STEP]
have iI: "finite (insert i I)"
[PROOF STATE]
proof (prove)
using this:
finite I
i \<notin> I
(\<And>i. i \<in> I \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M I M. (\<Prod>i\<in>I. f i (x i)) = (\<Prod>i\<in>I. integral\<^sup>L (M i) (f i))
?i \<in> insert i I \<Longrightarrow> integrable (M ?i) (f ?i)

goal (1 subgoal):
 1. finite (insert i I)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite (insert i I)

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite (insert i I)
[PROOF STEP]
have prod: "\<And>J. J \<subseteq> insert i I \<Longrightarrow>
    integrable (Pi\<^sub>M J M) (\<lambda>x. (\<Prod>i\<in>J. f i (x i)))"
[PROOF STATE]
proof (prove)
using this:
finite (insert i I)

goal (1 subgoal):
 1. \<And>J. J \<subseteq> insert i I \<Longrightarrow> integrable (Pi\<^sub>M J M) (\<lambda>x. \<Prod>i\<in>J. f i (x i))
[PROOF STEP]
by (intro product_integrable_prod insert(4)) (auto intro: finite_subset)
[PROOF STATE]
proof (state)
this:
?J \<subseteq> insert i I \<Longrightarrow> integrable (Pi\<^sub>M ?J M) (\<lambda>x. \<Prod>i\<in>?J. f i (x i))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
interpret I: finite_product_sigma_finite M I
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_product_sigma_finite M I
[PROOF STEP]
by standard fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
have *: "\<And>x y. (\<Prod>j\<in>I. f j (if j = i then y else x j)) = (\<Prod>j\<in>I. f j (x j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. (\<Prod>j\<in>I. f j (if j = i then y else x j)) = (\<Prod>j\<in>I. f j (x j))
[PROOF STEP]
using \<open>i \<notin> I\<close>
[PROOF STATE]
proof (prove)
using this:
i \<notin> I

goal (1 subgoal):
 1. \<And>x y. (\<Prod>j\<in>I. f j (if j = i then y else x j)) = (\<Prod>j\<in>I. f j (x j))
[PROOF STEP]
by (auto intro!: prod.cong)
[PROOF STATE]
proof (state)
this:
(\<Prod>j\<in>I. f j (if j = i then ?y else ?x j)) = (\<Prod>j\<in>I. f j (?x j))

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> integrable (M i) (f i)) \<Longrightarrow> LINT x|Pi\<^sub>M F M. (\<Prod>i\<in>F. f i (x i)) = (\<Prod>i\<in>F. integral\<^sup>L (M i) (f i)); \<And>i. i \<in> insert x F \<Longrightarrow> integrable (M i) (f i)\<rbrakk> \<Longrightarrow> LINT xa|Pi\<^sub>M (insert x F) M. (\<Prod>i\<in>insert x F. f i (xa i)) = (\<Prod>i\<in>insert x F. integral\<^sup>L (M i) (f i))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|Pi\<^sub>M (insert i I) M. (\<Prod>i\<in>insert i I. f i (x i)) = (\<Prod>i\<in>insert i I. integral\<^sup>L (M i) (f i))
[PROOF STEP]
unfolding product_integral_insert[OF insert(1,2) prod[OF subset_refl]]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|Pi\<^sub>M I M. LINT y|M i. (\<Prod>ia\<in>insert i I. f ia ((x(i := y)) ia)) = (\<Prod>i\<in>insert i I. integral\<^sup>L (M i) (f i))
[PROOF STEP]
by (simp add: * insert prod subset_insertI)
[PROOF STATE]
proof (state)
this:
LINT x|Pi\<^sub>M (insert i I) M. (\<Prod>i\<in>insert i I. f i (x i)) = (\<Prod>i\<in>insert i I. integral\<^sup>L (M i) (f i))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma canonical_empty_zone_spec:
  assumes "canonical M n"
  shows "[M]\<^bsub>v,n\<^esub> = {} \<longleftrightarrow> (\<exists>i\<le>n. M i i < \<one>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ([M]\<^bsub>v,n\<^esub> = {}) = (\<exists>i\<le>n. M i i < \<one>)
[PROOF STEP]
using canonical_empty_zone[of n v M, OF _ _ assms] clock_numbering
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<forall>k\<le>n. 0 < k \<longrightarrow> (\<exists>c. v c = k); \<forall>c. v c \<le> n \<longrightarrow> 0 < v c\<rbrakk> \<Longrightarrow> ([M]\<^bsub>v,n\<^esub> = {}) = (\<exists>i\<le>n. M i i < \<one>)
\<forall>c. 0 < v c \<and> (\<forall>x y. v x \<le> n \<and> v y \<le> n \<and> v x = v y \<longrightarrow> x = y)
\<forall>k\<le>n. 0 < k \<longrightarrow> (\<exists>c\<in>X. v c = k)
\<forall>c\<in>X. v c \<le> n

goal (1 subgoal):
 1. ([M]\<^bsub>v,n\<^esub> = {}) = (\<exists>i\<le>n. M i i < \<one>)
[PROOF STEP]
by auto


[STATEMENT]
lemma complement_language[simp]: "b.language (complement A) = lists (alphabet\<^sub>1 A) - a.language A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b.language (complement A) = lists (alphabet\<^sub>1 A) - a.language A
[PROOF STEP]
unfolding a.language_def b.language_def a.path_alt_def b.path_alt_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {w \<in> lists (alphabet\<^sub>2 (complement A)). test\<^sub>2 (condition\<^sub>2 (complement A)) w (b.states (complement A) w (initial\<^sub>2 (complement A))) (initial\<^sub>2 (complement A))} = lists (alphabet\<^sub>1 A) - {w \<in> lists (alphabet\<^sub>1 A). test\<^sub>1 (condition\<^sub>1 A) w (a.states A w (initial\<^sub>1 A)) (initial\<^sub>1 A)}
[PROOF STEP]
by auto


[STATEMENT]
lemma has_derivative_transform_within_ivl:
  assumes "(0::real) < b"
    and     "\<forall>x\<in>{a..b} -s. f x = g x"
    and "x \<in> {a..b} -s"
    and "(f has_derivative f') (at x within {a..b} - s)"
  shows "(g has_derivative f') (at x within {a..b} - s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (g has_derivative f') (at x within {a..b} - s)
[PROOF STEP]
using has_derivative_transform_within[of "b" "x" "{a..b} - s"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < b; x \<in> {a..b} - s; \<forall>x'\<in>{a..b} - s. dist x' x < b \<longrightarrow> ?f x' = ?g x'; (?f has_derivative ?f') (at x within {a..b} - s)\<rbrakk> \<Longrightarrow> (?g has_derivative ?f') (at x within {a..b} - s)
0 < b
\<forall>x\<in>{a..b} - s. f x = g x
x \<in> {a..b} - s
(f has_derivative f') (at x within {a..b} - s)

goal (1 subgoal):
 1. (g has_derivative f') (at x within {a..b} - s)
[PROOF STEP]
by auto


[STATEMENT]
lemma gfp_to_lfp: "gfp = (\<partial>::'a::complete_lattice_with_dual \<Rightarrow> 'a) \<circ> lfp \<circ> \<partial>\<^sub>F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gfp = \<partial> \<circ> lfp \<circ> \<partial>\<^sub>F
[PROOF STEP]
by (simp add: comp_assoc fun_dual2 gfp_dual)


[STATEMENT]
lemma list_all_set: "\<forall> x \<in> set xs. P x \<Longrightarrow> list_all P xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>set xs. P x \<Longrightarrow> list_all P xs
[PROOF STEP]
by (metis (lifting) list_all_iff)


[STATEMENT]
lemma R_g_evoll:
  fixes \<phi> :: "('a::preorder) \<Rightarrow> 'b \<Rightarrow> 'b"
  shows "P = (\<lambda>s. \<forall>t\<in>U s. (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s)) \<longrightarrow> R (\<phi> t s)) \<Longrightarrow>
  (EVOL \<phi> G U) ; rel_R \<lceil>R\<rceil> \<lceil>Q\<rceil> \<le> rel_R \<lceil>P\<rceil> \<lceil>Q\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P = (\<lambda>s. \<forall>t\<in>U s. (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s)) \<longrightarrow> R (\<phi> t s)) \<Longrightarrow> EVOL \<phi> G U ; rel_R \<lceil>R\<rceil> \<lceil>Q\<rceil> \<subseteq> rel_R \<lceil>P\<rceil> \<lceil>Q\<rceil>
[PROOF STEP]
apply(rule_tac R=R in R_seq_law)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. P = (\<lambda>s. \<forall>t\<in>U s. (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s)) \<longrightarrow> R (\<phi> t s)) \<Longrightarrow> EVOL \<phi> G U \<subseteq> rel_R \<lceil>P\<rceil> \<lceil>R\<rceil>
 2. P = (\<lambda>s. \<forall>t\<in>U s. (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s)) \<longrightarrow> R (\<phi> t s)) \<Longrightarrow> rel_R \<lceil>R\<rceil> \<lceil>Q\<rceil> \<subseteq> rel_R \<lceil>R\<rceil> \<lceil>Q\<rceil>
[PROOF STEP]
by (rule_tac R_g_evol_law, simp_all)


[STATEMENT]
lemma Ball_mem_monad_less_zero: "x < 0 \<Longrightarrow> x \<notin> Infinitesimal \<Longrightarrow> u \<in> monad x \<Longrightarrow> u < 0"
  for u x :: hypreal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x < 0; x \<notin> Infinitesimal; u \<in> monad x\<rbrakk> \<Longrightarrow> u < 0
[PROOF STEP]
by (metis Ball_mem_monad_gt_zero approx_monad_iff less_asym linorder_neqE_linordered_idom mem_infmal_iff mem_monad_approx mem_monad_self)


[STATEMENT]
lemma fps_integral0_sum:
  "fps_integral0 (sum f S) = sum (\<lambda>i. fps_integral0 (f i)) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_integral0 (sum f S) = (\<Sum>i\<in>S. fps_integral0 (f i))
[PROOF STEP]
proof (cases "finite S")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite S \<Longrightarrow> fps_integral0 (sum f S) = (\<Sum>i\<in>S. fps_integral0 (f i))
 2. infinite S \<Longrightarrow> fps_integral0 (sum f S) = (\<Sum>i\<in>S. fps_integral0 (f i))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
finite S

goal (2 subgoals):
 1. finite S \<Longrightarrow> fps_integral0 (sum f S) = (\<Sum>i\<in>S. fps_integral0 (f i))
 2. infinite S \<Longrightarrow> fps_integral0 (sum f S) = (\<Sum>i\<in>S. fps_integral0 (f i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_integral0 (sum f S) = (\<Sum>i\<in>S. fps_integral0 (f i))
[PROOF STEP]
by  (induct rule: finite_induct [OF True])
        (simp_all add: fps_integral0_zero fps_integral0_add)
[PROOF STATE]
proof (state)
this:
fps_integral0 (sum f S) = (\<Sum>i\<in>S. fps_integral0 (f i))

goal (1 subgoal):
 1. infinite S \<Longrightarrow> fps_integral0 (sum f S) = (\<Sum>i\<in>S. fps_integral0 (f i))
[PROOF STEP]
qed (simp add: fps_integral0_zero)


[STATEMENT]
theorem build_ip_partition_same_fw: "V \<in> set (build_ip_partition c rs) \<Longrightarrow>
                               \<forall>ip1::'i::len word \<in> wordinterval_to_set V.
                               \<forall>ip2::'i::len word \<in> wordinterval_to_set V.
                               same_fw_behaviour_one ip1 ip2 c rs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V \<in> set (build_ip_partition c rs) \<Longrightarrow> \<forall>ip1\<in>wordinterval_to_set V. \<forall>ip2\<in>wordinterval_to_set V. same_fw_behaviour_one ip1 ip2 c rs
[PROOF STEP]
apply(simp add: build_ip_partition_def groupWIs3)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V \<in> (\<lambda>xs. wordinterval_sort (wordinterval_compress (foldr wordinterval_union xs Empty_WordInterval))) ` set (groupWIs c rs) \<Longrightarrow> \<forall>ip1\<in>wordinterval_to_set V. \<forall>ip2\<in>wordinterval_to_set V. same_fw_behaviour_one ip1 ip2 c rs
[PROOF STEP]
using wordinterval_list_to_set_compressed groupParts_same_fw_wi2 wordinterval_sort
[PROOF STATE]
proof (prove)
using this:
wordinterval_to_set (wordinterval_compress (foldr wordinterval_union ?xs Empty_WordInterval)) = wordinterval_list_to_set ?xs
?V \<in> set (groupWIs ?c ?rs) \<Longrightarrow> \<forall>ip1\<in>wordinterval_list_to_set ?V. \<forall>ip2\<in>wordinterval_list_to_set ?V. same_fw_behaviour_one ip1 ip2 ?c ?rs
wordinterval_to_set (wordinterval_sort ?w) = wordinterval_to_set ?w

goal (1 subgoal):
 1. V \<in> (\<lambda>xs. wordinterval_sort (wordinterval_compress (foldr wordinterval_union xs Empty_WordInterval))) ` set (groupWIs c rs) \<Longrightarrow> \<forall>ip1\<in>wordinterval_to_set V. \<forall>ip2\<in>wordinterval_to_set V. same_fw_behaviour_one ip1 ip2 c rs
[PROOF STEP]
by blast


[STATEMENT]
lemma "filterlim (\<lambda>x::real. x * ln x ^ 2) (at_right 0) (at_right 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_right 0. x * (ln x)\<^sup>2 :> at_right 0
[PROOF STEP]
by real_asymp