[STATEMENT]
lemma (in seminorm) diff_subadditive:
  assumes "vectorspace V"
  shows "x \<in> V \<Longrightarrow> y \<in> V \<Longrightarrow> \<parallel>x - y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>y\<parallel>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> \<parallel>x - y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>y\<parallel>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> \<parallel>x - y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>y\<parallel>
[PROOF STEP]
interpret vectorspace V
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vectorspace V
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> \<parallel>x - y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>y\<parallel>
[PROOF STEP]
assume x: "x \<in> V" and y: "y \<in> V"
[PROOF STATE]
proof (state)
this:
x \<in> V
y \<in> V

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

goal (1 subgoal):
 1. x - y = x + - 1 \<cdot> y
[PROOF STEP]
by (simp add: diff_eq2 negate_eq2a)
[PROOF STATE]
proof (state)
this:
x - y = x + - 1 \<cdot> y

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

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

goal (1 subgoal):
 1. \<parallel>x + - 1 \<cdot> y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>- 1 \<cdot> y\<parallel>
[PROOF STEP]
by (simp add: subadditive)
[PROOF STATE]
proof (state)
this:
\<parallel>x + - 1 \<cdot> y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>- 1 \<cdot> y\<parallel>

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

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

goal (1 subgoal):
 1. \<parallel>- 1 \<cdot> y\<parallel> = \<bar>- 1\<bar> * \<parallel>y\<parallel>
[PROOF STEP]
by (rule abs_homogenous)
[PROOF STATE]
proof (state)
this:
\<parallel>- 1 \<cdot> y\<parallel> = \<bar>- 1\<bar> * \<parallel>y\<parallel>

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

goal (1 subgoal):
 1. \<lbrakk>x \<in> V; y \<in> V\<rbrakk> \<Longrightarrow> \<parallel>x - y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>y\<parallel>
[PROOF STEP]
have "\<dots> = \<parallel>y\<parallel>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>- 1\<bar> * \<parallel>y\<parallel> = \<parallel>y\<parallel>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>- 1\<bar> * \<parallel>y\<parallel> = \<parallel>y\<parallel>

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

goal (1 subgoal):
 1. \<parallel>x - y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>y\<parallel>
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<parallel>x - y\<parallel> \<le> \<parallel>x\<parallel> + \<parallel>y\<parallel>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma in_set_polychain_ofD: "ab \<in> set (polychain_of x xs) \<Longrightarrow> (snd ab - fst ab) \<in> set xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ab \<in> set (polychain_of x xs) \<Longrightarrow> snd ab - fst ab \<in> set xs
[PROOF STEP]
by (induct xs arbitrary: x) auto


[STATEMENT]
lemma lt2p_lem: "LENGTH('a) \<le> n \<Longrightarrow> uint w < 2 ^ n"
  for w :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LENGTH('a) \<le> n \<Longrightarrow> uint w < 2 ^ n
[PROOF STEP]
using uint_bounded [of w]
[PROOF STATE]
proof (prove)
using this:
uint w < 2 ^ LENGTH('a)

goal (1 subgoal):
 1. LENGTH('a) \<le> n \<Longrightarrow> uint w < 2 ^ n
[PROOF STEP]
by (rule less_le_trans) simp


[STATEMENT]
lemma fv_simp_DISJ_eq:
  "finite \<Q> \<Longrightarrow> simp (DISJ \<Q>) \<noteq> Bool False \<Longrightarrow> \<forall>Q \<in> \<Q>. simplified Q \<and> fv Q = A \<Longrightarrow> fv (simp (DISJ \<Q>)) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite \<Q>; simp (DISJ \<Q>) \<noteq> Bool False; \<forall>Q\<in>\<Q>. simplified Q \<and> fv Q = A\<rbrakk> \<Longrightarrow> fv (simp (DISJ \<Q>)) = A
[PROOF STEP]
by (auto simp: DISJ_def fv_simp_foldr1_Disj)


[STATEMENT]
lemma ring_finite_field_ops_int: "ring_ops (finite_field_ops_int p) mod_ring_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ring_ops (finite_field_ops_int p) mod_ring_rel
[PROOF STEP]
by (unfold_locales, auto simp:
  finite_field_ops_int_def
  bi_unique_mod_ring_rel
  right_total_mod_ring_rel
  mod_ring_plus
  mod_ring_minus
  mod_ring_uminus
  mod_ring_mult
  mod_ring_eq
  mod_ring_0
  mod_ring_1
  Domainp_mod_ring_rel)


[STATEMENT]
lemma irreflPE:
  assumes "irreflP r"
  obtains "\<forall>a. \<not> r a a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a. \<not> r a a \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
irreflP r

goal (1 subgoal):
 1. (\<forall>a. \<not> r a a \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding irrefl_def
[PROOF STATE]
proof (prove)
using this:
\<forall>a. (a, a) \<notin> {(x, y). r x y}

goal (1 subgoal):
 1. (\<forall>a. \<not> r a a \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast


[STATEMENT]
lemma eval_lpoly_eq_dot_prod_split1:
  assumes "(x, y) = split_n_m_x (dim_vec c) (dim_vec b) X"
  shows"(vec_to_lpoly c) \<lbrace>\<langle>X\<rangle>\<rbrace> =  c \<bullet> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
have *: "(vec_to_lpoly c) \<lbrace>\<langle>X\<rangle>\<rbrace> =
           (\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = (\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)
[PROOF STEP]
using linear_poly_sum sum.cong eval_poly_with_sum
[PROOF STATE]
proof (prove)
using this:
?p \<lbrace> ?v \<rbrace> = (\<Sum>x\<in>vars ?p. Abstract_Linear_Poly.coeff ?p x *R ?v x)
\<lbrakk>?A = ?B; \<And>x. x \<in> ?B \<Longrightarrow> ?g x = ?h x\<rbrakk> \<Longrightarrow> sum ?g ?A = sum ?h ?B
?v \<lbrace> ?X \<rbrace> = (\<Sum>x\<in>vars ?v. Abstract_Linear_Poly.coeff ?v x * ?X x)

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = (\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = (\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = (\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
have "... = (\<Sum>i\<in>{0..<dim_vec c}. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)
[PROOF STEP]
using vars_subset_dim_vec_to_lpoly_dim[of c] linear_poly_sum[of "vec_to_lpoly c" "\<langle>X\<rangle>"]
      eval_poly_with_sum_superset[of "{0..<dim_vec c}" "vec_to_lpoly c" "\<langle>X\<rangle>"]
[PROOF STATE]
proof (prove)
using this:
vars (vec_to_lpoly c) \<subseteq> {0..<dim_vec c}
vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = (\<Sum>x\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) x *R \<langle>X\<rangle> x)
\<lbrakk>finite {0..<dim_vec c}; vars (vec_to_lpoly c) \<subseteq> {0..<dim_vec c}\<rbrakk> \<Longrightarrow> vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = (\<Sum>x = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) x * \<langle>X\<rangle> x)

goal (1 subgoal):
 1. (\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<in>vars (vec_to_lpoly c). Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i)

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
have "... = (\<Sum>i\<in>{0..<dim_vec c}. c$i * x$i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. c $ i * x $ i)
[PROOF STEP]
using split_access_fst_1[of _ "dim_vec c" "(dim_vec c) + (dim_vec b)" X x y]
      split_access_snd_1[of "dim_vec c" _ "((dim_vec c) + (dim_vec b))" X x y]
      vec_to_lin_poly_coeff_access[of _ c]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?k < dim_vec c; split_n_m_x (dim_vec c) (dim_vec b) X = (x, y)\<rbrakk> \<Longrightarrow> x $ ?k = \<langle>X\<rangle> ?k
\<lbrakk>dim_vec c \<le> ?k; ?k < dim_vec c + dim_vec b; split_n_m_x (dim_vec c) (dim_vec b) X = (x, y)\<rbrakk> \<Longrightarrow> y $ (?k - dim_vec c) = \<langle>X\<rangle> ?k
?x < dim_vec c \<Longrightarrow> c $ ?x = Abstract_Linear_Poly.coeff (vec_to_lpoly c) ?x

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. c $ i * x $ i)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?k < dim_vec c; split_n_m_x (dim_vec c) (dim_vec b) X = (x, y)\<rbrakk> \<Longrightarrow> x $ ?k = \<langle>X\<rangle> ?k
\<lbrakk>dim_vec c \<le> ?k; ?k < dim_vec c + dim_vec b; split_n_m_x (dim_vec c) (dim_vec b) X = (x, y)\<rbrakk> \<Longrightarrow> y $ (?k - dim_vec c) = \<langle>X\<rangle> ?k
?x < dim_vec c \<Longrightarrow> c $ ?x = Abstract_Linear_Poly.coeff (vec_to_lpoly c) ?x
(x, y) = split_n_m_x (dim_vec c) (dim_vec b) X

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. c $ i * x $ i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. c $ i * x $ i)

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec c. Abstract_Linear_Poly.coeff (vec_to_lpoly c) i * \<langle>X\<rangle> i) = (\<Sum>i = 0..<dim_vec c. c $ i * x $ i)

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
have "... = c \<bullet> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec c. c $ i * x $ i) = c \<bullet> x
[PROOF STEP]
unfolding scalar_prod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec c. c $ i * x $ i) = (\<Sum>i = 0..<dim_vec x. c $ i * x $ i)
[PROOF STEP]
using split_vec_dims(1)[of "dim_vec c" "(dim_vec c) + (dim_vec b)" X x y] assms
[PROOF STATE]
proof (prove)
using this:
split_n_m_x (dim_vec c) (dim_vec b) X = (x, y) \<Longrightarrow> dim_vec x = dim_vec c
(x, y) = split_n_m_x (dim_vec c) (dim_vec b) X

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec c. c $ i * x $ i) = (\<Sum>i = 0..<dim_vec x. c $ i * x $ i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec c. c $ i * x $ i) = c \<bullet> x

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x

goal (1 subgoal):
 1. vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
vec_to_lpoly c \<lbrace> \<langle>X\<rangle> \<rbrace> = c \<bullet> x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma map_index'_comp[simp]: "map_index' n f (map_index' n g xs) = map_index' n (\<lambda>n. f n o g n) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_index' n f (map_index' n g xs) = map_index' n (\<lambda>n. f n \<circ> g n) xs
[PROOF STEP]
by (induct xs arbitrary: n) auto


[STATEMENT]
lemma ring_of_sets_iff: "ring_of_sets \<Omega> M \<longleftrightarrow> M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ring_of_sets \<Omega> M = (M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ring_of_sets \<Omega> M \<Longrightarrow> M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)
 2. M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M) \<Longrightarrow> ring_of_sets \<Omega> M
[PROOF STEP]
assume "ring_of_sets \<Omega> M"
[PROOF STATE]
proof (state)
this:
ring_of_sets \<Omega> M

goal (2 subgoals):
 1. ring_of_sets \<Omega> M \<Longrightarrow> M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)
 2. M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M) \<Longrightarrow> ring_of_sets \<Omega> M
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ring_of_sets \<Omega> M
[PROOF STEP]
interpret ring_of_sets \<Omega> M
[PROOF STATE]
proof (prove)
using this:
ring_of_sets \<Omega> M

goal (1 subgoal):
 1. ring_of_sets \<Omega> M
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ring_of_sets \<Omega> M \<Longrightarrow> M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)
 2. M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M) \<Longrightarrow> ring_of_sets \<Omega> M
[PROOF STEP]
show "M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)
[PROOF STEP]
using space_closed
[PROOF STATE]
proof (prove)
using this:
M \<subseteq> Pow \<Omega>

goal (1 subgoal):
 1. M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M)

goal (1 subgoal):
 1. M \<subseteq> Pow \<Omega> \<and> {} \<in> M \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a \<union> b \<in> M) \<and> (\<forall>a\<in>M. \<forall>b\<in>M. a - b \<in> M) \<Longrightarrow> ring_of_sets \<Omega> M
[PROOF STEP]
qed (auto intro!: ring_of_setsI)


[STATEMENT]
lemma list_empty_size: "list idle = [] \<longleftrightarrow> 0 = size idle"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Idle.list idle = []) = (0 = size idle)
[PROOF STEP]
by (simp add: list_empty size_empty)


[STATEMENT]
lemma (in Corps) OstrowskiTr1:"\<lbrakk> valuation K v; s \<in> carrier K; t \<in> carrier K;
      0 \<le> (v s); v t < 0\<rbrakk>  \<Longrightarrow> s \<plusminus> t \<noteq> \<zero>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; s \<in> carrier K; t \<in> carrier K; 0 \<le> v s; v t < 0\<rbrakk> \<Longrightarrow> s \<plusminus> t \<noteq> \<zero>
[PROOF STEP]
apply (rule contrapos_pp, simp+,
       cut_tac field_is_ring, frule Ring.ring_is_ag[of "K"],
       simp only:aGroup.ag_plus_zero[THEN sym, of "K" "s" "t"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; -\<^sub>a t \<in> carrier K; t \<in> carrier K; 0 \<le> v (-\<^sub>a t); v t < 0; s = -\<^sub>a t; Ring K; aGroup K\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (simp add:val_minus_eq[of "v" "t"])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma plus_complex_interval_tendsto:
  "A \<longlonglongrightarrow>\<^sub>c a \<Longrightarrow> B \<longlonglongrightarrow>\<^sub>c b \<Longrightarrow> (\<lambda>i. A i + B i) \<longlonglongrightarrow>\<^sub>c a + b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<longlonglongrightarrow>\<^sub>c a; B \<longlonglongrightarrow>\<^sub>c b\<rbrakk> \<Longrightarrow> (\<lambda>i. A i + B i) \<longlonglongrightarrow>\<^sub>c a + b
[PROOF STEP]
unfolding complex_interval_tendsto_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(Re_interval \<circ> A) \<longlonglongrightarrow>\<^sub>i Re a \<and> (Im_interval \<circ> A) \<longlonglongrightarrow>\<^sub>i Im a; (Re_interval \<circ> B) \<longlonglongrightarrow>\<^sub>i Re b \<and> (Im_interval \<circ> B) \<longlonglongrightarrow>\<^sub>i Im b\<rbrakk> \<Longrightarrow> (Re_interval \<circ> (\<lambda>i. A i + B i)) \<longlonglongrightarrow>\<^sub>i Re (a + b) \<and> (Im_interval \<circ> (\<lambda>i. A i + B i)) \<longlonglongrightarrow>\<^sub>i Im (a + b)
[PROOF STEP]
by (auto intro!: plus_interval_tendsto simp: o_def Re_interval_plus Im_interval_plus)


[STATEMENT]
lemma prime_dvd_power:
  "prime p \<Longrightarrow> p dvd x ^ n \<Longrightarrow> p dvd x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>prime p; p dvd x ^ n\<rbrakk> \<Longrightarrow> p dvd x
[PROOF STEP]
by (auto dest!: prime_elem_dvd_power simp: prime_def)


[STATEMENT]
lemma conv_radius_geI_ex:
  fixes f :: "nat \<Rightarrow> 'a :: {banach, real_normed_div_algebra}"
  assumes "\<And>r. 0 < r \<Longrightarrow> ereal r < R \<Longrightarrow> \<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z^n)"
  shows   "conv_radius f \<ge> R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. R \<le> conv_radius f
[PROOF STEP]
proof (rule linorder_cases[of "conv_radius f" R])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. conv_radius f < R \<Longrightarrow> R \<le> conv_radius f
 2. conv_radius f = R \<Longrightarrow> R \<le> conv_radius f
 3. R < conv_radius f \<Longrightarrow> R \<le> conv_radius f
[PROOF STEP]
assume R: "conv_radius f < R"
[PROOF STATE]
proof (state)
this:
conv_radius f < R

goal (3 subgoals):
 1. conv_radius f < R \<Longrightarrow> R \<le> conv_radius f
 2. conv_radius f = R \<Longrightarrow> R \<le> conv_radius f
 3. R < conv_radius f \<Longrightarrow> R \<le> conv_radius f
[PROOF STEP]
with conv_radius_nonneg[of f]
[PROOF STATE]
proof (chain)
picking this:
0 \<le> conv_radius f
conv_radius f < R
[PROOF STEP]
obtain conv_radius'
    where [simp]: "conv_radius f = ereal conv_radius'"
[PROOF STATE]
proof (prove)
using this:
0 \<le> conv_radius f
conv_radius f < R

goal (1 subgoal):
 1. (\<And>conv_radius'. conv_radius f = ereal conv_radius' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases "conv_radius f") simp_all
[PROOF STATE]
proof (state)
this:
conv_radius f = ereal conv_radius'

goal (3 subgoals):
 1. conv_radius f < R \<Longrightarrow> R \<le> conv_radius f
 2. conv_radius f = R \<Longrightarrow> R \<le> conv_radius f
 3. R < conv_radius f \<Longrightarrow> R \<le> conv_radius f
[PROOF STEP]
define r where "r = (if R = \<infinity> then conv_radius' + 1 else (real_of_ereal R + conv_radius') / 2)"
[PROOF STATE]
proof (state)
this:
r = (if R = \<infinity> then conv_radius' + 1 else (real_of_ereal R + conv_radius') / 2)

goal (3 subgoals):
 1. conv_radius f < R \<Longrightarrow> R \<le> conv_radius f
 2. conv_radius f = R \<Longrightarrow> R \<le> conv_radius f
 3. R < conv_radius f \<Longrightarrow> R \<le> conv_radius f
[PROOF STEP]
from R conv_radius_nonneg[of f]
[PROOF STATE]
proof (chain)
picking this:
conv_radius f < R
0 \<le> conv_radius f
[PROOF STEP]
have "0 < r \<and> ereal r < R \<and> ereal r > conv_radius f"
[PROOF STATE]
proof (prove)
using this:
conv_radius f < R
0 \<le> conv_radius f

goal (1 subgoal):
 1. 0 < r \<and> ereal r < R \<and> conv_radius f < ereal r
[PROOF STEP]
unfolding r_def
[PROOF STATE]
proof (prove)
using this:
conv_radius f < R
0 \<le> conv_radius f

goal (1 subgoal):
 1. 0 < (if R = \<infinity> then conv_radius' + 1 else (real_of_ereal R + conv_radius') / 2) \<and> ereal (if R = \<infinity> then conv_radius' + 1 else (real_of_ereal R + conv_radius') / 2) < R \<and> conv_radius f < ereal (if R = \<infinity> then conv_radius' + 1 else (real_of_ereal R + conv_radius') / 2)
[PROOF STEP]
by (cases R) (auto simp: r_def field_simps)
[PROOF STATE]
proof (state)
this:
0 < r \<and> ereal r < R \<and> conv_radius f < ereal r

goal (3 subgoals):
 1. conv_radius f < R \<Longrightarrow> R \<le> conv_radius f
 2. conv_radius f = R \<Longrightarrow> R \<le> conv_radius f
 3. R < conv_radius f \<Longrightarrow> R \<le> conv_radius f
[PROOF STEP]
with assms(1)[of r]
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>0 < r; ereal r < R\<rbrakk> \<Longrightarrow> \<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z ^ n)
0 < r \<and> ereal r < R \<and> conv_radius f < ereal r
[PROOF STEP]
obtain z where "norm z > conv_radius f" "summable (\<lambda>n. f n * z^n)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < r; ereal r < R\<rbrakk> \<Longrightarrow> \<exists>z. norm z = r \<and> summable (\<lambda>n. f n * z ^ n)
0 < r \<and> ereal r < R \<and> conv_radius f < ereal r

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>conv_radius f < ereal (norm z); summable (\<lambda>n. f n * z ^ n)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
conv_radius f < ereal (norm z)
summable (\<lambda>n. f n * z ^ n)

goal (3 subgoals):
 1. conv_radius f < R \<Longrightarrow> R \<le> conv_radius f
 2. conv_radius f = R \<Longrightarrow> R \<le> conv_radius f
 3. R < conv_radius f \<Longrightarrow> R \<le> conv_radius f
[PROOF STEP]
with not_summable_outside_conv_radius[of f z]
[PROOF STATE]
proof (chain)
picking this:
conv_radius f < ereal (norm z) \<Longrightarrow> \<not> summable (\<lambda>n. f n * z ^ n)
conv_radius f < ereal (norm z)
summable (\<lambda>n. f n * z ^ n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
conv_radius f < ereal (norm z) \<Longrightarrow> \<not> summable (\<lambda>n. f n * z ^ n)
conv_radius f < ereal (norm z)
summable (\<lambda>n. f n * z ^ n)

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

goal (2 subgoals):
 1. conv_radius f = R \<Longrightarrow> R \<le> conv_radius f
 2. R < conv_radius f \<Longrightarrow> R \<le> conv_radius f
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma gronwall_general_segment:
  fixes a b::real
  assumes "\<And>t. t \<in> closed_segment a b \<Longrightarrow> g t \<le> C + K * integral (closed_segment a t) g"
    and "continuous_on (closed_segment a b) g"
    and "\<And>t. t \<in> closed_segment a b \<Longrightarrow> 0 \<le> g t"
    and "0 < C"
    and "0 < K"
    and "t \<in> closed_segment a b"
  shows "g t \<le> C * exp (K * abs (t - a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
 2. \<not> ?P \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
assume "a \<le> b"
[PROOF STATE]
proof (state)
this:
a \<le> b

goal (2 subgoals):
 1. ?P \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
 2. \<not> ?P \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<le> b
[PROOF STEP]
have *: "abs (t - a) = t -a"
[PROOF STATE]
proof (prove)
using this:
a \<le> b

goal (1 subgoal):
 1. \<bar>t - a\<bar> = t - a
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<le> b
?t \<in> closed_segment a b \<Longrightarrow> g ?t \<le> C + K * integral (closed_segment a ?t) g
continuous_on (closed_segment a b) g
?t \<in> closed_segment a b \<Longrightarrow> 0 \<le> g ?t
0 < C
0 < K
t \<in> closed_segment a b

goal (1 subgoal):
 1. \<bar>t - a\<bar> = t - a
[PROOF STEP]
by (auto simp: closed_segment_eq_real_ivl)
[PROOF STATE]
proof (state)
this:
\<bar>t - a\<bar> = t - a

goal (2 subgoals):
 1. ?P \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
 2. \<not> ?P \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g t \<le> C * exp (K * (t - a))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?t \<in> closed_segment a b \<Longrightarrow> g ?t \<le> C + K * integral (closed_segment a ?t) g
continuous_on (closed_segment a b) g
?t \<in> closed_segment a b \<Longrightarrow> 0 \<le> g ?t
0 < C
0 < K
t \<in> closed_segment a b

goal (1 subgoal):
 1. g t \<le> C * exp (K * (t - a))
[PROOF STEP]
by (intro gronwall_general[where b=b]) (auto intro!: simp: closed_segment_eq_real_ivl \<open>a \<le> b\<close>)
[PROOF STATE]
proof (state)
this:
g t \<le> C * exp (K * \<bar>t - a\<bar>)

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
assume "\<not>a \<le> b"
[PROOF STATE]
proof (state)
this:
\<not> a \<le> b

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> a \<le> b
[PROOF STEP]
have *: "K * abs (t - a) = - K * (t - a)"
[PROOF STATE]
proof (prove)
using this:
\<not> a \<le> b

goal (1 subgoal):
 1. K * \<bar>t - a\<bar> = - K * (t - a)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<not> a \<le> b
?t \<in> closed_segment a b \<Longrightarrow> g ?t \<le> C + K * integral (closed_segment a ?t) g
continuous_on (closed_segment a b) g
?t \<in> closed_segment a b \<Longrightarrow> 0 \<le> g ?t
0 < C
0 < K
t \<in> closed_segment a b

goal (1 subgoal):
 1. K * \<bar>t - a\<bar> = - K * (t - a)
[PROOF STEP]
by (auto simp: closed_segment_eq_real_ivl algebra_simps)
[PROOF STATE]
proof (state)
this:
K * \<bar>t - a\<bar> = - K * (t - a)

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
K * \<bar>t - a\<bar> = - K * (t - a)

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
fix s :: real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
assume a1: "b \<le> s"
[PROOF STATE]
proof (state)
this:
b \<le> s

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
assume a2: "s \<le> a"
[PROOF STATE]
proof (state)
this:
s \<le> a

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
assume a3: "\<And>t. b \<le> t \<and> t \<le> a \<Longrightarrow> g t \<le> C + K * integral (if a \<le> t then {a..t} else {t..a}) g"
[PROOF STATE]
proof (state)
this:
b \<le> ?t \<and> ?t \<le> a \<Longrightarrow> g ?t \<le> C + K * integral (if a \<le> ?t then {a..?t} else {?t..a}) g

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
have "s = a \<or> s < a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s = a \<or> s < a
[PROOF STEP]
using a2
[PROOF STATE]
proof (prove)
using this:
s \<le> a

goal (1 subgoal):
 1. s = a \<or> s < a
[PROOF STEP]
by (meson less_eq_real_def)
[PROOF STATE]
proof (state)
this:
s = a \<or> s < a

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
s = a \<or> s < a
[PROOF STEP]
have "g s \<le> C + K * integral {s..a} g"
[PROOF STATE]
proof (prove)
using this:
s = a \<or> s < a

goal (1 subgoal):
 1. g s \<le> C + K * integral {s..a} g
[PROOF STEP]
using a3 a1
[PROOF STATE]
proof (prove)
using this:
s = a \<or> s < a
b \<le> ?t \<and> ?t \<le> a \<Longrightarrow> g ?t \<le> C + K * integral (if a \<le> ?t then {a..?t} else {?t..a}) g
b \<le> s

goal (1 subgoal):
 1. g s \<le> C + K * integral {s..a} g
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
g s \<le> C + K * integral {s..a} g

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
\<lbrakk>b \<le> ?s2; ?s2 \<le> a; \<And>t. b \<le> t \<and> t \<le> a \<Longrightarrow> g t \<le> C + K * integral (if a \<le> t then {a..t} else {t..a}) g\<rbrakk> \<Longrightarrow> g ?s2 \<le> C + K * integral {?s2..a} g

goal (1 subgoal):
 1. \<not> a \<le> b \<Longrightarrow> g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>b \<le> ?s2; ?s2 \<le> a; \<And>t. b \<le> t \<and> t \<le> a \<Longrightarrow> g t \<le> C + K * integral (if a \<le> t then {a..t} else {t..a}) g\<rbrakk> \<Longrightarrow> g ?s2 \<le> C + K * integral {?s2..a} g
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>b \<le> ?s2; ?s2 \<le> a; \<And>t. b \<le> t \<and> t \<le> a \<Longrightarrow> g t \<le> C + K * integral (if a \<le> t then {a..t} else {t..a}) g\<rbrakk> \<Longrightarrow> g ?s2 \<le> C + K * integral {?s2..a} g

goal (1 subgoal):
 1. g t \<le> C * exp (K * \<bar>t - a\<bar>)
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>b \<le> ?s2; ?s2 \<le> a; \<And>t. b \<le> t \<and> t \<le> a \<Longrightarrow> g t \<le> C + K * integral (if a \<le> t then {a..t} else {t..a}) g\<rbrakk> \<Longrightarrow> g ?s2 \<le> C + K * integral {?s2..a} g

goal (1 subgoal):
 1. g t \<le> C * exp (- K * (t - a))
[PROOF STEP]
using assms  \<open>\<not>a \<le> b\<close>
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>b \<le> ?s2; ?s2 \<le> a; \<And>t. b \<le> t \<and> t \<le> a \<Longrightarrow> g t \<le> C + K * integral (if a \<le> t then {a..t} else {t..a}) g\<rbrakk> \<Longrightarrow> g ?s2 \<le> C + K * integral {?s2..a} g
?t \<in> closed_segment a b \<Longrightarrow> g ?t \<le> C + K * integral (closed_segment a ?t) g
continuous_on (closed_segment a b) g
?t \<in> closed_segment a b \<Longrightarrow> 0 \<le> g ?t
0 < C
0 < K
t \<in> closed_segment a b
\<not> a \<le> b

goal (1 subgoal):
 1. g t \<le> C * exp (- K * (t - a))
[PROOF STEP]
by (intro gronwall_general_left)
      (auto intro!: simp: closed_segment_eq_real_ivl)
[PROOF STATE]
proof (state)
this:
g t \<le> C * exp (K * \<bar>t - a\<bar>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in LCD) Diff1_foldSetD:
  "\<lbrakk>(A - {x}, y) \<in> foldSetD D f e; x \<in> A; A \<subseteq> B\<rbrakk> \<Longrightarrow>
  (A, f x y) \<in> foldSetD D f e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(A\<setminus>{x}, y) \<in> foldSetD D (\<cdot>) e; x \<in> A; A \<subseteq> B\<rbrakk> \<Longrightarrow> (A, x \<cdot> y) \<in> foldSetD D (\<cdot>) e
[PROOF STEP]
by (meson Diff1_foldSetD f_closed local.foldSetD_closed subsetCE)


[STATEMENT]
lemma fst_set_zip_map_fst:
  "length xs = length ys \<Longrightarrow> fst ` (set (zip (map fst xs) ys)) = fst ` (set xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length xs = length ys \<Longrightarrow> fst ` set (zip (map fst xs) ys) = fst ` set xs
[PROOF STEP]
by (induct xs ys rule: list_induct2) auto


[STATEMENT]
lemma permutes_iff: "p permutes {..<n} \<Longrightarrow> i < n \<Longrightarrow> j < n \<Longrightarrow> p i = p j \<longleftrightarrow> i = j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>p permutes {..<n}; i < n; j < n\<rbrakk> \<Longrightarrow> (p i = p j) = (i = j)
[PROOF STEP]
by (metis permutes_inverses(2))


[STATEMENT]
lemma one_notin_unit_dic [simp]:
  shows "1\<^sub>h \<notin> unit_disc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1\<^sub>h \<notin> unit_disc
[PROOF STEP]
unfolding unit_disc_def disc_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1\<^sub>h \<notin> Collect (in_ocircline ounit_circle)
[PROOF STEP]
by (simp, transfer, transfer) (simp add: Let_def vec_cnj_def)


[STATEMENT]
lemma ereal_add_le_add_iff:
  fixes a b c :: ereal
  shows "c + a \<le> c + b \<longleftrightarrow>
    a \<le> b \<or> c = \<infinity> \<or> (c = -\<infinity> \<and> a \<noteq> \<infinity> \<and> b \<noteq> \<infinity>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (c + a \<le> c + b) = (a \<le> b \<or> c = \<infinity> \<or> c = - \<infinity> \<and> a \<noteq> \<infinity> \<and> b \<noteq> \<infinity>)
[PROOF STEP]
by (cases rule: ereal3_cases[of a b c]) (simp_all add: field_simps)


[STATEMENT]
lemma lup_LCons [simp]: "lup a (LCons x xs) = (if a < x then LCons x (lup x xs) else lup a xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lup a (LCons x xs) = (if a < x then LCons x (lup x xs) else lup a xs)
[PROOF STEP]
by (rule tendsto_closed[where x=xs, OF closed_Collect_eq_isCont])
     (auto intro!: isCont_lup isCont_If isCont_LCons)


[STATEMENT]
lemma WHILET_unfold:
  "WHILET b f s = (if b s then bind (f s) (WHILET b f) else return s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. WHILET b f s = (if b s then bind (f s) (WHILET b f) else return s)
[PROOF STEP]
unfolding WHILET_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. WHILEIT (\<lambda>_. True) b f s = (if b s then bind (f s) (WHILEIT (\<lambda>_. True) b f) else return s)
[PROOF STEP]
apply (subst WHILEIT_unfold)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if True then if b s then bind (f s) (WHILEIT (\<lambda>_. True) b f) else return s else top) = (if b s then bind (f s) (WHILEIT (\<lambda>_. True) b f) else return s)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma sorted_wrt_concat_map_map:
  assumes "sorted_wrt Q xs"
    and "sorted_wrt Q ys"
    and "\<And>a x y. Q x y \<Longrightarrow> P (f x a) (f y a)"
    and "\<And>x y u v. x \<in> set xs \<Longrightarrow> y \<in> set xs \<Longrightarrow> Q u v \<Longrightarrow> P (f x u) (f y v)"
  shows "sorted_wrt P [f x y . y \<leftarrow> ys, x \<leftarrow> xs]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted_wrt P (concat (map (\<lambda>y. map (\<lambda>x. f x y) xs) ys))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
sorted_wrt Q xs
sorted_wrt Q ys
Q ?x ?y \<Longrightarrow> P (f ?x ?a) (f ?y ?a)
\<lbrakk>?x \<in> set xs; ?y \<in> set xs; Q ?u ?v\<rbrakk> \<Longrightarrow> P (f ?x ?u) (f ?y ?v)

goal (1 subgoal):
 1. sorted_wrt P (concat (map (\<lambda>y. map (\<lambda>x. f x y) xs) ys))
[PROOF STEP]
by (induct ys)
    (auto simp: sorted_wrt_append intro: sorted_wrt_map_mono [of Q])


[STATEMENT]
lemma nat_induct_step2 [case_names 0 1 SucSuc]:
  assumes      0: "P 0"
  and          1: "P 1"
  and     SucSuc: "\<And>m. P m \<Longrightarrow> P (Suc (Suc m))"
  shows   "P n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P n
[PROOF STEP]
proof (cases "even n")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. even n \<Longrightarrow> P n
 2. odd n \<Longrightarrow> P n
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
even n

goal (2 subgoals):
 1. even n \<Longrightarrow> P n
 2. odd n \<Longrightarrow> P n
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
even n
[PROOF STEP]
obtain k where "n = 2*k"
[PROOF STATE]
proof (prove)
using this:
even n

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

goal (1 subgoal):
 1. (\<And>k. n = 2 * k \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
n = 2 * k

goal (2 subgoals):
 1. even n \<Longrightarrow> P n
 2. odd n \<Longrightarrow> P n
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
n = 2 * k

goal (2 subgoals):
 1. even n \<Longrightarrow> P n
 2. odd n \<Longrightarrow> P n
[PROOF STEP]
have "P (2*k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (2 * k)
[PROOF STEP]
using 0 SucSuc
[PROOF STATE]
proof (prove)
using this:
P 0
P ?m \<Longrightarrow> P (Suc (Suc ?m))

goal (1 subgoal):
 1. P (2 * k)
[PROOF STEP]
by (induct k) auto
[PROOF STATE]
proof (state)
this:
P (2 * k)

goal (2 subgoals):
 1. even n \<Longrightarrow> P n
 2. odd n \<Longrightarrow> P n
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
n = 2 * k
P (2 * k)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 2 * k
P (2 * k)

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

goal (1 subgoal):
 1. odd n \<Longrightarrow> P n
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. odd n \<Longrightarrow> P n
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
odd n

goal (1 subgoal):
 1. odd n \<Longrightarrow> P n
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
odd n
[PROOF STEP]
obtain k where "n = 2*k+1"
[PROOF STATE]
proof (prove)
using this:
odd n

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

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

goal (1 subgoal):
 1. odd n \<Longrightarrow> P n
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
n = 2 * k + 1

goal (1 subgoal):
 1. odd n \<Longrightarrow> P n
[PROOF STEP]
have "P (2*k+1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (2 * k + 1)
[PROOF STEP]
using 1 SucSuc
[PROOF STATE]
proof (prove)
using this:
P 1
P ?m \<Longrightarrow> P (Suc (Suc ?m))

goal (1 subgoal):
 1. P (2 * k + 1)
[PROOF STEP]
by (induct k) auto
[PROOF STATE]
proof (state)
this:
P (2 * k + 1)

goal (1 subgoal):
 1. odd n \<Longrightarrow> P n
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
n = 2 * k + 1
P (2 * k + 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 2 * k + 1
P (2 * k + 1)

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem induces_unit_counit_adjunction:
    shows "unit_counit_adjunction C D F G \<eta> \<epsilon>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unit_counit_adjunction (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) F G \<eta> \<epsilon>
[PROOF STEP]
unfolding \<eta>_def \<epsilon>_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unit_counit_adjunction (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) F G \<eta>.map \<epsilon>.map
[PROOF STEP]
using induces_unit_counit_adjunction'
[PROOF STATE]
proof (prove)
using this:
unit_counit_adjunction (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) F G \<eta>.map \<epsilon>.map

goal (1 subgoal):
 1. unit_counit_adjunction (\<cdot>\<^sub>C) (\<cdot>\<^sub>D) F G \<eta>.map \<epsilon>.map
[PROOF STEP]
by simp


[STATEMENT]
lemma synth_analz_mono: "G\<subseteq>H \<Longrightarrow> synth (analz(G)) \<subseteq> synth (analz(H))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G \<subseteq> H \<Longrightarrow> synth (analz G) \<subseteq> synth (analz H)
[PROOF STEP]
by (iprover intro: synth_mono analz_mono)


[STATEMENT]
lemma composition_of_substs_eq :
  shows "(subst_equation (subst_equation e \<sigma>) \<eta>)
    = (subst_equation e (comp \<sigma> \<eta>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subst_equation (subst_equation e \<sigma>) \<eta> = subst_equation e (\<sigma> \<lozenge> \<eta>)
[PROOF STEP]
by (metis subst_equation.simps composition_of_substs vars_of_eq.elims)


[STATEMENT]
lemma insert_stays_forest_means_not_connected: assumes "forest (insert (Upair u v) E)"
  and "(Upair u v) \<notin> E"
  and "u \<noteq> v"
shows "~ (u,v) \<in> uconnected E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (u, v) \<notin> uconnected E
[PROOF STEP]
using forrest2_E assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(?u, ?v) \<in> uconnected ?E; Upair ?u ?v \<notin> ?E; ?u \<noteq> ?v\<rbrakk> \<Longrightarrow> \<not> forest (insert (Upair ?u ?v) ?E)
forest (insert (Upair u v) E)
Upair u v \<notin> E
u \<noteq> v

goal (1 subgoal):
 1. (u, v) \<notin> uconnected E
[PROOF STEP]
by metis


[STATEMENT]
lemma upto_enum_less:
  assumes xin: "x \<in> set [(a::'a::len word).e.2 ^ n - 1]"
  and     nv:  "n < LENGTH('a::len)"
  shows   "x < 2 ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < 2 ^ n
[PROOF STEP]
proof (cases n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> x < 2 ^ n
 2. \<And>nat. n = Suc nat \<Longrightarrow> x < 2 ^ n
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> x < 2 ^ n
 2. \<And>nat. n = Suc nat \<Longrightarrow> x < 2 ^ n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. x < 2 ^ n
[PROOF STEP]
using xin
[PROOF STATE]
proof (prove)
using this:
n = 0
x \<in> set [a .e. 2 ^ n - 1]

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

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> x < 2 ^ n
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> x < 2 ^ n
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
n = Suc m

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> x < 2 ^ n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < 2 ^ n
[PROOF STEP]
using xin nv le_m1_iff_lt p2_gt_0
[PROOF STATE]
proof (prove)
using this:
x \<in> set [a .e. 2 ^ n - 1]
n < LENGTH('a)
(0 < ?x) = ((?y \<le> ?x - 1) = (?y < ?x))
(0 < 2 ^ ?n) = (?n < LENGTH(?'a))

goal (1 subgoal):
 1. x < 2 ^ n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x < 2 ^ n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem gt_proper_sub: "proper_sub s t \<Longrightarrow> t >\<^sub>t s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proper_sub s t \<Longrightarrow> t >\<^sub>t s
[PROOF STEP]
by (induct t) (auto intro: gt_sub_fun gt_sub_arg gt_trans)


[STATEMENT]
lemma integral_sin_and_cos_Z [simp]:
  fixes m n::real
  assumes "m \<in> \<int>" "n \<in> \<int>"
  shows
  "integral\<^sup>L (lebesgue_on {-pi..pi}) (\<lambda>x. cos(m * x) * cos(n * x)) = (if \<bar>m\<bar> = \<bar>n\<bar> then if n = 0 then 2 * pi else pi else 0)"
  "integral\<^sup>L (lebesgue_on {-pi..pi}) (\<lambda>x. cos(m * x) * sin(n * x)) = 0"
  "integral\<^sup>L (lebesgue_on {-pi..pi}) (\<lambda>x. sin(m * x) * cos(n * x)) = 0"
  "\<bar>integral\<^sup>L (lebesgue_on {-pi..pi}) (\<lambda>x. sin (m * x) * sin (n * x))\<bar> = (if \<bar>m\<bar> = \<bar>n\<bar> \<and> n \<noteq> 0 then pi else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. cos (m * x) * cos (n * x) = (if \<bar>m\<bar> = \<bar>n\<bar> then if n = 0 then 2 * pi else pi else 0) &&& LINT x|lebesgue_on {- pi..pi}. cos (m * x) * sin (n * x) = 0) &&& LINT x|lebesgue_on {- pi..pi}. sin (m * x) * cos (n * x) = 0 &&& \<bar>LINT x|lebesgue_on {- pi..pi}. sin (m * x) * sin (n * x)\<bar> = (if \<bar>m\<bar> = \<bar>n\<bar> \<and> n \<noteq> 0 then pi else 0)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
m \<in> \<int>
n \<in> \<int>

goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. cos (m * x) * cos (n * x) = (if \<bar>m\<bar> = \<bar>n\<bar> then if n = 0 then 2 * pi else pi else 0) &&& LINT x|lebesgue_on {- pi..pi}. cos (m * x) * sin (n * x) = 0) &&& LINT x|lebesgue_on {- pi..pi}. sin (m * x) * cos (n * x) = 0 &&& \<bar>LINT x|lebesgue_on {- pi..pi}. sin (m * x) * sin (n * x)\<bar> = (if \<bar>m\<bar> = \<bar>n\<bar> \<and> n \<noteq> 0 then pi else 0)
[PROOF STEP]
unfolding Ints_def
[PROOF STATE]
proof (prove)
using this:
m \<in> range real_of_int
n \<in> range real_of_int

goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. cos (m * x) * cos (n * x) = (if \<bar>m\<bar> = \<bar>n\<bar> then if n = 0 then 2 * pi else pi else 0) &&& LINT x|lebesgue_on {- pi..pi}. cos (m * x) * sin (n * x) = 0) &&& LINT x|lebesgue_on {- pi..pi}. sin (m * x) * cos (n * x) = 0 &&& \<bar>LINT x|lebesgue_on {- pi..pi}. sin (m * x) * sin (n * x)\<bar> = (if \<bar>m\<bar> = \<bar>n\<bar> \<and> n \<noteq> 0 then pi else 0)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x xa. \<lbrakk>x \<in> UNIV; m = real_of_int x; xa \<in> UNIV; n = real_of_int xa\<rbrakk> \<Longrightarrow> LINT xb|lebesgue_on {- pi..pi}. cos (real_of_int x * xb) * cos (real_of_int xa * xb) = (if \<bar>real_of_int x\<bar> = \<bar>real_of_int xa\<bar> then if real_of_int xa = 0 then 2 * pi else pi else 0)
 2. \<And>x xa. \<lbrakk>x \<in> UNIV; m = real_of_int x; xa \<in> UNIV; n = real_of_int xa\<rbrakk> \<Longrightarrow> LINT xb|lebesgue_on {- pi..pi}. cos (real_of_int x * xb) * sin (real_of_int xa * xb) = 0
 3. \<And>x xa. \<lbrakk>x \<in> UNIV; m = real_of_int x; xa \<in> UNIV; n = real_of_int xa\<rbrakk> \<Longrightarrow> LINT xb|lebesgue_on {- pi..pi}. sin (real_of_int x * xb) * cos (real_of_int xa * xb) = 0
 4. \<And>x xa. \<lbrakk>x \<in> UNIV; m = real_of_int x; xa \<in> UNIV; n = real_of_int xa\<rbrakk> \<Longrightarrow> \<bar>LINT xb|lebesgue_on {- pi..pi}. sin (real_of_int x * xb) * sin (real_of_int xa * xb)\<bar> = (if \<bar>real_of_int x\<bar> = \<bar>real_of_int xa\<bar> \<and> real_of_int xa \<noteq> 0 then pi else 0)
[PROOF STEP]
unfolding integral_sin_and_cos
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x xa. \<lbrakk>x \<in> UNIV; m = real_of_int x; xa \<in> UNIV; n = real_of_int xa\<rbrakk> \<Longrightarrow> (if \<bar>x\<bar> = \<bar>xa\<bar> then if xa = 0 then 2 * pi else pi else 0) = (if \<bar>real_of_int x\<bar> = \<bar>real_of_int xa\<bar> then if real_of_int xa = 0 then 2 * pi else pi else 0)
 2. \<And>x xa. \<lbrakk>x \<in> UNIV; m = real_of_int x; xa \<in> UNIV; n = real_of_int xa\<rbrakk> \<Longrightarrow> 0 = 0
 3. \<And>x xa. \<lbrakk>x \<in> UNIV; m = real_of_int x; xa \<in> UNIV; n = real_of_int xa\<rbrakk> \<Longrightarrow> 0 = 0
 4. \<And>x xa. \<lbrakk>x \<in> UNIV; m = real_of_int x; xa \<in> UNIV; n = real_of_int xa\<rbrakk> \<Longrightarrow> (if \<bar>x\<bar> = \<bar>xa\<bar> \<and> xa \<noteq> 0 then pi else 0) = (if \<bar>real_of_int x\<bar> = \<bar>real_of_int xa\<bar> \<and> real_of_int xa \<noteq> 0 then pi else 0)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma HIm_Quat: "HIm (Quat w x y z) = vector[x,y,z]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. HIm (Quat w x y z) = vector [x, y, z]
[PROOF STEP]
by (simp add: HIm_def)


[STATEMENT]
lemma disjoint_iff_in_not_in1: "(A \<inter> B = {}) = (\<forall>x\<in>A. x \<notin> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<inter> B = {}) = (\<forall>x\<in>A. x \<notin> B)
[PROOF STEP]
by blast


[STATEMENT]
lemma (in cring)
  assumes "a \<in> carrier R" "b \<in> carrier R" "c \<in> carrier R"
  shows "(a \<ominus> b \<ominus> c) [^] (2::nat) =
    a [^] (2::nat) \<oplus> b [^] (2::nat) \<oplus> c [^] (2::nat) \<ominus> \<guillemotleft>2\<guillemotright> \<otimes> a \<otimes> b \<oplus> \<guillemotleft>2\<guillemotright> \<otimes> b \<otimes> c \<ominus> \<guillemotleft>2\<guillemotright> \<otimes> a \<otimes> c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<ominus> b \<ominus> c) [^] 2 = a [^] 2 \<oplus> b [^] 2 \<oplus> c [^] 2 \<ominus> \<guillemotleft>2\<guillemotright> \<otimes> a \<otimes> b \<oplus> \<guillemotleft>2\<guillemotright> \<otimes> b \<otimes> c \<ominus> \<guillemotleft>2\<guillemotright> \<otimes> a \<otimes> c
[PROOF STEP]
by ring


[STATEMENT]
lemma degree_pCons_eq: "p \<noteq> 0 \<Longrightarrow> degree (pCons a p) = Suc (degree p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> degree (pCons a p) = Suc (degree p)
[PROOF STEP]
by (simp add: degree_pCons_le le_antisym le_degree)


[STATEMENT]
lemma Pring_smult_closed:
      "\<And> a x. [| a \<in> carrier R; x \<in> carrier (Pring R I) |] ==> a \<odot>\<^bsub>(Pring R I)\<^esub> x \<in> carrier (Pring R I)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a x. \<lbrakk>a \<in> carrier R; x \<in> carrier (Pring R I)\<rbrakk> \<Longrightarrow> a \<odot>\<^bsub>Pring R I\<^esub> x \<in> carrier (Pring R I)
[PROOF STEP]
by (simp add: Pring_car Pring_smult poly_scalar_mult_closed)


[STATEMENT]
lemma emBits_roundup_cancel: "emBits mod 8 ~= 0 \<Longrightarrow> (roundup emBits 8)*8 - emBits = 8-(emBits mod 8)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emBits mod 8 \<noteq> 0 \<Longrightarrow> roundup emBits 8 * 8 - emBits = 8 - emBits mod 8
[PROOF STEP]
apply (auto simp add: roundup)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < emBits mod 8 \<Longrightarrow> 8 + emBits div 8 * 8 - emBits = 8 - emBits mod 8
[PROOF STEP]
by (arith)


[STATEMENT]
lemma finite_POS_NEG: "finite (POS \<union> NEG)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (POS \<union> NEG)
[PROOF STEP]
using POS_\<G> NEG_\<G>
[PROOF STATE]
proof (prove)
using this:
POS \<subseteq> \<G>
NEG \<subseteq> \<G>

goal (1 subgoal):
 1. finite (POS \<union> NEG)
[PROOF STEP]
by (intro finite_subset[OF _ finite_\<G>], auto)


[STATEMENT]
lemma gdrop_eSuc: "a \<up>\<^sub>g (eSuc n) = a \<up>\<^sub>g (eSuc 0) \<up>\<^sub>g n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<up>\<^sub>g eSuc n = a \<up>\<^sub>g eSuc 0 \<up>\<^sub>g n
[PROOF STEP]
by (unfold gtake_def gdrop_def gnth_def gCons_def, case_tac n, case_tac a, simp_all add: eSuc_enat)


[STATEMENT]
lemma iMin_greaterThanAtMost: "m < n \<Longrightarrow> iMin {m<..n} = Suc m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m < n \<Longrightarrow> iMin {m<..n} = Suc m
[PROOF STEP]
by (simp only: atLeastSucAtMost_greaterThanAtMost[symmetric] atLeastLessThanSuc_atLeastAtMost[symmetric] iMin_atLeastLessThan)


[STATEMENT]
lemma normalize_poly_old_def:
  "normalize (f :: 'a :: {normalization_semidom,field} poly) = smult (inverse (unit_factor (lead_coeff f))) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normalize f = smult (inverse (unit_factor (lead_coeff f))) f
[PROOF STEP]
by (simp add: normalize_poly_eq_map_poly map_div_is_smult_inverse)


[STATEMENT]
lemma numeral_uexpr_rep_eq [ueval]: "\<lbrakk>numeral x\<rbrakk>\<^sub>e b = numeral x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>numeral x\<rbrakk>\<^sub>e b = numeral x
[PROOF STEP]
apply (induct x)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>Numeral1\<rbrakk>\<^sub>e b = Numeral1
 2. \<And>x. \<lbrakk>numeral x\<rbrakk>\<^sub>e b = numeral x \<Longrightarrow> \<lbrakk>numeral (num.Bit0 x)\<rbrakk>\<^sub>e b = numeral (num.Bit0 x)
 3. \<And>x. \<lbrakk>numeral x\<rbrakk>\<^sub>e b = numeral x \<Longrightarrow> \<lbrakk>numeral (num.Bit1 x)\<rbrakk>\<^sub>e b = numeral (num.Bit1 x)
[PROOF STEP]
apply (simp add: lit.rep_eq one_uexpr_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>numeral x\<rbrakk>\<^sub>e b = numeral x \<Longrightarrow> \<lbrakk>numeral (num.Bit0 x)\<rbrakk>\<^sub>e b = numeral (num.Bit0 x)
 2. \<And>x. \<lbrakk>numeral x\<rbrakk>\<^sub>e b = numeral x \<Longrightarrow> \<lbrakk>numeral (num.Bit1 x)\<rbrakk>\<^sub>e b = numeral (num.Bit1 x)
[PROOF STEP]
apply (simp add: bop.rep_eq numeral_Bit0 plus_uexpr_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>numeral x\<rbrakk>\<^sub>e b = numeral x \<Longrightarrow> \<lbrakk>numeral (num.Bit1 x)\<rbrakk>\<^sub>e b = numeral (num.Bit1 x)
[PROOF STEP]
apply (simp add: bop.rep_eq lit.rep_eq numeral_code(3) one_uexpr_def plus_uexpr_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma inv_P'PAQQ':
  assumes A: "A \<in> carrier_mat n n"
    and P: "P \<in> carrier_mat n n"
    and inv_P: "inverts_mat P' P"
    and inv_Q: "inverts_mat Q Q'"
    and Q: "Q \<in> carrier_mat n n"
    and P': "P' \<in> carrier_mat n n"
    and Q': "Q' \<in> carrier_mat n n"
shows  "(P'*(P*A*Q)*Q') = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P' * (P * A * Q) * Q' = A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P' * (P * A * Q) * Q' = A
[PROOF STEP]
have "(P'*(P*A*Q)*Q') = (P'*(P*A*Q*Q'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P' * (P * A * Q) * Q' = P' * (P * A * Q * Q')
[PROOF STEP]
by (smt P P' Q Q' assoc_mult_mat carrier_matD(1) carrier_matD(2) carrier_mat_triv
        index_mult_mat(2) index_mult_mat(3))
[PROOF STATE]
proof (state)
this:
P' * (P * A * Q) * Q' = P' * (P * A * Q * Q')

goal (1 subgoal):
 1. P' * (P * A * Q) * Q' = A
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
P' * (P * A * Q) * Q' = P' * (P * A * Q * Q')

goal (1 subgoal):
 1. P' * (P * A * Q) * Q' = A
[PROOF STEP]
have "... = ((P'*P)*A*(Q*Q'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P' * (P * A * Q * Q') = P' * P * A * (Q * Q')
[PROOF STEP]
by (smt A P P' Q Q' assoc_mult_mat carrier_matD(1) carrier_matD(2) carrier_mat_triv
        index_mult_mat(3) inv_Q inverts_mat_def right_mult_one_mat')
[PROOF STATE]
proof (state)
this:
P' * (P * A * Q * Q') = P' * P * A * (Q * Q')

goal (1 subgoal):
 1. P' * (P * A * Q) * Q' = A
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
P' * (P * A * Q) * Q' = P' * P * A * (Q * Q')
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P' * (P * A * Q) * Q' = P' * P * A * (Q * Q')

goal (1 subgoal):
 1. P' * (P * A * Q) * Q' = A
[PROOF STEP]
by (metis P' Q A inv_P inv_Q carrier_matD(1) inverts_mat_def
        left_mult_one_mat right_mult_one_mat)
[PROOF STATE]
proof (state)
this:
P' * (P * A * Q) * Q' = A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma scalar_vec_one[simp]: "1 \<cdot>\<^sub>v (v :: 'a :: semiring_1 vec) = v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<cdot>\<^sub>v v = v
[PROOF STEP]
by (rule eq_vecI, auto)


[STATEMENT]
lemma iTILL_induct: "
  \<lbrakk> P 0; \<And>k. \<lbrakk> k \<in> [\<dots>n]; k \<noteq> n; P k \<rbrakk> \<Longrightarrow> P (Suc k); a \<in> [\<dots>n] \<rbrakk> \<Longrightarrow> P a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P 0; \<And>k. \<lbrakk>k \<in> [\<dots>n]; k \<noteq> n; P k\<rbrakk> \<Longrightarrow> P (Suc k); a \<in> [\<dots>n]\<rbrakk> \<Longrightarrow> P a
[PROOF STEP]
apply (rule inext_induct[of _ "[\<dots>n]"])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>P 0; \<And>k. \<lbrakk>k \<in> [\<dots>n]; k \<noteq> n; P k\<rbrakk> \<Longrightarrow> P (Suc k); a \<in> [\<dots>n]\<rbrakk> \<Longrightarrow> P (iMin [\<dots>n])
 2. \<And>na. \<lbrakk>P 0; \<And>k. \<lbrakk>k \<in> [\<dots>n]; k \<noteq> n; P k\<rbrakk> \<Longrightarrow> P (Suc k); a \<in> [\<dots>n]; na \<in> [\<dots>n]; P na\<rbrakk> \<Longrightarrow> P (inext na [\<dots>n])
 3. \<lbrakk>P 0; \<And>k. \<lbrakk>k \<in> [\<dots>n]; k \<noteq> n; P k\<rbrakk> \<Longrightarrow> P (Suc k); a \<in> [\<dots>n]\<rbrakk> \<Longrightarrow> a \<in> [\<dots>n]
[PROOF STEP]
apply (simp add: iT_Min iT_inext_if)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma ln_one_minus_pos_lower_bound:
  fixes x :: real
  assumes a: "0 \<le> x" and b: "x \<le> 1 / 2"
  shows "- x - 2 * x\<^sup>2 \<le> ln (1 - x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
from b
[PROOF STATE]
proof (chain)
picking this:
x \<le> 1 / 2
[PROOF STEP]
have c: "x < 1"
[PROOF STATE]
proof (prove)
using this:
x \<le> 1 / 2

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

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x < 1
[PROOF STEP]
have "ln (1 - x) = - ln (1 + x / (1 - x))"
[PROOF STATE]
proof (prove)
using this:
x < 1

goal (1 subgoal):
 1. ln (1 - x) = - ln (1 + x / (1 - x))
[PROOF STEP]
by (auto simp: ln_inverse [symmetric] field_simps intro: arg_cong [where f=ln])
[PROOF STATE]
proof (state)
this:
ln (1 - x) = - ln (1 + x / (1 - x))

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ln (1 - x) = - ln (1 + x / (1 - x))

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
have "- (x / (1 - x)) \<le> \<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (x / (1 - x)) \<le> - ln (1 + x / (1 - x))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - (x / (1 - x)) \<le> - ln (1 + x / (1 - x))
[PROOF STEP]
have "ln (1 + x / (1 - x)) \<le> x / (1 - x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ln (1 + x / (1 - x)) \<le> x / (1 - x)
[PROOF STEP]
using a c
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x < 1

goal (1 subgoal):
 1. ln (1 + x / (1 - x)) \<le> x / (1 - x)
[PROOF STEP]
by (intro ln_add_one_self_le_self) auto
[PROOF STATE]
proof (state)
this:
ln (1 + x / (1 - x)) \<le> x / (1 - x)

goal (1 subgoal):
 1. - (x / (1 - x)) \<le> - ln (1 + x / (1 - x))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ln (1 + x / (1 - x)) \<le> x / (1 - x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ln (1 + x / (1 - x)) \<le> x / (1 - x)

goal (1 subgoal):
 1. - (x / (1 - x)) \<le> - ln (1 + x / (1 - x))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- (x / (1 - x)) \<le> - ln (1 + x / (1 - x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
- (x / (1 - x)) \<le> - ln (1 + x / (1 - x))

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (x / (1 - x)) \<le> - ln (1 + x / (1 - x))

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
have "- (x / (1 - x)) = - x / (1 - x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (x / (1 - x)) = - x / (1 - x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- (x / (1 - x)) = - x / (1 - x)

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
- x / (1 - x) \<le> ln (1 - x)
[PROOF STEP]
have d: "- x / (1 - x) \<le> ln (1 - x)"
[PROOF STATE]
proof (prove)
using this:
- x / (1 - x) \<le> ln (1 - x)

goal (1 subgoal):
 1. - x / (1 - x) \<le> ln (1 - x)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
- x / (1 - x) \<le> ln (1 - x)

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
have "0 < 1 - x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < 1 - x
[PROOF STEP]
using a b
[PROOF STATE]
proof (prove)
using this:
0 \<le> x
x \<le> 1 / 2

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

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < 1 - x
[PROOF STEP]
have e: "- x - 2 * x\<^sup>2 \<le> - x / (1 - x)"
[PROOF STATE]
proof (prove)
using this:
0 < 1 - x

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> - x / (1 - x)
[PROOF STEP]
using mult_right_le_one_le[of "x * x" "2 * x"] a b
[PROOF STATE]
proof (prove)
using this:
0 < 1 - x
\<lbrakk>0 \<le> x * x; 0 \<le> 2 * x; 2 * x \<le> 1\<rbrakk> \<Longrightarrow> x * x * (2 * x) \<le> x * x
0 \<le> x
x \<le> 1 / 2

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> - x / (1 - x)
[PROOF STEP]
by (simp add: field_simps power2_eq_square)
[PROOF STATE]
proof (state)
this:
- x - 2 * x\<^sup>2 \<le> - x / (1 - x)

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
from e d
[PROOF STATE]
proof (chain)
picking this:
- x - 2 * x\<^sup>2 \<le> - x / (1 - x)
- x / (1 - x) \<le> ln (1 - x)
[PROOF STEP]
show "- x - 2 * x\<^sup>2 \<le> ln (1 - x)"
[PROOF STATE]
proof (prove)
using this:
- x - 2 * x\<^sup>2 \<le> - x / (1 - x)
- x / (1 - x) \<le> ln (1 - x)

goal (1 subgoal):
 1. - x - 2 * x\<^sup>2 \<le> ln (1 - x)
[PROOF STEP]
by (rule order_trans)
[PROOF STATE]
proof (state)
this:
- x - 2 * x\<^sup>2 \<le> ln (1 - x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bit_not_int_iff':
  \<open>bit (- k - 1) n \<longleftrightarrow> \<not> bit k n\<close>
  for k :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bit (- k - 1) n = (\<not> bit k n)
[PROOF STEP]
proof (induction n arbitrary: k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>k. bit (- k - 1) 0 = (\<not> bit k 0)
 2. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>k. bit (- k - 1) 0 = (\<not> bit k 0)
 2. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bit (- k - 1) 0 = (\<not> bit k 0)
[PROOF STEP]
by (simp add: bit_0)
[PROOF STATE]
proof (state)
this:
bit (- k - 1) 0 = (\<not> bit k 0)

goal (1 subgoal):
 1. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
bit (- ?k - 1) n = (\<not> bit ?k n)

goal (1 subgoal):
 1. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
have \<open>- k - 1 = - (k + 2) + 1\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - k - 1 = - (k + 2) + 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- k - 1 = - (k + 2) + 1

goal (1 subgoal):
 1. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- k - 1 = - (k + 2) + 1

goal (1 subgoal):
 1. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
have \<open>(- (k + 2) + 1) div 2 = - (k div 2) - 1\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
proof (cases \<open>even k\<close>)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. even k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
 2. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
even k

goal (2 subgoals):
 1. even k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
 2. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
even k
[PROOF STEP]
have \<open>- k div 2 = - (k div 2)\<close>
[PROOF STATE]
proof (prove)
using this:
even k

goal (1 subgoal):
 1. - k div 2 = - (k div 2)
[PROOF STEP]
by rule (simp flip: mult_minus_right)
[PROOF STATE]
proof (state)
this:
- k div 2 = - (k div 2)

goal (2 subgoals):
 1. even k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
 2. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
with True
[PROOF STATE]
proof (chain)
picking this:
even k
- k div 2 = - (k div 2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
even k
- k div 2 = - (k div 2)

goal (1 subgoal):
 1. (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(- (k + 2) + 1) div 2 = - (k div 2) - 1

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
odd k

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
have \<open>4 = 2 * (2::int)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 4 = 2 * 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
4 = 2 * 2

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
4 = 2 * 2

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
have \<open>2 * 2 div 2 = (2::int)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * 2 div 2 = 2
[PROOF STEP]
by (simp only: nonzero_mult_div_cancel_left)
[PROOF STATE]
proof (state)
this:
2 * 2 div 2 = 2

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
4 div 2 = 2
[PROOF STEP]
have *: \<open>4 div 2 = (2::int)\<close>
[PROOF STATE]
proof (prove)
using this:
4 div 2 = 2

goal (1 subgoal):
 1. 4 div 2 = 2
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
4 div 2 = 2

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
from False
[PROOF STATE]
proof (chain)
picking this:
odd k
[PROOF STEP]
obtain l where k: \<open>k = 2 * l + 1\<close>
[PROOF STATE]
proof (prove)
using this:
odd k

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

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k = 2 * l + 1
[PROOF STEP]
have \<open>- k - 2 = 2 * - (l + 2) + 1\<close>
[PROOF STATE]
proof (prove)
using this:
k = 2 * l + 1

goal (1 subgoal):
 1. - k - 2 = 2 * - (l + 2) + 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
- k - 2 = 2 * - (l + 2) + 1

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
- k - 2 = 2 * - (l + 2) + 1
[PROOF STEP]
have \<open>(- k - 2) div 2 + 1 = - (k div 2) - 1\<close>
[PROOF STATE]
proof (prove)
using this:
- k - 2 = 2 * - (l + 2) + 1

goal (1 subgoal):
 1. (- k - 2) div 2 + 1 = - (k div 2) - 1
[PROOF STEP]
by (simp flip: mult_minus_right add: *) (simp add: k)
[PROOF STATE]
proof (state)
this:
(- k - 2) div 2 + 1 = - (k div 2) - 1

goal (1 subgoal):
 1. odd k \<Longrightarrow> (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
with False
[PROOF STATE]
proof (chain)
picking this:
odd k
(- k - 2) div 2 + 1 = - (k div 2) - 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
odd k
(- k - 2) div 2 + 1 = - (k div 2) - 1

goal (1 subgoal):
 1. (- (k + 2) + 1) div 2 = - (k div 2) - 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(- (k + 2) + 1) div 2 = - (k div 2) - 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(- (k + 2) + 1) div 2 = - (k div 2) - 1

goal (1 subgoal):
 1. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(- k - 1) div 2 = - (k div 2) - 1
[PROOF STEP]
have \<open>(- k - 1) div 2 = - (k div 2) - 1\<close>
[PROOF STATE]
proof (prove)
using this:
(- k - 1) div 2 = - (k div 2) - 1

goal (1 subgoal):
 1. (- k - 1) div 2 = - (k div 2) - 1
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(- k - 1) div 2 = - (k div 2) - 1

goal (1 subgoal):
 1. \<And>n k. (\<And>k. bit (- k - 1) n = (\<not> bit k n)) \<Longrightarrow> bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
with Suc
[PROOF STATE]
proof (chain)
picking this:
bit (- ?k - 1) n = (\<not> bit ?k n)
(- k - 1) div 2 = - (k div 2) - 1
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
bit (- ?k - 1) n = (\<not> bit ?k n)
(- k - 1) div 2 = - (k div 2) - 1

goal (1 subgoal):
 1. bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))
[PROOF STEP]
by (simp add: bit_Suc)
[PROOF STATE]
proof (state)
this:
bit (- k - 1) (Suc n) = (\<not> bit k (Suc n))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma row_transpose[simp]:
  "j < dim_col A \<Longrightarrow> row (transpose_mat A) j = col A j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. j < dim_col A \<Longrightarrow> row (transpose_mat A) j = col A j
[PROOF STEP]
unfolding row_def col_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. j < dim_col A \<Longrightarrow> vec (dim_col (transpose_mat A)) (\<lambda>ja. transpose_mat A $$ (j, ja)) = vec (dim_row A) (\<lambda>i. A $$ (i, j))
[PROOF STEP]
by (intro eq_vecI, auto)


[STATEMENT]
lemma deg_belowI:
  assumes non_zero: "n \<noteq> 0 \<Longrightarrow> coeff P p n \<noteq> \<zero>"
    and R: "p \<in> carrier P"
  shows "n \<le> deg R p"
\<comment> \<open>Logically, this is a slightly stronger version of
   @{thm [source] deg_aboveD}\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<le> deg R p
[PROOF STEP]
proof (cases "n=0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> n \<le> deg R p
 2. n \<noteq> 0 \<Longrightarrow> n \<le> deg R p
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> n \<le> deg R p
 2. n \<noteq> 0 \<Longrightarrow> n \<le> deg R p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. n \<le> deg R p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
n \<le> deg R p

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> n \<le> deg R p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> n \<le> deg R p
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> n \<le> deg R p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n \<noteq> 0
[PROOF STEP]
have "coeff P p n \<noteq> \<zero>"
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. coeff P p n \<noteq> \<zero>
[PROOF STEP]
by (rule non_zero)
[PROOF STATE]
proof (state)
this:
coeff P p n \<noteq> \<zero>

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> n \<le> deg R p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
coeff P p n \<noteq> \<zero>
[PROOF STEP]
have "\<not> deg R p < n"
[PROOF STATE]
proof (prove)
using this:
coeff P p n \<noteq> \<zero>

goal (1 subgoal):
 1. \<not> deg R p < n
[PROOF STEP]
by (fast dest: deg_aboveD intro: R)
[PROOF STATE]
proof (state)
this:
\<not> deg R p < n

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> n \<le> deg R p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> deg R p < n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> deg R p < n

goal (1 subgoal):
 1. n \<le> deg R p
[PROOF STEP]
by arith
[PROOF STATE]
proof (state)
this:
n \<le> deg R p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma isCont_cos' [simp]: "isCont f a \<Longrightarrow> isCont (\<lambda>x. cos (f x)) a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont f a \<Longrightarrow> isCont (\<lambda>x. cos (f x)) a
[PROOF STEP]
by (rule isCont_o2 [OF _ isCont_cos])


[STATEMENT]
lemma le_Integer_numeral_simps [simp]:
  "le\<cdot>(0::Integer)\<cdot>0 = TT"
  "le\<cdot>(0::Integer)\<cdot>1 = TT"
  "le\<cdot>(1::Integer)\<cdot>0 = FF"
  "le\<cdot>(1::Integer)\<cdot>1 = TT"
  "le\<cdot>(0::Integer)\<cdot>(numeral k) = TT"
  "le\<cdot>(numeral k)\<cdot>(0::Integer) = FF"
  "le\<cdot>(1::Integer)\<cdot>(numeral k) = TT"
  "Num.One < k \<Longrightarrow> le\<cdot>(numeral k)\<cdot>(1::Integer) = FF"
  "le\<cdot>(numeral k::Integer)\<cdot>(numeral l) = (if k \<le> l then TT else FF)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((le\<cdot>0\<cdot>0 = TT &&& le\<cdot>0\<cdot>1 = TT) &&& le\<cdot>1\<cdot>0 = FF &&& le\<cdot>1\<cdot>1 = TT) &&& (le\<cdot>0\<cdot>(numeral k) = TT &&& le\<cdot>(numeral k)\<cdot>0 = FF) &&& le\<cdot>1\<cdot>(numeral k) = TT &&& (num.One < k \<Longrightarrow> le\<cdot>(numeral k)\<cdot>1 = FF) &&& le\<cdot>(numeral k)\<cdot>(numeral l) = (if k \<le> l then TT else FF)
[PROOF STEP]
unfolding zero_Integer_def one_Integer_def numeral_Integer_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((le\<cdot>(MkI\<cdot>0)\<cdot>(MkI\<cdot>0) = TT &&& le\<cdot>(MkI\<cdot>0)\<cdot>(MkI\<cdot>1) = TT) &&& le\<cdot>(MkI\<cdot>1)\<cdot>(MkI\<cdot>0) = FF &&& le\<cdot>(MkI\<cdot>1)\<cdot>(MkI\<cdot>1) = TT) &&& (le\<cdot>(MkI\<cdot>0)\<cdot>(MkI\<cdot>(numeral k)) = TT &&& le\<cdot>(MkI\<cdot>(numeral k))\<cdot>(MkI\<cdot>0) = FF) &&& le\<cdot>(MkI\<cdot>1)\<cdot>(MkI\<cdot>(numeral k)) = TT &&& (num.One < k \<Longrightarrow> le\<cdot>(MkI\<cdot>(numeral k))\<cdot>(MkI\<cdot>1) = FF) &&& le\<cdot>(MkI\<cdot>(numeral k))\<cdot>(MkI\<cdot>(numeral l)) = (if k \<le> l then TT else FF)
[PROOF STEP]
by simp_all


[STATEMENT]
lemma jumpF_pathstart_eq_0:
  assumes "path g" "Re(pathstart g)\<noteq>Re z"
  shows "jumpF_pathstart g z = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF_pathstart g z = 0
[PROOF STEP]
unfolding jumpF_pathstart_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. jumpF (\<lambda>t. Im (g t - z) / Re (g t - z)) (at_right 0) = 0
[PROOF STEP]
apply (rule jumpF_im_divide_Re_0)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. path (\<lambda>t. g t - z)
 2. Re (g 0 - z) \<noteq> 0
 3. 0 \<le> 0
 4. 0 < 1
[PROOF STEP]
using assms[unfolded pathstart_def]
[PROOF STATE]
proof (prove)
using this:
path g
Re (g 0) \<noteq> Re z

goal (4 subgoals):
 1. path (\<lambda>t. g t - z)
 2. Re (g 0 - z) \<noteq> 0
 3. 0 \<le> 0
 4. 0 < 1
[PROOF STEP]
by auto


[STATEMENT]
lemma open_imp_locally_connected:
  fixes S :: "'a :: real_normed_vector set"
  shows "open S \<Longrightarrow> locally connected S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open S \<Longrightarrow> locally connected S
[PROOF STEP]
by (simp add: locally_path_connected_imp_locally_connected open_imp_locally_path_connected)


[STATEMENT]
lemma multiplicity_times_same:
  assumes "p \<noteq> 0"
  shows   "multiplicity p (p * x) = Suc (multiplicity p x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicity p (p * x) = Suc (multiplicity p x)
[PROOF STEP]
proof (rule multiplicity_eqI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p ^ Suc (multiplicity p x) dvd p * x
 2. \<not> p ^ Suc (Suc (multiplicity p x)) dvd p * x
[PROOF STEP]
show "p ^ Suc (multiplicity p x) dvd p * x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p ^ Suc (multiplicity p x) dvd p * x
[PROOF STEP]
by (auto intro!: mult_dvd_mono multiplicity_dvd)
[PROOF STATE]
proof (state)
this:
p ^ Suc (multiplicity p x) dvd p * x

goal (1 subgoal):
 1. \<not> p ^ Suc (Suc (multiplicity p x)) dvd p * x
[PROOF STEP]
from xp assms
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> (0::'a)
\<not> is_unit p
p \<noteq> (0::'a)
[PROOF STEP]
show "\<not> p ^ Suc (Suc (multiplicity p x)) dvd p * x"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> (0::'a)
\<not> is_unit p
p \<noteq> (0::'a)

goal (1 subgoal):
 1. \<not> p ^ Suc (Suc (multiplicity p x)) dvd p * x
[PROOF STEP]
using power_dvd_iff_le_multiplicity[OF xp, of "Suc (multiplicity p x)"]
[PROOF STATE]
proof (prove)
using this:
x \<noteq> (0::'a)
\<not> is_unit p
p \<noteq> (0::'a)
(p ^ Suc (multiplicity p x) dvd x) = (Suc (multiplicity p x) \<le> multiplicity p x)

goal (1 subgoal):
 1. \<not> p ^ Suc (Suc (multiplicity p x)) dvd p * x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<not> p ^ Suc (Suc (multiplicity p x)) dvd p * x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Abs_freeword_Cons:
  assumes "proper_signed_list (x#xs)"
  shows "Abs_freeword (x#xs) = Abs_freeword [x] + Abs_freeword xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
proof (cases xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. xs = [] \<Longrightarrow> Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
 2. \<And>a list. xs = a # list \<Longrightarrow> Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
xs = []

goal (2 subgoals):
 1. xs = [] \<Longrightarrow> Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
 2. \<And>a list. xs = a # list \<Longrightarrow> Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
xs = []

goal (1 subgoal):
 1. Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
using add_0_right[of "Abs_freeword [x]"]
[PROOF STATE]
proof (prove)
using this:
xs = []
Abs_freeword [x] + 0 = Abs_freeword [x]

goal (1 subgoal):
 1. Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
by (simp add: zero_freeword.abs_eq)
[PROOF STATE]
proof (state)
this:
Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs

goal (1 subgoal):
 1. \<And>a list. xs = a # list \<Longrightarrow> Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a list. xs = a # list \<Longrightarrow> Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
case (Cons y ys)
[PROOF STATE]
proof (state)
this:
xs = y # ys

goal (1 subgoal):
 1. \<And>a list. xs = a # list \<Longrightarrow> Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
proper_signed_list (x # xs)
xs = y # ys
[PROOF STEP]
have  "freeword (Abs_freeword (x#xs)) =
            freeword (Abs_freeword [x] + Abs_freeword xs)"
[PROOF STATE]
proof (prove)
using this:
proper_signed_list (x # xs)
xs = y # ys

goal (1 subgoal):
 1. freeword (Abs_freeword (x # xs)) = freeword (Abs_freeword [x] + Abs_freeword xs)
[PROOF STEP]
by    (simp add:
            plus_freeword.rep_eq Abs_freeword_inverse
            prappend_signed_list_single_Cons
          )
[PROOF STATE]
proof (state)
this:
freeword (Abs_freeword (x # xs)) = freeword (Abs_freeword [x] + Abs_freeword xs)

goal (1 subgoal):
 1. \<And>a list. xs = a # list \<Longrightarrow> Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
freeword (Abs_freeword (x # xs)) = freeword (Abs_freeword [x] + Abs_freeword xs)

goal (1 subgoal):
 1. Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
using freeword_inject
[PROOF STATE]
proof (prove)
using this:
freeword (Abs_freeword (x # xs)) = freeword (Abs_freeword [x] + Abs_freeword xs)
(freeword ?x = freeword ?y) = (?x = ?y)

goal (1 subgoal):
 1. Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
Abs_freeword (x # xs) = Abs_freeword [x] + Abs_freeword xs

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ennreal_zero_neq_top[simp]: "0 \<noteq> (top::ennreal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<noteq> top
[PROOF STEP]
by transfer (simp add: top_ereal_def)


[STATEMENT]
lemma dim_inverse [simp]: "dim (inverse x) = inverse (dim x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Quantity.dim (inverse x) = inverse (Quantity.dim x)
[PROOF STEP]
by (simp add: inverse_Quantity_ext_def)


[STATEMENT]
lemma action_proj_pair: "action_proj (p, e) vs = (fmrestrict_set vs p, fmrestrict_set vs e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. action_proj (p, e) vs = (fmrestrict_set vs p, fmrestrict_set vs e)
[PROOF STEP]
unfolding action_proj_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fmrestrict_set vs (fst (p, e)), fmrestrict_set vs (snd (p, e))) = (fmrestrict_set vs p, fmrestrict_set vs e)
[PROOF STEP]
by simp


[STATEMENT]
lemma ediv_mono: "a\<le>b \<Longrightarrow> ediv a k \<le> ediv b k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<le> b \<Longrightarrow> ediv a k \<le> ediv b k
[PROOF STEP]
unfolding ediv_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<le> b \<Longrightarrow> (if a = \<infinity> then \<infinity> else enat (mydiv (THE i. a = enat i) k)) \<le> (if b = \<infinity> then \<infinity> else enat (mydiv (THE i. b = enat i) k))
[PROOF STEP]
by (auto simp add: mydiv_mono)


[STATEMENT]
lemma polyhedron_Int [intro,simp]:
   "\<lbrakk>polyhedron S; polyhedron T\<rbrakk> \<Longrightarrow> polyhedron (S \<inter> T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>polyhedron S; polyhedron T\<rbrakk> \<Longrightarrow> polyhedron (S \<inter> T)
[PROOF STEP]
apply (clarsimp simp add: polyhedron_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>F Fa. \<lbrakk>finite F; finite Fa; \<forall>h\<in>F. \<exists>a. a \<noteq> (0::'a) \<and> (\<exists>b. h = {x. a \<bullet> x \<le> b}); S = \<Inter> F; \<forall>h\<in>Fa. \<exists>a. a \<noteq> (0::'a) \<and> (\<exists>b. h = {x. a \<bullet> x \<le> b}); T = \<Inter> Fa\<rbrakk> \<Longrightarrow> \<exists>Fb. finite Fb \<and> \<Inter> F \<inter> \<Inter> Fa = \<Inter> Fb \<and> (\<forall>h\<in>Fb. \<exists>a. a \<noteq> (0::'a) \<and> (\<exists>b. h = {x. a \<bullet> x \<le> b}))
[PROOF STEP]
subgoal for F G
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite F; finite G; \<forall>h\<in>F. \<exists>a. a \<noteq> (0::'a) \<and> (\<exists>b. h = {x. a \<bullet> x \<le> b}); S = \<Inter> F; \<forall>h\<in>G. \<exists>a. a \<noteq> (0::'a) \<and> (\<exists>b. h = {x. a \<bullet> x \<le> b}); T = \<Inter> G\<rbrakk> \<Longrightarrow> \<exists>Fa. finite Fa \<and> \<Inter> F \<inter> \<Inter> G = \<Inter> Fa \<and> (\<forall>h\<in>Fa. \<exists>a. a \<noteq> (0::'a) \<and> (\<exists>b. h = {x. a \<bullet> x \<le> b}))
[PROOF STEP]
by (rule_tac x="F \<union> G" in exI, auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done