[STATEMENT]
lemma positive_close_under_left_right_mult_adjoint:
  fixes M A :: "complex mat"
  assumes dM: "M \<in> carrier_mat n n" and dA: "A \<in> carrier_mat n n"
    and pA: "positive A"
  shows "positive (M * A * adjoint M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. positive (M * A * adjoint M)
[PROOF STEP]
unfolding positive_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M * A * adjoint M \<in> carrier_mat (dim_col (M * A * adjoint M)) (dim_col (M * A * adjoint M)) \<and> (\<forall>v. dim_vec v = dim_col (M * A * adjoint M) \<longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v))
[PROOF STEP]
proof (rule, simp add: mult_carrier_mat[OF mult_carrier_mat[OF dM dA] adjoint_dim[OF dM]] carrier_matD[OF dM], rule, rule)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
have daM: "adjoint M \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint M \<in> carrier_mat n n
[PROOF STEP]
using dM
[PROOF STATE]
proof (prove)
using this:
M \<in> carrier_mat n n

goal (1 subgoal):
 1. adjoint M \<in> carrier_mat n n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjoint M \<in> carrier_mat n n

goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
fix v::"complex vec"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
assume "dim_vec v = dim_col (M * A * adjoint M)"
[PROOF STATE]
proof (state)
this:
dim_vec v = dim_col (M * A * adjoint M)

goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
dim_vec v = dim_col (M * A * adjoint M)
[PROOF STEP]
have dv: "v \<in> carrier_vec n"
[PROOF STATE]
proof (prove)
using this:
dim_vec v = dim_col (M * A * adjoint M)

goal (1 subgoal):
 1. v \<in> carrier_vec n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
dim_vec v = dim_col (M * A * adjoint M)
M \<in> carrier_mat n n
A \<in> carrier_mat n n
positive A

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

goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
v \<in> carrier_vec n
[PROOF STEP]
have "adjoint M *\<^sub>v v \<in> carrier_vec n"
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec n

goal (1 subgoal):
 1. adjoint M *\<^sub>v v \<in> carrier_vec n
[PROOF STEP]
using daM
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec n
adjoint M \<in> carrier_mat n n

goal (1 subgoal):
 1. adjoint M *\<^sub>v v \<in> carrier_vec n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjoint M *\<^sub>v v \<in> carrier_vec n

goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
have assoc: "M * A * adjoint M *\<^sub>v v = M *\<^sub>v (A *\<^sub>v (adjoint M *\<^sub>v v))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M * A * adjoint M *\<^sub>v v = M *\<^sub>v (A *\<^sub>v (adjoint M *\<^sub>v v))
[PROOF STEP]
using dA dM daM dv
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
M \<in> carrier_mat n n
adjoint M \<in> carrier_mat n n
v \<in> carrier_vec n

goal (1 subgoal):
 1. M * A * adjoint M *\<^sub>v v = M *\<^sub>v (A *\<^sub>v (adjoint M *\<^sub>v v))
[PROOF STEP]
by (auto simp add: assoc_mult_mat_vec[of _ n n _ n])
[PROOF STATE]
proof (state)
this:
M * A * adjoint M *\<^sub>v v = M *\<^sub>v (A *\<^sub>v (adjoint M *\<^sub>v v))

goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
have "inner_prod v (M * A * adjoint M *\<^sub>v v) = inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v (M * A * adjoint M *\<^sub>v v) = inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))
[PROOF STEP]
apply (subst assoc)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inner_prod v (M *\<^sub>v (A *\<^sub>v (adjoint M *\<^sub>v v))) = inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))
[PROOF STEP]
apply (subst adjoint_def_alter[where ?A = "M"])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. v \<in> carrier_vec ?n
 2. A *\<^sub>v (adjoint M *\<^sub>v v) \<in> carrier_vec ?m
 3. M \<in> carrier_mat ?n ?m
 4. inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v)) = inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))
[PROOF STEP]
by (auto simp add: dv dA daM dM carrier_matD[OF dM] mult_mat_vec_carrier[of _ n n])
[PROOF STATE]
proof (state)
this:
inner_prod v (M * A * adjoint M *\<^sub>v v) = inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))

goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
inner_prod v (M * A * adjoint M *\<^sub>v v) = inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))

goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
have "\<dots> \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))
[PROOF STEP]
using dA dv daM pA positive_def
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
v \<in> carrier_vec n
adjoint M \<in> carrier_mat n n
positive A
positive ?A = (?A \<in> carrier_mat (dim_col ?A) (dim_col ?A) \<and> (\<forall>v. dim_vec v = dim_col ?A \<longrightarrow> 0 \<le> inner_prod v (?A *\<^sub>v v)))

goal (1 subgoal):
 1. 0 \<le> inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> inner_prod (adjoint M *\<^sub>v v) (A *\<^sub>v (adjoint M *\<^sub>v v))

goal (1 subgoal):
 1. \<And>v. dim_vec v = dim_col (M * A * adjoint M) \<Longrightarrow> 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
show "inner_prod v (M * A * adjoint M *\<^sub>v v) \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)

goal (1 subgoal):
 1. 0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> inner_prod v (M * A * adjoint M *\<^sub>v v)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Min_snd_alist_of:
  assumes "\<not> is_empty q"
  shows "Min (snd ` set (alist_of q)) = snd (hd (alist_of q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
\<not> is_empty q
[PROOF STEP]
obtain ps p where q: "map snd (alist_of q) = p # ps"
[PROOF STATE]
proof (prove)
using this:
\<not> is_empty q

goal (1 subgoal):
 1. (\<And>p ps. map snd (alist_of q) = p # ps \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases "map snd (alist_of q)") auto
[PROOF STATE]
proof (state)
this:
map snd (alist_of q) = p # ps

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
map snd (alist_of q) = p # ps
[PROOF STEP]
have "hd (map snd (alist_of q)) = p"
[PROOF STATE]
proof (prove)
using this:
map snd (alist_of q) = p # ps

goal (1 subgoal):
 1. hd (map snd (alist_of q)) = p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
hd (map snd (alist_of q)) = p

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
\<not> is_empty q
hd (map snd (alist_of q)) = p
[PROOF STEP]
have p: "snd (hd (alist_of q)) = p"
[PROOF STATE]
proof (prove)
using this:
\<not> is_empty q
hd (map snd (alist_of q)) = p

goal (1 subgoal):
 1. snd (hd (alist_of q)) = p
[PROOF STEP]
by (auto simp add: hd_map)
[PROOF STATE]
proof (state)
this:
snd (hd (alist_of q)) = p

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
have "sorted (map snd (alist_of q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted (map snd (alist_of q))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sorted (map snd (alist_of q))

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
with q
[PROOF STATE]
proof (chain)
picking this:
map snd (alist_of q) = p # ps
sorted (map snd (alist_of q))
[PROOF STEP]
have "sorted (p # ps)"
[PROOF STATE]
proof (prove)
using this:
map snd (alist_of q) = p # ps
sorted (map snd (alist_of q))

goal (1 subgoal):
 1. sorted (p # ps)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sorted (p # ps)

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sorted (p # ps)
[PROOF STEP]
have "\<forall>p'\<in>set ps. p' \<ge> p"
[PROOF STATE]
proof (prove)
using this:
sorted (p # ps)

goal (1 subgoal):
 1. \<forall>p'\<in>set ps. p \<le> p'
[PROOF STEP]
by (simp)
[PROOF STATE]
proof (state)
this:
\<forall>p'\<in>set ps. p \<le> p'

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>p'\<in>set ps. p \<le> p'
[PROOF STEP]
have "Min (set (p # ps)) = p"
[PROOF STATE]
proof (prove)
using this:
\<forall>p'\<in>set ps. p \<le> p'

goal (1 subgoal):
 1. Min (set (p # ps)) = p
[PROOF STEP]
by (auto intro: Min_eqI)
[PROOF STATE]
proof (state)
this:
Min (set (p # ps)) = p

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
with p q
[PROOF STATE]
proof (chain)
picking this:
snd (hd (alist_of q)) = p
map snd (alist_of q) = p # ps
Min (set (p # ps)) = p
[PROOF STEP]
have "Min (set (map snd (alist_of q))) = snd (hd (alist_of q))"
[PROOF STATE]
proof (prove)
using this:
snd (hd (alist_of q)) = p
map snd (alist_of q) = p # ps
Min (set (p # ps)) = p

goal (1 subgoal):
 1. Min (set (map snd (alist_of q))) = snd (hd (alist_of q))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Min (set (map snd (alist_of q))) = snd (hd (alist_of q))

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Min (set (map snd (alist_of q))) = snd (hd (alist_of q))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Min (set (map snd (alist_of q))) = snd (hd (alist_of q))

goal (1 subgoal):
 1. Min (snd ` set (alist_of q)) = snd (hd (alist_of q))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Min (snd ` set (alist_of q)) = snd (hd (alist_of q))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma insert_uconnectedV_per':
  assumes  inV: "x\<in>verts" "y\<in>verts" and subE: "F\<subseteq>E"
  shows "uconnectedV (insert (Upair x y) F) = per_union (uconnectedV F) x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Restr (uconnected (insert (Upair x y) F)) verts = per_union (Restr (uconnected F) verts) x y
[PROOF STEP]
apply(cases "x=y")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. x = y \<Longrightarrow> Restr (uconnected (insert (Upair x y) F)) verts = per_union (Restr (uconnected F) verts) x y
 2. x \<noteq> y \<Longrightarrow> Restr (uconnected (insert (Upair x y) F)) verts = per_union (Restr (uconnected F) verts) x y
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = y \<Longrightarrow> Restr (uconnected (insert (Upair x y) F)) verts = per_union (Restr (uconnected F) verts) x y
[PROOF STEP]
using assms insert_uconnectedV_per_eq
[PROOF STATE]
proof (prove)
using this:
x \<in> verts
y \<in> verts
F \<subseteq> E
\<lbrakk>?x \<in> verts; ?F \<subseteq> E\<rbrakk> \<Longrightarrow> Restr (uconnected (insert (Upair ?x ?x) ?F)) verts = per_union (Restr (uconnected ?F) verts) ?x ?x

goal (1 subgoal):
 1. x = y \<Longrightarrow> Restr (uconnected (insert (Upair x y) F)) verts = per_union (Restr (uconnected F) verts) x y
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> Restr (uconnected (insert (Upair x y) F)) verts = per_union (Restr (uconnected F) verts) x y
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> Restr (uconnected (insert (Upair x y) F)) verts = per_union (Restr (uconnected F) verts) x y
[PROOF STEP]
using assms insert_uconnectedV_per
[PROOF STATE]
proof (prove)
using this:
x \<in> verts
y \<in> verts
F \<subseteq> E
\<lbrakk>?x \<noteq> ?y; ?x \<in> verts; ?y \<in> verts; ?F \<subseteq> E\<rbrakk> \<Longrightarrow> Restr (uconnected (insert (Upair ?x ?y) ?F)) verts = per_union (Restr (uconnected ?F) verts) ?x ?y

goal (1 subgoal):
 1. x \<noteq> y \<Longrightarrow> Restr (uconnected (insert (Upair x y) F)) verts = per_union (Restr (uconnected F) verts) x y
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cong_aux_eq_1: "odd p \<Longrightarrow> [(p - 1) div 2 - p div 4 = (p^2 - 1) div 8] (mod 2)" for p :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. odd p \<Longrightarrow> [(p - 1) div 2 - p div 4 = (p\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
proof (induction p rule: nat_less_induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<forall>m<n. odd m \<longrightarrow> [(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2); odd n\<rbrakk> \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
case (1 n)
[PROOF STATE]
proof (state)
this:
\<forall>m<n. odd m \<longrightarrow> [(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2)
odd n

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<forall>m<n. odd m \<longrightarrow> [(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2); odd n\<rbrakk> \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
consider "n = 1" | "n > 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n = 1 \<Longrightarrow> thesis; 1 < n \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using odd_pos[OF \<open>odd n\<close>]
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. \<lbrakk>n = 1 \<Longrightarrow> thesis; 1 < n \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
\<lbrakk>n = 1 \<Longrightarrow> ?thesis; 1 < n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>n. \<lbrakk>\<forall>m<n. odd m \<longrightarrow> [(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2); odd n\<rbrakk> \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>n = 1 \<Longrightarrow> ?thesis; 1 < n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>n = 1 \<Longrightarrow> ?thesis; 1 < n \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
assume "n > 1"
[PROOF STATE]
proof (state)
this:
1 < n

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
1 < n
[PROOF STEP]
obtain m where m: "m = n - 2" and m': "odd m" "m < n"
[PROOF STATE]
proof (prove)
using this:
1 < n

goal (1 subgoal):
 1. (\<And>m. \<lbrakk>m = n - 2; odd m; m < n\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>odd n\<close>
[PROOF STATE]
proof (prove)
using this:
1 < n
odd n

goal (1 subgoal):
 1. (\<And>m. \<lbrakk>m = n - 2; odd m; m < n\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
m = n - 2
odd m
m < n

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
m = n - 2
odd m
m < n
[PROOF STEP]
obtain b where b: "m = 2 * b + 1"
[PROOF STATE]
proof (prove)
using this:
m = n - 2
odd m
m < n

goal (1 subgoal):
 1. (\<And>b. m = 2 * b + 1 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using oddE
[PROOF STATE]
proof (prove)
using this:
m = n - 2
odd m
m < n
\<lbrakk>odd ?a; \<And>b. ?a = (2::?'a) * b + (1::?'a) \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>b. m = 2 * b + 1 \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
m = 2 * b + 1

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
have IH: "[(m - 1) div 2 - m div 4 = (m^2 - 1) div 8] (mod 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
using "1.IH" m'
[PROOF STATE]
proof (prove)
using this:
\<forall>m<n. odd m \<longrightarrow> [(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2)
odd m
m < n

goal (1 subgoal):
 1. [(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
[(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2)

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
have [simp]: "n = 2 * b + 1 + 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n = 2 * b + 1 + 2
[PROOF STEP]
using m \<open>n > 1\<close> b
[PROOF STATE]
proof (prove)
using this:
m = n - 2
1 < n
m = 2 * b + 1

goal (1 subgoal):
 1. n = 2 * b + 1 + 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
n = 2 * b + 1 + 2

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
have *: "(n\<^sup>2 - 1) div 8 = ((n - 2)\<^sup>2 - 1) div 8 + (n - 1) div 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n\<^sup>2 - 1) div 8 = ((n - 2)\<^sup>2 - 1) div 8 + (n - 1) div 2
[PROOF STEP]
unfolding  power2_sum power2_eq_square
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n * n - 1) div 8 = ((n - 2) * (n - 2) - 1) div 8 + (n - 1) div 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(n\<^sup>2 - 1) div 8 = ((n - 2)\<^sup>2 - 1) div 8 + (n - 1) div 2

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
have "[(n - 1) div 2 - n div 4 = (n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2] (mod 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [(n - 1) div 2 - n div 4 = (n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2] (mod 2)
[PROOF STEP]
by (rule cong_sym, cases "even b") (auto simp: cong_altdef_nat div_cancel_Suc elim: oddE)
[PROOF STATE]
proof (state)
this:
[(n - 1) div 2 - n div 4 = (n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2] (mod 2)

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
[(n - 1) div 2 - n div 4 = (n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2] (mod 2)

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
have "[(n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2 = (n\<^sup>2 - 1) div 8] (mod 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [(n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
using IH cong_add_rcancel_nat
[PROOF STATE]
proof (prove)
using this:
[(m - 1) div 2 - m div 4 = (m\<^sup>2 - 1) div 8] (mod 2)
[?x + ?a = ?y + ?a] (mod ?n) = [?x = ?y] (mod ?n)

goal (1 subgoal):
 1. [(n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
unfolding * m
[PROOF STATE]
proof (prove)
using this:
[(n - 2 - 1) div 2 - (n - 2) div 4 = ((n - 2)\<^sup>2 - 1) div 8] (mod 2)
[?x + ?a = ?y + ?a] (mod ?n) = [?x = ?y] (mod ?n)

goal (1 subgoal):
 1. [(n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2 = ((n - 2)\<^sup>2 - 1) div 8 + (n - 1) div 2] (mod 2)
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
[(n - 2 - 1) div 2 - (n - 2) div 4 + (n - 1) div 2 = (n\<^sup>2 - 1) div 8] (mod 2)

goal (2 subgoals):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
 2. 1 < n \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
[(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
[(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)

goal (1 subgoal):
 1. [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
[(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)

goal (1 subgoal):
 1. n = 1 \<Longrightarrow> [(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
[(n - 1) div 2 - n div 4 = (n\<^sup>2 - 1) div 8] (mod 2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma oexp_mult_commute:
  fixes j::nat
  assumes "Ord \<alpha>"
  shows "(\<alpha> \<up> j) * \<alpha> = \<alpha> * (\<alpha> \<up> j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j
[PROOF STEP]
have "(\<alpha> \<up> j) * \<alpha> = \<alpha> \<up> (1 + ord_of_nat j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> \<up> (1 + ord_of_nat j)
[PROOF STEP]
by (simp add: one_V_def)
[PROOF STATE]
proof (state)
this:
\<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> \<up> (1 + ord_of_nat j)

goal (1 subgoal):
 1. \<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> \<up> (1 + ord_of_nat j)

goal (1 subgoal):
 1. \<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j
[PROOF STEP]
have "... = \<alpha> * (\<alpha> \<up> j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> \<up> (1 + ord_of_nat j) = \<alpha> * \<alpha> \<up> ord_of_nat j
[PROOF STEP]
by (simp add: assms oexp_add)
[PROOF STATE]
proof (state)
this:
\<alpha> \<up> (1 + ord_of_nat j) = \<alpha> * \<alpha> \<up> ord_of_nat j

goal (1 subgoal):
 1. \<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j

goal (1 subgoal):
 1. \<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<alpha> \<up> ord_of_nat j * \<alpha> = \<alpha> * \<alpha> \<up> ord_of_nat j

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma power_over_fact_tendsto_0':
  "(\<lambda>n. c * (x :: real) ^ n / fact n) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. c * x ^ n / fact n) \<longlonglongrightarrow> 0
[PROOF STEP]
using tendsto_mult[OF tendsto_const[of c] power_over_fact_tendsto_0[of x]]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>xa. c * (x ^ xa / fact xa)) \<longlonglongrightarrow> c * 0

goal (1 subgoal):
 1. (\<lambda>n. c * x ^ n / fact n) \<longlonglongrightarrow> 0
[PROOF STEP]
by simp


[STATEMENT]
lemma tripleI:
  fixes T U
  assumes "fst3 T = fst3 U"
      and "snd3 T = snd3 U"
      and "thd3 T = thd3 U"
  shows "T = U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T = U
[PROOF STEP]
by (metis assms fst3_def snd3_def thd3_def o_def surjective_pairing)


[STATEMENT]
lemma greater_Card:
  assumes "Card \<kappa>" shows "\<kappa> < vcard (VPow \<kappa>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<kappa> < vcard (VPow \<kappa>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<kappa> < vcard (VPow \<kappa>)
[PROOF STEP]
have "\<kappa> = vcard \<kappa>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<kappa> = vcard \<kappa>
[PROOF STEP]
using Card_def assms
[PROOF STATE]
proof (prove)
using this:
Card ?i \<equiv> ?i = vcard ?i
Card \<kappa>

goal (1 subgoal):
 1. \<kappa> = vcard \<kappa>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<kappa> = vcard \<kappa>

goal (1 subgoal):
 1. \<kappa> < vcard (VPow \<kappa>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<kappa> = vcard \<kappa>

goal (1 subgoal):
 1. \<kappa> < vcard (VPow \<kappa>)
[PROOF STEP]
have "\<dots> < vcard (VPow \<kappa>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vcard \<kappa> < vcard (VPow \<kappa>)
[PROOF STEP]
proof (rule lesspoll_imp_Card_less)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. elts \<kappa> \<prec> elts (VPow \<kappa>)
[PROOF STEP]
show "elts \<kappa> \<prec> elts (VPow \<kappa>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. elts \<kappa> \<prec> elts (VPow \<kappa>)
[PROOF STEP]
by (simp add: elts_VPow down inj_on_def lesspoll_Pow_self)
[PROOF STATE]
proof (state)
this:
elts \<kappa> \<prec> elts (VPow \<kappa>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
vcard \<kappa> < vcard (VPow \<kappa>)

goal (1 subgoal):
 1. \<kappa> < vcard (VPow \<kappa>)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<kappa> < vcard (VPow \<kappa>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<kappa> < vcard (VPow \<kappa>)

goal (1 subgoal):
 1. \<kappa> < vcard (VPow \<kappa>)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<kappa> < vcard (VPow \<kappa>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dvd_gcd:
  fixes a b :: nat
  obtains q where "a * (b div gcd a b) = b*q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>q. a * (b div gcd a b) = b * q \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>q. a * (b div gcd a b) = b * q \<Longrightarrow> thesis) \<Longrightarrow> a * (b div gcd a b) = b * ?q2
[PROOF STEP]
have "a * (b div gcd a b) = (a div gcd a b) * b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * (b div gcd a b) = a div gcd a b * b
[PROOF STEP]
by (simp add:  div_mult_swap dvd_div_mult)
[PROOF STATE]
proof (state)
this:
a * (b div gcd a b) = a div gcd a b * b

goal (1 subgoal):
 1. (\<And>q. a * (b div gcd a b) = b * q \<Longrightarrow> thesis) \<Longrightarrow> a * (b div gcd a b) = b * ?q2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
a * (b div gcd a b) = a div gcd a b * b

goal (1 subgoal):
 1. (\<And>q. a * (b div gcd a b) = b * q \<Longrightarrow> thesis) \<Longrightarrow> a * (b div gcd a b) = b * ?q2
[PROOF STEP]
have "\<dots> = b * (a div gcd a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a div gcd a b * b = b * (a div gcd a b)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a div gcd a b * b = b * (a div gcd a b)

goal (1 subgoal):
 1. (\<And>q. a * (b div gcd a b) = b * q \<Longrightarrow> thesis) \<Longrightarrow> a * (b div gcd a b) = b * ?q2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
a * (b div gcd a b) = b * (a div gcd a b)
[PROOF STEP]
show "a * (b div gcd a b) = b * (a div gcd a b) "
[PROOF STATE]
proof (prove)
using this:
a * (b div gcd a b) = b * (a div gcd a b)

goal (1 subgoal):
 1. a * (b div gcd a b) = b * (a div gcd a b)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
a * (b div gcd a b) = b * (a div gcd a b)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem invariance_of_domain:
  fixes f :: "'a \<Rightarrow> 'a::euclidean_space"
  assumes "continuous_on S f" "open S" "inj_on f S"
    shows "open(f ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open (f ` S)
[PROOF STEP]
unfolding open_subopen [of "f`S"]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>f ` S. \<exists>T. open T \<and> x \<in> T \<and> T \<subseteq> f ` S
[PROOF STEP]
proof clarify
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. xa \<in> S \<Longrightarrow> \<exists>T. open T \<and> f xa \<in> T \<and> T \<subseteq> f ` S
[PROOF STEP]
fix a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. xa \<in> S \<Longrightarrow> \<exists>T. open T \<and> f xa \<in> T \<and> T \<subseteq> f ` S
[PROOF STEP]
assume "a \<in> S"
[PROOF STATE]
proof (state)
this:
a \<in> S

goal (1 subgoal):
 1. \<And>x xa. xa \<in> S \<Longrightarrow> \<exists>T. open T \<and> f xa \<in> T \<and> T \<subseteq> f ` S
[PROOF STEP]
obtain \<delta> where "\<delta> > 0" and \<delta>: "cball a \<delta> \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<delta>. \<lbrakk>0 < \<delta>; cball a \<delta> \<subseteq> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using \<open>open S\<close> \<open>a \<in> S\<close> open_contains_cball_eq
[PROOF STATE]
proof (prove)
using this:
open S
a \<in> S
open ?S \<Longrightarrow> \<forall>x. (x \<in> ?S) = (\<exists>e>0. cball x e \<subseteq> ?S)

goal (1 subgoal):
 1. (\<And>\<delta>. \<lbrakk>0 < \<delta>; cball a \<delta> \<subseteq> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 < \<delta>
cball a \<delta> \<subseteq> S

goal (1 subgoal):
 1. \<And>x xa. xa \<in> S \<Longrightarrow> \<exists>T. open T \<and> f xa \<in> T \<and> T \<subseteq> f ` S
[PROOF STEP]
show "\<exists>T. open T \<and> f a \<in> T \<and> T \<subseteq> f ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>T. open T \<and> f a \<in> T \<and> T \<subseteq> f ` S
[PROOF STEP]
proof (intro exI conjI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. open ?T
 2. f a \<in> ?T
 3. ?T \<subseteq> f ` S
[PROOF STEP]
show "open (f ` (ball a \<delta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open (f ` ball a \<delta>)
[PROOF STEP]
by (meson \<delta> \<open>0 < \<delta>\<close> assms continuous_on_subset inj_on_subset invariance_of_domain_ball)
[PROOF STATE]
proof (state)
this:
open (f ` ball a \<delta>)

goal (2 subgoals):
 1. f a \<in> f ` ball a \<delta>
 2. f ` ball a \<delta> \<subseteq> f ` S
[PROOF STEP]
show "f a \<in> f ` ball a \<delta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f a \<in> f ` ball a \<delta>
[PROOF STEP]
by (simp add: \<open>0 < \<delta>\<close>)
[PROOF STATE]
proof (state)
this:
f a \<in> f ` ball a \<delta>

goal (1 subgoal):
 1. f ` ball a \<delta> \<subseteq> f ` S
[PROOF STEP]
show "f ` ball a \<delta> \<subseteq> f ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` ball a \<delta> \<subseteq> f ` S
[PROOF STEP]
using \<delta> ball_subset_cball
[PROOF STATE]
proof (prove)
using this:
cball a \<delta> \<subseteq> S
ball ?x ?e \<subseteq> cball ?x ?e

goal (1 subgoal):
 1. f ` ball a \<delta> \<subseteq> f ` S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f ` ball a \<delta> \<subseteq> f ` S

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>T. open T \<and> f a \<in> T \<and> T \<subseteq> f ` S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma scale_ms_aux:
  fixes xs :: "('a :: multiseries \<times> real) msllist"
  assumes "is_expansion_aux xs f basis" "basis_wf basis"
  shows   "is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis
[PROOF STEP]
proof (cases basis)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. basis = [] \<Longrightarrow> is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis
 2. \<And>a list. basis = a # list \<Longrightarrow> is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis
[PROOF STEP]
case (Cons b basis')
[PROOF STATE]
proof (state)
this:
basis = b # basis'

goal (2 subgoals):
 1. basis = [] \<Longrightarrow> is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis
 2. \<And>a list. basis = a # list \<Longrightarrow> is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis
[PROOF STEP]
proof (rule is_expansion_aux_cong)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. is_expansion_aux (scale_ms_aux c xs) ?f basis
 2. \<forall>\<^sub>F x in at_top. ?f x = c * f x
[PROOF STEP]
show "is_expansion_aux (scale_ms_aux c xs)
            (\<lambda>x. eval (const_expansion c :: 'a) x * b x powr 0 * f x) basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. eval (const_expansion c) x * b x powr 0 * f x) basis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_expansion_aux xs f basis
basis_wf basis

goal (1 subgoal):
 1. is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. eval (const_expansion c) x * b x powr 0 * f x) basis
[PROOF STEP]
unfolding scale_ms_aux_def Cons
[PROOF STATE]
proof (prove)
using this:
is_expansion_aux xs f (b # basis')
basis_wf (b # basis')

goal (1 subgoal):
 1. is_expansion_aux (scale_shift_ms_aux (const_expansion c, 0) xs) (\<lambda>x. eval (const_expansion c) x * b x powr 0 * f x) (b # basis')
[PROOF STEP]
by (intro scale_shift_ms_aux is_expansion_const)
         (auto simp: basis_wf_Cons dest: is_expansion_aux_expansion_level)
[PROOF STATE]
proof (state)
this:
is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. eval (const_expansion c) x * b x powr 0 * f x) basis

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. eval (const_expansion c) x * b x powr 0 * f x = c * f x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. eval (const_expansion c) x * b x powr 0 * f x = c * f x
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
is_expansion_aux xs f basis
basis_wf basis
[PROOF STEP]
have "eventually (\<lambda>x. b x > 0) at_top"
[PROOF STATE]
proof (prove)
using this:
is_expansion_aux xs f basis
basis_wf basis

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. 0 < b x
[PROOF STEP]
by (simp add: basis_wf_Cons Cons filterlim_at_top_dense)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. 0 < b x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. eval (const_expansion c) x * b x powr 0 * f x = c * f x
[PROOF STEP]
thus "eventually (\<lambda>x. eval (const_expansion c :: 'a) x * b x powr 0 * f x = c * f x) at_top"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_top. 0 < b x

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_top. eval (const_expansion c) x * b x powr 0 * f x = c * f x
[PROOF STEP]
by eventually_elim simp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_top. eval (const_expansion c) x * b x powr 0 * f x = c * f x

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis

goal (1 subgoal):
 1. basis = [] \<Longrightarrow> is_expansion_aux (scale_ms_aux c xs) (\<lambda>x. c * f x) basis
[PROOF STEP]
qed (insert assms, auto dest: is_expansion_aux_basis_nonempty)


[STATEMENT]
lemma vec_vec_Tensor_simpl:
   "i<(length y) \<longrightarrow> (vec_vec_Tensor (z#zs) y)!i = (times z y)!i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
have a: "vec_vec_Tensor (z#zs) y = (times z y)@(vec_vec_Tensor zs y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_vec_Tensor (z # zs) y = local.times z y @ vec_vec_Tensor zs y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vec_vec_Tensor (z # zs) y = local.times z y @ vec_vec_Tensor zs y

goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
have b: "length (times z y) = (length y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (local.times z y) = length y
[PROOF STEP]
using preserving_length
[PROOF STATE]
proof (prove)
using this:
length (local.times ?n ?y) = length ?y

goal (1 subgoal):
 1. length (local.times z y) = length y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
length (local.times z y) = length y

goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
have "i<(length (times z y))
          \<longrightarrow> ((times z y)@(vec_vec_Tensor zs y))!i = (times z y)!i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < length (local.times z y) \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i
[PROOF STEP]
using append_simpl
[PROOF STATE]
proof (prove)
using this:
?i < length ?xs \<longrightarrow> (?xs @ ?ys) ! ?i = ?xs ! ?i

goal (1 subgoal):
 1. i < length (local.times z y) \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
i < length (local.times z y) \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i

goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
with b
[PROOF STATE]
proof (chain)
picking this:
length (local.times z y) = length y
i < length (local.times z y) \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i
[PROOF STEP]
have "i<(length y)
          \<longrightarrow> ((times z y)@(vec_vec_Tensor zs y))!i = (times z y)!i"
[PROOF STATE]
proof (prove)
using this:
length (local.times z y) = length y
i < length (local.times z y) \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i

goal (1 subgoal):
 1. i < length y \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < length y \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i

goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
with  a
[PROOF STATE]
proof (chain)
picking this:
vec_vec_Tensor (z # zs) y = local.times z y @ vec_vec_Tensor zs y
i < length y \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i
[PROOF STEP]
have "i<(length y)
          \<longrightarrow> (vec_vec_Tensor (z#zs) y)!i = (times z y)!i"
[PROOF STATE]
proof (prove)
using this:
vec_vec_Tensor (z # zs) y = local.times z y @ vec_vec_Tensor zs y
i < length y \<longrightarrow> (local.times z y @ vec_vec_Tensor zs y) ! i = local.times z y ! i

goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i

goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i

goal (1 subgoal):
 1. i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < length y \<longrightarrow> vec_vec_Tensor (z # zs) y ! i = local.times z y ! i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lm089:
  "Range(f outside X) \<supseteq> (Range f)-(f``X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Range f - f `` X \<subseteq> Range (f outside X)
[PROOF STEP]
using Outside_def
[PROOF STATE]
proof (prove)
using this:
?R outside ?X = ?R - ?X \<times> Range ?R

goal (1 subgoal):
 1. Range f - f `` X \<subseteq> Range (f outside X)
[PROOF STEP]
by blast


[STATEMENT]
lemma polysubst0_polybound0:
  assumes "polybound0 t"
  shows "polybound0 (polysubst0 t a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. polybound0 (polysubst0 t a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
polybound0 t

goal (1 subgoal):
 1. polybound0 (polysubst0 t a)
[PROOF STEP]
by (induct a rule: poly.induct) auto


[STATEMENT]
lemma negligible_le: "\<lbrakk> negligible g; \<And>\<eta>. \<bar>f \<eta>\<bar> \<le> g \<eta> \<rbrakk> \<Longrightarrow> negligible f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>negligible g; \<And>\<eta>. \<bar>f \<eta>\<bar> \<le> g \<eta>\<rbrakk> \<Longrightarrow> negligible f
[PROOF STEP]
by(erule negligible_mono)(force intro: order_trans intro!: eventually_sequentiallyI landau_o.big_mono)


[STATEMENT]
lemma coeff_powsum_mpoly_singleton_eq_0 [simp]:
  assumes "finite X" "x \<notin> X" "k > 0"
  shows   "MPoly_Type.coeff (powsum_mpoly X k) (Poly_Mapping.single x k) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.coeff (powsum_mpoly X k) (Poly_Mapping.single x k) = (0::'a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite X
x \<notin> X
0 < k

goal (1 subgoal):
 1. MPoly_Type.coeff (powsum_mpoly X k) (Poly_Mapping.single x k) = (0::'a)
[PROOF STEP]
by (simp add: coeff_powsum_mpoly_singleton)


[STATEMENT]
lemma stabilizer_coset_Un:
  assumes "A \<subseteq> G"
  shows "(\<Union> x \<in> A. sumset {x} (stabilizer A)) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>x\<in>A. sumset {x} (stabilizer A)) = A
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<Union>x\<in>A. sumset {x} (stabilizer A)) \<subseteq> A
 2. A \<subseteq> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
show "(\<Union>x\<in>A. sumset {x} (stabilizer A)) \<subseteq> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>x\<in>A. sumset {x} (stabilizer A)) \<subseteq> A
[PROOF STEP]
using stabilizer_coset_subset assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?A \<subseteq> G; ?x \<in> ?A\<rbrakk> \<Longrightarrow> sumset {?x} (stabilizer ?A) \<subseteq> ?A
A \<subseteq> G

goal (1 subgoal):
 1. (\<Union>x\<in>A. sumset {x} (stabilizer A)) \<subseteq> A
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<Union>x\<in>A. sumset {x} (stabilizer A)) \<subseteq> A

goal (1 subgoal):
 1. A \<subseteq> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A \<subseteq> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
show "A \<subseteq> (\<Union>x\<in>A. sumset {x} (stabilizer A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
assume hx: "x \<in> A"
[PROOF STATE]
proof (state)
this:
x \<in> A

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> A
[PROOF STEP]
have "x \<in> sumset {x} (stabilizer A)"
[PROOF STATE]
proof (prove)
using this:
x \<in> A

goal (1 subgoal):
 1. x \<in> sumset {x} (stabilizer A)
[PROOF STEP]
using sub_unit_closed assms
[PROOF STATE]
proof (prove)
using this:
x \<in> A
\<zero> \<in> stabilizer ?A
A \<subseteq> G

goal (1 subgoal):
 1. x \<in> sumset {x} (stabilizer A)
[PROOF STEP]
by (metis in_mono right_unit singletonI sumset.sumsetI unit_closed)
[PROOF STATE]
proof (state)
this:
x \<in> sumset {x} (stabilizer A)

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
thus "x \<in> (\<Union>x\<in>A. sumset {x} (stabilizer A))"
[PROOF STATE]
proof (prove)
using this:
x \<in> sumset {x} (stabilizer A)

goal (1 subgoal):
 1. x \<in> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
using hx
[PROOF STATE]
proof (prove)
using this:
x \<in> sumset {x} (stabilizer A)
x \<in> A

goal (1 subgoal):
 1. x \<in> (\<Union>x\<in>A. sumset {x} (stabilizer A))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> (\<Union>x\<in>A. sumset {x} (stabilizer A))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
A \<subseteq> (\<Union>x\<in>A. sumset {x} (stabilizer A))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poly_fun_uminus_iff [simp]:
  "poly_fun (\<lambda>x. - f x) \<longleftrightarrow> poly_fun f" "poly_fun (- f) \<longleftrightarrow> poly_fun f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_fun (\<lambda>x. - f x) = poly_fun f &&& poly_fun (- f) = poly_fun f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. poly_fun (\<lambda>x. - f x) = poly_fun f
 2. poly_fun (- f) = poly_fun f
[PROOF STEP]
show "poly_fun (\<lambda>x. - f x) \<longleftrightarrow> poly_fun f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_fun (\<lambda>x. - f x) = poly_fun f
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. poly_fun (\<lambda>x. - f x) \<Longrightarrow> poly_fun f
 2. poly_fun f \<Longrightarrow> poly_fun (\<lambda>x. - f x)
[PROOF STEP]
assume "poly_fun (\<lambda>x. - f x)"
[PROOF STATE]
proof (state)
this:
poly_fun (\<lambda>x. - f x)

goal (2 subgoals):
 1. poly_fun (\<lambda>x. - f x) \<Longrightarrow> poly_fun f
 2. poly_fun f \<Longrightarrow> poly_fun (\<lambda>x. - f x)
[PROOF STEP]
hence "poly_fun (\<lambda>x. - (- f x))"
[PROOF STATE]
proof (prove)
using this:
poly_fun (\<lambda>x. - f x)

goal (1 subgoal):
 1. poly_fun (\<lambda>x. - (- f x))
[PROOF STEP]
by (rule poly_fun_uminus)
[PROOF STATE]
proof (state)
this:
poly_fun (\<lambda>x. - (- f x))

goal (2 subgoals):
 1. poly_fun (\<lambda>x. - f x) \<Longrightarrow> poly_fun f
 2. poly_fun f \<Longrightarrow> poly_fun (\<lambda>x. - f x)
[PROOF STEP]
thus "poly_fun f"
[PROOF STATE]
proof (prove)
using this:
poly_fun (\<lambda>x. - (- f x))

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

goal (1 subgoal):
 1. poly_fun f \<Longrightarrow> poly_fun (\<lambda>x. - f x)
[PROOF STEP]
qed (rule poly_fun_uminus)
[PROOF STATE]
proof (state)
this:
poly_fun (\<lambda>x. - f x) = poly_fun f

goal (1 subgoal):
 1. poly_fun (- f) = poly_fun f
[PROOF STEP]
thus "poly_fun (- f) \<longleftrightarrow> poly_fun f"
[PROOF STATE]
proof (prove)
using this:
poly_fun (\<lambda>x. - f x) = poly_fun f

goal (1 subgoal):
 1. poly_fun (- f) = poly_fun f
[PROOF STEP]
by (simp only: fun_Compl_def)
[PROOF STATE]
proof (state)
this:
poly_fun (- f) = poly_fun f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma comps_fixpointwise_imp_bij_betw:
  assumes "f`X\<subseteq>Y" "g`Y\<subseteq>X" "fixespointwise (g\<circ>f) X" "fixespointwise (f\<circ>g) Y"
  shows   "bij_betw f X Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw f X Y
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on f X \<and> f ` X = Y
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inj_on f X
 2. f ` X = Y
[PROOF STEP]
show "inj_on f X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on f X
[PROOF STEP]
proof (rule inj_onI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> X; y \<in> X; f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> X; y \<in> X; f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
show "\<lbrakk> x\<in>X; y\<in>X; f x = f y \<rbrakk> \<Longrightarrow> x=y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> X; y \<in> X; f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
using fixespointwiseD[OF assms(3), of x] fixespointwiseD[OF assms(3), of y]
[PROOF STATE]
proof (prove)
using this:
x \<in> X \<Longrightarrow> (g \<circ> f) x = id x
y \<in> X \<Longrightarrow> (g \<circ> f) y = id y

goal (1 subgoal):
 1. \<lbrakk>x \<in> X; y \<in> X; f x = f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
by    simp
[PROOF STATE]
proof (state)
this:
\<lbrakk>x \<in> X; y \<in> X; f x = f y\<rbrakk> \<Longrightarrow> x = y

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

goal (1 subgoal):
 1. f ` X = Y
[PROOF STEP]
from assms(1,2)
[PROOF STATE]
proof (chain)
picking this:
f ` X \<subseteq> Y
g ` Y \<subseteq> X
[PROOF STEP]
show "f`X = Y"
[PROOF STATE]
proof (prove)
using this:
f ` X \<subseteq> Y
g ` Y \<subseteq> X

goal (1 subgoal):
 1. f ` X = Y
[PROOF STEP]
using fixespointwiseD[OF assms(4)]
[PROOF STATE]
proof (prove)
using this:
f ` X \<subseteq> Y
g ` Y \<subseteq> X
?a \<in> Y \<Longrightarrow> (f \<circ> g) ?a = id ?a

goal (1 subgoal):
 1. f ` X = Y
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
f ` X = Y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ncoplanar_perm_10:
  assumes "\<not> Coplanar A B C D"
  shows "\<not> Coplanar B D A C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Coplanar B D A C
[PROOF STEP]
using assms coplanar_perm_13
[PROOF STATE]
proof (prove)
using this:
\<not> Coplanar A B C D
Coplanar ?A ?B ?C ?D \<Longrightarrow> Coplanar ?C ?A ?D ?B

goal (1 subgoal):
 1. \<not> Coplanar B D A C
[PROOF STEP]
by blast


[STATEMENT]
lemma tendsto_snd [tendsto_intros]:
  assumes "(f \<longlongrightarrow> a) F"
  shows "((\<lambda>x. snd (f x)) \<longlongrightarrow> snd a) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. snd (f x)) \<longlongrightarrow> snd a) F
[PROOF STEP]
proof (rule topological_tendstoI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>S. \<lbrakk>open S; snd a \<in> S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. snd (f x) \<in> S
[PROOF STEP]
fix S
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>S. \<lbrakk>open S; snd a \<in> S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. snd (f x) \<in> S
[PROOF STEP]
assume "open S" and "snd a \<in> S"
[PROOF STATE]
proof (state)
this:
open S
snd a \<in> S

goal (1 subgoal):
 1. \<And>S. \<lbrakk>open S; snd a \<in> S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. snd (f x) \<in> S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
open S
snd a \<in> S
[PROOF STEP]
have "open (snd -` S)" and "a \<in> snd -` S"
[PROOF STATE]
proof (prove)
using this:
open S
snd a \<in> S

goal (1 subgoal):
 1. open (snd -` S) &&& a \<in> snd -` S
[PROOF STEP]
by (simp_all add: open_vimage_snd)
[PROOF STATE]
proof (state)
this:
open (snd -` S)
a \<in> snd -` S

goal (1 subgoal):
 1. \<And>S. \<lbrakk>open S; snd a \<in> S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. snd (f x) \<in> S
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
(f \<longlongrightarrow> a) F
open (snd -` S)
a \<in> snd -` S
[PROOF STEP]
have "eventually (\<lambda>x. f x \<in> snd -` S) F"
[PROOF STATE]
proof (prove)
using this:
(f \<longlongrightarrow> a) F
open (snd -` S)
a \<in> snd -` S

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. f x \<in> snd -` S
[PROOF STEP]
by (rule topological_tendstoD)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in F. f x \<in> snd -` S

goal (1 subgoal):
 1. \<And>S. \<lbrakk>open S; snd a \<in> S\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. snd (f x) \<in> S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in F. f x \<in> snd -` S
[PROOF STEP]
show "eventually (\<lambda>x. snd (f x) \<in> S) F"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in F. f x \<in> snd -` S

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. snd (f x) \<in> S
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in F. snd (f x) \<in> S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma MOST_eq_imp:
  "MOST x. x = a \<longrightarrow> P x"
  "MOST x. a = x \<longrightarrow> P x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>\<infinity>x. x = a \<longrightarrow> P x &&& \<forall>\<^sub>\<infinity>x. a = x \<longrightarrow> P x
[PROOF STEP]
unfolding eventually_cofinite
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {x. \<not> (x = a \<longrightarrow> P x)} &&& finite {x. \<not> (a = x \<longrightarrow> P x)}
[PROOF STEP]
by simp_all


[STATEMENT]
lemma tendsto_iff_uniformity:
    \<comment> \<open>More general analogus of \<open>tendsto_iff\<close> below. Applies to all uniform spaces, not just metric ones.\<close>
  fixes l :: \<open>'b :: uniform_space\<close>
  shows \<open>(f \<longlongrightarrow> l) F \<longleftrightarrow> (\<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> l) F = (\<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)))
[PROOF STEP]
proof (intro iffI allI impI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>E. \<lbrakk>(f \<longlongrightarrow> l) F; eventually E uniformity\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. E (f x, l)
 2. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
fix E :: \<open>('b \<times> 'b) \<Rightarrow> bool\<close>
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>E. \<lbrakk>(f \<longlongrightarrow> l) F; eventually E uniformity\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. E (f x, l)
 2. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
assume \<open>(f \<longlongrightarrow> l) F\<close> and \<open>eventually E uniformity\<close>
[PROOF STATE]
proof (state)
this:
(f \<longlongrightarrow> l) F
eventually E uniformity

goal (2 subgoals):
 1. \<And>E. \<lbrakk>(f \<longlongrightarrow> l) F; eventually E uniformity\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. E (f x, l)
 2. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
from \<open>eventually E uniformity\<close>
[PROOF STATE]
proof (chain)
picking this:
eventually E uniformity
[PROOF STEP]
have \<open>eventually (\<lambda>(x, y). E (y, x)) uniformity\<close>
[PROOF STATE]
proof (prove)
using this:
eventually E uniformity

goal (1 subgoal):
 1. \<forall>\<^sub>F (x, y) in uniformity. E (y, x)
[PROOF STEP]
by (simp add: uniformity_sym)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F (x, y) in uniformity. E (y, x)

goal (2 subgoals):
 1. \<And>E. \<lbrakk>(f \<longlongrightarrow> l) F; eventually E uniformity\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. E (f x, l)
 2. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F (x, y) in uniformity. E (y, x)
[PROOF STEP]
have \<open>\<forall>\<^sub>F (y, x) in uniformity. y = l \<longrightarrow> E (x, y)\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F (x, y) in uniformity. E (y, x)

goal (1 subgoal):
 1. \<forall>\<^sub>F (y, x) in uniformity. y = l \<longrightarrow> E (x, y)
[PROOF STEP]
using eventually_mono
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F (x, y) in uniformity. E (y, x)
\<lbrakk>eventually ?P ?F; \<And>x. ?P x \<Longrightarrow> ?Q x\<rbrakk> \<Longrightarrow> eventually ?Q ?F

goal (1 subgoal):
 1. \<forall>\<^sub>F (y, x) in uniformity. y = l \<longrightarrow> E (x, y)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F (y, x) in uniformity. y = l \<longrightarrow> E (x, y)

goal (2 subgoals):
 1. \<And>E. \<lbrakk>(f \<longlongrightarrow> l) F; eventually E uniformity\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. E (f x, l)
 2. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
with \<open>(f \<longlongrightarrow> l) F\<close>
[PROOF STATE]
proof (chain)
picking this:
(f \<longlongrightarrow> l) F
\<forall>\<^sub>F (y, x) in uniformity. y = l \<longrightarrow> E (x, y)
[PROOF STEP]
have \<open>eventually (\<lambda>x. E (x ,l)) (filtermap f F)\<close>
[PROOF STATE]
proof (prove)
using this:
(f \<longlongrightarrow> l) F
\<forall>\<^sub>F (y, x) in uniformity. y = l \<longrightarrow> E (x, y)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in filtermap f F. E (x, l)
[PROOF STEP]
by (simp add: filterlim_def le_filter_def eventually_nhds_uniformity)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in filtermap f F. E (x, l)

goal (2 subgoals):
 1. \<And>E. \<lbrakk>(f \<longlongrightarrow> l) F; eventually E uniformity\<rbrakk> \<Longrightarrow> \<forall>\<^sub>F x in F. E (f x, l)
 2. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in filtermap f F. E (x, l)
[PROOF STEP]
show \<open>\<forall>\<^sub>F x in F. E (f x, l)\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in filtermap f F. E (x, l)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. E (f x, l)
[PROOF STEP]
by (simp add: eventually_filtermap)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in F. E (f x, l)

goal (1 subgoal):
 1. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
assume assm: \<open>\<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l))\<close>
[PROOF STATE]
proof (state)
this:
\<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l))

goal (1 subgoal):
 1. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
have \<open>eventually P (filtermap f F)\<close> if \<open>\<forall>\<^sub>F (x, y) in uniformity. x = l \<longrightarrow> P y\<close> for P
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (filtermap f F)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eventually P (filtermap f F)
[PROOF STEP]
from that
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F (x, y) in uniformity. x = l \<longrightarrow> P y
[PROOF STEP]
have \<open>\<forall>\<^sub>F (y, x) in uniformity. x = l \<longrightarrow> P y\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F (x, y) in uniformity. x = l \<longrightarrow> P y

goal (1 subgoal):
 1. \<forall>\<^sub>F (y, x) in uniformity. x = l \<longrightarrow> P y
[PROOF STEP]
using uniformity_sym[where E=\<open>\<lambda>(x,y). x=l \<longrightarrow> P y\<close>]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F (x, y) in uniformity. x = l \<longrightarrow> P y
\<forall>\<^sub>F (x, y) in uniformity. x = l \<longrightarrow> P y \<Longrightarrow> \<forall>\<^sub>F (x, y) in uniformity. case (y, x) of (x, y) \<Rightarrow> x = l \<longrightarrow> P y

goal (1 subgoal):
 1. \<forall>\<^sub>F (y, x) in uniformity. x = l \<longrightarrow> P y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F (y, x) in uniformity. x = l \<longrightarrow> P y

goal (1 subgoal):
 1. eventually P (filtermap f F)
[PROOF STEP]
with assm
[PROOF STATE]
proof (chain)
picking this:
\<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l))
\<forall>\<^sub>F (y, x) in uniformity. x = l \<longrightarrow> P y
[PROOF STEP]
have \<open>\<forall>\<^sub>F x in F. P (f x)\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l))
\<forall>\<^sub>F (y, x) in uniformity. x = l \<longrightarrow> P y

goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. P (f x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in F. P (f x)

goal (1 subgoal):
 1. eventually P (filtermap f F)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in F. P (f x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in F. P (f x)

goal (1 subgoal):
 1. eventually P (filtermap f F)
[PROOF STEP]
by (auto simp: eventually_filtermap)
[PROOF STATE]
proof (state)
this:
eventually P (filtermap f F)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F (x, y) in uniformity. x = l \<longrightarrow> ?P y \<Longrightarrow> eventually ?P (filtermap f F)

goal (1 subgoal):
 1. \<forall>E. eventually E uniformity \<longrightarrow> (\<forall>\<^sub>F x in F. E (f x, l)) \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F (x, y) in uniformity. x = l \<longrightarrow> ?P y \<Longrightarrow> eventually ?P (filtermap f F)
[PROOF STEP]
show \<open>(f \<longlongrightarrow> l) F\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F (x, y) in uniformity. x = l \<longrightarrow> ?P y \<Longrightarrow> eventually ?P (filtermap f F)

goal (1 subgoal):
 1. (f \<longlongrightarrow> l) F
[PROOF STEP]
by (simp add: filterlim_def le_filter_def eventually_nhds_uniformity)
[PROOF STATE]
proof (state)
this:
(f \<longlongrightarrow> l) F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma c': "c^2 - 3 > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < c\<^sup>2 - 3
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < c\<^sup>2 - 3
[PROOF STEP]
from c
[PROOF STATE]
proof (chain)
picking this:
2 \<le> c
[PROOF STEP]
have "c^2 \<ge> 2^2"
[PROOF STATE]
proof (prove)
using this:
2 \<le> c

goal (1 subgoal):
 1. 2\<^sup>2 \<le> c\<^sup>2
[PROOF STEP]
by (rule power_mono) auto
[PROOF STATE]
proof (state)
this:
2\<^sup>2 \<le> c\<^sup>2

goal (1 subgoal):
 1. 0 < c\<^sup>2 - 3
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
2\<^sup>2 \<le> c\<^sup>2

goal (1 subgoal):
 1. 0 < c\<^sup>2 - 3
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < c\<^sup>2 - 3

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bind_is_matrix_vector_mult: "(bind_pmf x (transition_of_st_mat A)) =
  pmf_as_measure.pmf_of_st_vec (A *st st_vec_of_pmf x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<bind> transition_of_st_mat A = pmf_of_st_vec (A *st st_vec_of_pmf x)
[PROOF STEP]
proof (rule pmf_eqI, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
case (1 i)
[PROOF STATE]
proof (state)
this:

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
define X where "X = st_vec_of_pmf x"
[PROOF STATE]
proof (state)
this:
X = st_vec_of_pmf x

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
have "pmf (bind_pmf x (transition_of_st_mat A)) i =
    (\<Sum>a\<in>UNIV. pmf x a *\<^sub>R pmf (transition_of_st_mat A a) i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmf (x \<bind> transition_of_st_mat A) i = (\<Sum>a\<in>UNIV. pmf x a *\<^sub>R pmf (transition_of_st_mat A a) i)
[PROOF STEP]
unfolding pmf_bind
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. measure_pmf.expectation x (\<lambda>x. pmf (transition_of_st_mat A x) i) = (\<Sum>a\<in>UNIV. pmf x a *\<^sub>R pmf (transition_of_st_mat A a) i)
[PROOF STEP]
by (subst integral_measure_pmf[of UNIV], auto)
[PROOF STATE]
proof (state)
this:
pmf (x \<bind> transition_of_st_mat A) i = (\<Sum>a\<in>UNIV. pmf x a *\<^sub>R pmf (transition_of_st_mat A a) i)

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pmf (x \<bind> transition_of_st_mat A) i = (\<Sum>a\<in>UNIV. pmf x a *\<^sub>R pmf (transition_of_st_mat A a) i)

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
have "\<dots> = (\<Sum>a\<in>UNIV. st_mat A $ i $ a * st_vec X $ a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>a\<in>UNIV. pmf x a *\<^sub>R pmf (transition_of_st_mat A a) i) = (\<Sum>a\<in>UNIV. st_mat A $h i $h a * st_vec X $h a)
[PROOF STEP]
by (rule sum.cong[OF refl], auto simp: X_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>a\<in>UNIV. pmf x a *\<^sub>R pmf (transition_of_st_mat A a) i) = (\<Sum>a\<in>UNIV. st_mat A $h i $h a * st_vec X $h a)

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>a\<in>UNIV. pmf x a *\<^sub>R pmf (transition_of_st_mat A a) i) = (\<Sum>a\<in>UNIV. st_mat A $h i $h a * st_vec X $h a)

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
have "\<dots> = (st_mat A *v st_vec X) $ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>a\<in>UNIV. st_mat A $h i $h a * st_vec X $h a) = (st_mat A *v st_vec X) $h i
[PROOF STEP]
unfolding matrix_vector_mult_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>a\<in>UNIV. st_mat A $h i $h a * st_vec X $h a) = (\<chi>i. \<Sum>j\<in>UNIV. st_mat A $h i $h j * st_vec X $h j) $h i
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>a\<in>UNIV. st_mat A $h i $h a * st_vec X $h a) = (st_mat A *v st_vec X) $h i

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>a\<in>UNIV. st_mat A $h i $h a * st_vec X $h a) = (st_mat A *v st_vec X) $h i

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
have "\<dots> = st_vec (A *st X) $ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (st_mat A *v st_vec X) $h i = st_vec (A *st X) $h i
[PROOF STEP]
unfolding st_mat_mult_st_vec
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. st_vec (A *st X) $h i = st_vec (A *st X) $h i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(st_mat A *v st_vec X) $h i = st_vec (A *st X) $h i

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(st_mat A *v st_vec X) $h i = st_vec (A *st X) $h i

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
have "\<dots> = pmf (pmf_of_st_vec (A *st X)) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. st_vec (A *st X) $h i = pmf (pmf_of_st_vec (A *st X)) i
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
st_vec (A *st X) $h i = pmf (pmf_of_st_vec (A *st X)) i

goal (1 subgoal):
 1. \<And>i. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st X)) i
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st X)) i

goal (1 subgoal):
 1. pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i
[PROOF STEP]
by (simp add: X_def)
[PROOF STATE]
proof (state)
this:
pmf (x \<bind> transition_of_st_mat A) i = pmf (pmf_of_st_vec (A *st st_vec_of_pmf x)) i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma borel_measurable_enn2real[measurable (raw)]:
  "f \<in> M \<rightarrow>\<^sub>M borel \<Longrightarrow> (\<lambda>x. enn2real (f x)) \<in> M \<rightarrow>\<^sub>M borel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. enn2real (f x)) \<in> borel_measurable M
[PROOF STEP]
unfolding enn2real_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> borel_measurable M \<Longrightarrow> (\<lambda>x. real_of_ereal (enn2ereal (f x))) \<in> borel_measurable M
[PROOF STEP]
by measurable


[STATEMENT]
lemma hrabs_add_Infinitesimal_cancel:
  "e \<in> Infinitesimal \<Longrightarrow> e' \<in> Infinitesimal \<Longrightarrow> \<bar>x + e\<bar> = \<bar>y + e'\<bar> \<Longrightarrow> \<bar>x\<bar> \<approx> \<bar>y\<bar>"
  for e e' x y :: hypreal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<in> Infinitesimal; e' \<in> Infinitesimal; \<bar>x + e\<bar> = \<bar>y + e'\<bar>\<rbrakk> \<Longrightarrow> \<bar>x\<bar> \<approx> \<bar>y\<bar>
[PROOF STEP]
by (metis approx_hrabs_add_Infinitesimal approx_trans2)


[STATEMENT]
lemma ldeep_n_pos: "\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> ldeep_n f cf xs > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs
[PROOF STEP]
proof(induction xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>pos_list_cards cf []; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf []
 2. \<And>a xs. \<lbrakk>\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs; pos_list_cards cf (a # xs); sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf (a # xs)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
pos_list_cards cf []
sel_reasonable f

goal (2 subgoals):
 1. \<lbrakk>pos_list_cards cf []; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf []
 2. \<And>a xs. \<lbrakk>\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs; pos_list_cards cf (a # xs); sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf (a # xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
pos_list_cards cf []
sel_reasonable f
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
pos_list_cards cf []
sel_reasonable f

goal (1 subgoal):
 1. 0 < ldeep_n f cf []
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < ldeep_n f cf []

goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs; pos_list_cards cf (a # xs); sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf (a # xs)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs; pos_list_cards cf (a # xs); sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf (a # xs)
[PROOF STEP]
case (Cons x xs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs
pos_list_cards cf (x # xs)
sel_reasonable f

goal (1 subgoal):
 1. \<And>a xs. \<lbrakk>\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs; pos_list_cards cf (a # xs); sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf (a # xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs
pos_list_cards cf (x # xs)
sel_reasonable f
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs
pos_list_cards cf (x # xs)
sel_reasonable f

goal (1 subgoal):
 1. 0 < ldeep_n f cf (x # xs)
[PROOF STEP]
using list_sel_aux'_reasonable pos_list_cards_def mult_pos_pos set_subset_Cons
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>pos_list_cards cf xs; sel_reasonable f\<rbrakk> \<Longrightarrow> 0 < ldeep_n f cf xs
pos_list_cards cf (x # xs)
sel_reasonable f
sel_reasonable ?f \<Longrightarrow> list_sel_aux' ?f ?x ?y \<le> 1 \<and> 0 < list_sel_aux' ?f ?x ?y
pos_list_cards ?cf ?xs = (\<forall>x\<in>set ?xs. 0 < ?cf x)
\<lbrakk>(0::?'a) < ?a; (0::?'a) < ?b\<rbrakk> \<Longrightarrow> (0::?'a) < ?a * ?b
set ?xs \<subseteq> set (?x # ?xs)

goal (1 subgoal):
 1. 0 < ldeep_n f cf (x # xs)
[PROOF STEP]
by (metis list.set_intros(1) ldeep_n.simps(2) subset_code(1))
[PROOF STATE]
proof (state)
this:
0 < ldeep_n f cf (x # xs)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma action_proj_inter_i: "fmrestrict_set V (fmrestrict_set W f) = fmrestrict_set (V \<inter> W) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmrestrict_set V (fmrestrict_set W f) = fmrestrict_set (V \<inter> W) f
[PROOF STEP]
unfolding fmfilter_alt_defs(4)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fmfilter (\<lambda>a. a \<in> V) (fmfilter (\<lambda>a. a \<in> W) f) = fmfilter (\<lambda>a. a \<in> V \<inter> W) f
[PROOF STEP]
by simp


[STATEMENT]
lemma (in topological_space) at_within_open: "a \<in> S \<Longrightarrow> open S \<Longrightarrow> at a within S = at a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> S; open S\<rbrakk> \<Longrightarrow> at a within S = at a
[PROOF STEP]
unfolding filter_eq_iff eventually_at_topological
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> S; open S\<rbrakk> \<Longrightarrow> \<forall>P. (\<exists>Sa. open Sa \<and> a \<in> Sa \<and> (\<forall>x\<in>Sa. x \<noteq> a \<longrightarrow> x \<in> S \<longrightarrow> P x)) = (\<exists>S. open S \<and> a \<in> S \<and> (\<forall>x\<in>S. x \<noteq> a \<longrightarrow> x \<in> UNIV \<longrightarrow> P x))
[PROOF STEP]
by (metis open_Int Int_iff UNIV_I)


[STATEMENT]
lemma (in gram_schmidt) Gramian_matrix_alt_alt_alt_def:
  assumes "k \<le> length fs" "set fs \<subseteq> carrier_vec n"
  shows "Gramian_matrix fs k = mat k k (\<lambda>(i,j). fs ! i \<bullet> fs ! j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gramian_matrix fs k = mat k k (\<lambda>(i, j). fs ! i \<bullet> fs ! j)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Gramian_matrix fs k = mat k k (\<lambda>(i, j). fs ! i \<bullet> fs ! j)
[PROOF STEP]
have *: "vec n (($) (fs ! i)) = fs ! i" if "i < length fs" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec n (($) (fs ! i)) = fs ! i
[PROOF STEP]
using that assms
[PROOF STATE]
proof (prove)
using this:
i < length fs
k \<le> length fs
set fs \<subseteq> carrier_vec n

goal (1 subgoal):
 1. vec n (($) (fs ! i)) = fs ! i
[PROOF STEP]
by (metis carrier_vecD dim_vec eq_vecI index_vec nth_mem subsetCE)
[PROOF STATE]
proof (state)
this:
?i4 < length fs \<Longrightarrow> vec n (($) (fs ! ?i4)) = fs ! ?i4

goal (1 subgoal):
 1. Gramian_matrix fs k = mat k k (\<lambda>(i, j). fs ! i \<bullet> fs ! j)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?i4 < length fs \<Longrightarrow> vec n (($) (fs ! ?i4)) = fs ! ?i4
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?i4 < length fs \<Longrightarrow> vec n (($) (fs ! ?i4)) = fs ! ?i4

goal (1 subgoal):
 1. Gramian_matrix fs k = mat k k (\<lambda>(i, j). fs ! i \<bullet> fs ! j)
[PROOF STEP]
unfolding Gramian_matrix_def
[PROOF STATE]
proof (prove)
using this:
?i4 < length fs \<Longrightarrow> vec n (($) (fs ! ?i4)) = fs ! ?i4

goal (1 subgoal):
 1. (let M = mat k n (\<lambda>(i, y). fs ! i $ y) in M * M\<^sup>T) = mat k k (\<lambda>(i, j). fs ! i \<bullet> fs ! j)
[PROOF STEP]
using  assms
[PROOF STATE]
proof (prove)
using this:
?i4 < length fs \<Longrightarrow> vec n (($) (fs ! ?i4)) = fs ! ?i4
k \<le> length fs
set fs \<subseteq> carrier_vec n

goal (1 subgoal):
 1. (let M = mat k n (\<lambda>(i, y). fs ! i $ y) in M * M\<^sup>T) = mat k k (\<lambda>(i, j). fs ! i \<bullet> fs ! j)
[PROOF STEP]
by (intro eq_matI) (auto simp add: Let_def)
[PROOF STATE]
proof (state)
this:
Gramian_matrix fs k = mat k k (\<lambda>(i, j). fs ! i \<bullet> fs ! j)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prod_rev_ffact_nat':
  fixes m :: nat
  assumes "n \<le> m"
  shows "\<Prod>{m - n + 1..m} = ffact n m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
have "inj_on (\<lambda>i. m - n + i) {1::nat..n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on ((+) (m - n)) {1..n}
[PROOF STEP]
by (auto intro: inj_onI)
[PROOF STATE]
proof (state)
this:
inj_on ((+) (m - n)) {1..n}

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
inj_on ((+) (m - n)) {1..n}

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
have "{m - n + 1..m} = (\<lambda>i. m - n + i) ` {1::nat..n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {m - n + 1..m} = (+) (m - n) ` {1..n}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {m - n + 1..m} = (+) (m - n) ` {1..n}
[PROOF STEP]
have "i \<in> (\<lambda>i. m + i - n) ` {Suc 0..n}" if "i \<in> {m - n + 1..m}" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i \<in> (\<lambda>i. m + i - n) ` {Suc 0..n}
[PROOF STEP]
using that \<open>n \<le> m\<close>
[PROOF STATE]
proof (prove)
using this:
i \<in> {m - n + 1..m}
n \<le> m

goal (1 subgoal):
 1. i \<in> (\<lambda>i. m + i - n) ` {Suc 0..n}
[PROOF STEP]
by (auto intro!: image_eqI[where x="i - (m - n)"])
[PROOF STATE]
proof (state)
this:
?i \<in> {m - n + 1..m} \<Longrightarrow> ?i \<in> (\<lambda>i. m + i - n) ` {Suc 0..n}

goal (1 subgoal):
 1. {m - n + 1..m} = (+) (m - n) ` {1..n}
[PROOF STEP]
with \<open>n \<le> m\<close>
[PROOF STATE]
proof (chain)
picking this:
n \<le> m
?i \<in> {m - n + 1..m} \<Longrightarrow> ?i \<in> (\<lambda>i. m + i - n) ` {Suc 0..n}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n \<le> m
?i \<in> {m - n + 1..m} \<Longrightarrow> ?i \<in> (\<lambda>i. m + i - n) ` {Suc 0..n}

goal (1 subgoal):
 1. {m - n + 1..m} = (+) (m - n) ` {1..n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{m - n + 1..m} = (+) (m - n) ` {1..n}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
{m - n + 1..m} = (+) (m - n) ` {1..n}

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{m - n + 1..m} = (+) (m - n) ` {1..n}

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
have "m - n + i = m - n + i" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m - n + i = m - n + i
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
m - n + ?i = m - n + ?i

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
inj_on ((+) (m - n)) {1..n}
{m - n + 1..m} = (+) (m - n) ` {1..n}
m - n + ?i = m - n + ?i
[PROOF STEP]
have "\<Prod>{m - n + (1::nat)..m} = (\<Prod>i = 1..n. m - n + i)"
[PROOF STATE]
proof (prove)
using this:
inj_on ((+) (m - n)) {1..n}
{m - n + 1..m} = (+) (m - n) ` {1..n}
m - n + ?i = m - n + ?i

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = prod ((+) (m - n)) {1..n}
[PROOF STEP]
by (rule prod.reindex_cong)
[PROOF STATE]
proof (state)
this:
\<Prod>{m - n + 1..m} = prod ((+) (m - n)) {1..n}

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<Prod>{m - n + 1..m} = prod ((+) (m - n)) {1..n}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Prod>{m - n + 1..m} = prod ((+) (m - n)) {1..n}

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
using \<open>n \<le> m\<close>
[PROOF STATE]
proof (prove)
using this:
\<Prod>{m - n + 1..m} = prod ((+) (m - n)) {1..n}
n \<le> m

goal (1 subgoal):
 1. \<Prod>{m - n + 1..m} = ffact n m
[PROOF STEP]
by (simp only: prod_rev_ffact_nat)
[PROOF STATE]
proof (state)
this:
\<Prod>{m - n + 1..m} = ffact n m

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eqvt_fresh_cong1: "(\<And>p x. p \<bullet> (f x) = f (p \<bullet> x)) \<Longrightarrow> a \<sharp> x \<Longrightarrow> a \<sharp> f x "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> a \<sharp> f x
[PROOF STEP]
apply (rule fresh_fun_eqvt_app[of f])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> eqvt f
 2. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> a \<sharp> x
[PROOF STEP]
apply (rule eqvtI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>p. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> p \<bullet> f \<equiv> f
 2. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> a \<sharp> x
[PROOF STEP]
apply (rule eq_reflection)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>p. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> p \<bullet> f = f
 2. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> a \<sharp> x
[PROOF STEP]
apply (rule ext)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>p xa. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> (p \<bullet> f) xa = f xa
 2. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> a \<sharp> x
[PROOF STEP]
apply (metis permute_fun_def permute_minus_cancel(1))
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>p x. p \<bullet> f x = f (p \<bullet> x); a \<sharp> x\<rbrakk> \<Longrightarrow> a \<sharp> x
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma facet_of_imp_subset: "F facet_of S \<Longrightarrow> F \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F facet_of S \<Longrightarrow> F \<subseteq> S
[PROOF STEP]
by (simp add: face_of_imp_subset facet_of_def)