[STATEMENT]
lemma filterlim_divide_at_infinity:
  fixes f g :: "'a \<Rightarrow> 'a :: real_normed_field"
  assumes "filterlim f (nhds c) F" "filterlim g (at 0) F" "c \<noteq> 0"
  shows   "filterlim (\<lambda>x. f x / g x) at_infinity F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x F. f x / g x :> at_infinity
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. LIM x F. f x / g x :> at_infinity
[PROOF STEP]
have "filterlim (\<lambda>x. f x * inverse (g x)) at_infinity F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x F. f x * inverse (g x) :> at_infinity
[PROOF STEP]
by (intro tendsto_mult_filterlim_at_infinity[OF assms(1,3)]
          filterlim_compose [OF filterlim_inverse_at_infinity assms(2)])
[PROOF STATE]
proof (state)
this:
LIM x F. f x * inverse (g x) :> at_infinity

goal (1 subgoal):
 1. LIM x F. f x / g x :> at_infinity
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
LIM x F. f x * inverse (g x) :> at_infinity

goal (1 subgoal):
 1. LIM x F. f x / g x :> at_infinity
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
LIM x F. f x / g x :> at_infinity

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nonempty_set_sub:"{x. x \<in> A \<and> P x } \<noteq> {} \<Longrightarrow>
                                    {x. x \<in> A \<and> P x} \<subseteq> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> A. P x} \<noteq> {} \<Longrightarrow> {x \<in> A. P x} \<subseteq> A
[PROOF STEP]
by (rule subsetI, simp)


[STATEMENT]
lemma backflows_inter: "backflows (A \<inter> B) = (backflows A) \<inter> (backflows B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. backflows (A \<inter> B) = backflows A \<inter> backflows B
[PROOF STEP]
by(auto simp add: backflows_def)


[STATEMENT]
lemma cmod_plus_Re_le_0_iff: "cmod z + Re z \<le> 0 \<longleftrightarrow> Re z = - cmod z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cmod z + Re z \<le> 0) = (Re z = - cmod z)
[PROOF STEP]
using abs_Re_le_cmod[of z]
[PROOF STATE]
proof (prove)
using this:
\<bar>Re z\<bar> \<le> cmod z

goal (1 subgoal):
 1. (cmod z + Re z \<le> 0) = (Re z = - cmod z)
[PROOF STEP]
by auto


[STATEMENT]
lemma divide_ennreal: "0 \<le> r \<Longrightarrow> 0 < q \<Longrightarrow> ennreal r / ennreal q = ennreal (r / q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> r; 0 < q\<rbrakk> \<Longrightarrow> ennreal r / ennreal q = ennreal (r / q)
[PROOF STEP]
by (simp add: divide_ennreal_def inverse_ennreal ennreal_mult[symmetric] inverse_eq_divide)


[STATEMENT]
lemma rbtreeify_f_code [code]:
  "rbtreeify_f n kvs =
   (if n = 0 then (Empty, kvs)
    else if n = 1 then
      case kvs of (k, v) # kvs' \<Rightarrow>
        (Branch R Empty k v Empty, kvs')
    else let (n', r) = Euclidean_Division.divmod_nat n 2 in
      if r = 0 then
        case rbtreeify_f n' kvs of (t1, (k, v) # kvs') \<Rightarrow>
          apfst (Branch B t1 k v) (rbtreeify_g n' kvs')
      else case rbtreeify_f n' kvs of (t1, (k, v) # kvs') \<Rightarrow>
          apfst (Branch B t1 k v) (rbtreeify_f n' kvs'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rbtreeify_f n kvs = (if n = 0 then (Empty, kvs) else if n = 1 then case kvs of (k, v) # kvs' \<Rightarrow> (Branch R Empty k v Empty, kvs') else let (n', r) = Euclidean_Division.divmod_nat n 2 in if r = 0 then case rbtreeify_f n' kvs of (t1, (k, v) # kvs') \<Rightarrow> apfst (Branch B t1 k v) (rbtreeify_g n' kvs') else case rbtreeify_f n' kvs of (t1, (k, v) # kvs') \<Rightarrow> apfst (Branch B t1 k v) (rbtreeify_f n' kvs'))
[PROOF STEP]
by (subst rbtreeify_f.simps) (simp only: Let_def Euclidean_Division.divmod_nat_def prod.case)


[STATEMENT]
lemma vec_to_iarray_minus[code_unfold]: "vec_to_iarray (a - b)
  = (vec_to_iarray a) - (vec_to_iarray b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_to_iarray (a - b) = vec_to_iarray a - vec_to_iarray b
[PROOF STEP]
unfolding vec_to_iarray_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray.of_fun (\<lambda>i. (a - b) $ mod_type_class.from_nat i) CARD('b) = IArray.of_fun (\<lambda>i. a $ mod_type_class.from_nat i) CARD('b) - IArray.of_fun (\<lambda>i. b $ mod_type_class.from_nat i) CARD('b)
[PROOF STEP]
unfolding minus_iarray_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IArray.of_fun (\<lambda>i. (a - b) $ mod_type_class.from_nat i) CARD('b) = IArray.of_fun (\<lambda>n. IArray.of_fun (\<lambda>i. a $ mod_type_class.from_nat i) CARD('b) !! n - IArray.of_fun (\<lambda>i. b $ mod_type_class.from_nat i) CARD('b) !! n) (IArray.length (IArray.of_fun (\<lambda>i. a $ mod_type_class.from_nat i) CARD('b)))
[PROOF STEP]
by auto


[STATEMENT]
lemma inner_prod_is_linear [simp]:
  fixes u::"complex vec" and v::"nat \<Rightarrow> complex vec" and l::"nat \<Rightarrow> complex"
  assumes "\<forall>i\<in>{0, 1}. dim_vec u = dim_vec (v i)"
  shows "\<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
have f1:"dim_vec (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) = dim_vec u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) = dim_vec u
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>{0, 1}. dim_vec u = dim_vec (v i)

goal (1 subgoal):
 1. dim_vec (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) = dim_vec u
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_vec (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) = dim_vec u

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
dim_vec (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) = dim_vec u
[PROOF STEP]
have "\<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<in>{0 ..< dim_vec u}. cnj (u $ i) * ((l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) $ i))"
[PROOF STATE]
proof (prove)
using this:
dim_vec (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) = dim_vec u

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) $ i)
[PROOF STEP]
by (simp add: inner_prod_def)
[PROOF STATE]
proof (state)
this:
\<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) $ i)

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) $ i)

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
have "\<dots> = (\<Sum>i\<in>{0 ..< dim_vec u}. cnj (u $ i) * (l 0 * v 0 $ i + l 1 * v 1 $ i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) $ i) = (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 * v 0 $ i + l 1 * v 1 $ i))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>{0, 1}. dim_vec u = dim_vec (v i)

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) $ i) = (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 * v 0 $ i + l 1 * v 1 $ i))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) $ i) = (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 * v 0 $ i + l 1 * v 1 $ i))

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1) $ i) = (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 * v 0 $ i + l 1 * v 1 $ i))

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
have "\<dots> = l 0 * (\<Sum>i\<in>{0 ..< dim_vec u}. cnj(u $ i) * (v 0 $ i)) + l 1 * (\<Sum>i\<in>{0 ..< dim_vec u}. cnj(u $ i) * (v 1 $ i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 * v 0 $ i + l 1 * v 1 $ i)) = l 0 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 0 $ i) + l 1 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 1 $ i)
[PROOF STEP]
by (auto simp: algebra_simps)
      (simp add: sum.distrib sum_distrib_left)
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 * v 0 $ i + l 1 * v 1 $ i)) = l 0 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 0 $ i) + l 1 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 1 $ i)

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec u. cnj (u $ i) * (l 0 * v 0 $ i + l 1 * v 1 $ i)) = l 0 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 0 $ i) + l 1 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 1 $ i)

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
have "\<dots> = l 0 * \<langle>u|v 0\<rangle> + l 1 * \<langle>u|v 1\<rangle>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. l 0 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 0 $ i) + l 1 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 1 $ i) = l 0 * \<langle>u|v 0\<rangle> + l 1 * \<langle>u|v 1\<rangle>
[PROOF STEP]
using assms inner_prod_def
[PROOF STATE]
proof (prove)
using this:
\<forall>i\<in>{0, 1}. dim_vec u = dim_vec (v i)
\<langle>?u|?v\<rangle> \<equiv> \<Sum>i = 0..<dim_vec ?v. cnj (?u $ i) * ?v $ i

goal (1 subgoal):
 1. l 0 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 0 $ i) + l 1 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 1 $ i) = l 0 * \<langle>u|v 0\<rangle> + l 1 * \<langle>u|v 1\<rangle>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
l 0 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 0 $ i) + l 1 * (\<Sum>i = 0..<dim_vec u. cnj (u $ i) * v 1 $ i) = l 0 * \<langle>u|v 0\<rangle> + l 1 * \<langle>u|v 1\<rangle>

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = l 0 * \<langle>u|v 0\<rangle> + l 1 * \<langle>u|v 1\<rangle>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = l 0 * \<langle>u|v 0\<rangle> + l 1 * \<langle>u|v 1\<rangle>

goal (1 subgoal):
 1. \<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<langle>u|l 0 \<cdot>\<^sub>v v 0 + l 1 \<cdot>\<^sub>v v 1\<rangle> = (\<Sum>i\<le>1. l i * \<langle>u|v i\<rangle>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma less_sets_Suc_Max:
  assumes "finite A"
  shows "less_sets A {Suc (Max A)..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<lless> {Suc (Max A)..}
[PROOF STEP]
proof (cases "A = {}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A = {} \<Longrightarrow> A \<lless> {Suc (Max A)..}
 2. A \<noteq> {} \<Longrightarrow> A \<lless> {Suc (Max A)..}
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
A \<noteq> {}

goal (2 subgoals):
 1. A = {} \<Longrightarrow> A \<lless> {Suc (Max A)..}
 2. A \<noteq> {} \<Longrightarrow> A \<lless> {Suc (Max A)..}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A \<noteq> {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A \<noteq> {}

goal (1 subgoal):
 1. A \<lless> {Suc (Max A)..}
[PROOF STEP]
by (simp add: assms less_Suc_eq_le)
[PROOF STATE]
proof (state)
this:
A \<lless> {Suc (Max A)..}

goal (1 subgoal):
 1. A = {} \<Longrightarrow> A \<lless> {Suc (Max A)..}
[PROOF STEP]
qed auto


[STATEMENT]
lemma vector_scaleR_commute: "A *v c *\<^sub>R x = c *\<^sub>R (A *v x)" for x :: "('a::real_normed_algebra_1)^'n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A *v c *\<^sub>R x = c *\<^sub>R (A *v x)
[PROOF STEP]
unfolding scaleR_vec_def matrix_vector_mult_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<chi>i. \<Sum>j\<in>UNIV. A $ i $ j * (\<chi>i. c *\<^sub>R x $ i) $ j) = (\<chi>i. c *\<^sub>R (\<chi>i. \<Sum>j\<in>UNIV. A $ i $ j * x $ j) $ i)
[PROOF STEP]
by(auto simp: vec_eq_iff scaleR_right.sum)


[STATEMENT]
lemma sums_If_finite: "finite {r. P r} \<Longrightarrow> (\<lambda>r. if P r then f r else 0) sums (\<Sum>r | P r. f r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {r. P r} \<Longrightarrow> (\<lambda>r. if P r then f r else (0::'a)) sums (\<Sum>r | P r. f r)
[PROOF STEP]
using sums_If_finite_set[of "{r. P r}"]
[PROOF STATE]
proof (prove)
using this:
finite {r. P r} \<Longrightarrow> (\<lambda>r. if r \<in> {r. P r} then ?f r else (0::?'a)) sums (\<Sum>r | P r. ?f r)

goal (1 subgoal):
 1. finite {r. P r} \<Longrightarrow> (\<lambda>r. if P r then f r else (0::'a)) sums (\<Sum>r | P r. f r)
[PROOF STEP]
by simp


[STATEMENT]
lemma DERIV_nonpos_imp_nonincreasing:
  fixes a b :: real
    and f :: "real \<Rightarrow> real"
  assumes "a \<le> b"
    and "\<And>x. \<lbrakk>a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> \<exists>y. DERIV f x :> y \<and> y \<le> 0"
  shows "f a \<ge> f b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f b \<le> f a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f b \<le> f a
[PROOF STEP]
have "(\<lambda>x. -f x) a \<le> (\<lambda>x. -f x) b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - f a \<le> - f b
[PROOF STEP]
using DERIV_nonneg_imp_nondecreasing [of a b "\<lambda>x. -f x"] assms DERIV_minus
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>a \<le> b; \<And>x. \<lbrakk>a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> \<exists>y. ((\<lambda>x. - f x) has_real_derivative y) (at x) \<and> 0 \<le> y\<rbrakk> \<Longrightarrow> - f a \<le> - f b
a \<le> b
\<lbrakk>a \<le> ?x; ?x \<le> b\<rbrakk> \<Longrightarrow> \<exists>y. (f has_real_derivative y) (at ?x) \<and> y \<le> 0
(?f has_field_derivative ?D) (at ?x within ?s) \<Longrightarrow> ((\<lambda>x. - ?f x) has_field_derivative - ?D) (at ?x within ?s)

goal (1 subgoal):
 1. - f a \<le> - f b
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
- f a \<le> - f b

goal (1 subgoal):
 1. f b \<le> f a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
- f a \<le> - f b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
- f a \<le> - f b

goal (1 subgoal):
 1. f b \<le> f a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f b \<le> f a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sum_nth_roots:
  assumes "n > 1"
  shows   "\<Sum>{z::complex. z ^ n = c} = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
proof (cases "c = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. c = 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
 2. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
c = 0

goal (2 subgoals):
 1. c = 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
 2. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
1 < n
c = 0
[PROOF STEP]
have "{z::complex. z ^ n = c} = {0}"
[PROOF STATE]
proof (prove)
using this:
1 < n
c = 0

goal (1 subgoal):
 1. {z. z ^ n = c} = {0}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{z. z ^ n = c} = {0}

goal (2 subgoals):
 1. c = 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
 2. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{z. z ^ n = c} = {0}

goal (2 subgoals):
 1. c = 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
 2. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
have "\<Sum>\<dots> = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum> {0} = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<Sum> {0} = 0

goal (2 subgoals):
 1. c = 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
 2. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Sum> {z. z ^ n = c} = 0

goal (1 subgoal):
 1. \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<Sum> {z. z ^ n = c} = 0

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
c \<noteq> 0

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
define c' where "c' = root n (norm c) * cis (Arg c / n)"
[PROOF STATE]
proof (state)
this:
c' = complex_of_real (root n (cmod c)) * cis (Arg c / real n)

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
from False and assms
[PROOF STATE]
proof (chain)
picking this:
c \<noteq> 0
1 < n
[PROOF STEP]
have "(\<Sum>{z. z ^ n = c}) = (\<Sum>z | z ^ n = 1. c' * z)"
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
1 < n

goal (1 subgoal):
 1. \<Sum> {z. z ^ n = c} = (\<Sum>z | z ^ n = 1. c' * z)
[PROOF STEP]
by (subst sum.reindex_bij_betw [OF bij_betw_nth_root_unity, symmetric])
       (auto simp: sum_distrib_left finite_roots_unity c'_def)
[PROOF STATE]
proof (state)
this:
\<Sum> {z. z ^ n = c} = (\<Sum>z | z ^ n = 1. c' * z)

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Sum> {z. z ^ n = c} = (\<Sum>z | z ^ n = 1. c' * z)

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
1 < n
[PROOF STEP]
have "\<dots> = 0"
[PROOF STATE]
proof (prove)
using this:
1 < n

goal (1 subgoal):
 1. (\<Sum>z | z ^ n = 1. c' * z) = 0
[PROOF STEP]
by (simp add: sum_distrib_left [symmetric] sum_roots_unity)
[PROOF STATE]
proof (state)
this:
(\<Sum>z | z ^ n = 1. c' * z) = 0

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Sum> {z. z ^ n = c} = 0

goal (1 subgoal):
 1. \<Sum> {z. z ^ n = c} = 0
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<Sum> {z. z ^ n = c} = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma l13_1:
  assumes "\<not> Col A B C" and
    "P Midpoint B C" and
    "Q Midpoint A C" and
    "R Midpoint A B"
  shows
    "\<exists> X Y.(R PerpAt X Y A B \<and> X Y Perp P Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>X Y. R PerpAt X Y A B  \<and> X Y Perp P Q
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>X Y. R PerpAt X Y A B  \<and> X Y Perp P Q
[PROOF STEP]
obtain X Y where "R PerpAt X Y A B \<and> X Y Perp P Q \<and> Coplanar A B C X \<and> Coplanar A B C Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X Y. R PerpAt X Y A B  \<and> X Y Perp P Q \<and> Coplanar A B C X \<and> Coplanar A B C Y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using l13_1_aux assms(1) assms(2) assms(3) assms(4)
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<not> Col ?A ?B ?C; ?P Midpoint ?B ?C; ?Q Midpoint ?A ?C; ?R Midpoint ?A ?B\<rbrakk> \<Longrightarrow> \<exists>X Y. ?R PerpAt X Y ?A ?B  \<and> X Y Perp ?P ?Q \<and> Coplanar ?A ?B ?C X \<and> Coplanar ?A ?B ?C Y
\<not> Col A B C
P Midpoint B C
Q Midpoint A C
R Midpoint A B

goal (1 subgoal):
 1. (\<And>X Y. R PerpAt X Y A B  \<and> X Y Perp P Q \<and> Coplanar A B C X \<and> Coplanar A B C Y \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
R PerpAt X Y A B  \<and> X Y Perp P Q \<and> Coplanar A B C X \<and> Coplanar A B C Y

goal (1 subgoal):
 1. \<exists>X Y. R PerpAt X Y A B  \<and> X Y Perp P Q
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
R PerpAt X Y A B  \<and> X Y Perp P Q \<and> Coplanar A B C X \<and> Coplanar A B C Y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
R PerpAt X Y A B  \<and> X Y Perp P Q \<and> Coplanar A B C X \<and> Coplanar A B C Y

goal (1 subgoal):
 1. \<exists>X Y. R PerpAt X Y A B  \<and> X Y Perp P Q
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>X Y. R PerpAt X Y A B  \<and> X Y Perp P Q

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma struct_maps_memE:
  assumes "f \<in> struct_maps T S"
  shows  "\<And> x. x \<in> carrier T \<Longrightarrow> f x \<in> carrier S"
         "\<And>x. x \<notin> carrier T \<Longrightarrow> f x = undefined"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> carrier T \<Longrightarrow> f x \<in> carrier S) &&& (\<And>x. x \<notin> carrier T \<Longrightarrow> f x = undefined)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f \<in> struct_maps T S

goal (1 subgoal):
 1. (\<And>x. x \<in> carrier T \<Longrightarrow> f x \<in> carrier S) &&& (\<And>x. x \<notin> carrier T \<Longrightarrow> f x = undefined)
[PROOF STEP]
unfolding struct_maps_def
[PROOF STATE]
proof (prove)
using this:
f \<in> {f \<in> carrier T \<rightarrow> carrier S. f = restrict f (carrier T)}

goal (1 subgoal):
 1. (\<And>x. x \<in> carrier T \<Longrightarrow> f x \<in> carrier S) &&& (\<And>x. x \<notin> carrier T \<Longrightarrow> f x = undefined)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<notin> carrier T \<Longrightarrow> f x = undefined
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f \<in> struct_maps T S

goal (1 subgoal):
 1. \<And>x. x \<notin> carrier T \<Longrightarrow> f x = undefined
[PROOF STEP]
unfolding struct_maps_def
[PROOF STATE]
proof (prove)
using this:
f \<in> {f \<in> carrier T \<rightarrow> carrier S. f = restrict f (carrier T)}

goal (1 subgoal):
 1. \<And>x. x \<notin> carrier T \<Longrightarrow> f x = undefined
[PROOF STEP]
by (metis (mono_tags, lifting) mem_Collect_eq restrict_apply)


[STATEMENT]
lemma MVT_ivl':
  fixes f::"'a::ordered_euclidean_space\<Rightarrow>'b::ordered_euclidean_space"
  assumes fderiv: "(\<And>x. x \<in> D \<Longrightarrow> (f has_derivative J x) (at x within D))"
  assumes J_ivl: "\<And>x. x \<in> D \<Longrightarrow> J x (a - b) \<ge> J0"
  assumes line_in: "\<And>x. x \<in> {0..1} \<Longrightarrow> b + x *\<^sub>R (a - b) \<in> D"
  shows "f a \<ge> f b + J0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f b + J0 \<le> f a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f b + J0 \<le> f a
[PROOF STEP]
have "f (b + (a - b)) - f b \<ge> J0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. J0 \<le> f (b + (a - b)) - f b
[PROOF STEP]
apply (rule MVT_ivl[OF fderiv ])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. x \<in> D \<Longrightarrow> x \<in> D
 2. \<And>x. x \<in> D \<Longrightarrow> J0 \<le> J x (a - b)
 3. \<And>x. x \<in> {0..1} \<Longrightarrow> b + x *\<^sub>R (a - b) \<in> D
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> D \<Longrightarrow> J0 \<le> J x (a - b)
 2. \<And>x. x \<in> {0..1} \<Longrightarrow> b + x *\<^sub>R (a - b) \<in> D
[PROOF STEP]
apply (rule J_ivl)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> D \<Longrightarrow> x \<in> D
 2. \<And>x. x \<in> {0..1} \<Longrightarrow> b + x *\<^sub>R (a - b) \<in> D
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> {0..1} \<Longrightarrow> b + x *\<^sub>R (a - b) \<in> D
[PROOF STEP]
using line_in
[PROOF STATE]
proof (prove)
using this:
?x \<in> {0..1} \<Longrightarrow> b + ?x *\<^sub>R (a - b) \<in> D

goal (1 subgoal):
 1. \<And>x. x \<in> {0..1} \<Longrightarrow> b + x *\<^sub>R (a - b) \<in> D
[PROOF STEP]
apply (auto simp: diff_le_eq le_diff_eq ac_simps)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
J0 \<le> f (b + (a - b)) - f b

goal (1 subgoal):
 1. f b + J0 \<le> f a
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
J0 \<le> f (b + (a - b)) - f b

goal (1 subgoal):
 1. f b + J0 \<le> f a
[PROOF STEP]
by (auto simp: diff_le_eq le_diff_eq ac_simps)
[PROOF STATE]
proof (state)
this:
f b + J0 \<le> f a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eclose_singleton [simp]: "eclose \<lbrace>a\<rbrace> = (eclose a) \<triangleleft> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eclose \<lbrace>a\<rbrace> = eclose a \<triangleleft> a
[PROOF STEP]
proof (rule order_antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. eclose \<lbrace>a\<rbrace> \<le> eclose a \<triangleleft> a
 2. eclose a \<triangleleft> a \<le> eclose \<lbrace>a\<rbrace>
[PROOF STEP]
show "eclose \<lbrace>a\<rbrace> \<le> eclose a \<triangleleft> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eclose \<lbrace>a\<rbrace> \<le> eclose a \<triangleleft> a
[PROOF STEP]
by (metis eclose_minimal Transset_eclose Transset_hinsert
              le_eclose less_eq_insert1_iff order_refl zero_le)
[PROOF STATE]
proof (state)
this:
eclose \<lbrace>a\<rbrace> \<le> eclose a \<triangleleft> a

goal (1 subgoal):
 1. eclose a \<triangleleft> a \<le> eclose \<lbrace>a\<rbrace>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. eclose a \<triangleleft> a \<le> eclose \<lbrace>a\<rbrace>
[PROOF STEP]
show "eclose a \<triangleleft> a \<le> eclose \<lbrace>a\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eclose a \<triangleleft> a \<le> eclose \<lbrace>a\<rbrace>
[PROOF STEP]
by (metis Transset_def Transset_eclose eclose_minimal le_eclose less_eq_insert1_iff)
[PROOF STATE]
proof (state)
this:
eclose a \<triangleleft> a \<le> eclose \<lbrace>a\<rbrace>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma summable_zeta:
  assumes "Re s > 1"
  shows   "summable (\<lambda>n. of_nat (Suc n) powr -s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. summable (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
have "summable (\<lambda>n. exp (complex_of_real (ln (real (Suc n))) * - s))" (is "summable ?f")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. exp (complex_of_real (ln (real (Suc n))) * - s))
[PROOF STEP]
by (subst summable_Suc_iff, rule summable_complex_powr_iff) (use assms in auto)
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. exp (complex_of_real (ln (real (Suc n))) * - s))

goal (1 subgoal):
 1. summable (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. exp (complex_of_real (ln (real (Suc n))) * - s))

goal (1 subgoal):
 1. summable (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
have "?f = (\<lambda>n. of_nat (Suc n) powr -s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. exp (complex_of_real (ln (real (Suc n))) * - s)) = (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
by (simp add: powr_def algebra_simps del: of_nat_Suc)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. exp (complex_of_real (ln (real (Suc n))) * - s)) = (\<lambda>n. of_nat (Suc n) powr - s)

goal (1 subgoal):
 1. summable (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
summable (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
summable (\<lambda>n. of_nat (Suc n) powr - s)

goal (1 subgoal):
 1. summable (\<lambda>n. of_nat (Suc n) powr - s)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
summable (\<lambda>n. of_nat (Suc n) powr - s)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma l5_5_1:
  assumes "A B Le C D"
  shows "\<exists> X. (Bet A B X \<and> Cong A X C D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>X. Bet A B X \<and> Cong A X C D
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>X. Bet A B X \<and> Cong A X C D
[PROOF STEP]
obtain P where P1: "Bet C P D \<and> Cong A B C P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>P. Bet C P D \<and> Cong A B C P \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Le_def assms
[PROOF STATE]
proof (prove)
using this:
?A ?B Le ?C ?D \<equiv> \<exists>E. Bet ?C E ?D \<and> Cong ?A ?B ?C E
A B Le C D

goal (1 subgoal):
 1. (\<And>P. Bet C P D \<and> Cong A B C P \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Bet C P D \<and> Cong A B C P

goal (1 subgoal):
 1. \<exists>X. Bet A B X \<and> Cong A X C D
[PROOF STEP]
obtain X where P2: "Bet A B X \<and> Cong B X P D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X. Bet A B X \<and> Cong B X P D \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using segment_construction
[PROOF STATE]
proof (prove)
using this:
\<forall>a b c q. \<exists>x. Bet q a x \<and> Cong a x b c

goal (1 subgoal):
 1. (\<And>X. Bet A B X \<and> Cong B X P D \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Bet A B X \<and> Cong B X P D

goal (1 subgoal):
 1. \<exists>X. Bet A B X \<and> Cong A X C D
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Bet A B X \<and> Cong B X P D
[PROOF STEP]
have "Cong A X C D"
[PROOF STATE]
proof (prove)
using this:
Bet A B X \<and> Cong B X P D

goal (1 subgoal):
 1. Cong A X C D
[PROOF STEP]
using P1 l2_11_b
[PROOF STATE]
proof (prove)
using this:
Bet A B X \<and> Cong B X P D
Bet C P D \<and> Cong A B C P
\<lbrakk>Bet ?A ?B ?C; Bet ?A' ?B' ?C'; Cong ?A ?B ?A' ?B'; Cong ?B ?C ?B' ?C'\<rbrakk> \<Longrightarrow> Cong ?A ?C ?A' ?C'

goal (1 subgoal):
 1. Cong A X C D
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Cong A X C D

goal (1 subgoal):
 1. \<exists>X. Bet A B X \<and> Cong A X C D
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Cong A X C D
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Cong A X C D

goal (1 subgoal):
 1. \<exists>X. Bet A B X \<and> Cong A X C D
[PROOF STEP]
using P2
[PROOF STATE]
proof (prove)
using this:
Cong A X C D
Bet A B X \<and> Cong B X P D

goal (1 subgoal):
 1. \<exists>X. Bet A B X \<and> Cong A X C D
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>X. Bet A B X \<and> Cong A X C D

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ordered_fmap_list_all:
  assumes "is_fmap S"
  shows "list_all P (ordered_fmap S) = fBall S P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all P (ordered_fmap S) = fBall S P
[PROOF STEP]
unfolding list_all_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ball (set (ordered_fmap S)) P = fBall S P
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_fmap S

goal (1 subgoal):
 1. Ball (set (ordered_fmap S)) P = fBall S P
[PROOF STEP]
by transfer (simp add: ordered_map_set_eq)


[STATEMENT]
lemma FreeGroup_diff_closed:
  assumes "x \<in> FreeGroup S" "y \<in> FreeGroup S"
  shows   "x-y \<in> FreeGroup S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x - y \<in> FreeGroup S
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x - y \<in> FreeGroup S
[PROOF STEP]
define xs where xs: "xs \<equiv> freeword x"
[PROOF STATE]
proof (state)
this:
xs \<equiv> freeword x

goal (1 subgoal):
 1. x - y \<in> FreeGroup S
[PROOF STEP]
define ys where ys: "ys \<equiv> freeword y"
[PROOF STATE]
proof (state)
this:
ys \<equiv> freeword y

goal (1 subgoal):
 1. x - y \<in> FreeGroup S
[PROOF STEP]
have "freeword (x-y) =
        prappend_signed_list (freeword x) (rev (map flip_signed (freeword y)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. freeword (x - y) = prappend_signed_list (freeword x) (rev (map flip_signed (freeword y)))
[PROOF STEP]
by transfer simp
[PROOF STATE]
proof (state)
this:
freeword (x - y) = prappend_signed_list (freeword x) (rev (map flip_signed (freeword y)))

goal (1 subgoal):
 1. x - y \<in> FreeGroup S
[PROOF STEP]
hence "fst ` set (freeword (x-y)) \<subseteq> fst ` (set (freeword x) \<union> set (freeword y))"
[PROOF STATE]
proof (prove)
using this:
freeword (x - y) = prappend_signed_list (freeword x) (rev (map flip_signed (freeword y)))

goal (1 subgoal):
 1. fst ` set (freeword (x - y)) \<subseteq> fst ` (set (freeword x) \<union> set (freeword y))
[PROOF STEP]
using fst_set_prappend_signed_list
[PROOF STATE]
proof (prove)
using this:
freeword (x - y) = prappend_signed_list (freeword x) (rev (map flip_signed (freeword y)))
fst ` set (prappend_signed_list ?xs ?ys) \<subseteq> fst ` (set ?xs \<union> set ?ys)

goal (1 subgoal):
 1. fst ` set (freeword (x - y)) \<subseteq> fst ` (set (freeword x) \<union> set (freeword y))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
fst ` set (freeword (x - y)) \<subseteq> fst ` (set (freeword x) \<union> set (freeword y))

goal (1 subgoal):
 1. x - y \<in> FreeGroup S
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
x \<in> FreeGroup S
y \<in> FreeGroup S
fst ` set (freeword (x - y)) \<subseteq> fst ` (set (freeword x) \<union> set (freeword y))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<in> FreeGroup S
y \<in> FreeGroup S
fst ` set (freeword (x - y)) \<subseteq> fst ` (set (freeword x) \<union> set (freeword y))

goal (1 subgoal):
 1. x - y \<in> FreeGroup S
[PROOF STEP]
unfolding FreeGroup_def
[PROOF STATE]
proof (prove)
using this:
x \<in> {x. fst ` set (freeword x) \<subseteq> S}
y \<in> {x. fst ` set (freeword x) \<subseteq> S}
fst ` set (freeword (x - y)) \<subseteq> fst ` (set (freeword x) \<union> set (freeword y))

goal (1 subgoal):
 1. x - y \<in> {x. fst ` set (freeword x) \<subseteq> S}
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
x - y \<in> FreeGroup S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma transpos_id_1:"\<lbrakk>i \<le> n; j \<le> n; i \<noteq> j; x \<le> n; x \<noteq> i; x \<noteq> j\<rbrakk> \<Longrightarrow>
                       transpos i j x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<le> n; j \<le> n; i \<noteq> j; x \<le> n; x \<noteq> i; x \<noteq> j\<rbrakk> \<Longrightarrow> transpos i j x = x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>i \<le> n; j \<le> n; i \<noteq> j; x \<le> n; x \<noteq> i; x \<noteq> j\<rbrakk> \<Longrightarrow> transpos i j x = x
[PROOF STEP]
assume p1:"i \<le> n" and p2:"j \<le> n" and p3:"i \<noteq> j" and p4:"x \<le> n" and p5:"x \<noteq> i" and p6:"x \<noteq> j"
[PROOF STATE]
proof (state)
this:
i \<le> n
j \<le> n
i \<noteq> j
x \<le> n
x \<noteq> i
x \<noteq> j

goal (1 subgoal):
 1. \<lbrakk>i \<le> n; j \<le> n; i \<noteq> j; x \<le> n; x \<noteq> i; x \<noteq> j\<rbrakk> \<Longrightarrow> transpos i j x = x
[PROOF STEP]
from p1 and p2 and p3 and p4 and p5 and p6
[PROOF STATE]
proof (chain)
picking this:
i \<le> n
j \<le> n
i \<noteq> j
x \<le> n
x \<noteq> i
x \<noteq> j
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
i \<le> n
j \<le> n
i \<noteq> j
x \<le> n
x \<noteq> i
x \<noteq> j

goal (1 subgoal):
 1. transpos i j x = x
[PROOF STEP]
apply (simp add:transpos_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
transpos i j x = x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mergesort_by_rel_simps [simp, code] :
  "mergesort_by_rel R [] = []"
  "mergesort_by_rel R [x] = [x]"
  "mergesort_by_rel R (x1 # x2 # xs) =
   (let (xs1, xs2) = (mergesort_by_rel_split ([x1], [x2]) xs) in
   mergesort_by_rel_merge R (mergesort_by_rel R xs1) (mergesort_by_rel R xs2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mergesort_by_rel R [] = [] &&& mergesort_by_rel R [x] = [x] &&& mergesort_by_rel R (x1 # x2 # xs) = (let (xs1, xs2) = mergesort_by_rel_split ([x1], [x2]) xs in mergesort_by_rel_merge R (mergesort_by_rel R xs1) (mergesort_by_rel R xs2))
[PROOF STEP]
apply (simp add: mergesort_by_rel.simps)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. mergesort_by_rel R [x] = [x]
 2. mergesort_by_rel R (x1 # x2 # xs) = (let (xs1, xs2) = mergesort_by_rel_split ([x1], [x2]) xs in mergesort_by_rel_merge R (mergesort_by_rel R xs1) (mergesort_by_rel R xs2))
[PROOF STEP]
apply (simp add: mergesort_by_rel.simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mergesort_by_rel R (x1 # x2 # xs) = (let (xs1, xs2) = mergesort_by_rel_split ([x1], [x2]) xs in mergesort_by_rel_merge R (mergesort_by_rel R xs1) (mergesort_by_rel R xs2))
[PROOF STEP]
apply (simp add: mergesort_by_rel.simps[of _ "x1 # x2 # xs"] split: prod.splits)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma coplanar_perm_19:
  assumes "Coplanar A B C D"
  shows "Coplanar D A C B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar D A C B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Coplanar D A C B
[PROOF STEP]
obtain X where P1: "(Col A B X \<and> Col C D X) \<or> (Col A C X \<and> Col B D X) \<or> (Col A D X \<and> Col B C X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Coplanar_def assms
[PROOF STATE]
proof (prove)
using this:
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Coplanar A B C D

goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar D A C B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar D A C B
[PROOF STEP]
using Coplanar_def col_permutation_4
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Col ?A ?B ?C \<Longrightarrow> Col ?B ?A ?C

goal (1 subgoal):
 1. Coplanar D A C B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar D A C B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma proj2_abs_mult:
  assumes "c \<noteq> 0"
  shows "proj2_abs (c *\<^sub>R v) = proj2_abs v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
 2. \<not> ?P \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
assume "v = 0"
[PROOF STATE]
proof (state)
this:
v = 0

goal (2 subgoals):
 1. ?P \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
 2. \<not> ?P \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
thus "proj2_abs (c *\<^sub>R v) = proj2_abs v"
[PROOF STATE]
proof (prove)
using this:
v = 0

goal (1 subgoal):
 1. proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
proj2_abs (c *\<^sub>R v) = proj2_abs v

goal (1 subgoal):
 1. v \<noteq> 0 \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. v \<noteq> 0 \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
assume "v \<noteq> 0"
[PROOF STATE]
proof (state)
this:
v \<noteq> 0

goal (1 subgoal):
 1. v \<noteq> 0 \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
with \<open>c \<noteq> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
c \<noteq> 0
v \<noteq> 0
[PROOF STEP]
have "(c *\<^sub>R v, v) \<in> real_vector.proportionality"
    and "c *\<^sub>R v \<in> real_vector.non_zero_vectors"
    and "v \<in> real_vector.non_zero_vectors"
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
v \<noteq> 0

goal (1 subgoal):
 1. (c *\<^sub>R v, v) \<in> proportionality &&& c *\<^sub>R v \<in> non_zero_vectors &&& v \<in> non_zero_vectors
[PROOF STEP]
unfolding real_vector.proportionality_def
      and real_vector.non_zero_vectors_def
[PROOF STATE]
proof (prove)
using this:
c \<noteq> 0
v \<noteq> 0

goal (1 subgoal):
 1. (c *\<^sub>R v, v) \<in> {(x, y). x \<noteq> 0 \<and> y \<noteq> 0 \<and> (\<exists>k. x = k *\<^sub>R y)} &&& c *\<^sub>R v \<in> {x. x \<noteq> 0} &&& v \<in> {x. x \<noteq> 0}
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
(c *\<^sub>R v, v) \<in> proportionality
c *\<^sub>R v \<in> non_zero_vectors
v \<in> non_zero_vectors

goal (1 subgoal):
 1. v \<noteq> 0 \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
with eq_equiv_class_iff
  [of real_vector.non_zero_vectors
    real_vector.proportionality
    "c *\<^sub>R v"
    v]
    and real_vector.proportionality_equiv
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>equiv non_zero_vectors proportionality; c *\<^sub>R v \<in> non_zero_vectors; v \<in> non_zero_vectors\<rbrakk> \<Longrightarrow> (proportionality `` {c *\<^sub>R v} = proportionality `` {v}) = ((c *\<^sub>R v, v) \<in> proportionality)
equiv non_zero_vectors proportionality
(c *\<^sub>R v, v) \<in> proportionality
c *\<^sub>R v \<in> non_zero_vectors
v \<in> non_zero_vectors
[PROOF STEP]
have "real_vector.proportionality `` {c *\<^sub>R v} =
    real_vector.proportionality `` {v}"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>equiv non_zero_vectors proportionality; c *\<^sub>R v \<in> non_zero_vectors; v \<in> non_zero_vectors\<rbrakk> \<Longrightarrow> (proportionality `` {c *\<^sub>R v} = proportionality `` {v}) = ((c *\<^sub>R v, v) \<in> proportionality)
equiv non_zero_vectors proportionality
(c *\<^sub>R v, v) \<in> proportionality
c *\<^sub>R v \<in> non_zero_vectors
v \<in> non_zero_vectors

goal (1 subgoal):
 1. proportionality `` {c *\<^sub>R v} = proportionality `` {v}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
proportionality `` {c *\<^sub>R v} = proportionality `` {v}

goal (1 subgoal):
 1. v \<noteq> 0 \<Longrightarrow> proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
thus "proj2_abs (c *\<^sub>R v) = proj2_abs v"
[PROOF STATE]
proof (prove)
using this:
proportionality `` {c *\<^sub>R v} = proportionality `` {v}

goal (1 subgoal):
 1. proj2_abs (c *\<^sub>R v) = proj2_abs v
[PROOF STEP]
unfolding proj2_abs_def
[PROOF STATE]
proof (prove)
using this:
proportionality `` {c *\<^sub>R v} = proportionality `` {v}

goal (1 subgoal):
 1. Abs_proj2 (proportionality `` {c *\<^sub>R v}) = Abs_proj2 (proportionality `` {v})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
proj2_abs (c *\<^sub>R v) = proj2_abs v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem wls_psubst_subst_compose:
assumes "wls s X" and "wls (asSort ys) Y" and "wlsEnv rho"
shows "((X #[Y / y]_ys) #[rho]) = (X #[(rho [y \<leftarrow> (Y #[rho])]_ys)])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X #[Y / y]_ys #[rho] = X #[rho [y \<leftarrow> Y #[rho]]_ys]
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wls s X
wls (asSort ys) Y
wlsEnv rho

goal (1 subgoal):
 1. X #[Y / y]_ys #[rho] = X #[rho [y \<leftarrow> Y #[rho]]_ys]
[PROOF STEP]
by(simp add: psubst_subst_compose)


[STATEMENT]
theorem ce_finite: "finite A \<Longrightarrow> A \<in> ce_sets"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> A \<in> ce_sets
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite A \<Longrightarrow> A \<in> ce_sets
[PROOF STEP]
assume A: "finite A"
[PROOF STATE]
proof (state)
this:
finite A

goal (1 subgoal):
 1. finite A \<Longrightarrow> A \<in> ce_sets
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite A
[PROOF STEP]
have "chf A \<in> PrimRec1"
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. chf A \<in> PrimRec1
[PROOF STEP]
by (rule chf_lm_5)
[PROOF STATE]
proof (state)
this:
chf A \<in> PrimRec1

goal (1 subgoal):
 1. finite A \<Longrightarrow> A \<in> ce_sets
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
chf A \<in> PrimRec1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
chf A \<in> PrimRec1

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma T2_axiom_implies_T1_axiom:
  fixes T (structure)
  assumes T2: "\<forall> x \<in> carrier. \<forall> y \<in> carrier. x \<noteq> y
  \<longrightarrow> (\<exists> u \<in> nhds x. \<exists> v \<in> nhds y. u \<inter> v = {})"
  shows "T1_axioms T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T1_axioms T
[PROOF STEP]
proof (rule T1_axioms.intro, clarify)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> (\<exists>u\<in>nhds x. y \<notin> u) = (\<exists>v\<in>nhds y. x \<notin> v)
[PROOF STEP]
interpret carrier T
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> (\<exists>u\<in>nhds x. y \<notin> u) = (\<exists>v\<in>nhds y. x \<notin> v)
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> (\<exists>u\<in>nhds x. y \<notin> u) = (\<exists>v\<in>nhds y. x \<notin> v)
[PROOF STEP]
assume neq: "x \<noteq> y" and
    points: "x \<in> carrier" "y \<in> carrier"
[PROOF STATE]
proof (state)
this:
x \<noteq> y
x \<in> carrier
y \<in> carrier

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> (\<exists>u\<in>nhds x. y \<notin> u) = (\<exists>v\<in>nhds y. x \<notin> v)
[PROOF STEP]
with T2
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>carrier. \<forall>y\<in>carrier. x \<noteq> y \<longrightarrow> (\<exists>u\<in>nhds x. \<exists>v\<in>nhds y. u \<inter> v = {})
x \<noteq> y
x \<in> carrier
y \<in> carrier
[PROOF STEP]
obtain u v
    where unhd: "u \<in> nhds x" and
    vnhd: "v \<in> nhds y" and Int_empty: "u \<inter> v = {}"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>carrier. \<forall>y\<in>carrier. x \<noteq> y \<longrightarrow> (\<exists>u\<in>nhds x. \<exists>v\<in>nhds y. u \<inter> v = {})
x \<noteq> y
x \<in> carrier
y \<in> carrier

goal (1 subgoal):
 1. (\<And>u v. \<lbrakk>u \<in> nhds x; v \<in> nhds y; u \<inter> v = {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
u \<in> nhds x
v \<in> nhds y
u \<inter> v = {}

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> carrier; y \<in> carrier; x \<noteq> y\<rbrakk> \<Longrightarrow> (\<exists>u\<in>nhds x. y \<notin> u) = (\<exists>v\<in>nhds y. x \<notin> v)
[PROOF STEP]
show "(\<exists>u\<in>nhds x. y \<notin> u) = (\<exists>v\<in>nhds y. x \<notin> v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>u\<in>nhds x. y \<notin> u) = (\<exists>v\<in>nhds y. x \<notin> v)
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. \<lbrakk>u \<in> nhds x; y \<notin> u\<rbrakk> \<Longrightarrow> \<exists>v\<in>nhds y. x \<notin> v
 2. \<And>v. \<lbrakk>v \<in> nhds y; x \<notin> v\<rbrakk> \<Longrightarrow> \<exists>u\<in>nhds x. y \<notin> u
[PROOF STEP]
show "\<exists>v\<in>nhds y. x \<notin> v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>v\<in>nhds y. x \<notin> v
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x \<notin> ?v
 2. ?v \<in> nhds y
[PROOF STEP]
from unhd
[PROOF STATE]
proof (chain)
picking this:
u \<in> nhds x
[PROOF STEP]
have "x \<in> u"
[PROOF STATE]
proof (prove)
using this:
u \<in> nhds x

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

goal (2 subgoals):
 1. x \<notin> ?v
 2. ?v \<in> nhds y
[PROOF STEP]
with Int_empty
[PROOF STATE]
proof (chain)
picking this:
u \<inter> v = {}
x \<in> u
[PROOF STEP]
show "x \<notin> v"
[PROOF STATE]
proof (prove)
using this:
u \<inter> v = {}
x \<in> u

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

goal (1 subgoal):
 1. v \<in> nhds y
[PROOF STEP]
qed (rule vnhd)
[PROOF STATE]
proof (state)
this:
\<exists>v\<in>nhds y. x \<notin> v

goal (1 subgoal):
 1. \<And>v. \<lbrakk>v \<in> nhds y; x \<notin> v\<rbrakk> \<Longrightarrow> \<exists>u\<in>nhds x. y \<notin> u
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>v. \<lbrakk>v \<in> nhds y; x \<notin> v\<rbrakk> \<Longrightarrow> \<exists>u\<in>nhds x. y \<notin> u
[PROOF STEP]
show "\<exists>u\<in>nhds x. y \<notin> u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>u\<in>nhds x. y \<notin> u
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. y \<notin> ?u
 2. ?u \<in> nhds x
[PROOF STEP]
from vnhd
[PROOF STATE]
proof (chain)
picking this:
v \<in> nhds y
[PROOF STEP]
have "y \<in> v"
[PROOF STATE]
proof (prove)
using this:
v \<in> nhds y

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

goal (2 subgoals):
 1. y \<notin> ?u
 2. ?u \<in> nhds x
[PROOF STEP]
with Int_empty
[PROOF STATE]
proof (chain)
picking this:
u \<inter> v = {}
y \<in> v
[PROOF STEP]
show "y \<notin> u"
[PROOF STATE]
proof (prove)
using this:
u \<inter> v = {}
y \<in> v

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

goal (1 subgoal):
 1. u \<in> nhds x
[PROOF STEP]
qed (rule unhd)
[PROOF STATE]
proof (state)
this:
\<exists>u\<in>nhds x. y \<notin> u

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>u\<in>nhds x. y \<notin> u) = (\<exists>v\<in>nhds y. x \<notin> v)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_span_complete[simp]:
  fixes A :: "'a::real_normed_vector set"
  assumes "finite A"
  shows "complete (span A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complete (span A)
[PROOF STEP]
text \<open>The span of a finite set is complete.\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complete (span A)
[PROOF STEP]
proof (cases "A \<noteq> {} \<and> A \<noteq> {0}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
A \<noteq> {} \<and> A \<noteq> {0::'a}

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
obtain B where
    BT: "real_vector.span B = real_vector.span A"
    and "independent B"
    and "finite B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>B. \<lbrakk>span B = span A; independent B; finite B\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson True assms finite_subset real_vector.maximal_independent_subset real_vector.span_eq
        real_vector.span_superset subset_trans)
[PROOF STATE]
proof (state)
this:
span B = span A
independent B
finite B

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
have "B\<noteq>{}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<noteq> {}
[PROOF STEP]
apply (rule ccontr, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B = {} \<Longrightarrow> False
[PROOF STEP]
using BT True
[PROOF STATE]
proof (prove)
using this:
span B = span A
A \<noteq> {} \<and> A \<noteq> {0::'a}

goal (1 subgoal):
 1. B = {} \<Longrightarrow> False
[PROOF STEP]
by (metis real_vector.span_superset real_vector.span_empty subset_singletonD)
[PROOF STATE]
proof (state)
this:
B \<noteq> {}

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
(* The following generalizes finite_span_complete_aux to hold without the assumption
     that 'basis has type class finite *)
[PROOF STATE]
proof (state)
this:
B \<noteq> {}

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
B \<noteq> {}

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
(* The type variable 'basisT must not be the same as the one used in finite_span_complete_aux,
       otherwise "internalize_sort" below fails *)
[PROOF STATE]
proof (state)
this:
B \<noteq> {}

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
assume "\<exists>(Rep :: 'basisT\<Rightarrow>'a) Abs. type_definition Rep Abs B"
[PROOF STATE]
proof (state)
this:
\<exists>Rep Abs. type_definition Rep Abs B

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>Rep Abs. type_definition Rep Abs B
[PROOF STEP]
obtain rep :: "'basisT \<Rightarrow> 'a" and abs :: "'a \<Rightarrow> 'basisT" where t: "type_definition rep abs B"
[PROOF STATE]
proof (prove)
using this:
\<exists>Rep Abs. type_definition Rep Abs B

goal (1 subgoal):
 1. (\<And>rep abs. type_definition rep abs B \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
type_definition rep abs B

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
have basisT_finite: "class.finite TYPE('basisT)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. class.finite TYPE('basisT)
[PROOF STEP]
apply intro_classes
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite UNIV
[PROOF STEP]
using \<open>finite B\<close> t
[PROOF STATE]
proof (prove)
using this:
finite B
type_definition rep abs B

goal (1 subgoal):
 1. finite UNIV
[PROOF STEP]
by (metis (mono_tags, opaque_lifting) ex_new_if_finite finite_imageI image_eqI type_definition_def)
[PROOF STATE]
proof (state)
this:
class.finite TYPE('basisT)

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
note finite_span_complete_aux(2)[internalize_sort "'basis::finite"]
[PROOF STATE]
proof (state)
this:
\<lbrakk>class.finite TYPE(?'a); type_definition ?rep ?abs ?B; finite ?B; ?b \<in> ?B; independent ?B\<rbrakk> \<Longrightarrow> complete (span ?B)

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
note this[OF basisT_finite t]
[PROOF STATE]
proof (state)
this:
\<lbrakk>finite B; ?b \<in> B; independent B\<rbrakk> \<Longrightarrow> complete (span B)

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>\<exists>Rep Abs. type_definition Rep Abs B; finite B; ?b6 \<in> B; independent B\<rbrakk> \<Longrightarrow> complete (span B)

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
note this[cancel_type_definition, OF \<open>B\<noteq>{}\<close> \<open>finite B\<close> _ \<open>independent B\<close>]
[PROOF STATE]
proof (state)
this:
?b6 \<in> B \<Longrightarrow> complete (span B)

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
hence "complete (real_vector.span B)"
[PROOF STATE]
proof (prove)
using this:
?b6 \<in> B \<Longrightarrow> complete (span B)

goal (1 subgoal):
 1. complete (span B)
[PROOF STEP]
using \<open>B\<noteq>{}\<close>
[PROOF STATE]
proof (prove)
using this:
?b6 \<in> B \<Longrightarrow> complete (span B)
B \<noteq> {}

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

goal (2 subgoals):
 1. A \<noteq> {} \<and> A \<noteq> {0::'a} \<Longrightarrow> complete (span A)
 2. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
thus "complete (real_vector.span A)"
[PROOF STATE]
proof (prove)
using this:
complete (span B)

goal (1 subgoal):
 1. complete (span A)
[PROOF STEP]
unfolding BT
[PROOF STATE]
proof (prove)
using this:
complete (span A)

goal (1 subgoal):
 1. complete (span A)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
complete (span A)

goal (1 subgoal):
 1. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (A \<noteq> {} \<and> A \<noteq> {0::'a})

goal (1 subgoal):
 1. \<not> (A \<noteq> {} \<and> A \<noteq> {0::'a}) \<Longrightarrow> complete (span A)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> (A \<noteq> {} \<and> A \<noteq> {0::'a})

goal (1 subgoal):
 1. complete (span A)
[PROOF STEP]
using complete_singleton
[PROOF STATE]
proof (prove)
using this:
\<not> (A \<noteq> {} \<and> A \<noteq> {0::'a})
complete {?s}

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ideal_eq_UNIV_iff_contains_one: "ideal B = UNIV \<longleftrightarrow> 1 \<in> ideal B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ideal B = UNIV) = ((1::'a) \<in> ideal B)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ideal B = UNIV \<Longrightarrow> (1::'a) \<in> ideal B
 2. (1::'a) \<in> ideal B \<Longrightarrow> ideal B = UNIV
[PROOF STEP]
assume *: "1 \<in> ideal B"
[PROOF STATE]
proof (state)
this:
(1::'a) \<in> ideal B

goal (2 subgoals):
 1. ideal B = UNIV \<Longrightarrow> (1::'a) \<in> ideal B
 2. (1::'a) \<in> ideal B \<Longrightarrow> ideal B = UNIV
[PROOF STEP]
show "ideal B = UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ideal B = UNIV
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ideal B \<subseteq> UNIV
 2. UNIV \<subseteq> ideal B
[PROOF STEP]
show "UNIV \<subseteq> ideal B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV \<subseteq> ideal B
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> x \<in> ideal B
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> x \<in> ideal B
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
(1::'a) \<in> ideal B
[PROOF STEP]
have "x * 1 \<in> ideal B"
[PROOF STATE]
proof (prove)
using this:
(1::'a) \<in> ideal B

goal (1 subgoal):
 1. x * (1::'a) \<in> ideal B
[PROOF STEP]
by (rule ideal.span_scale)
[PROOF STATE]
proof (state)
this:
x * (1::'a) \<in> ideal B

goal (1 subgoal):
 1. \<And>x. x \<in> UNIV \<Longrightarrow> x \<in> ideal B
[PROOF STEP]
thus "x \<in> ideal B"
[PROOF STATE]
proof (prove)
using this:
x * (1::'a) \<in> ideal B

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
UNIV \<subseteq> ideal B

goal (1 subgoal):
 1. ideal B \<subseteq> UNIV
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
ideal B = UNIV

goal (1 subgoal):
 1. ideal B = UNIV \<Longrightarrow> (1::'a) \<in> ideal B
[PROOF STEP]
qed simp


[STATEMENT]
lemma linf_norm_zero_vec [simp]: "\<parallel>0\<^sub>v n :: 'a :: ordered_ab_group_add_abs vec\<parallel>\<^sub>\<infinity> = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<parallel>0\<^sub>v n\<parallel>\<^sub>\<infinity> = (0::'a)
[PROOF STEP]
by (induct n, simp add: zero_vec_def, auto simp: zero_vec_Suc)


[STATEMENT]
lemma card_equiv_class_same_size:
  assumes "equiv A R"
  assumes "\<And>F. F \<in> A // R \<Longrightarrow> card F = k"
  shows "card A = k * card (A // R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card A = k * card (A // R)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card A = k * card (A // R)
[PROOF STEP]
have "(\<lambda>x. True) respects R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. True) respects R
[PROOF STEP]
by (simp add: congruentI)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. True) respects R

goal (1 subgoal):
 1. card A = k * card (A // R)
[PROOF STEP]
from \<open>equiv A R\<close> \<open>\<And>F. F \<in> A // R \<Longrightarrow> card F = k\<close> this
[PROOF STATE]
proof (chain)
picking this:
equiv A R
?F \<in> A // R \<Longrightarrow> card ?F = k
(\<lambda>x. True) respects R
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
equiv A R
?F \<in> A // R \<Longrightarrow> card ?F = k
(\<lambda>x. True) respects R

goal (1 subgoal):
 1. card A = k * card (A // R)
[PROOF STEP]
using card_equiv_class_restricted_same_size[where P="\<lambda>x. True"]
[PROOF STATE]
proof (prove)
using this:
equiv A R
?F \<in> A // R \<Longrightarrow> card ?F = k
(\<lambda>x. True) respects R
\<lbrakk>equiv ?A ?R; (\<lambda>x. True) respects ?R; \<And>F. F \<in> {x \<in> ?A. True} // ?R \<Longrightarrow> card F = ?k\<rbrakk> \<Longrightarrow> card {x \<in> ?A. True} = ?k * card ({x \<in> ?A. True} // ?R)

goal (1 subgoal):
 1. card A = k * card (A // R)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card A = k * card (A // R)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma connected_simple_path_endless:
  assumes "simple_path c"
  shows "connected(path_image c - {pathstart c,pathfinish c})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connected (path_image c - {pathstart c, pathfinish c})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. connected (path_image c - {pathstart c, pathfinish c})
[PROOF STEP]
have "continuous_on {0<..<1} c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {0<..<1} c
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
simple_path c

goal (1 subgoal):
 1. continuous_on {0<..<1} c
[PROOF STEP]
by (simp add: simple_path_def continuous_on_path path_def subset_iff)
[PROOF STATE]
proof (state)
this:
continuous_on {0<..<1} c

goal (1 subgoal):
 1. connected (path_image c - {pathstart c, pathfinish c})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
continuous_on {0<..<1} c
[PROOF STEP]
have "connected (c ` {0<..<1})"
[PROOF STATE]
proof (prove)
using this:
continuous_on {0<..<1} c

goal (1 subgoal):
 1. connected (c ` {0<..<1})
[PROOF STEP]
using connected_Ioo connected_continuous_image
[PROOF STATE]
proof (prove)
using this:
continuous_on {0<..<1} c
connected {?a<..<?b}
\<lbrakk>continuous_on ?s ?f; connected ?s\<rbrakk> \<Longrightarrow> connected (?f ` ?s)

goal (1 subgoal):
 1. connected (c ` {0<..<1})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
connected (c ` {0<..<1})

goal (1 subgoal):
 1. connected (path_image c - {pathstart c, pathfinish c})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
connected (c ` {0<..<1})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
connected (c ` {0<..<1})

goal (1 subgoal):
 1. connected (path_image c - {pathstart c, pathfinish c})
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
connected (c ` {0<..<1})
simple_path c

goal (1 subgoal):
 1. connected (path_image c - {pathstart c, pathfinish c})
[PROOF STEP]
by (simp add: simple_path_endless)
[PROOF STATE]
proof (state)
this:
connected (path_image c - {pathstart c, pathfinish c})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closure_intersection [intro]:
  fixes A::"('a::finite) lang"
  assumes "regular A" "regular B"
  shows "regular (A \<inter> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. regular (A \<inter> B)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. regular (A \<inter> B)
[PROOF STEP]
have "A \<inter> B = - (- A \<union> - B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<inter> B = - (- A \<union> - B)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A \<inter> B = - (- A \<union> - B)

goal (1 subgoal):
 1. regular (A \<inter> B)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
A \<inter> B = - (- A \<union> - B)

goal (1 subgoal):
 1. regular (A \<inter> B)
[PROOF STEP]
have "regular (- (- A \<union> - B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. regular (- (- A \<union> - B))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
regular A
regular B

goal (1 subgoal):
 1. regular (- (- A \<union> - B))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
regular (- (- A \<union> - B))

goal (1 subgoal):
 1. regular (A \<inter> B)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
A \<inter> B = - (- A \<union> - B)
regular (- (- A \<union> - B))
[PROOF STEP]
show "regular (A \<inter> B)"
[PROOF STATE]
proof (prove)
using this:
A \<inter> B = - (- A \<union> - B)
regular (- (- A \<union> - B))

goal (1 subgoal):
 1. regular (A \<inter> B)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
regular (A \<inter> B)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Digamma_real_ge_three_halves_pos:
  assumes "x \<ge> 3/2"
  shows   "Digamma (x :: real) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Digamma x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < Digamma x
[PROOF STEP]
have "0 < Digamma (3/2 :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Digamma (3 / 2)
[PROOF STEP]
by (fact Digamma_real_three_halves_pos)
[PROOF STATE]
proof (state)
this:
0 < Digamma (3 / 2)

goal (1 subgoal):
 1. 0 < Digamma x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
0 < Digamma (3 / 2)

goal (1 subgoal):
 1. 0 < Digamma x
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
3 / 2 \<le> x
[PROOF STEP]
have "\<dots> \<le> Digamma x"
[PROOF STATE]
proof (prove)
using this:
3 / 2 \<le> x

goal (1 subgoal):
 1. Digamma (3 / 2) \<le> Digamma x
[PROOF STEP]
by (intro Polygamma_real_mono) simp_all
[PROOF STATE]
proof (state)
this:
Digamma (3 / 2) \<le> Digamma x

goal (1 subgoal):
 1. 0 < Digamma x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
0 < Digamma x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < Digamma x

goal (1 subgoal):
 1. 0 < Digamma x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
0 < Digamma x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma two_block_non_interfering_row_comp1:
  assumes "i <dim_row A"
  shows "row (two_block_non_interfering A B) i = row A i @\<^sub>v (0\<^sub>v (dim_col B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row (two_block_non_interfering A B) i = row A i @\<^sub>v 0\<^sub>v (dim_col B)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
i < dim_row A

goal (1 subgoal):
 1. row (two_block_non_interfering A B) i = row A i @\<^sub>v 0\<^sub>v (dim_col B)
[PROOF STEP]
by auto