[STATEMENT]
lemma add_minus_left_eq_diff: "x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> - x + y = y - x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> - x + y = y - x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> - x + y = y - x
[PROOF STEP]
assume xy: "x \<in> V"  "y \<in> V"
[PROOF STATE]
proof (state)
this:
x \<in> V
y \<in> V

goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> - x + y = y - x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> V
y \<in> V
[PROOF STEP]
have "- x + y = y + - x"
[PROOF STATE]
proof (prove)
using this:
x \<in> V
y \<in> V

goal (1 subgoal):
 1. - x + y = y + - x
[PROOF STEP]
by (simp add: add_commute)
[PROOF STATE]
proof (state)
this:
- x + y = y + - x

goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> - x + y = y - x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- x + y = y + - x

goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> - x + y = y - x
[PROOF STEP]
from xy
[PROOF STATE]
proof (chain)
picking this:
x \<in> V
y \<in> V
[PROOF STEP]
have "\<dots> = y - x"
[PROOF STATE]
proof (prove)
using this:
x \<in> V
y \<in> V

goal (1 subgoal):
 1. y + - x = y - x
[PROOF STEP]
by (simp add: diff_eq1)
[PROOF STATE]
proof (state)
this:
y + - x = y - x

goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> - x + y = y - x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
- x + y = y - x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
- x + y = y - x

goal (1 subgoal):
 1. - x + y = y - x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
- x + y = y - x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma RDirProd_list_carrier_mem:
  assumes "as \<in> carrier (RDirProd_list Rs)"
  shows "length as = length Rs" and "\<And>i. i < length Rs \<Longrightarrow> (as ! i) \<in> carrier (Rs ! i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length as = length Rs &&& (\<And>i. i < length Rs \<Longrightarrow> as ! i \<in> carrier (Rs ! i))
[PROOF STEP]
using assms DirProd_list_carrier_mem
[PROOF STATE]
proof (prove)
using this:
as \<in> carrier (RDirProd_list Rs)
?gs \<in> carrier (DirProd_list ?Gs) \<Longrightarrow> length ?gs = length ?Gs
\<lbrakk>?gs \<in> carrier (DirProd_list ?Gs); ?i < length ?Gs\<rbrakk> \<Longrightarrow> ?gs ! ?i \<in> carrier (?Gs ! ?i)

goal (1 subgoal):
 1. length as = length Rs &&& (\<And>i. i < length Rs \<Longrightarrow> as ! i \<in> carrier (Rs ! i))
[PROOF STEP]
unfolding RDirProd_list_carrier_def'
[PROOF STATE]
proof (prove)
using this:
as \<in> carrier (DirProd_list Rs)
?gs \<in> carrier (DirProd_list ?Gs) \<Longrightarrow> length ?gs = length ?Gs
\<lbrakk>?gs \<in> carrier (DirProd_list ?Gs); ?i < length ?Gs\<rbrakk> \<Longrightarrow> ?gs ! ?i \<in> carrier (?Gs ! ?i)

goal (1 subgoal):
 1. length as = length Rs &&& (\<And>i. i < length Rs \<Longrightarrow> as ! i \<in> carrier (Rs ! i))
[PROOF STEP]
by auto


[STATEMENT]
lemma exponent_p_a_m_k_equation:
  fixes p :: nat
  assumes "0 < m" "0 < k" "p \<noteq> 0" "k < p^a"
    shows "multiplicity p (p^a * m - k) = multiplicity p (p^a - k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicity p (p ^ a * m - k) = multiplicity p (p ^ a - k)
[PROOF STEP]
proof (rule multiplicity_cong [OF iffI])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>r. p ^ r dvd p ^ a * m - k \<Longrightarrow> p ^ r dvd p ^ a - k
 2. \<And>r. p ^ r dvd p ^ a - k \<Longrightarrow> p ^ r dvd p ^ a * m - k
[PROOF STEP]
fix r
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>r. p ^ r dvd p ^ a * m - k \<Longrightarrow> p ^ r dvd p ^ a - k
 2. \<And>r. p ^ r dvd p ^ a - k \<Longrightarrow> p ^ r dvd p ^ a * m - k
[PROOF STEP]
assume *: "p ^ r dvd p ^ a * m - k"
[PROOF STATE]
proof (state)
this:
p ^ r dvd p ^ a * m - k

goal (2 subgoals):
 1. \<And>r. p ^ r dvd p ^ a * m - k \<Longrightarrow> p ^ r dvd p ^ a - k
 2. \<And>r. p ^ r dvd p ^ a - k \<Longrightarrow> p ^ r dvd p ^ a * m - k
[PROOF STEP]
show "p ^ r dvd p ^ a - k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p ^ r dvd p ^ a - k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p ^ r dvd p ^ a - k
[PROOF STEP]
have "k \<le> p ^ a * m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k \<le> p ^ a * m
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < m
0 < k
p \<noteq> 0
k < p ^ a

goal (1 subgoal):
 1. k \<le> p ^ a * m
[PROOF STEP]
by (meson nat_dvd_not_less dvd_triv_left leI mult_pos_pos order.strict_trans)
[PROOF STATE]
proof (state)
this:
k \<le> p ^ a * m

goal (1 subgoal):
 1. p ^ r dvd p ^ a - k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k \<le> p ^ a * m
[PROOF STEP]
have "r \<le> a"
[PROOF STATE]
proof (prove)
using this:
k \<le> p ^ a * m

goal (1 subgoal):
 1. r \<le> a
[PROOF STEP]
by (meson "*" \<open>0 < k\<close> \<open>k < p^a\<close> dvd_diffD1 dvd_triv_left leI less_imp_le_nat nat_dvd_not_less power_le_dvd)
[PROOF STATE]
proof (state)
this:
r \<le> a

goal (1 subgoal):
 1. p ^ r dvd p ^ a - k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r \<le> a
[PROOF STEP]
have "p^r dvd p^a * m"
[PROOF STATE]
proof (prove)
using this:
r \<le> a

goal (1 subgoal):
 1. p ^ r dvd p ^ a * m
[PROOF STEP]
by (simp add: le_imp_power_dvd)
[PROOF STATE]
proof (state)
this:
p ^ r dvd p ^ a * m

goal (1 subgoal):
 1. p ^ r dvd p ^ a - k
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
p ^ r dvd p ^ a * m

goal (1 subgoal):
 1. p ^ r dvd p ^ a - k
[PROOF STEP]
by (meson \<open>k \<le> p ^ a * m\<close> \<open>r \<le> a\<close> * dvd_diffD1 dvd_diff_nat le_imp_power_dvd)
[PROOF STATE]
proof (state)
this:
p ^ r dvd p ^ a - k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
p ^ r dvd p ^ a - k

goal (1 subgoal):
 1. \<And>r. p ^ r dvd p ^ a - k \<Longrightarrow> p ^ r dvd p ^ a * m - k
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. p ^ r dvd p ^ a - k \<Longrightarrow> p ^ r dvd p ^ a * m - k
[PROOF STEP]
fix r
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. p ^ r dvd p ^ a - k \<Longrightarrow> p ^ r dvd p ^ a * m - k
[PROOF STEP]
assume *: "p ^ r dvd p ^ a - k"
[PROOF STATE]
proof (state)
this:
p ^ r dvd p ^ a - k

goal (1 subgoal):
 1. \<And>r. p ^ r dvd p ^ a - k \<Longrightarrow> p ^ r dvd p ^ a * m - k
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
0 < m
0 < k
p \<noteq> 0
k < p ^ a
p ^ r dvd p ^ a - k
[PROOF STEP]
have "r \<le> a"
[PROOF STATE]
proof (prove)
using this:
0 < m
0 < k
p \<noteq> 0
k < p ^ a
p ^ r dvd p ^ a - k

goal (1 subgoal):
 1. r \<le> a
[PROOF STEP]
by (metis diff_diff_cancel less_imp_le_nat nat_dvd_not_less nat_le_linear power_le_dvd zero_less_diff)
[PROOF STATE]
proof (state)
this:
r \<le> a

goal (1 subgoal):
 1. \<And>r. p ^ r dvd p ^ a - k \<Longrightarrow> p ^ r dvd p ^ a * m - k
[PROOF STEP]
show "p ^ r dvd p ^ a * m - k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p ^ r dvd p ^ a * m - k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p ^ r dvd p ^ a * m - k
[PROOF STEP]
have "p^r dvd p^a*m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p ^ r dvd p ^ a * m
[PROOF STEP]
by (simp add: \<open>r \<le> a\<close> le_imp_power_dvd)
[PROOF STATE]
proof (state)
this:
p ^ r dvd p ^ a * m

goal (1 subgoal):
 1. p ^ r dvd p ^ a * m - k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p ^ r dvd p ^ a * m
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
p ^ r dvd p ^ a * m

goal (1 subgoal):
 1. p ^ r dvd p ^ a * m - k
[PROOF STEP]
by (meson assms * dvd_diffD1 dvd_diff_nat le_imp_power_dvd less_imp_le_nat \<open>r \<le> a\<close>)
[PROOF STATE]
proof (state)
this:
p ^ r dvd p ^ a * m - k

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
p ^ r dvd p ^ a * m - k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma remdups_concat_map: "remdups (concat (map remdups xss)) = remdups (concat xss)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. remdups (concat (map remdups xss)) = remdups (concat xss)
[PROOF STEP]
by(induction xss)(simp_all add: remdups_append1, metis remdups_append2)


[STATEMENT]
lemma inv_renaming_cancel_r[simp]: "is_renaming r \<Longrightarrow> r \<odot> inv_renaming r = id_subst"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_renaming r \<Longrightarrow> r \<odot> inv_renaming r = id_subst
[PROOF STEP]
unfolding inv_renaming_def is_renaming_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<tau>. r \<odot> \<tau> = id_subst \<Longrightarrow> r \<odot> (SOME \<tau>. r \<odot> \<tau> = id_subst) = id_subst
[PROOF STEP]
by (metis (mono_tags) someI_ex)


[STATEMENT]
lemma mset_le_mono_add_single: "\<lbrakk>a \<in># ys; b \<in># ws\<rbrakk> \<Longrightarrow> {#a, b#} \<subseteq># ys + ws"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in># ys; b \<in># ws\<rbrakk> \<Longrightarrow> {#a, b#} \<subseteq># ys + ws
[PROOF STEP]
using mset_subset_eq_mono_add[of "{#a#}" _ "{#b#}", simplified]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>a \<in># ?B; b \<in># ?D\<rbrakk> \<Longrightarrow> {#b, a#} \<subseteq># ?B + ?D

goal (1 subgoal):
 1. \<lbrakk>a \<in># ys; b \<in># ws\<rbrakk> \<Longrightarrow> {#a, b#} \<subseteq># ys + ws
[PROOF STEP]
by (simp add: add_mset_commute)


[STATEMENT]
lemma theta_lessE:
  assumes "theta m < theta n" "m \<ge> 1"
  obtains p where "p \<in> {m<..n}" "prime p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from mono_invE[OF theta_mono assms(1)]
[PROOF STATE]
proof (chain)
picking this:
(m \<le> n \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
have "m \<le> n"
[PROOF STATE]
proof (prove)
using this:
(m \<le> n \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

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

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
hence "theta n = theta m + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)"
[PROOF STATE]
proof (prove)
using this:
m \<le> n

goal (1 subgoal):
 1. theta n = theta m + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)
[PROOF STEP]
unfolding theta_def
[PROOF STATE]
proof (prove)
using this:
m \<le> n

goal (1 subgoal):
 1. (\<Sum>p = 1..n. if prime p then ln (real p) else 0) = (\<Sum>p = 1..m. if prime p then ln (real p) else 0) + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
m \<le> n
1 \<le> m

goal (1 subgoal):
 1. (\<Sum>p = 1..n. if prime p then ln (real p) else 0) = (\<Sum>p = 1..m. if prime p then ln (real p) else 0) + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)
[PROOF STEP]
by (subst sum.union_disjoint [symmetric]) (auto simp: ivl_disj_un)
[PROOF STATE]
proof (state)
this:
theta n = theta m + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
theta n = theta m + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
note assms(1)
[PROOF STATE]
proof (state)
this:
theta m < theta n

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>x y. x < y \<Longrightarrow> x + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0) < y + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)) \<Longrightarrow> theta n < theta n + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)
[PROOF STEP]
have "(\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. x < y \<Longrightarrow> x + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0) < y + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)) \<Longrightarrow> theta n < theta n + (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0)

goal (1 subgoal):
 1. (\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0) \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0) \<noteq> 0

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0) \<noteq> 0
[PROOF STEP]
obtain p where "p \<in> {m<..n}" "(if prime p then ln (real p) else 0) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
(\<Sum>p\<in>{m<..n}. if prime p then ln (real p) else 0) \<noteq> 0

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; (if prime p then ln (real p) else 0) \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule sum.not_neutral_contains_not_neutral)
[PROOF STATE]
proof (state)
this:
p \<in> {m<..n}
(if prime p then ln (real p) else 0) \<noteq> 0

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
p \<in> {m<..n}
(if prime p then ln (real p) else 0) \<noteq> 0

goal (1 subgoal):
 1. thesis
[PROOF STEP]
using that[of p]
[PROOF STATE]
proof (prove)
using this:
p \<in> {m<..n}
(if prime p then ln (real p) else 0) \<noteq> 0
\<lbrakk>p \<in> {m<..n}; prime p\<rbrakk> \<Longrightarrow> thesis

goal (1 subgoal):
 1. thesis
[PROOF STEP]
by (auto intro!: exI[of _ p] split: if_splits)
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem c_list_asi: "\<lbrakk>r \<in> verts G; \<forall>x. h x > 0\<rbrakk> \<Longrightarrow> asi (rank_r h r) r (c_list_r h r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>r \<in> verts G; \<forall>x. 0 < h x\<rbrakk> \<Longrightarrow> asi (rank_r h r) r (c_list_r h r)
[PROOF STEP]
using finite_directed_tree.c_list_asi_if_tree_sel[OF fin_directed_tree_r]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?root \<in> verts G; directed_tree.tree_sel (dir_tree_r ?root) ?sf; sel_reasonable ?sf; \<forall>x. 0 < ?cf x; \<forall>x. 0 < ?h x\<rbrakk> \<Longrightarrow> asi (\<lambda>l. (ldeep_T (directed_tree.contr_sel (dir_tree_r ?root) ?sf) ?cf l - 1) / c_list (directed_tree.contr_sel (dir_tree_r ?root) ?sf) ?cf ?h ?r l) ?r (c_list (directed_tree.contr_sel (dir_tree_r ?root) ?sf) ?cf ?h ?r)

goal (1 subgoal):
 1. \<lbrakk>r \<in> verts G; \<forall>x. 0 < h x\<rbrakk> \<Longrightarrow> asi (rank_r h r) r (c_list_r h r)
[PROOF STEP]
unfolding c_list_r_def rank_r_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?root \<in> verts G; directed_tree.tree_sel (dir_tree_r ?root) ?sf; sel_reasonable ?sf; \<forall>x. 0 < ?cf x; \<forall>x. 0 < ?h x\<rbrakk> \<Longrightarrow> asi (\<lambda>l. (ldeep_T (directed_tree.contr_sel (dir_tree_r ?root) ?sf) ?cf l - 1) / c_list (directed_tree.contr_sel (dir_tree_r ?root) ?sf) ?cf ?h ?r l) ?r (c_list (directed_tree.contr_sel (dir_tree_r ?root) ?sf) ?cf ?h ?r)

goal (1 subgoal):
 1. \<lbrakk>r \<in> verts G; \<forall>x. 0 < h x\<rbrakk> \<Longrightarrow> asi (\<lambda>xs. (ldeep_T (sel_r r) cf' xs - 1) / c_list (sel_r r) cf' h r xs) r (c_list (sel_r r) cf' h r)
[PROOF STEP]
by blast


[STATEMENT]
lemma step_n_pop_size_new_big: "\<lbrakk>
  invar (States dir big small);
  0 < size big; Big.pop big = (x, bigP);
  (step ^^ n) (States dir bigP small) = States dir' big' small'
\<rbrakk> \<Longrightarrow> Suc (size_new big') = size_new big"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>invar (States dir big small); 0 < size big; Big.pop big = (x, bigP); (step ^^ n) (States dir bigP small) = States dir' big' small'\<rbrakk> \<Longrightarrow> Suc (size_new big') = size_new big
[PROOF STEP]
using invar_pop_big Big_Proof.size_new_pop step_n_size_new_big Big_Proof.size_size_new
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>invar (States ?dir ?big ?small); 0 < size ?big; Big.pop ?big = (?x, ?big')\<rbrakk> \<Longrightarrow> invar (States ?dir ?big' ?small)
\<lbrakk>invar ?big; 0 < size_new ?big; Big.pop ?big = (?x, ?big')\<rbrakk> \<Longrightarrow> Suc (size_new ?big') = size_new ?big
\<lbrakk>invar (States ?dir ?big ?small); (step ^^ ?n) (States ?dir ?big ?small) = States ?dir' ?big' ?small'\<rbrakk> \<Longrightarrow> size_new ?big' = size_new ?big
\<lbrakk>invar ?big; 0 < size ?big\<rbrakk> \<Longrightarrow> 0 < size_new ?big

goal (1 subgoal):
 1. \<lbrakk>invar (States dir big small); 0 < size big; Big.pop big = (x, bigP); (step ^^ n) (States dir bigP small) = States dir' big' small'\<rbrakk> \<Longrightarrow> Suc (size_new big') = size_new big
[PROOF STEP]
by (metis (no_types, lifting)  invar_states.simps)


[STATEMENT]
lemma outward:
  assumes "is_poincare_line H1" and "is_poincare_line H2"
  assumes "intersects_x_axis_positive H1" and "intersects_x_axis_positive H2"
  assumes "outward H1 H2"
  shows "Re (to_complex (calc_x_axis_intersection H1)) \<ge> Re (to_complex (calc_x_axis_intersection H2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re (to_complex (calc_x_axis_intersection H2)) \<le> Re (to_complex (calc_x_axis_intersection H1))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Re (to_complex (calc_x_axis_intersection H2)) \<le> Re (to_complex (calc_x_axis_intersection H1))
[PROOF STEP]
have "intersects_x_axis H1" "intersects_x_axis H2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. intersects_x_axis H1 &&& intersects_x_axis H2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_poincare_line H1
is_poincare_line H2
intersects_x_axis_positive H1
intersects_x_axis_positive H2
outward H1 H2

goal (1 subgoal):
 1. intersects_x_axis H1 &&& intersects_x_axis H2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
intersects_x_axis H1
intersects_x_axis H2

goal (1 subgoal):
 1. Re (to_complex (calc_x_axis_intersection H2)) \<le> Re (to_complex (calc_x_axis_intersection H1))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
intersects_x_axis H1
intersects_x_axis H2

goal (1 subgoal):
 1. Re (to_complex (calc_x_axis_intersection H2)) \<le> Re (to_complex (calc_x_axis_intersection H1))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
intersects_x_axis H1
intersects_x_axis H2
is_poincare_line H1
is_poincare_line H2
intersects_x_axis_positive H1
intersects_x_axis_positive H2
outward H1 H2

goal (1 subgoal):
 1. Re (to_complex (calc_x_axis_intersection H2)) \<le> Re (to_complex (calc_x_axis_intersection H1))
[PROOF STEP]
proof (transfer, transfer)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
fix H1 H2
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
assume hh: "hermitean H1 \<and> H1 \<noteq> mat_zero"  "hermitean H2 \<and> H2 \<noteq> mat_zero"
[PROOF STATE]
proof (state)
this:
hermitean H1 \<and> H1 \<noteq> mat_zero
hermitean H2 \<and> H2 \<noteq> mat_zero

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
obtain A1 B1 C1 D1 A2 B2 C2 D2 where *: "H1 = (A1, B1, C1, D1)" "H2 = (A2, B2, C2, D2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A1 B1 C1 D1 A2 B2 C2 D2. \<lbrakk>H1 = (A1, B1, C1, D1); H2 = (A2, B2, C2, D2)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases H1, cases H2, auto)
[PROOF STATE]
proof (state)
this:
H1 = (A1, B1, C1, D1)
H2 = (A2, B2, C2, D2)

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
have "is_real A1" "is_real A2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_real A1 &&& is_real A2
[PROOF STEP]
using hermitean_elems * hh
[PROOF STATE]
proof (prove)
using this:
hermitean (?A, ?B, ?C, ?D) \<Longrightarrow> is_real ?A
hermitean (?A, ?B, ?C, ?D) \<Longrightarrow> is_real ?D
hermitean (?A, ?B, ?C, ?D) \<Longrightarrow> ?B = cnj ?C
hermitean (?A, ?B, ?C, ?D) \<Longrightarrow> cnj ?B = ?C
H1 = (A1, B1, C1, D1)
H2 = (A2, B2, C2, D2)
hermitean H1 \<and> H1 \<noteq> mat_zero
hermitean H2 \<and> H2 \<noteq> mat_zero

goal (1 subgoal):
 1. is_real A1 &&& is_real A2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_real A1
is_real A2

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
assume 1: "intersects_x_axis_positive_cmat H1" "intersects_x_axis_positive_cmat H2"
[PROOF STATE]
proof (state)
this:
intersects_x_axis_positive_cmat H1
intersects_x_axis_positive_cmat H2

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
assume 2: "intersects_x_axis_cmat H1" "intersects_x_axis_cmat H2"
[PROOF STATE]
proof (state)
this:
intersects_x_axis_cmat H1
intersects_x_axis_cmat H2

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
assume 3: "is_poincare_line_cmat H1" "is_poincare_line_cmat H2"
[PROOF STATE]
proof (state)
this:
is_poincare_line_cmat H1
is_poincare_line_cmat H2

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
assume 4: "outward_cmat H1 H2"
[PROOF STATE]
proof (state)
this:
outward_cmat H1 H2

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
have "A1 \<noteq> 0" "A2 \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A1 \<noteq> 0 &&& A2 \<noteq> 0
[PROOF STEP]
using * \<open>is_real A1\<close> \<open>is_real A2\<close> 1 complex.expand[of A1 0] complex.expand[of A2 0]
[PROOF STATE]
proof (prove)
using this:
H1 = (A1, B1, C1, D1)
H2 = (A2, B2, C2, D2)
is_real A1
is_real A2
intersects_x_axis_positive_cmat H1
intersects_x_axis_positive_cmat H2
Re A1 = Re 0 \<and> Im A1 = Im 0 \<Longrightarrow> A1 = 0
Re A2 = Re 0 \<and> Im A2 = Im 0 \<Longrightarrow> A2 = 0

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

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
hence "(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2
         \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1"
[PROOF STATE]
proof (prove)
using this:
A1 \<noteq> 0
A2 \<noteq> 0

goal (1 subgoal):
 1. (sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1
[PROOF STEP]
using calc_x_axis_intersection_mono[of "Re B1" "Re A1" "Re B2" "Re A2"]
[PROOF STATE]
proof (prove)
using this:
A1 \<noteq> 0
A2 \<noteq> 0
\<lbrakk>1 < - Re B1 / Re A1; Re A1 \<noteq> 0; - Re B1 / Re A1 \<le> - Re B2 / Re A2; Re A2 \<noteq> 0\<rbrakk> \<Longrightarrow> (- Re B2 + sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) / Re A2 \<le> (- Re B1 + sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) / Re A1

goal (1 subgoal):
 1. (sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1
[PROOF STEP]
using 1 4 *
[PROOF STATE]
proof (prove)
using this:
A1 \<noteq> 0
A2 \<noteq> 0
\<lbrakk>1 < - Re B1 / Re A1; Re A1 \<noteq> 0; - Re B1 / Re A1 \<le> - Re B2 / Re A2; Re A2 \<noteq> 0\<rbrakk> \<Longrightarrow> (- Re B2 + sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) / Re A2 \<le> (- Re B1 + sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) / Re A1
intersects_x_axis_positive_cmat H1
intersects_x_axis_positive_cmat H2
outward_cmat H1 H2
H1 = (A1, B1, C1, D1)
H2 = (A2, B2, C2, D2)

goal (1 subgoal):
 1. (sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
have "(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 =
          Re ((cor (sgn (Re B2)) * cor (sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) - cor (Re B2)) / A2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 = Re ((cor (sgn (Re B2)) * cor (sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) - cor (Re B2)) / A2)
[PROOF STEP]
using \<open>is_real A2\<close> \<open>A2 \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
is_real A2
A2 \<noteq> 0

goal (1 subgoal):
 1. (sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 = Re ((cor (sgn (Re B2)) * cor (sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) - cor (Re B2)) / A2)
[PROOF STEP]
by (simp add: Re_divide_real)
[PROOF STATE]
proof (state)
this:
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 = Re ((cor (sgn (Re B2)) * cor (sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) - cor (Re B2)) / A2)

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 = Re ((cor (sgn (Re B2)) * cor (sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) - cor (Re B2)) / A2)

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
have "(sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1 =
           Re ((cor (sgn (Re B1)) * cor (sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) - cor (Re B1)) / A1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1 = Re ((cor (sgn (Re B1)) * cor (sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) - cor (Re B1)) / A1)
[PROOF STEP]
using \<open>is_real A1\<close> \<open>A1 \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
is_real A1
A1 \<noteq> 0

goal (1 subgoal):
 1. (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1 = Re ((cor (sgn (Re B1)) * cor (sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) - cor (Re B1)) / A1)
[PROOF STEP]
by (simp add: Re_divide_real)
[PROOF STATE]
proof (state)
this:
(sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1 = Re ((cor (sgn (Re B1)) * cor (sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) - cor (Re B1)) / A1)

goal (1 subgoal):
 1. \<And>H1 H2 H1a H2a. \<lbrakk>hermitean H1 \<and> H1 \<noteq> mat_zero; hermitean H2 \<and> H2 \<noteq> mat_zero; intersects_x_axis_cmat H1; intersects_x_axis_cmat H2; is_poincare_line_cmat H1; is_poincare_line_cmat H2; intersects_x_axis_positive_cmat H1; intersects_x_axis_positive_cmat H2; outward_cmat H1 H2; intersects_x_axis_clmat H1a; intersects_x_axis_clmat H2a; is_poincare_line_clmat H1a; is_poincare_line_clmat H2a; intersects_x_axis_positive_clmat H1a; intersects_x_axis_positive_clmat H2a; outward_clmat H1a H2a\<rbrakk> \<Longrightarrow> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 = Re ((cor (sgn (Re B2)) * cor (sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) - cor (Re B2)) / A2)
(sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1 = Re ((cor (sgn (Re B1)) * cor (sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) - cor (Re B1)) / A1)
[PROOF STEP]
show "Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2))
          \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))"
[PROOF STATE]
proof (prove)
using this:
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 = Re ((cor (sgn (Re B2)) * cor (sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) - cor (Re B2)) / A2)
(sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1 = Re ((cor (sgn (Re B1)) * cor (sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) - cor (Re B1)) / A1)

goal (1 subgoal):
 1. Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
using 2 3 \<open>A1 \<noteq> 0\<close> \<open>A2 \<noteq> 0\<close> * \<open>is_real A1\<close> \<open>is_real A2\<close>
[PROOF STATE]
proof (prove)
using this:
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 \<le> (sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1
(sgn (Re B2) * sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2) - Re B2) / Re A2 = Re ((cor (sgn (Re B2)) * cor (sqrt ((Re B2)\<^sup>2 - (Re A2)\<^sup>2)) - cor (Re B2)) / A2)
(sgn (Re B1) * sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2) - Re B1) / Re A1 = Re ((cor (sgn (Re B1)) * cor (sqrt ((Re B1)\<^sup>2 - (Re A1)\<^sup>2)) - cor (Re B1)) / A1)
intersects_x_axis_cmat H1
intersects_x_axis_cmat H2
is_poincare_line_cmat H1
is_poincare_line_cmat H2
A1 \<noteq> 0
A2 \<noteq> 0
H1 = (A1, B1, C1, D1)
H2 = (A2, B2, C2, D2)
is_real A1
is_real A2

goal (1 subgoal):
 1. Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))
[PROOF STEP]
by (simp del: is_poincare_line_cmat_def intersects_x_axis_cmat_def)
[PROOF STATE]
proof (state)
this:
Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H2)) \<le> Re (to_complex_cvec (calc_x_axis_intersection_cmat_cvec H1))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Re (to_complex (calc_x_axis_intersection H2)) \<le> Re (to_complex (calc_x_axis_intersection H1))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cong_lt_per2__lt_1:
  assumes "Per A B C" and
    "Per A' B' C'" and
    "A B Lt A' B'" and
    "Cong A C A' C'"
  shows "B' C' Lt B C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B' C' Lt B C
[PROOF STEP]
by (meson Gt_def assms(1) assms(2) assms(3) assms(4) cong2_per2__cong cong_4321 cong__nlt cong_symmetry lt2_per2__lt or_lt_cong_gt)


[STATEMENT]
lemma ideal_generated_1[simp]: "ideal_generated {1} = UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ideal_generated {1::'a} = UNIV
[PROOF STEP]
by (metis ideal_generated_unit dvd_ideal_generated_singleton order_refl)


[STATEMENT]
lemma abs_conv_abscissa_add_leI:
  "abs_conv_abscissa (f :: 'a :: dirichlet_series fds) \<le> d \<Longrightarrow> abs_conv_abscissa g \<le> d \<Longrightarrow>
     abs_conv_abscissa (f + g) \<le> d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>abs_conv_abscissa f \<le> d; abs_conv_abscissa g \<le> d\<rbrakk> \<Longrightarrow> abs_conv_abscissa (f + g) \<le> d
[PROOF STEP]
using abs_conv_abscissa_add_le[of f g]
[PROOF STATE]
proof (prove)
using this:
abs_conv_abscissa (f + g) \<le> max (abs_conv_abscissa f) (abs_conv_abscissa g)

goal (1 subgoal):
 1. \<lbrakk>abs_conv_abscissa f \<le> d; abs_conv_abscissa g \<le> d\<rbrakk> \<Longrightarrow> abs_conv_abscissa (f + g) \<le> d
[PROOF STEP]
by (auto simp: le_max_iff_disj)


[STATEMENT]
lemma inner_mult_right': "inner a (b * of_real m) = (inner a b) * m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner a (b * of_real m) = inner a b * m
[PROOF STEP]
by (simp add: of_real_def real_inner_class.inner_scaleR_right)


[STATEMENT]
lemma env_restr_join:
  fixes m1 m2 :: "'a::type \<Rightarrow> 'b::{Finite_Join_cpo,pcpo}"
  shows "(m1 \<squnion> m2) f|` S = (m1 f|` S) \<squnion> (m2 f|` S )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (m1 \<squnion> m2) f|` S = m1 f|` S \<squnion> m2 f|` S
[PROOF STEP]
by (auto simp add: env_restr_def)


[STATEMENT]
lemma (in strategic_space_2p) max_entangled_QQ_is_nash_eq:
  assumes "\<gamma> = pi/2"
  shows "\<phi>\<^sub>A = pi/2 \<and> \<theta>\<^sub>A = 0 \<and> \<phi>\<^sub>B = pi/2 \<and> \<theta>\<^sub>B = 0 \<longrightarrow> is_nash_eq"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi>\<^sub>A = pi / 2 \<and> \<theta>\<^sub>A = 0 \<and> \<phi>\<^sub>B = pi / 2 \<and> \<theta>\<^sub>B = 0 \<longrightarrow> is_nash_eq
[PROOF STEP]
using max_entangled_alice_opt max_entangled_bob_opt is_nash_eq_def assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<gamma> = pi / 2; \<phi>\<^sub>A = pi / 2 \<and> \<theta>\<^sub>A = 0 \<and> \<phi>\<^sub>B = pi / 2 \<and> \<theta>\<^sub>B = 0\<rbrakk> \<Longrightarrow> strategic_space_2p \<gamma> ?tA ?pA \<theta>\<^sub>B \<phi>\<^sub>B \<longrightarrow> strategic_space_2p.alice_payoff \<gamma> ?tA ?pA \<theta>\<^sub>B \<phi>\<^sub>B \<le> alice_payoff
\<lbrakk>\<gamma> = pi / 2; \<phi>\<^sub>A = pi / 2 \<and> \<theta>\<^sub>A = 0 \<and> \<phi>\<^sub>B = pi / 2 \<and> \<theta>\<^sub>B = 0\<rbrakk> \<Longrightarrow> strategic_space_2p \<gamma> \<theta>\<^sub>A \<phi>\<^sub>A ?tB ?pB \<longrightarrow> strategic_space_2p.bob_payoff \<gamma> \<theta>\<^sub>A \<phi>\<^sub>A ?tB ?pB \<le> bob_payoff
is_nash_eq \<equiv> (\<forall>tA pA. strategic_space_2p \<gamma> tA pA \<theta>\<^sub>B \<phi>\<^sub>B \<longrightarrow> strategic_space_2p.alice_payoff \<gamma> tA pA \<theta>\<^sub>B \<phi>\<^sub>B \<le> alice_payoff) \<and> (\<forall>tB pB. strategic_space_2p \<gamma> \<theta>\<^sub>A \<phi>\<^sub>A tB pB \<longrightarrow> strategic_space_2p.bob_payoff \<gamma> \<theta>\<^sub>A \<phi>\<^sub>A tB pB \<le> bob_payoff)
\<gamma> = pi / 2

goal (1 subgoal):
 1. \<phi>\<^sub>A = pi / 2 \<and> \<theta>\<^sub>A = 0 \<and> \<phi>\<^sub>B = pi / 2 \<and> \<theta>\<^sub>B = 0 \<longrightarrow> is_nash_eq
[PROOF STEP]
by blast


[STATEMENT]
theorem kilogram_definition:
  "((1 *\<^sub>Q kilogram)::'a kilogram) \<cong>\<^sub>Q (\<^bold>h \<^bold>/ (6.62607015 \<cdot> 1/(10^34) *\<^sub>Q \<one>))\<^bold>\<cdot>metre\<^sup>-\<^sup>\<two>\<^bold>\<cdot>second"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) *\<^sub>Q kilogram \<cong>\<^sub>Q \<^bold>h \<^bold>\<cdot> ((662607015::'a) / (10::'a) ^ 8 \<cdot> (1::'a) / (10::'a) ^ 34 *\<^sub>Q \<one>)\<^sup>-\<^sup>\<one> \<^bold>\<cdot> metre\<^sup>-\<^sup>\<two> \<^bold>\<cdot> second
[PROOF STEP]
by si_calc


[STATEMENT]
lemma lim_stream[measurable]:
  assumes "is_policy p"
  shows "lim_stream p \<in> prob_algebra Ms \<rightarrow>\<^sub>M prob_algebra (stream_space M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lim_stream p \<in> prob_algebra Ms \<rightarrow>\<^sub>M prob_algebra (stream_space M)
[PROOF STEP]
unfolding lim_stream_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. distr (lim_sequence p x) (stream_space M) to_stream) \<in> prob_algebra Ms \<rightarrow>\<^sub>M prob_algebra (stream_space M)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_policy p

goal (1 subgoal):
 1. (\<lambda>x. distr (lim_sequence p x) (stream_space M) to_stream) \<in> prob_algebra Ms \<rightarrow>\<^sub>M prob_algebra (stream_space M)
[PROOF STEP]
by (auto intro: measurable_distr_prob_space2[OF lim_sequence])


[STATEMENT]
lemma tendsto_inverse_ereal [tendsto_intros]:
  fixes u::"_ \<Rightarrow> ereal"
  assumes "(u \<longlongrightarrow> l) F" "l \<noteq> 0"
  shows "((\<lambda>x. 1/ u x) \<longlongrightarrow> 1/l) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
proof (cases l)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
case (real r)
[PROOF STATE]
proof (state)
this:
l = ereal r

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
l = ereal r
[PROOF STEP]
have "r \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
l = ereal r

goal (1 subgoal):
 1. r \<noteq> 0
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
l = ereal r
l \<noteq> 0

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

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r \<noteq> 0
[PROOF STEP]
have "1/l = ereal(1/r)"
[PROOF STATE]
proof (prove)
using this:
r \<noteq> 0

goal (1 subgoal):
 1. 1 / l = ereal (1 / r)
[PROOF STEP]
using real
[PROOF STATE]
proof (prove)
using this:
r \<noteq> 0
l = ereal r

goal (1 subgoal):
 1. 1 / l = ereal (1 / r)
[PROOF STEP]
by (simp add: one_ereal_def)
[PROOF STATE]
proof (state)
this:
1 / l = ereal (1 / r)

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
define v where "v = (\<lambda>n. real_of_ereal(u n))"
[PROOF STATE]
proof (state)
this:
v = (\<lambda>n. real_of_ereal (u n))

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
have ureal: "eventually (\<lambda>n. u n = ereal(v n)) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. u n = ereal (v n)
[PROOF STEP]
unfolding v_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. u n = ereal (real_of_ereal (u n))
[PROOF STEP]
using real_lim_then_eventually_real assms(1) real
[PROOF STATE]
proof (prove)
using this:
(?u \<longlongrightarrow> ereal ?l) ?F \<Longrightarrow> \<forall>\<^sub>F n in ?F. ?u n = ereal (real_of_ereal (?u n))
(u \<longlongrightarrow> l) F
l = ereal r

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. u n = ereal (real_of_ereal (u n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. u n = ereal (v n)

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. u n = ereal (v n)
[PROOF STEP]
have "((\<lambda>n. ereal(v n)) \<longlongrightarrow> ereal r) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. u n = ereal (v n)

goal (1 subgoal):
 1. ((\<lambda>n. ereal (v n)) \<longlongrightarrow> ereal r) F
[PROOF STEP]
using assms real v_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. u n = ereal (v n)
(u \<longlongrightarrow> l) F
l \<noteq> 0
l = ereal r
v = (\<lambda>n. real_of_ereal (u n))

goal (1 subgoal):
 1. ((\<lambda>n. ereal (v n)) \<longlongrightarrow> ereal r) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>n. ereal (v n)) \<longlongrightarrow> ereal r) F

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. ereal (v n)) \<longlongrightarrow> ereal r) F
[PROOF STEP]
have *: "((\<lambda>n. v n) \<longlongrightarrow> r) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. ereal (v n)) \<longlongrightarrow> ereal r) F

goal (1 subgoal):
 1. (v \<longlongrightarrow> r) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(v \<longlongrightarrow> r) F

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(v \<longlongrightarrow> r) F
[PROOF STEP]
have "((\<lambda>n. 1/v n) \<longlongrightarrow> 1/r) F"
[PROOF STATE]
proof (prove)
using this:
(v \<longlongrightarrow> r) F

goal (1 subgoal):
 1. ((\<lambda>n. 1 / v n) \<longlongrightarrow> 1 / r) F
[PROOF STEP]
using \<open>r \<noteq> 0\<close> tendsto_inverse_real
[PROOF STATE]
proof (prove)
using this:
(v \<longlongrightarrow> r) F
r \<noteq> 0
\<lbrakk>(?u \<longlongrightarrow> ?l) ?F; ?l \<noteq> 0\<rbrakk> \<Longrightarrow> ((\<lambda>x. 1 / ?u x) \<longlongrightarrow> 1 / ?l) ?F

goal (1 subgoal):
 1. ((\<lambda>n. 1 / v n) \<longlongrightarrow> 1 / r) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>n. 1 / v n) \<longlongrightarrow> 1 / r) F

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. 1 / v n) \<longlongrightarrow> 1 / r) F
[PROOF STEP]
have lim: "((\<lambda>n. ereal(1/v n)) \<longlongrightarrow> 1/l) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. 1 / v n) \<longlongrightarrow> 1 / r) F

goal (1 subgoal):
 1. ((\<lambda>n. ereal (1 / v n)) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
using \<open>1/l = ereal(1/r)\<close>
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. 1 / v n) \<longlongrightarrow> 1 / r) F
1 / l = ereal (1 / r)

goal (1 subgoal):
 1. ((\<lambda>n. ereal (1 / v n)) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>n. ereal (1 / v n)) \<longlongrightarrow> 1 / l) F

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
have "r \<in> -{0}" "open (-{(0::real)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r \<in> - {0} &&& open (- {0})
[PROOF STEP]
using \<open>r \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
r \<noteq> 0

goal (1 subgoal):
 1. r \<in> - {0} &&& open (- {0})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r \<in> - {0}
open (- {0})

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r \<in> - {0}
open (- {0})
[PROOF STEP]
have "eventually (\<lambda>n. v n \<in> -{0}) F"
[PROOF STATE]
proof (prove)
using this:
r \<in> - {0}
open (- {0})

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. v n \<in> - {0}
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
r \<in> - {0}
open (- {0})
(v \<longlongrightarrow> r) F

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. v n \<in> - {0}
[PROOF STEP]
using topological_tendstoD
[PROOF STATE]
proof (prove)
using this:
r \<in> - {0}
open (- {0})
(v \<longlongrightarrow> r) F
\<lbrakk>(?f \<longlongrightarrow> ?l) ?F; open ?S; ?l \<in> ?S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in ?F. ?f x \<in> ?S

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. v n \<in> - {0}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. v n \<in> - {0}

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. v n \<in> - {0}
[PROOF STEP]
have "eventually (\<lambda>n. v n \<noteq> 0) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. v n \<in> - {0}

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. v n \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. v n \<noteq> 0

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. v n \<noteq> 0

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. v n \<noteq> 0

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
assume H: "v n \<noteq> 0" "u n = ereal(v n)"
[PROOF STATE]
proof (state)
this:
v n \<noteq> 0
u n = ereal (v n)

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
v n \<noteq> 0
u n = ereal (v n)
[PROOF STEP]
have "ereal(1/v n) = 1/ereal(v n)"
[PROOF STATE]
proof (prove)
using this:
v n \<noteq> 0
u n = ereal (v n)

goal (1 subgoal):
 1. ereal (1 / v n) = 1 / ereal (v n)
[PROOF STEP]
by (simp add: one_ereal_def)
[PROOF STATE]
proof (state)
this:
ereal (1 / v n) = 1 / ereal (v n)

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ereal (1 / v n) = 1 / ereal (v n)
[PROOF STEP]
have "ereal(1/v n) = 1/u n"
[PROOF STATE]
proof (prove)
using this:
ereal (1 / v n) = 1 / ereal (v n)

goal (1 subgoal):
 1. ereal (1 / v n) = 1 / u n
[PROOF STEP]
using H(2)
[PROOF STATE]
proof (prove)
using this:
ereal (1 / v n) = 1 / ereal (v n)
u n = ereal (v n)

goal (1 subgoal):
 1. ereal (1 / v n) = 1 / u n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ereal (1 / v n) = 1 / u n

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>v ?n2 \<noteq> 0; u ?n2 = ereal (v ?n2)\<rbrakk> \<Longrightarrow> ereal (1 / v ?n2) = 1 / u ?n2

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in F. v n \<noteq> 0
\<lbrakk>v ?n2 \<noteq> 0; u ?n2 = ereal (v ?n2)\<rbrakk> \<Longrightarrow> ereal (1 / v ?n2) = 1 / u ?n2
[PROOF STEP]
have "eventually (\<lambda>n. ereal(1/v n) = 1/u n) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. v n \<noteq> 0
\<lbrakk>v ?n2 \<noteq> 0; u ?n2 = ereal (v ?n2)\<rbrakk> \<Longrightarrow> ereal (1 / v ?n2) = 1 / u ?n2

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. ereal (1 / v n) = 1 / u n
[PROOF STEP]
using ureal eventually_elim2
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in F. v n \<noteq> 0
\<lbrakk>v ?n2 \<noteq> 0; u ?n2 = ereal (v ?n2)\<rbrakk> \<Longrightarrow> ereal (1 / v ?n2) = 1 / u ?n2
\<forall>\<^sub>F n in F. u n = ereal (v n)
\<lbrakk>eventually ?P ?F; eventually ?Q ?F; \<And>i. \<lbrakk>?P i; ?Q i\<rbrakk> \<Longrightarrow> ?R i\<rbrakk> \<Longrightarrow> eventually ?R ?F

goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. ereal (1 / v n) = 1 / u n
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. ereal (1 / v n) = 1 / u n

goal (3 subgoals):
 1. \<And>r. l = ereal r \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 3. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
with Lim_transform_eventually[OF lim this]
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. 1 / u n) \<longlongrightarrow> 1 / l) F
\<forall>\<^sub>F n in F. ereal (1 / v n) = 1 / u n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. 1 / u n) \<longlongrightarrow> 1 / l) F
\<forall>\<^sub>F n in F. ereal (1 / v n) = 1 / u n

goal (1 subgoal):
 1. ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F

goal (2 subgoals):
 1. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
case (PInf)
[PROOF STATE]
proof (state)
this:
l = \<infinity>

goal (2 subgoals):
 1. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
l = \<infinity>
[PROOF STEP]
have "1/l = 0"
[PROOF STATE]
proof (prove)
using this:
l = \<infinity>

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

goal (2 subgoals):
 1. l = \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
 2. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 / l = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
1 / l = 0

goal (1 subgoal):
 1. ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
using tendsto_inverse_ereal_PInf assms PInf
[PROOF STATE]
proof (prove)
using this:
1 / l = 0
(?u \<longlongrightarrow> \<infinity>) ?F \<Longrightarrow> ((\<lambda>x. 1 / ?u x) \<longlongrightarrow> 0) ?F
(u \<longlongrightarrow> l) F
l \<noteq> 0
l = \<infinity>

goal (1 subgoal):
 1. ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
case (MInf)
[PROOF STATE]
proof (state)
this:
l = - \<infinity>

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
l = - \<infinity>
[PROOF STEP]
have "1/l = 0"
[PROOF STATE]
proof (prove)
using this:
l = - \<infinity>

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

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
have "1/z = -1/ -z" if "z < 0" for z::ereal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 / z = - 1 / - z
[PROOF STEP]
apply (cases z)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>r. z = ereal r \<Longrightarrow> 1 / z = - 1 / - z
 2. z = \<infinity> \<Longrightarrow> 1 / z = - 1 / - z
 3. z = - \<infinity> \<Longrightarrow> 1 / z = - 1 / - z
[PROOF STEP]
using divide_ereal_def \<open> z < 0 \<close>
[PROOF STATE]
proof (prove)
using this:
?x / ?y = ?x * inverse ?y
z < 0

goal (3 subgoals):
 1. \<And>r. z = ereal r \<Longrightarrow> 1 / z = - 1 / - z
 2. z = \<infinity> \<Longrightarrow> 1 / z = - 1 / - z
 3. z = - \<infinity> \<Longrightarrow> 1 / z = - 1 / - z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?z < 0 \<Longrightarrow> 1 / ?z = - 1 / - ?z

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
?z < 0 \<Longrightarrow> 1 / ?z = - 1 / - ?z

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
have "eventually (\<lambda>n. u n < 0) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in F. u n < 0
[PROOF STEP]
by (metis (no_types) MInf assms(1) tendsto_MInfty zero_ereal_def)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in F. u n < 0

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
?z < 0 \<Longrightarrow> 1 / ?z = - 1 / - ?z
\<forall>\<^sub>F n in F. u n < 0
[PROOF STEP]
have *: "eventually (\<lambda>n. -1/-u n = 1/u n) F"
[PROOF STATE]
proof (prove)
using this:
?z < 0 \<Longrightarrow> 1 / ?z = - 1 / - ?z
\<forall>\<^sub>F n in F. u n < 0

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

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
define v where "v = (\<lambda>n. - u n)"
[PROOF STATE]
proof (state)
this:
v = (\<lambda>n. - u n)

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
have "(v \<longlongrightarrow> \<infinity>) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (v \<longlongrightarrow> \<infinity>) F
[PROOF STEP]
unfolding v_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>n. - u n) \<longlongrightarrow> \<infinity>) F
[PROOF STEP]
using MInf assms(1) tendsto_uminus_ereal
[PROOF STATE]
proof (prove)
using this:
l = - \<infinity>
(u \<longlongrightarrow> l) F
(?f \<longlongrightarrow> ?x) ?F \<Longrightarrow> ((\<lambda>x. - ?f x) \<longlongrightarrow> - ?x) ?F

goal (1 subgoal):
 1. ((\<lambda>n. - u n) \<longlongrightarrow> \<infinity>) F
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(v \<longlongrightarrow> \<infinity>) F

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(v \<longlongrightarrow> \<infinity>) F
[PROOF STEP]
have "((\<lambda>n. 1/v n) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
using this:
(v \<longlongrightarrow> \<infinity>) F

goal (1 subgoal):
 1. ((\<lambda>n. 1 / v n) \<longlongrightarrow> 0) F
[PROOF STEP]
using tendsto_inverse_ereal_PInf
[PROOF STATE]
proof (prove)
using this:
(v \<longlongrightarrow> \<infinity>) F
(?u \<longlongrightarrow> \<infinity>) ?F \<Longrightarrow> ((\<lambda>x. 1 / ?u x) \<longlongrightarrow> 0) ?F

goal (1 subgoal):
 1. ((\<lambda>n. 1 / v n) \<longlongrightarrow> 0) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>n. 1 / v n) \<longlongrightarrow> 0) F

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. 1 / v n) \<longlongrightarrow> 0) F
[PROOF STEP]
have "((\<lambda>n. -1/v n) \<longlongrightarrow> 0) F"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. 1 / v n) \<longlongrightarrow> 0) F

goal (1 subgoal):
 1. ((\<lambda>n. - 1 / v n) \<longlongrightarrow> 0) F
[PROOF STEP]
using tendsto_uminus_ereal
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. 1 / v n) \<longlongrightarrow> 0) F
(?f \<longlongrightarrow> ?x) ?F \<Longrightarrow> ((\<lambda>x. - ?f x) \<longlongrightarrow> - ?x) ?F

goal (1 subgoal):
 1. ((\<lambda>n. - 1 / v n) \<longlongrightarrow> 0) F
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
((\<lambda>n. - 1 / v n) \<longlongrightarrow> 0) F

goal (1 subgoal):
 1. l = - \<infinity> \<Longrightarrow> ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>n. - 1 / v n) \<longlongrightarrow> 0) F
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. - 1 / v n) \<longlongrightarrow> 0) F

goal (1 subgoal):
 1. ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
unfolding v_def
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. - 1 / - u n) \<longlongrightarrow> 0) F

goal (1 subgoal):
 1. ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
using Lim_transform_eventually[OF _ *] \<open> 1/l = 0 \<close>
[PROOF STATE]
proof (prove)
using this:
((\<lambda>n. - 1 / - u n) \<longlongrightarrow> 0) F
((\<lambda>n. - 1 / - u n) \<longlongrightarrow> ?l) F \<Longrightarrow> ((\<lambda>n. 1 / u n) \<longlongrightarrow> ?l) F
1 / l = 0

goal (1 subgoal):
 1. ((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. 1 / u x) \<longlongrightarrow> 1 / l) F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma outside_empty [simp]: "outside {} = (UNIV :: 'a :: {real_normed_vector, perfect_space} set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outside {} = UNIV
[PROOF STEP]
using inside_empty inside_Un_outside
[PROOF STATE]
proof (prove)
using this:
inside {} = {}
inside ?S \<union> outside ?S = - ?S

goal (1 subgoal):
 1. outside {} = UNIV
[PROOF STEP]
by blast


[STATEMENT]
lemma reflectl__coplanar:
  assumes "A B ReflectL C D"
  shows "Coplanar A B C D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar A B C D
[PROOF STEP]
by (metis (no_types) ReflectL_def Tarski_neutral_dimensionless.perp__coplanar Tarski_neutral_dimensionless_axioms assms col__coplanar col_trivial_1 ncoplanar_perm_17)


[STATEMENT]
lemma ordinal_le_timesL [simp]: "0 < x \<Longrightarrow> y \<le> x * (y::ordinal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> y \<le> x * y
[PROOF STEP]
by (drule ordinal_times_monoL[OF oSuc_leI], simp)


[STATEMENT]
lemma hsi_method_via_h_framework_completeness_and_finiteness :
  fixes M1 :: "('a::linorder,'b::linorder,'c::linorder) fsm"
  fixes M2 :: "('e,'b,'c) fsm"
  assumes "observable M1"
  and     "observable M2"
  and     "minimal M1"
  and     "minimal M2"
  and     "size_r M1 \<le> m"
  and     "size M2 \<le> m"
  and     "inputs M2 = inputs M1"
  and     "outputs M2 = outputs M1"
shows "(L M1 = L M2) \<longleftrightarrow> ((L M1 \<inter> set (hsi_method_via_h_framework M1 m)) = (L M2 \<inter> set (hsi_method_via_h_framework M1 m)))"
and "finite_tree (hsi_method_via_h_framework M1 m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (hsi_method_via_h_framework M1 m) = L M2 \<inter> Prefix_Tree.set (hsi_method_via_h_framework M1 m)) &&& finite_tree (hsi_method_via_h_framework M1 m)
[PROOF STEP]
using h_framework_static_with_empty_graph_completeness_and_finiteness[OF assms, where dist_fun="(\<lambda> k q . get_HSI M1 q)"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M1; q2 \<in> FSM.states M1; q1 \<noteq> q2\<rbrakk> \<Longrightarrow> \<exists>io. \<forall>k1 k2. io \<in> Prefix_Tree.set (get_HSI M1 q1) \<inter> Prefix_Tree.set (get_HSI M1 q2) \<and> distinguishes M1 q1 q2 io; \<And>q k. q \<in> FSM.states M1 \<Longrightarrow> finite_tree (get_HSI M1 q)\<rbrakk> \<Longrightarrow> (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m) = L M2 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m))
\<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M1; q2 \<in> FSM.states M1; q1 \<noteq> q2\<rbrakk> \<Longrightarrow> \<exists>io. \<forall>k1 k2. io \<in> Prefix_Tree.set (get_HSI M1 q1) \<inter> Prefix_Tree.set (get_HSI M1 q2) \<and> distinguishes M1 q1 q2 io; \<And>q k. q \<in> FSM.states M1 \<Longrightarrow> finite_tree (get_HSI M1 q)\<rbrakk> \<Longrightarrow> finite_tree (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m)

goal (1 subgoal):
 1. (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (hsi_method_via_h_framework M1 m) = L M2 \<inter> Prefix_Tree.set (hsi_method_via_h_framework M1 m)) &&& finite_tree (hsi_method_via_h_framework M1 m)
[PROOF STEP]
using get_HSI_distinguishes[OF assms(1,3)]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M1; q2 \<in> FSM.states M1; q1 \<noteq> q2\<rbrakk> \<Longrightarrow> \<exists>io. \<forall>k1 k2. io \<in> Prefix_Tree.set (get_HSI M1 q1) \<inter> Prefix_Tree.set (get_HSI M1 q2) \<and> distinguishes M1 q1 q2 io; \<And>q k. q \<in> FSM.states M1 \<Longrightarrow> finite_tree (get_HSI M1 q)\<rbrakk> \<Longrightarrow> (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m) = L M2 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m))
\<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M1; q2 \<in> FSM.states M1; q1 \<noteq> q2\<rbrakk> \<Longrightarrow> \<exists>io. \<forall>k1 k2. io \<in> Prefix_Tree.set (get_HSI M1 q1) \<inter> Prefix_Tree.set (get_HSI M1 q2) \<and> distinguishes M1 q1 q2 io; \<And>q k. q \<in> FSM.states M1 \<Longrightarrow> finite_tree (get_HSI M1 q)\<rbrakk> \<Longrightarrow> finite_tree (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m)
\<lbrakk>?q1.0 \<in> FSM.states M1; ?q2.0 \<in> FSM.states M1; ?q1.0 \<noteq> ?q2.0\<rbrakk> \<Longrightarrow> \<exists>io\<in>Prefix_Tree.set (get_HSI M1 ?q1.0) \<inter> Prefix_Tree.set (get_HSI M1 ?q2.0). distinguishes M1 ?q1.0 ?q2.0 io

goal (1 subgoal):
 1. (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (hsi_method_via_h_framework M1 m) = L M2 \<inter> Prefix_Tree.set (hsi_method_via_h_framework M1 m)) &&& finite_tree (hsi_method_via_h_framework M1 m)
[PROOF STEP]
using get_HSI_finite
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M1; q2 \<in> FSM.states M1; q1 \<noteq> q2\<rbrakk> \<Longrightarrow> \<exists>io. \<forall>k1 k2. io \<in> Prefix_Tree.set (get_HSI M1 q1) \<inter> Prefix_Tree.set (get_HSI M1 q2) \<and> distinguishes M1 q1 q2 io; \<And>q k. q \<in> FSM.states M1 \<Longrightarrow> finite_tree (get_HSI M1 q)\<rbrakk> \<Longrightarrow> (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m) = L M2 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m))
\<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M1; q2 \<in> FSM.states M1; q1 \<noteq> q2\<rbrakk> \<Longrightarrow> \<exists>io. \<forall>k1 k2. io \<in> Prefix_Tree.set (get_HSI M1 q1) \<inter> Prefix_Tree.set (get_HSI M1 q2) \<and> distinguishes M1 q1 q2 io; \<And>q k. q \<in> FSM.states M1 \<Longrightarrow> finite_tree (get_HSI M1 q)\<rbrakk> \<Longrightarrow> finite_tree (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m)
\<lbrakk>?q1.0 \<in> FSM.states M1; ?q2.0 \<in> FSM.states M1; ?q1.0 \<noteq> ?q2.0\<rbrakk> \<Longrightarrow> \<exists>io\<in>Prefix_Tree.set (get_HSI M1 ?q1.0) \<inter> Prefix_Tree.set (get_HSI M1 ?q2.0). distinguishes M1 ?q1.0 ?q2.0 io
finite_tree (get_HSI ?M ?q)

goal (1 subgoal):
 1. (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (hsi_method_via_h_framework M1 m) = L M2 \<inter> Prefix_Tree.set (hsi_method_via_h_framework M1 m)) &&& finite_tree (hsi_method_via_h_framework M1 m)
[PROOF STEP]
unfolding hsi_method_via_h_framework_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M1; q2 \<in> FSM.states M1; q1 \<noteq> q2\<rbrakk> \<Longrightarrow> \<exists>io. \<forall>k1 k2. io \<in> Prefix_Tree.set (get_HSI M1 q1) \<inter> Prefix_Tree.set (get_HSI M1 q2) \<and> distinguishes M1 q1 q2 io; \<And>q k. q \<in> FSM.states M1 \<Longrightarrow> finite_tree (get_HSI M1 q)\<rbrakk> \<Longrightarrow> (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m) = L M2 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m))
\<lbrakk>\<And>q1 q2. \<lbrakk>q1 \<in> FSM.states M1; q2 \<in> FSM.states M1; q1 \<noteq> q2\<rbrakk> \<Longrightarrow> \<exists>io. \<forall>k1 k2. io \<in> Prefix_Tree.set (get_HSI M1 q1) \<inter> Prefix_Tree.set (get_HSI M1 q2) \<and> distinguishes M1 q1 q2 io; \<And>q k. q \<in> FSM.states M1 \<Longrightarrow> finite_tree (get_HSI M1 q)\<rbrakk> \<Longrightarrow> finite_tree (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m)
\<lbrakk>?q1.0 \<in> FSM.states M1; ?q2.0 \<in> FSM.states M1; ?q1.0 \<noteq> ?q2.0\<rbrakk> \<Longrightarrow> \<exists>io\<in>Prefix_Tree.set (get_HSI M1 ?q1.0) \<inter> Prefix_Tree.set (get_HSI M1 ?q2.0). distinguishes M1 ?q1.0 ?q2.0 io
finite_tree (get_HSI ?M ?q)

goal (1 subgoal):
 1. (L M1 = L M2) = (L M1 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m) = L M2 \<inter> Prefix_Tree.set (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m)) &&& finite_tree (h_framework_static_with_empty_graph M1 (\<lambda>k. get_HSI M1) m)
[PROOF STEP]
by blast+


[STATEMENT]
lemma cblinfun_power_uminus: \<open>cblinfun_power (-a) n = (-1)^n *\<^sub>R cblinfun_power a n\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cblinfun_power (- a) n = (- 1) ^ n *\<^sub>R cblinfun_power a n
[PROOF STEP]
apply (subst asm_rl[of \<open>-a = (-1) *\<^sub>R a\<close>])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. - a = - 1 *\<^sub>R a
 2. cblinfun_power (- 1 *\<^sub>R a) n = (- 1) ^ n *\<^sub>R cblinfun_power a n
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cblinfun_power (- 1 *\<^sub>R a) n = (- 1) ^ n *\<^sub>R cblinfun_power a n
[PROOF STEP]
by (rule cblinfun_power_scaleR)


[STATEMENT]
lemma snd_Gauss_Jordan_upt_k_iarrays_PA:
shows "snd (Gauss_Jordan_upt_k_iarrays_PA A k) = (Gauss_Jordan_upt_k_iarrays A k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (Gauss_Jordan_upt_k_iarrays_PA A k) = Gauss_Jordan_upt_k_iarrays A k
[PROOF STEP]
unfolding Gauss_Jordan_upt_k_iarrays_PA_def Gauss_Jordan_upt_k_iarrays_def Let_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. snd (fst (foldl Gauss_Jordan_column_k_iarrays_PA (mat_iarray (1::'a) (nrows_iarray A), 0, A) [0..<Suc k]), snd (snd (foldl Gauss_Jordan_column_k_iarrays_PA (mat_iarray (1::'a) (nrows_iarray A), 0, A) [0..<Suc k]))) = snd (foldl Gauss_Jordan_column_k_iarrays (0, A) [0..<Suc k])
[PROOF STEP]
using foldl_Gauss_Jordan_column_k_iarrays_eq[of "mat_iarray 1 (nrows_iarray A)" A "Suc k"]
[PROOF STATE]
proof (prove)
using this:
snd (foldl Gauss_Jordan_column_k_iarrays_PA (mat_iarray (1::'a) (nrows_iarray A), 0, A) [0..<Suc k]) = foldl Gauss_Jordan_column_k_iarrays (0, A) [0..<Suc k]

goal (1 subgoal):
 1. snd (fst (foldl Gauss_Jordan_column_k_iarrays_PA (mat_iarray (1::'a) (nrows_iarray A), 0, A) [0..<Suc k]), snd (snd (foldl Gauss_Jordan_column_k_iarrays_PA (mat_iarray (1::'a) (nrows_iarray A), 0, A) [0..<Suc k]))) = snd (foldl Gauss_Jordan_column_k_iarrays (0, A) [0..<Suc k])
[PROOF STEP]
by simp


[STATEMENT]
lemma forball_contra1:"\<lbrakk>\<forall>y\<in>A. P x y \<longrightarrow> Q y; \<forall>y\<in>A. \<not> Q y\<rbrakk> \<Longrightarrow> \<forall>y\<in>A. \<not> P x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>y\<in>A. P x y \<longrightarrow> Q y; \<forall>y\<in>A. \<not> Q y\<rbrakk> \<Longrightarrow> \<forall>y\<in>A. \<not> P x y
[PROOF STEP]
by blast


[STATEMENT]
lemma continuity_lem_lt0_expanded:
  fixes r:: "real"
  fixes a b c:: "real"
  shows "a*r^2 + b*r + c < 0 \<Longrightarrow>
    \<exists>y'> r. \<forall>x\<in>{r<..y'}. a*x^2 + b*x + c < 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * r\<^sup>2 + b * r + c < 0 \<Longrightarrow> \<exists>y'>r. \<forall>x\<in>{r<..y'}. a * x\<^sup>2 + b * x + c < 0
[PROOF STEP]
using quadratic_poly_eval continuity_lem_lt0
[PROOF STATE]
proof (prove)
using this:
poly [:?c, ?b, ?a:] ?x = ?a * ?x\<^sup>2 + ?b * ?x + ?c
poly [:?c, ?b, ?a:] ?r < 0 \<Longrightarrow> \<exists>y'>?r. \<forall>x\<in>{?r<..y'}. poly [:?c, ?b, ?a:] x < 0

goal (1 subgoal):
 1. a * r\<^sup>2 + b * r + c < 0 \<Longrightarrow> \<exists>y'>r. \<forall>x\<in>{r<..y'}. a * x\<^sup>2 + b * x + c < 0
[PROOF STEP]
by (simp add: add.commute)


[STATEMENT]
lemma incomp_lcp_len: "\<not> u \<bowtie> v \<Longrightarrow> \<^bold>|u \<and>\<^sub>p v\<^bold>| < min \<^bold>|u\<^bold>| \<^bold>|v\<^bold>|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> u \<bowtie> v \<Longrightarrow> \<^bold>|u \<and>\<^sub>p v\<^bold>| < min \<^bold>|u\<^bold>| \<^bold>|v\<^bold>|
[PROOF STEP]
using lcp_len'[of u v] lcp_len'[of v u]
[PROOF STATE]
proof (prove)
using this:
\<not> u \<le>p v \<Longrightarrow> \<^bold>|u \<and>\<^sub>p v\<^bold>| < \<^bold>|u\<^bold>|
\<not> v \<le>p u \<Longrightarrow> \<^bold>|v \<and>\<^sub>p u\<^bold>| < \<^bold>|v\<^bold>|

goal (1 subgoal):
 1. \<not> u \<bowtie> v \<Longrightarrow> \<^bold>|u \<and>\<^sub>p v\<^bold>| < min \<^bold>|u\<^bold>| \<^bold>|v\<^bold>|
[PROOF STEP]
unfolding lcp_sym[of v] min_less_iff_conj
[PROOF STATE]
proof (prove)
using this:
\<not> u \<le>p v \<Longrightarrow> \<^bold>|u \<and>\<^sub>p v\<^bold>| < \<^bold>|u\<^bold>|
\<not> v \<le>p u \<Longrightarrow> \<^bold>|u \<and>\<^sub>p v\<^bold>| < \<^bold>|v\<^bold>|

goal (1 subgoal):
 1. \<not> u \<bowtie> v \<Longrightarrow> \<^bold>|u \<and>\<^sub>p v\<^bold>| < \<^bold>|u\<^bold>| \<and> \<^bold>|u \<and>\<^sub>p v\<^bold>| < \<^bold>|v\<^bold>|
[PROOF STEP]
by blast


[STATEMENT]
theorem Par_ZObisT[simp]:
assumes "c1 \<approx>01T d1" and "c2 \<approx>01T d2"
shows "Par c1 c2 \<approx>01T Par d1 d2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c1 | c2 \<approx>01T d1 | d2
[PROOF STEP]
using assms thetaParZOT_ZObisT
[PROOF STATE]
proof (prove)
using this:
c1 \<approx>01T d1
c2 \<approx>01T d2
thetaParZOT \<subseteq> ZObisT

goal (1 subgoal):
 1. c1 | c2 \<approx>01T d1 | d2
[PROOF STEP]
unfolding thetaParZOT_def
[PROOF STATE]
proof (prove)
using this:
c1 \<approx>01T d1
c2 \<approx>01T d2
{(c1 | c2, d1 | d2) |c1 c2 d1 d2. c1 \<approx>01T d1 \<and> c2 \<approx>01T d2} \<subseteq> ZObisT

goal (1 subgoal):
 1. c1 | c2 \<approx>01T d1 | d2
[PROOF STEP]
by blast


[STATEMENT]
lemma in_below: "a\<noteq>b \<Longrightarrow> L:Lin \<Longrightarrow>
  (x,y) : below L a b \<longleftrightarrow> x\<noteq>y \<and>
  (if y=a then (x,b) : L else
   if x=a then y=b | (b,y) : L else (x,y) : L)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<noteq> b; L \<in> Lin\<rbrakk> \<Longrightarrow> ((x, y) \<in> below L a b) = (x \<noteq> y \<and> (if y = a then (x, b) \<in> L else if x = a then y = b \<or> (b, y) \<in> L else (x, y) \<in> L))
[PROOF STEP]
by(auto simp:below_def slo_defs)


[STATEMENT]
lemma poincare_section2_rep[poincare_tac_theorems]:
  "{(120, -1000, -1000, -1000, -1000)..(120, 1000, 1000, 1000, 1000)::real*real*real*real*real} =
  {eucl_of_list [120, -1000, -1000, -1000, -1000]..eucl_of_list [120, 1000, 1000, 1000, 1000]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(120, - 1000, - 1000, - 1000, - 1000)..(120, 1000, 1000, 1000, 1000)} = {eucl_of_list [120, - 1000, - 1000, - 1000, - 1000]..eucl_of_list [120, 1000, 1000, 1000, 1000]}
[PROOF STEP]
by (auto simp: eucl_of_list_prod)


[STATEMENT]
lemma strong_consensus_cluster_imp_cons_cluster:
\<comment> \<open>Every intact set is a consensus cluster\<close>
  shows "strong_consensus_cluster I \<Longrightarrow> is_cons_cluster I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. strong_consensus_cluster I \<Longrightarrow> is_cons_cluster I
[PROOF STEP]
unfolding strong_consensus_cluster_def is_cons_cluster_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. I \<subseteq> W \<and> (\<forall>p\<in>I. \<exists>Q\<subseteq>I. quorum_of p Q) \<and> (\<forall>Q Q'. quorum_of_set I Q \<and> quorum_of_set I Q' \<longrightarrow> I \<inter> Q \<inter> Q' \<noteq> {}) \<Longrightarrow> I \<subseteq> W \<and> (\<forall>p\<in>I. \<exists>Q\<subseteq>I. quorum_of p Q) \<and> (\<forall>Q Q'. quorum_of_set I Q \<and> quorum_of_set I Q' \<longrightarrow> W \<inter> Q \<inter> Q' \<noteq> {})
[PROOF STEP]
by blast


[STATEMENT]
lemma merge1_img_eq: "\<forall>(t2,e2) \<in> fset xs. merge1 t2 = t2 \<Longrightarrow> ((\<lambda>(t,e). (merge1 t,e)) |`| xs) = xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>(t2, e2)\<in>fset xs. merge1 t2 = t2 \<Longrightarrow> (\<lambda>(t, e). (merge1 t, e)) |`| xs = xs
[PROOF STEP]
using fset_img_eq[of xs "\<lambda>(t,e). (merge1 t,e)"]
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>fset xs. (case x of (t, e) \<Rightarrow> (merge1 t, e)) = x \<Longrightarrow> (\<lambda>(t, e). (merge1 t, e)) |`| xs = xs

goal (1 subgoal):
 1. \<forall>(t2, e2)\<in>fset xs. merge1 t2 = t2 \<Longrightarrow> (\<lambda>(t, e). (merge1 t, e)) |`| xs = xs
[PROOF STEP]
by force


[STATEMENT]
lemma add_lessD2: "i + j < (k::nat) \<Longrightarrow> j < k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i + j < k \<Longrightarrow> j < k
[PROOF STEP]
by simp