[STATEMENT]
lemma has_integral_is_0:
  fixes f :: "'n::euclidean_space \<Rightarrow> 'a::real_normed_vector"
  assumes "\<And>x. x \<in> S \<Longrightarrow> f x = 0"
  shows "(f has_integral 0) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral (0::'a)) S
[PROOF STEP]
proof (cases "(\<exists>a b. S = cbox a b)")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>a b. S = cbox a b \<Longrightarrow> (f has_integral (0::'a)) S
 2. \<nexists>a b. S = cbox a b \<Longrightarrow> (f has_integral (0::'a)) S
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<exists>a b. S = cbox a b

goal (2 subgoals):
 1. \<exists>a b. S = cbox a b \<Longrightarrow> (f has_integral (0::'a)) S
 2. \<nexists>a b. S = cbox a b \<Longrightarrow> (f has_integral (0::'a)) S
[PROOF STEP]
with assms has_integral_is_0_cbox
[PROOF STATE]
proof (chain)
picking this:
?x \<in> S \<Longrightarrow> f ?x = (0::'a)
(\<And>x. x \<in> cbox ?a ?b \<Longrightarrow> ?f x = (0::?'a)) \<Longrightarrow> (?f has_integral (0::?'a)) (cbox ?a ?b)
\<exists>a b. S = cbox a b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<in> S \<Longrightarrow> f ?x = (0::'a)
(\<And>x. x \<in> cbox ?a ?b \<Longrightarrow> ?f x = (0::?'a)) \<Longrightarrow> (?f has_integral (0::?'a)) (cbox ?a ?b)
\<exists>a b. S = cbox a b

goal (1 subgoal):
 1. (f has_integral (0::'a)) S
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(f has_integral (0::'a)) S

goal (1 subgoal):
 1. \<nexists>a b. S = cbox a b \<Longrightarrow> (f has_integral (0::'a)) S
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<nexists>a b. S = cbox a b \<Longrightarrow> (f has_integral (0::'a)) S
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<nexists>a b. S = cbox a b

goal (1 subgoal):
 1. \<nexists>a b. S = cbox a b \<Longrightarrow> (f has_integral (0::'a)) S
[PROOF STEP]
have *: "(\<lambda>x. if x \<in> S then f x else 0) = (\<lambda>x. 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> S then f x else (0::'a)) = (\<lambda>x. 0::'a)
[PROOF STEP]
by (auto simp add: assms)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> S then f x else (0::'a)) = (\<lambda>x. 0::'a)

goal (1 subgoal):
 1. \<nexists>a b. S = cbox a b \<Longrightarrow> (f has_integral (0::'a)) S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral (0::'a)) S
[PROOF STEP]
using has_integral_is_0_cbox False
[PROOF STATE]
proof (prove)
using this:
(\<And>x. x \<in> cbox ?a ?b \<Longrightarrow> ?f x = (0::?'a)) \<Longrightarrow> (?f has_integral (0::?'a)) (cbox ?a ?b)
\<nexists>a b. S = cbox a b

goal (1 subgoal):
 1. (f has_integral (0::'a)) S
[PROOF STEP]
by (subst has_integral_alt) (force simp add: *)
[PROOF STATE]
proof (state)
this:
(f has_integral (0::'a)) S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hom_deg_set_closed_uminus:
  assumes "\<And>a. a \<in> A \<Longrightarrow> - a \<in> A" and "p \<in> hom_deg_set z A"
  shows "- p \<in> hom_deg_set z A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - p \<in> hom_deg_set z A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - p \<in> hom_deg_set z A
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
p \<in> hom_deg_set z A
[PROOF STEP]
obtain a where "a \<in> A" and p: "p = hom_component a z"
[PROOF STATE]
proof (prove)
using this:
p \<in> hom_deg_set z A

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> A; p = hom_component a z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding hom_deg_set_def
[PROOF STATE]
proof (prove)
using this:
p \<in> (\<lambda>a. hom_component a z) ` A

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> A; p = hom_component a z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
a \<in> A
p = hom_component a z

goal (1 subgoal):
 1. - p \<in> hom_deg_set z A
[PROOF STEP]
from this(1)
[PROOF STATE]
proof (chain)
picking this:
a \<in> A
[PROOF STEP]
have "- a \<in> A"
[PROOF STATE]
proof (prove)
using this:
a \<in> A

goal (1 subgoal):
 1. - a \<in> A
[PROOF STEP]
by (rule assms(1))
[PROOF STATE]
proof (state)
this:
- a \<in> A

goal (1 subgoal):
 1. - p \<in> hom_deg_set z A
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
- a \<in> A

goal (1 subgoal):
 1. - p \<in> hom_deg_set z A
[PROOF STEP]
have "- p = hom_component (- a) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - p = hom_component (- a) z
[PROOF STEP]
by (simp add: p)
[PROOF STATE]
proof (state)
this:
- p = hom_component (- a) z

goal (1 subgoal):
 1. - p \<in> hom_deg_set z A
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
- a \<in> A
- p = hom_component (- a) z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
- a \<in> A
- p = hom_component (- a) z

goal (1 subgoal):
 1. - p \<in> hom_deg_set z A
[PROOF STEP]
unfolding hom_deg_set_def
[PROOF STATE]
proof (prove)
using this:
- a \<in> A
- p = hom_component (- a) z

goal (1 subgoal):
 1. - p \<in> (\<lambda>a. hom_component a z) ` A
[PROOF STEP]
by (rule rev_image_eqI)
[PROOF STATE]
proof (state)
this:
- p \<in> hom_deg_set z A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lowner_lub_scale:
  fixes c :: real
  assumes "matrix_seq d f"  "\<forall> n. trace (c \<cdot>\<^sub>m f n) \<le> 1"  "c\<ge>0"
  shows "matrix_seq.lowner_lub (\<lambda>n. c \<cdot>\<^sub>m f n) = c \<cdot>\<^sub>m matrix_seq.lowner_lub f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
have msf: "matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)
[PROOF STEP]
using assms(1) matrix_seq.lowner_lub_prop
[PROOF STATE]
proof (prove)
using this:
matrix_seq d f
matrix_seq ?dim ?f \<Longrightarrow> matrix_seq.lowner_is_lub ?f (matrix_seq.lowner_lub ?f)

goal (1 subgoal):
 1. matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)
[PROOF STEP]
have "limit_mat f (matrix_seq.lowner_lub f) d"
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)

goal (1 subgoal):
 1. limit_mat f (matrix_seq.lowner_lub f) d
[PROOF STEP]
using matrix_seq.lowner_lub_is_limit assms
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)
matrix_seq ?dim ?f \<Longrightarrow> limit_mat ?f (matrix_seq.lowner_lub ?f) ?dim
matrix_seq d f
\<forall>n. trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
0 \<le> c

goal (1 subgoal):
 1. limit_mat f (matrix_seq.lowner_lub f) d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
limit_mat f (matrix_seq.lowner_lub f) d

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
limit_mat f (matrix_seq.lowner_lub f) d
[PROOF STEP]
have lim1: "\<forall>i<d. \<forall>j<d. (\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> (matrix_seq.lowner_lub f) $$ (i, j)"
[PROOF STATE]
proof (prove)
using this:
limit_mat f (matrix_seq.lowner_lub f) d

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)
[PROOF STEP]
using limit_mat_def assms
[PROOF STATE]
proof (prove)
using this:
limit_mat f (matrix_seq.lowner_lub f) d
limit_mat ?X ?A ?m = (\<forall>n. ?X n \<in> carrier_mat ?m ?m \<and> ?A \<in> carrier_mat ?m ?m \<and> (\<forall>i<?m. \<forall>j<?m. (\<lambda>n. ?X n $$ (i, j)) \<longlonglongrightarrow> ?A $$ (i, j)))
matrix_seq d f
\<forall>n. trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
0 \<le> c

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i<d. \<forall>j<d. (\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
have dimcf: "\<forall>n. c \<cdot>\<^sub>m f n \<in> carrier_mat d d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
matrix_seq d f
\<forall>n. trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
0 \<le> c

goal (1 subgoal):
 1. \<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d
[PROOF STEP]
unfolding matrix_seq_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>n. f n \<in> carrier_mat d d) \<and> (\<forall>n. partial_density_operator (f n)) \<and> (\<forall>n. f n \<le>\<^sub>L f (Suc n))
\<forall>n. trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
0 \<le> c

goal (1 subgoal):
 1. \<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
have "\<forall>n. partial_density_operator (c \<cdot>\<^sub>m f n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. partial_density_operator (complex_of_real c \<cdot>\<^sub>m f n)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
matrix_seq d f
\<forall>n. trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
0 \<le> c

goal (1 subgoal):
 1. \<forall>n. partial_density_operator (complex_of_real c \<cdot>\<^sub>m f n)
[PROOF STEP]
unfolding matrix_seq_def partial_density_operator_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>n. f n \<in> carrier_mat d d) \<and> (\<forall>n. positive (f n) \<and> trace (f n) \<le> 1) \<and> (\<forall>n. f n \<le>\<^sub>L f (Suc n))
\<forall>n. trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
0 \<le> c

goal (1 subgoal):
 1. \<forall>n. positive (complex_of_real c \<cdot>\<^sub>m f n) \<and> trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
[PROOF STEP]
using positive_scale
[PROOF STATE]
proof (prove)
using this:
(\<forall>n. f n \<in> carrier_mat d d) \<and> (\<forall>n. positive (f n) \<and> trace (f n) \<le> 1) \<and> (\<forall>n. f n \<le>\<^sub>L f (Suc n))
\<forall>n. trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
0 \<le> c
\<lbrakk>?A \<in> carrier_mat ?n ?n; positive ?A; 0 \<le> ?c\<rbrakk> \<Longrightarrow> positive (complex_of_real ?c \<cdot>\<^sub>m ?A)

goal (1 subgoal):
 1. \<forall>n. positive (complex_of_real c \<cdot>\<^sub>m f n) \<and> trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>n. partial_density_operator (complex_of_real c \<cdot>\<^sub>m f n)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>n. partial_density_operator (complex_of_real c \<cdot>\<^sub>m f n)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
have "\<forall>n.  c \<cdot>\<^sub>m f n \<le>\<^sub>L  c \<cdot>\<^sub>m f (Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<le>\<^sub>L complex_of_real c \<cdot>\<^sub>m f (Suc n)
[PROOF STEP]
using lowner_le_smult assms(1,3)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?c; ?A \<le>\<^sub>L ?B; ?A \<in> carrier_mat ?n ?n; ?B \<in> carrier_mat ?n ?n\<rbrakk> \<Longrightarrow> complex_of_real ?c \<cdot>\<^sub>m ?A \<le>\<^sub>L complex_of_real ?c \<cdot>\<^sub>m ?B
matrix_seq d f
0 \<le> c

goal (1 subgoal):
 1. \<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<le>\<^sub>L complex_of_real c \<cdot>\<^sub>m f (Suc n)
[PROOF STEP]
unfolding matrix_seq_def partial_density_operator_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> ?c; ?A \<le>\<^sub>L ?B; ?A \<in> carrier_mat ?n ?n; ?B \<in> carrier_mat ?n ?n\<rbrakk> \<Longrightarrow> complex_of_real ?c \<cdot>\<^sub>m ?A \<le>\<^sub>L complex_of_real ?c \<cdot>\<^sub>m ?B
(\<forall>n. f n \<in> carrier_mat d d) \<and> (\<forall>n. positive (f n) \<and> trace (f n) \<le> 1) \<and> (\<forall>n. f n \<le>\<^sub>L f (Suc n))
0 \<le> c

goal (1 subgoal):
 1. \<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<le>\<^sub>L complex_of_real c \<cdot>\<^sub>m f (Suc n)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<le>\<^sub>L complex_of_real c \<cdot>\<^sub>m f (Suc n)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d
\<forall>n. partial_density_operator (complex_of_real c \<cdot>\<^sub>m f n)
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<le>\<^sub>L complex_of_real c \<cdot>\<^sub>m f (Suc n)
[PROOF STEP]
have mscf: "matrix_seq d (\<lambda>n. c \<cdot>\<^sub>m f n)"
[PROOF STATE]
proof (prove)
using this:
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d
\<forall>n. partial_density_operator (complex_of_real c \<cdot>\<^sub>m f n)
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<le>\<^sub>L complex_of_real c \<cdot>\<^sub>m f (Suc n)

goal (1 subgoal):
 1. matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)
[PROOF STEP]
unfolding matrix_seq_def
[PROOF STATE]
proof (prove)
using this:
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d
\<forall>n. partial_density_operator (complex_of_real c \<cdot>\<^sub>m f n)
\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<le>\<^sub>L complex_of_real c \<cdot>\<^sub>m f (Suc n)

goal (1 subgoal):
 1. (\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<in> carrier_mat d d) \<and> (\<forall>n. partial_density_operator (complex_of_real c \<cdot>\<^sub>m f n)) \<and> (\<forall>n. complex_of_real c \<cdot>\<^sub>m f n \<le>\<^sub>L complex_of_real c \<cdot>\<^sub>m f (Suc n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)
[PROOF STEP]
have mslfg: "matrix_seq.lowner_is_lub (\<lambda>n. c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. c \<cdot>\<^sub>m f n))"
[PROOF STATE]
proof (prove)
using this:
matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)

goal (1 subgoal):
 1. matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))
[PROOF STEP]
using matrix_seq.lowner_lub_prop
[PROOF STATE]
proof (prove)
using this:
matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)
matrix_seq ?dim ?f \<Longrightarrow> matrix_seq.lowner_is_lub ?f (matrix_seq.lowner_lub ?f)

goal (1 subgoal):
 1. matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))
[PROOF STEP]
have "limit_mat (\<lambda>n. c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. c \<cdot>\<^sub>m f n)) d"
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))

goal (1 subgoal):
 1. limit_mat (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)) d
[PROOF STEP]
using matrix_seq.lowner_lub_is_limit mscf
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))
matrix_seq ?dim ?f \<Longrightarrow> limit_mat ?f (matrix_seq.lowner_lub ?f) ?dim
matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)

goal (1 subgoal):
 1. limit_mat (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)) d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
limit_mat (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)) d

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
limit_mat (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)) d
[PROOF STEP]
have lim3: "\<forall>i<d. \<forall>j<d. (\<lambda>n. (c \<cdot>\<^sub>m f n) $$ (i, j)) \<longlonglongrightarrow> (matrix_seq.lowner_lub (\<lambda>n. c \<cdot>\<^sub>m f n)) $$ (i, j)"
[PROOF STATE]
proof (prove)
using this:
limit_mat (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)) d

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (\<lambda>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
using limit_mat_def assms
[PROOF STATE]
proof (prove)
using this:
limit_mat (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)) d
limit_mat ?X ?A ?m = (\<forall>n. ?X n \<in> carrier_mat ?m ?m \<and> ?A \<in> carrier_mat ?m ?m \<and> (\<forall>i<?m. \<forall>j<?m. (\<lambda>n. ?X n $$ (i, j)) \<longlonglongrightarrow> ?A $$ (i, j)))
matrix_seq d f
\<forall>n. trace (complex_of_real c \<cdot>\<^sub>m f n) \<le> 1
0 \<le> c

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (\<lambda>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i<d. \<forall>j<d. (\<lambda>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
from mslfg mscf
[PROOF STATE]
proof (chain)
picking this:
matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))
matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)
[PROOF STEP]
have dleft: "matrix_seq.lowner_lub (\<lambda>n. c \<cdot>\<^sub>m f n) \<in> carrier_mat d d"
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))
matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) \<in> carrier_mat d d
[PROOF STEP]
using matrix_seq.lowner_is_lub_dim
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_is_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n))
matrix_seq d (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)
\<lbrakk>matrix_seq ?dim ?f; matrix_seq.lowner_is_lub ?f ?M\<rbrakk> \<Longrightarrow> ?M \<in> carrier_mat ?dim ?dim

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) \<in> carrier_mat d d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) \<in> carrier_mat d d

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
have dllf: "matrix_seq.lowner_lub f \<in> carrier_mat d d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_seq.lowner_lub f \<in> carrier_mat d d
[PROOF STEP]
using matrix_seq.lowner_is_lub_dim assms(1) msf
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>matrix_seq ?dim ?f; matrix_seq.lowner_is_lub ?f ?M\<rbrakk> \<Longrightarrow> ?M \<in> carrier_mat ?dim ?dim
matrix_seq d f
matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)

goal (1 subgoal):
 1. matrix_seq.lowner_lub f \<in> carrier_mat d d
[PROOF STEP]
unfolding matrix_seq_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(\<forall>n. ?f n \<in> carrier_mat ?dim ?dim) \<and> (\<forall>n. partial_density_operator (?f n)) \<and> (\<forall>n. ?f n \<le>\<^sub>L ?f (Suc n)); matrix_seq.lowner_is_lub ?f ?M\<rbrakk> \<Longrightarrow> ?M \<in> carrier_mat ?dim ?dim
(\<forall>n. f n \<in> carrier_mat d d) \<and> (\<forall>n. partial_density_operator (f n)) \<and> (\<forall>n. f n \<le>\<^sub>L f (Suc n))
matrix_seq.lowner_is_lub f (matrix_seq.lowner_lub f)

goal (1 subgoal):
 1. matrix_seq.lowner_lub f \<in> carrier_mat d d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
matrix_seq.lowner_lub f \<in> carrier_mat d d

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
matrix_seq.lowner_lub f \<in> carrier_mat d d
[PROOF STEP]
have dright: "c \<cdot>\<^sub>m matrix_seq.lowner_lub f \<in> carrier_mat d d"
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_lub f \<in> carrier_mat d d

goal (1 subgoal):
 1. complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f \<in> carrier_mat d d
[PROOF STEP]
using index_smult_mat(2,3)
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_lub f \<in> carrier_mat d d
dim_row (?a \<cdot>\<^sub>m ?A) = dim_row ?A
dim_col (?a \<cdot>\<^sub>m ?A) = dim_col ?A

goal (1 subgoal):
 1. complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f \<in> carrier_mat d d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f \<in> carrier_mat d d

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
have "\<forall> i<d. \<forall> j<d. \<forall> n. (c \<cdot>\<^sub>m f n) $$ (i, j) = c * f n $$ (i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. \<forall>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = complex_of_real c * f n $$ (i, j)
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
matrix_seq d f

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. \<forall>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = complex_of_real c * f n $$ (i, j)
[PROOF STEP]
unfolding matrix_seq_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>n. f n \<in> carrier_mat d d) \<and> (\<forall>n. partial_density_operator (f n)) \<and> (\<forall>n. f n \<le>\<^sub>L f (Suc n))

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. \<forall>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = complex_of_real c * f n $$ (i, j)
[PROOF STEP]
using index_smult_mat(1)
[PROOF STATE]
proof (prove)
using this:
(\<forall>n. f n \<in> carrier_mat d d) \<and> (\<forall>n. partial_density_operator (f n)) \<and> (\<forall>n. f n \<le>\<^sub>L f (Suc n))
\<lbrakk>?i < dim_row ?A; ?j < dim_col ?A\<rbrakk> \<Longrightarrow> (?a \<cdot>\<^sub>m ?A) $$ (?i, ?j) = ?a * ?A $$ (?i, ?j)

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. \<forall>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = complex_of_real c * f n $$ (i, j)
[PROOF STEP]
by (metis carrier_matD(1-2))
[PROOF STATE]
proof (state)
this:
\<forall>i<d. \<forall>j<d. \<forall>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = complex_of_real c * f n $$ (i, j)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<d. \<forall>j<d. \<forall>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = complex_of_real c * f n $$ (i, j)
[PROOF STEP]
have smult: "\<forall>i<d. \<forall>j<d. (\<lambda>n.  c * f n $$ (i, j)) \<longlonglongrightarrow> (matrix_seq.lowner_lub (\<lambda>n. c \<cdot>\<^sub>m f n)) $$ (i, j)"
[PROOF STATE]
proof (prove)
using this:
\<forall>i<d. \<forall>j<d. \<forall>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = complex_of_real c * f n $$ (i, j)

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
using lim3
[PROOF STATE]
proof (prove)
using this:
\<forall>i<d. \<forall>j<d. \<forall>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = complex_of_real c * f n $$ (i, j)
\<forall>i<d. \<forall>j<d. (\<lambda>n. (complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
have ij: "(c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = (matrix_seq.lowner_lub (\<lambda>n. c \<cdot>\<^sub>m f n)) $$ (i, j)"
    if i: "i < d" and j: "j < d" for i j
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
have "(\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)
[PROOF STEP]
using lim1 i j
[PROOF STATE]
proof (prove)
using this:
\<forall>i<d. \<forall>j<d. (\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)
i < d
j < d

goal (1 subgoal):
 1. (\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)

goal (1 subgoal):
 1. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)

goal (1 subgoal):
 1. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
have "\<forall>i<d. \<forall>j<d.(c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) =  c *  matrix_seq.lowner_lub f $$ (i, j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = complex_of_real c * matrix_seq.lowner_lub f $$ (i, j)
[PROOF STEP]
using index_smult_mat dllf
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i < dim_row ?A; ?j < dim_col ?A\<rbrakk> \<Longrightarrow> (?a \<cdot>\<^sub>m ?A) $$ (?i, ?j) = ?a * ?A $$ (?i, ?j)
dim_row (?a \<cdot>\<^sub>m ?A) = dim_row ?A
dim_col (?a \<cdot>\<^sub>m ?A) = dim_col ?A
matrix_seq.lowner_lub f \<in> carrier_mat d d

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = complex_of_real c * matrix_seq.lowner_lub f $$ (i, j)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<forall>i<d. \<forall>j<d. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = complex_of_real c * matrix_seq.lowner_lub f $$ (i, j)

goal (1 subgoal):
 1. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)
\<forall>i<d. \<forall>j<d. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = complex_of_real c * matrix_seq.lowner_lub f $$ (i, j)
[PROOF STEP]
have "\<forall>i<d. \<forall>j<d. (\<lambda>n.  c * f n $$ (i, j)) \<longlonglongrightarrow>(c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)
\<forall>i<d. \<forall>j<d. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = complex_of_real c * matrix_seq.lowner_lub f $$ (i, j)

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j)
[PROOF STEP]
using tendsto_intros(18)[of "\<lambda>n. c" "c" sequentially "\<lambda>n. f n $$ (i, j)" "matrix_seq.lowner_lub f $$ (i, j)"] i j
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)
\<forall>i<d. \<forall>j<d. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = complex_of_real c * matrix_seq.lowner_lub f $$ (i, j)
\<lbrakk>(\<lambda>n. c) \<longlonglongrightarrow> c; (\<lambda>n. f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub f $$ (i, j)\<rbrakk> \<Longrightarrow> (\<lambda>x. c *\<^sub>R f x $$ (i, j)) \<longlonglongrightarrow> c *\<^sub>R matrix_seq.lowner_lub f $$ (i, j)
i < d
j < d

goal (1 subgoal):
 1. \<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j)
[PROOF STEP]
by (simp add: lim1 tendsto_mult_left)
[PROOF STATE]
proof (state)
this:
\<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j)

goal (1 subgoal):
 1. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j)

goal (1 subgoal):
 1. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
using smult i j LIMSEQ_unique
[PROOF STATE]
proof (prove)
using this:
\<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j)
\<forall>i<d. \<forall>j<d. (\<lambda>n. complex_of_real c * f n $$ (i, j)) \<longlonglongrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
i < d
j < d
\<lbrakk>?X \<longlonglongrightarrow> ?a; ?X \<longlonglongrightarrow> ?b\<rbrakk> \<Longrightarrow> ?a = ?b

goal (1 subgoal):
 1. (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
(complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i < d; ?j < d\<rbrakk> \<Longrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (?i, ?j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (?i, ?j)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
from dleft dright ij
[PROOF STATE]
proof (chain)
picking this:
matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) \<in> carrier_mat d d
complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f \<in> carrier_mat d d
\<lbrakk>?i < d; ?j < d\<rbrakk> \<Longrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (?i, ?j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (?i, ?j)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) \<in> carrier_mat d d
complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f \<in> carrier_mat d d
\<lbrakk>?i < d; ?j < d\<rbrakk> \<Longrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (?i, ?j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (?i, ?j)

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
using mat_eq_iff[of "matrix_seq.lowner_lub  (\<lambda>n. c \<cdot>\<^sub>m f n)" "c \<cdot>\<^sub>m matrix_seq.lowner_lub f"]
[PROOF STATE]
proof (prove)
using this:
matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) \<in> carrier_mat d d
complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f \<in> carrier_mat d d
\<lbrakk>?i < d; ?j < d\<rbrakk> \<Longrightarrow> (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (?i, ?j) = matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (?i, ?j)
(matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) = (dim_row (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)) = dim_row (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) \<and> dim_col (matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n)) = dim_col (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) \<and> (\<forall>i j. i < dim_row (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) \<longrightarrow> j < dim_col (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) \<longrightarrow> matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) $$ (i, j) = (complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f) $$ (i, j)))

goal (1 subgoal):
 1. matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f
[PROOF STEP]
by (metis (mono_tags) carrier_matD(1) carrier_matD(2))
[PROOF STATE]
proof (state)
this:
matrix_seq.lowner_lub (\<lambda>n. complex_of_real c \<cdot>\<^sub>m f n) = complex_of_real c \<cdot>\<^sub>m matrix_seq.lowner_lub f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma product_language_state :
  shows "LS (product A B) (q1,q2) = LS A q1 \<inter> LS B q2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LS (Product_FSM.product A B) (q1, q2) = LS A q1 \<inter> LS B q2
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. LS (Product_FSM.product A B) (q1, q2) \<subseteq> LS A q1 \<inter> LS B q2
 2. LS A q1 \<inter> LS B q2 \<subseteq> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
show "LS (product A B) (q1, q2) \<subseteq> LS A q1 \<inter> LS B q2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LS (Product_FSM.product A B) (q1, q2) \<subseteq> LS A q1 \<inter> LS B q2
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> LS (Product_FSM.product A B) (q1, q2) \<Longrightarrow> x \<in> LS A q1 \<inter> LS B q2
[PROOF STEP]
fix io
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> LS (Product_FSM.product A B) (q1, q2) \<Longrightarrow> x \<in> LS A q1 \<inter> LS B q2
[PROOF STEP]
assume "io \<in> LS (product A B) (q1, q2)"
[PROOF STATE]
proof (state)
this:
io \<in> LS (Product_FSM.product A B) (q1, q2)

goal (1 subgoal):
 1. \<And>x. x \<in> LS (Product_FSM.product A B) (q1, q2) \<Longrightarrow> x \<in> LS A q1 \<inter> LS B q2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
io \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
obtain p where "io = p_io p"
                    and "path (product A B) (q1,q2) p"
[PROOF STATE]
proof (prove)
using this:
io \<in> LS (Product_FSM.product A B) (q1, q2)

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>io = p_io p; path (Product_FSM.product A B) (q1, q2) p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
io = p_io p
path (Product_FSM.product A B) (q1, q2) p

goal (1 subgoal):
 1. \<And>x. x \<in> LS (Product_FSM.product A B) (q1, q2) \<Longrightarrow> x \<in> LS A q1 \<inter> LS B q2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
io = p_io p
path (Product_FSM.product A B) (q1, q2) p
[PROOF STEP]
obtain p1 p2 where "path A q1 p1"
                        and "path B q2 p2"
                        and "io = p_io p1"
                        and "io = p_io p2"
[PROOF STATE]
proof (prove)
using this:
io = p_io p
path (Product_FSM.product A B) (q1, q2) p

goal (1 subgoal):
 1. (\<And>p1 p2. \<lbrakk>path A q1 p1; path B q2 p2; io = p_io p1; io = p_io p2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using product_path[of A B q1 q2 p]
[PROOF STATE]
proof (prove)
using this:
io = p_io p
path (Product_FSM.product A B) (q1, q2) p
path (Product_FSM.product A B) (q1, q2) p = (path A q1 (left_path p) \<and> path B q2 (right_path p))

goal (1 subgoal):
 1. (\<And>p1 p2. \<lbrakk>path A q1 p1; path B q2 p2; io = p_io p1; io = p_io p2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
path A q1 p1
path B q2 p2
io = p_io p1
io = p_io p2

goal (1 subgoal):
 1. \<And>x. x \<in> LS (Product_FSM.product A B) (q1, q2) \<Longrightarrow> x \<in> LS A q1 \<inter> LS B q2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path A q1 p1
path B q2 p2
io = p_io p1
io = p_io p2
[PROOF STEP]
show "io \<in> LS A q1 \<inter> LS B q2"
[PROOF STATE]
proof (prove)
using this:
path A q1 p1
path B q2 p2
io = p_io p1
io = p_io p2

goal (1 subgoal):
 1. io \<in> LS A q1 \<inter> LS B q2
[PROOF STEP]
unfolding LS.simps
[PROOF STATE]
proof (prove)
using this:
path A q1 p1
path B q2 p2
io = p_io p1
io = p_io p2

goal (1 subgoal):
 1. io \<in> {p_io p |p. path A q1 p} \<inter> {p_io p |p. path B q2 p}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
io \<in> LS A q1 \<inter> LS B q2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
LS (Product_FSM.product A B) (q1, q2) \<subseteq> LS A q1 \<inter> LS B q2

goal (1 subgoal):
 1. LS A q1 \<inter> LS B q2 \<subseteq> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
show "LS A q1 \<inter> LS B q2 \<subseteq> LS (product A B) (q1, q2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LS A q1 \<inter> LS B q2 \<subseteq> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
fix io
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
assume "io \<in> LS A q1 \<inter> LS B q2"
[PROOF STATE]
proof (state)
this:
io \<in> LS A q1 \<inter> LS B q2

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
io \<in> LS A q1 \<inter> LS B q2
[PROOF STEP]
obtain p1 p2 where "path A q1 p1"
                        and "path B q2 p2"
                        and "io = p_io p1"
                        and "io = p_io p2"
                        and "p_io p1 = p_io p2"
[PROOF STATE]
proof (prove)
using this:
io \<in> LS A q1 \<inter> LS B q2

goal (1 subgoal):
 1. (\<And>p1 p2. \<lbrakk>path A q1 p1; path B q2 p2; io = p_io p1; io = p_io p2; p_io p1 = p_io p2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path A q1 p1
path B q2 p2
io = p_io p1
io = p_io p2
p_io p1 = p_io p2

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
let ?p = "zip_path p1 p2"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
have "length p1 = length p2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length p1 = length p2
[PROOF STEP]
using \<open>p_io p1 = p_io p2\<close> map_eq_imp_length_eq
[PROOF STATE]
proof (prove)
using this:
p_io p1 = p_io p2
map ?f ?xs = map ?g ?ys \<Longrightarrow> length ?xs = length ?ys

goal (1 subgoal):
 1. length p1 = length p2
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
length p1 = length p2

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
length p1 = length p2

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
have "p_io ?p = p_io (map fst (zip p1 p2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p_io (zip_path p1 p2) = p_io (map fst (zip p1 p2))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p_io (zip_path p1 p2) = p_io (map fst (zip p1 p2))

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
length p1 = length p2
p_io (zip_path p1 p2) = p_io (map fst (zip p1 p2))
[PROOF STEP]
have "p_io ?p = p_io p1"
[PROOF STATE]
proof (prove)
using this:
length p1 = length p2
p_io (zip_path p1 p2) = p_io (map fst (zip p1 p2))

goal (1 subgoal):
 1. p_io (zip_path p1 p2) = p_io p1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p_io (zip_path p1 p2) = p_io p1

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p_io (zip_path p1 p2) = p_io p1
[PROOF STEP]
have "p_io ?p = io"
[PROOF STATE]
proof (prove)
using this:
p_io (zip_path p1 p2) = p_io p1

goal (1 subgoal):
 1. p_io (zip_path p1 p2) = io
[PROOF STEP]
using \<open>io = p_io p1\<close>
[PROOF STATE]
proof (prove)
using this:
p_io (zip_path p1 p2) = p_io p1
io = p_io p1

goal (1 subgoal):
 1. p_io (zip_path p1 p2) = io
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p_io (zip_path p1 p2) = io

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
p_io (zip_path p1 p2) = io

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
have "path (product A B) (q1, q2) ?p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path (Product_FSM.product A B) (q1, q2) (zip_path p1 p2)
[PROOF STEP]
using product_path_rev[OF \<open>p_io p1 = p_io p2\<close>, of A B q1 q2] \<open>path A q1 p1\<close> \<open>path B q2 p2\<close>
[PROOF STATE]
proof (prove)
using this:
path (Product_FSM.product A B) (q1, q2) (zip_path p1 p2) = (path A q1 p1 \<and> path B q2 p2)
path A q1 p1
path B q2 p2

goal (1 subgoal):
 1. path (Product_FSM.product A B) (q1, q2) (zip_path p1 p2)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path (Product_FSM.product A B) (q1, q2) (zip_path p1 p2)

goal (1 subgoal):
 1. \<And>x. x \<in> LS A q1 \<inter> LS B q2 \<Longrightarrow> x \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
p_io (zip_path p1 p2) = io
path (Product_FSM.product A B) (q1, q2) (zip_path p1 p2)
[PROOF STEP]
show "io \<in> LS (product A B) (q1, q2)"
[PROOF STATE]
proof (prove)
using this:
p_io (zip_path p1 p2) = io
path (Product_FSM.product A B) (q1, q2) (zip_path p1 p2)

goal (1 subgoal):
 1. io \<in> LS (Product_FSM.product A B) (q1, q2)
[PROOF STEP]
unfolding LS.simps
[PROOF STATE]
proof (prove)
using this:
p_io (zip_path p1 p2) = io
path (Product_FSM.product A B) (q1, q2) (zip_path p1 p2)

goal (1 subgoal):
 1. io \<in> {p_io p |p. path (Product_FSM.product A B) (q1, q2) p}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
io \<in> LS (Product_FSM.product A B) (q1, q2)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
LS A q1 \<inter> LS B q2 \<subseteq> LS (Product_FSM.product A B) (q1, q2)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma powrat_inverse:
      "(inverse y) pow\<^sub>\<rat> r = inverse(y pow\<^sub>\<rat> r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
[PROOF STEP]
proof (cases "r=0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. r = 0 \<Longrightarrow> inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
 2. r \<noteq> 0 \<Longrightarrow> inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
r = 0

goal (2 subgoals):
 1. r = 0 \<Longrightarrow> inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
 2. r \<noteq> 0 \<Longrightarrow> inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
r = 0

goal (1 subgoal):
 1. inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)

goal (1 subgoal):
 1. r \<noteq> 0 \<Longrightarrow> inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. r \<noteq> 0 \<Longrightarrow> inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
r \<noteq> 0

goal (1 subgoal):
 1. r \<noteq> 0 \<Longrightarrow> inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
r \<noteq> 0

goal (1 subgoal):
 1. inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)
[PROOF STEP]
by (simp add: inverse_eq_divide powrat_divide)
[PROOF STATE]
proof (state)
this:
inverse y pow\<^sub>\<rat> r = inverse (y pow\<^sub>\<rat> r)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma unique_append: "unique l' \<Longrightarrow> unique l \<Longrightarrow>
    (\<forall>(x,y) \<in> set l. \<forall>(x',y') \<in> set l'. x' \<noteq> x) \<Longrightarrow> unique (l @ l')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>unique l'; unique l; \<forall>(x, y)\<in>set l. \<forall>(x', y')\<in>set l'. x' \<noteq> x\<rbrakk> \<Longrightarrow> unique (l @ l')
[PROOF STEP]
by (induct l) (auto dest: fst_in_set_lemma)


[STATEMENT]
lemma Ninv[simp]: "INum (Ninv x) = (1 :: 'a::field) / INum x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. INum (Ninv x) = (1::'a) / INum x
[PROOF STEP]
by (simp add: Ninv_def INum_def split_def)


[STATEMENT]
lemma smult_diff: fixes a :: "'a::comm_ring_1" shows "a *\<^sub>S (A - B) = a *\<^sub>S A - a *\<^sub>S B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a *\<^sub>S (A - B) = a *\<^sub>S A - a *\<^sub>S B
[PROOF STEP]
by transfer (simp add: field_simps)


[STATEMENT]
lemma n_less_equal_power_2:
  "n < 2 ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < 2 ^ n
[PROOF STEP]
by (fact less_exp)


[STATEMENT]
lemma borel_measurable_if:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  assumes "S \<in> sets lebesgue"
  shows "(\<lambda>x. if x \<in> S then f x else 0) \<in> borel_measurable lebesgue \<longleftrightarrow> f \<in> borel_measurable (lebesgue_on S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. if x \<in> S then f x else (0::'b)) \<in> borel_measurable lebesgue) = (f \<in> borel_measurable (lebesgue_on S))
[PROOF STEP]
using assms borel_measurable_if_D borel_measurable_if_I
[PROOF STATE]
proof (prove)
using this:
S \<in> sets lebesgue
(\<lambda>x. if x \<in> ?S then ?f x else (0::?'b)) \<in> borel_measurable lebesgue \<Longrightarrow> ?f \<in> borel_measurable (lebesgue_on ?S)
\<lbrakk>?f \<in> borel_measurable (lebesgue_on ?S); ?S \<in> sets lebesgue\<rbrakk> \<Longrightarrow> (\<lambda>x. if x \<in> ?S then ?f x else (0::?'b)) \<in> borel_measurable lebesgue

goal (1 subgoal):
 1. ((\<lambda>x. if x \<in> S then f x else (0::'b)) \<in> borel_measurable lebesgue) = (f \<in> borel_measurable (lebesgue_on S))
[PROOF STEP]
by blast


[STATEMENT]
lemma interval_integral_Ioc:
  "a \<le> b \<Longrightarrow> (LBINT x=a..b. f x) = (LBINT x : {a<..b}. f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<le> b \<Longrightarrow> interval_lebesgue_integral lborel (ereal a) (ereal b) f = set_lebesgue_integral lborel {a<..b} f
[PROOF STEP]
by (auto intro!: set_integral_discrete_difference[where X="{a, b}"]
           simp add: interval_lebesgue_integral_def einterval_iff)


[STATEMENT]
lemma ennsqrt_simps [simp]:
  "ennsqrt 0 = 0"
  "ennsqrt 1 = 1"
  "ennsqrt \<infinity> = \<infinity>"
  "ennsqrt top = top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ennsqrt 0 = 0 &&& ennsqrt 1 = 1) &&& ennsqrt \<infinity> = \<infinity> &&& ennsqrt top = top
[PROOF STEP]
unfolding ennsqrt_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ennexp (eln 0 / 2) = 0 &&& ennexp (eln 1 / 2) = 1) &&& ennexp (eln \<infinity> / 2) = \<infinity> &&& ennexp (eln top / 2) = top
[PROOF STEP]
by auto


[STATEMENT]
lemma d_OUT_cmult: "d_OUT (\<lambda>e. c * f e) x = c * d_OUT f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d_OUT (\<lambda>e. c * f e) x = c * d_OUT f x
[PROOF STEP]
by(simp add: d_OUT_def nn_integral_cmult)


[STATEMENT]
lemma (in state_space)
  shows "\<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace>
      WHILE \<acute>M \<noteq> a
      DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD
      \<lbrace>\<acute>S = a * b\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
let "\<Gamma>\<turnstile> _ ?while _" = ?thesis
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
let "\<lbrace>\<acute>?inv\<rbrace>" = "\<lbrace>\<acute>S = \<acute>M * b\<rbrace>"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
have "\<lbrace>\<acute>M = 0 & \<acute>S = 0\<rbrace> \<subseteq> \<lbrace>\<acute>?inv\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> \<subseteq> \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> \<subseteq> \<lbrace>\<acute>S = \<acute>M * b\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> \<subseteq> \<lbrace>\<acute>S = \<acute>M * b\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
have "\<Gamma>\<turnstile> \<dots> ?while \<lbrace>\<acute>?inv \<and> \<not> (\<acute>M \<noteq> a)\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = \<acute>M * b \<and> \<not> \<acute>M \<noteq> a\<rbrace>
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
let ?c = "\<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
have "\<lbrace>\<acute>?inv \<and> \<acute>M \<noteq> a\<rbrace> \<subseteq> \<lbrace>\<acute>S + b = (\<acute>M + 1) * b\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<subseteq> \<lbrace>\<acute>S + b = (\<acute>M + 1) * b\<rbrace>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<subseteq> \<lbrace>\<acute>S + b = (\<acute>M + 1) * b\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<subseteq> \<lbrace>\<acute>S + b = (\<acute>M + 1) * b\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
have "\<Gamma>\<turnstile> \<dots> ?c \<lbrace>\<acute>?inv\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>S + b = (\<acute>M + 1) * b\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
by vcg
[PROOF STATE]
proof (state)
this:
\<Gamma>\<turnstile> \<lbrace>\<acute>S + b = (\<acute>M + 1) * b\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
show "\<Gamma>\<turnstile> \<lbrace>\<acute>?inv \<and> \<acute>M \<noteq> a\<rbrace> ?c \<lbrace>\<acute>?inv\<rbrace>"
[PROOF STATE]
proof (prove)
using this:
\<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b \<and> \<acute>M \<noteq> a\<rbrace> \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 \<lbrace>\<acute>S = \<acute>M * b\<rbrace>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = \<acute>M * b \<and> \<not> \<acute>M \<noteq> a\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Gamma>\<turnstile> \<lbrace>\<acute>S = \<acute>M * b\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = \<acute>M * b \<and> \<not> \<acute>M \<noteq> a\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
have "\<lbrace>\<acute>?inv \<and> \<not> (\<acute>M \<noteq> a)\<rbrace> \<subseteq> \<lbrace>\<acute>S = a * b\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrace>\<acute>S = \<acute>M * b \<and> \<not> \<acute>M \<noteq> a\<rbrace> \<subseteq> \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrace>\<acute>S = \<acute>M * b \<and> \<not> \<acute>M \<noteq> a\<rbrace> \<subseteq> \<lbrace>\<acute>S = a * b\<rbrace>

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
{} \<subseteq> ?A \<Longrightarrow> \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>,?A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{} \<subseteq> ?A \<Longrightarrow> \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>,?A

goal (1 subgoal):
 1. \<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<Gamma>\<turnstile> \<lbrace>\<acute>M = 0 \<and> \<acute>S = 0\<rbrace> WHILE \<acute>M \<noteq> a DO \<acute>S :== \<acute>S + b;; \<acute>M :== \<acute>M + 1 OD \<lbrace>\<acute>S = a * b\<rbrace>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma tf_2: assumes dx: "dim_vec x = 2"
  and be: "x $ 0 = True \<and> x $ 1 = False"
  shows "ceros_of_boolean_input x = {1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ceros_of_boolean_input x = {1}
[PROOF STEP]
using dx be
[PROOF STATE]
proof (prove)
using this:
dim_vec x = 2
x $ 0 = True \<and> x $ 1 = False

goal (1 subgoal):
 1. ceros_of_boolean_input x = {1}
[PROOF STEP]
unfolding ceros_of_boolean_input_def
[PROOF STATE]
proof (prove)
using this:
dim_vec x = 2
x $ 0 = True \<and> x $ 1 = False

goal (1 subgoal):
 1. {xa. xa < dim_vec x \<and> x $ xa = False} = {1}
[PROOF STEP]
using less_2_cases
[PROOF STATE]
proof (prove)
using this:
dim_vec x = 2
x $ 0 = True \<and> x $ 1 = False
?n < 2 \<Longrightarrow> ?n = 0 \<or> ?n = Suc 0

goal (1 subgoal):
 1. {xa. xa < dim_vec x \<and> x $ xa = False} = {1}
[PROOF STEP]
by auto


[STATEMENT]
lemma NSLIMSEQ_le: "f \<longlonglongrightarrow>\<^sub>N\<^sub>S l \<Longrightarrow> g \<longlonglongrightarrow>\<^sub>N\<^sub>S m \<Longrightarrow> \<exists>N. \<forall>n \<ge> N. f n \<le> g n \<Longrightarrow> l \<le> m"
  for l m :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<longlonglongrightarrow>\<^sub>N\<^sub>S l; g \<longlonglongrightarrow>\<^sub>N\<^sub>S m; \<exists>N. \<forall>n\<ge>N. f n \<le> g n\<rbrakk> \<Longrightarrow> l \<le> m
[PROOF STEP]
unfolding NSLIMSEQ_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>N\<in>HNatInfinite. (*f* f) N \<approx> hypreal_of_real l; \<forall>N\<in>HNatInfinite. (*f* g) N \<approx> hypreal_of_real m; \<exists>N. \<forall>n\<ge>N. f n \<le> g n\<rbrakk> \<Longrightarrow> l \<le> m
[PROOF STEP]
by (metis HNatInfinite_whn bex_Infinitesimal_iff2 hypnat_of_nat_le_whn hypreal_of_real_le_add_Infininitesimal_cancel2 starfun_le_mono)


[STATEMENT]
lemma pmf_of_set_Pow_conv_bernoulli:
  assumes "finite (A :: 'a set)"
  shows "map_pmf (\<lambda>b. {x\<in>A. b x}) (Pi_pmf A P (\<lambda>_. bernoulli_pmf (1/2))) = pmf_of_set (Pow A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)
[PROOF STEP]
have "Pi_pmf A P (\<lambda>_. bernoulli_pmf (1/2)) = pmf_of_set (PiE_dflt A P (\<lambda>x. UNIV))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2)) = pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2)) = pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))
[PROOF STEP]
by (simp add: bernoulli_pmf_half_conv_pmf_of_set Pi_pmf_of_set)
[PROOF STATE]
proof (state)
this:
Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2)) = pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))

goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2)) = pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))

goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)
[PROOF STEP]
have "map_pmf (\<lambda>b. {x\<in>A. b x}) \<dots> = pmf_of_set (Pow A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))) = pmf_of_set (Pow A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))) = pmf_of_set (Pow A)
[PROOF STEP]
have "bij_betw (\<lambda>b. {x \<in> A. b x}) (PiE_dflt A P (\<lambda>_. UNIV)) (Pow A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.PiE_dflt A P (\<lambda>_. UNIV)) (Pow A)
[PROOF STEP]
by (rule bij_betwI[of _ _ _ "\<lambda>B b. if b \<in> A then b \<in> B else P"]) (auto simp add: PiE_dflt_def)
[PROOF STATE]
proof (state)
this:
bij_betw (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.PiE_dflt A P (\<lambda>_. UNIV)) (Pow A)

goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))) = pmf_of_set (Pow A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bij_betw (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.PiE_dflt A P (\<lambda>_. UNIV)) (Pow A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
bij_betw (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.PiE_dflt A P (\<lambda>_. UNIV)) (Pow A)

goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))) = pmf_of_set (Pow A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
bij_betw (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.PiE_dflt A P (\<lambda>_. UNIV)) (Pow A)
finite A

goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))) = pmf_of_set (Pow A)
[PROOF STEP]
by (intro map_pmf_of_set_bij_betw) auto
[PROOF STATE]
proof (state)
this:
map_pmf (\<lambda>b. {x \<in> A. b x}) (pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))) = pmf_of_set (Pow A)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
map_pmf (\<lambda>b. {x \<in> A. b x}) (pmf_of_set (Pi_pmf.PiE_dflt A P (\<lambda>x. UNIV))) = pmf_of_set (Pow A)

goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)

goal (1 subgoal):
 1. map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
map_pmf (\<lambda>b. {x \<in> A. b x}) (Pi_pmf.Pi_pmf A P (\<lambda>_. bernoulli_pmf (1 / 2))) = pmf_of_set (Pow A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma linepath_cnj: "cnj (linepath a b x) = linepath (cnj a) (cnj b) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cnj (linepath a b x) = linepath (cnj a) (cnj b) x
[PROOF STEP]
by (simp add: linepath_def)


[STATEMENT]
lemma fps_conv_radius_tan:
  fixes c :: complex
  assumes "c \<noteq> 0"
  shows   "fps_conv_radius (fps_tan c) \<ge> pi / (2 * norm c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (pi / (2 * cmod c)) \<le> fps_conv_radius (fps_tan c)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ereal (pi / (2 * cmod c)) \<le> fps_conv_radius (fps_tan c)
[PROOF STEP]
have "fps_conv_radius (fps_tan c) \<ge>
          Min {pi / (2 * norm c), fps_conv_radius (fps_sin c), fps_conv_radius (fps_cos c)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min {ereal (pi / (2 * cmod c)), fps_conv_radius (fps_sin c), fps_conv_radius (fps_cos c)} \<le> fps_conv_radius (fps_tan c)
[PROOF STEP]
unfolding fps_tan_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min {ereal (pi / (2 * cmod c)), fps_conv_radius (fps_sin c), fps_conv_radius (fps_cos c)} \<le> fps_conv_radius (fps_sin c / fps_cos c)
[PROOF STEP]
proof (rule fps_conv_radius_divide)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. subdegree (fps_cos c) \<le> subdegree (fps_sin c)
 2. 0 < fps_conv_radius (fps_sin c)
 3. 0 < fps_conv_radius (fps_cos c)
 4. 0 < ereal (pi / (2 * cmod c))
 5. \<And>z. \<lbrakk>z \<in> eball 0 (ereal (pi / (2 * cmod c))); z \<noteq> 0\<rbrakk> \<Longrightarrow> eval_fps (fps_cos c) z \<noteq> 0
[PROOF STEP]
fix z :: complex
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. subdegree (fps_cos c) \<le> subdegree (fps_sin c)
 2. 0 < fps_conv_radius (fps_sin c)
 3. 0 < fps_conv_radius (fps_cos c)
 4. 0 < ereal (pi / (2 * cmod c))
 5. \<And>z. \<lbrakk>z \<in> eball 0 (ereal (pi / (2 * cmod c))); z \<noteq> 0\<rbrakk> \<Longrightarrow> eval_fps (fps_cos c) z \<noteq> 0
[PROOF STEP]
assume "z \<in> eball 0 (pi / (2 * norm c))"
[PROOF STATE]
proof (state)
this:
z \<in> eball 0 (ereal (pi / (2 * cmod c)))

goal (5 subgoals):
 1. subdegree (fps_cos c) \<le> subdegree (fps_sin c)
 2. 0 < fps_conv_radius (fps_sin c)
 3. 0 < fps_conv_radius (fps_cos c)
 4. 0 < ereal (pi / (2 * cmod c))
 5. \<And>z. \<lbrakk>z \<in> eball 0 (ereal (pi / (2 * cmod c))); z \<noteq> 0\<rbrakk> \<Longrightarrow> eval_fps (fps_cos c) z \<noteq> 0
[PROOF STEP]
with cos_eq_zero_imp_norm_ge[of "c*z"] assms
[PROOF STATE]
proof (chain)
picking this:
cos (c * z) = 0 \<Longrightarrow> pi / 2 \<le> cmod (c * z)
c \<noteq> 0
z \<in> eball 0 (ereal (pi / (2 * cmod c)))
[PROOF STEP]
show "eval_fps (fps_cos  c) z \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
cos (c * z) = 0 \<Longrightarrow> pi / 2 \<le> cmod (c * z)
c \<noteq> 0
z \<in> eball 0 (ereal (pi / (2 * cmod c)))

goal (1 subgoal):
 1. eval_fps (fps_cos c) z \<noteq> 0
[PROOF STEP]
by (auto simp: norm_mult field_simps)
[PROOF STATE]
proof (state)
this:
eval_fps (fps_cos c) z \<noteq> 0

goal (4 subgoals):
 1. subdegree (fps_cos c) \<le> subdegree (fps_sin c)
 2. 0 < fps_conv_radius (fps_sin c)
 3. 0 < fps_conv_radius (fps_cos c)
 4. 0 < ereal (pi / (2 * cmod c))
[PROOF STEP]
qed (insert assms, auto)
[PROOF STATE]
proof (state)
this:
Min {ereal (pi / (2 * cmod c)), fps_conv_radius (fps_sin c), fps_conv_radius (fps_cos c)} \<le> fps_conv_radius (fps_tan c)

goal (1 subgoal):
 1. ereal (pi / (2 * cmod c)) \<le> fps_conv_radius (fps_tan c)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Min {ereal (pi / (2 * cmod c)), fps_conv_radius (fps_sin c), fps_conv_radius (fps_cos c)} \<le> fps_conv_radius (fps_tan c)

goal (1 subgoal):
 1. ereal (pi / (2 * cmod c)) \<le> fps_conv_radius (fps_tan c)
[PROOF STEP]
by (simp add: min_def)
[PROOF STATE]
proof (state)
this:
ereal (pi / (2 * cmod c)) \<le> fps_conv_radius (fps_tan c)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_take_disj_set_drop_if_distinct:
  "distinct vs \<Longrightarrow> i \<le> j \<Longrightarrow> set (take i vs) \<inter> set (drop j vs) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distinct vs; i \<le> j\<rbrakk> \<Longrightarrow> set (take i vs) \<inter> set (drop j vs) = {}
[PROOF STEP]
by (auto simp: in_set_conv_nth distinct_conv_nth)


[STATEMENT]
lemma ring_pow_comp_demorgans':
  assumes "A \<subseteq> carrier (R\<^bsup>n\<^esup>)"
  assumes "B \<subseteq> carrier (R\<^bsup>n\<^esup>)"
  shows "ring_pow_comp R n (A \<inter> B) = (ring_pow_comp R n A) \<union> (ring_pow_comp R n B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ring_pow_comp R n (A \<inter> B) = ring_pow_comp R n A \<union> ring_pow_comp R n B
[PROOF STEP]
by (simp add: ring_pow_comp_def Diff_Int)


[STATEMENT]
lemma list_all_stake_least:
  "list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs)" (is "?G") if "\<exists> n. P (xs !! n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs) \<Longrightarrow> False
[PROOF STEP]
let ?n = "LEAST n. P (xs !! n)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs) \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?G"
[PROOF STATE]
proof (state)
this:
\<not> list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs)

goal (1 subgoal):
 1. \<not> list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs)
[PROOF STEP]
have "\<exists> x \<in> set (stake ?n xs). P x"
[PROOF STATE]
proof (prove)
using this:
\<not> list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs)

goal (1 subgoal):
 1. \<exists>x\<in>set (stake (LEAST n. P (xs !! n)) xs). P x
[PROOF STEP]
unfolding list_all_iff
[PROOF STATE]
proof (prove)
using this:
\<not> Ball (set (stake (LEAST n. P (xs !! n)) xs)) (Not \<circ> P)

goal (1 subgoal):
 1. \<exists>x\<in>set (stake (LEAST n. P (xs !! n)) xs). P x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>x\<in>set (stake (LEAST n. P (xs !! n)) xs). P x

goal (1 subgoal):
 1. \<not> list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs) \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>x\<in>set (stake (LEAST n. P (xs !! n)) xs). P x
[PROOF STEP]
obtain n' where "n' < ?n" "P (xs !! n')"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<in>set (stake (LEAST n. P (xs !! n)) xs). P x

goal (1 subgoal):
 1. (\<And>n'. \<lbrakk>n' < (LEAST n. P (xs !! n)); P (xs !! n')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using set_stake_snth
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<in>set (stake (LEAST n. P (xs !! n)) xs). P x
(?x \<in> set (stake ?n ?xs)) = (\<exists>i<?n. ?xs !! i = ?x)

goal (1 subgoal):
 1. (\<And>n'. \<lbrakk>n' < (LEAST n. P (xs !! n)); P (xs !! n')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
n' < (LEAST n. P (xs !! n))
P (xs !! n')

goal (1 subgoal):
 1. \<not> list_all (Not \<circ> P) (stake (LEAST n. P (xs !! n)) xs) \<Longrightarrow> False
[PROOF STEP]
with Least_le[of "\<lambda> n. P (xs !! n)" n']
[PROOF STATE]
proof (chain)
picking this:
P (xs !! n') \<Longrightarrow> (LEAST x. P (xs !! x)) \<le> n'
n' < (LEAST n. P (xs !! n))
P (xs !! n')
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
P (xs !! n') \<Longrightarrow> (LEAST x. P (xs !! x)) \<le> n'
n' < (LEAST n. P (xs !! n))
P (xs !! n')

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem substn_subst_0: "substn t s 0 = t[s/0]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. substn t s 0 = t[s/0]
[PROOF STEP]
by simp


[STATEMENT]
lemma cos_gt_zero: "0 < x \<Longrightarrow> x < pi/2 \<Longrightarrow> 0 < cos x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < x; x < pi / 2\<rbrakk> \<Longrightarrow> 0 < cos x
[PROOF STEP]
by (simp add: cos_sin_eq sin_gt_zero2)


[STATEMENT]
lemma (in Corps) value_of_one:"valuation K v \<Longrightarrow> v (1\<^sub>r) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valuation K v \<Longrightarrow> v 1\<^sub>r = 0
[PROOF STEP]
apply (cut_tac field_is_ring, frule Ring.ring_one[of "K"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; Ring K; 1\<^sub>r \<in> carrier K\<rbrakk> \<Longrightarrow> v 1\<^sub>r = 0
[PROOF STEP]
apply (frule val_t2p[of v "1\<^sub>r" "1\<^sub>r"], assumption+,
       simp add:Ring.ring_l_one, frule val_field_1_neq_0[of v],
       frule val_nonzero_z[of v "1\<^sub>r"], assumption+,
       erule exE, simp add:a_zpz)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in prob_space) normal_density_affine:
  assumes X: "distributed M lborel X (normal_density \<mu> \<sigma>)"
  assumes [simp, arith]: "0 < \<sigma>" "\<alpha> \<noteq> 0"
  shows "distributed M lborel (\<lambda>x. \<beta> + \<alpha> * X x) (normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distributed M lborel (\<lambda>x. \<beta> + \<alpha> * X x) (\<lambda>x. ennreal (normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>) x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. distributed M lborel (\<lambda>x. \<beta> + \<alpha> * X x) (\<lambda>x. ennreal (normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>) x))
[PROOF STEP]
have eq: "\<And>x. \<bar>\<alpha>\<bar> * normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>) (x * \<alpha> + \<beta>) =
    normal_density \<mu> \<sigma> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<bar>\<alpha>\<bar> * normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>) (x * \<alpha> + \<beta>) = normal_density \<mu> \<sigma> x
[PROOF STEP]
by (simp add: normal_density_def real_sqrt_mult field_simps)
       (simp add: power2_eq_square field_simps)
[PROOF STATE]
proof (state)
this:
\<bar>\<alpha>\<bar> * normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>) (?x12 * \<alpha> + \<beta>) = normal_density \<mu> \<sigma> ?x12

goal (1 subgoal):
 1. distributed M lborel (\<lambda>x. \<beta> + \<alpha> * X x) (\<lambda>x. ennreal (normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>) x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distributed M lborel (\<lambda>x. \<beta> + \<alpha> * X x) (\<lambda>x. ennreal (normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>) x))
[PROOF STEP]
by (rule distributed_affineI[OF _ \<open>\<alpha> \<noteq> 0\<close>, where t=\<beta>])
       (simp_all add: eq X ennreal_mult'[symmetric])
[PROOF STATE]
proof (state)
this:
distributed M lborel (\<lambda>x. \<beta> + \<alpha> * X x) (\<lambda>x. ennreal (normal_density (\<beta> + \<alpha> * \<mu>) (\<bar>\<alpha>\<bar> * \<sigma>) x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Sup_range_comp: "(\<Squnion> range p) o S = \<Squnion> (range (\<lambda> w . ((p w) o S)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion>range p \<circ> S = (SUP w. p w \<circ> S)
[PROOF STEP]
by (simp add: fun_eq_iff image_comp)


[STATEMENT]
lemma to_R1_diff:
"to_R1` (A - B) = to_R1` A - to_R1` B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>a. [a]) ` (A - B) = (\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>a. [a]) ` (A - B) \<subseteq> (\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B
 2. (\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B \<subseteq> (\<lambda>a. [a]) ` (A - B)
[PROOF STEP]
show "(\<lambda>a. [a]) ` (A - B) \<subseteq> (\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>a. [a]) ` (A - B) \<subseteq> (\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>a. [a]) ` (A - B) \<subseteq> (\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B

goal (1 subgoal):
 1. (\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B \<subseteq> (\<lambda>a. [a]) ` (A - B)
[PROOF STEP]
show "(\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B \<subseteq> (\<lambda>a. [a]) ` (A - B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B \<subseteq> (\<lambda>a. [a]) ` (A - B)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>a. [a]) ` A - (\<lambda>a. [a]) ` B \<subseteq> (\<lambda>a. [a]) ` (A - B)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma is_arg_min_size: fixes m :: "'a \<Rightarrow> 'b::linorder"
shows "is_arg_min m P x \<Longrightarrow> m x = m (arg_min m P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_arg_min m P x \<Longrightarrow> m x = m (arg_min m P)
[PROOF STEP]
by (metis arg_min_equality is_arg_min_linorder)


[STATEMENT]
lemma "incX r = setX r (Suc (getX r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. incX r = setX r (Suc (getX r))
[PROOF STEP]
by (simp add: getX_def setX_def incX_def)


[STATEMENT]
lemma maddux_3_3 [simp]:
  "-(x \<squnion> y) \<squnion> -(x \<squnion> -y) = -x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (x \<squnion> y) \<squnion> - (x \<squnion> - y) = - x
[PROOF STEP]
by (simp add: sup_commute sup_inf_distrib1)