[STATEMENT]
lemma feasible_Sup_trans:
  fixes S::"'s trans set"
  assumes fS: "\<forall>t\<in>S. feasible t"
  shows "feasible (Sup_trans S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. feasible (Sup_trans S)
[PROOF STEP]
proof(cases "S={}", simp add:Sup_trans_def Sup_exp_def, blast, intro feasibleI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
fix b::real and P::"'s expect"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
assume bP: "bounded_by b P" and nP: "nneg P"
     and neS: "S \<noteq> {}"
[PROOF STATE]
proof (state)
this:
bounded_by b P
nneg P
S \<noteq> {}

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
from neS
[PROOF STATE]
proof (chain)
picking this:
S \<noteq> {}
[PROOF STEP]
obtain t where tin: "t \<in> S"
[PROOF STATE]
proof (prove)
using this:
S \<noteq> {}

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

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
with fS
[PROOF STATE]
proof (chain)
picking this:
\<forall>t\<in>S. feasible t
t \<in> S
[PROOF STEP]
have ft: "feasible t"
[PROOF STATE]
proof (prove)
using this:
\<forall>t\<in>S. feasible t
t \<in> S

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

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
with bP nP
[PROOF STATE]
proof (chain)
picking this:
bounded_by b P
nneg P
feasible t
[PROOF STEP]
have "\<lambda>s. 0 \<tturnstile> t P"
[PROOF STATE]
proof (prove)
using this:
bounded_by b P
nneg P
feasible t

goal (1 subgoal):
 1. \<lambda>s. 0 \<tturnstile> t P
[PROOF STEP]
by(auto)
[PROOF STATE]
proof (state)
this:
\<lambda>s. 0 \<tturnstile> t P

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<lambda>s. 0 \<tturnstile> t P

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<lambda>s. 0 \<tturnstile> t P

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
from bP nP
[PROOF STATE]
proof (chain)
picking this:
bounded_by b P
nneg P
[PROOF STEP]
have "sound P"
[PROOF STATE]
proof (prove)
using this:
bounded_by b P
nneg P

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

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
with tin fS
[PROOF STATE]
proof (chain)
picking this:
t \<in> S
\<forall>t\<in>S. feasible t
sound P
[PROOF STEP]
have "t P \<tturnstile> Sup_trans S P"
[PROOF STATE]
proof (prove)
using this:
t \<in> S
\<forall>t\<in>S. feasible t
sound P

goal (1 subgoal):
 1. t P \<tturnstile> Sup_trans S P
[PROOF STEP]
by(auto intro!:Sup_trans_upper2)
[PROOF STATE]
proof (state)
this:
t P \<tturnstile> Sup_trans S P

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
t P \<tturnstile> Sup_trans S P

goal (2 subgoals):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
 2. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> nneg (Sup_trans S P)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<lambda>s. 0 \<tturnstile> Sup_trans S P
[PROOF STEP]
show "nneg (Sup_trans S P)"
[PROOF STATE]
proof (prove)
using this:
\<lambda>s. 0 \<tturnstile> Sup_trans S P

goal (1 subgoal):
 1. nneg (Sup_trans S P)
[PROOF STEP]
by(auto)
[PROOF STATE]
proof (state)
this:
nneg (Sup_trans S P)

goal (1 subgoal):
 1. \<And>b P. \<lbrakk>S \<noteq> {}; bounded_by b P; nneg P\<rbrakk> \<Longrightarrow> bounded_by b (Sup_trans S P)
[PROOF STEP]
from fS bP nP
[PROOF STATE]
proof (chain)
picking this:
\<forall>t\<in>S. feasible t
bounded_by b P
nneg P
[PROOF STEP]
show "bounded_by b (Sup_trans S P)"
[PROOF STATE]
proof (prove)
using this:
\<forall>t\<in>S. feasible t
bounded_by b P
nneg P

goal (1 subgoal):
 1. bounded_by b (Sup_trans S P)
[PROOF STEP]
by(auto intro!:bounded_byI2[OF Sup_trans_least2])
[PROOF STATE]
proof (state)
this:
bounded_by b (Sup_trans S P)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma power_inductl: "z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> x ^ i \<cdot> z \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<squnion> x \<cdot> y \<le> y \<Longrightarrow> x ^ i \<cdot> z \<le> y
[PROOF STEP]
by (induct i, simp_all, metis dual_order.trans mult_isol mult_assoc)


[STATEMENT]
lemma span_breakdown:
  assumes bS: "b \<in> S"
    and aS: "a \<in> span S"
  shows "\<exists>k. a - k *s b \<in> span (S - {b})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>k. a - k *s b \<in> span (S - {b})
[PROOF STEP]
using assms span_insert [of b "S - {b}"]
[PROOF STATE]
proof (prove)
using this:
b \<in> S
a \<in> span S
span (insert b (S - {b})) = {x. \<exists>k. x - k *s b \<in> span (S - {b})}

goal (1 subgoal):
 1. \<exists>k. a - k *s b \<in> span (S - {b})
[PROOF STEP]
by (simp add: insert_absorb)


[STATEMENT]
lemma arg_min_on_image_finite:
  fixes f :: "'b \<Rightarrow> 'c :: linorder"
  assumes "inj_on f (g ` B)" "finite B" "B \<noteq> {}"
  shows "arg_min_on f (g ` B) = g (arg_min_on (f \<circ> g) B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arg_min_on f (g ` B) = g (arg_min_on (f \<circ> g) B)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. arg_min_on f (g ` B) = g (arg_min_on (f \<circ> g) B)
[PROOF STEP]
note * = arg_min_if_finite[OF \<open>finite B\<close> \<open>B \<noteq> {}\<close>, of \<open>f \<circ> g\<close>]
[PROOF STATE]
proof (state)
this:
arg_min_on (f \<circ> g) B \<in> B
\<not> (\<exists>x\<in>B. (f \<circ> g) x < (f \<circ> g) (arg_min_on (f \<circ> g) B))

goal (1 subgoal):
 1. arg_min_on f (g ` B) = g (arg_min_on (f \<circ> g) B)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. arg_min_on f (g ` B) = g (arg_min_on (f \<circ> g) B)
[PROOF STEP]
using assms * arg_min_inj_eq
[PROOF STATE]
proof (prove)
using this:
inj_on f (g ` B)
finite B
B \<noteq> {}
arg_min_on (f \<circ> g) B \<in> B
\<not> (\<exists>x\<in>B. (f \<circ> g) x < (f \<circ> g) (arg_min_on (f \<circ> g) B))
\<lbrakk>inj_on ?f {x. ?P x}; ?P ?a; \<forall>y. ?P y \<longrightarrow> ?f ?a \<le> ?f y\<rbrakk> \<Longrightarrow> arg_min ?f ?P = ?a

goal (1 subgoal):
 1. arg_min_on f (g ` B) = g (arg_min_on (f \<circ> g) B)
[PROOF STEP]
by (smt arg_min_if_finite(1) arg_min_least
        comp_apply finite_imageI imageE image_eqI image_is_empty inj_onD less_le)
[PROOF STATE]
proof (state)
this:
arg_min_on f (g ` B) = g (arg_min_on (f \<circ> g) B)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in domain) finite_extension_is_subring:
  assumes "subring K R" "set xs \<subseteq> carrier R" shows "subring (finite_extension K xs) R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subring (finite_extension K xs) R
[PROOF STEP]
using assms simple_extension_is_subring
[PROOF STATE]
proof (prove)
using this:
subring K R
set xs \<subseteq> carrier R
\<lbrakk>subring ?K R; ?x \<in> carrier R\<rbrakk> \<Longrightarrow> subring (simple_extension ?K ?x) R

goal (1 subgoal):
 1. subring (finite_extension K xs) R
[PROOF STEP]
by (induct xs) (auto)


[STATEMENT]
lemma SubstTermP_subst [simp]:
      "(SubstTermP v i t u)(j::=w) = SubstTermP (subst j w v) (subst j w i) (subst j w t) (subst j w u)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SubstTermP v i t u)(j::=w) = SubstTermP (subst j w v) (subst j w i) (subst j w t) (subst j w u)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (SubstTermP v i t u)(j::=w) = SubstTermP (subst j w v) (subst j w i) (subst j w t) (subst j w u)
[PROOF STEP]
obtain s::name and k::name
    where "atom s \<sharp> (v,i,t,u,w,j,k)"  "atom k \<sharp> (v,i,t,u,w,j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>s k. \<lbrakk>atom s \<sharp> (v, i, t, u, w, j, k); atom k \<sharp> (v, i, t, u, w, j)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis obtain_fresh)
[PROOF STATE]
proof (state)
this:
atom s \<sharp> (v, i, t, u, w, j, k)
atom k \<sharp> (v, i, t, u, w, j)

goal (1 subgoal):
 1. (SubstTermP v i t u)(j::=w) = SubstTermP (subst j w v) (subst j w i) (subst j w t) (subst j w u)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
atom s \<sharp> (v, i, t, u, w, j, k)
atom k \<sharp> (v, i, t, u, w, j)

goal (1 subgoal):
 1. (SubstTermP v i t u)(j::=w) = SubstTermP (subst j w v) (subst j w i) (subst j w t) (subst j w u)
[PROOF STEP]
by (simp add: SubstTermP.simps [of s _ _ _ _ k])
[PROOF STATE]
proof (state)
this:
(SubstTermP v i t u)(j::=w) = SubstTermP (subst j w v) (subst j w i) (subst j w t) (subst j w u)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma quasinorm_sum_subset:
  "N1 \<subseteq>\<^sub>N N1 +\<^sub>N N2" "N2 \<subseteq>\<^sub>N N1 +\<^sub>N N2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N1 \<subseteq>\<^sub>N N1 +\<^sub>N N2 &&& N2 \<subseteq>\<^sub>N N1 +\<^sub>N N2
[PROOF STEP]
by (rule quasinorm_subsetI[of _ _ 1], auto simp add: quasinorm_sum(1), rule Inf_lower, auto,
  metis add.commute add.left_neutral eNorm_zero)+


[STATEMENT]
lemma indep_imp_subset_basis:
  assumes "indep X"
  shows "\<exists>B. basis B \<and> X \<subseteq> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
indep X

goal (1 subgoal):
 1. \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
proof (induction X rule: psubset_inc_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. X \<subseteq> carrier
 2. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
case carrier
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. X \<subseteq> carrier
 2. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<subseteq> carrier
[PROOF STEP]
using indep_subset_carrier[OF assms]
[PROOF STATE]
proof (prove)
using this:
X \<subseteq> carrier

goal (1 subgoal):
 1. X \<subseteq> carrier
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
X \<subseteq> carrier

goal (1 subgoal):
 1. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
case (step X)
[PROOF STATE]
proof (state)
this:
\<lbrakk>X \<subset> ?Y; ?Y \<subseteq> carrier; indep ?Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> ?Y \<subseteq> B
indep X

goal (1 subgoal):
 1. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
\<lbrakk>X \<subset> ?Y; ?Y \<subseteq> carrier; indep ?Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> ?Y \<subseteq> B
indep X

goal (1 subgoal):
 1. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
assume "\<not> basis X"
[PROOF STATE]
proof (state)
this:
\<not> basis X

goal (1 subgoal):
 1. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> basis X
[PROOF STEP]
obtain x where "x \<in> carrier" "x \<notin> X" "indep (insert x X)"
[PROOF STATE]
proof (prove)
using this:
\<not> basis X

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> carrier; x \<notin> X; indep (insert x X)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using step.prems indep_not_basis
[PROOF STATE]
proof (prove)
using this:
\<not> basis X
indep X
\<lbrakk>indep ?X; \<not> basis ?X\<rbrakk> \<Longrightarrow> \<exists>x\<in>carrier - ?X. indep (insert x ?X)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> carrier; x \<notin> X; indep (insert x X)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> carrier
x \<notin> X
indep (insert x X)

goal (1 subgoal):
 1. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> carrier
x \<notin> X
indep (insert x X)
[PROOF STEP]
have ?case
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier
x \<notin> X
indep (insert x X)

goal (1 subgoal):
 1. \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
using step.IH[of "insert x X"] indep_subset_carrier
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier
x \<notin> X
indep (insert x X)
\<lbrakk>X \<subset> insert x X; insert x X \<subseteq> carrier; indep (insert x X)\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> insert x X \<subseteq> B
indep ?X \<Longrightarrow> ?X \<subseteq> carrier

goal (1 subgoal):
 1. \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>B. basis B \<and> X \<subseteq> B

goal (1 subgoal):
 1. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<not> basis X \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B

goal (1 subgoal):
 1. \<And>X. \<lbrakk>\<And>Y. \<lbrakk>X \<subset> Y; Y \<subseteq> carrier; indep Y\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> Y \<subseteq> B; indep X\<rbrakk> \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> basis X \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<not> basis X \<Longrightarrow> \<exists>B. basis B \<and> X \<subseteq> B

goal (1 subgoal):
 1. \<exists>B. basis B \<and> X \<subseteq> B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>B. basis B \<and> X \<subseteq> B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Ring) right_exact_surjec:"\<lbrakk>R module M; R module N; f \<in> mHom R M N;
 p \<in> mHom R N (Zm R e); exact3 R M f N p (Zm R e)\<rbrakk> \<Longrightarrow> surjec\<^bsub>M,N\<^esub> f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; f \<in> mHom R M N; p \<in> mHom R N (Zm R e); exact3 R M f N p (Zm R e)\<rbrakk> \<Longrightarrow> surjec\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (simp add:surjec_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; f \<in> mHom R M N; p \<in> mHom R N (Zm R e); exact3 R M f N p (Zm R e)\<rbrakk> \<Longrightarrow> f \<in> aHom M N \<and> surj_to f (carrier M) (carrier N)
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>R module M; R module N; f \<in> mHom R M N; p \<in> mHom R N (Zm R e); exact3 R M f N p (Zm R e)\<rbrakk> \<Longrightarrow> f \<in> aHom M N
 2. \<lbrakk>R module M; R module N; f \<in> mHom R M N; p \<in> mHom R N (Zm R e); exact3 R M f N p (Zm R e)\<rbrakk> \<Longrightarrow> surj_to f (carrier M) (carrier N)
[PROOF STEP]
apply (simp add:mHom_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; f \<in> mHom R M N; p \<in> mHom R N (Zm R e); exact3 R M f N p (Zm R e)\<rbrakk> \<Longrightarrow> surj_to f (carrier M) (carrier N)
[PROOF STEP]
apply (simp add:surj_to_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; f \<in> mHom R M N; p \<in> mHom R N (Zm R e); exact3 R M f N p (Zm R e)\<rbrakk> \<Longrightarrow> f ` carrier M = carrier N
[PROOF STEP]
apply (simp add:exact3_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; f \<in> mHom R M N; p \<in> mHom R N (Zm R e); f ` carrier M = ker\<^bsub>N,Zm R e\<^esub> p\<rbrakk> \<Longrightarrow> ker\<^bsub>N,Zm R e\<^esub> p = carrier N
[PROOF STEP]
apply (simp add:M_to_Z_0)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma vec_inv_dim[simp]: "dim_vec (vec_inv v) = dim_vec v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec (vec_inv v) = dim_vec v
[PROOF STEP]
unfolding vec_inv_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec ((1::'a) / (v \<bullet>c v) \<cdot>\<^sub>v conjugate v) = dim_vec v
[PROOF STEP]
by auto


[STATEMENT]
lemma until_always: "(INF n. (SUP i \<in> {i. i < n} . - p i) \<squnion> ((p :: nat \<Rightarrow> 'a) n)) \<le> p n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n
[PROOF STEP]
have "(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF i\<in>{i. i \<le> n}. p i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n})
[PROOF STEP]
proof (induction n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> 0})
 2. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
have "(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (SUP i\<in>{i. i < 0}. - p i) \<squnion> p 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (SUP i\<in>{i. i < 0}. - p i) \<squnion> p 0
[PROOF STEP]
by (rule INF_lower, simp)
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (SUP i\<in>{i. i < 0}. - p i) \<squnion> p 0

goal (2 subgoals):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> 0})
 2. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (SUP i\<in>{i. i < 0}. - p i) \<squnion> p 0

goal (2 subgoals):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> 0})
 2. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
have "... \<le> (INF i\<in>{i. i \<le> 0}. p i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i\<in>{i. i < 0}. - p i) \<squnion> p 0 \<le> Inf (p ` {i. i \<le> 0})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(SUP i\<in>{i. i < 0}. - p i) \<squnion> p 0 \<le> Inf (p ` {i. i \<le> 0})

goal (2 subgoals):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> 0})
 2. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> 0})
[PROOF STEP]
show "(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF i\<in>{i. i \<le> 0}. p i)"
[PROOF STATE]
proof (prove)
using this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> 0})

goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> 0})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> 0})

goal (1 subgoal):
 1. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
fix n::nat
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
assume "(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF i \<in> {i. i \<le> n}. p i)"
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n})

goal (1 subgoal):
 1. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n})

goal (1 subgoal):
 1. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
have "\<And> i . i \<le> n \<Longrightarrow> ... \<le> p i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i \<le> n \<Longrightarrow> Inf (p ` {i. i \<le> n}) \<le> p i
[PROOF STEP]
by (rule INF_lower, simp)
[PROOF STATE]
proof (state)
this:
?i \<le> n \<Longrightarrow> Inf (p ` {i. i \<le> n}) \<le> p ?i

goal (1 subgoal):
 1. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
?i1 \<le> n \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p ?i1
[PROOF STEP]
have [simp]: "\<And> i . i \<le> n \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i"
[PROOF STATE]
proof (prove)
using this:
?i1 \<le> n \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p ?i1

goal (1 subgoal):
 1. \<And>i. i \<le> n \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?i \<le> n \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p ?i

goal (1 subgoal):
 1. \<And>n. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n}) \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
show "(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF i \<in> {i. i \<le> Suc n}. p i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})
[PROOF STEP]
proof (rule INF_greatest, safe, cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. \<lbrakk>i \<le> Suc n; ?P3 i\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
 2. \<And>i. \<lbrakk>i \<le> Suc n; \<not> ?P3 i\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
fix i::nat
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. \<lbrakk>i \<le> Suc n; ?P3 i\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
 2. \<And>i. \<lbrakk>i \<le> Suc n; \<not> ?P3 i\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
assume "i \<le> n"
[PROOF STATE]
proof (state)
this:
i \<le> n

goal (2 subgoals):
 1. \<And>i. \<lbrakk>i \<le> Suc n; ?P3 i\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
 2. \<And>i. \<lbrakk>i \<le> Suc n; \<not> ?P3 i\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
i \<le> n
[PROOF STEP]
show "(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i"
[PROOF STATE]
proof (prove)
using this:
i \<le> n

goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
fix i::nat
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
have A: "{i. i \<le> n} = {i . i < Suc n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {i. i \<le> n} = {i. i < Suc n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{i. i \<le> n} = {i. i < Suc n}

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
have B: "(SUP i\<in>{i. i \<le> n}. - p i) \<le> - (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SUP i\<in>{i. i \<le> n}. - p i) \<le> - (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n)
[PROOF STEP]
by (metis (lifting, mono_tags) \<open>(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF i\<in>{i. i \<le> n}. p i)\<close> compl_mono uminus_INF)
[PROOF STATE]
proof (state)
this:
(SUP i\<in>{i. i \<le> n}. - p i) \<le> - (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n)

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
assume "i \<le> Suc n" and "\<not> i \<le> n"
[PROOF STATE]
proof (state)
this:
i \<le> Suc n
\<not> i \<le> n

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
i \<le> Suc n
\<not> i \<le> n
[PROOF STEP]
have [simp]: "i = Suc n"
[PROOF STATE]
proof (prove)
using this:
i \<le> Suc n
\<not> i \<le> n

goal (1 subgoal):
 1. i = Suc n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
i = Suc n

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
have "(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> ((SUP i\<in>{i. i \<le> n}. - p i) \<squnion> p (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> ((SUP i\<in>{i. i \<le> n}. - p i) \<squnion> p (Suc n))
[PROOF STEP]
by (simp add: A, rule INF_lower, simp)
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> ((SUP i\<in>{i. i \<le> n}. - p i) \<squnion> p (Suc n))

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> ((SUP i\<in>{i. i \<le> n}. - p i) \<squnion> p (Suc n))

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
have "... \<le> ((INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> ((- (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n)) \<squnion> p (Suc n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> ((SUP i\<in>{i. i \<le> n}. - p i) \<squnion> p (Suc n)) \<le> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> (- (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<squnion> p (Suc n))
[PROOF STEP]
by (rule inf_mono, simp_all, rule_tac y = "- (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n)" in order_trans, simp_all add: B)
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> ((SUP i\<in>{i. i \<le> n}. - p i) \<squnion> p (Suc n)) \<le> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> (- (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<squnion> p (Suc n))

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> ((SUP i\<in>{i. i \<le> n}. - p i) \<squnion> p (Suc n)) \<le> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> (- (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<squnion> p (Suc n))

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
have "... \<le> p i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> (- (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<squnion> p (Suc n)) \<le> p i
[PROOF STEP]
by (simp add: inf_sup_distrib1 inf_compl_bot)
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<sqinter> (- (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<squnion> p (Suc n)) \<le> p i

goal (1 subgoal):
 1. \<And>i. \<lbrakk>i \<le> Suc n; \<not> i \<le> n\<rbrakk> \<Longrightarrow> (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
show "(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i"
[PROOF STATE]
proof (prove)
using this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i

goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> Suc n})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n})

goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> Inf (p ` {i. i \<le> n})

goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n
[PROOF STEP]
have "(INF i\<in>{i. i \<le> n}. p i) \<le> p n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf (p ` {i. i \<le> n}) \<le> p n
[PROOF STEP]
by (rule INF_lower, auto)
[PROOF STATE]
proof (state)
this:
Inf (p ` {i. i \<le> n}) \<le> p n

goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n
[PROOF STEP]
show "(INF n. (SUP i \<in> {i. i < n} . - p i) \<squnion> ((p :: nat \<Rightarrow> 'a) n)) \<le> p n"
[PROOF STATE]
proof (prove)
using this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n

goal (1 subgoal):
 1. (INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(INF n. (SUP i\<in>{i. i < n}. - p i) \<squnion> p n) \<le> p n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lsc_hull_of_proper_convex:
  fixes f :: "'a::euclidean_space \<Rightarrow> ereal"
  assumes "convex_on UNIV f" "proper f"
  shows "lsc (lsc_hull f) \<and> proper (lsc_hull f) \<and> convex_on UNIV (lsc_hull f) \<and>
     (\<forall>x. (f x = (lsc_hull f) x) | x : rel_frontier (domain f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lsc (lsc_hull f) \<and> proper (lsc_hull f) \<and> Lower_Semicontinuous.convex_on UNIV (lsc_hull f) \<and> (\<forall>x. f x = lsc_hull f x \<or> x \<in> rel_frontier (domain f))
[PROOF STEP]
by (metis assms convex_lsc_hull lsc_hull_of_convex_agrees lsc_hull_of_proper_convex_proper lsc_lsc_hull)


[STATEMENT]
lemma x_in_MPLS_if:
  fixes x PROB
  assumes "x \<in> MPLS PROB"
  shows "\<exists>s as. s \<in> valid_states PROB \<and> as \<in> valid_plans PROB \<and> x = Inf (PLS s as)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>s as. s \<in> valid_states PROB \<and> as \<in> valid_plans PROB \<and> x = Inf (PLS s as)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> MPLS PROB

goal (1 subgoal):
 1. \<exists>s as. s \<in> valid_states PROB \<and> as \<in> valid_plans PROB \<and> x = Inf (PLS s as)
[PROOF STEP]
unfolding MPLS_def
[PROOF STATE]
proof (prove)
using this:
x \<in> (\<lambda>(s, as). Inf (PLS s as)) ` {(s, as). s \<in> valid_states PROB \<and> as \<in> valid_plans PROB}

goal (1 subgoal):
 1. \<exists>s as. s \<in> valid_states PROB \<and> as \<in> valid_plans PROB \<and> x = Inf (PLS s as)
[PROOF STEP]
by fast


[STATEMENT]
lemma char_le_iff_nat_of_char: "x \<le> y \<longleftrightarrow> of_char x \<le> (of_char y :: nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<le> y) = (of_char x \<le> of_char y)
[PROOF STEP]
by (fact less_eq_char_def)


[STATEMENT]
lemma emeasure_Un:
  "A \<in> sets M \<Longrightarrow> B \<in> sets M \<Longrightarrow> emeasure M (A \<union> B) = emeasure M A + emeasure M (B - A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<in> sets M; B \<in> sets M\<rbrakk> \<Longrightarrow> emeasure M (A \<union> B) = emeasure M A + emeasure M (B - A)
[PROOF STEP]
using plus_emeasure[of A M "B - A"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>A \<in> sets M; B - A \<in> sets M; A \<inter> (B - A) = {}\<rbrakk> \<Longrightarrow> emeasure M A + emeasure M (B - A) = emeasure M (A \<union> (B - A))

goal (1 subgoal):
 1. \<lbrakk>A \<in> sets M; B \<in> sets M\<rbrakk> \<Longrightarrow> emeasure M (A \<union> B) = emeasure M A + emeasure M (B - A)
[PROOF STEP]
by auto


[STATEMENT]
lemma aless:"(n < m) = ((ant n) < (ant m))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n < m) = (ant n < ant m)
[PROOF STEP]
apply (simp add:less_ant_def,
       cut_tac ale[of "n" "m"], arith)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma replicate_numeral [simp]: "replicate (numeral k) x = x # replicate (pred_numeral k) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. replicate (numeral k) x = x # replicate (pred_numeral k) x
[PROOF STEP]
by (simp add: numeral_eq_Suc)


[STATEMENT]
lemma pow_2_gt: "n \<ge> 2 \<Longrightarrow> (2::int) < 2 ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 \<le> n \<Longrightarrow> 2 < 2 ^ n
[PROOF STEP]
by (induct n) auto


[STATEMENT]
lemma ChurchRosser_conversion: "is_ChurchRosser = (relset\<^sup>\<leftrightarrow>\<^sup>* \<subseteq> relset\<^sup>\<down>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_ChurchRosser = ({(x, y). x \<rightarrow> y}\<^sup>\<leftrightarrow>\<^sup>* \<subseteq> {(x, y). x \<rightarrow> y}\<^sup>\<down>)
[PROOF STEP]
by (auto simp add: is_ChurchRosser_def cs_join srtc_conversion)


[STATEMENT]
lemma pair_standard_borel_spaceUNIV:
  assumes "standard_borel_space_UNIV M"
      and "standard_borel_space_UNIV N"
    shows "standard_borel_space_UNIV (M \<Otimes>\<^sub>M N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. standard_borel_space_UNIV (M \<Otimes>\<^sub>M N)
[PROOF STEP]
apply(rule standard_borel_space_UNIVI')
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. standard_borel (M \<Otimes>\<^sub>M N)
 2. space (M \<Otimes>\<^sub>M N) = UNIV
[PROOF STEP]
using assms pair_standard_borel_standard[of M N]
[PROOF STATE]
proof (prove)
using this:
standard_borel_space_UNIV M
standard_borel_space_UNIV N
\<lbrakk>standard_borel M; standard_borel N\<rbrakk> \<Longrightarrow> standard_borel (M \<Otimes>\<^sub>M N)

goal (2 subgoals):
 1. standard_borel (M \<Otimes>\<^sub>M N)
 2. space (M \<Otimes>\<^sub>M N) = UNIV
[PROOF STEP]
by(auto simp add: standard_borel_space_UNIV_def standard_borel_space_UNIV_axioms_def space_pair_measure)


[STATEMENT]
lemma accept\<^sub>R_LTS:
  assumes "range w \<subseteq> \<Sigma>"
  shows "accept\<^sub>R (\<delta>, q\<^sub>0, \<alpha>) w \<longleftrightarrow> accept\<^sub>R_LTS (reach\<^sub>t \<Sigma> \<delta> q\<^sub>0, q\<^sub>0, \<alpha>) w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. accept\<^sub>R (\<delta>, q\<^sub>0, \<alpha>) w = accept\<^sub>R_LTS (reach\<^sub>t \<Sigma> \<delta> q\<^sub>0, q\<^sub>0, \<alpha>) w
[PROOF STEP]
unfolding transfer_accept accept\<^sub>G\<^sub>R_LTS.simps accept\<^sub>R_LTS.simps accept\<^sub>G\<^sub>R_LTS[OF assms] case_prod_unfold accepting_pair\<^sub>G\<^sub>R_LTS_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>p\<in>(\<lambda>p. (fst p, {snd p})) ` \<alpha>. \<exists>r. LTS_is_inf_run (reach\<^sub>t \<Sigma> \<delta> q\<^sub>0) w r \<and> r 0 = q\<^sub>0 \<and> limit (\<lambda>i. (r i, w i, r (Suc i))) \<inter> fst (fst p, snd p) = {} \<and> (\<forall>I\<in>snd (fst p, snd p). limit (\<lambda>i. (r i, w i, r (Suc i))) \<inter> I \<noteq> {})) = (\<exists>p\<in>\<alpha>. \<exists>r. LTS_is_inf_run (reach\<^sub>t \<Sigma> \<delta> q\<^sub>0) w r \<and> r 0 = q\<^sub>0 \<and> limit (\<lambda>i. (r i, w i, r (Suc i))) \<inter> fst p = {} \<and> limit (\<lambda>i. (r i, w i, r (Suc i))) \<inter> snd p \<noteq> {})
[PROOF STEP]
by simp


[STATEMENT]
lemma conjugate_transpose_rank_le:
  assumes "A \<in> carrier_mat n nc"
  shows "vec_space.rank nc (A\<^sup>H) \<le> rank A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_space.rank nc A\<^sup>H \<le> rank A
[PROOF STEP]
by (metis assms carrier_matD(2) carrier_mat_triv dim_row_conjugate dual_order.trans index_transpose_mat(2) rank_mat_mul_right transpose_rank_mul_conjugate_transpose)


[STATEMENT]
lemma beukers_aux_by_parts_aux:
  assumes xz: "x \<in> {0<..<1}" "z \<in> {0<..<1}" and "k \<le> n"
  shows "(LBINT y=0..1. Q n y * (1/(1-(1-x*y)*z))) =
         (LBINT y=0..1. Q (n-k) y * (fact k * (x*z)^k / (1-(1-x*y)*z) ^ (k+1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))
[PROOF STEP]
using assms(3)
[PROOF STATE]
proof (prove)
using this:
k \<le> n

goal (1 subgoal):
 1. LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))
[PROOF STEP]
proof (induction k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
case (Suc k)
[PROOF STATE]
proof (state)
this:
k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))
Suc k \<le> n

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
note [derivative_intros] = DERIV_chain2[OF has_field_derivative_Gen_Shleg]
[PROOF STATE]
proof (state)
this:
(?g has_real_derivative ?Db) (at ?x within ?s) \<Longrightarrow> ((\<lambda>x. Gen_Shleg ?n1 ?k1 (?g x)) has_real_derivative Gen_Shleg ?n1 (Suc ?k1) (?g ?x) * ?Db) (at ?x within ?s)

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
define G where "G = (\<lambda>y. -fact k * (x*z)^k / (1-(1-x*y)*z) ^ (k+1))"
[PROOF STATE]
proof (state)
this:
G = (\<lambda>y. - fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
define g where "g = (\<lambda>y. fact (Suc k) * (x*z)^Suc k / (1-(1-x*y)*z) ^ (k+2))"
[PROOF STATE]
proof (state)
this:
g = (\<lambda>y. fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (k + 2))

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
have less: "(1 - x * y) * z < 1" and neq: "(1 - x * y) * z \<noteq> 1"
    if y: "y \<in> {0..1}" for y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1 - x * y) * z < 1 &&& (1 - x * y) * z \<noteq> 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (1 - x * y) * z < 1
 2. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
from y xz
[PROOF STATE]
proof (chain)
picking this:
y \<in> {0..1}
x \<in> {0<..<1}
z \<in> {0<..<1}
[PROOF STEP]
have "x * y \<le> x * 1"
[PROOF STATE]
proof (prove)
using this:
y \<in> {0..1}
x \<in> {0<..<1}
z \<in> {0<..<1}

goal (1 subgoal):
 1. x * y \<le> x * 1
[PROOF STEP]
by (intro mult_left_mono) auto
[PROOF STATE]
proof (state)
this:
x * y \<le> x * 1

goal (2 subgoals):
 1. (1 - x * y) * z < 1
 2. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x * y \<le> x * 1

goal (2 subgoals):
 1. (1 - x * y) * z < 1
 2. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
have "\<dots> < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * 1 < 1
[PROOF STEP]
using xz
[PROOF STATE]
proof (prove)
using this:
x \<in> {0<..<1}
z \<in> {0<..<1}

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

goal (2 subgoals):
 1. (1 - x * y) * z < 1
 2. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
x * y < 1
[PROOF STEP]
have "(1 - x * y) * z \<le> 1 * z"
[PROOF STATE]
proof (prove)
using this:
x * y < 1

goal (1 subgoal):
 1. (1 - x * y) * z \<le> 1 * z
[PROOF STEP]
using xz y
[PROOF STATE]
proof (prove)
using this:
x * y < 1
x \<in> {0<..<1}
z \<in> {0<..<1}
y \<in> {0..1}

goal (1 subgoal):
 1. (1 - x * y) * z \<le> 1 * z
[PROOF STEP]
by (intro mult_right_mono) auto
[PROOF STATE]
proof (state)
this:
(1 - x * y) * z \<le> 1 * z

goal (2 subgoals):
 1. (1 - x * y) * z < 1
 2. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1 - x * y) * z \<le> 1 * z

goal (2 subgoals):
 1. (1 - x * y) * z < 1
 2. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
have "\<dots> < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 * z < 1
[PROOF STEP]
using xz
[PROOF STATE]
proof (prove)
using this:
x \<in> {0<..<1}
z \<in> {0<..<1}

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

goal (2 subgoals):
 1. (1 - x * y) * z < 1
 2. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(1 - x * y) * z < 1
[PROOF STEP]
show "(1 - x * y) * z < 1"
[PROOF STATE]
proof (prove)
using this:
(1 - x * y) * z < 1

goal (1 subgoal):
 1. (1 - x * y) * z < 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(1 - x * y) * z < 1

goal (1 subgoal):
 1. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
thus "(1 - x * y) * z \<noteq> 1"
[PROOF STATE]
proof (prove)
using this:
(1 - x * y) * z < 1

goal (1 subgoal):
 1. (1 - x * y) * z \<noteq> 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(1 - x * y) * z \<noteq> 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?y \<in> {0..1} \<Longrightarrow> (1 - x * ?y) * z < 1
?y \<in> {0..1} \<Longrightarrow> (1 - x * ?y) * z \<noteq> 1

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
have cont: "continuous_on {0..1} g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {0..1} g
[PROOF STEP]
using neq
[PROOF STATE]
proof (prove)
using this:
?y \<in> {0..1} \<Longrightarrow> (1 - x * ?y) * z \<noteq> 1

goal (1 subgoal):
 1. continuous_on {0..1} g
[PROOF STEP]
by (auto simp: g_def intro!: continuous_intros)
[PROOF STATE]
proof (state)
this:
continuous_on {0..1} g

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
have deriv: "(G has_real_derivative g y) (at y within {0..1})" if y: "y \<in> {0..1}" for y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (G has_real_derivative g y) (at y within {0..1})
[PROOF STEP]
unfolding G_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>y. - fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)) has_real_derivative g y) (at y within {0..1})
[PROOF STEP]
by (insert neq xz y, (rule derivative_eq_intros refl power_not_zero)+)
       (auto simp: divide_simps g_def)
[PROOF STATE]
proof (state)
this:
?y \<in> {0..1} \<Longrightarrow> (G has_real_derivative g ?y) (at ?y within {0..1})

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
have deriv2: "(Q (n - Suc k) has_real_derivative Q (n - k) y) (at y within {0..1})" for y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Q (n - Suc k) has_real_derivative Q (n - k) y) (at y within {0..1})
[PROOF STEP]
using Suc.prems
[PROOF STATE]
proof (prove)
using this:
Suc k \<le> n

goal (1 subgoal):
 1. (Q (n - Suc k) has_real_derivative Q (n - k) y) (at y within {0..1})
[PROOF STEP]
by (auto intro!: derivative_eq_intros simp: Suc_diff_Suc Q_def)
[PROOF STATE]
proof (state)
this:
(Q (n - Suc k) has_real_derivative Q (n - k) ?y) (at ?y within {0..1})

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
have "(LBINT y=0..1. Q (n-Suc k) y * (fact (Suc k) * (x*z)^Suc k / (1-(1-x*y)*z) ^ (k+2))) =
        (LBINT y=0..1. Q (n-Suc k) y * g y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (k + 2)) = LBINT y=0..1. Q (n - Suc k) y * g y
[PROOF STEP]
by (simp add: g_def)
[PROOF STATE]
proof (state)
this:
LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (k + 2)) = LBINT y=0..1. Q (n - Suc k) y * g y

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (k + 2)) = LBINT y=0..1. Q (n - Suc k) y * g y

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
have "(LBINT y=0..1. Q (n-Suc k) y * g y) = -(LBINT y=0..1. Q (n-k) y * G y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LBINT y=0..1. Q (n - Suc k) y * g y = - (LBINT y=0..1. Q (n - k) y * G y)
[PROOF STEP]
using Suc.prems deriv deriv2 cont
[PROOF STATE]
proof (prove)
using this:
Suc k \<le> n
?y \<in> {0..1} \<Longrightarrow> (G has_real_derivative g ?y) (at ?y within {0..1})
(Q (n - Suc k) has_real_derivative Q (n - k) ?y) (at ?y within {0..1})
continuous_on {0..1} g

goal (1 subgoal):
 1. LBINT y=0..1. Q (n - Suc k) y * g y = - (LBINT y=0..1. Q (n - k) y * G y)
[PROOF STEP]
by (subst interval_lebesgue_integral_by_parts_01[where f = "Q (n-k)" and G = G])
       (auto intro!: continuous_intros simp: Q_def)
[PROOF STATE]
proof (state)
this:
LBINT y=0..1. Q (n - Suc k) y * g y = - (LBINT y=0..1. Q (n - k) y * G y)

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LBINT y=0..1. Q (n - Suc k) y * g y = - (LBINT y=0..1. Q (n - k) y * G y)

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
have "\<dots> = (LBINT y=0..1. Q (n-k) y * (fact k * (x*z)^k / (1-(1-x*y)*z) ^ (k+1)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (LBINT y=0..1. Q (n - k) y * G y) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))
[PROOF STEP]
by (simp add: G_def flip: interval_lebesgue_integral_uminus)
[PROOF STATE]
proof (state)
this:
- (LBINT y=0..1. Q (n - k) y * G y) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
 2. \<And>k. \<lbrakk>k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1)); Suc k \<le> n\<rbrakk> \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (k + 2)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (k + 2)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))

goal (1 subgoal):
 1. LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
using Suc
[PROOF STATE]
proof (prove)
using this:
LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (k + 2)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))
k \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - k) y * (fact k * (x * z) ^ k / (1 - (1 - x * y) * z) ^ (k + 1))
Suc k \<le> n

goal (1 subgoal):
 1. LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - Suc k) y * (fact (Suc k) * (x * z) ^ Suc k / (1 - (1 - x * y) * z) ^ (Suc k + 1))

goal (1 subgoal):
 1. 0 \<le> n \<Longrightarrow> LBINT y=0..1. Q n y * (1 / (1 - (1 - x * y) * z)) = LBINT y=0..1. Q (n - 0) y * (fact 0 * (x * z) ^ 0 / (1 - (1 - x * y) * z) ^ (0 + 1))
[PROOF STEP]
qed auto


[STATEMENT]
lemma GS_rec_eq': "GS_rec v $ s = (\<Squnion>a \<in> A s. GS_rec_step (d(s:= a)) v $ s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. GS_rec v $ s = (\<Squnion>a\<in>A s. GS_rec_step (d(s := a)) v $ s)
[PROOF STEP]
using GS_rec_eq GS_rec_step_def
[PROOF STATE]
proof (prove)
using this:
GS_rec ?v $ ?s = (\<Squnion>a\<in>A ?s. r (?s, a) + l * ((P_lower (?d(?s := a)) *v GS_rec ?v) $ ?s + (P_upper (?d(?s := a)) *v ?v) $ ?s))
GS_rec_step ?d ?v \<equiv> r_vec ?d + l *\<^sub>R (P_lower ?d *v GS_rec ?v + P_upper ?d *v ?v)

goal (1 subgoal):
 1. GS_rec v $ s = (\<Squnion>a\<in>A s. GS_rec_step (d(s := a)) v $ s)
[PROOF STEP]
by auto


[STATEMENT]
lemma csum_cexp: "\<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow>
  q ^c r1 +c q ^c r2 \<le>o q ^c (r1 +c r2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> q ^c r1 +c q ^c r2 \<le>o q ^c (r1 +c r2)
[PROOF STEP]
apply (rule csum_cinfinite_bound)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> q ^c r1 \<le>o q ^c (r1 +c r2)
 2. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> q ^c r2 \<le>o q ^c (r1 +c r2)
 3. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Card_order (q ^c r1)
 4. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Card_order (q ^c r2)
 5. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Cinfinite (q ^c (r1 +c r2))
[PROOF STEP]
apply (metis cexp_mono2' cinfinite_def finite.emptyI ordLeq_csum1)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> q ^c r2 \<le>o q ^c (r1 +c r2)
 2. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Card_order (q ^c r1)
 3. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Card_order (q ^c r2)
 4. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Cinfinite (q ^c (r1 +c r2))
[PROOF STEP]
apply (metis cexp_mono2' cinfinite_def finite.emptyI ordLeq_csum2)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Card_order (q ^c r1)
 2. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Card_order (q ^c r2)
 3. \<lbrakk>Cinfinite r1; Cinfinite r2; Card_order q; ctwo \<le>o q\<rbrakk> \<Longrightarrow> Cinfinite (q ^c (r1 +c r2))
[PROOF STEP]
by (simp_all add: Card_order_cexp Cinfinite_csum1 Cinfinite_cexp cinfinite_cexp)


[STATEMENT]
lemma zhmset_of_enat_0[simp]: "zhmset_of_enat 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zhmset_of_enat 0 = 0
[PROOF STEP]
by (simp add: zero_enat_def)


[STATEMENT]
lemma optimize_sat:
  assumes "maximize A b c = Some (Sat x)"
  shows "[A *\<^sub>v x]\<le>b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [A*\<^sub>vx]\<le>b
[PROOF STEP]
using assms maximize_option_elim[OF assms]
    max_lp_in_sat_primal[OF optimize_sound[of A b c x, OF assms]]
[PROOF STATE]
proof (prove)
using this:
maximize A b c = Some (Inr x)
dim_vec b = dim_row A
dim_vec c = dim_col A
x \<in> sat_primal A b

goal (1 subgoal):
 1. [A*\<^sub>vx]\<le>b
[PROOF STEP]
by blast


[STATEMENT]
lemma (in order_topology) order_tendsto_iff:
  "(f \<longlongrightarrow> x) F \<longleftrightarrow> (\<forall>l<x. eventually (\<lambda>x. l < f x) F) \<and> (\<forall>u>x. eventually (\<lambda>x. f x < u) F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> x) F = ((\<forall>l<x. \<forall>\<^sub>F x in F. l < f x) \<and> (\<forall>u>x. \<forall>\<^sub>F x in F. f x < u))
[PROOF STEP]
by (auto simp: nhds_order filterlim_inf filterlim_INF filterlim_principal)


[STATEMENT]
lemma valofn_ge_2p: "2^exponent (x :: ('e, 'f) float) / 2^bias TYPE(('e, 'f) float) \<le> valofn x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ IEEE.exponent x / 2 ^ bias TYPE(('e, 'f) IEEE.float) \<le> valofn x
[PROOF STEP]
unfolding valofn_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ IEEE.exponent x / 2 ^ bias TYPE(('e, 'f) IEEE.float) \<le> 2 ^ IEEE.exponent x / 2 ^ bias TYPE(('e, 'f) IEEE.float) * (1 + real (fraction x) / 2 ^ LENGTH('f))
[PROOF STEP]
by (simp add: field_simps)


[STATEMENT]
lemma Lxy_append: "Lxy (xs@ys) S = Lxy xs S @ Lxy ys S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lxy (xs @ ys) S = Lxy xs S @ Lxy ys S
[PROOF STEP]
by(simp add: Lxy_def)


[STATEMENT]
lemma inside_inside_subset: "inside(inside S) \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inside (inside S) \<subseteq> S
[PROOF STEP]
using inside_inside union_with_outside
[PROOF STATE]
proof (prove)
using this:
?S \<subseteq> inside ?T \<Longrightarrow> inside ?S - ?T \<subseteq> inside ?T
?S \<union> outside ?S = - inside ?S

goal (1 subgoal):
 1. inside (inside S) \<subseteq> S
[PROOF STEP]
by fastforce


[STATEMENT]
lemma list_length_4_realise:
  "length ls = 4 \<Longrightarrow> \<exists> n0 n1 n2 n3. ls = [n0, n1, n2, n3]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length ls = 4 \<Longrightarrow> \<exists>n0 n1 n2 n3. ls = [n0, n1, n2, n3]
[PROOF STEP]
by (metis list_exhaust_size_eq0 list_exhaust_size_gt0 numeral_4_eq_4 size_Cons_lem_eq zero_less_Suc)


[STATEMENT]
lemma (in is_tiny_dghm) is_tiny_dghm_op'[dg_op_intros]:
  assumes "\<AA>' = op_dg \<AA>" and "\<BB>' = op_dg \<BB>" and "\<alpha>' = \<alpha>"
  shows "op_dghm \<FF> : \<AA>' \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^sub>.\<^sub>t\<^sub>i\<^sub>n\<^sub>y\<^bsub>\<alpha>'\<^esub> \<BB>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. op_dghm \<FF> : \<AA>' \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^sub>.\<^sub>t\<^sub>i\<^sub>n\<^sub>y\<^bsub>\<alpha>'\<^esub> \<BB>'
[PROOF STEP]
unfolding assms
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. op_dghm \<FF> : op_dg \<AA> \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^sub>.\<^sub>t\<^sub>i\<^sub>n\<^sub>y\<^bsub>\<alpha>\<^esub> op_dg \<BB>
[PROOF STEP]
by (rule is_tiny_dghm_op)


[STATEMENT]
lemma pi_approx_128:
  "abs (pi - 1069028584064966747859680373161870783301 / 2^128) \<le> inverse (2^128)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>pi - 1069028584064966747859680373161870783301 / 2 ^ 128\<bar> \<le> inverse (2 ^ 128)
[PROOF STEP]
by (rule approx_coarsen[OF pi_approx_54_decimals]) simp


[STATEMENT]
lemma "((P\<longrightarrow>Q) \<longrightarrow> P)  \<longrightarrow>  P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((P \<longrightarrow> Q) \<longrightarrow> P) \<longrightarrow> P
[PROOF STEP]
by blast


[STATEMENT]
lemma l: "l > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < l
[PROOF STEP]
using n_voters_pos
[PROOF STATE]
proof (prove)
using this:
0 < l * (k + 1)

goal (1 subgoal):
 1. 0 < l
[PROOF STEP]
by auto


[STATEMENT]
lemma two_div_sqrt_two [simp]:
  shows "2 * complex_of_real (sqrt (1/2)) = complex_of_real (sqrt 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * complex_of_real (sqrt (1 / 2)) = complex_of_real (sqrt 2)
[PROOF STEP]
apply(auto simp add: real_sqrt_divide algebra_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 / complex_of_real (sqrt 2) = complex_of_real (sqrt 2)
[PROOF STEP]
by (metis divide_eq_0_iff nonzero_mult_div_cancel_left sqr_of_sqrt_2)


[STATEMENT]
lemma "map (\<lambda>i::int. i + 1) [0, 1] = [1, 2]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map (\<lambda>i. i + 1) [0, 1] = [1, 2]
[PROOF STEP]
by (smt list.map)


[STATEMENT]
lemma setdist_closure_2 [simp]: "setdist T (closure S) = setdist T S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. setdist T (closure S) = setdist T S
[PROOF STEP]
by (metis setdist_closure_1 setdist_sym)


[STATEMENT]
lemma connected_linear_image:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector"
  assumes "linear f" and "connected s"
  shows "connected (f ` s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connected (f ` s)
[PROOF STEP]
using connected_continuous_image assms linear_continuous_on linear_conv_bounded_linear
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>continuous_on ?s ?f; connected ?s\<rbrakk> \<Longrightarrow> connected (?f ` ?s)
linear f
connected s
bounded_linear ?f \<Longrightarrow> continuous_on ?s ?f
linear ?f = bounded_linear ?f

goal (1 subgoal):
 1. connected (f ` s)
[PROOF STEP]
by blast


[STATEMENT]
lemma edge_succ_pred[simp]: "edge_succ M (edge_pred M a) = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. edge_succ M (edge_pred M a) = a
[PROOF STEP]
by (metis edge_pred_def edge_succ_permutes permutes_inverses(1))


[STATEMENT]
lemma fraction_scaleC_times [simp]:
  fixes a :: "'a::complex_algebra_1"
  shows "(numeral u / numeral v) *\<^sub>C (numeral w * a) = (numeral u * numeral w / numeral v) *\<^sub>C a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (numeral u / numeral v) *\<^sub>C (numeral w * a) = (numeral u * numeral w / numeral v) *\<^sub>C a
[PROOF STEP]
by (metis (no_types, lifting) of_complex_numeral scaleC_conv_of_complex scaleC_scaleC times_divide_eq_left)


[STATEMENT]
lemma convex_on_diff:
  fixes f :: "real \<Rightarrow> real"
  assumes f: "convex_on I f"
    and I: "x \<in> I" "y \<in> I"
    and t: "x < t" "t < y"
  shows "(f x - f t) / (x - t) \<le> (f x - f y) / (x - y)"
    and "(f x - f y) / (x - y) \<le> (f t - f y) / (t - y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y) &&& (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
define a where "a \<equiv> (t - y) / (x - y)"
[PROOF STATE]
proof (state)
this:
a \<equiv> (t - y) / (x - y)

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
with t
[PROOF STATE]
proof (chain)
picking this:
x < t
t < y
a \<equiv> (t - y) / (x - y)
[PROOF STEP]
have "0 \<le> a" "0 \<le> 1 - a"
[PROOF STATE]
proof (prove)
using this:
x < t
t < y
a \<equiv> (t - y) / (x - y)

goal (1 subgoal):
 1. 0 \<le> a &&& 0 \<le> 1 - a
[PROOF STEP]
by (auto simp: field_simps)
[PROOF STATE]
proof (state)
this:
0 \<le> a
0 \<le> 1 - a

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
with f \<open>x \<in> I\<close> \<open>y \<in> I\<close>
[PROOF STATE]
proof (chain)
picking this:
convex_on I f
x \<in> I
y \<in> I
0 \<le> a
0 \<le> 1 - a
[PROOF STEP]
have cvx: "f (a * x + (1 - a) * y) \<le> a * f x + (1 - a) * f y"
[PROOF STATE]
proof (prove)
using this:
convex_on I f
x \<in> I
y \<in> I
0 \<le> a
0 \<le> 1 - a

goal (1 subgoal):
 1. f (a * x + (1 - a) * y) \<le> a * f x + (1 - a) * f y
[PROOF STEP]
by (auto simp: convex_on_def)
[PROOF STATE]
proof (state)
this:
f (a * x + (1 - a) * y) \<le> a * f x + (1 - a) * f y

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
have "a * x + (1 - a) * y = a * (x - y) + y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * x + (1 - a) * y = a * (x - y) + y
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
a * x + (1 - a) * y = a * (x - y) + y

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
a * x + (1 - a) * y = a * (x - y) + y

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
have "\<dots> = t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * (x - y) + y = t
[PROOF STEP]
unfolding a_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (t - y) / (x - y) * (x - y) + y = t
[PROOF STEP]
using \<open>x < t\<close> \<open>t < y\<close>
[PROOF STATE]
proof (prove)
using this:
x < t
t < y

goal (1 subgoal):
 1. (t - y) / (x - y) * (x - y) + y = t
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a * (x - y) + y = t

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
a * x + (1 - a) * y = t
[PROOF STEP]
have "f t \<le> a * f x + (1 - a) * f y"
[PROOF STATE]
proof (prove)
using this:
a * x + (1 - a) * y = t

goal (1 subgoal):
 1. f t \<le> a * f x + (1 - a) * f y
[PROOF STEP]
using cvx
[PROOF STATE]
proof (prove)
using this:
a * x + (1 - a) * y = t
f (a * x + (1 - a) * y) \<le> a * f x + (1 - a) * f y

goal (1 subgoal):
 1. f t \<le> a * f x + (1 - a) * f y
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f t \<le> a * f x + (1 - a) * f y

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f t \<le> a * f x + (1 - a) * f y

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
have "\<dots> = a * (f x - f y) + f y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * f x + (1 - a) * f y = a * (f x - f y) + f y
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
a * f x + (1 - a) * f y = a * (f x - f y) + f y

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
f t \<le> a * (f x - f y) + f y
[PROOF STEP]
have "f t - f y \<le> a * (f x - f y)"
[PROOF STATE]
proof (prove)
using this:
f t \<le> a * (f x - f y) + f y

goal (1 subgoal):
 1. f t - f y \<le> a * (f x - f y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f t - f y \<le> a * (f x - f y)

goal (2 subgoals):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
 2. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
with t
[PROOF STATE]
proof (chain)
picking this:
x < t
t < y
f t - f y \<le> a * (f x - f y)
[PROOF STEP]
show "(f x - f t) / (x - t) \<le> (f x - f y) / (x - y)"
[PROOF STATE]
proof (prove)
using this:
x < t
t < y
f t - f y \<le> a * (f x - f y)

goal (1 subgoal):
 1. (f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
[PROOF STEP]
by (simp add: le_divide_eq divide_le_eq field_simps a_def)
[PROOF STATE]
proof (state)
this:
(f x - f t) / (x - t) \<le> (f x - f y) / (x - y)

goal (1 subgoal):
 1. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
with t
[PROOF STATE]
proof (chain)
picking this:
x < t
t < y
(f x - f t) / (x - t) \<le> (f x - f y) / (x - y)
[PROOF STEP]
show "(f x - f y) / (x - y) \<le> (f t - f y) / (t - y)"
[PROOF STATE]
proof (prove)
using this:
x < t
t < y
(f x - f t) / (x - t) \<le> (f x - f y) / (x - y)

goal (1 subgoal):
 1. (f x - f y) / (x - y) \<le> (f t - f y) / (t - y)
[PROOF STEP]
by (simp add: le_divide_eq divide_le_eq field_simps)
[PROOF STATE]
proof (state)
this:
(f x - f y) / (x - y) \<le> (f t - f y) / (t - y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mem_grow_size:
  assumes "mem_grow m n = m'"
  shows "(mem_size m + (64000 * n)) = mem_size m'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mem_size m + 64000 * n = mem_size m'
[PROOF STEP]
using assms Abs_mem_inverse Abs_bytes_inverse
[PROOF STATE]
proof (prove)
using this:
mem_grow m n = m'
?y \<in> UNIV \<Longrightarrow> Rep_mem (Abs_mem ?y) = ?y
?y \<in> UNIV \<Longrightarrow> Rep_bytes (Abs_bytes ?y) = ?y

goal (1 subgoal):
 1. mem_size m + 64000 * n = mem_size m'
[PROOF STEP]
unfolding mem_grow_def mem_size_def mem_append_def bytes_replicate_def
[PROOF STATE]
proof (prove)
using this:
map_fun Rep_mem (map_fun Rep_bytes Abs_mem) (@) m (map_fun id (map_fun Rep_uint8 Abs_bytes) (\<lambda>n b. replicate n (Abs_uint8 b)) (n * 64000) 0) = m'
?y \<in> UNIV \<Longrightarrow> Rep_mem (Abs_mem ?y) = ?y
?y \<in> UNIV \<Longrightarrow> Rep_bytes (Abs_bytes ?y) = ?y

goal (1 subgoal):
 1. length (Rep_mem m) + 64000 * n = length (Rep_mem m')
[PROOF STEP]
by auto


[STATEMENT]
lemma vec_first_lincomb_list:
  assumes Xs: "set Xs \<subseteq> carrier_vec n"
    and nm: "m \<le> n"
  shows "vec_first (n.lincomb_list c Xs) m =
       m.lincomb_list c (map (\<lambda> v. vec_first v m) Xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs)
[PROOF STEP]
using Xs
[PROOF STATE]
proof (prove)
using this:
set Xs \<subseteq> carrier_vec n

goal (1 subgoal):
 1. vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs)
[PROOF STEP]
proof (induction Xs arbitrary: c)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>c. set [] \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c []) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) [])
 2. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
set [] \<subseteq> carrier_vec n

goal (2 subgoals):
 1. \<And>c. set [] \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c []) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) [])
 2. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_first (n.lincomb_list c []) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) [])
[PROOF STEP]
by (simp add: nm)
[PROOF STATE]
proof (state)
this:
vec_first (n.lincomb_list c []) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) [])

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
case (Cons x Xs)
[PROOF STATE]
proof (state)
this:
set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list ?c4 Xs) m = m.lincomb_list ?c4 (map (\<lambda>v. vec_first v m) Xs)
set (x # Xs) \<subseteq> carrier_vec n

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
from Cons.prems
[PROOF STATE]
proof (chain)
picking this:
set (x # Xs) \<subseteq> carrier_vec n
[PROOF STEP]
have x: "x \<in> carrier_vec n" and Xs: "set Xs \<subseteq> carrier_vec n"
[PROOF STATE]
proof (prove)
using this:
set (x # Xs) \<subseteq> carrier_vec n

goal (1 subgoal):
 1. x \<in> carrier_vec n &&& set Xs \<subseteq> carrier_vec n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> carrier_vec n
set Xs \<subseteq> carrier_vec n

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
have "vec_first (n.lincomb_list c (x # Xs)) m =
          vec_first (c 0 \<cdot>\<^sub>v x + n.lincomb_list (c \<circ> Suc) Xs) m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_first (n.lincomb_list c (x # Xs)) m = vec_first (c 0 \<cdot>\<^sub>v x + n.lincomb_list (c \<circ> Suc) Xs) m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vec_first (n.lincomb_list c (x # Xs)) m = vec_first (c 0 \<cdot>\<^sub>v x + n.lincomb_list (c \<circ> Suc) Xs) m

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
vec_first (n.lincomb_list c (x # Xs)) m = vec_first (c 0 \<cdot>\<^sub>v x + n.lincomb_list (c \<circ> Suc) Xs) m

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
have "\<dots> = vec_first (c 0 \<cdot>\<^sub>v x) m + vec_first (n.lincomb_list (c \<circ> Suc) Xs) m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_first (c 0 \<cdot>\<^sub>v x + n.lincomb_list (c \<circ> Suc) Xs) m = vec_first (c 0 \<cdot>\<^sub>v x) m + vec_first (n.lincomb_list (c \<circ> Suc) Xs) m
[PROOF STEP]
using vec_first_add[of m "c 0 \<cdot>\<^sub>v x"] x n.lincomb_list_carrier[OF Xs, of "c \<circ> Suc"] nm
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>m \<le> dim_vec (c 0 \<cdot>\<^sub>v x); m \<le> dim_vec ?y\<rbrakk> \<Longrightarrow> vec_first (c 0 \<cdot>\<^sub>v x + ?y) m = vec_first (c 0 \<cdot>\<^sub>v x) m + vec_first ?y m
x \<in> carrier_vec n
n.lincomb_list (c \<circ> Suc) Xs \<in> carrier_vec n
m \<le> n

goal (1 subgoal):
 1. vec_first (c 0 \<cdot>\<^sub>v x + n.lincomb_list (c \<circ> Suc) Xs) m = vec_first (c 0 \<cdot>\<^sub>v x) m + vec_first (n.lincomb_list (c \<circ> Suc) Xs) m
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
vec_first (c 0 \<cdot>\<^sub>v x + n.lincomb_list (c \<circ> Suc) Xs) m = vec_first (c 0 \<cdot>\<^sub>v x) m + vec_first (n.lincomb_list (c \<circ> Suc) Xs) m

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
vec_first (c 0 \<cdot>\<^sub>v x + n.lincomb_list (c \<circ> Suc) Xs) m = vec_first (c 0 \<cdot>\<^sub>v x) m + vec_first (n.lincomb_list (c \<circ> Suc) Xs) m

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
have "vec_first (c 0 \<cdot>\<^sub>v x) m = c 0 \<cdot>\<^sub>v vec_first x m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_first (c 0 \<cdot>\<^sub>v x) m = c 0 \<cdot>\<^sub>v vec_first x m
[PROOF STEP]
using vec_first_smult[OF nm, of x "c 0"] Cons.prems
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier_vec n \<Longrightarrow> vec_first (c 0 \<cdot>\<^sub>v x) m = c 0 \<cdot>\<^sub>v vec_first x m
set (x # Xs) \<subseteq> carrier_vec n

goal (1 subgoal):
 1. vec_first (c 0 \<cdot>\<^sub>v x) m = c 0 \<cdot>\<^sub>v vec_first x m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vec_first (c 0 \<cdot>\<^sub>v x) m = c 0 \<cdot>\<^sub>v vec_first x m

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
vec_first (c 0 \<cdot>\<^sub>v x) m = c 0 \<cdot>\<^sub>v vec_first x m

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
have "vec_first (n.lincomb_list (c \<circ> Suc) Xs) m =
               m.lincomb_list (c \<circ> Suc) (map (\<lambda> v. vec_first v m) Xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_first (n.lincomb_list (c \<circ> Suc) Xs) m = m.lincomb_list (c \<circ> Suc) (map (\<lambda>v. vec_first v m) Xs)
[PROOF STEP]
using Cons
[PROOF STATE]
proof (prove)
using this:
set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list ?c4 Xs) m = m.lincomb_list ?c4 (map (\<lambda>v. vec_first v m) Xs)
set (x # Xs) \<subseteq> carrier_vec n

goal (1 subgoal):
 1. vec_first (n.lincomb_list (c \<circ> Suc) Xs) m = m.lincomb_list (c \<circ> Suc) (map (\<lambda>v. vec_first v m) Xs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
vec_first (n.lincomb_list (c \<circ> Suc) Xs) m = m.lincomb_list (c \<circ> Suc) (map (\<lambda>v. vec_first v m) Xs)

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
vec_first (n.lincomb_list (c \<circ> Suc) Xs) m = m.lincomb_list (c \<circ> Suc) (map (\<lambda>v. vec_first v m) Xs)

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
have "c 0 \<cdot>\<^sub>v vec_first x m + \<dots> =
               m.lincomb_list c (map (\<lambda> v. vec_first v m) (x # Xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c 0 \<cdot>\<^sub>v vec_first x m + m.lincomb_list (c \<circ> Suc) (map (\<lambda>v. vec_first v m) Xs) = m.lincomb_list c (map (\<lambda>v. vec_first v m) (x # Xs))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c 0 \<cdot>\<^sub>v vec_first x m + m.lincomb_list (c \<circ> Suc) (map (\<lambda>v. vec_first v m) Xs) = m.lincomb_list c (map (\<lambda>v. vec_first v m) (x # Xs))

goal (1 subgoal):
 1. \<And>a Xs c. \<lbrakk>\<And>c. set Xs \<subseteq> carrier_vec n \<Longrightarrow> vec_first (n.lincomb_list c Xs) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) Xs); set (a # Xs) \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> vec_first (n.lincomb_list c (a # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (a # Xs))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
vec_first (n.lincomb_list c (x # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (x # Xs))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
vec_first (n.lincomb_list c (x # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (x # Xs))

goal (1 subgoal):
 1. vec_first (n.lincomb_list c (x # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (x # Xs))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vec_first (n.lincomb_list c (x # Xs)) m = m.lincomb_list c (map (\<lambda>v. vec_first v m) (x # Xs))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bnt_flip_NTMap_vdomain[cat_cs_simps]:
  assumes "category \<alpha> \<AA>"
    and "category \<alpha> \<BB>"
    and "\<NN> : \<SS> \<mapsto>\<^sub>C\<^sub>F \<SS>' : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<D>\<^sub>\<circ> (bnt_flip \<AA> \<BB> \<NN>\<lparr>NTMap\<rparr>) = (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (bnt_flip \<AA> \<BB> \<NN>\<lparr>NTMap\<rparr>) = (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<NN> : \<SS> \<mapsto>\<^sub>C\<^sub>F \<SS>' : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (bnt_flip \<AA> \<BB> \<NN>\<lparr>NTMap\<rparr>) = (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>
[PROOF STEP]
unfolding bnt_flip_components
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<NN> : \<SS> \<mapsto>\<^sub>C\<^sub>F \<SS>' : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (fflip (\<NN>\<lparr>NTMap\<rparr>)) = (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>
[PROOF STEP]
by (cs_concl cs_shallow cs_simp: V_cs_simps cat_cs_simps)


[STATEMENT]
lemma lem9: "N x \<longrightarrow> Q x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N x \<longrightarrow> Q x
[PROOF STEP]
by (metis N_def induct_def lem7 lem8 mem_Collect_eq)


[STATEMENT]
lemma normalize_eq: "normalize (a, b) = (p, q) \<Longrightarrow> Fract p q = Fract a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Rat.normalize (a, b) = (p, q) \<Longrightarrow> Fract p q = Fract a b
[PROOF STEP]
by (auto simp: normalize_def Let_def Fract_coprime dvd_div_neg rat_number_collapse
      split: if_split_asm)


[STATEMENT]
lemma Domain_project_act: "Domain (project_act h act) = project_set h (Domain act)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Domain (project_act h act) = project_set h (Domain act)
[PROOF STEP]
unfolding project_act_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Domain {(x, x'). \<exists>y y'. (h (x, y), h (x', y')) \<in> act} = project_set h (Domain act)
[PROOF STEP]
by (force simp add: split_extended_all)


[STATEMENT]
lemma power_eq_top_ennreal_iff: "x ^ n = top \<longleftrightarrow> x = (top :: ennreal) \<and> n > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x ^ n = top) = (x = top \<and> 0 < n)
[PROOF STEP]
by (induction n) (auto simp: ennreal_mult_eq_top_iff)


[STATEMENT]
theorem wls_rawInduct[case_names Var Op Abs]:
assumes
Var: "\<And> xs x. phi (asSort xs) (Var xs x)" and
Op:
"\<And> delta inp binp.
   \<lbrakk>wlsInp delta inp;  wlsBinp delta binp;
    liftAll2 phi (arOf delta) inp; liftAll2 phiAbs (barOf delta) binp\<rbrakk>
   \<Longrightarrow> phi (stOf delta) (Op delta inp binp)" and
Abs: "\<And> s xs x X. \<lbrakk>isInBar (xs,s); wls s X; phi s X\<rbrakk> \<Longrightarrow> phiAbs (xs,s) (Abs xs x X)"
shows
"(wls s X \<longrightarrow> phi s X) \<and>
 (wlsAbs (xs,s') A \<longrightarrow> phiAbs (xs,s') A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (wls s X \<longrightarrow> phi s X) \<and> (wlsAbs (xs, s') A \<longrightarrow> phiAbs (xs, s') A)
[PROOF STEP]
by (induct rule: wls_templateInduct[of "\<lambda>s. Id"]) (simp_all add: assms)


[STATEMENT]
lemma VUnion_vdoubleton[simp]: "\<Union>\<^sub>\<circ>(set {a, b}) = a \<union>\<^sub>\<circ> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union>\<^sub>\<circ> (set {a, b}) = a \<union>\<^sub>\<circ> b
[PROOF STEP]
by auto


[STATEMENT]
lemma Restr_iff: "(a,b) \<in> Restr r A = (a \<in> A \<and> b \<in> A \<and> (a,b) \<in> r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((a, b) \<in> Restr r A) = (a \<in> A \<and> b \<in> A \<and> (a, b) \<in> r)
[PROOF STEP]
by (auto simp add: Field_def)


[STATEMENT]
lemma irreflexive_linorder_matrix:
  fixes f :: "('a::finite,'b::linorder_stone_relation_algebra_expansion) square"
  shows "matrix_stone_relation_algebra.irreflexive f \<longleftrightarrow> (\<forall>i . f (i,i) = bot)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_stone_relation_algebra.irreflexive f = (\<forall>i. f (i, i) = bot)
[PROOF STEP]
using irreflexive_linorder_matrix_1 irreflexive_linorder_matrix_2
[PROOF STATE]
proof (prove)
using this:
matrix_stone_relation_algebra.irreflexive ?f \<Longrightarrow> ?f (?i, ?i) = bot
\<forall>i. ?f (i, i) = bot \<Longrightarrow> matrix_stone_relation_algebra.irreflexive ?f

goal (1 subgoal):
 1. matrix_stone_relation_algebra.irreflexive f = (\<forall>i. f (i, i) = bot)
[PROOF STEP]
by auto


[STATEMENT]
theorem Class_cong:
  "\<lbrakk> Class a = Class a'; Class b = Class b'; a \<in> M; a' \<in> M; b \<in> M; b' \<in> M \<rbrakk> \<Longrightarrow> Class (a \<cdot> b) = Class (a' \<cdot> b')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Class a = Class a'; Class b = Class b'; a \<in> M; a' \<in> M; b \<in> M; b' \<in> M\<rbrakk> \<Longrightarrow> Class (a \<cdot> b) = Class (a' \<cdot> b')
[PROOF STEP]
by (simp add: Class_equivalence cong)


[STATEMENT]
lemma mask_eq_decr_exp:
  \<open>mask n = 2 ^ n - (1 :: 'a::len word)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mask n = 2 ^ n - 1
[PROOF STEP]
by (fact mask_eq_exp_minus_1)


[STATEMENT]
lemma listset_ConsI : "x \<in> X \<Longrightarrow> xs \<in> listset Xs \<Longrightarrow> x#xs \<in> listset (X#Xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> X; xs \<in> listset Xs\<rbrakk> \<Longrightarrow> x # xs \<in> listset (X # Xs)
[PROOF STEP]
unfolding listset_def set_Cons_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> X; xs \<in> rec_list {[]} (\<lambda>A As Asa. {x # xs |x xs. x \<in> A \<and> xs \<in> Asa}) Xs\<rbrakk> \<Longrightarrow> x # xs \<in> rec_list {[]} (\<lambda>A As Asa. {x # xs |x xs. x \<in> A \<and> xs \<in> Asa}) (X # Xs)
[PROOF STEP]
by simp


[STATEMENT]
lemma (in Corps) val_pos_mem_Vr:"\<lbrakk>valuation K v; x \<in> carrier K\<rbrakk> \<Longrightarrow>
                             (0 \<le> (v x)) = (x \<in> carrier (Vr K v))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; x \<in> carrier K\<rbrakk> \<Longrightarrow> (0 \<le> v x) = (x \<in> carrier (Vr K v))
[PROOF STEP]
by (rule iffI, (simp add:Vr_def Sr_def)+)


[STATEMENT]
lemma croot_power: assumes n: "n \<noteq> 0"
  shows "(croot n x) ^ n = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. croot n x ^ n = x
[PROOF STEP]
unfolding croot_def DeMoivre2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rcis (root n (cmod x) ^ n) (real n * (Arg x / real n)) = x
[PROOF STEP]
by (subst real_root_pow_pos2, insert n, auto simp: rcis_cmod_Arg)


[STATEMENT]
lemma expands_to_cos_real:
  "(f expands_to (F :: real)) basis \<Longrightarrow> ((\<lambda>x. cos (f x)) expands_to cos F) basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f expands_to F) basis \<Longrightarrow> ((\<lambda>x. cos (f x)) expands_to cos F) basis
[PROOF STEP]
by (auto simp: expands_to.simps is_expansion_real.simps elim: eventually_mono)


[STATEMENT]
lemma suntil_lfp: "(\<phi> suntil \<psi>) = lfp (\<lambda>P s. \<psi> s \<or> (\<phi> s \<and> P (stl s)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> suntil \<psi> = lfp (\<lambda>P s. \<psi> s \<or> \<phi> s \<and> P (stl s))
[PROOF STEP]
by (simp add: suntil_def)


[STATEMENT]
lemma rel_frontier_of_polyhedron_alt:
  fixes S :: "'a :: euclidean_space set"
  assumes "polyhedron S"
  shows "rel_frontier S = \<Union> {F. F face_of S \<and> F \<noteq> S}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel_frontier S = \<Union> {F. F face_of S \<and> F \<noteq> S}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. rel_frontier S \<subseteq> \<Union> {F. F face_of S \<and> F \<noteq> S}
 2. \<Union> {F. F face_of S \<and> F \<noteq> S} \<subseteq> rel_frontier S
[PROOF STEP]
show "rel_frontier S \<subseteq> \<Union> {F. F face_of S \<and> F \<noteq> S}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rel_frontier S \<subseteq> \<Union> {F. F face_of S \<and> F \<noteq> S}
[PROOF STEP]
by (force simp: rel_frontier_of_polyhedron facet_of_def assms)
[PROOF STATE]
proof (state)
this:
rel_frontier S \<subseteq> \<Union> {F. F face_of S \<and> F \<noteq> S}

goal (1 subgoal):
 1. \<Union> {F. F face_of S \<and> F \<noteq> S} \<subseteq> rel_frontier S
[PROOF STEP]
qed (use face_of_subset_rel_frontier in fastforce)


[STATEMENT]
lemma s_mul_ext_intro:
  assumes "xs = mset xs1 + mset xs2"
  and "ys = mset ys1 + mset ys2"
  and "length xs1 = length ys1"
  and "\<And>i. i < length ys1 \<Longrightarrow> (xs1 ! i, ys1 ! i) \<in> NS"
  and "xs2 \<noteq> []"
  and "\<And>y. y \<in> set ys2 \<Longrightarrow> \<exists>a \<in> set xs2. (a, y) \<in> S"
shows "(xs, ys) \<in> s_mul_ext NS S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (xs, ys) \<in> s_mul_ext NS S
[PROOF STEP]
by (rule s_mul_extI[OF assms(1-2) multpw_listI[OF assms(3)]], insert assms(4-), auto)


[STATEMENT]
lemma elem_exists_count_min: "\<exists> i \<in>{..<dim_vec v}. v $ i = x \<Longrightarrow> count_vec v x \<ge> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>i\<in>{..<dim_vec v}. v $ i = x \<Longrightarrow> 1 \<le> count_vec v x
[PROOF STEP]
by (simp add: vec_elem_exists_mset)