[STATEMENT]
lemma tree_sigma_cong:
  assumes "sets M = sets M'"
  shows   "tree_sigma M = tree_sigma M'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tree_sigma M = tree_sigma M'
[PROOF STEP]
using sets_eq_imp_space_eq[OF assms]
[PROOF STATE]
proof (prove)
using this:
space M = space M'

goal (1 subgoal):
 1. tree_sigma M = tree_sigma M'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
space M = space M'
sets M = sets M'

goal (1 subgoal):
 1. tree_sigma M = tree_sigma M'
[PROOF STEP]
by (simp add: tree_sigma_def)


[STATEMENT]
lemma convergent_ignore_initial_segment: "convergent (\<lambda>n. f (n + m)) = convergent f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent (\<lambda>n. f (n + m)) = convergent f
[PROOF STEP]
proof (induct m arbitrary: f)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>f. convergent (\<lambda>n. f (n + 0)) = convergent f
 2. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>f. convergent (\<lambda>n. f (n + 0)) = convergent f
 2. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent (\<lambda>n. f (n + 0)) = convergent f
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>n. f (n + 0)) = convergent f

goal (1 subgoal):
 1. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>n. ?f (n + m)) = convergent ?f

goal (1 subgoal):
 1. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
have "convergent (\<lambda>n. f (n + Suc m)) \<longleftrightarrow> convergent (\<lambda>n. f (Suc n + m))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent (\<lambda>n. f (n + Suc m)) = convergent (\<lambda>n. f (Suc n + m))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>n. f (n + Suc m)) = convergent (\<lambda>n. f (Suc n + m))

goal (1 subgoal):
 1. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>n. f (n + Suc m)) = convergent (\<lambda>n. f (Suc n + m))

goal (1 subgoal):
 1. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
have "\<dots> \<longleftrightarrow> convergent (\<lambda>n. f (n + m))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent (\<lambda>n. f (Suc n + m)) = convergent (\<lambda>n. f (n + m))
[PROOF STEP]
by (rule convergent_Suc_iff)
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>n. f (Suc n + m)) = convergent (\<lambda>n. f (n + m))

goal (1 subgoal):
 1. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>n. f (Suc n + m)) = convergent (\<lambda>n. f (n + m))

goal (1 subgoal):
 1. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
have "\<dots> \<longleftrightarrow> convergent f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convergent (\<lambda>n. f (n + m)) = convergent f
[PROOF STEP]
by (rule Suc)
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>n. f (n + m)) = convergent f

goal (1 subgoal):
 1. \<And>m f. (\<And>f. convergent (\<lambda>n. f (n + m)) = convergent f) \<Longrightarrow> convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
convergent (\<lambda>n. f (n + Suc m)) = convergent f

goal (1 subgoal):
 1. convergent (\<lambda>n. f (n + Suc m)) = convergent f
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
convergent (\<lambda>n. f (n + Suc m)) = convergent f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma list_head_length_one:
  assumes "hd xs = x"
    and "length xs = 1"
  shows "xs = [x]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs = [x]
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
hd xs = x
length xs = 1

goal (1 subgoal):
 1. xs = [x]
[PROOF STEP]
by(metis One_nat_def Suc_length_conv hd_Cons_tl length_0_conv list.sel(3))


[STATEMENT]
lemma l_empty:
  assumes "invar (Node k v l r)" "v < p\<^sub>0$k"
  shows "set_kdt l \<inter> cbox p\<^sub>0 p\<^sub>1 = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_kdt l \<inter> cbox p\<^sub>0 p\<^sub>1 = {}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. set_kdt l \<inter> cbox p\<^sub>0 p\<^sub>1 = {}
[PROOF STEP]
have "\<forall>p \<in> set_kdt l. p$k < p\<^sub>0$k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>p\<in>set_kdt l. p $ k < p\<^sub>0 $ k
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
invar (Node k v l r)
v < p\<^sub>0 $ k

goal (1 subgoal):
 1. \<forall>p\<in>set_kdt l. p $ k < p\<^sub>0 $ k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>set_kdt l. p $ k < p\<^sub>0 $ k

goal (1 subgoal):
 1. set_kdt l \<inter> cbox p\<^sub>0 p\<^sub>1 = {}
[PROOF STEP]
hence "\<forall>p \<in> set_kdt l. p \<notin> cbox p\<^sub>0 p\<^sub>1"
[PROOF STATE]
proof (prove)
using this:
\<forall>p\<in>set_kdt l. p $ k < p\<^sub>0 $ k

goal (1 subgoal):
 1. \<forall>p\<in>set_kdt l. p \<notin> cbox p\<^sub>0 p\<^sub>1
[PROOF STEP]
using cbox_point_def leD
[PROOF STATE]
proof (prove)
using this:
\<forall>p\<in>set_kdt l. p $ k < p\<^sub>0 $ k
cbox ?p\<^sub>0 ?p\<^sub>1 = {p. \<forall>k. ?p\<^sub>0 $ k \<le> p $ k \<and> p $ k \<le> ?p\<^sub>1 $ k}
?y \<le> ?x \<Longrightarrow> \<not> ?x < ?y

goal (1 subgoal):
 1. \<forall>p\<in>set_kdt l. p \<notin> cbox p\<^sub>0 p\<^sub>1
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>set_kdt l. p \<notin> cbox p\<^sub>0 p\<^sub>1

goal (1 subgoal):
 1. set_kdt l \<inter> cbox p\<^sub>0 p\<^sub>1 = {}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>p\<in>set_kdt l. p \<notin> cbox p\<^sub>0 p\<^sub>1

goal (1 subgoal):
 1. set_kdt l \<inter> cbox p\<^sub>0 p\<^sub>1 = {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
set_kdt l \<inter> cbox p\<^sub>0 p\<^sub>1 = {}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma path_component_eq:
   "y \<in> path_component_set S x \<Longrightarrow> path_component_set S y = path_component_set S x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<in> path_component_set S x \<Longrightarrow> path_component_set S y = path_component_set S x
[PROOF STEP]
by (metis (no_types, lifting) Collect_cong mem_Collect_eq path_component_sym path_component_trans)


[STATEMENT]
lemma poly_root_unity: "poly (root_unity n) x = 0 \<longleftrightarrow> x^n = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (poly (root_unity n) x = (0::'a)) = (x ^ n = (1::'a))
[PROOF STEP]
unfolding root_unity_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (poly (monom (1::'a) n - 1) x = (0::'a)) = (x ^ n = (1::'a))
[PROOF STEP]
by (simp add: poly_monom)


[STATEMENT]
lemma gather_simps[no_atp]:
  "(\<exists>x. (\<forall>y \<in> L. y < x) \<and> (\<forall>y \<in> U. x < y) \<and> x < u \<and> P x) \<longleftrightarrow>
    (\<exists>x. (\<forall>y \<in> L. y < x) \<and> (\<forall>y \<in> (insert u U). x < y) \<and> P x)"
  "(\<exists>x. (\<forall>y \<in> L. y < x) \<and> (\<forall>y \<in> U. x < y) \<and> l < x \<and> P x) \<longleftrightarrow>
    (\<exists>x. (\<forall>y \<in> (insert l L). y < x) \<and> (\<forall>y \<in> U. x < y) \<and> P x)"
  "(\<exists>x. (\<forall>y \<in> L. y < x) \<and> (\<forall>y \<in> U. x < y) \<and> x < u) \<longleftrightarrow>
    (\<exists>x. (\<forall>y \<in> L. y < x) \<and> (\<forall>y \<in> (insert u U). x < y))"
  "(\<exists>x. (\<forall>y \<in> L. y < x) \<and> (\<forall>y \<in> U. x < y) \<and> l < x) \<longleftrightarrow>
    (\<exists>x. (\<forall>y \<in> (insert l L). y < x) \<and> (\<forall>y \<in> U. x < y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<exists>x. (\<forall>y\<in>L. y < x) \<and> (\<forall>y\<in>U. x < y) \<and> x < u \<and> P x) = (\<exists>x. (\<forall>y\<in>L. y < x) \<and> (\<forall>y\<in>insert u U. x < y) \<and> P x) &&& (\<exists>x. (\<forall>y\<in>L. y < x) \<and> (\<forall>y\<in>U. x < y) \<and> l < x \<and> P x) = (\<exists>x. (\<forall>y\<in>insert l L. y < x) \<and> (\<forall>y\<in>U. x < y) \<and> P x)) &&& (\<exists>x. (\<forall>y\<in>L. y < x) \<and> (\<forall>y\<in>U. x < y) \<and> x < u) = (\<exists>x. (\<forall>y\<in>L. y < x) \<and> (\<forall>y\<in>insert u U. x < y)) &&& (\<exists>x. (\<forall>y\<in>L. y < x) \<and> (\<forall>y\<in>U. x < y) \<and> l < x) = (\<exists>x. (\<forall>y\<in>insert l L. y < x) \<and> (\<forall>y\<in>U. x < y))
[PROOF STEP]
by auto


[STATEMENT]
lemma skolemize2: "\<forall>x.\<exists>y. P x y \<Longrightarrow> \<exists>f.\<forall>x. P x (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. \<exists>y. P x y \<Longrightarrow> \<exists>f. \<forall>x. P x (f x)
[PROOF STEP]
apply(rule_tac x = "\<lambda>x. SOME y. P x y" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. \<exists>y. P x y \<Longrightarrow> \<forall>x. P x (SOME y. P x y)
[PROOF STEP]
apply(fast intro:someI2)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma distinct3_def:
  "distinct [A, B, C] = (A \<noteq> B \<and> A \<noteq> C \<and> B \<noteq> C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct [A, B, C] = (A \<noteq> B \<and> A \<noteq> C \<and> B \<noteq> C)
[PROOF STEP]
by auto


[STATEMENT]
lemma univ_poly_one: "one (K[X]\<^bsub>R\<^esub>) = [ \<one>\<^bsub>R\<^esub> ]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>K [X]\<^bsub>R\<^esub>\<^esub> = [\<one>\<^bsub>R\<^esub>]
[PROOF STEP]
unfolding univ_poly_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<one>\<^bsub>\<lparr>carrier = Collect (polynomial\<^bsub>R\<^esub> K), monoid.mult = ring.poly_mult R, one = [\<one>\<^bsub>R\<^esub>], zero = [], add = ring.poly_add R\<rparr>\<^esub> = [\<one>\<^bsub>R\<^esub>]
[PROOF STEP]
by simp


[STATEMENT]
lemma cf_rcomp_ArrMap_vdomain[cat_cs_simps]:
  assumes "category \<alpha> \<BB>" and "\<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<D>\<^sub>\<circ> (cf_rcomp \<BB> \<SS> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_rcomp \<BB> \<SS> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Arr\<rparr>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<BB>
\<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_rcomp \<BB> \<SS> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Arr\<rparr>
[PROOF STEP]
unfolding cf_rcomp_def
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<BB>
\<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> (dghm_id \<BB>) \<GG>\<lparr>ArrMap\<rparr>) = (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Arr\<rparr>
[PROOF STEP]
by (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros)


[STATEMENT]
lemma ltl_const_equiv_and_const[simp]:
  "\<phi>\<^sub>1 and\<^sub>n \<phi>\<^sub>2 \<sim>\<^sub>C true\<^sub>n \<longleftrightarrow> \<phi>\<^sub>1 \<sim>\<^sub>C true\<^sub>n \<and> \<phi>\<^sub>2 \<sim>\<^sub>C true\<^sub>n"
  "\<phi>\<^sub>1 and\<^sub>n \<phi>\<^sub>2 \<sim>\<^sub>C false\<^sub>n \<longleftrightarrow> \<phi>\<^sub>1 \<sim>\<^sub>C false\<^sub>n \<or> \<phi>\<^sub>2 \<sim>\<^sub>C false\<^sub>n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi>\<^sub>1 and\<^sub>n \<phi>\<^sub>2 \<sim>\<^sub>C true\<^sub>n = (\<phi>\<^sub>1 \<sim>\<^sub>C true\<^sub>n \<and> \<phi>\<^sub>2 \<sim>\<^sub>C true\<^sub>n) &&& \<phi>\<^sub>1 and\<^sub>n \<phi>\<^sub>2 \<sim>\<^sub>C false\<^sub>n = (\<phi>\<^sub>1 \<sim>\<^sub>C false\<^sub>n \<or> \<phi>\<^sub>2 \<sim>\<^sub>C false\<^sub>n)
[PROOF STEP]
unfolding ltl_const_equiv_const
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (eval (\<phi>\<^sub>1 and\<^sub>n \<phi>\<^sub>2) = Yes) = (eval \<phi>\<^sub>1 = Yes \<and> eval \<phi>\<^sub>2 = Yes) &&& (eval (\<phi>\<^sub>1 and\<^sub>n \<phi>\<^sub>2) = No) = (eval \<phi>\<^sub>1 = No \<or> eval \<phi>\<^sub>2 = No)
[PROOF STEP]
by force+


[STATEMENT]
lemma poly_card_roots_less_leq:
  "card {x. a < x \<and> x \<le> b \<and> poly p x = 0} = count_roots_between p a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {x. a < x \<and> x \<le> b \<and> poly p x = 0} = count_roots_between p a b
[PROOF STEP]
by (simp add: count_roots_between_correct)


[STATEMENT]
lemma has_integral_reflect[simp]:
  "((\<lambda>x. f (-x)) has_integral i) (cbox (-b) (-a)) \<longleftrightarrow> (f has_integral i) (cbox a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f (- x)) has_integral i) (cbox (- b) (- a)) = (f has_integral i) (cbox a b)
[PROOF STEP]
by (auto dest: has_integral_reflect_lemma)


[STATEMENT]
lemma mkuexpr_uminus [mkuexpr]: "mk\<^sub>e (\<lambda> s. - f s) = - mk\<^sub>e f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mk\<^sub>e (\<lambda>s. - f s) = - mk\<^sub>e f
[PROOF STEP]
by (simp add: uminus_uexpr_def, transfer, simp)


[STATEMENT]
lemma split_word_eq_on_mask:
  "(x = y) = (x AND m = y AND m \<and> x AND NOT m = y AND NOT m)"
  for x y m :: \<open>'a::len word\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x = y) = (x AND m = y AND m \<and> x AND NOT m = y AND NOT m)
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y m. (take_bit LENGTH('a) x = take_bit LENGTH('a) y) = (take_bit LENGTH('a) (x AND m) = take_bit LENGTH('a) (y AND m) \<and> take_bit LENGTH('a) (x AND NOT m) = take_bit LENGTH('a) (y AND NOT m))
[PROOF STEP]
apply (simp add: bit_eq_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y m. (\<forall>n. bit (take_bit LENGTH('a) x) n = bit (take_bit LENGTH('a) y) n) = ((\<forall>n. bit (take_bit LENGTH('a) x AND take_bit LENGTH('a) m) n = bit (take_bit LENGTH('a) y AND take_bit LENGTH('a) m) n) \<and> (\<forall>n. bit (take_bit LENGTH('a) x AND take_bit LENGTH('a) (NOT m)) n = bit (take_bit LENGTH('a) y AND take_bit LENGTH('a) (NOT m)) n))
[PROOF STEP]
apply (auto simp add: bit_simps ac_simps)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma polynomial_of_list_remove_powers_polynomial_bool:
  \<open>(polynomial_of_mset xs) - polynomial_of_mset (remove_powers xs) \<in> ideal polynomial_bool\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
proof (induction xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. polynomial_of_mset {#} - polynomial_of_mset (remove_powers {#}) \<in> More_Modules.ideal polynomial_bool
 2. \<And>x xs. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. polynomial_of_mset {#} - polynomial_of_mset (remove_powers {#}) \<in> More_Modules.ideal polynomial_bool
 2. \<And>x xs. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show \<open>?case\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. polynomial_of_mset {#} - polynomial_of_mset (remove_powers {#}) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
by (auto simp: remove_powers_def ideal.span_zero)
[PROOF STATE]
proof (state)
this:
polynomial_of_mset {#} - polynomial_of_mset (remove_powers {#}) \<in> More_Modules.ideal polynomial_bool

goal (1 subgoal):
 1. \<And>x xs. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xs. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
case (add x xs)
[PROOF STATE]
proof (state)
this:
polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool

goal (1 subgoal):
 1. \<And>x xs. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
have H1: \<open>x1 \<in># x2 \<Longrightarrow>
       Var (\<phi> x1) * poly_of_vars x2 - p \<in> More_Modules.ideal polynomial_bool \<longleftrightarrow>
       poly_of_vars x2 - p \<in> More_Modules.ideal polynomial_bool
       \<close> for x1 x2 p
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x1 \<in># x2 \<Longrightarrow> (Var (\<phi> x1) * poly_of_vars x2 - p \<in> More_Modules.ideal polynomial_bool) = (poly_of_vars x2 - p \<in> More_Modules.ideal polynomial_bool)
[PROOF STEP]
apply (subst (2) ideal.span_add_eq[symmetric,
      of \<open>Var (\<phi> x1) * poly_of_vars x2 - poly_of_vars x2\<close>])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. x1 \<in># x2 \<Longrightarrow> Var (\<phi> x1) * poly_of_vars x2 - poly_of_vars x2 \<in> More_Modules.ideal polynomial_bool
 2. x1 \<in># x2 \<Longrightarrow> (Var (\<phi> x1) * poly_of_vars x2 - p \<in> More_Modules.ideal polynomial_bool) = (Var (\<phi> x1) * poly_of_vars x2 - poly_of_vars x2 + (poly_of_vars x2 - p) \<in> More_Modules.ideal polynomial_bool)
[PROOF STEP]
apply (drule multi_member_split)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<exists>A. x2 = add_mset x1 A \<Longrightarrow> Var (\<phi> x1) * poly_of_vars x2 - poly_of_vars x2 \<in> More_Modules.ideal polynomial_bool
 2. x1 \<in># x2 \<Longrightarrow> (Var (\<phi> x1) * poly_of_vars x2 - p \<in> More_Modules.ideal polynomial_bool) = (Var (\<phi> x1) * poly_of_vars x2 - poly_of_vars x2 + (poly_of_vars x2 - p) \<in> More_Modules.ideal polynomial_bool)
[PROOF STEP]
apply (auto simp: X2_X_polynomial_bool_mult_in)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
?x1.2 \<in># ?x2.2 \<Longrightarrow> (Var (\<phi> ?x1.2) * poly_of_vars ?x2.2 - ?p2 \<in> More_Modules.ideal polynomial_bool) = (poly_of_vars ?x2.2 - ?p2 \<in> More_Modules.ideal polynomial_bool)

goal (1 subgoal):
 1. \<And>x xs. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
have diff: \<open>poly_of_vars (x) - poly_of_vars (remdups_mset (x)) \<in> ideal polynomial_bool\<close> for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_of_vars x - poly_of_vars (remdups_mset x) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
by (induction x)
     (auto simp: remove_powers_def ideal.span_zero H1
      simp flip: right_diff_distrib intro!: ideal.span_scale)
[PROOF STATE]
proof (state)
this:
poly_of_vars ?x2 - poly_of_vars (remdups_mset ?x2) \<in> More_Modules.ideal polynomial_bool

goal (1 subgoal):
 1. \<And>x xs. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
have [simp]: \<open>polynomial_of_mset xs -
    polynomial_of_mset (apfst remdups_mset `# xs)
    \<in> More_Modules.ideal polynomial_bool \<Longrightarrow>
    poly_of_vars ys * poly_of_vars ys -
    poly_of_vars ys * poly_of_vars (remdups_mset ys)
    \<in> More_Modules.ideal polynomial_bool \<Longrightarrow>
    polynomial_of_mset xs + Const y * poly_of_vars ys -
    (polynomial_of_mset (apfst remdups_mset `# xs) +
    Const y * poly_of_vars (remdups_mset ys))
    \<in> More_Modules.ideal polynomial_bool\<close> for y ys
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>polynomial_of_mset xs - polynomial_of_mset (apfst remdups_mset `# xs) \<in> More_Modules.ideal polynomial_bool; poly_of_vars ys * poly_of_vars ys - poly_of_vars ys * poly_of_vars (remdups_mset ys) \<in> More_Modules.ideal polynomial_bool\<rbrakk> \<Longrightarrow> polynomial_of_mset xs + Const y * poly_of_vars ys - (polynomial_of_mset (apfst remdups_mset `# xs) + Const y * poly_of_vars (remdups_mset ys)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
by (metis add_diff_add diff ideal.scale_right_diff_distrib ideal.span_add ideal.span_scale)
[PROOF STATE]
proof (state)
this:
\<lbrakk>polynomial_of_mset xs - polynomial_of_mset (apfst remdups_mset `# xs) \<in> More_Modules.ideal polynomial_bool; poly_of_vars ?ys2 * poly_of_vars ?ys2 - poly_of_vars ?ys2 * poly_of_vars (remdups_mset ?ys2) \<in> More_Modules.ideal polynomial_bool\<rbrakk> \<Longrightarrow> polynomial_of_mset xs + Const ?y2 * poly_of_vars ?ys2 - (polynomial_of_mset (apfst remdups_mset `# xs) + Const ?y2 * poly_of_vars (remdups_mset ?ys2)) \<in> More_Modules.ideal polynomial_bool

goal (1 subgoal):
 1. \<And>x xs. polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
using add
[PROOF STATE]
proof (prove)
using this:
polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool

goal (1 subgoal):
 1. polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
apply (cases x)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool; x = (a, b)\<rbrakk> \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
subgoal for ys y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool; x = (ys, y)\<rbrakk> \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
using ideal_mult_right_in2[OF diff, of \<open>poly_of_vars ys\<close> ys]
[PROOF STATE]
proof (prove)
using this:
poly_of_vars ys * (poly_of_vars ys - poly_of_vars (remdups_mset ys)) \<in> More_Modules.ideal polynomial_bool

goal (1 subgoal):
 1. \<lbrakk>polynomial_of_mset xs - polynomial_of_mset (remove_powers xs) \<in> More_Modules.ideal polynomial_bool; x = (ys, y)\<rbrakk> \<Longrightarrow> polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool
[PROOF STEP]
by (auto simp: remove_powers_def right_diff_distrib
        ideal.span_diff ideal.span_add field_simps)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
polynomial_of_mset (add_mset x xs) - polynomial_of_mset (remove_powers (add_mset x xs)) \<in> More_Modules.ideal polynomial_bool

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_integral_localized_vector_derivative:
    "((\<lambda>x. f (g x) * vector_derivative p (at x within {a..b})) has_integral i) {a..b} \<longleftrightarrow>
     ((\<lambda>x. f (g x) * vector_derivative p (at x)) has_integral i) {a..b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f (g x) * vector_derivative p (at x within {a..b})) has_integral i) {a..b} = ((\<lambda>x. f (g x) * vector_derivative p (at x)) has_integral i) {a..b}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. f (g x) * vector_derivative p (at x within {a..b})) has_integral i) {a..b} = ((\<lambda>x. f (g x) * vector_derivative p (at x)) has_integral i) {a..b}
[PROOF STEP]
have *: "{a..b} - {a,b} = interior {a..b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a..b} - {a, b} = interior {a..b}
[PROOF STEP]
by (simp add: atLeastAtMost_diff_ends)
[PROOF STATE]
proof (state)
this:
{a..b} - {a, b} = interior {a..b}

goal (1 subgoal):
 1. ((\<lambda>x. f (g x) * vector_derivative p (at x within {a..b})) has_integral i) {a..b} = ((\<lambda>x. f (g x) * vector_derivative p (at x)) has_integral i) {a..b}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f (g x) * vector_derivative p (at x within {a..b})) has_integral i) {a..b} = ((\<lambda>x. f (g x) * vector_derivative p (at x)) has_integral i) {a..b}
[PROOF STEP]
by (rule has_integral_spike_eq [of "{a,b}"]) (auto simp: at_within_interior [of _ "{a..b}"])
[PROOF STATE]
proof (state)
this:
((\<lambda>x. f (g x) * vector_derivative p (at x within {a..b})) has_integral i) {a..b} = ((\<lambda>x. f (g x) * vector_derivative p (at x)) has_integral i) {a..b}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Worder) ord_isom_segment_segment:"\<lbrakk>Worder E;
      ord_isom D E f; a \<in> carrier D \<rbrakk> \<Longrightarrow>
      ord_isom (Iod D (segment D a)) (Iod E (segment E (f a)))
                                    (\<lambda>x\<in>carrier (Iod D (segment D a)). f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Worder E; ord_isom D E f; a \<in> carrier D\<rbrakk> \<Longrightarrow> ord_isom (Iod D (segment D a)) (Iod E (segment E (f a))) (restrict f (carrier (Iod D (segment D a))))
[PROOF STEP]
by (frule Worder.Order[of "E"],
       rule ord_isom_segment_segment[of "E" "f" "a"], assumption+)


[STATEMENT]
lemma Pasch:
  assumes "x \<in> unit_disc" and "y \<in> unit_disc" and "z \<in> unit_disc" and "u \<in> unit_disc" and "v \<in> unit_disc"
  assumes "poincare_between x u z" and "poincare_between y v z"
  shows "\<exists> a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
proof(cases "distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z} \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
 2. \<not> (distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}) \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}

goal (2 subgoals):
 1. distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z} \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
 2. \<not> (distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}) \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}

goal (1 subgoal):
 1. \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
using assms Pasch_nondeg
[PROOF STATE]
proof (prove)
using this:
distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}
x \<in> unit_disc
y \<in> unit_disc
z \<in> unit_disc
u \<in> unit_disc
v \<in> unit_disc
poincare_between x u z
poincare_between y v z
\<lbrakk>?x \<in> unit_disc; ?y \<in> unit_disc; ?z \<in> unit_disc; ?u \<in> unit_disc; ?v \<in> unit_disc; distinct [?x, ?y, ?z, ?u, ?v]; \<not> poincare_collinear {?x, ?y, ?z}; poincare_between ?x ?u ?z; poincare_between ?y ?v ?z\<rbrakk> \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between ?u a ?y \<and> poincare_between ?x a ?v

goal (1 subgoal):
 1. \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v

goal (1 subgoal):
 1. \<not> (distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}) \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}) \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z})

goal (1 subgoal):
 1. \<not> (distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z}) \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> (distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z})

goal (1 subgoal):
 1. \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
using assms Pasch_deg
[PROOF STATE]
proof (prove)
using this:
\<not> (distinct [x, y, z, u, v] \<and> \<not> poincare_collinear {x, y, z})
x \<in> unit_disc
y \<in> unit_disc
z \<in> unit_disc
u \<in> unit_disc
v \<in> unit_disc
poincare_between x u z
poincare_between y v z
\<lbrakk>?x \<in> unit_disc; ?y \<in> unit_disc; ?z \<in> unit_disc; ?u \<in> unit_disc; ?v \<in> unit_disc; \<not> distinct [?x, ?y, ?z, ?u, ?v] \<or> poincare_collinear {?x, ?y, ?z}; poincare_between ?x ?u ?z; poincare_between ?y ?v ?z\<rbrakk> \<Longrightarrow> \<exists>a. a \<in> unit_disc \<and> poincare_between ?u a ?y \<and> poincare_between ?x a ?v

goal (1 subgoal):
 1. \<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>a. a \<in> unit_disc \<and> poincare_between u a y \<and> poincare_between x a v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma represents_add_rat:
  assumes "p represents x" shows "(poly_add_rat r p) represents (of_rat r + x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_add_rat r p represents of_rat r + x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
p represents x

goal (1 subgoal):
 1. poly_add_rat r p represents of_rat r + x
[PROOF STEP]
unfolding represents_def ipoly_add_rat
[PROOF STATE]
proof (prove)
using this:
ipoly p x = (0::'a) \<and> p \<noteq> 0

goal (1 subgoal):
 1. of_int (snd (quotient_of r)) ^ degree p * ipoly p (of_rat r + x - of_rat r) = (0::'a) \<and> poly_add_rat r p \<noteq> 0
[PROOF STEP]
by simp


[STATEMENT]
lemma CBlinfun_eq_matrix: "bounded_clinear f \<Longrightarrow> CBlinfun f = cblinfun_of_matrix (\<lambda>i j. i \<bullet>\<^sub>C f j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_clinear f \<Longrightarrow> CBlinfun f = cblinfun_of_matrix (\<lambda>i j. i \<bullet>\<^sub>C f j)
[PROOF STEP]
apply (intro cblinfun_euclidean_eqI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>bounded_clinear f; i \<in> CBasis\<rbrakk> \<Longrightarrow> cblinfun_apply (CBlinfun f) i = cblinfun_apply (cblinfun_of_matrix (\<lambda>i j. i \<bullet>\<^sub>C f j)) i
[PROOF STEP]
by (auto simp: cblinfun_of_matrix_apply bounded_clinear_CBlinfun_apply cinner_CBasis if_distrib
      if_distribR sum.delta' ceuclidean_representation
      cong: if_cong)


[STATEMENT]
lemma cpow_cexp_ctwo: "cpow r =o ctwo ^c r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cpow r =o ctwo ^c r
[PROOF STEP]
unfolding cpow_def ctwo_def cexp_def Field_card_of
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |Pow (Field r)| =o |Func (Field r) UNIV|
[PROOF STEP]
by (rule card_of_Pow_Func)


[STATEMENT]
lemma fset_to_fset: "finite A \<Longrightarrow> fset (the_inv fset A) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> fset (the_inv fset A) = A
[PROOF STEP]
apply (rule f_the_inv_into_f[unfolded inj_on_def])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. finite A \<Longrightarrow> \<forall>x\<in>UNIV. \<forall>y\<in>UNIV. fset x = fset y \<longrightarrow> x = y
 2. finite A \<Longrightarrow> A \<in> range fset
[PROOF STEP]
apply (simp add: fset_inject)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> A \<in> range fset
[PROOF STEP]
apply (rule range_eqI Abs_fset_inverse[symmetric] CollectI)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> finite A
[PROOF STEP]
.


[STATEMENT]
lemma map_sub_finer_than_commute:
  "map_topology f (subtopology T (f -` X)) finer_than subtopology (map_topology f T) X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_topology f (subtopology T (f -` X)) finer_than subtopology (map_topology f T) X
[PROOF STEP]
by (auto simp: finer_than_def continuous_map_def openin_subtopology openin_map_topology
      topspace_subtopology)


[STATEMENT]
lemma asBinp_equal_imp_alphaBinp:
assumes "qGoodBinp qbinp" and "asBinp qbinp = asBinp qbinp'"
shows "qbinp %%= qbinp'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (qbinp, qbinp') \<in> alphaBinp
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
qGoodBinp qbinp
asBinp qbinp = asBinp qbinp'

goal (1 subgoal):
 1. (qbinp, qbinp') \<in> alphaBinp
[PROOF STEP]
unfolding alphaBinp_def liftAll2_def sameDom_def
[PROOF STATE]
proof (prove)
using this:
qGoodBinp qbinp
asBinp qbinp = asBinp qbinp'

goal (1 subgoal):
 1. (qbinp, qbinp') \<in> {(qbinp, qbinp'). (\<forall>i. (qbinp i = None) = (qbinp' i = None)) \<and> (\<forall>i v1 v2. qbinp i = Some v1 \<and> qbinp' i = Some v2 \<longrightarrow> v1 $= v2)}
[PROOF STEP]
by simp (smt asAbs_equal_imp_alphaAbs asBinp_def liftAll_def
lift_None lift_def option.inject option.simps(5) qGoodBinp_def)


[STATEMENT]
lemma shift2[simp]:
assumes "I \<subseteq> {..< brn (cl!n)}"
and "ii \<in> shift cl n I"
shows "brnL cl n \<le> ii \<and> ii < brnL cl n + brn (cl!n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. brnL cl n \<le> ii \<and> ii < brnL cl n + brn (cl ! n)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
I \<subseteq> {..<brn (cl ! n)}
ii \<in> local.shift cl n I

goal (1 subgoal):
 1. brnL cl n \<le> ii \<and> ii < brnL cl n + brn (cl ! n)
[PROOF STEP]
unfolding shift_def
[PROOF STATE]
proof (prove)
using this:
I \<subseteq> {..<brn (cl ! n)}
ii \<in> (+) (brnL cl n) ` I

goal (1 subgoal):
 1. brnL cl n \<le> ii \<and> ii < brnL cl n + brn (cl ! n)
[PROOF STEP]
by auto


[STATEMENT]
lemma poly_compose_closed:
  assumes "is_poly_tuple m fs"
  assumes "length fs = n"
  assumes "f \<in> carrier (Q\<^sub>p[\<X>\<^bsub>n\<^esub>])"
  shows "(Qp_poly_comp m fs f) \<in> carrier (Q\<^sub>p[\<X>\<^bsub>m\<^esub>])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Qp_poly_comp m fs f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>m\<^esub>])
[PROOF STEP]
using Qp.cring_axioms assms
[PROOF STATE]
proof (prove)
using this:
cring Q\<^sub>p
is_poly_tuple m fs
length fs = n
f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>])

goal (1 subgoal):
 1. Qp_poly_comp m fs f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>m\<^esub>])
[PROOF STEP]
unfolding Qp_poly_comp_def
[PROOF STATE]
proof (prove)
using this:
cring Q\<^sub>p
is_poly_tuple m fs
length fs = n
f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>])

goal (1 subgoal):
 1. poly_compose (length fs) m fs f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>m\<^esub>])
[PROOF STEP]
using poly_compose_closed
[PROOF STATE]
proof (prove)
using this:
cring Q\<^sub>p
is_poly_tuple m fs
length fs = n
f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>n\<^esub>])
\<lbrakk>is_poly_tuple ?m ?fs; length ?fs = ?n; ?f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>?n\<^esub>])\<rbrakk> \<Longrightarrow> poly_compose ?n ?m ?fs ?f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>?m\<^esub>])

goal (1 subgoal):
 1. poly_compose (length fs) m fs f \<in> carrier (Q\<^sub>p [\<X>\<^bsub>m\<^esub>])
[PROOF STEP]
by blast


[STATEMENT]
lemma subset_Under_Above: "B \<le> Field r \<Longrightarrow> B \<le> Under r (Above r B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<subseteq> Field r \<Longrightarrow> B \<subseteq> Under r (Above r B)
[PROOF STEP]
by(auto simp add: Under_def Above_def)


[STATEMENT]
lemma nn_integral_divide: "f \<in> borel_measurable M \<Longrightarrow> (\<integral>\<^sup>+ x. f x / c \<partial>M) = (\<integral>\<^sup>+ x. f x \<partial>M) / c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> borel_measurable M \<Longrightarrow> \<integral>\<^sup>+ x. f x / c \<partial>M = integral\<^sup>N M f / c
[PROOF STEP]
unfolding divide_ennreal_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> borel_measurable M \<Longrightarrow> \<integral>\<^sup>+ x. f x * inverse c \<partial>M = integral\<^sup>N M f * inverse c
[PROOF STEP]
by (rule nn_integral_multc)


[STATEMENT]
theorem ATV_EF: "\<lbrakk> \<turnstile>\<^sub>V A; (I,s) = attack A \<rbrakk> \<Longrightarrow>
 (Kripke {s. \<exists> i \<in> I. (i \<rightarrow>\<^sub>i* s) } I  \<turnstile> EF s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<turnstile>\<^sub>V A; (I, s) = attack A\<rbrakk> \<Longrightarrow> Kripke {s. \<exists>i\<in>I. i \<rightarrow>\<^sub>i* s} I \<turnstile> EF s
[PROOF STEP]
by (metis (full_types) AT_EF ref_pres_att ref_validity_def valid_ref_def)


[STATEMENT]
theorem wls_skelAbs_swapAbs:
"wlsAbs (us,s) A
 \<Longrightarrow> skelAbs (A $[x1 \<and> x2]_xs) = skelAbs A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wlsAbs (us, s) A \<Longrightarrow> skelAbs (A $[x1 \<and> x2]_xs) = skelAbs A
[PROOF STEP]
by (erule wlsAbs_cases) (auto simp: wls_skel_swap)


[STATEMENT]
lemma numeral_less_real_of_nat_iff [simp]: "numeral w < real n \<longleftrightarrow> numeral w < n"
  for n :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (numeral w < real n) = (numeral w < n)
[PROOF STEP]
by (metis of_nat_less_iff of_nat_numeral)


[STATEMENT]
lemma pseudominimal_comp:
  "\<lbrakk> pseudominimal_in P x; pseudominimal_in P y; x\<^bold>\<le>y \<rbrakk> \<Longrightarrow> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pseudominimal_in P x; pseudominimal_in P y; x \<^bold>\<le> y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
using pseudominimal_inD1 pseudominimal_inD2 pseudominimal_ne_bottom
        strict_iff_order[of x y]
[PROOF STATE]
proof (prove)
using this:
pseudominimal_in ?P ?x \<Longrightarrow> ?x \<in> ?P
\<lbrakk>pseudominimal_in ?P ?x; ?z \<in> ?P; ?z \<^bold>< ?x\<rbrakk> \<Longrightarrow> ?z = bottom ?P
pseudominimal_in ?P ?x \<Longrightarrow> ?x \<noteq> bottom ?P
(x \<^bold>< y) = (x \<^bold>\<le> y \<and> x \<noteq> y)

goal (1 subgoal):
 1. \<lbrakk>pseudominimal_in P x; pseudominimal_in P y; x \<^bold>\<le> y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
by    force


[STATEMENT]
lemma OPT_0:
  "OPT 0 W = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.OPT 0 W = 0
[PROOF STEP]
unfolding OPT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Max {sum v S |S. S \<subseteq> {1..0} \<and> sum w S \<le> W} = 0
[PROOF STEP]
by simp


[STATEMENT]
lemma circline_set_moebius_circline_E:
  assumes "moebius_pt M z \<in> circline_set (moebius_circline M H)"
  shows "z \<in> circline_set H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<in> circline_set H
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
moebius_pt M z \<in> circline_set (moebius_circline M H)

goal (1 subgoal):
 1. z \<in> circline_set H
[PROOF STEP]
using moebius_pt_eq_I[of M z]
[PROOF STATE]
proof (prove)
using this:
moebius_pt M z \<in> circline_set (moebius_circline M H)
moebius_pt M z = moebius_pt M ?z2.0 \<Longrightarrow> z = ?z2.0

goal (1 subgoal):
 1. z \<in> circline_set H
[PROOF STEP]
by auto


[STATEMENT]
lemma symeval_plus: assumes "symeval P e1 v1" "symeval P e2 v2"
  shows "symeval P (Plus e1 e2) (v1+v2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. symeval P (Plus e1 e2) (v1 + v2)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
symeval P e1 v1
symeval P e2 v2

goal (1 subgoal):
 1. symeval P (Plus e1 e2) (v1 + v2)
[PROOF STEP]
unfolding symeval_def
[PROOF STATE]
proof (prove)
using this:
\<forall>s n. P (s, n) \<longrightarrow> paval' e1 s = Some v1
\<forall>s n. P (s, n) \<longrightarrow> paval' e2 s = Some v2

goal (1 subgoal):
 1. \<forall>s n. P (s, n) \<longrightarrow> paval' (Plus e1 e2) s = Some (v1 + v2)
[PROOF STEP]
by auto


[STATEMENT]
lemma moebius_circline_comp [simp]:
  shows "moebius_circline (moebius_comp M1 M2) H = moebius_circline M1 (moebius_circline M2 H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_circline (moebius_comp M1 M2) H = moebius_circline M1 (moebius_circline M2 H)
[PROOF STEP]
by (transfer, transfer) (simp add: mat_inv_mult_mm, rule_tac x=1 in exI, simp add: mult_mm_assoc)


[STATEMENT]
lemma  stake_inter_snth:
  fixes x
  assumes "Suc 0 \<le> n"
  shows "{w\<in> space M. (stake n w = stake n x)} = (\<Inter> i \<in> {0.. n-1}. {w\<in> space M. (snth w i = snth x i)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {w \<in> space M. stake n w = stake n x} = (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {w \<in> space M. stake n w = stake n x} \<subseteq> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})
 2. (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<subseteq> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
let ?S =  "{w\<in> space M. (stake n w = stake n x)}"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. {w \<in> space M. stake n w = stake n x} \<subseteq> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})
 2. (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<subseteq> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
show "?S \<subseteq> (\<Inter>i\<in>{0..n-1}. {w \<in> space M. w !! i = x !! i})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {w \<in> space M. stake n w = stake n x} \<subseteq> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})
[PROOF STEP]
using stake_snth assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>stake ?n ?w = stake ?n ?x; Suc ?i \<le> ?n\<rbrakk> \<Longrightarrow> ?w !! ?i = ?x !! ?i
Suc 0 \<le> n

goal (1 subgoal):
 1. {w \<in> space M. stake n w = stake n x} \<subseteq> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
{w \<in> space M. stake n w = stake n x} \<subseteq> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})

goal (1 subgoal):
 1. (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<subseteq> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
show "(\<Inter>i\<in>{0..n-1}. {w \<in> space M. w !! i = x !! i}) \<subseteq> ?S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<subseteq> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<Longrightarrow> xa \<in> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
fix w
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<Longrightarrow> xa \<in> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
assume inter: "w \<in> (\<Inter>i\<in>{0..n-1}. {w \<in> space M. w !! i = x !! i})"
[PROOF STATE]
proof (state)
this:
w \<in> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<Longrightarrow> xa \<in> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
have "\<forall> i. 0 \<le> i \<and> i \<le> n-1 \<longrightarrow> snth w i = snth x i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i. 0 \<le> i \<and> i \<le> n - 1 \<longrightarrow> w !! i = x !! i
[PROOF STEP]
proof (intro allI impI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. 0 \<le> i \<and> i \<le> n - 1 \<Longrightarrow> w !! i = x !! i
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. 0 \<le> i \<and> i \<le> n - 1 \<Longrightarrow> w !! i = x !! i
[PROOF STEP]
assume "0 \<le> i \<and> i \<le> n-1"
[PROOF STATE]
proof (state)
this:
0 \<le> i \<and> i \<le> n - 1

goal (1 subgoal):
 1. \<And>i. 0 \<le> i \<and> i \<le> n - 1 \<Longrightarrow> w !! i = x !! i
[PROOF STEP]
thus "snth w i = snth x i"
[PROOF STATE]
proof (prove)
using this:
0 \<le> i \<and> i \<le> n - 1

goal (1 subgoal):
 1. w !! i = x !! i
[PROOF STEP]
using inter
[PROOF STATE]
proof (prove)
using this:
0 \<le> i \<and> i \<le> n - 1
w \<in> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})

goal (1 subgoal):
 1. w !! i = x !! i
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w !! i = x !! i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>i. 0 \<le> i \<and> i \<le> n - 1 \<longrightarrow> w !! i = x !! i

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<Longrightarrow> xa \<in> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
hence "stake n w = stake n x"
[PROOF STATE]
proof (prove)
using this:
\<forall>i. 0 \<le> i \<and> i \<le> n - 1 \<longrightarrow> w !! i = x !! i

goal (1 subgoal):
 1. stake n w = stake n x
[PROOF STEP]
by (metis One_nat_def Suc_le_D diff_Suc_Suc diff_is_0_eq diff_zero le0 stake_snth')
[PROOF STATE]
proof (state)
this:
stake n w = stake n x

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<Longrightarrow> xa \<in> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
thus "w\<in> ?S"
[PROOF STATE]
proof (prove)
using this:
stake n w = stake n x

goal (1 subgoal):
 1. w \<in> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
using inter
[PROOF STATE]
proof (prove)
using this:
stake n w = stake n x
w \<in> (\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i})

goal (1 subgoal):
 1. w \<in> {w \<in> space M. stake n w = stake n x}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
w \<in> {w \<in> space M. stake n w = stake n x}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Inter>i\<in>{0..n - 1}. {w \<in> space M. w !! i = x !! i}) \<subseteq> {w \<in> space M. stake n w = stake n x}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lemmaA_3_10: "M = (M \<inter>s S) + (M -s S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M = M \<inter>s S + M -s S
[PROOF STEP]
unfolding diff_def intersect_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M = {#x \<in># M. x \<in> S#} + {#x \<in># M. x \<notin> S#}
[PROOF STEP]
by auto


[STATEMENT]
lemma plus_of_nat_minus_of_nat_zhmset:
  fixes k :: zhmultiset
  assumes "n \<le> m"
  shows "k + of_nat m - of_nat n = k + of_nat (m - n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k + of_nat m - of_nat n = k + of_nat (m - n)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
n \<le> m

goal (1 subgoal):
 1. k + of_nat m - of_nat n = k + of_nat (m - n)
[PROOF STEP]
by (simp add: of_nat_diff)


[STATEMENT]
lemma length_augment_list:
  "length ((augment_list f ^^ n) p) = n + length p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length ((augment_list f ^^ n) p) = n + length p
[PROOF STEP]
by(induct n,auto)


[STATEMENT]
lemma prime_multiplicity_prime:
  fixes p q :: "'a :: factorial_semiring"
  assumes "prime p" "prime q"
  shows   "multiplicity p q = (if p = q then 1 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicity p q = (if p = q then 1 else 0)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
prime p
prime q

goal (1 subgoal):
 1. multiplicity p q = (if p = q then 1 else 0)
[PROOF STEP]
by (auto simp: prime_multiplicity_other)


[STATEMENT]
lemma min_block_size_2: "\<k> \<ge> 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 \<le> \<k>
[PROOF STEP]
using block_size_t
[PROOF STATE]
proof (prove)
using this:
2 \<le> \<k>

goal (1 subgoal):
 1. 2 \<le> \<k>
[PROOF STEP]
by simp


[STATEMENT]
lemma odd_diffI:
  "even a \<Longrightarrow> odd b \<Longrightarrow> odd (a - b :: 'a :: unique_euclidean_ring_with_nat)"
  "odd a \<Longrightarrow> even b \<Longrightarrow> odd (a - b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lbrakk>even a; odd b\<rbrakk> \<Longrightarrow> odd (a - b)) &&& (\<lbrakk>odd a; even b\<rbrakk> \<Longrightarrow> odd (a - b))
[PROOF STEP]
by auto


[STATEMENT]
lemma inf_Inf: assumes nonempty: "A \<noteq> {}"
  shows "inf x (Inf A) = Inf ((inf x) ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inf x (Inf A) = Inf (inf x ` A)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<noteq> {}

goal (1 subgoal):
 1. inf x (Inf A) = Inf (inf x ` A)
[PROOF STEP]
by (auto simp add: INF_inf_const1 nonempty)


[STATEMENT]
lemma finestPartUnion:
  "X=\<Union> (finestpart X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X = \<Union> (finestpart X)
[PROOF STEP]
using finestPart
[PROOF STATE]
proof (prove)
using this:
finestpart ?X = {{x} |x. x \<in> ?X}

goal (1 subgoal):
 1. X = \<Union> (finestpart X)
[PROOF STEP]
by auto


[STATEMENT]
lemma csucc_le_csucc_iff: "\<lbrakk>Card \<kappa>'; Card \<kappa>\<rbrakk> \<Longrightarrow> (csucc \<kappa>' \<le> csucc \<kappa>) = (\<kappa>' \<le> \<kappa>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Card \<kappa>'; Card \<kappa>\<rbrakk> \<Longrightarrow> (csucc \<kappa>' \<le> csucc \<kappa>) = (\<kappa>' \<le> \<kappa>)
[PROOF STEP]
by (metis Card_csucc Card_is_Ord Card_lt_csucc_iff Ord_not_less)


[STATEMENT]
lemma \<omega>_limit_set_eq:
  assumes "{0..} \<subseteq> existence_ivl0 x"
  shows "\<omega>_limit_set x = (INF \<tau> \<in> {0..}. closure (flow0 x ` {\<tau>..}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<omega>_limit_set x = (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..}))
[PROOF STEP]
unfolding \<omega>_limit_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Collect (\<omega>_limit_point x) = (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..}))
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xa \<tau>. \<lbrakk>0 \<le> \<tau>; \<omega>_limit_point x xa\<rbrakk> \<Longrightarrow> xa \<in> closure (flow0 x ` {\<tau>..})
 2. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
fix p t
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xa \<tau>. \<lbrakk>0 \<le> \<tau>; \<omega>_limit_point x xa\<rbrakk> \<Longrightarrow> xa \<in> closure (flow0 x ` {\<tau>..})
 2. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
assume pt: "0 \<le> (t::real)" "\<omega>_limit_point x p"
[PROOF STATE]
proof (state)
this:
0 \<le> t
\<omega>_limit_point x p

goal (2 subgoals):
 1. \<And>xa \<tau>. \<lbrakk>0 \<le> \<tau>; \<omega>_limit_point x xa\<rbrakk> \<Longrightarrow> xa \<in> closure (flow0 x ` {\<tau>..})
 2. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
from \<omega>_limit_pointE[OF pt(2)]
[PROOF STATE]
proof (chain)
picking this:
(\<And>s. \<lbrakk>s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>; (flow0 x \<circ> s) \<longlonglongrightarrow> p; \<forall>n. ?b \<le> s n\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
obtain s where
    "filterlim s at_top sequentially"
    "(flow0 x \<circ> s) \<longlonglongrightarrow> p"
    "\<forall>n. t \<le> s n"
[PROOF STATE]
proof (prove)
using this:
(\<And>s. \<lbrakk>s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>; (flow0 x \<circ> s) \<longlonglongrightarrow> p; \<forall>n. ?b \<le> s n\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>; (flow0 x \<circ> s) \<longlonglongrightarrow> p; \<forall>n. t \<le> s n\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>
(flow0 x \<circ> s) \<longlonglongrightarrow> p
\<forall>n. t \<le> s n

goal (2 subgoals):
 1. \<And>xa \<tau>. \<lbrakk>0 \<le> \<tau>; \<omega>_limit_point x xa\<rbrakk> \<Longrightarrow> xa \<in> closure (flow0 x ` {\<tau>..})
 2. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
thus "p \<in> closure (flow0 x ` {t..})"
[PROOF STATE]
proof (prove)
using this:
s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>
(flow0 x \<circ> s) \<longlonglongrightarrow> p
\<forall>n. t \<le> s n

goal (1 subgoal):
 1. p \<in> closure (flow0 x ` {t..})
[PROOF STEP]
unfolding closure_sequential
[PROOF STATE]
proof (prove)
using this:
s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>
(flow0 x \<circ> s) \<longlonglongrightarrow> p
\<forall>n. t \<le> s n

goal (1 subgoal):
 1. \<exists>xa. (\<forall>n. xa n \<in> flow0 x ` {t..}) \<and> xa \<longlonglongrightarrow> p
[PROOF STEP]
by (metis atLeast_iff comp_apply imageI)
[PROOF STATE]
proof (state)
this:
p \<in> closure (flow0 x ` {t..})

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
fix p
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
assume "p \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..}))"
[PROOF STATE]
proof (state)
this:
p \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..}))

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..}))
[PROOF STEP]
have "\<And>t. t \<ge>0 \<Longrightarrow> p \<in> closure (flow0 x ` {t..})"
[PROOF STATE]
proof (prove)
using this:
p \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..}))

goal (1 subgoal):
 1. \<And>t. 0 \<le> t \<Longrightarrow> p \<in> closure (flow0 x ` {t..})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 \<le> ?t \<Longrightarrow> p \<in> closure (flow0 x ` {?t..})

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> ?t \<Longrightarrow> p \<in> closure (flow0 x ` {?t..})
[PROOF STEP]
have "\<And>t e. t \<ge>0 \<Longrightarrow> e > 0 \<Longrightarrow> (\<exists>tt \<ge> t. dist (flow0 x tt) p < e)"
[PROOF STATE]
proof (prove)
using this:
0 \<le> ?t \<Longrightarrow> p \<in> closure (flow0 x ` {?t..})

goal (1 subgoal):
 1. \<And>t e. \<lbrakk>0 \<le> t; 0 < e\<rbrakk> \<Longrightarrow> \<exists>tt\<ge>t. dist (flow0 x tt) p < e
[PROOF STEP]
unfolding closure_approachable
[PROOF STATE]
proof (prove)
using this:
0 \<le> ?t \<Longrightarrow> \<forall>e>0. \<exists>y\<in>flow0 x ` {?t..}. dist y p < e

goal (1 subgoal):
 1. \<And>t e. \<lbrakk>0 \<le> t; 0 < e\<rbrakk> \<Longrightarrow> \<exists>tt\<ge>t. dist (flow0 x tt) p < e
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<lbrakk>0 \<le> ?t; 0 < ?e\<rbrakk> \<Longrightarrow> \<exists>tt\<ge>?t. dist (flow0 x tt) p < ?e

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
from approachable_sequenceE[OF this]
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<And>t e. \<lbrakk>0 \<le> t; 0 < e\<rbrakk> \<Longrightarrow> 0 \<le> t; \<And>t e. \<lbrakk>0 \<le> t; 0 < e\<rbrakk> \<Longrightarrow> 0 < e; \<And>s. \<lbrakk>s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>; (flow0 x \<circ> s) \<longlonglongrightarrow> p\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
obtain s where "filterlim s at_top sequentially" "(flow0 x \<circ> s) \<longlonglongrightarrow> p"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>t e. \<lbrakk>0 \<le> t; 0 < e\<rbrakk> \<Longrightarrow> 0 \<le> t; \<And>t e. \<lbrakk>0 \<le> t; 0 < e\<rbrakk> \<Longrightarrow> 0 < e; \<And>s. \<lbrakk>s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>; (flow0 x \<circ> s) \<longlonglongrightarrow> p\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>s. \<lbrakk>s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>; (flow0 x \<circ> s) \<longlonglongrightarrow> p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>
(flow0 x \<circ> s) \<longlonglongrightarrow> p

goal (1 subgoal):
 1. \<And>xa. xa \<in> (\<Inter>\<tau>\<in>{0..}. closure (flow0 x ` {\<tau>..})) \<Longrightarrow> \<omega>_limit_point x xa
[PROOF STEP]
thus "\<omega>_limit_point x p"
[PROOF STATE]
proof (prove)
using this:
s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>
(flow0 x \<circ> s) \<longlonglongrightarrow> p

goal (1 subgoal):
 1. \<omega>_limit_point x p
[PROOF STEP]
unfolding \<omega>_limit_point_def
[PROOF STATE]
proof (prove)
using this:
s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>
(flow0 x \<circ> s) \<longlonglongrightarrow> p

goal (1 subgoal):
 1. {0..} \<subseteq> existence_ivl0 x \<and> (\<exists>s. s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity> \<and> (flow0 x \<circ> s) \<longlonglongrightarrow> p)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity>
(flow0 x \<circ> s) \<longlonglongrightarrow> p
{0..} \<subseteq> existence_ivl0 x

goal (1 subgoal):
 1. {0..} \<subseteq> existence_ivl0 x \<and> (\<exists>s. s \<longlonglongrightarrow>\<^bsub>\<^esub> \<infinity> \<and> (flow0 x \<circ> s) \<longlonglongrightarrow> p)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<omega>_limit_point x p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma succ_set_trans:
  assumes "A \<ggreater> B"
      and "B \<ggreater> C"
    shows "A \<ggreater> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<ggreater> C
[PROOF STEP]
by (meson assms(1) assms(2) greater_set_def succ_trans)


[STATEMENT]
lemma cut_le_Max_le: "
  \<lbrakk> finite (I \<down>\<le> t); I \<down>\<le> t \<noteq> {} \<rbrakk> \<Longrightarrow> Max (I \<down>\<le> t) \<le> t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite (I \<down>\<le> t); I \<down>\<le> t \<noteq> {}\<rbrakk> \<Longrightarrow> Max (I \<down>\<le> t) \<le> t
[PROOF STEP]
by (rule cut_le_bound[OF Max_in])


[STATEMENT]
lemma Span_smult_closed [simp]:
  assumes "set Us \<subseteq> carrier R"
  shows "\<And>k v. \<lbrakk> k \<in> K; v \<in> Span K Us \<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K Us"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>k v. \<lbrakk>k \<in> K; v \<in> Span K Us\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K Us
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
set Us \<subseteq> carrier R

goal (1 subgoal):
 1. \<And>k v. \<lbrakk>k \<in> K; v \<in> Span K Us\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K Us
[PROOF STEP]
proof (induct Us)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>k v. \<lbrakk>k \<in> K; v \<in> Span K []; set [] \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K []
 2. \<And>a Us k v. \<lbrakk>\<And>k v. \<lbrakk>k \<in> K; v \<in> Span K Us; set Us \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K Us; k \<in> K; v \<in> Span K (a # Us); set (a # Us) \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K (a # Us)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
k \<in> K
v \<in> Span K []
set [] \<subseteq> carrier R

goal (2 subgoals):
 1. \<And>k v. \<lbrakk>k \<in> K; v \<in> Span K []; set [] \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K []
 2. \<And>a Us k v. \<lbrakk>\<And>k v. \<lbrakk>k \<in> K; v \<in> Span K Us; set Us \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K Us; k \<in> K; v \<in> Span K (a # Us); set (a # Us) \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K (a # Us)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
k \<in> K
v \<in> Span K []
set [] \<subseteq> carrier R

goal (1 subgoal):
 1. k \<otimes> v \<in> Span K []
[PROOF STEP]
using r_null subring_props(1)
[PROOF STATE]
proof (prove)
using this:
k \<in> K
v \<in> Span K []
set [] \<subseteq> carrier R
?x \<in> carrier R \<Longrightarrow> ?x \<otimes> \<zero> = \<zero>
K \<subseteq> carrier R

goal (1 subgoal):
 1. k \<otimes> v \<in> Span K []
[PROOF STEP]
by (auto, blast)
[PROOF STATE]
proof (state)
this:
k \<otimes> v \<in> Span K []

goal (1 subgoal):
 1. \<And>a Us k v. \<lbrakk>\<And>k v. \<lbrakk>k \<in> K; v \<in> Span K Us; set Us \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K Us; k \<in> K; v \<in> Span K (a # Us); set (a # Us) \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K (a # Us)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a Us k v. \<lbrakk>\<And>k v. \<lbrakk>k \<in> K; v \<in> Span K Us; set Us \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K Us; k \<in> K; v \<in> Span K (a # Us); set (a # Us) \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K (a # Us)
[PROOF STEP]
case Cons
[PROOF STATE]
proof (state)
this:
\<lbrakk>?k \<in> K; ?v \<in> Span K Us_; set Us_ \<subseteq> carrier R\<rbrakk> \<Longrightarrow> ?k \<otimes> ?v \<in> Span K Us_
k \<in> K
v \<in> Span K (a_ # Us_)
set (a_ # Us_) \<subseteq> carrier R

goal (1 subgoal):
 1. \<And>a Us k v. \<lbrakk>\<And>k v. \<lbrakk>k \<in> K; v \<in> Span K Us; set Us \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K Us; k \<in> K; v \<in> Span K (a # Us); set (a # Us) \<subseteq> carrier R\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> Span K (a # Us)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?k \<in> K; ?v \<in> Span K Us_; set Us_ \<subseteq> carrier R\<rbrakk> \<Longrightarrow> ?k \<otimes> ?v \<in> Span K Us_
k \<in> K
v \<in> Span K (a_ # Us_)
set (a_ # Us_) \<subseteq> carrier R

goal (1 subgoal):
 1. k \<otimes> v \<in> Span K (a_ # Us_)
[PROOF STEP]
using Span_subgroup_props(1) line_extension_smult_closed
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?k \<in> K; ?v \<in> Span K Us_; set Us_ \<subseteq> carrier R\<rbrakk> \<Longrightarrow> ?k \<otimes> ?v \<in> Span K Us_
k \<in> K
v \<in> Span K (a_ # Us_)
set (a_ # Us_) \<subseteq> carrier R
set ?Us \<subseteq> carrier R \<Longrightarrow> Span K ?Us \<subseteq> carrier R
\<lbrakk>\<And>k v. \<lbrakk>k \<in> K; v \<in> ?E\<rbrakk> \<Longrightarrow> k \<otimes> v \<in> ?E; ?E \<subseteq> carrier R; ?a \<in> carrier R; ?k \<in> K; ?u \<in> line_extension K ?a ?E\<rbrakk> \<Longrightarrow> ?k \<otimes> ?u \<in> line_extension K ?a ?E

goal (1 subgoal):
 1. k \<otimes> v \<in> Span K (a_ # Us_)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
k \<otimes> v \<in> Span K (a_ # Us_)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma normal_ordinal_rec:
assumes s: "\<forall>p x. x < s p x"
shows "normal (ordinal_rec z s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normal (ordinal_rec z s)
[PROOF STEP]
apply (rule normalI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>f. OrdinalInduct.strict_mono f \<Longrightarrow> ordinal_rec z s (oLimit f) = oLimit (\<lambda>n. ordinal_rec z s (f n))
 2. \<And>x. ordinal_rec z s x < ordinal_rec z s (oSuc x)
[PROOF STEP]
apply (rule ordinal_rec_oLimit)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>f. OrdinalInduct.strict_mono f \<Longrightarrow> \<forall>p x. x \<le> s p x
 2. \<And>x. ordinal_rec z s x < ordinal_rec z s (oSuc x)
[PROOF STEP]
apply (simp add: s order_less_imp_le)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. ordinal_rec z s x < ordinal_rec z s (oSuc x)
[PROOF STEP]
apply (simp add: s)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma subset_cimage_iff: "csubset_eq B (cimage f A) \<longleftrightarrow> (\<exists>AA. csubset_eq AA A \<and> B = cimage f AA)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. csubset_eq B (cimage f A) = (\<exists>AA. csubset_eq AA A \<and> B = cimage f AA)
[PROOF STEP]
by transfer (metis countable_subset image_mono mem_Collect_eq subset_imageE)


[STATEMENT]
lemma prv_eqv_cnj_trans:
assumes "\<phi> \<in> fmla" and "\<chi> \<in> fmla" and "\<psi> \<in> fmla"
shows "prv (imp (cnj (eqv \<phi> \<chi>) (eqv \<chi> \<psi>)) (eqv \<phi> \<psi>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prv (imp (cnj (eqv \<phi> \<chi>) (eqv \<chi> \<psi>)) (eqv \<phi> \<psi>))
[PROOF STEP]
by (simp add: assms prv_eqv_imp_trans prv_cnj_imp_monoR2)


[STATEMENT]
lemma minus_cont: "f \<in> bcontfun \<Longrightarrow> g \<in> bcontfun \<Longrightarrow> (\<lambda>x. f x - g x) \<in> bcontfun" for f g::"'a \<Rightarrow> 'b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> bcontfun; g \<in> bcontfun\<rbrakk> \<Longrightarrow> (\<lambda>x. f x - g x) \<in> bcontfun
[PROOF STEP]
by (auto simp: bcontfun_def intro!: continuous_intros bounded_minus_comp)


[STATEMENT]
lemma shortest_period_plus:
  "shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)"
  (is "_ \<le> ?MAX")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
proof (cases "\<forall> i . \<pi> (\<alpha> + \<beta>) i = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>i. \<pi> (\<alpha> + \<beta>) i = 0 \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
 2. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0

goal (2 subgoals):
 1. \<forall>i. \<pi> (\<alpha> + \<beta>) i = 0 \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
 2. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0

goal (1 subgoal):
 1. shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
unfolding shortest_period_def
[PROOF STATE]
proof (prove)
using this:
\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0

goal (1 subgoal):
 1. (if \<forall>i. \<pi> (\<alpha> + \<beta>) i = 0 then 0 else Max {i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0}) \<le> max (if \<forall>i. \<pi> \<alpha> i = 0 then 0 else Max {i. \<pi> \<alpha> i \<noteq> 0}) (if \<forall>i. \<pi> \<beta> i = 0 then 0 else Max {i. \<pi> \<beta> i \<noteq> 0})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)

goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0)

goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
have "shortest_period \<alpha> \<le> ?MAX" and "shortest_period \<beta> \<le> ?MAX"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. shortest_period \<alpha> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>) &&& shortest_period \<beta> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
shortest_period \<alpha> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
shortest_period \<beta> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)

goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
shortest_period \<alpha> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
shortest_period \<beta> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)

goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
have "\<forall> i > shortest_period \<alpha> . \<pi> \<alpha> i = 0"
  and "\<forall> i > shortest_period \<beta> . \<pi> \<beta> i = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i>shortest_period \<alpha>. \<pi> \<alpha> i = 0 &&& \<forall>i>shortest_period \<beta>. \<pi> \<beta> i = 0
[PROOF STEP]
unfolding shortest_period_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i>if \<forall>i. \<pi> \<alpha> i = 0 then 0 else Max {i. \<pi> \<alpha> i \<noteq> 0}. \<pi> \<alpha> i = 0 &&& \<forall>i>if \<forall>i. \<pi> \<beta> i = 0 then 0 else Max {i. \<pi> \<beta> i \<noteq> 0}. \<pi> \<beta> i = 0
[PROOF STEP]
using finite_account_support Max.coboundedI leD Collect_cong
[PROOF STATE]
proof (prove)
using this:
finite {i. \<pi> ?\<alpha> i \<noteq> 0}
\<lbrakk>finite ?A; ?a \<in> ?A\<rbrakk> \<Longrightarrow> ?a \<le> Max ?A
?y \<le> ?x \<Longrightarrow> \<not> ?x < ?y
(\<And>x. ?P x = ?Q x) \<Longrightarrow> {x. ?P x} = {x. ?Q x}

goal (1 subgoal):
 1. \<forall>i>if \<forall>i. \<pi> \<alpha> i = 0 then 0 else Max {i. \<pi> \<alpha> i \<noteq> 0}. \<pi> \<alpha> i = 0 &&& \<forall>i>if \<forall>i. \<pi> \<beta> i = 0 then 0 else Max {i. \<pi> \<beta> i \<noteq> 0}. \<pi> \<beta> i = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>i>shortest_period \<alpha>. \<pi> \<alpha> i = 0
\<forall>i>shortest_period \<beta>. \<pi> \<beta> i = 0

goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
shortest_period \<alpha> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
shortest_period \<beta> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
\<forall>i>shortest_period \<alpha>. \<pi> \<alpha> i = 0
\<forall>i>shortest_period \<beta>. \<pi> \<beta> i = 0
[PROOF STEP]
have "\<forall> i > ?MAX . \<pi> \<alpha> i = 0"
  and "\<forall> i > ?MAX . \<pi> \<beta> i = 0"
[PROOF STATE]
proof (prove)
using this:
shortest_period \<alpha> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
shortest_period \<beta> \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
\<forall>i>shortest_period \<alpha>. \<pi> \<alpha> i = 0
\<forall>i>shortest_period \<beta>. \<pi> \<beta> i = 0

goal (1 subgoal):
 1. \<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> \<alpha> i = 0 &&& \<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> \<beta> i = 0
[PROOF STEP]
by simp+
[PROOF STATE]
proof (state)
this:
\<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> \<alpha> i = 0
\<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> \<beta> i = 0

goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
hence "\<forall> i > ?MAX . \<pi> (\<alpha> + \<beta>) i = 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> \<alpha> i = 0
\<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> \<beta> i = 0

goal (1 subgoal):
 1. \<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> (\<alpha> + \<beta>) i = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> (\<alpha> + \<beta>) i = 0

goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
hence "\<forall> i . \<pi> (\<alpha> + \<beta>) i \<noteq> 0 \<longrightarrow> i \<le> ?MAX"
[PROOF STATE]
proof (prove)
using this:
\<forall>i>max (shortest_period \<alpha>) (shortest_period \<beta>). \<pi> (\<alpha> + \<beta>) i = 0

goal (1 subgoal):
 1. \<forall>i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0 \<longrightarrow> i \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
by (meson not_le)
[PROOF STATE]
proof (state)
this:
\<forall>i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0 \<longrightarrow> i \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)

goal (1 subgoal):
 1. \<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0) \<Longrightarrow> shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0 \<longrightarrow> i \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)

goal (1 subgoal):
 1. shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)
[PROOF STEP]
unfolding shortest_period_def
[PROOF STATE]
proof (prove)
using this:
\<forall>i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0 \<longrightarrow> i \<le> max (if \<forall>i. \<pi> \<alpha> i = 0 then 0 else Max {i. \<pi> \<alpha> i \<noteq> 0}) (if \<forall>i. \<pi> \<beta> i = 0 then 0 else Max {i. \<pi> \<beta> i \<noteq> 0})

goal (1 subgoal):
 1. (if \<forall>i. \<pi> (\<alpha> + \<beta>) i = 0 then 0 else Max {i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0}) \<le> max (if \<forall>i. \<pi> \<alpha> i = 0 then 0 else Max {i. \<pi> \<alpha> i \<noteq> 0}) (if \<forall>i. \<pi> \<beta> i = 0 then 0 else Max {i. \<pi> \<beta> i \<noteq> 0})
[PROOF STEP]
using
      finite_account_support [where \<alpha> = "\<alpha> + \<beta>"]
      False
[PROOF STATE]
proof (prove)
using this:
\<forall>i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0 \<longrightarrow> i \<le> max (if \<forall>i. \<pi> \<alpha> i = 0 then 0 else Max {i. \<pi> \<alpha> i \<noteq> 0}) (if \<forall>i. \<pi> \<beta> i = 0 then 0 else Max {i. \<pi> \<beta> i \<noteq> 0})
finite {i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0}
\<not> (\<forall>i. \<pi> (\<alpha> + \<beta>) i = 0)

goal (1 subgoal):
 1. (if \<forall>i. \<pi> (\<alpha> + \<beta>) i = 0 then 0 else Max {i. \<pi> (\<alpha> + \<beta>) i \<noteq> 0}) \<le> max (if \<forall>i. \<pi> \<alpha> i = 0 then 0 else Max {i. \<pi> \<alpha> i \<noteq> 0}) (if \<forall>i. \<pi> \<beta> i = 0 then 0 else Max {i. \<pi> \<beta> i \<noteq> 0})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
shortest_period (\<alpha> + \<beta>) \<le> max (shortest_period \<alpha>) (shortest_period \<beta>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma multiplicity_times_unit_left:
  assumes "is_unit c"
  shows   "multiplicity (c * p) x = multiplicity p x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multiplicity (c * p) x = multiplicity p x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. multiplicity (c * p) x = multiplicity p x
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
is_unit c
[PROOF STEP]
have "{n. (c * p) ^ n dvd x} = {n. p ^ n dvd x}"
[PROOF STATE]
proof (prove)
using this:
is_unit c

goal (1 subgoal):
 1. {n. (c * p) ^ n dvd x} = {n. p ^ n dvd x}
[PROOF STEP]
by (subst mult.commute) (simp add: mult_unit_dvd_iff power_mult_distrib is_unit_power_iff)
[PROOF STATE]
proof (state)
this:
{n. (c * p) ^ n dvd x} = {n. p ^ n dvd x}

goal (1 subgoal):
 1. multiplicity (c * p) x = multiplicity p x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
{n. (c * p) ^ n dvd x} = {n. p ^ n dvd x}

goal (1 subgoal):
 1. multiplicity (c * p) x = multiplicity p x
[PROOF STEP]
by (simp add: multiplicity_def)
[PROOF STATE]
proof (state)
this:
multiplicity (c * p) x = multiplicity p x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma NSLIMSEQ_const: "(\<lambda>n. k) \<longlonglongrightarrow>\<^sub>N\<^sub>S k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. k) \<longlonglongrightarrow>\<^sub>N\<^sub>S k
[PROOF STEP]
by (simp add: NSLIMSEQ_def)


[STATEMENT]
lemma cost_Copy_Ins: "cost(min_eds xs ys) \<le> cost (min_eds (x#xs) ys) + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cost (min_eds xs ys) \<le> cost (min_eds (x # xs) ys) + 1
[PROOF STEP]
apply(induction xs ys rule: min_eds.induct)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. cost (min_eds [] []) \<le> cost (min_eds [x] []) + 1
 2. \<And>y ys. cost (min_eds [] ys) \<le> cost (min_eds [x] ys) + 1 \<Longrightarrow> cost (min_eds [] (y # ys)) \<le> cost (min_eds [x] (y # ys)) + 1
 3. \<And>xa xs. cost (min_eds xs []) \<le> cost (min_eds (x # xs) []) + 1 \<Longrightarrow> cost (min_eds (xa # xs) []) \<le> cost (min_eds (x # xa # xs) []) + 1
 4. \<And>xa xs y ys. \<lbrakk>cost (min_eds (xa # xs) ys) \<le> cost (min_eds (x # xa # xs) ys) + 1; cost (min_eds xs (y # ys)) \<le> cost (min_eds (x # xs) (y # ys)) + 1; cost (min_eds xs ys) \<le> cost (min_eds (x # xs) ys) + 1\<rbrakk> \<Longrightarrow> cost (min_eds (xa # xs) (y # ys)) \<le> cost (min_eds (x # xa # xs) (y # ys)) + 1
[PROOF STEP]
apply(auto simp del: filter_True filter_False split!: if_splits)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma map_pref_conv [reversal_rule]: assumes "inj f" shows "map f u \<le>p map f v \<longleftrightarrow> u \<le>p v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map f u \<le>p map f v) = (u \<le>p v)
[PROOF STEP]
using map_mono_prefix[of "map f u" "map f v" "inv f"] map_mono_prefix
[PROOF STATE]
proof (prove)
using this:
map f u \<le>p map f v \<Longrightarrow> map (inv f) (map f u) \<le>p map (inv f) (map f v)
?xs \<le>p ?ys \<Longrightarrow> map ?f ?xs \<le>p map ?f ?ys

goal (1 subgoal):
 1. (map f u \<le>p map f v) = (u \<le>p v)
[PROOF STEP]
unfolding map_map inv_o_cancel[OF \<open>inj f\<close>] list.map_id
[PROOF STATE]
proof (prove)
using this:
map f u \<le>p map f v \<Longrightarrow> u \<le>p v
?xs \<le>p ?ys \<Longrightarrow> map ?f ?xs \<le>p map ?f ?ys

goal (1 subgoal):
 1. (map f u \<le>p map f v) = (u \<le>p v)
[PROOF STEP]
..


[STATEMENT]
lemma nprt_mono [simp, no_atp]: "a \<le> b \<Longrightarrow> nprt a \<le> nprt b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<le> b \<Longrightarrow> nprt a \<le> nprt b
[PROOF STEP]
unfolding le_iff_inf
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inf a b = a \<Longrightarrow> inf (nprt a) (nprt b) = nprt a
[PROOF STEP]
by (simp add: nprt_def inf_aci inf_assoc [symmetric, of a])


[STATEMENT]
lemma word_cat_eq:
  \<open>(word_cat v w :: 'c::len word) = push_bit LENGTH('b) (ucast v) + ucast w\<close>
  for v :: \<open>'a::len word\<close> and w :: \<open>'b::len word\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. word_cat v w = push_bit LENGTH('b) (ucast v) + ucast w
[PROOF STEP]
by transfer (simp add: concat_bit_eq ac_simps)


[STATEMENT]
lemma fps_of_poly_cutoff [simp]:
  "fps_of_poly (poly_cutoff n p) = fps_cutoff n (fps_of_poly p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_of_poly (poly_cutoff n p) = fps_cutoff n (fps_of_poly p)
[PROOF STEP]
by (simp add: fps_eq_iff coeff_poly_cutoff)


[STATEMENT]
lemma rightUniqueInjectiveOnFirst: "(runiq P) = (inj_on fst P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. runiq P = inj_on fst P
[PROOF STEP]
using rightUniqueInjectiveOnFirstImplication lm05
[PROOF STATE]
proof (prove)
using this:
runiq ?P \<Longrightarrow> inj_on fst ?P
inj_on fst ?P \<Longrightarrow> runiq ?P

goal (1 subgoal):
 1. runiq P = inj_on fst P
[PROOF STEP]
by blast


[STATEMENT]
lemma subst_fm_NotInDom [simp]: "(NotInDom t r)(i::=x) = NotInDom (subst i x t) (subst i x r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (NotInDom t r)(i::=x) = NotInDom (subst i x t) (subst i x r)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (NotInDom t r)(i::=x) = NotInDom (subst i x t) (subst i x r)
[PROOF STEP]
obtain j::name where "atom j \<sharp> (i,x,t,r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>j. atom j \<sharp> (i, x, t, r) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule obtain_fresh)
[PROOF STATE]
proof (state)
this:
atom j \<sharp> (i, x, t, r)

goal (1 subgoal):
 1. (NotInDom t r)(i::=x) = NotInDom (subst i x t) (subst i x r)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
atom j \<sharp> (i, x, t, r)

goal (1 subgoal):
 1. (NotInDom t r)(i::=x) = NotInDom (subst i x t) (subst i x r)
[PROOF STEP]
by (auto simp: NotInDom.simps [of j])
[PROOF STATE]
proof (state)
this:
(NotInDom t r)(i::=x) = NotInDom (subst i x t) (subst i x r)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in PolynRg) erh_rHom_coeff:"\<lbrakk>PolynRg A B Y; h \<in> rHom S B;
       pol_coeff S c\<rbrakk>  \<Longrightarrow>  erh R S X A B Y h 0 c = (cmp h (snd c)) 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S c\<rbrakk> \<Longrightarrow> erh R S X A B Y h 0 c = cmp h (snd c) 0
[PROOF STEP]
apply (cut_tac subring,
       frule subring_Ring,
       frule PolynRg.is_Ring[of A B Y],
       frule PolynRg.subring[of A B Y],
       frule Ring.subring_Ring[of A B], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S c; Subring R S; Ring S; Ring A; Subring A B; Ring B\<rbrakk> \<Longrightarrow> erh R S X A B Y h 0 c = cmp h (snd c) 0
[PROOF STEP]
apply (simp add:erh_def polyn_expr_def cf_h_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S c; Subring R S; Ring S; Ring A; Subring A B; Ring B\<rbrakk> \<Longrightarrow> cmp h (snd c) 0 \<cdot>\<^sub>r\<^bsub>A\<^esub> 1\<^sub>r\<^bsub>A\<^esub> = cmp h (snd c) 0
[PROOF STEP]
apply (frule pol_coeff_mem [of c 0], simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S c; Subring R S; Ring S; Ring A; Subring A B; Ring B; snd c 0 \<in> carrier S\<rbrakk> \<Longrightarrow> cmp h (snd c) 0 \<cdot>\<^sub>r\<^bsub>A\<^esub> 1\<^sub>r\<^bsub>A\<^esub> = cmp h (snd c) 0
[PROOF STEP]
apply (simp add:cmp_def, frule rHom_mem[of h S B "snd c 0"], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>PolynRg A B Y; h \<in> rHom S B; pol_coeff S c; Subring R S; Ring S; Ring A; Subring A B; Ring B; snd c 0 \<in> carrier S; h (snd c 0) \<in> carrier B\<rbrakk> \<Longrightarrow> h (snd c 0) \<cdot>\<^sub>r\<^bsub>A\<^esub> 1\<^sub>r\<^bsub>A\<^esub> = h (snd c 0)
[PROOF STEP]
apply (frule Ring.mem_subring_mem_ring[of A B "h (snd c 0)"], assumption+,
        simp add:Ring.ring_r_one)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma infinite_card_of_insert:
assumes "\<not>finite A"
shows "|insert a A| =o |A|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |insert a A| =o |A|
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. |insert a A| =o |A|
[PROOF STEP]
have iA: "insert a A = A \<union> {a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert a A = A \<union> {a}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
insert a A = A \<union> {a}

goal (1 subgoal):
 1. |insert a A| =o |A|
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |insert a A| =o |A|
[PROOF STEP]
using infinite_imp_bij_betw2[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<exists>h. bij_betw h A (A \<union> {?a})

goal (1 subgoal):
 1. |insert a A| =o |A|
[PROOF STEP]
unfolding iA
[PROOF STATE]
proof (prove)
using this:
\<exists>h. bij_betw h A (A \<union> {?a})

goal (1 subgoal):
 1. |A \<union> {a}| =o |A|
[PROOF STEP]
by (metis bij_betw_inv card_of_ordIso)
[PROOF STATE]
proof (state)
this:
|insert a A| =o |A|

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subst_fv:  assumes fv_e: "FV e \<subseteq> {x}" and fv_v: "FV v = {}"
  shows "FV (subst x v e) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. FV (subst x v e) = {}
[PROOF STEP]
using fv_e fv_v subst_fv_aux
[PROOF STATE]
proof (prove)
using this:
FV e \<subseteq> {x}
FV v = {}
FV ?v = {} \<Longrightarrow> FV (subst ?x ?v ?e) \<subseteq> FV ?e - {?x}

goal (1 subgoal):
 1. FV (subst x v e) = {}
[PROOF STEP]
by blast


[STATEMENT]
lemma lex_ext_total:
  assumes "\<forall>(s, t)\<in>set (zip ss ts). s = t \<or> fst (f s t) \<or> fst (f t s)"
    and "\<And> t. snd (f t t)"
    and len: "length ss = length ts"
  shows "ss = ts \<or> fst (lex_ext f n ss ts) \<or> fst (lex_ext f n ts ss)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ss = ts \<or> fst (lex_ext f n ss ts) \<or> fst (lex_ext f n ts ss)
[PROOF STEP]
using lex_ext_unbounded_total[OF assms]
[PROOF STATE]
proof (prove)
using this:
ss = ts \<or> fst (lex_ext_unbounded f ss ts) \<or> fst (lex_ext_unbounded f ts ss)

goal (1 subgoal):
 1. ss = ts \<or> fst (lex_ext f n ss ts) \<or> fst (lex_ext f n ts ss)
[PROOF STEP]
unfolding lex_ext_def Let_def len
[PROOF STATE]
proof (prove)
using this:
ss = ts \<or> fst (lex_ext_unbounded f ss ts) \<or> fst (lex_ext_unbounded f ts ss)

goal (1 subgoal):
 1. ss = ts \<or> fst (if length ts = length ts \<or> length ts \<le> n then lex_ext_unbounded f ss ts else (False, False)) \<or> fst (if length ts = length ts \<or> length ts \<le> n then lex_ext_unbounded f ts ss else (False, False))
[PROOF STEP]
by auto


[STATEMENT]
theorem univ_for_pr_tot_rec: "total_recursive univ_for_pr"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. total_recursive univ_for_pr
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. total_recursive univ_for_pr
[PROOF STEP]
have "c_graph univ_for_pr \<in> ce_sets"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c_graph univ_for_pr \<in> ce_sets
[PROOF STEP]
by (rule univ_for_pr_tot_rec_lm)
[PROOF STATE]
proof (state)
this:
c_graph univ_for_pr \<in> ce_sets

goal (1 subgoal):
 1. total_recursive univ_for_pr
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
c_graph univ_for_pr \<in> ce_sets
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
c_graph univ_for_pr \<in> ce_sets

goal (1 subgoal):
 1. total_recursive univ_for_pr
[PROOF STEP]
by (unfold total_recursive_def1, auto)
[PROOF STATE]
proof (state)
this:
total_recursive univ_for_pr

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma  surj_at_map_var: "at_map \<circ> Sup \<circ> Rep_atoms = (id::'a::complete_boolean_algebra_alt atoms \<Rightarrow> 'a atoms)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. at_map \<circ> Sup \<circ> Rep_atoms = id
[PROOF STEP]
unfolding at_map_def comp_def fun_eq_iff id_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. Abs_atoms (atom_map (\<Squnion> Rep_atoms x)) = x
[PROOF STEP]
by (metis Rep_atoms Rep_atoms_inverse Sup_upper atom_map_atoms surj_atom_map)


[STATEMENT]
lemma yun_wrelD: assumes "yun_wrel F c f"
  shows "map_poly rat_of_int F = smult c f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int_poly F = Polynomial.smult c f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
yun_wrel F c f

goal (1 subgoal):
 1. of_int_poly F = Polynomial.smult c f
[PROOF STEP]
unfolding yun_wrel_def
[PROOF STATE]
proof (prove)
using this:
of_int_poly F = Polynomial.smult c f

goal (1 subgoal):
 1. of_int_poly F = Polynomial.smult c f
[PROOF STEP]
by auto


[STATEMENT]
lemma concat_equal_length:
assumes "\<And>xs. xs\<in>set xss \<Longrightarrow> length xs = l"
shows "length (concat xss) = length xss*l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (concat xss) = length xss * l
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
?xs \<in> set xss \<Longrightarrow> length ?xs = l

goal (1 subgoal):
 1. length (concat xss) = length xss * l
[PROOF STEP]
by (induction xss;auto)


[STATEMENT]
lemma fun_ext:
  assumes "f \<in> elts (VPi A B)" "g \<in> elts (VPi A B)" "\<And>x. x \<in> elts A \<Longrightarrow> app f x = app g x"
  shows "f = g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f = g
[PROOF STEP]
by (metis VPi_memberD V_equalityI apply_pair assms)


[STATEMENT]
lemma [code abstract]: "vec_nth (c *s x) = (\<lambda>i. c * (x$i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (c *s x) = (\<lambda>i. c * x $ i)
[PROOF STEP]
unfolding vector_scalar_mult_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (\<chi>i. c * x $ i) = (\<lambda>i. c * x $ i)
[PROOF STEP]
by auto


[STATEMENT]
lemma ipurge_tr_append:
 "ipurge_tr I D u (xs @ ys) =
  ipurge_tr I D u xs @ ipurge_tr_aux I D (insert u (sinks I D u xs)) ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ipurge_tr I D u (xs @ ys) = ipurge_tr I D u xs @ ipurge_tr_aux I D (insert u (sinks I D u xs)) ys
[PROOF STEP]
proof (simp add: sinks_aux_single_dom [symmetric]
 ipurge_tr_aux_single_dom [symmetric])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ipurge_tr_aux I D {u} (xs @ ys) = ipurge_tr_aux I D {u} xs @ ipurge_tr_aux I D (sinks_aux I D {u} xs) ys
[PROOF STEP]
qed (simp add: ipurge_tr_aux_append)


[STATEMENT]
lemma qelim_ci:
  assumes qe_inv: "\<forall> bs p. qfree p \<longrightarrow> qfree (qe p) \<and> (Ifm bs (qe p) = Ifm bs (E p))"
  shows "\<And> bs. qfree (qelim p qe) \<and> (Ifm bs (qelim p qe) = Ifm bs p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>bs. qfree (qelim p qe) \<and> Ifm bs (qelim p qe) = Ifm bs p
[PROOF STEP]
using qe_inv DJ_qe[OF CJNB_qe[OF qe_inv]]
[PROOF STATE]
proof (prove)
using this:
\<forall>bs p. qfree p \<longrightarrow> qfree (qe p) \<and> Ifm bs (qe p) = Ifm bs (E p)
\<forall>bs p. qfree p \<longrightarrow> qfree (DJ (CJNB qe) p) \<and> Ifm bs (DJ (CJNB qe) p) = Ifm bs (E p)

goal (1 subgoal):
 1. \<And>bs. qfree (qelim p qe) \<and> Ifm bs (qelim p qe) = Ifm bs p
[PROOF STEP]
by (induct p rule: qelim.induct) (auto simp del: simpfm.simps)


[STATEMENT]
lemma Iff_trans: "H \<turnstile> A IFF B \<Longrightarrow> H \<turnstile> B IFF C \<Longrightarrow> H \<turnstile> A IFF C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<turnstile> A IFF B; H \<turnstile> B IFF C\<rbrakk> \<Longrightarrow> H \<turnstile> A IFF C
[PROOF STEP]
unfolding Iff_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<turnstile> (A IMP B) AND (B IMP A); H \<turnstile> (B IMP C) AND (C IMP B)\<rbrakk> \<Longrightarrow> H \<turnstile> (A IMP C) AND (C IMP A)
[PROOF STEP]
by (metis Conj_E1 Conj_E2 Conj_I Disj_Semicong_1 Disj_commute)


[STATEMENT]
lemma Suc_div_unat_helper:
  assumes szv: "sz < LENGTH('a :: len)"
  and   usszv: "us \<le> sz"
  shows "2 ^ (sz - us) = Suc (unat (((2::'a :: len word) ^ sz - 1) div 2 ^ us))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
note usv = order_le_less_trans [OF usszv szv]
[PROOF STATE]
proof (state)
this:
us < LENGTH('a)

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
from usszv
[PROOF STATE]
proof (chain)
picking this:
us \<le> sz
[PROOF STEP]
obtain q where qv: "sz = us + q"
[PROOF STATE]
proof (prove)
using this:
us \<le> sz

goal (1 subgoal):
 1. (\<And>q. sz = us + q \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: le_iff_add)
[PROOF STATE]
proof (state)
this:
sz = us + q

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
have "Suc (unat (((2:: 'a word) ^ sz - 1) div 2 ^ us)) =
    (2 ^ us + unat ((2:: 'a word) ^ sz - 1)) div 2 ^ us"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc (unat ((2 ^ sz - 1) div 2 ^ us)) = (2 ^ us + unat (2 ^ sz - 1)) div 2 ^ us
[PROOF STEP]
apply (subst unat_div unat_power_lower[OF usv])+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc (unat (2 ^ sz - 1) div 2 ^ us) = (2 ^ us + unat (2 ^ sz - 1)) div 2 ^ us
[PROOF STEP]
apply (subst div_add_self1, simp+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
Suc (unat ((2 ^ sz - 1) div 2 ^ us)) = (2 ^ us + unat (2 ^ sz - 1)) div 2 ^ us

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Suc (unat ((2 ^ sz - 1) div 2 ^ us)) = (2 ^ us + unat (2 ^ sz - 1)) div 2 ^ us

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
have "\<dots> = ((2 ^ us - 1) + 2 ^ sz) div 2 ^ us"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (2 ^ us + unat (2 ^ sz - 1)) div 2 ^ us = (2 ^ us - 1 + 2 ^ sz) div 2 ^ us
[PROOF STEP]
using szv
[PROOF STATE]
proof (prove)
using this:
sz < LENGTH('a)

goal (1 subgoal):
 1. (2 ^ us + unat (2 ^ sz - 1)) div 2 ^ us = (2 ^ us - 1 + 2 ^ sz) div 2 ^ us
[PROOF STEP]
by (simp add: unat_minus_one)
[PROOF STATE]
proof (state)
this:
(2 ^ us + unat (2 ^ sz - 1)) div 2 ^ us = (2 ^ us - 1 + 2 ^ sz) div 2 ^ us

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(2 ^ us + unat (2 ^ sz - 1)) div 2 ^ us = (2 ^ us - 1 + 2 ^ sz) div 2 ^ us

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
have "\<dots> = 2 ^ q + ((2 ^ us - 1) div 2 ^ us)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (2 ^ us - 1 + 2 ^ sz) div 2 ^ us = 2 ^ q + (2 ^ us - 1) div 2 ^ us
[PROOF STEP]
apply (subst qv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (2 ^ us - 1 + 2 ^ (us + q)) div 2 ^ us = 2 ^ q + (2 ^ us - 1) div 2 ^ us
[PROOF STEP]
apply (subst power_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (2 ^ us - 1 + 2 ^ us * 2 ^ q) div 2 ^ us = 2 ^ q + (2 ^ us - 1) div 2 ^ us
[PROOF STEP]
apply (subst div_mult_self2; simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(2 ^ us - 1 + 2 ^ sz) div 2 ^ us = 2 ^ q + (2 ^ us - 1) div 2 ^ us

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(2 ^ us - 1 + 2 ^ sz) div 2 ^ us = 2 ^ q + (2 ^ us - 1) div 2 ^ us

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
have "\<dots> = 2 ^ (sz - us)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ q + (2 ^ us - 1) div 2 ^ us = 2 ^ (sz - us)
[PROOF STEP]
using qv
[PROOF STATE]
proof (prove)
using this:
sz = us + q

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

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Suc (unat ((2 ^ sz - 1) div 2 ^ us)) = 2 ^ (sz - us)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Suc (unat ((2 ^ sz - 1) div 2 ^ us)) = 2 ^ (sz - us)

goal (1 subgoal):
 1. 2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
2 ^ (sz - us) = Suc (unat ((2 ^ sz - 1) div 2 ^ us))

goal:
No subgoals!
[PROOF STEP]
qed