[STATEMENT]
lemma rbt_map_rel_finite[relator_props]:
  assumes ELO: "GEN_ALGO_tag (eq_linorder cmpk)"
  shows "finite_map_rel (\<langle>Rk,Rv\<rangle>rbt_map_rel (comp2lt cmpk))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
interpret linorder "comp2le cmpk" "comp2lt cmpk"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. class.linorder (comp2le cmpk) (comp2lt cmpk)
[PROOF STEP]
using ELO
[PROOF STATE]
proof (prove)
using this:
GEN_ALGO_tag (eq_linorder cmpk)

goal (1 subgoal):
 1. class.linorder (comp2le cmpk) (comp2lt cmpk)
[PROOF STEP]
by (simp add: eq_linorder_class_conv)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
using rbt_map_rel_finite_aux
[PROOF STATE]
proof (prove)
using this:
finite_map_rel (\<langle>?Rk, ?Rv\<rangle>rbt_map_rel (comp2lt cmpk))

goal (1 subgoal):
 1. finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
finite_map_rel (\<langle>Rk, Rv\<rangle>rbt_map_rel (comp2lt cmpk))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma OFCLASS_bezout_ring_imp_class_bezout_ring:
  assumes "OFCLASS('a::comm_ring_1,bezout_ring_class)"
  shows "class.bezout_ring ((*)::'a\<Rightarrow>'a\<Rightarrow>'a) 1 (+) 0 (-) uminus"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. class.bezout_ring (*) (1::'a) (+) (0::'a) (-) uminus
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
OFCLASS('a, bezout_ring_class)

goal (1 subgoal):
 1. class.bezout_ring (*) (1::'a) (+) (0::'a) (-) uminus
[PROOF STEP]
unfolding bezout_ring_class_def class.bezout_ring_def
[PROOF STATE]
proof (prove)
using this:
OFCLASS('a, comm_ring_1_class) &&& class.bezout_ring_axioms (*) (+)

goal (1 subgoal):
 1. class.comm_ring_1 (*) (1::'a) (+) (0::'a) (-) uminus \<and> class.bezout_ring_axioms (*) (+)
[PROOF STEP]
using conjunctionD2[of "OFCLASS('a, comm_ring_1_class)"
                         "class.bezout_ring_axioms ((*)::'a\<Rightarrow>'a\<Rightarrow>'a) (+)"]
[PROOF STATE]
proof (prove)
using this:
OFCLASS('a, comm_ring_1_class) &&& class.bezout_ring_axioms (*) (+)
OFCLASS('a, comm_ring_1_class) &&& class.bezout_ring_axioms (*) (+) \<Longrightarrow> class.bezout_ring_axioms (*) (+)

goal (1 subgoal):
 1. class.comm_ring_1 (*) (1::'a) (+) (0::'a) (-) uminus \<and> class.bezout_ring_axioms (*) (+)
[PROOF STEP]
by (auto, intro_locales)


[STATEMENT]
lemma tllist_all2_tnthD:
  "\<lbrakk> tllist_all2 P Q xs ys; enat n < tlength xs \<rbrakk>
  \<Longrightarrow> P (tnth xs n) (tnth ys n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>tllist_all2 P Q xs ys; enat n < tlength xs\<rbrakk> \<Longrightarrow> P (tnth xs n) (tnth ys n)
[PROOF STEP]
by(simp add: tllist_all2_conv_all_tnth)


[STATEMENT]
lemma geq_mix_imp_weak_pref:
  assumes "\<alpha> \<in> {0..1}"
    and "\<beta> \<in> {0..1}"
  assumes "\<alpha> \<ge> \<beta>"
  shows "mix_pmf \<alpha> some_best some_worst \<succeq>[\<R>] mix_pmf \<beta> some_best some_worst"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mix_pmf \<alpha> some_best some_worst \<succeq>[\<R>] mix_pmf \<beta> some_best some_worst
[PROOF STEP]
using assms(1) assms(2) assms(3) best_def some_best_in_best some_worst_in_worst worst_def
[PROOF STATE]
proof (prove)
using this:
\<alpha> \<in> {0..1}
\<beta> \<in> {0..1}
\<beta> \<le> \<alpha>
best = {x \<in> local.\<P>. \<forall>y\<in>local.\<P>. x \<succeq>[\<R>] y}
some_best \<in> best
some_worst \<in> worst
worst = {x \<in> local.\<P>. \<forall>y\<in>local.\<P>. y \<succeq>[\<R>] x}

goal (1 subgoal):
 1. mix_pmf \<alpha> some_best some_worst \<succeq>[\<R>] mix_pmf \<beta> some_best some_worst
[PROOF STEP]
by auto


[STATEMENT]
theorem dist_induces_open:
  "open U \<longleftrightarrow> (\<forall>x\<in>U. \<exists>e>0. \<forall>y. dist x y < e \<longrightarrow> y \<in> U)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open U = (\<forall>x\<in>U. \<exists>e>0. \<forall>y. local.dist x y < e \<longrightarrow> y \<in> U)
[PROOF STEP]
proof (transfer, safe)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
 2. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
fix U :: "int set" and x :: int
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
 2. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
assume *: "\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U"
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U

goal (2 subgoals):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
 2. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
assume "x \<in> U"
[PROOF STATE]
proof (state)
this:
x \<in> U

goal (2 subgoals):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
 2. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
with *
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U
x \<in> U
[PROOF STEP]
obtain b where b: "b > 0" "arith_prog x b \<subseteq> U"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U
x \<in> U

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

goal (2 subgoals):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
 2. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
define e where "e = 1 / q ^ b"
[PROOF STATE]
proof (state)
this:
e = 1 / q ^ b

goal (2 subgoals):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>b>0. arith_prog x b \<subseteq> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
 2. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
show "\<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
[PROOF STEP]
proof (rule exI; safe?)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 < ?e1
 2. \<And>y. N (x - y) < ?e1 \<Longrightarrow> y \<in> U
[PROOF STEP]
show "e > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < e
[PROOF STEP]
using q_gt_1
[PROOF STATE]
proof (prove)
using this:
1 < q

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

goal (1 subgoal):
 1. \<And>y. N (x - y) < e \<Longrightarrow> y \<in> U
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. N (x - y) < e \<Longrightarrow> y \<in> U
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y. N (x - y) < e \<Longrightarrow> y \<in> U
[PROOF STEP]
assume "N (x - y) < e"
[PROOF STATE]
proof (state)
this:
N (x - y) < e

goal (1 subgoal):
 1. \<And>y. N (x - y) < e \<Longrightarrow> y \<in> U
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
N (x - y) < e

goal (1 subgoal):
 1. \<And>y. N (x - y) < e \<Longrightarrow> y \<in> U
[PROOF STEP]
have "\<dots> = 1 / q ^ b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. e = 1 / q ^ b
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
e = 1 / q ^ b

goal (1 subgoal):
 1. \<And>y. N (x - y) < e \<Longrightarrow> y \<in> U
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
N (x - y) < 1 / q ^ b
[PROOF STEP]
have "b dvd (x - y)"
[PROOF STATE]
proof (prove)
using this:
N (x - y) < 1 / q ^ b

goal (1 subgoal):
 1. int b dvd x - y
[PROOF STEP]
by (rule N_lt_imp_dvd) fact
[PROOF STATE]
proof (state)
this:
int b dvd x - y

goal (1 subgoal):
 1. \<And>y. N (x - y) < e \<Longrightarrow> y \<in> U
[PROOF STEP]
hence "y \<in> arith_prog x b"
[PROOF STATE]
proof (prove)
using this:
int b dvd x - y

goal (1 subgoal):
 1. y \<in> arith_prog x b
[PROOF STEP]
by (auto simp: arith_prog_def cong_iff_dvd_diff dvd_diff_commute)
[PROOF STATE]
proof (state)
this:
y \<in> arith_prog x b

goal (1 subgoal):
 1. \<And>y. N (x - y) < e \<Longrightarrow> y \<in> U
[PROOF STEP]
with b
[PROOF STATE]
proof (chain)
picking this:
0 < b
arith_prog x b \<subseteq> U
y \<in> arith_prog x b
[PROOF STEP]
show "y \<in> U"
[PROOF STATE]
proof (prove)
using this:
0 < b
arith_prog x b \<subseteq> U
y \<in> arith_prog x b

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
fix U :: "int set" and x :: int
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
assume *: "\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U"
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
assume "x \<in> U"
[PROOF STATE]
proof (state)
this:
x \<in> U

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
with *
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
x \<in> U
[PROOF STEP]
obtain e where e: "e > 0" "\<forall>y. N (x - y) < e \<longrightarrow> y \<in> U"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U
x \<in> U

goal (1 subgoal):
 1. (\<And>e. \<lbrakk>0 < e; \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 < e
\<forall>y. N (x - y) < e \<longrightarrow> y \<in> U

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
have "eventually (\<lambda>N. 1 / (q - 1) * 1 / q ^ N < e) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F N in sequentially. 1 / (q - 1) * 1 / q ^ N < e
[PROOF STEP]
using q_gt_1 \<open>e > 0\<close>
[PROOF STATE]
proof (prove)
using this:
1 < q
0 < e

goal (1 subgoal):
 1. \<forall>\<^sub>F N in sequentially. 1 / (q - 1) * 1 / q ^ N < e
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F N in sequentially. 1 / (q - 1) * 1 / q ^ N < e

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F N in sequentially. 1 / (q - 1) * 1 / q ^ N < e
[PROOF STEP]
obtain m where m: "1 / (q - 1) * 1 / q ^ m < e"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F N in sequentially. 1 / (q - 1) * 1 / q ^ N < e

goal (1 subgoal):
 1. (\<And>m. 1 / (q - 1) * 1 / q ^ m < e \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: eventually_at_top_linorder)
[PROOF STATE]
proof (state)
this:
1 / (q - 1) * 1 / q ^ m < e

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
define b :: nat where "b = fact m"
[PROOF STATE]
proof (state)
this:
b = fact m

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
have "arith_prog x b \<subseteq> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arith_prog x b \<subseteq> U
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> arith_prog x b \<Longrightarrow> xa \<in> U
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> arith_prog x b \<Longrightarrow> xa \<in> U
[PROOF STEP]
assume "y \<in> arith_prog x b"
[PROOF STATE]
proof (state)
this:
y \<in> arith_prog x b

goal (1 subgoal):
 1. \<And>xa. xa \<in> arith_prog x b \<Longrightarrow> xa \<in> U
[PROOF STEP]
show "y \<in> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
proof (cases "y = x")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
y \<noteq> x

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
from \<open>y \<in> arith_prog x b\<close>
[PROOF STATE]
proof (chain)
picking this:
y \<in> arith_prog x b
[PROOF STEP]
obtain n where y: "y = x + int b * n"
[PROOF STATE]
proof (prove)
using this:
y \<in> arith_prog x b

goal (1 subgoal):
 1. (\<And>n. y = x + int b * n \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: arith_prog_altdef)
[PROOF STATE]
proof (state)
this:
y = x + int b * n

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
from y and \<open>y \<noteq> x\<close>
[PROOF STATE]
proof (chain)
picking this:
y = x + int b * n
y \<noteq> x
[PROOF STEP]
have [simp]: "n \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
y = x + int b * n
y \<noteq> x

goal (1 subgoal):
 1. n \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
have "N (x - y) = N (int b * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N (x - y) = N (int b * n)
[PROOF STEP]
by (simp add: y)
[PROOF STATE]
proof (state)
this:
N (x - y) = N (int b * n)

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
N (x - y) = N (int b * n)

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
have "\<dots> \<le> N (int b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N (int b * n) \<le> N (int b)
[PROOF STEP]
by (rule N_dvd_mono) auto
[PROOF STATE]
proof (state)
this:
N (int b * n) \<le> N (int b)

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
N (int b * n) \<le> N (int b)

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
have "\<dots> \<le> 1 / (q - 1) * 1 / q ^ m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N (int b) \<le> 1 / (q - 1) * 1 / q ^ m
[PROOF STEP]
using N_fact_le
[PROOF STATE]
proof (prove)
using this:
N (fact ?m) \<le> 1 / (q - 1) * 1 / q ^ ?m

goal (1 subgoal):
 1. N (int b) \<le> 1 / (q - 1) * 1 / q ^ m
[PROOF STEP]
by (simp add: b_def)
[PROOF STATE]
proof (state)
this:
N (int b) \<le> 1 / (q - 1) * 1 / q ^ m

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
N (int b) \<le> 1 / (q - 1) * 1 / q ^ m

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
have "\<dots> < e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / (q - 1) * 1 / q ^ m < e
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
1 / (q - 1) * 1 / q ^ m < e

goal (2 subgoals):
 1. y = x \<Longrightarrow> y \<in> U
 2. y \<noteq> x \<Longrightarrow> y \<in> U
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
N (x - y) < e
[PROOF STEP]
show "y \<in> U"
[PROOF STATE]
proof (prove)
using this:
N (x - y) < e

goal (1 subgoal):
 1. y \<in> U
[PROOF STEP]
using e
[PROOF STATE]
proof (prove)
using this:
N (x - y) < e
0 < e
\<forall>y. N (x - y) < e \<longrightarrow> y \<in> U

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

goal (1 subgoal):
 1. y = x \<Longrightarrow> y \<in> U
[PROOF STEP]
qed (use \<open>x \<in> U\<close> in auto)
[PROOF STATE]
proof (state)
this:
y \<in> U

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

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
arith_prog x b \<subseteq> U

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
have "b > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < b
[PROOF STEP]
by (auto simp: b_def)
[PROOF STATE]
proof (state)
this:
0 < b

goal (1 subgoal):
 1. \<And>U x. \<lbrakk>\<forall>x\<in>U. \<exists>e>0. \<forall>y. N (x - y) < e \<longrightarrow> y \<in> U; x \<in> U\<rbrakk> \<Longrightarrow> \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
arith_prog x b \<subseteq> U
0 < b
[PROOF STEP]
show "\<exists>b>0. arith_prog x b \<subseteq> U"
[PROOF STATE]
proof (prove)
using this:
arith_prog x b \<subseteq> U
0 < b

goal (1 subgoal):
 1. \<exists>b>0. arith_prog x b \<subseteq> U
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>b>0. arith_prog x b \<subseteq> U

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Nats_subset_Rats: "\<nat> \<subseteq> \<rat>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nat> \<subseteq> \<rat>
[PROOF STEP]
using Ints_subset_Rats Nats_subset_Ints
[PROOF STATE]
proof (prove)
using this:
\<int> \<subseteq> \<rat>
\<nat> \<subseteq> \<int>

goal (1 subgoal):
 1. \<nat> \<subseteq> \<rat>
[PROOF STEP]
by blast


[STATEMENT]
lemma expands_to_powr_const_0:
  "eventually (\<lambda>x. f x = 0) at_top \<Longrightarrow> basis_wf bs \<Longrightarrow>
     length bs = expansion_level TYPE('a :: multiseries) \<Longrightarrow>
     p \<equiv> p \<Longrightarrow> ((\<lambda>x. f x powr p) expands_to (zero_expansion :: 'a)) bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>\<^sub>F x in at_top. f x = 0; basis_wf bs; length bs = expansion_level TYPE('a); p \<equiv> p\<rbrakk> \<Longrightarrow> ((\<lambda>x. f x powr p) expands_to zero_expansion) bs
[PROOF STEP]
by (rule expands_to_cong[OF expands_to_zero]) auto


[STATEMENT]
lemma chain_boundary_add:
   "chain_boundary p (a+b) = chain_boundary p a + chain_boundary p b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. chain_boundary p (a + b) = chain_boundary p a + chain_boundary p b
[PROOF STEP]
by (simp add: chain_boundary_def frag_extend_add)


[STATEMENT]
lemma last_polychain_of: "length xs > 0 \<Longrightarrow> snd (last (polychain_of p xs)) = p + sum_list xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < length xs \<Longrightarrow> snd (last (polychain_of p xs)) = p + sum_list xs
[PROOF STEP]
by (induct xs arbitrary: p) simp_all


[STATEMENT]
lemma spectral_radius_jnf_norm_bound_le_1_upper_triangular: assumes A: "(A :: complex mat) \<in> carrier_mat n n"
  and sr_1: "spectral_radius A \<le> 1"
  shows "\<exists> c1 c2. \<forall> k. norm_bound (A ^\<^sub>m k) (c1 + c2 * of_nat k ^ (n - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>c1 c2. \<forall>k. norm_bound (A ^\<^sub>m k) (c1 + c2 * real k ^ (n - 1))
[PROOF STEP]
by (rule spectral_radius_jnf_norm_bound_le_1[OF A sr_1],
    insert char_poly_factorized[OF A] jordan_nf_exists[OF A], blast)


[STATEMENT]
lemma all_edges_between_Un1:
  "all_edges_between (X \<union> Y) Z = all_edges_between X Z \<union> all_edges_between Y Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. all_edges_between (X \<union> Y) Z = all_edges_between X Z \<union> all_edges_between Y Z
[PROOF STEP]
by (auto simp: all_edges_between_def)


[STATEMENT]
theorem wls_subst_vsubst_compose2:
assumes  "wls s X" and "wls (asSort zs) Z"
and "ys \<noteq> zs \<or> y \<noteq> z" and fresh: "fresh ys y Z"
shows "((X #[y1 // y]_ys) #[Z / z]_zs) = ((X #[Z / z]_zs) #[((Var ys y1) #[Z / z]_zs) / y]_ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X #[y1 // y]_ys #[Z / z]_zs = X #[Z / z]_zs #[Var ys y1 #[Z / z]_zs / y]_ys
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wls s X
wls (asSort zs) Z
ys \<noteq> zs \<or> y \<noteq> z
fresh ys y Z

goal (1 subgoal):
 1. X #[y1 // y]_ys #[Z / z]_zs = X #[Z / z]_zs #[Var ys y1 #[Z / z]_zs / y]_ys
[PROOF STEP]
by(simp add: subst_vsubst_compose2)


[STATEMENT]
lemma powr_inj: "0 < a \<Longrightarrow> a \<noteq> 1 \<Longrightarrow> a powr x = a powr y \<longleftrightarrow> x = y"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a; a \<noteq> 1\<rbrakk> \<Longrightarrow> (a powr x = a powr y) = (x = y)
[PROOF STEP]
unfolding powr_def exp_inj_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a; a \<noteq> 1\<rbrakk> \<Longrightarrow> ((if a = 0 then 0 else exp (x * ln a)) = (if a = 0 then 0 else exp (y * ln a))) = (x = y)
[PROOF STEP]
by simp


[STATEMENT]
lemma "P (f a b) (f b c) \<and> P (f b c) (f a c) \<and>
      (\<forall>x y z. P x y \<and> P y z \<longrightarrow> P x z)    \<longrightarrow>   P (f a b) (f a c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (f a b) (f b c) \<and> P (f b c) (f a c) \<and> (\<forall>x y z. P x y \<and> P y z \<longrightarrow> P x z) \<longrightarrow> P (f a b) (f a c)
[PROOF STEP]
by blast


[STATEMENT]
lemma USUP_ind_is_forall: "(\<Squnion> x\<in>A \<bullet> P(x)) = (\<^bold>\<forall> x\<in>\<guillemotleft>A\<guillemotright> \<bullet> P(x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion> x \<in> A \<bullet> P x) = (\<^bold>\<forall> x \<bullet> \<guillemotleft>x\<guillemotright> \<in>\<^sub>u \<guillemotleft>A\<guillemotright> \<Rightarrow> P x)
[PROOF STEP]
by (pred_auto)


[STATEMENT]
lemma AF_fp: "\<^bold>A\<^bold>F p = p \<union> \<^bold>A\<^bold>X \<^bold>A\<^bold>F p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<^bold>A\<^bold>F p = p \<union> \<^bold>A\<^bold>X \<^bold>A\<^bold>F p
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<^bold>A\<^bold>F p = p \<union> \<^bold>A\<^bold>X \<^bold>A\<^bold>F p
[PROOF STEP]
have "mono (\<lambda>s. p \<union> \<^bold>A\<^bold>X s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono (\<lambda>s. p \<union> \<^bold>A\<^bold>X s)
[PROOF STEP]
by rule auto
[PROOF STATE]
proof (state)
this:
mono (\<lambda>s. p \<union> \<^bold>A\<^bold>X s)

goal (1 subgoal):
 1. \<^bold>A\<^bold>F p = p \<union> \<^bold>A\<^bold>X \<^bold>A\<^bold>F p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
mono (\<lambda>s. p \<union> \<^bold>A\<^bold>X s)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
mono (\<lambda>s. p \<union> \<^bold>A\<^bold>X s)

goal (1 subgoal):
 1. \<^bold>A\<^bold>F p = p \<union> \<^bold>A\<^bold>X \<^bold>A\<^bold>F p
[PROOF STEP]
by (simp only: AF_lfp) (rule lfp_unfold)
[PROOF STATE]
proof (state)
this:
\<^bold>A\<^bold>F p = p \<union> \<^bold>A\<^bold>X \<^bold>A\<^bold>F p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lcm_1_right: "lcm a 1 = normalize a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lcm a (1::'a) = normalize a
[PROOF STEP]
by (fact lcm.top_right_normalize)


[STATEMENT]
lemma locally_path_connected_space_product_topology:
   "locally_path_connected_space(product_topology X I) \<longleftrightarrow>
        topspace(product_topology X I) = {} \<or>
        finite {i. i \<in> I \<and> ~path_connected_space(X i)} \<and>
        (\<forall>i \<in> I. locally_path_connected_space(X i))"
    (is "?lhs \<longleftrightarrow> ?empty \<or> ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
proof (cases ?empty)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. topspace (product_topology X I) = {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
 2. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
topspace (product_topology X I) = {}

goal (2 subgoals):
 1. topspace (product_topology X I) = {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
 2. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
topspace (product_topology X I) = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
topspace (product_topology X I) = {}

goal (1 subgoal):
 1. locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
by (simp add: locally_path_connected_space_def neighbourhood_base_of openin_closedin_eq)
[PROOF STATE]
proof (state)
this:
locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))

goal (1 subgoal):
 1. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
topspace (product_topology X I) \<noteq> {}

goal (1 subgoal):
 1. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
topspace (product_topology X I) \<noteq> {}
[PROOF STEP]
obtain z where z: "z \<in> (\<Pi>\<^sub>E i\<in>I. topspace (X i))"
[PROOF STATE]
proof (prove)
using this:
topspace (product_topology X I) \<noteq> {}

goal (1 subgoal):
 1. (\<And>z. z \<in> (\<Pi>\<^sub>E i\<in>I. topspace (X i)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<in> (\<Pi>\<^sub>E i\<in>I. topspace (X i))

goal (1 subgoal):
 1. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
have ?rhs if L: ?lhs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))
[PROOF STEP]
obtain U C where U: "openin (product_topology X I) U"
      and V: "path_connectedin (product_topology X I) C"
      and "z \<in> U" "U \<subseteq> C" and Csub: "C \<subseteq> (\<Pi>\<^sub>E i\<in>I. topspace (X i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>U C. \<lbrakk>openin (product_topology X I) U; path_connectedin (product_topology X I) C; z \<in> U; U \<subseteq> C; C \<subseteq> (\<Pi>\<^sub>E i\<in>I. topspace (X i))\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using L
[PROOF STATE]
proof (prove)
using this:
locally_path_connected_space (product_topology X I)

goal (1 subgoal):
 1. (\<And>U C. \<lbrakk>openin (product_topology X I) U; path_connectedin (product_topology X I) C; z \<in> U; U \<subseteq> C; C \<subseteq> (\<Pi>\<^sub>E i\<in>I. topspace (X i))\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply (clarsimp simp add: locally_path_connected_space_def neighbourhood_base_of)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>U C. \<lbrakk>openin (product_topology X I) U; path_connectedin (product_topology X I) C; z \<in> U; U \<subseteq> C; C \<subseteq> (\<Pi>\<^sub>E i\<in>I. topspace (X i))\<rbrakk> \<Longrightarrow> thesis; \<forall>W x. openin (product_topology X I) W \<and> x \<in> W \<longrightarrow> (\<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W))\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by (metis openin_topspace topspace_product_topology z)
[PROOF STATE]
proof (state)
this:
openin (product_topology X I) U
path_connectedin (product_topology X I) C
z \<in> U
U \<subseteq> C
C \<subseteq> (\<Pi>\<^sub>E i\<in>I. topspace (X i))

goal (1 subgoal):
 1. finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
openin (product_topology X I) U
path_connectedin (product_topology X I) C
z \<in> U
U \<subseteq> C
C \<subseteq> (\<Pi>\<^sub>E i\<in>I. topspace (X i))
[PROOF STEP]
obtain V where finV: "finite {i \<in> I. V i \<noteq> topspace (X i)}"
      and XV: "\<And>i. i\<in>I \<Longrightarrow> openin (X i) (V i)" and "z \<in> Pi\<^sub>E I V" and subU: "Pi\<^sub>E I V \<subseteq> U"
[PROOF STATE]
proof (prove)
using this:
openin (product_topology X I) U
path_connectedin (product_topology X I) C
z \<in> U
U \<subseteq> C
C \<subseteq> (\<Pi>\<^sub>E i\<in>I. topspace (X i))

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

goal (1 subgoal):
 1. finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))
[PROOF STEP]
proof (intro conjI ballI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite {i \<in> I. \<not> path_connected_space (X i)}
 2. \<And>i. i \<in> I \<Longrightarrow> locally_path_connected_space (X i)
[PROOF STEP]
have "path_connected_space (X i)" if "i \<in> I" "V i = topspace (X i)" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected_space (X i)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connected_space (X i)
[PROOF STEP]
have pc: "path_connectedin (X i) ((\<lambda>x. x i) ` C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connectedin (X i) ((\<lambda>x. x i) ` C)
[PROOF STEP]
apply (rule path_connectedin_continuous_map_image [OF _ V])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (product_topology X I) (X i) (\<lambda>x. x i)
[PROOF STEP]
by (simp add: continuous_map_product_projection \<open>i \<in> I\<close>)
[PROOF STATE]
proof (state)
this:
path_connectedin (X i) ((\<lambda>x. x i) ` C)

goal (1 subgoal):
 1. path_connected_space (X i)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path_connectedin (X i) ((\<lambda>x. x i) ` C)

goal (1 subgoal):
 1. path_connected_space (X i)
[PROOF STEP]
have "((\<lambda>x. x i) ` C) = topspace (X i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x i) ` C = topspace (X i)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>x. x i) ` C \<subseteq> topspace (X i)
 2. topspace (X i) \<subseteq> (\<lambda>x. x i) ` C
[PROOF STEP]
show "(\<lambda>x. x i) ` C \<subseteq> topspace (X i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x i) ` C \<subseteq> topspace (X i)
[PROOF STEP]
by (simp add: pc path_connectedin_subset_topspace)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. x i) ` C \<subseteq> topspace (X i)

goal (1 subgoal):
 1. topspace (X i) \<subseteq> (\<lambda>x. x i) ` C
[PROOF STEP]
have "V i \<subseteq> (\<lambda>x. x i) ` (\<Pi>\<^sub>E i\<in>I. V i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V i \<subseteq> (\<lambda>x. x i) ` Pi\<^sub>E I V
[PROOF STEP]
by (metis \<open>z \<in> Pi\<^sub>E I V\<close> empty_iff image_projection_PiE order_refl that(1))
[PROOF STATE]
proof (state)
this:
V i \<subseteq> (\<lambda>x. x i) ` Pi\<^sub>E I V

goal (1 subgoal):
 1. topspace (X i) \<subseteq> (\<lambda>x. x i) ` C
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
V i \<subseteq> (\<lambda>x. x i) ` Pi\<^sub>E I V

goal (1 subgoal):
 1. topspace (X i) \<subseteq> (\<lambda>x. x i) ` C
[PROOF STEP]
have "\<dots> \<subseteq> (\<lambda>x. x i) ` U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x i) ` Pi\<^sub>E I V \<subseteq> (\<lambda>x. x i) ` U
[PROOF STEP]
using subU
[PROOF STATE]
proof (prove)
using this:
Pi\<^sub>E I V \<subseteq> U

goal (1 subgoal):
 1. (\<lambda>x. x i) ` Pi\<^sub>E I V \<subseteq> (\<lambda>x. x i) ` U
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. x i) ` Pi\<^sub>E I V \<subseteq> (\<lambda>x. x i) ` U

goal (1 subgoal):
 1. topspace (X i) \<subseteq> (\<lambda>x. x i) ` C
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
V i \<subseteq> (\<lambda>x. x i) ` U
[PROOF STEP]
show "topspace (X i) \<subseteq> (\<lambda>x. x i) ` C"
[PROOF STATE]
proof (prove)
using this:
V i \<subseteq> (\<lambda>x. x i) ` U

goal (1 subgoal):
 1. topspace (X i) \<subseteq> (\<lambda>x. x i) ` C
[PROOF STEP]
using \<open>U \<subseteq> C\<close> that
[PROOF STATE]
proof (prove)
using this:
V i \<subseteq> (\<lambda>x. x i) ` U
U \<subseteq> C
i \<in> I
V i = topspace (X i)

goal (1 subgoal):
 1. topspace (X i) \<subseteq> (\<lambda>x. x i) ` C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
topspace (X i) \<subseteq> (\<lambda>x. x i) ` C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. x i) ` C = topspace (X i)

goal (1 subgoal):
 1. path_connected_space (X i)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path_connectedin (X i) ((\<lambda>x. x i) ` C)
(\<lambda>x. x i) ` C = topspace (X i)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
path_connectedin (X i) ((\<lambda>x. x i) ` C)
(\<lambda>x. x i) ` C = topspace (X i)

goal (1 subgoal):
 1. path_connected_space (X i)
[PROOF STEP]
by (simp add: path_connectedin_topspace)
[PROOF STATE]
proof (state)
this:
path_connected_space (X i)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i \<in> I; V ?i = topspace (X ?i)\<rbrakk> \<Longrightarrow> path_connected_space (X ?i)

goal (2 subgoals):
 1. finite {i \<in> I. \<not> path_connected_space (X i)}
 2. \<And>i. i \<in> I \<Longrightarrow> locally_path_connected_space (X i)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?i \<in> I; V ?i = topspace (X ?i)\<rbrakk> \<Longrightarrow> path_connected_space (X ?i)
[PROOF STEP]
have "{i \<in> I. \<not> path_connected_space (X i)} \<subseteq> {i \<in> I. V i \<noteq> topspace (X i)}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i \<in> I; V ?i = topspace (X ?i)\<rbrakk> \<Longrightarrow> path_connected_space (X ?i)

goal (1 subgoal):
 1. {i \<in> I. \<not> path_connected_space (X i)} \<subseteq> {i \<in> I. V i \<noteq> topspace (X i)}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{i \<in> I. \<not> path_connected_space (X i)} \<subseteq> {i \<in> I. V i \<noteq> topspace (X i)}

goal (2 subgoals):
 1. finite {i \<in> I. \<not> path_connected_space (X i)}
 2. \<And>i. i \<in> I \<Longrightarrow> locally_path_connected_space (X i)
[PROOF STEP]
with finV
[PROOF STATE]
proof (chain)
picking this:
finite {i \<in> I. V i \<noteq> topspace (X i)}
{i \<in> I. \<not> path_connected_space (X i)} \<subseteq> {i \<in> I. V i \<noteq> topspace (X i)}
[PROOF STEP]
show "finite {i \<in> I. \<not> path_connected_space (X i)}"
[PROOF STATE]
proof (prove)
using this:
finite {i \<in> I. V i \<noteq> topspace (X i)}
{i \<in> I. \<not> path_connected_space (X i)} \<subseteq> {i \<in> I. V i \<noteq> topspace (X i)}

goal (1 subgoal):
 1. finite {i \<in> I. \<not> path_connected_space (X i)}
[PROOF STEP]
using finite_subset
[PROOF STATE]
proof (prove)
using this:
finite {i \<in> I. V i \<noteq> topspace (X i)}
{i \<in> I. \<not> path_connected_space (X i)} \<subseteq> {i \<in> I. V i \<noteq> topspace (X i)}
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A

goal (1 subgoal):
 1. finite {i \<in> I. \<not> path_connected_space (X i)}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite {i \<in> I. \<not> path_connected_space (X i)}

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> locally_path_connected_space (X i)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> locally_path_connected_space (X i)
[PROOF STEP]
show "locally_path_connected_space (X i)" if "i \<in> I" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally_path_connected_space (X i)
[PROOF STEP]
apply (rule locally_path_connected_space_quotient_map_image [OF _ L, where f = "\<lambda>x. x i"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. quotient_map (product_topology X I) (X i) (\<lambda>x. x i)
[PROOF STEP]
by (metis False Abstract_Topology.retraction_imp_quotient_map retraction_map_product_projection that)
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> locally_path_connected_space (X ?i)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
locally_path_connected_space (product_topology X I) \<Longrightarrow> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))

goal (1 subgoal):
 1. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
locally_path_connected_space (product_topology X I) \<Longrightarrow> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))

goal (1 subgoal):
 1. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
have ?lhs if R: ?rhs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally_path_connected_space (product_topology X I)
[PROOF STEP]
proof (clarsimp simp add: locally_path_connected_space_def neighbourhood_base_of)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
fix F z
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
assume "openin (product_topology X I) F" and "z \<in> F"
[PROOF STATE]
proof (state)
this:
openin (product_topology X I) F
z \<in> F

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
openin (product_topology X I) F
z \<in> F
[PROOF STEP]
obtain W where finW: "finite {i \<in> I. W i \<noteq> topspace (X i)}"
            and opeW: "\<And>i. i \<in> I \<Longrightarrow> openin (X i) (W i)" and "z \<in> Pi\<^sub>E I W" "Pi\<^sub>E I W \<subseteq> F"
[PROOF STATE]
proof (prove)
using this:
openin (product_topology X I) F
z \<in> F

goal (1 subgoal):
 1. (\<And>W. \<lbrakk>finite {i \<in> I. W i \<noteq> topspace (X i)}; \<And>i. i \<in> I \<Longrightarrow> openin (X i) (W i); z \<in> Pi\<^sub>E I W; Pi\<^sub>E I W \<subseteq> F\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: openin_product_topology_alt)
[PROOF STATE]
proof (state)
this:
finite {i \<in> I. W i \<noteq> topspace (X i)}
?i \<in> I \<Longrightarrow> openin (X ?i) (W ?i)
z \<in> Pi\<^sub>E I W
Pi\<^sub>E I W \<subseteq> F

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
have "\<forall>i \<in> I. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and>
                        (W i = topspace (X i) \<and>
                         path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))"
          (is "\<forall>i \<in> I. ?\<Phi> i")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i\<in>I. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
assume "i \<in> I"
[PROOF STATE]
proof (state)
this:
i \<in> I

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
have "locally_path_connected_space (X i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally_path_connected_space (X i)
[PROOF STEP]
by (simp add: R \<open>i \<in> I\<close>)
[PROOF STATE]
proof (state)
this:
locally_path_connected_space (X i)

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
locally_path_connected_space (X i)

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
have "openin (X i) (W i) " "z i \<in> W i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (X i) (W i) &&& z i \<in> W i
[PROOF STEP]
using \<open>z \<in> Pi\<^sub>E I W\<close> opeW \<open>i \<in> I\<close>
[PROOF STATE]
proof (prove)
using this:
z \<in> Pi\<^sub>E I W
?i \<in> I \<Longrightarrow> openin (X ?i) (W ?i)
i \<in> I

goal (1 subgoal):
 1. openin (X i) (W i) &&& z i \<in> W i
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
openin (X i) (W i)
z i \<in> W i

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
locally_path_connected_space (X i)
openin (X i) (W i)
z i \<in> W i
[PROOF STEP]
obtain U C where UC: "openin (X i) U" "path_connectedin (X i) C" "z i \<in> U" "U \<subseteq> C" "C \<subseteq> W i"
[PROOF STATE]
proof (prove)
using this:
locally_path_connected_space (X i)
openin (X i) (W i)
z i \<in> W i

goal (1 subgoal):
 1. (\<And>U C. \<lbrakk>openin (X i) U; path_connectedin (X i) C; z i \<in> U; U \<subseteq> C; C \<subseteq> W i\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>i \<in> I\<close>
[PROOF STATE]
proof (prove)
using this:
locally_path_connected_space (X i)
openin (X i) (W i)
z i \<in> W i
i \<in> I

goal (1 subgoal):
 1. (\<And>U C. \<lbrakk>openin (X i) U; path_connectedin (X i) C; z i \<in> U; U \<subseteq> C; C \<subseteq> W i\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (force simp: locally_path_connected_space_def neighbourhood_base_of)
[PROOF STATE]
proof (state)
this:
openin (X i) U
path_connectedin (X i) C
z i \<in> U
U \<subseteq> C
C \<subseteq> W i

goal (1 subgoal):
 1. \<And>i. i \<in> I \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
show "?\<Phi> i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
proof (cases "W i = topspace (X i) \<and> path_connected_space(X i)")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. W i = topspace (X i) \<and> path_connected_space (X i) \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
 2. \<not> (W i = topspace (X i) \<and> path_connected_space (X i)) \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
W i = topspace (X i) \<and> path_connected_space (X i)

goal (2 subgoals):
 1. W i = topspace (X i) \<and> path_connected_space (X i) \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
 2. \<not> (W i = topspace (X i) \<and> path_connected_space (X i)) \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
W i = topspace (X i) \<and> path_connected_space (X i)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
W i = topspace (X i) \<and> path_connected_space (X i)

goal (1 subgoal):
 1. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
using \<open>z i \<in> W i\<close> path_connectedin_topspace
[PROOF STATE]
proof (prove)
using this:
W i = topspace (X i) \<and> path_connected_space (X i)
z i \<in> W i
path_connectedin ?X (topspace ?X) = path_connected_space ?X

goal (1 subgoal):
 1. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))

goal (1 subgoal):
 1. \<not> (W i = topspace (X i) \<and> path_connected_space (X i)) \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (W i = topspace (X i) \<and> path_connected_space (X i)) \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (W i = topspace (X i) \<and> path_connected_space (X i))

goal (1 subgoal):
 1. \<not> (W i = topspace (X i) \<and> path_connected_space (X i)) \<Longrightarrow> \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (W i = topspace (X i) \<and> path_connected_space (X i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> (W i = topspace (X i) \<and> path_connected_space (X i))

goal (1 subgoal):
 1. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
by (meson UC)
[PROOF STATE]
proof (state)
this:
\<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>i\<in>I. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i\<in>I. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))
[PROOF STEP]
obtain U C where
      *: "\<And>i. i \<in> I \<Longrightarrow> openin (X i) (U i) \<and> path_connectedin (X i) (C i) \<and> z i \<in> (U i) \<and> (U i) \<subseteq> (C i) \<and> (C i) \<subseteq> W i \<and>
                        (W i = topspace (X i) \<and> path_connected_space (X i)
                         \<longrightarrow> (U i) = topspace (X i) \<and> (C i) = topspace (X i))"
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>I. \<exists>U C. openin (X i) U \<and> path_connectedin (X i) C \<and> z i \<in> U \<and> U \<subseteq> C \<and> C \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U = topspace (X i) \<and> C = topspace (X i))

goal (1 subgoal):
 1. (\<And>U C. (\<And>i. i \<in> I \<Longrightarrow> openin (X i) (U i) \<and> path_connectedin (X i) (C i) \<and> z i \<in> U i \<and> U i \<subseteq> C i \<and> C i \<subseteq> W i \<and> (W i = topspace (X i) \<and> path_connected_space (X i) \<longrightarrow> U i = topspace (X i) \<and> C i = topspace (X i))) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
?i \<in> I \<Longrightarrow> openin (X ?i) (U ?i) \<and> path_connectedin (X ?i) (C ?i) \<and> z ?i \<in> U ?i \<and> U ?i \<subseteq> C ?i \<and> C ?i \<subseteq> W ?i \<and> (W ?i = topspace (X ?i) \<and> path_connected_space (X ?i) \<longrightarrow> U ?i = topspace (X ?i) \<and> C ?i = topspace (X ?i))

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
let ?A = "{i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
have "{i \<in> I. U i \<noteq> topspace (X i)} \<subseteq> ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {i \<in> I. U i \<noteq> topspace (X i)} \<subseteq> {i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)}
[PROOF STEP]
by (clarsimp simp add: "*")
[PROOF STATE]
proof (state)
this:
{i \<in> I. U i \<noteq> topspace (X i)} \<subseteq> {i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)}

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{i \<in> I. U i \<noteq> topspace (X i)} \<subseteq> {i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)}

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
have "finite ?A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite ({i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)})
[PROOF STEP]
by (simp add: that finW)
[PROOF STATE]
proof (state)
this:
finite ({i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)})

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
{i \<in> I. U i \<noteq> topspace (X i)} \<subseteq> {i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)}
finite ({i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)})
[PROOF STEP]
have "finite {i \<in> I. U i \<noteq> topspace (X i)}"
[PROOF STATE]
proof (prove)
using this:
{i \<in> I. U i \<noteq> topspace (X i)} \<subseteq> {i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)}
finite ({i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)})

goal (1 subgoal):
 1. finite {i \<in> I. U i \<noteq> topspace (X i)}
[PROOF STEP]
using finite_subset
[PROOF STATE]
proof (prove)
using this:
{i \<in> I. U i \<noteq> topspace (X i)} \<subseteq> {i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)}
finite ({i \<in> I. \<not> path_connected_space (X i)} \<union> {i \<in> I. W i \<noteq> topspace (X i)})
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A

goal (1 subgoal):
 1. finite {i \<in> I. U i \<noteq> topspace (X i)}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {i \<in> I. U i \<noteq> topspace (X i)}

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite {i \<in> I. U i \<noteq> topspace (X i)}
[PROOF STEP]
have "openin (product_topology X I) (Pi\<^sub>E I U)"
[PROOF STATE]
proof (prove)
using this:
finite {i \<in> I. U i \<noteq> topspace (X i)}

goal (1 subgoal):
 1. openin (product_topology X I) (Pi\<^sub>E I U)
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
finite {i \<in> I. U i \<noteq> topspace (X i)}
?i \<in> I \<Longrightarrow> openin (X ?i) (U ?i) \<and> path_connectedin (X ?i) (C ?i) \<and> z ?i \<in> U ?i \<and> U ?i \<subseteq> C ?i \<and> C ?i \<subseteq> W ?i \<and> (W ?i = topspace (X ?i) \<and> path_connected_space (X ?i) \<longrightarrow> U ?i = topspace (X ?i) \<and> C ?i = topspace (X ?i))

goal (1 subgoal):
 1. openin (product_topology X I) (Pi\<^sub>E I U)
[PROOF STEP]
by (simp add: openin_PiE_gen)
[PROOF STATE]
proof (state)
this:
openin (product_topology X I) (Pi\<^sub>E I U)

goal (1 subgoal):
 1. \<And>W x. \<lbrakk>openin (product_topology X I) W; x \<in> W\<rbrakk> \<Longrightarrow> \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
openin (product_topology X I) (Pi\<^sub>E I U)
[PROOF STEP]
show "\<exists>U. openin (product_topology X I) U \<and>
            (\<exists>V. path_connectedin (product_topology X I) V \<and> z \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> F)"
[PROOF STATE]
proof (prove)
using this:
openin (product_topology X I) (Pi\<^sub>E I U)

goal (1 subgoal):
 1. \<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> z \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> F)
[PROOF STEP]
apply (rule_tac x="PiE I U" in exI, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (product_topology X I) (Pi\<^sub>E I U) \<Longrightarrow> \<exists>V. path_connectedin (product_topology X I) V \<and> z \<in> Pi\<^sub>E I U \<and> Pi\<^sub>E I U \<subseteq> V \<and> V \<subseteq> F
[PROOF STEP]
apply (rule_tac x="PiE I C" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. openin (product_topology X I) (Pi\<^sub>E I U) \<Longrightarrow> path_connectedin (product_topology X I) (Pi\<^sub>E I C) \<and> z \<in> Pi\<^sub>E I U \<and> Pi\<^sub>E I U \<subseteq> Pi\<^sub>E I C \<and> Pi\<^sub>E I C \<subseteq> F
[PROOF STEP]
using \<open>z \<in> Pi\<^sub>E I W\<close> \<open>Pi\<^sub>E I W \<subseteq> F\<close> *
[PROOF STATE]
proof (prove)
using this:
z \<in> Pi\<^sub>E I W
Pi\<^sub>E I W \<subseteq> F
?i \<in> I \<Longrightarrow> openin (X ?i) (U ?i) \<and> path_connectedin (X ?i) (C ?i) \<and> z ?i \<in> U ?i \<and> U ?i \<subseteq> C ?i \<and> C ?i \<subseteq> W ?i \<and> (W ?i = topspace (X ?i) \<and> path_connected_space (X ?i) \<longrightarrow> U ?i = topspace (X ?i) \<and> C ?i = topspace (X ?i))

goal (1 subgoal):
 1. openin (product_topology X I) (Pi\<^sub>E I U) \<Longrightarrow> path_connectedin (product_topology X I) (Pi\<^sub>E I C) \<and> z \<in> Pi\<^sub>E I U \<and> Pi\<^sub>E I U \<subseteq> Pi\<^sub>E I C \<and> Pi\<^sub>E I C \<subseteq> F
[PROOF STEP]
apply (simp add: path_connectedin_PiE subset_PiE PiE_iff PiE_mono dual_order.trans)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<exists>U. openin (product_topology X I) U \<and> (\<exists>V. path_connectedin (product_topology X I) V \<and> z \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> F)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)) \<Longrightarrow> locally_path_connected_space (product_topology X I)

goal (1 subgoal):
 1. topspace (product_topology X I) \<noteq> {} \<Longrightarrow> locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
locally_path_connected_space (product_topology X I) \<Longrightarrow> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))
finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)) \<Longrightarrow> locally_path_connected_space (product_topology X I)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
locally_path_connected_space (product_topology X I) \<Longrightarrow> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))
finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)) \<Longrightarrow> locally_path_connected_space (product_topology X I)

goal (1 subgoal):
 1. locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
locally_path_connected_space (product_topology X I) \<Longrightarrow> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i))
finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)) \<Longrightarrow> locally_path_connected_space (product_topology X I)
topspace (product_topology X I) \<noteq> {}

goal (1 subgoal):
 1. locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
locally_path_connected_space (product_topology X I) = (topspace (product_topology X I) = {} \<or> finite {i \<in> I. \<not> path_connected_space (X i)} \<and> (\<forall>i\<in>I. locally_path_connected_space (X i)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_sqrt_sum_squares_ge1 [simp]: "x \<le> sqrt (x\<^sup>2 + y\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<le> sqrt (x\<^sup>2 + y\<^sup>2)
[PROOF STEP]
by (rule power2_le_imp_le) simp_all


[STATEMENT]
lemma covector_linorder_matrix_0:
  fixes f :: "('a::finite,'b::linorder_stone_relation_algebra_expansion) square"
  assumes "matrix_bounded_idempotent_semiring.covector f"
    shows "f (i,j) = (\<Squnion>\<^sub>k f (k,j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (i, j) = sup_monoid.sum (\<lambda>k. f (k, j)) {k. True}
[PROOF STEP]
by (metis assms top_comp_linorder_matrix)


[STATEMENT]
lemma integer_word_bounded_eq:
  assumes "0 \<le> i"
  assumes "i \<le> 2 ^ LENGTH('a::len) - 1"
  shows "integer_of_word ((word_of_integer :: integer \<Rightarrow> 'a word) i) = i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integer_of_word (word_of_integer i) = i
[PROOF STEP]
unfolding integer_of_word_def word_of_integer_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integer_of_int (uint (word_of_int (int_of_integer i))) = i
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> i
i \<le> 2 ^ LENGTH('a) - 1

goal (1 subgoal):
 1. integer_of_int (uint (word_of_int (int_of_integer i))) = i
[PROOF STEP]
by (metis integer_less_eq_iff integer_of_int_eq_of_int minus_integer.rep_eq of_int_0_le_iff of_int_eq_1_iff of_int_eq_numeral_power_cancel_iff of_int_integer_of word_of_int_inverse zle_diff1_eq)


[STATEMENT]
lemma finite_S: "finite (S n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (S n)
[PROOF STEP]
using S_P finite_in_P
[PROOF STATE]
proof (prove)
using this:
(?n, S ?n) \<in> P
(?n, ?tns) \<in> P \<longrightarrow> finite ?tns

goal (1 subgoal):
 1. finite (S n)
[PROOF STEP]
by auto


[STATEMENT]
lemma surj_Sup_pres_iso:
  fixes f :: "'a::complete_lattice_with_dual \<Rightarrow> 'b::complete_lattice_with_dual"
  assumes "surj f"
  and "Sup_pres f"
  shows "f ((radj f \<circ> f) (\<Squnion>X)) = (\<Squnion>x \<in> X. f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ((radj f \<circ> f) (\<Squnion> X)) = \<Squnion> (f ` X)
[PROOF STEP]
by (metis assms(1) assms(2) comp_def pointfree_idE surj_Sup_pres_id)


[STATEMENT]
lemma is_interval_Int: "is_interval X \<Longrightarrow> is_interval Y \<Longrightarrow> is_interval (X \<inter> Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_interval X; is_interval Y\<rbrakk> \<Longrightarrow> is_interval (X \<inter> Y)
[PROOF STEP]
unfolding is_interval_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>a\<in>X. \<forall>b\<in>X. \<forall>x. (\<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i \<or> b \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> a \<bullet> i) \<longrightarrow> x \<in> X; \<forall>a\<in>Y. \<forall>b\<in>Y. \<forall>x. (\<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i \<or> b \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> a \<bullet> i) \<longrightarrow> x \<in> Y\<rbrakk> \<Longrightarrow> \<forall>a\<in>X \<inter> Y. \<forall>b\<in>X \<inter> Y. \<forall>x. (\<forall>i\<in>Basis. a \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> b \<bullet> i \<or> b \<bullet> i \<le> x \<bullet> i \<and> x \<bullet> i \<le> a \<bullet> i) \<longrightarrow> x \<in> X \<inter> Y
[PROOF STEP]
by blast


[STATEMENT]
lemma Qp_inc_id:
  assumes "a \<in> nonzero Q\<^sub>p"
  assumes "ord a \<ge>0"
  obtains b where "b \<in> nonzero Z\<^sub>p" and "a = \<iota> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b \<in> nonzero Z\<^sub>p; a = \<iota> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<in> nonzero Q\<^sub>p
0 \<le> ord a

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b \<in> nonzero Z\<^sub>p; a = \<iota> b\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis (no_types, opaque_lifting) Qp.nonzero_closed Qp.nonzero_memE(2)
      Zp.nonzero_one_closed Zp.zero_closed Zp_defs(2) val_ring_ord_criterion image_iff local.inc_def
      nonzero_fraction_imp_numer_not_zero not_nonzero_Zp  that)


[STATEMENT]
lemma face_of_disjoint_interior:
      fixes S :: "'a::real_normed_vector set"
      assumes "T face_of S" "T \<noteq> S"
        shows "T \<inter> interior S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T \<inter> interior S = {}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. T \<inter> interior S = {}
[PROOF STEP]
have "T \<inter> interior S \<subseteq> rel_interior S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T \<inter> interior S \<subseteq> rel_interior S
[PROOF STEP]
by (meson inf_sup_ord(2) interior_subset_rel_interior order.trans)
[PROOF STATE]
proof (state)
this:
T \<inter> interior S \<subseteq> rel_interior S

goal (1 subgoal):
 1. T \<inter> interior S = {}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
T \<inter> interior S \<subseteq> rel_interior S

goal (1 subgoal):
 1. T \<inter> interior S = {}
[PROOF STEP]
by (metis (no_types) Int_greatest assms face_of_disjoint_rel_interior inf_sup_ord(1) subset_empty)
[PROOF STATE]
proof (state)
this:
T \<inter> interior S = {}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma div_class: "(x::'a::field) \<oslash>\<^bsub>cring_class_ops\<^esub> y = x / y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<oslash>\<^bsub>cring_class_ops\<^esub> y = x / y
[PROOF STEP]
apply (simp add: m_div_def m_inv_def class_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<noteq> (0::'a) \<longrightarrow> x * (THE ya. y * ya = (1::'a) \<and> ya * y = (1::'a)) = x / y
[PROOF STEP]
apply (rule impI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<noteq> (0::'a) \<Longrightarrow> x * (THE ya. y * ya = (1::'a) \<and> ya * y = (1::'a)) = x / y
[PROOF STEP]
apply (rule ssubst [OF the_equality, of _ "1 / y"])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. y \<noteq> (0::'a) \<Longrightarrow> y * ((1::'a) / y) = (1::'a) \<and> (1::'a) / y * y = (1::'a)
 2. \<And>x. \<lbrakk>y \<noteq> (0::'a); y * x = (1::'a) \<and> x * y = (1::'a)\<rbrakk> \<Longrightarrow> x = (1::'a) / y
 3. y \<noteq> (0::'a) \<Longrightarrow> x * ((1::'a) / y) = x / y
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>y \<noteq> (0::'a); y * x = (1::'a) \<and> x * y = (1::'a)\<rbrakk> \<Longrightarrow> x = (1::'a) / y
[PROOF STEP]
apply (drule conjunct2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>y \<noteq> (0::'a); x * y = (1::'a)\<rbrakk> \<Longrightarrow> x = (1::'a) / y
[PROOF STEP]
apply (drule_tac f="\<lambda>x. x / y" in arg_cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>y \<noteq> (0::'a); x * y / y = (1::'a) / y\<rbrakk> \<Longrightarrow> x = (1::'a) / y
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma continuous_within_cong:
  assumes "continuous (at y within S) f"
          "eventually (\<lambda>x. f x = g x) (at y within S)"
          "f y = g y"
  shows "continuous (at y within S) g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous (at y within S) g
[PROOF STEP]
using assms continuous_within filterlim_cong
[PROOF STATE]
proof (prove)
using this:
continuous (at y within S) f
\<forall>\<^sub>F x in at y within S. f x = g x
f y = g y
continuous (at ?x within ?s) ?f = (?f \<longlongrightarrow> ?f ?x) (at ?x within ?s)
\<lbrakk>?F1.0 = ?F1'; ?F2.0 = ?F2'; \<forall>\<^sub>F x in ?F2.0. ?f x = ?g x\<rbrakk> \<Longrightarrow> filterlim ?f ?F1.0 ?F2.0 = filterlim ?g ?F1' ?F2'

goal (1 subgoal):
 1. continuous (at y within S) g
[PROOF STEP]
by fastforce


[STATEMENT]
lemma Scons_UN1_y: "Scons M (UN x. f x) = (UN x. Scons M (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Scons M (\<Union> (range f)) = (\<Union>x. Scons M (f x))
[PROOF STEP]
by (simp add: Scons_def, blast)


[STATEMENT]
lemma cont_case_prod_iff:
  "\<lbrakk> monotone (rel_prod orda ordb) leq (case_prod f);
     class.preorder orda (mk_less orda); lub_singleton luba;
     class.preorder ordb (mk_less ordb); lub_singleton lubb \<rbrakk>
  \<Longrightarrow> cont (prod_lub luba lubb) (rel_prod orda ordb) lub leq (case_prod f) \<longleftrightarrow>
   (\<forall>x. cont lubb ordb lub leq (\<lambda>y. f x y)) \<and> (\<forall>y. cont luba orda lub leq (\<lambda>x. f x y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>monotone (rel_prod orda ordb) leq (\<lambda>(x, y). f x y); class.preorder orda (mk_less orda); lub_singleton luba; class.preorder ordb (mk_less ordb); lub_singleton lubb\<rbrakk> \<Longrightarrow> cont (prod_lub luba lubb) (rel_prod orda ordb) lub leq (\<lambda>(x, y). f x y) = ((\<forall>x. cont lubb ordb lub leq (f x)) \<and> (\<forall>y. cont luba orda lub leq (\<lambda>x. f x y)))
[PROOF STEP]
by(blast dest: cont_case_prodD1 cont_case_prodD2 intro: cont_case_prodI)


[STATEMENT]
lemma vcpower_two_ftimes: "A ^\<^sub>\<times> 2\<^sub>\<nat> = A \<times>\<^sub>\<bullet> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A ^\<^sub>\<times> 2\<^sub>\<nat> = A \<times>\<^sub>\<bullet> A
[PROOF STEP]
unfolding vcpower_def ftimes_def two
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}. A) = (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>set {[]\<^sub>\<circ>, 1\<^sub>\<nat>}. if i = []\<^sub>\<circ> \<Rightarrow> A | otherwise \<Rightarrow> A)
[PROOF STEP]
by simp


[STATEMENT]
theorem pedersen_bind: "ped_commit.bind_advantage \<A> = discrete_log.advantage (dis_log_\<A> \<A>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ped_commit.bind_advantage \<A> = discrete_log.advantage (dis_log_\<A> \<A>)
[PROOF STEP]
unfolding abstract_commitment.bind_advantage_def discrete_log.advantage_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. spmf (ped_commit.bind_game \<A>) True = spmf (discrete_log.dis_log (dis_log_\<A> \<A>)) True
[PROOF STEP]
using bind_game_eq_dis_log
[PROOF STATE]
proof (prove)
using this:
ped_commit.bind_game ?\<A> = discrete_log.dis_log (dis_log_\<A> ?\<A>)

goal (1 subgoal):
 1. spmf (ped_commit.bind_game \<A>) True = spmf (discrete_log.dis_log (dis_log_\<A> \<A>)) True
[PROOF STEP]
by simp


[STATEMENT]
lemma size_less_than_median_of_medians:
  "size {#y \<in># mset xs. y < M#} \<le> nat \<lceil>0.7 * length xs + 3\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size {#y \<in># mset xs. y < M#} \<le> nat \<lceil>7 / 10 * real (length xs) + 3\<rceil>
[PROOF STEP]
using size_median_of_medians_aux[of "(<)"]
[PROOF STATE]
proof (prove)
using this:
(<) \<in> {(<), \<lambda>x y. y < x} \<Longrightarrow> size {#y \<in># mset xs. y < M#} \<le> nat \<lceil>7 / 10 * real (length xs) + 3\<rceil>

goal (1 subgoal):
 1. size {#y \<in># mset xs. y < M#} \<le> nat \<lceil>7 / 10 * real (length xs) + 3\<rceil>
[PROOF STEP]
by simp


[STATEMENT]
lemma ordinal_div_0: "x div 0 = (0::ordinal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x div 0 = 0
[PROOF STEP]
by (simp add: div_ordinal_def)


[STATEMENT]
lemma elim_zeros_distribute_Zero: "elim_zeros r = Zero \<Longrightarrow> elim_zeros (distribute t r) = Zero"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. elim_zeros r = Zero \<Longrightarrow> elim_zeros (distribute t r) = Zero
[PROOF STEP]
by (induct r arbitrary: t) (auto simp: Let_def split: if_splits)


[STATEMENT]
lemma fps_integral_conv_plus_const:
  "fps_integral a a0 = fps_integral a 0 + fps_const a0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_integral a a0 = fps_integral0 a + fps_const a0
[PROOF STEP]
unfolding fps_integral_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_fps (\<lambda>n. if n = 0 then a0 else inverse (of_nat n) * a $ (n - 1)) = Abs_fps (\<lambda>n. if n = 0 then 0::'a else inverse (of_nat n) * a $ (n - 1)) + fps_const a0
[PROOF STEP]
by (intro fps_ext) simp


[STATEMENT]
lemma list_succ_funpow_conv:
  assumes A: "distinct xs" "x \<in> set xs"
  shows "(list_succ xs ^^ n) x = xs ! ((index xs x + n) mod length xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (list_succ xs ^^ n) x = xs ! ((index xs x + n) mod length xs)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (list_succ xs ^^ n) x = xs ! ((index xs x + n) mod length xs)
[PROOF STEP]
have "xs \<noteq> []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs \<noteq> []
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
distinct xs
x \<in> set xs

goal (1 subgoal):
 1. xs \<noteq> []
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
xs \<noteq> []

goal (1 subgoal):
 1. (list_succ xs ^^ n) x = xs ! ((index xs x + n) mod length xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
xs \<noteq> []
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
xs \<noteq> []

goal (1 subgoal):
 1. (list_succ xs ^^ n) x = xs ! ((index xs x + n) mod length xs)
[PROOF STEP]
by (induct n) (auto simp: hd_conv_nth A index_nth_id list_succ_def mod_simps)
[PROOF STATE]
proof (state)
this:
(list_succ xs ^^ n) x = xs ! ((index xs x + n) mod length xs)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_intersection_of_Un_eq:
   "(\<forall>S T. (finite intersection_of P) S \<and>
               (finite intersection_of P) T
               \<longrightarrow> (finite intersection_of P) (S \<union> T)) \<longleftrightarrow>
        (\<forall>S T. P S \<and> P T \<longrightarrow> (finite intersection_of P) (S \<union> T))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>S T. (finite intersection_of P) S \<and> (finite intersection_of P) T \<longrightarrow> (finite intersection_of P) (S \<union> T)) = (\<forall>S T. P S \<and> P T \<longrightarrow> (finite intersection_of P) (S \<union> T))
[PROOF STEP]
apply (simp add: finite_intersection_of_complement)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>S T. (finite union_of (\<lambda>S. P (- S))) (- S) \<and> (finite union_of (\<lambda>S. P (- S))) (- T) \<longrightarrow> (finite union_of (\<lambda>S. P (- S))) (- S \<inter> - T)) = (\<forall>S T. P S \<and> P T \<longrightarrow> (finite union_of (\<lambda>S. P (- S))) (- S \<inter> - T))
[PROOF STEP]
using finite_union_of_Int_eq [of "\<lambda>S. P (- S)"]
[PROOF STATE]
proof (prove)
using this:
(\<forall>S T. (finite union_of (\<lambda>S. P (- S))) S \<and> (finite union_of (\<lambda>S. P (- S))) T \<longrightarrow> (finite union_of (\<lambda>S. P (- S))) (S \<inter> T)) = (\<forall>S T. P (- S) \<and> P (- T) \<longrightarrow> (finite union_of (\<lambda>S. P (- S))) (S \<inter> T))

goal (1 subgoal):
 1. (\<forall>S T. (finite union_of (\<lambda>S. P (- S))) (- S) \<and> (finite union_of (\<lambda>S. P (- S))) (- T) \<longrightarrow> (finite union_of (\<lambda>S. P (- S))) (- S \<inter> - T)) = (\<forall>S T. P S \<and> P T \<longrightarrow> (finite union_of (\<lambda>S. P (- S))) (- S \<inter> - T))
[PROOF STEP]
by (metis (no_types, lifting) double_compl)


[STATEMENT]
lemma MIN_SET_ELIM':
  fixes P Q
  assumes "finite P" "P \<noteq> {}" "\<forall>x. (\<forall>y. y \<in> P \<longrightarrow> x \<le> y) \<and> x \<in> P \<longrightarrow> Q x"
  shows "Q (Min P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
let ?x="Min P"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
have "Min P \<in> P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min P \<in> P
[PROOF STEP]
using Min_in[OF assms(1) assms(2)]
[PROOF STATE]
proof (prove)
using this:
Min P \<in> P

goal (1 subgoal):
 1. Min P \<in> P
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Min P \<in> P

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Min P \<in> P

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
Min P \<in> P

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
assume P: "y \<in> P"
[PROOF STATE]
proof (state)
this:
y \<in> P

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<in> P
[PROOF STEP]
have "?x \<le> y"
[PROOF STATE]
proof (prove)
using this:
y \<in> P

goal (1 subgoal):
 1. Min P \<le> y
[PROOF STEP]
using Min.coboundedI[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
y \<in> P
?a \<in> P \<Longrightarrow> Min P \<le> ?a

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

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Min P \<le> y
[PROOF STEP]
have "Q ?x"
[PROOF STATE]
proof (prove)
using this:
Min P \<le> y

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
using P assms
[PROOF STATE]
proof (prove)
using this:
Min P \<le> y
y \<in> P
finite P
P \<noteq> {}
\<forall>x. (\<forall>y. y \<in> P \<longrightarrow> x \<le> y) \<and> x \<in> P \<longrightarrow> Q x

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

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?y2 \<in> P \<Longrightarrow> Q (Min P)

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
Min P \<in> P
?y2 \<in> P \<Longrightarrow> Q (Min P)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Min P \<in> P
?y2 \<in> P \<Longrightarrow> Q (Min P)

goal (1 subgoal):
 1. Q (Min P)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Q (Min P)

goal:
No subgoals!
[PROOF STEP]
qed

\<comment> \<open>NOTE added lemma (refactored from `RD\_bounds\_sublistD`).\<close>


[STATEMENT]
lemma coeff_less_poly_subdegree:
  "k < poly_subdegree p \<Longrightarrow> coeff p k = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k < poly_subdegree p \<Longrightarrow> coeff p k = (0::'a)
[PROOF STEP]
unfolding poly_subdegree_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k < subdegree (fps_of_poly p) \<Longrightarrow> coeff p k = (0::'a)
[PROOF STEP]
using nth_less_subdegree_zero[of k "fps_of_poly p"]
[PROOF STATE]
proof (prove)
using this:
k < subdegree (fps_of_poly p) \<Longrightarrow> fps_of_poly p $ k = (0::'a)

goal (1 subgoal):
 1. k < subdegree (fps_of_poly p) \<Longrightarrow> coeff p k = (0::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma is_opt_act_some: "is_opt_act v s (arb_act (opt_acts v s))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_opt_act v s (arb_act (opt_acts v s))
[PROOF STEP]
using arb_act_in[of "{a. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) a}"] Sup_att has_arg_max_def
[PROOF STATE]
proof (prove)
using this:
{a. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) a} \<noteq> {} \<Longrightarrow> arb_act {a. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) a} \<in> {a. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) a}
max_L_ex ?s ?v
has_arg_max ?f ?X \<equiv> \<exists>x. is_arg_max ?f (\<lambda>x. x \<in> ?X) x

goal (1 subgoal):
 1. is_opt_act v s (arb_act (opt_acts v s))
[PROOF STEP]
unfolding max_L_ex_def is_opt_act_def
[PROOF STATE]
proof (prove)
using this:
{a. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) a} \<noteq> {} \<Longrightarrow> arb_act {a. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) a} \<in> {a. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) a}
has_arg_max (\<lambda>a. L\<^sub>a a ?v ?s) (A ?s)
has_arg_max ?f ?X \<equiv> \<exists>x. is_arg_max ?f (\<lambda>x. x \<in> ?X) x

goal (1 subgoal):
 1. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) (arb_act {a. is_arg_max (\<lambda>a. L\<^sub>a a v s) (\<lambda>a. a \<in> A s) a})
[PROOF STEP]
by auto


[STATEMENT]
lemma fps_divide_diff:
  fixes f g h :: "'a::{ring,inverse} fps"
  shows "(f - g) / h = f / h - g / h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f - g) / h = f / h - g / h
[PROOF STEP]
by    (simp add: fps_divide_def algebra_simps fps_shift_diff)


[STATEMENT]
lemma substT2_fresh_switch:
  assumes "r \<in> atrm" "t \<in> trm" "s \<in> trm" "x \<in> var" "y \<in> var"
and "x \<noteq> y" "x \<notin> FvarsT s" "y \<notin> FvarsT t"
shows "substT (substT r s y) t x = substT (substT r t x) s y"   (is "?L = ?R")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. substT (substT r s y) t x = substT (substT r t x) s y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
r \<in> atrm
t \<in> trm
s \<in> trm
x \<in> var
y \<in> var
x \<noteq> y
x \<notin> FvarsT s
y \<notin> FvarsT t

goal (1 subgoal):
 1. substT (substT r s y) t x = substT (substT r t x) s y
[PROOF STEP]
by (simp add: substT_compose_diff[of r s t y x])


[STATEMENT]
lemma fls_prpart0 [simp]: "fls_prpart 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fls_prpart 0 = 0
[PROOF STEP]
by (simp add: fls_prpart_eq0_iff)


[STATEMENT]
lemma list_assn_aux_append_conv2:
  "list_assn R l (m1@m2) = (\<exists>\<^sub>Al1 l2. list_assn R l1 m1 * list_assn R l2 m2 * \<up>(l=l1@l2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_assn R l (m1 @ m2) = (\<exists>\<^sub>Al1 l2. list_assn R l1 m1 * list_assn R l2 m2 * \<up> (l = l1 @ l2))
[PROOF STEP]
apply (induction m1 arbitrary: l)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>l. list_assn R l ([] @ m2) = (\<exists>\<^sub>Al1 l2. list_assn R l1 [] * list_assn R l2 m2 * \<up> (l = l1 @ l2))
 2. \<And>a m1 l. (\<And>l. list_assn R l (m1 @ m2) = (\<exists>\<^sub>Al1 l2. list_assn R l1 m1 * list_assn R l2 m2 * \<up> (l = l1 @ l2))) \<Longrightarrow> list_assn R l ((a # m1) @ m2) = (\<exists>\<^sub>Al1 l2. list_assn R l1 (a # m1) * list_assn R l2 m2 * \<up> (l = l1 @ l2))
[PROOF STEP]
apply (sep_auto intro!: ent_iffI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a m1 l. (\<And>l. list_assn R l (m1 @ m2) = (\<exists>\<^sub>Al1 l2. list_assn R l1 m1 * list_assn R l2 m2 * \<up> (l = l1 @ l2))) \<Longrightarrow> list_assn R l ((a # m1) @ m2) = (\<exists>\<^sub>Al1 l2. list_assn R l1 (a # m1) * list_assn R l2 m2 * \<up> (l = l1 @ l2))
[PROOF STEP]
apply (sep_auto intro!: ent_iffI simp: list_assn_aux_cons_conv)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma diff_prime_power_imp_coprime:
  assumes "p \<noteq> q" "Factorial_Ring.prime (p::nat)" "Factorial_Ring.prime q"
  shows "coprime (p ^ (n::nat)) (q ^ m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coprime (p ^ n) (q ^ m)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
p \<noteq> q
prime p
prime q

goal (1 subgoal):
 1. coprime (p ^ n) (q ^ m)
[PROOF STEP]
by (metis power_0 power_one_right prime_dvd_power prime_imp_power_coprime_nat
            prime_nat_iff prime_power_inj'')


[STATEMENT]
lemma facetrelI_cardSuc: "z\<subseteq>x \<Longrightarrow> card x = Suc (card z) \<Longrightarrow> z\<lhd>x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<subseteq> x; card x = Suc (card z)\<rbrakk> \<Longrightarrow> z \<lhd> x
[PROOF STEP]
using card_ge_0_finite finite_subset[of z] card_Diff_subset[of z x]
[PROOF STATE]
proof (prove)
using this:
0 < card ?A \<Longrightarrow> finite ?A
\<lbrakk>z \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite z
\<lbrakk>finite z; z \<subseteq> x\<rbrakk> \<Longrightarrow> card (x - z) = card x - card z

goal (1 subgoal):
 1. \<lbrakk>z \<subseteq> x; card x = Suc (card z)\<rbrakk> \<Longrightarrow> z \<lhd> x
[PROOF STEP]
by    (force intro: facetrelI_card)


[STATEMENT]
lemma C14_aux: "m \<le> n \<Longrightarrow>  x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
assume assm: "m \<le> n"
[PROOF STATE]
proof (state)
this:
m \<le> n

goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
hence "x\<^bsup>m\<^esup> \<cdot>  (x\<^bsup>n\<^esup>)\<^sup>\<star> =  x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n-m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
m \<le> n

goal (1 subgoal):
 1. x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star>
[PROOF STEP]
by (metis (full_types) le_add_diff_inverse2 power_add)
[PROOF STATE]
proof (state)
this:
x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star>

goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star>

goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
have "... = (x\<^bsup>n-m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star> \<cdot>  x\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star> = (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
by (metis (opaque_lifting, mono_tags) C_slide ab_semigroup_add_class.add.commute power_add)
[PROOF STATE]
proof (state)
this:
x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star> = (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>

goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n - m\<^esup> \<cdot> x\<^bsup>m\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>

goal (1 subgoal):
 1. x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>
[PROOF STEP]
by (metis (full_types) assm le_add_diff_inverse ab_semigroup_add_class.add.commute power_add)
[PROOF STATE]
proof (state)
this:
x\<^bsup>m\<^esup> \<cdot> (x\<^bsup>n\<^esup>)\<^sup>\<star> = (x\<^bsup>n\<^esup>)\<^sup>\<star> \<cdot> x\<^bsup>m\<^esup>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Conjs_eq_False_iff[simp]: "irrefl (set xys) \<Longrightarrow> Conjs Q xys = Bool False \<longleftrightarrow> Q = Bool False \<and> xys = []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. irrefl (set xys) \<Longrightarrow> (Conjs Q xys = Bool False) = (Q = Bool False \<and> xys = [])
[PROOF STEP]
by (induct Q xys rule: Conjs.induct) (auto simp: Let_def is_Bool_def irrefl_def)