[STATEMENT]
lemma sets_lebesgue_on_continuous_image:
  assumes S: "S \<in> sets lebesgue" and X: "X \<in> sets (lebesgue_on S)" and contf: "continuous_on S f"
    and negim: "\<And>T. \<lbrakk>negligible T; T \<subseteq> S\<rbrakk> \<Longrightarrow> negligible(f ` T)"
  shows "f ` X \<in> sets (lebesgue_on (f ` S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` X \<in> sets (lebesgue_on (f ` S))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f ` X \<in> sets (lebesgue_on (f ` S))
[PROOF STEP]
have "X \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<subseteq> S
[PROOF STEP]
by (metis S X sets.Int_space_eq2 sets_restrict_space_iff)
[PROOF STATE]
proof (state)
this:
X \<subseteq> S

goal (1 subgoal):
 1. f ` X \<in> sets (lebesgue_on (f ` S))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
X \<subseteq> S

goal (1 subgoal):
 1. f ` X \<in> sets (lebesgue_on (f ` S))
[PROOF STEP]
have "f ` S \<in> sets lebesgue"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` S \<in> sets lebesgue
[PROOF STEP]
using S contf negim sets_lebesgue_continuous_image
[PROOF STATE]
proof (prove)
using this:
S \<in> sets lebesgue
continuous_on S f
\<lbrakk>negligible ?T; ?T \<subseteq> S\<rbrakk> \<Longrightarrow> negligible (f ` ?T)
\<lbrakk>?T \<in> sets lebesgue; continuous_on ?S ?f; \<And>T. \<lbrakk>negligible T; T \<subseteq> ?S\<rbrakk> \<Longrightarrow> negligible (?f ` T); ?T \<subseteq> ?S\<rbrakk> \<Longrightarrow> ?f ` ?T \<in> sets lebesgue

goal (1 subgoal):
 1. f ` S \<in> sets lebesgue
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f ` S \<in> sets lebesgue

goal (1 subgoal):
 1. f ` X \<in> sets (lebesgue_on (f ` S))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
f ` S \<in> sets lebesgue

goal (1 subgoal):
 1. f ` X \<in> sets (lebesgue_on (f ` S))
[PROOF STEP]
have "f ` X \<in> sets lebesgue"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` X \<in> sets lebesgue
[PROOF STEP]
by (metis S X contf negim sets_lebesgue_continuous_image sets_restrict_space_iff space_restrict_space space_restrict_space2)
[PROOF STATE]
proof (state)
this:
f ` X \<in> sets lebesgue

goal (1 subgoal):
 1. f ` X \<in> sets (lebesgue_on (f ` S))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
X \<subseteq> S
f ` S \<in> sets lebesgue
f ` X \<in> sets lebesgue
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
X \<subseteq> S
f ` S \<in> sets lebesgue
f ` X \<in> sets lebesgue

goal (1 subgoal):
 1. f ` X \<in> sets (lebesgue_on (f ` S))
[PROOF STEP]
by (auto simp: sets_restrict_space_iff)
[PROOF STATE]
proof (state)
this:
f ` X \<in> sets (lebesgue_on (f ` S))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma suminfI:
  fixes f :: "nat \<Rightarrow> 'a::{t2_space,comm_monoid_add}"
  shows "f sums k \<Longrightarrow> suminf f = k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f sums k \<Longrightarrow> suminf f = k
[PROOF STEP]
unfolding sums_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable f \<and> suminf f = k \<Longrightarrow> suminf f = k
[PROOF STEP]
by simp


[STATEMENT]
lemma AND_NOT_mask_plus_AND_mask_eq:
  "(w AND NOT (mask n)) + (w AND mask n) = w"
  for w :: \<open>'a::len word\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (w AND NOT (mask n)) + (w AND mask n) = w
[PROOF STEP]
apply (subst disjunctive_add)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>na. \<not> bit (w AND NOT (mask n)) na \<or> \<not> bit (w AND mask n) na
 2. w AND NOT (mask n) OR w AND mask n = w
[PROOF STEP]
apply (auto simp add: bit_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w AND NOT (mask n) OR w AND mask n = w
[PROOF STEP]
apply (rule bit_word_eqI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>na. na < LENGTH('a) \<Longrightarrow> bit (w AND NOT (mask n) OR w AND mask n) na = bit w na
[PROOF STEP]
apply (auto simp add: bit_simps)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma Cor_Plu_2_3_2:
  assumes K: "card (differenceset A A) \<le> K * real (card A)"
    and   A: "finite A" "A \<subseteq> G" "A \<noteq> {}"
  shows "card (sumset_iterated A r) \<le> K^r * real (card A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
have "card A > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < card A
[PROOF STEP]
by (simp add: A card_gt_0_iff)
[PROOF STATE]
proof (state)
this:
0 < card A

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
with K
[PROOF STATE]
proof (chain)
picking this:
real (card (differenceset A A)) \<le> K * real (card A)
0 < card A
[PROOF STEP]
have "K \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
real (card (differenceset A A)) \<le> K * real (card A)
0 < card A

goal (1 subgoal):
 1. 0 \<le> K
[PROOF STEP]
by (smt (verit, del_insts) of_nat_0_less_iff of_nat_less_0_iff zero_le_mult_iff)
[PROOF STATE]
proof (state)
this:
0 \<le> K

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
obtain A' where A': "A' \<subseteq> A" "A' \<noteq> {}"
    and A'_card: "\<And>r. card (sumset A' (sumset_iterated (minusset A) r)) \<le> K^r * real (card A')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A'. \<lbrakk>A' \<subseteq> A; A' \<noteq> {}; \<And>r. real (card (sumset A' (sumset_iterated (minusset A) r))) \<le> K ^ r * real (card A')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis A Cor_Plu_2_3 assms(1) card_eq_0_iff card_minusset' minusset_subset_carrier)
[PROOF STATE]
proof (state)
this:
A' \<subseteq> A
A' \<noteq> {}
real (card (sumset A' (sumset_iterated (minusset A) ?r))) \<le> K ^ ?r * real (card A')

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
with A
[PROOF STATE]
proof (chain)
picking this:
finite A
A \<subseteq> G
A \<noteq> {}
A' \<subseteq> A
A' \<noteq> {}
real (card (sumset A' (sumset_iterated (minusset A) ?r))) \<le> K ^ ?r * real (card A')
[PROOF STEP]
obtain a where "a \<in> A'" "a \<in> G" "finite A'"
[PROOF STATE]
proof (prove)
using this:
finite A
A \<subseteq> G
A \<noteq> {}
A' \<subseteq> A
A' \<noteq> {}
real (card (sumset A' (sumset_iterated (minusset A) ?r))) \<le> K ^ ?r * real (card A')

goal (1 subgoal):
 1. (\<And>a. \<lbrakk>a \<in> A'; a \<in> G; finite A'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis ex_in_conv finite_subset subset_iff)
[PROOF STATE]
proof (state)
this:
a \<in> A'
a \<in> G
finite A'

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<in> A'
a \<in> G
finite A'
[PROOF STEP]
have "card (sumset_iterated A r) \<le> card (sumset A' (sumset_iterated (minusset A) r))"
[PROOF STATE]
proof (prove)
using this:
a \<in> A'
a \<in> G
finite A'

goal (1 subgoal):
 1. card (sumset_iterated A r) \<le> card (sumset A' (sumset_iterated (minusset A) r))
[PROOF STEP]
by (metis A(1) card_le_sumset card_sumset_iterated_minusset finite_minusset finite_sumset_iterated sumset_iterated_subset_carrier)
[PROOF STATE]
proof (state)
this:
card (sumset_iterated A r) \<le> card (sumset A' (sumset_iterated (minusset A) r))

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (sumset_iterated A r) \<le> card (sumset A' (sumset_iterated (minusset A) r))

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
have "\<dots> \<le> K^r * real (card A')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (card (sumset A' (sumset_iterated (minusset A) r))) \<le> K ^ r * real (card A')
[PROOF STEP]
using A'_card
[PROOF STATE]
proof (prove)
using this:
real (card (sumset A' (sumset_iterated (minusset A) ?r))) \<le> K ^ ?r * real (card A')

goal (1 subgoal):
 1. real (card (sumset A' (sumset_iterated (minusset A) r))) \<le> K ^ r * real (card A')
[PROOF STEP]
by meson
[PROOF STATE]
proof (state)
this:
real (card (sumset A' (sumset_iterated (minusset A) r))) \<le> K ^ r * real (card A')

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real (card (sumset A' (sumset_iterated (minusset A) r))) \<le> K ^ r * real (card A')

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
have "\<dots> \<le> K^r * real (card A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. K ^ r * real (card A') \<le> K ^ r * real (card A)
[PROOF STEP]
by (simp add: \<open>A' \<subseteq> A\<close> \<open>finite A\<close> \<open>0 \<le> K\<close> card_mono mult_left_mono)
[PROOF STATE]
proof (state)
this:
K ^ r * real (card A') \<le> K ^ r * real (card A)

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>x y. x \<le> y \<Longrightarrow> real x \<le> real y) \<Longrightarrow> real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. x \<le> y \<Longrightarrow> real x \<le> real y) \<Longrightarrow> real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)

goal (1 subgoal):
 1. real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
real (card (sumset_iterated A r)) \<le> K ^ r * real (card A)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "(10::int) mod 3 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 10 mod 3 = 1
[PROOF STEP]
by simp


[STATEMENT]
lemma even_of_int_iff:
  \<open>even (of_int k) \<longleftrightarrow> even k\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. even (of_int k) = even k
[PROOF STEP]
by (induction k rule: int_bit_induct) simp_all


[STATEMENT]
lemma isin_set_inorder: "sorted(inorder t) \<Longrightarrow> isin t x = (x \<in> set(inorder t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sorted_Less.sorted (Tree2.inorder t) \<Longrightarrow> isin t x = (x \<in> set (Tree2.inorder t))
[PROOF STEP]
by (induction t rule: tree2_induct) (auto simp: isin_simps)


[STATEMENT]
lemma set_integral_divide_zero [simp]:
  fixes a :: "'a::{real_normed_field, field, second_countable_topology}"
  shows "LINT t:A|M. f t / a = (LINT t:A|M. f t) / a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT t:A|M. f t / a = set_lebesgue_integral M A f / a
[PROOF STEP]
unfolding set_lebesgue_integral_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|M. indicat_real A x *\<^sub>R (f x / a) = (LINT x|M. indicat_real A x *\<^sub>R f x) / a
[PROOF STEP]
by (subst integral_divide_zero[symmetric], intro Bochner_Integration.integral_cong)
     (auto split: split_indicator)


[STATEMENT]
lemma funpow_rec: "f ^^ n = (if n = 0 then id else f \<circ> f ^^ (n - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ^^ n = (if n = 0 then id else f \<circ> f ^^ (n - 1))
[PROOF STEP]
by (induct n) auto


[STATEMENT]
lemma frontier_of_components_subset:
  fixes S :: "'a::real_normed_vector set"
  shows "C \<in> components S \<Longrightarrow> frontier C \<subseteq> frontier S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. C \<in> components S \<Longrightarrow> frontier C \<subseteq> frontier S
[PROOF STEP]
by (metis Path_Connected.frontier_of_connected_component_subset components_iff)


[STATEMENT]
lemma normal_poly_pos_interval:
    "normal_poly p \<Longrightarrow> i \<le> j \<Longrightarrow> j \<le> k \<Longrightarrow> 0 < coeff p i \<Longrightarrow> 0 < coeff p k
      \<Longrightarrow> 0 < coeff p j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>normal_poly p; i \<le> j; j \<le> k; (0::'a) < coeff p i; (0::'a) < coeff p k\<rbrakk> \<Longrightarrow> (0::'a) < coeff p j
[PROOF STEP]
using normal_poly_def
[PROOF STATE]
proof (prove)
using this:
normal_poly ?p \<equiv> ?p \<noteq> 0 \<and> (\<forall>i. (0::?'a) \<le> coeff ?p i) \<and> (\<forall>i. coeff ?p i * coeff ?p (i + 2) \<le> (coeff ?p (i + 1))\<^sup>2) \<and> (\<forall>i j k. i \<le> j \<longrightarrow> j \<le> k \<longrightarrow> (0::?'a) < coeff ?p i \<longrightarrow> (0::?'a) < coeff ?p k \<longrightarrow> (0::?'a) < coeff ?p j)

goal (1 subgoal):
 1. \<lbrakk>normal_poly p; i \<le> j; j \<le> k; (0::'a) < coeff p i; (0::'a) < coeff p k\<rbrakk> \<Longrightarrow> (0::'a) < coeff p j
[PROOF STEP]
by blast


[STATEMENT]
lemma fixes G (structure)
  shows d_OUT_alt_def: "(\<And>y. (x, y) \<notin> \<^bold>E \<Longrightarrow> g (x, y) = 0) \<Longrightarrow> d_OUT g x = (\<Sum>\<^sup>+  y\<in>\<^bold>O\<^bold>U\<^bold>T x. g (x, y))"
  and d_IN_alt_def: "(\<And>x. (x, y) \<notin> \<^bold>E \<Longrightarrow> g (x, y) = 0) \<Longrightarrow> d_IN g y = (\<Sum>\<^sup>+ x\<in>\<^bold>I\<^bold>N y. g (x, y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<And>y. (x, y) \<notin> \<^bold>E \<Longrightarrow> g (x, y) = 0) \<Longrightarrow> d_OUT g x = (\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T x. g (x, y))) &&& ((\<And>x. (x, y) \<notin> \<^bold>E \<Longrightarrow> g (x, y) = 0) \<Longrightarrow> d_IN g y = (\<Sum>\<^sup>+ x\<in>\<^bold>I\<^bold>N y. g (x, y)))
[PROOF STEP]
unfolding d_OUT_def d_IN_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<And>y. (x, y) \<notin> \<^bold>E \<Longrightarrow> g (x, y) = 0) \<Longrightarrow> (\<Sum>\<^sup>+ y. g (x, y)) = (\<Sum>\<^sup>+ y\<in>\<^bold>O\<^bold>U\<^bold>T x. g (x, y))) &&& ((\<And>x. (x, y) \<notin> \<^bold>E \<Longrightarrow> g (x, y) = 0) \<Longrightarrow> (\<Sum>\<^sup>+ x. g (x, y)) = (\<Sum>\<^sup>+ x\<in>\<^bold>I\<^bold>N y. g (x, y)))
[PROOF STEP]
by(fastforce simp add: max_def d_OUT_def d_IN_def nn_integral_count_space_indicator outgoing_def incoming_def intro!: nn_integral_cong split: split_indicator)+


[STATEMENT]
lemma word_less_minus_mono: "a < c \<Longrightarrow> d < b \<Longrightarrow> a - b < a \<Longrightarrow> c - d < c \<Longrightarrow> a - b < c - d"
  for a b c d :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a < c; d < b; a - b < a; c - d < c\<rbrakk> \<Longrightarrow> a - b < c - d
[PROOF STEP]
by uint_arith


[STATEMENT]
lemma integrable_restrict_space:
  fixes f :: "'a \<Rightarrow> 'b::{banach, second_countable_topology}"
  assumes \<Omega>[simp]: "\<Omega> \<inter> space M \<in> sets M"
  shows "integrable (restrict_space M \<Omega>) f \<longleftrightarrow> integrable M (\<lambda>x. indicator \<Omega> x *\<^sub>R f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (restrict_space M \<Omega>) f = integrable M (\<lambda>x. indicat_real \<Omega> x *\<^sub>R f x)
[PROOF STEP]
unfolding integrable_iff_bounded
    borel_measurable_restrict_space_iff[OF \<Omega>]
    nn_integral_restrict_space[OF \<Omega>]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. indicat_real \<Omega> x *\<^sub>R f x) \<in> borel_measurable M \<and> \<integral>\<^sup>+ x. ennreal (norm (f x)) * indicator \<Omega> x \<partial>M < \<infinity>) = ((\<lambda>x. indicat_real \<Omega> x *\<^sub>R f x) \<in> borel_measurable M \<and> \<integral>\<^sup>+ x. ennreal (norm (indicat_real \<Omega> x *\<^sub>R f x)) \<partial>M < \<infinity>)
[PROOF STEP]
by (simp add: ac_simps ennreal_indicator ennreal_mult)


[STATEMENT]
lemma gfp_in_Fix:
  fixes f :: "'a::complete_lattice \<Rightarrow> 'a"
  shows "mono f \<Longrightarrow> gfp f \<in> Fix f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono f \<Longrightarrow> gfp f \<in> Fix f
[PROOF STEP]
by (metis (mono_tags, lifting) Fix_def gfp_unfold mem_Collect_eq)


[STATEMENT]
lemma vector_derivative_linepath_at [simp]: "vector_derivative (linepath a b) (at x) = b - a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vector_derivative (linepath a b) (at x) = b - a
[PROOF STEP]
by (simp add: has_vector_derivative_linepath_within vector_derivative_at)


[STATEMENT]
lemma conv_abscissa_scaleR: "conv_abscissa (scaleR c f) \<le> conv_abscissa f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conv_abscissa (c *\<^sub>R f) \<le> conv_abscissa f
[PROOF STEP]
by (rule conv_abscissa_mono) auto


[STATEMENT]
lemma "((\<exists>z w. (\<forall>x y. (P x y = ((x = z) \<and> (y = w))))) \<longrightarrow>
  (\<exists>z. (\<forall>x. (\<exists>w. ((\<forall>y. (P x y = (y = w))) = (x = z))))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>z w. \<forall>x y. P x y = (x = z \<and> y = w)) \<longrightarrow> (\<exists>z. \<forall>x. \<exists>w. (\<forall>y. P x y = (y = w)) = (x = z))
[PROOF STEP]
by iprover


[STATEMENT]
lemma ennreal_of_enat_infty[simp]: "ennreal_of_enat \<infinity> = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal_of_enat \<infinity> = \<infinity>
[PROOF STEP]
by (simp add: ennreal_of_enat_def)


[STATEMENT]
theorem mint_sound:assumes "invar_vebt t n" and  "min_in_set (set_vebt' t) x" shows "vebt_mint t = Some x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vebt_mint t = Some x
[PROOF STEP]
by (metis assms(1) assms(2) empty_Collect_eq eq_iff mem_Collect_eq min_in_set_def
 mint_corr_help mint_corr_help_empty mint_member option.exhaust set_vebt'_def)


[STATEMENT]
lemma genuine_roots'_code [code]:
  "genuine_roots' prec gr =
     (if length (gr_list gr) = gr_numroots gr then gr_list gr
      else genuine_roots' (2 * prec) (genuine_roots_impl_step' prec gr))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. genuine_roots' prec gr = (if length (gr_list gr) = gr_numroots gr then gr_list gr else genuine_roots' (2 * prec) (genuine_roots_impl_step' prec gr))
[PROOF STEP]
proof (transfer, clarify)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>prec a aa ab b. \<lbrakk>distinct aa; {z. poly a z = (0::'a)} \<subseteq> set aa; filter_fun a b\<rbrakk> \<Longrightarrow> genuine_roots a aa = (if length aa = card {z. poly a z = (0::'a)} then aa else genuine_roots a (filter (b prec) aa))
[PROOF STEP]
fix prec :: nat and p :: "'a poly" and xs :: "'a list" and ff
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>prec a aa ab b. \<lbrakk>distinct aa; {z. poly a z = (0::'a)} \<subseteq> set aa; filter_fun a b\<rbrakk> \<Longrightarrow> genuine_roots a aa = (if length aa = card {z. poly a z = (0::'a)} then aa else genuine_roots a (filter (b prec) aa))
[PROOF STEP]
assume *: "{z. poly p z = 0} \<subseteq> set xs" "distinct xs" "filter_fun p ff"
[PROOF STATE]
proof (state)
this:
{z. poly p z = (0::'a)} \<subseteq> set xs
distinct xs
filter_fun p ff

goal (1 subgoal):
 1. \<And>prec a aa ab b. \<lbrakk>distinct aa; {z. poly a z = (0::'a)} \<subseteq> set aa; filter_fun a b\<rbrakk> \<Longrightarrow> genuine_roots a aa = (if length aa = card {z. poly a z = (0::'a)} then aa else genuine_roots a (filter (b prec) aa))
[PROOF STEP]
show "genuine_roots p xs =
          (if length xs = card {z. poly p z = 0} then xs
           else genuine_roots p (filter (ff prec) xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. genuine_roots p xs = (if length xs = card {z. poly p z = (0::'a)} then xs else genuine_roots p (filter (ff prec) xs))
[PROOF STEP]
using genuine_roots_finish[of p xs] genuine_roots_step[of p] *
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>{z. poly p z = (0::'a)} \<subseteq> set xs; distinct xs; length xs = card {z. poly p z = (0::'a)}\<rbrakk> \<Longrightarrow> genuine_roots p xs = xs
filter_fun p ?f \<Longrightarrow> genuine_roots p ?xs = genuine_roots p (filter (?f ?prec) ?xs)
{z. poly p z = (0::'a)} \<subseteq> set xs
distinct xs
filter_fun p ff

goal (1 subgoal):
 1. genuine_roots p xs = (if length xs = card {z. poly p z = (0::'a)} then xs else genuine_roots p (filter (ff prec) xs))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
genuine_roots p xs = (if length xs = card {z. poly p z = (0::'a)} then xs else genuine_roots p (filter (ff prec) xs))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma iIN_pred: "\<lbrakk> x \<in> [n\<dots>,d]; n < x \<rbrakk> \<Longrightarrow> x - Suc 0 \<in> [n\<dots>,d]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> [n\<dots>,d]; n < x\<rbrakk> \<Longrightarrow> x - Suc 0 \<in> [n\<dots>,d]
[PROOF STEP]
by (fastforce simp: iIN_iff)


[STATEMENT]
lemma dirichlet_prod_inverse':
  assumes "f 1 * i = 1"
  shows   "dirichlet_prod (dirichlet_inverse f i) f = (\<lambda>n. if n = 1 then 1 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dirichlet_prod (dirichlet_inverse f i) f = (\<lambda>n. if n = 1 then 1::'a else (0::'a))
[PROOF STEP]
using dirichlet_prod_inverse[of f] assms
[PROOF STATE]
proof (prove)
using this:
f 1 * ?i = (1::'a) \<Longrightarrow> dirichlet_prod f (dirichlet_inverse f ?i) = (\<lambda>n. if n = 1 then 1::'a else (0::'a))
f 1 * i = (1::'a)

goal (1 subgoal):
 1. dirichlet_prod (dirichlet_inverse f i) f = (\<lambda>n. if n = 1 then 1::'a else (0::'a))
[PROOF STEP]
by (simp add: dirichlet_prod_commutes)


[STATEMENT]
lemma le_int_of_uint64: "(x \<le> y) = (int_of_uint64 x \<le> int_of_uint64 y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<le> y) = (int_of_uint64 x \<le> int_of_uint64 y)
[PROOF STEP]
by (transfer, simp add: word_le_def)


[STATEMENT]
lemma ipoly_nth_root:
  fixes x :: "'a :: idom"
  shows "ipoly (poly_nth_root p) x = ipoly p (x ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ipoly (local.poly_nth_root p) x = ipoly p (x ^ n)
[PROOF STEP]
unfolding poly_nth_root_def ipoly_poly_compose
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ipoly p (ipoly (monom 1 n) x) = ipoly p (x ^ n)
[PROOF STEP]
by (simp add: map_poly_monom poly_monom)


[STATEMENT]
lemma in_eq_out_degree: "in_degree G v = out_degree G v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. in_degree G v = out_degree G v
[PROOF STEP]
using bij_betw_in_out_arcs bij_betw_same_card in_degree_eq_card_arc_ends
    out_degree_eq_card_arc_ends
[PROOF STATE]
proof (prove)
using this:
bij_betw (\<lambda>(u, v). (v, u)) (arc_to_ends G ` in_arcs G ?v) (arc_to_ends G ` out_arcs G ?v)
bij_betw ?f ?A ?B \<Longrightarrow> card ?A = card ?B
in_degree G ?v = card (arc_to_ends G ` in_arcs G ?v)
out_degree G ?v = card (arc_to_ends G ` out_arcs G ?v)

goal (1 subgoal):
 1. in_degree G v = out_degree G v
[PROOF STEP]
by auto


[STATEMENT]
lemma mult_le_cancel_iff2: "0 < z \<Longrightarrow> z * x \<le> z * y \<longleftrightarrow> x \<le> y"
  for x y z :: "'a::linordered_idom"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < z \<Longrightarrow> (z * x \<le> z * y) = (x \<le> y)
[PROOF STEP]
by simp


[STATEMENT]
lemma zhmset_of_sum_list: "zhmset_of (sum_list Ms) = sum_list (map zhmset_of Ms)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zhmset_of (sum_list Ms) = sum_list (map zhmset_of Ms)
[PROOF STEP]
by (induct Ms) (auto simp: zero_zhmultiset_def zhmset_of_plus)


[STATEMENT]
lemma const_1_sum_mod_2:
  assumes "const 1"
  shows "(f 0 + f 1) mod 2 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f 0 + f 1) mod 2 = 0
[PROOF STEP]
using assms const_def
[PROOF STATE]
proof (prove)
using this:
const 1
const ?n = (\<forall>x\<in>{0, 1}. f x = ?n)

goal (1 subgoal):
 1. (f 0 + f 1) mod 2 = 0
[PROOF STEP]
by simp


[STATEMENT]
lemma inverse_unity_root: "inverse (unity_root k m) = cnj (unity_root k m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (unity_root k m) = cnj (unity_root k m)
[PROOF STEP]
unfolding unity_root_conv_exp exp_cnj
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (exp (complex_of_real (2 * pi * real_of_int m / real k) * \<i>)) = exp (cnj (complex_of_real (2 * pi * real_of_int m / real k) * \<i>))
[PROOF STEP]
by (simp add: field_simps exp_minus)


[STATEMENT]
lemma closed_segment_subset: "\<lbrakk>x \<in> S; y \<in> S; convex S\<rbrakk> \<Longrightarrow> closed_segment x y \<subseteq> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> S; y \<in> S; convex S\<rbrakk> \<Longrightarrow> closed_segment x y \<subseteq> S
[PROOF STEP]
by (simp add: convex_contains_segment)


[STATEMENT]
lemma Bseq_powrat_inverse_of_nat_ge_one:
      "a \<ge> 1 \<Longrightarrow> Bseq (\<lambda>n. a pow\<^sub>\<rat> (inverse (of_nat n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<le> a \<Longrightarrow> Bseq (\<lambda>n. a pow\<^sub>\<rat> inverse (rat_of_nat n))
[PROOF STEP]
by (auto intro: BseqI2' [of 1 _ a] simp add: less_imp_le powrat_gt_zero)


[STATEMENT]
lemma Re_complex_div_gt_0: "Re (a / b) > 0 \<longleftrightarrow> Re (a * cnj b) > 0"
  and Im_complex_div_gt_0: "Im (a / b) > 0 \<longleftrightarrow> Im (a * cnj b) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 < Re (a / b)) = (0 < Re (a * cnj b)) &&& (0 < Im (a / b)) = (0 < Im (a * cnj b))
[PROOF STEP]
using complex_div_gt_0
[PROOF STATE]
proof (prove)
using this:
(0 < Re (?a / ?b)) = (0 < Re (?a * cnj ?b)) \<and> (0 < Im (?a / ?b)) = (0 < Im (?a * cnj ?b))

goal (1 subgoal):
 1. (0 < Re (a / b)) = (0 < Re (a * cnj b)) &&& (0 < Im (a / b)) = (0 < Im (a * cnj b))
[PROOF STEP]
by auto


[STATEMENT]
lemma (in infinite_coin_toss_space) nat_filtration_from_eq_sets:
  assumes "N = bernoulli_stream q"
  and "0 < q"
  and "q < 1"
shows "sets (infinite_coin_toss_space.nat_filtration N n) = sets (nat_filtration n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets (infinite_coin_toss_space.nat_filtration N n) = sets (nat_filtration n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sets (infinite_coin_toss_space.nat_filtration N n) = sets (nat_filtration n)
[PROOF STEP]
have "sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p))
          {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}
[PROOF STEP]
have "sets N = events"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sets N = events
[PROOF STEP]
by (metis assms(1) bernoulli_stream_def infinite_coin_toss_space_axioms infinite_coin_toss_space_def sets_measure_pmf sets_stream_space_cong)
[PROOF STATE]
proof (state)
this:
sets N = events

goal (1 subgoal):
 1. sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sets N = events
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sets N = events

goal (1 subgoal):
 1. sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}
[PROOF STEP]
using assms(1) bernoulli_stream_space infinite_coin_toss_space_axioms infinite_coin_toss_space_def
[PROOF STATE]
proof (prove)
using this:
sets N = events
N = bernoulli_stream q
?N = bernoulli_stream ?p \<Longrightarrow> space ?N = streams UNIV
infinite_coin_toss_space p M
infinite_coin_toss_space ?p ?M \<equiv> 0 \<le> ?p \<and> ?p \<le> 1 \<and> ?M = bernoulli_stream ?p

goal (1 subgoal):
 1. sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}

goal (1 subgoal):
 1. sets (infinite_coin_toss_space.nat_filtration N n) = sets (nat_filtration n)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}

goal (1 subgoal):
 1. sets (infinite_coin_toss_space.nat_filtration N n) = sets (nat_filtration n)
[PROOF STEP]
using infinite_coin_toss_space.nat_filtration_sets
[PROOF STATE]
proof (prove)
using this:
sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}
infinite_coin_toss_space ?p ?M \<Longrightarrow> sets (infinite_coin_toss_space.nat_filtration ?M ?n) = sigma_sets (space (bernoulli_stream ?p)) {pseudo_proj_True ?n -` B \<inter> space ?M |B. B \<in> sets (bernoulli_stream ?p)}

goal (1 subgoal):
 1. sets (infinite_coin_toss_space.nat_filtration N n) = sets (nat_filtration n)
[PROOF STEP]
using assms(1) assms(2) assms(3) infinite_coin_toss_space_axioms infinite_coin_toss_space_def
[PROOF STATE]
proof (prove)
using this:
sigma_sets (space (bernoulli_stream q)) {pseudo_proj_True n -` B \<inter> space N |B. B \<in> sets (bernoulli_stream q)} = sigma_sets (space (bernoulli_stream p)) {pseudo_proj_True n -` B \<inter> space M |B. B \<in> sets (bernoulli_stream p)}
infinite_coin_toss_space ?p ?M \<Longrightarrow> sets (infinite_coin_toss_space.nat_filtration ?M ?n) = sigma_sets (space (bernoulli_stream ?p)) {pseudo_proj_True ?n -` B \<inter> space ?M |B. B \<in> sets (bernoulli_stream ?p)}
N = bernoulli_stream q
0 < q
q < 1
infinite_coin_toss_space p M
infinite_coin_toss_space ?p ?M \<equiv> 0 \<le> ?p \<and> ?p \<le> 1 \<and> ?M = bernoulli_stream ?p

goal (1 subgoal):
 1. sets (infinite_coin_toss_space.nat_filtration N n) = sets (nat_filtration n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sets (infinite_coin_toss_space.nat_filtration N n) = sets (nat_filtration n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma norm_cblinfun_id_le:
  "norm (id_cblinfun::'a::complex_normed_vector \<Rightarrow>\<^sub>C\<^sub>L 'a) \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm id_cblinfun \<le> 1
[PROOF STEP]
by transfer (auto simp: onorm_id_le)


[STATEMENT]
lemma horiz_vector_helper_pos_R:
  fixes p:: "real poly"
  assumes nonzero: "p\<noteq>0"
  fixes qs:: "real poly list"
  fixes I:: "nat list*nat list"
  fixes sign:: "rat list"
  fixes x:: "real"
  assumes root_p: "x \<in> {x. poly p x = 0}"
  assumes sign_fix: "sign = consistent_sign_vec qs x"
  assumes welldefined1: "list_constr (fst I) (length qs)"
  assumes welldefined2: "list_constr (snd I) (length qs)"
  shows "((\<forall>p \<in> set (retrieve_polys qs (fst I)). poly p x = 0) \<and> (poly (prod_list (retrieve_polys qs (snd I))) x > 0)) \<longleftrightarrow> (z_R I sign = 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<forall>p\<in>set (retrieve_polys qs (fst I)). poly p x = 0) \<and> 0 < poly (prod_list (retrieve_polys qs (snd I))) x) = (z_R I sign = 1)
[PROOF STEP]
using horiz_vector_helper_pos_ind_R
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?p \<noteq> 0; ?x \<in> {x. poly ?p x = 0}; ?sign = consistent_sign_vec ?qs ?x; list_constr (fst ?I) (length ?qs); list_constr (snd ?I) (length ?qs)\<rbrakk> \<Longrightarrow> ((\<forall>p\<in>set (retrieve_polys ?qs (fst ?I)). poly p ?x = 0) \<and> 0 < poly (prod_list (retrieve_polys ?qs (snd ?I))) ?x) = (z_R ?I ?sign = 1)

goal (1 subgoal):
 1. ((\<forall>p\<in>set (retrieve_polys qs (fst I)). poly p x = 0) \<and> 0 < poly (prod_list (retrieve_polys qs (snd I))) x) = (z_R I sign = 1)
[PROOF STEP]
using  nonzero  root_p sign_fix welldefined1 welldefined2
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?p \<noteq> 0; ?x \<in> {x. poly ?p x = 0}; ?sign = consistent_sign_vec ?qs ?x; list_constr (fst ?I) (length ?qs); list_constr (snd ?I) (length ?qs)\<rbrakk> \<Longrightarrow> ((\<forall>p\<in>set (retrieve_polys ?qs (fst ?I)). poly p ?x = 0) \<and> 0 < poly (prod_list (retrieve_polys ?qs (snd ?I))) ?x) = (z_R ?I ?sign = 1)
p \<noteq> 0
x \<in> {x. poly p x = 0}
sign = consistent_sign_vec qs x
list_constr (fst I) (length qs)
list_constr (snd I) (length qs)

goal (1 subgoal):
 1. ((\<forall>p\<in>set (retrieve_polys qs (fst I)). poly p x = 0) \<and> 0 < poly (prod_list (retrieve_polys qs (snd I))) x) = (z_R I sign = 1)
[PROOF STEP]
by blast


[STATEMENT]
lemma zmult_pos:"\<lbrakk> 0 < m; 0 < (a::int)\<rbrakk> \<Longrightarrow> 0 < (int m) * a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < m; 0 < a\<rbrakk> \<Longrightarrow> 0 < int m * a
[PROOF STEP]
by (frule zmult_zless_mono2[of "0" "a" "int m"], simp, simp)


[STATEMENT]
lemma vsubset_iff: "A \<subseteq>\<^sub>\<circ> B \<longleftrightarrow> (\<forall>t. t \<in>\<^sub>\<circ> A \<longrightarrow> t \<in>\<^sub>\<circ> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<subseteq>\<^sub>\<circ> B) = (\<forall>t. t \<in>\<^sub>\<circ> A \<longrightarrow> t \<in>\<^sub>\<circ> B)
[PROOF STEP]
by blast


[STATEMENT]
lemma not_iUntil: "
  (\<not> (P t1. t1 \<U> t2 I. Q t2)) =
  (\<box> t I. (Q t \<longrightarrow> (\<diamond> t' (I \<down>< t). \<not> P t')))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not> (P t1. t1 \<U> t2 I. Q t2)) = (\<box> t I. Q t \<longrightarrow> (\<diamond> t' I \<down>< t. \<not> P t'))
[PROOF STEP]
unfolding iTL_defs
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not> (\<exists>t\<in>I. Q t \<and> Ball (I \<down>< t) P)) = (\<forall>t\<in>I. Q t \<longrightarrow> (\<exists>t\<in>I \<down>< t. \<not> P t))
[PROOF STEP]
by blast


[STATEMENT]
lemma interior_of_Inter_subset: "X interior_of (\<Inter>\<F>) \<subseteq> (\<Inter>S \<in> \<F>. X interior_of S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X interior_of \<Inter> \<F> \<subseteq> \<Inter> ((interior_of) X ` \<F>)
[PROOF STEP]
by (simp add: INT_greatest Inf_lower interior_of_mono)


[STATEMENT]
lemma iMODb_mem_diff: "\<lbrakk> a \<in> [r, mod m, c]; b \<in> [r, mod m, c] \<rbrakk> \<Longrightarrow> (a - b) mod m = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> [ r, mod m, c ]; b \<in> [ r, mod m, c ]\<rbrakk> \<Longrightarrow> (a - b) mod m = 0
[PROOF STEP]
by (simp add: iMODb_iff mod_eq_imp_diff_mod_0)


[STATEMENT]
lemma star_isotone:
  "x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<le> y \<Longrightarrow> x\<^sup>\<star> \<le> y\<^sup>\<star>
[PROOF STEP]
by (metis sup_right_isotone mult_left_isotone order_trans star_left_unfold mult_1_right star_left_induct)


[STATEMENT]
lemma eucl_lessThan: "{x::real. x <e a} = lessThan a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. x <e a} = {..<a}
[PROOF STEP]
by (simp add: eucl_less_def lessThan_def)


[STATEMENT]
lemma list_succ_set_cyc_permutations:
  assumes "distinct xs" "xs \<noteq> []"
  shows "list_succ ` set (cyc_permutations xs) = {f. f permutes set xs \<and> cyclic_on f (set xs)}" (is "?L = ?R")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_succ ` set (cyc_permutations xs) = {f. f permutes set xs \<and> cyclic_on f (set xs)}
[PROOF STEP]
proof (intro set_eqI iffI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> list_succ ` set (cyc_permutations xs) \<Longrightarrow> x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}
 2. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
fix f
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. x \<in> list_succ ` set (cyc_permutations xs) \<Longrightarrow> x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}
 2. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
assume "f \<in> ?L"
[PROOF STATE]
proof (state)
this:
f \<in> list_succ ` set (cyc_permutations xs)

goal (2 subgoals):
 1. \<And>x. x \<in> list_succ ` set (cyc_permutations xs) \<Longrightarrow> x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}
 2. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
f \<in> list_succ ` set (cyc_permutations xs)

goal (2 subgoals):
 1. \<And>x. x \<in> list_succ ` set (cyc_permutations xs) \<Longrightarrow> x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}
 2. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
have "\<And>ys. set xs = set ys \<Longrightarrow> xs \<noteq> [] \<Longrightarrow> ys \<noteq> []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>ys. \<lbrakk>set xs = set ys; xs \<noteq> []\<rbrakk> \<Longrightarrow> ys \<noteq> []
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>set xs = set ?ys; xs \<noteq> []\<rbrakk> \<Longrightarrow> ?ys \<noteq> []

goal (2 subgoals):
 1. \<And>x. x \<in> list_succ ` set (cyc_permutations xs) \<Longrightarrow> x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}
 2. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
f \<in> list_succ ` set (cyc_permutations xs)
\<lbrakk>set xs = set ?ys; xs \<noteq> []\<rbrakk> \<Longrightarrow> ?ys \<noteq> []
[PROOF STEP]
show "f \<in> ?R"
[PROOF STATE]
proof (prove)
using this:
f \<in> list_succ ` set (cyc_permutations xs)
\<lbrakk>set xs = set ?ys; xs \<noteq> []\<rbrakk> \<Longrightarrow> ?ys \<noteq> []

goal (1 subgoal):
 1. f \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f \<in> list_succ ` set (cyc_permutations xs)
\<lbrakk>set xs = set ?ys; xs \<noteq> []\<rbrakk> \<Longrightarrow> ?ys \<noteq> []
distinct xs
xs \<noteq> []

goal (1 subgoal):
 1. f \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}
[PROOF STEP]
by (auto simp: in_set_cyc_permutations list_succ_permutes cyclic_on_list_succ)
[PROOF STATE]
proof (state)
this:
f \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}

goal (1 subgoal):
 1. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
fix f
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
assume "f \<in> ?R"
[PROOF STATE]
proof (state)
this:
f \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}

goal (1 subgoal):
 1. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}
[PROOF STEP]
obtain ys where ys: "list_succ ys = f" "distinct ys" "set ys = set xs"
[PROOF STATE]
proof (prove)
using this:
f \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)}

goal (1 subgoal):
 1. (\<And>ys. \<lbrakk>list_succ ys = f; distinct ys; set ys = set xs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto elim: cyclic_on_obtain_list_succ')
[PROOF STATE]
proof (state)
this:
list_succ ys = f
distinct ys
set ys = set xs

goal (1 subgoal):
 1. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
list_succ ys = f
distinct ys
set ys = set xs

goal (1 subgoal):
 1. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
with \<open>distinct xs\<close>
[PROOF STATE]
proof (chain)
picking this:
distinct xs
list_succ ys = f
distinct ys
set ys = set xs
[PROOF STEP]
obtain n where "rotate n ys \<in> set (cyc_permutations xs)"
[PROOF STATE]
proof (prove)
using this:
distinct xs
list_succ ys = f
distinct ys
set ys = set xs

goal (1 subgoal):
 1. (\<And>n. rotate n ys \<in> set (cyc_permutations xs) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto elim: in_set_cyc_permutations_obtain)
[PROOF STATE]
proof (state)
this:
rotate n ys \<in> set (cyc_permutations xs)

goal (1 subgoal):
 1. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
rotate n ys \<in> set (cyc_permutations xs)
[PROOF STEP]
have "list_succ (rotate n ys) \<in> ?L"
[PROOF STATE]
proof (prove)
using this:
rotate n ys \<in> set (cyc_permutations xs)

goal (1 subgoal):
 1. list_succ (rotate n ys) \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
list_succ (rotate n ys) \<in> list_succ ` set (cyc_permutations xs)

goal (1 subgoal):
 1. \<And>x. x \<in> {f. f permutes set xs \<and> cyclic_on f (set xs)} \<Longrightarrow> x \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
list_succ ys = f
distinct ys
set ys = set xs
list_succ (rotate n ys) \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
show "f \<in> ?L"
[PROOF STATE]
proof (prove)
using this:
list_succ ys = f
distinct ys
set ys = set xs
list_succ (rotate n ys) \<in> list_succ ` set (cyc_permutations xs)

goal (1 subgoal):
 1. f \<in> list_succ ` set (cyc_permutations xs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f \<in> list_succ ` set (cyc_permutations xs)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eval_monom_eq:
  assumes "length es1 = length es2" "length es2 = length basis" "basis_wf basis"
  assumes "compare_lists es1 es2 = EQ"
  shows   "eval_monom (1, es1) basis = eval_monom (1, es2) basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_monom (1, es1) basis = eval_monom (1, es2) basis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length es1 = length es2
length es2 = length basis
basis_wf basis
compare_lists es1 es2 = EQ

goal (1 subgoal):
 1. eval_monom (1, es1) basis = eval_monom (1, es2) basis
[PROOF STEP]
by (induction es1 es2 basis rule: list_induct3)
     (auto simp: basis_wf_Cons eval_monom_Cons compare_lists.simps(2) split: if_splits)


[STATEMENT]
lemma lookup_ev_Some:
  "lookup_ev ev j A = Some i \<Longrightarrow>
  i < j \<and> A $$ (i,i) = ev \<and> (\<forall> k. i < k \<longrightarrow> k < j \<longrightarrow> A $$ (k,k) \<noteq> ev)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lookup_ev ev j A = Some i \<Longrightarrow> i < j \<and> A $$ (i, i) = ev \<and> (\<forall>k>i. k < j \<longrightarrow> A $$ (k, k) \<noteq> ev)
[PROOF STEP]
by (induct j, auto split: if_splits, case_tac "k = j", auto)


[STATEMENT]
lemma sum_in_Complexs [intro,simp]: "(\<And>i. i \<in> s \<Longrightarrow> f i \<in> \<complex>) \<Longrightarrow> sum f s \<in> \<complex>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> s \<Longrightarrow> f i \<in> \<complex>) \<Longrightarrow> sum f s \<in> \<complex>
[PROOF STEP]
proof (induct s rule: infinite_finite_induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>A. \<lbrakk>infinite A; \<And>i. i \<in> A \<Longrightarrow> f i \<in> \<complex>\<rbrakk> \<Longrightarrow> sum f A \<in> \<complex>
 2. (\<And>i. i \<in> {} \<Longrightarrow> f i \<in> \<complex>) \<Longrightarrow> sum f {} \<in> \<complex>
 3. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> f i \<in> \<complex>) \<Longrightarrow> sum f F \<in> \<complex>; \<And>i. i \<in> insert x F \<Longrightarrow> f i \<in> \<complex>\<rbrakk> \<Longrightarrow> sum f (insert x F) \<in> \<complex>
[PROOF STEP]
case infinite
[PROOF STATE]
proof (state)
this:
infinite A_
?i \<in> A_ \<Longrightarrow> f ?i \<in> \<complex>

goal (3 subgoals):
 1. \<And>A. \<lbrakk>infinite A; \<And>i. i \<in> A \<Longrightarrow> f i \<in> \<complex>\<rbrakk> \<Longrightarrow> sum f A \<in> \<complex>
 2. (\<And>i. i \<in> {} \<Longrightarrow> f i \<in> \<complex>) \<Longrightarrow> sum f {} \<in> \<complex>
 3. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> f i \<in> \<complex>) \<Longrightarrow> sum f F \<in> \<complex>; \<And>i. i \<in> insert x F \<Longrightarrow> f i \<in> \<complex>\<rbrakk> \<Longrightarrow> sum f (insert x F) \<in> \<complex>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
infinite A_
?i \<in> A_ \<Longrightarrow> f ?i \<in> \<complex>
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
infinite A_
?i \<in> A_ \<Longrightarrow> f ?i \<in> \<complex>

goal (1 subgoal):
 1. sum f A_ \<in> \<complex>
[PROOF STEP]
by (metis Complexs_0 sum.infinite)
[PROOF STATE]
proof (state)
this:
sum f A_ \<in> \<complex>

goal (2 subgoals):
 1. (\<And>i. i \<in> {} \<Longrightarrow> f i \<in> \<complex>) \<Longrightarrow> sum f {} \<in> \<complex>
 2. \<And>x F. \<lbrakk>finite F; x \<notin> F; (\<And>i. i \<in> F \<Longrightarrow> f i \<in> \<complex>) \<Longrightarrow> sum f F \<in> \<complex>; \<And>i. i \<in> insert x F \<Longrightarrow> f i \<in> \<complex>\<rbrakk> \<Longrightarrow> sum f (insert x F) \<in> \<complex>
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma summable_bounded:
  assumes "\<And>i. 0 \<le> ((f i)::real)"
    and "\<And>i. f i \<le> g i"
    and "summable g"
  shows "summable f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable f
[PROOF STEP]
proof (rule bounded_imp_summable, (auto simp add: assms))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. sum f {..n} \<le> ?B
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. sum f {..n} \<le> ?B
[PROOF STEP]
have "\<And>i. 0 \<le> g i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. 0 \<le> g i
[PROOF STEP]
using assms dual_order.trans
[PROOF STATE]
proof (prove)
using this:
0 \<le> f ?i
f ?i \<le> g ?i
summable g
\<lbrakk>?b \<le> ?a; ?c \<le> ?b\<rbrakk> \<Longrightarrow> ?c \<le> ?a

goal (1 subgoal):
 1. \<And>i. 0 \<le> g i
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
0 \<le> g ?i

goal (1 subgoal):
 1. \<And>n. sum f {..n} \<le> ?B
[PROOF STEP]
have "sum f {.. n} \<le> sum g {.. n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f {..n} \<le> sum g {..n}
[PROOF STEP]
using assms sum_le
[PROOF STATE]
proof (prove)
using this:
0 \<le> f ?i
f ?i \<le> g ?i
summable g
(\<And>i. ?f i \<le> ?g i) \<Longrightarrow> sum ?f {..?n} \<le> sum ?g {..?n}

goal (1 subgoal):
 1. sum f {..n} \<le> sum g {..n}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sum f {..n} \<le> sum g {..n}

goal (1 subgoal):
 1. \<And>n. sum f {..n} \<le> ?B
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum f {..n} \<le> sum g {..n}

goal (1 subgoal):
 1. \<And>n. sum f {..n} \<le> ?B
[PROOF STEP]
have "... \<le> suminf g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum g {..n} \<le> suminf g
[PROOF STEP]
by (rule sum_le_suminf, (auto simp add: assms \<open>\<And>i. 0 \<le> g i\<close>))
[PROOF STATE]
proof (state)
this:
sum g {..n} \<le> suminf g

goal (1 subgoal):
 1. \<And>n. sum f {..n} \<le> ?B
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sum f {..n} \<le> suminf g
[PROOF STEP]
show "sum f {.. n} \<le> suminf g"
[PROOF STATE]
proof (prove)
using this:
sum f {..n} \<le> suminf g

goal (1 subgoal):
 1. sum f {..n} \<le> suminf g
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
sum f {..n} \<le> suminf g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ceiling_numeral [simp]: "\<lceil>numeral v\<rceil> = numeral v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lceil>numeral v\<rceil> = numeral v
[PROOF STEP]
using ceiling_of_int [of "numeral v"]
[PROOF STATE]
proof (prove)
using this:
\<lceil>of_int (numeral v)\<rceil> = numeral v

goal (1 subgoal):
 1. \<lceil>numeral v\<rceil> = numeral v
[PROOF STEP]
by simp


[STATEMENT]
lemma injective_not_constant:
  fixes S :: "'a::{perfect_space} set"
  shows "\<lbrakk>open S; inj_on f S; f constant_on S\<rbrakk> \<Longrightarrow> S = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>open S; inj_on f S; f constant_on S\<rbrakk> \<Longrightarrow> S = {}
[PROOF STEP]
unfolding constant_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>open S; inj_on f S; \<exists>y. \<forall>x\<in>S. f x = y\<rbrakk> \<Longrightarrow> S = {}
[PROOF STEP]
by (metis equals0I inj_on_contraD islimpt_UNIV islimpt_def)


[STATEMENT]
lemma stieltjes_gamma_0 [simp]: "stieltjes_gamma 0 = euler_mascheroni"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. stieltjes_gamma 0 = euler_mascheroni
[PROOF STEP]
using euler_mascheroni_sum_real
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. inverse (real (n + 1)) + ln (real (n + 1)) - ln (real (n + 2))) sums euler_mascheroni

goal (1 subgoal):
 1. stieltjes_gamma 0 = euler_mascheroni
[PROOF STEP]
by (simp add: sums_iff stieltjes_gamma_def field_simps)


[STATEMENT]
lemma span_add_eq2: assumes y: "y \<in> span S" shows "x + y \<in> span S \<longleftrightarrow> x \<in> span S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x + y \<in> span S) = (x \<in> span S)
[PROOF STEP]
using span_add_eq[of y S x] y
[PROOF STATE]
proof (prove)
using this:
y \<in> span S \<Longrightarrow> (y + x \<in> span S) = (x \<in> span S)
y \<in> span S

goal (1 subgoal):
 1. (x + y \<in> span S) = (x \<in> span S)
[PROOF STEP]
by (auto simp: ac_simps)


[STATEMENT]
lemma isolated_singularity_at_inverse[singularity_intros]:
  assumes f_iso:"isolated_singularity_at f z"
      and f_ness:"not_essential f z"
  shows "isolated_singularity_at (\<lambda>w. inverse (f w)) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
define vf where "vf = (\<lambda>w. inverse (f w))"
[PROOF STATE]
proof (state)
this:
vf = (\<lambda>w. inverse (f w))

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
have ?thesis when "\<not>(\<exists>\<^sub>Fw in (at z). f w\<noteq>0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
have "\<forall>\<^sub>Fw in (at z). f w=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F w in at z. f w = 0
[PROOF STEP]
using that[unfolded frequently_def, simplified]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at z. f x = 0

goal (1 subgoal):
 1. \<forall>\<^sub>F w in at z. f w = 0
[PROOF STEP]
by (auto elim: eventually_rev_mp)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F w in at z. f w = 0

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F w in at z. f w = 0
[PROOF STEP]
have "\<forall>\<^sub>Fw in (at z). vf w=0"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F w in at z. f w = 0

goal (1 subgoal):
 1. \<forall>\<^sub>F w in at z. vf w = 0
[PROOF STEP]
unfolding vf_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F w in at z. f w = 0

goal (1 subgoal):
 1. \<forall>\<^sub>F w in at z. inverse (f w) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F w in at z. vf w = 0

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F w in at z. vf w = 0
[PROOF STEP]
obtain d1 where "d1>0" and d1:"\<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> vf x = 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F w in at z. vf w = 0

goal (1 subgoal):
 1. (\<And>d1. \<lbrakk>0 < d1; \<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> vf x = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding eventually_at
[PROOF STATE]
proof (prove)
using this:
\<exists>d>0. \<forall>x\<in>UNIV. x \<noteq> z \<and> dist x z < d \<longrightarrow> vf x = 0

goal (1 subgoal):
 1. (\<And>d1. \<lbrakk>0 < d1; \<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> vf x = 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < d1
\<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> vf x = 0

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < d1
\<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> vf x = 0
[PROOF STEP]
have "vf holomorphic_on ball z d1-{z}"
[PROOF STATE]
proof (prove)
using this:
0 < d1
\<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> vf x = 0

goal (1 subgoal):
 1. vf holomorphic_on ball z d1 - {z}
[PROOF STEP]
apply (rule_tac holomorphic_transform[of "\<lambda>_. 0"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>0 < d1; \<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> vf x = 0\<rbrakk> \<Longrightarrow> (\<lambda>_. 0) holomorphic_on ball z d1 - {z}
 2. \<And>x. \<lbrakk>0 < d1; \<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> vf x = 0; x \<in> ball z d1 - {z}\<rbrakk> \<Longrightarrow> 0 = vf x
[PROOF STEP]
by (auto simp add:dist_commute)
[PROOF STATE]
proof (state)
this:
vf holomorphic_on ball z d1 - {z}

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
vf holomorphic_on ball z d1 - {z}
[PROOF STEP]
have "vf analytic_on ball z d1 - {z}"
[PROOF STATE]
proof (prove)
using this:
vf holomorphic_on ball z d1 - {z}

goal (1 subgoal):
 1. vf analytic_on ball z d1 - {z}
[PROOF STEP]
by (simp add: analytic_on_open open_delete)
[PROOF STATE]
proof (state)
this:
vf analytic_on ball z d1 - {z}

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
vf analytic_on ball z d1 - {z}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
vf analytic_on ball z d1 - {z}

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
using \<open>d1>0\<close>
[PROOF STATE]
proof (prove)
using this:
vf analytic_on ball z d1 - {z}
0 < d1

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
unfolding isolated_singularity_at_def vf_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>w. inverse (f w)) analytic_on ball z d1 - {z}
0 < d1

goal (1 subgoal):
 1. \<exists>r>0. (\<lambda>w. inverse (f w)) analytic_on ball z r - {z}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
isolated_singularity_at (\<lambda>w. inverse (f w)) z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<not> (\<exists>\<^sub>F w in at z. f w \<noteq> 0) \<Longrightarrow> isolated_singularity_at (\<lambda>w. inverse (f w)) z

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> (\<exists>\<^sub>F w in at z. f w \<noteq> 0) \<Longrightarrow> isolated_singularity_at (\<lambda>w. inverse (f w)) z

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
have ?thesis when f_nconst:"\<exists>\<^sub>Fw in (at z). f w\<noteq>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
have "\<forall>\<^sub>F w in at z. f w \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F w in at z. f w \<noteq> 0
[PROOF STEP]
using non_zero_neighbour[OF f_iso f_ness f_nconst]
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F w in at z. f w \<noteq> 0

goal (1 subgoal):
 1. \<forall>\<^sub>F w in at z. f w \<noteq> 0
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F w in at z. f w \<noteq> 0

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F w in at z. f w \<noteq> 0
[PROOF STEP]
obtain d1 where d1:"d1>0" "\<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> f x \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F w in at z. f w \<noteq> 0

goal (1 subgoal):
 1. (\<And>d1. \<lbrakk>0 < d1; \<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> f x \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding eventually_at
[PROOF STATE]
proof (prove)
using this:
\<exists>d>0. \<forall>x\<in>UNIV. x \<noteq> z \<and> dist x z < d \<longrightarrow> f x \<noteq> 0

goal (1 subgoal):
 1. (\<And>d1. \<lbrakk>0 < d1; \<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> f x \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < d1
\<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> f x \<noteq> 0

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
obtain d2 where "d2>0" and d2:"f analytic_on ball z d2 - {z}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>d2. \<lbrakk>0 < d2; f analytic_on ball z d2 - {z}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using f_iso
[PROOF STATE]
proof (prove)
using this:
isolated_singularity_at f z

goal (1 subgoal):
 1. (\<And>d2. \<lbrakk>0 < d2; f analytic_on ball z d2 - {z}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding isolated_singularity_at_def
[PROOF STATE]
proof (prove)
using this:
\<exists>r>0. f analytic_on ball z r - {z}

goal (1 subgoal):
 1. (\<And>d2. \<lbrakk>0 < d2; f analytic_on ball z d2 - {z}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < d2
f analytic_on ball z d2 - {z}

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
define d3 where "d3=min d1 d2"
[PROOF STATE]
proof (state)
this:
d3 = min d1 d2

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
have "d3>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < d3
[PROOF STEP]
unfolding d3_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < min d1 d2
[PROOF STEP]
using \<open>d1>0\<close> \<open>d2>0\<close>
[PROOF STATE]
proof (prove)
using this:
0 < d1
0 < d2

goal (1 subgoal):
 1. 0 < min d1 d2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < d3

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 < d3

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
have "vf analytic_on ball z d3 - {z}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vf analytic_on ball z d3 - {z}
[PROOF STEP]
unfolding vf_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>w. inverse (f w)) analytic_on ball z d3 - {z}
[PROOF STEP]
apply (rule analytic_on_inverse)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. f analytic_on ball z d3 - {z}
 2. \<And>w. w \<in> ball z d3 - {z} \<Longrightarrow> f w \<noteq> 0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f analytic_on ball z d3 - {z}
[PROOF STEP]
using d2
[PROOF STATE]
proof (prove)
using this:
f analytic_on ball z d2 - {z}

goal (1 subgoal):
 1. f analytic_on ball z d3 - {z}
[PROOF STEP]
unfolding d3_def
[PROOF STATE]
proof (prove)
using this:
f analytic_on ball z d2 - {z}

goal (1 subgoal):
 1. f analytic_on ball z (min d1 d2) - {z}
[PROOF STEP]
by (elim analytic_on_subset) auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>w. w \<in> ball z d3 - {z} \<Longrightarrow> f w \<noteq> 0
[PROOF STEP]
subgoal for w
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w \<in> ball z d3 - {z} \<Longrightarrow> f w \<noteq> 0
[PROOF STEP]
using d1
[PROOF STATE]
proof (prove)
using this:
0 < d1
\<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> f x \<noteq> 0

goal (1 subgoal):
 1. w \<in> ball z d3 - {z} \<Longrightarrow> f w \<noteq> 0
[PROOF STEP]
unfolding d3_def
[PROOF STATE]
proof (prove)
using this:
0 < d1
\<forall>x. x \<noteq> z \<and> dist x z < d1 \<longrightarrow> f x \<noteq> 0

goal (1 subgoal):
 1. w \<in> ball z (min d1 d2) - {z} \<Longrightarrow> f w \<noteq> 0
[PROOF STEP]
by (auto simp add:dist_commute)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
vf analytic_on ball z d3 - {z}

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 < d3
vf analytic_on ball z d3 - {z}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < d3
vf analytic_on ball z d3 - {z}

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
unfolding isolated_singularity_at_def vf_def
[PROOF STATE]
proof (prove)
using this:
0 < d3
(\<lambda>w. inverse (f w)) analytic_on ball z d3 - {z}

goal (1 subgoal):
 1. \<exists>r>0. (\<lambda>w. inverse (f w)) analytic_on ball z r - {z}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
isolated_singularity_at (\<lambda>w. inverse (f w)) z

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>\<^sub>F w in at z. f w \<noteq> 0 \<Longrightarrow> isolated_singularity_at (\<lambda>w. inverse (f w)) z

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<exists>\<^sub>F w in at z. f w \<noteq> 0) \<Longrightarrow> isolated_singularity_at (\<lambda>w. inverse (f w)) z
\<exists>\<^sub>F w in at z. f w \<noteq> 0 \<Longrightarrow> isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> (\<exists>\<^sub>F w in at z. f w \<noteq> 0) \<Longrightarrow> isolated_singularity_at (\<lambda>w. inverse (f w)) z
\<exists>\<^sub>F w in at z. f w \<noteq> 0 \<Longrightarrow> isolated_singularity_at (\<lambda>w. inverse (f w)) z

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. inverse (f w)) z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
isolated_singularity_at (\<lambda>w. inverse (f w)) z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma list_lcm_pos:
  "list_lcm xs \<ge> (0 :: int)"
  "0 \<notin> set xs \<Longrightarrow> list_lcm xs \<noteq> 0"
  "0 \<notin> set xs \<Longrightarrow> list_lcm xs > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> lcm_list xs &&& (0 \<notin> set xs \<Longrightarrow> lcm_list xs \<noteq> 0) &&& (0 \<notin> set xs \<Longrightarrow> 0 < lcm_list xs)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. 0 \<le> lcm_list xs
 2. 0 \<notin> set xs \<Longrightarrow> lcm_list xs \<noteq> 0
 3. 0 \<notin> set xs \<Longrightarrow> 0 < lcm_list xs
[PROOF STEP]
have "0 \<le> \<bar>Lcm (set xs)\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> \<bar>Lcm (set xs)\<bar>
[PROOF STEP]
by (simp only: abs_ge_zero)
[PROOF STATE]
proof (state)
this:
0 \<le> \<bar>Lcm (set xs)\<bar>

goal (3 subgoals):
 1. 0 \<le> lcm_list xs
 2. 0 \<notin> set xs \<Longrightarrow> lcm_list xs \<noteq> 0
 3. 0 \<notin> set xs \<Longrightarrow> 0 < lcm_list xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> \<bar>Lcm (set xs)\<bar>
[PROOF STEP]
have "0 \<le> Lcm (set xs)"
[PROOF STATE]
proof (prove)
using this:
0 \<le> \<bar>Lcm (set xs)\<bar>

goal (1 subgoal):
 1. 0 \<le> Lcm (set xs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> Lcm (set xs)

goal (3 subgoals):
 1. 0 \<le> lcm_list xs
 2. 0 \<notin> set xs \<Longrightarrow> lcm_list xs \<noteq> 0
 3. 0 \<notin> set xs \<Longrightarrow> 0 < lcm_list xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<le> Lcm (set xs)
[PROOF STEP]
show "list_lcm xs \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> Lcm (set xs)

goal (1 subgoal):
 1. 0 \<le> lcm_list xs
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> lcm_list xs

goal (2 subgoals):
 1. 0 \<notin> set xs \<Longrightarrow> lcm_list xs \<noteq> 0
 2. 0 \<notin> set xs \<Longrightarrow> 0 < lcm_list xs
[PROOF STEP]
assume "0 \<notin> set xs"
[PROOF STATE]
proof (state)
this:
0 \<notin> set xs

goal (2 subgoals):
 1. 0 \<notin> set xs \<Longrightarrow> lcm_list xs \<noteq> 0
 2. 0 \<notin> set xs \<Longrightarrow> 0 < lcm_list xs
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 \<notin> set xs
[PROOF STEP]
show "list_lcm xs \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
0 \<notin> set xs

goal (1 subgoal):
 1. lcm_list xs \<noteq> 0
[PROOF STEP]
by (simp add: Lcm_0_iff)
[PROOF STATE]
proof (state)
this:
lcm_list xs \<noteq> 0

goal (1 subgoal):
 1. 0 \<notin> set xs \<Longrightarrow> 0 < lcm_list xs
[PROOF STEP]
with \<open>list_lcm xs \<ge> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
0 \<le> lcm_list xs
lcm_list xs \<noteq> 0
[PROOF STEP]
show "list_lcm xs > 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> lcm_list xs
lcm_list xs \<noteq> 0

goal (1 subgoal):
 1. 0 < lcm_list xs
[PROOF STEP]
by (simp add: le_less)
[PROOF STATE]
proof (state)
this:
0 < lcm_list xs

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bij_betw_implies_surj_on_and_card_eq:
  assumes "finite A"
  assumes "f \<in> A \<rightarrow>\<^sub>E B"
  shows "bij_betw f A B \<longleftrightarrow> f ` A = B \<and> card A = card B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw f A B = (f ` A = B \<and> card A = card B)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. bij_betw f A B \<Longrightarrow> f ` A = B \<and> card A = card B
 2. f ` A = B \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
assume "bij_betw f A B"
[PROOF STATE]
proof (state)
this:
bij_betw f A B

goal (2 subgoals):
 1. bij_betw f A B \<Longrightarrow> f ` A = B \<and> card A = card B
 2. f ` A = B \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
show "f ` A = B \<and> card A = card B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` A = B \<and> card A = card B
[PROOF STEP]
using \<open>bij_betw f A B\<close> bij_betw_imp_surj_on bij_betw_same_card
[PROOF STATE]
proof (prove)
using this:
bij_betw f A B
bij_betw ?f ?A ?B \<Longrightarrow> ?f ` ?A = ?B
bij_betw ?f ?A ?B \<Longrightarrow> card ?A = card ?B

goal (1 subgoal):
 1. f ` A = B \<and> card A = card B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
f ` A = B \<and> card A = card B

goal (1 subgoal):
 1. f ` A = B \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f ` A = B \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
assume "f ` A = B \<and> card A = card B"
[PROOF STATE]
proof (state)
this:
f ` A = B \<and> card A = card B

goal (1 subgoal):
 1. f ` A = B \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
f ` A = B \<and> card A = card B
[PROOF STEP]
have "f ` A = B" and "card A = card B"
[PROOF STATE]
proof (prove)
using this:
f ` A = B \<and> card A = card B

goal (1 subgoal):
 1. f ` A = B &&& card A = card B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` A = B
card A = card B

goal (1 subgoal):
 1. f ` A = B \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
f ` A = B
card A = card B
[PROOF STEP]
have "inj_on f A"
[PROOF STATE]
proof (prove)
using this:
f ` A = B
card A = card B

goal (1 subgoal):
 1. inj_on f A
[PROOF STEP]
by (simp add: \<open>finite A\<close> inj_on_iff_eq_card)
[PROOF STATE]
proof (state)
this:
inj_on f A

goal (1 subgoal):
 1. f ` A = B \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from this \<open>f ` A = B\<close>
[PROOF STATE]
proof (chain)
picking this:
inj_on f A
f ` A = B
[PROOF STEP]
show "bij_betw f A B"
[PROOF STATE]
proof (prove)
using this:
inj_on f A
f ` A = B

goal (1 subgoal):
 1. bij_betw f A B
[PROOF STEP]
by (rule bij_betw_imageI)
[PROOF STATE]
proof (state)
this:
bij_betw f A B

goal:
No subgoals!
[PROOF STEP]
qed


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

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

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

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


[STATEMENT]
lemma rQuots_rev_lQuots: "rQuots x A = rev ` lQuots x (rev ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rQuots x A = rev ` lQuots x (rev ` A)
[PROOF STEP]
unfolding rQuots_def lQuots_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {ys. ys @ rev x \<in> A} = rev ` {ys. x @ ys \<in> rev ` A}
[PROOF STEP]
by (auto simp: rev_swap[symmetric])


[STATEMENT]
lemma DERIV_const_ratio_const:
  fixes f :: "real \<Rightarrow> real"
  assumes "a \<noteq> b" and df: "\<And>x. DERIV f x :> k"
  shows "f b - f a = (b - a) * k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f b - f a = (b - a) * k
[PROOF STEP]
proof (cases a b rule: linorder_cases)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. a < b \<Longrightarrow> f b - f a = (b - a) * k
 2. a = b \<Longrightarrow> f b - f a = (b - a) * k
 3. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
case less
[PROOF STATE]
proof (state)
this:
a < b

goal (3 subgoals):
 1. a < b \<Longrightarrow> f b - f a = (b - a) * k
 2. a = b \<Longrightarrow> f b - f a = (b - a) * k
 3. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f b - f a = (b - a) * k
[PROOF STEP]
using MVT [OF less] df
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>continuous_on {a..b} ?f; \<And>x. \<lbrakk>a < x; x < b\<rbrakk> \<Longrightarrow> ?f differentiable at x\<rbrakk> \<Longrightarrow> \<exists>l z. a < z \<and> z < b \<and> (?f has_real_derivative l) (at z) \<and> ?f b - ?f a = (b - a) * l
(f has_real_derivative k) (at ?x)

goal (1 subgoal):
 1. f b - f a = (b - a) * k
[PROOF STEP]
by (metis DERIV_continuous DERIV_unique continuous_at_imp_continuous_on real_differentiable_def)
[PROOF STATE]
proof (state)
this:
f b - f a = (b - a) * k

goal (2 subgoals):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
 2. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
 2. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
case greater
[PROOF STATE]
proof (state)
this:
b < a

goal (2 subgoals):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
 2. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
have  "f a - f b = (a - b) * k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f a - f b = (a - b) * k
[PROOF STEP]
using MVT [OF greater] df
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>continuous_on {b..a} ?f; \<And>x. \<lbrakk>b < x; x < a\<rbrakk> \<Longrightarrow> ?f differentiable at x\<rbrakk> \<Longrightarrow> \<exists>l z. b < z \<and> z < a \<and> (?f has_real_derivative l) (at z) \<and> ?f a - ?f b = (a - b) * l
(f has_real_derivative k) (at ?x)

goal (1 subgoal):
 1. f a - f b = (a - b) * k
[PROOF STEP]
by (metis DERIV_continuous DERIV_unique continuous_at_imp_continuous_on real_differentiable_def)
[PROOF STATE]
proof (state)
this:
f a - f b = (a - b) * k

goal (2 subgoals):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
 2. b < a \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
f a - f b = (a - b) * k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f a - f b = (a - b) * k

goal (1 subgoal):
 1. f b - f a = (b - a) * k
[PROOF STEP]
by (simp add: algebra_simps)
[PROOF STATE]
proof (state)
this:
f b - f a = (b - a) * k

goal (1 subgoal):
 1. a = b \<Longrightarrow> f b - f a = (b - a) * k
[PROOF STEP]
qed auto


[STATEMENT]
lemma supp_convolution_subset_sum_supp :
  fixes f g :: "'a::group_add \<Rightarrow> 'b::{comm_monoid_add,times}"
  shows "supp (convolution f g) \<subseteq> supp f + supp g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
define SS where "SS x = {y. x-y \<in> supp f \<and> y \<in> supp g}" for x
[PROOF STATE]
proof (state)
this:
SS ?x = {y. ?x - y \<in> supp f \<and> y \<in> supp g}

goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
have "convolution f g = (\<lambda>x. sum (\<lambda>y. (f (x - y)) * g y) (SS x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convolution f g = (\<lambda>x. \<Sum>y\<in>SS x. f (x - y) * g y)
[PROOF STEP]
unfolding SS_def convolution_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<Sum>y | x - y \<in> supp f \<and> y \<in> supp g. f (x - y) * g y) = (\<lambda>x. \<Sum>y | x - y \<in> supp f \<and> y \<in> supp g. f (x - y) * g y)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
convolution f g = (\<lambda>x. \<Sum>y\<in>SS x. f (x - y) * g y)

goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
convolution f g = (\<lambda>x. \<Sum>y\<in>SS x. f (x - y) * g y)

goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
have "\<And>x. x \<notin> supp f + supp g \<Longrightarrow> SS x = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<notin> supp f + supp g \<Longrightarrow> SS x = {}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<notin> supp f + supp g \<Longrightarrow> SS x = {}
[PROOF STEP]
have "\<And>x. SS x \<noteq> {} \<Longrightarrow> x \<in> supp f + supp g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. SS x \<noteq> {} \<Longrightarrow> x \<in> supp f + supp g
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. SS x \<noteq> {} \<Longrightarrow> x \<in> supp f + supp g
[PROOF STEP]
fix x::'a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. SS x \<noteq> {} \<Longrightarrow> x \<in> supp f + supp g
[PROOF STEP]
assume "SS x \<noteq> {}"
[PROOF STATE]
proof (state)
this:
SS x \<noteq> {}

goal (1 subgoal):
 1. \<And>x. SS x \<noteq> {} \<Longrightarrow> x \<in> supp f + supp g
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
SS x \<noteq> {}
[PROOF STEP]
obtain y where "x - y \<in> supp f" and y_G: "y \<in> supp g"
[PROOF STATE]
proof (prove)
using this:
SS x \<noteq> {}

goal (1 subgoal):
 1. (\<And>y. \<lbrakk>x - y \<in> supp f; y \<in> supp g\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using SS_def
[PROOF STATE]
proof (prove)
using this:
SS x \<noteq> {}
SS ?x = {y. ?x - y \<in> supp f \<and> y \<in> supp g}

goal (1 subgoal):
 1. (\<And>y. \<lbrakk>x - y \<in> supp f; y \<in> supp g\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
x - y \<in> supp f
y \<in> supp g

goal (1 subgoal):
 1. \<And>x. SS x \<noteq> {} \<Longrightarrow> x \<in> supp f + supp g
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
x - y \<in> supp f
y \<in> supp g
[PROOF STEP]
obtain z where z_F: "z \<in> supp f" and z_eq: "x - y = z"
[PROOF STATE]
proof (prove)
using this:
x - y \<in> supp f
y \<in> supp g

goal (1 subgoal):
 1. (\<And>z. \<lbrakk>z \<in> supp f; x - y = z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
z \<in> supp f
x - y = z

goal (1 subgoal):
 1. \<And>x. SS x \<noteq> {} \<Longrightarrow> x \<in> supp f + supp g
[PROOF STEP]
from z_eq
[PROOF STATE]
proof (chain)
picking this:
x - y = z
[PROOF STEP]
have "x = z + y"
[PROOF STATE]
proof (prove)
using this:
x - y = z

goal (1 subgoal):
 1. x = z + y
[PROOF STEP]
using diff_eq_eq
[PROOF STATE]
proof (prove)
using this:
x - y = z
(?a - ?b = ?c) = (?a = ?c + ?b)

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

goal (1 subgoal):
 1. \<And>x. SS x \<noteq> {} \<Longrightarrow> x \<in> supp f + supp g
[PROOF STEP]
with z_F y_G
[PROOF STATE]
proof (chain)
picking this:
z \<in> supp f
y \<in> supp g
x = z + y
[PROOF STEP]
show "x \<in> supp f + supp g"
[PROOF STATE]
proof (prove)
using this:
z \<in> supp f
y \<in> supp g
x = z + y

goal (1 subgoal):
 1. x \<in> supp f + supp g
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
x \<in> supp f + supp g

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
SS ?x \<noteq> {} \<Longrightarrow> ?x \<in> supp f + supp g

goal (1 subgoal):
 1. \<And>x. x \<notin> supp f + supp g \<Longrightarrow> SS x = {}
[PROOF STEP]
thus "\<And>x. x \<notin> supp f + supp g \<Longrightarrow> SS x = {}"
[PROOF STATE]
proof (prove)
using this:
SS ?x \<noteq> {} \<Longrightarrow> ?x \<in> supp f + supp g

goal (1 subgoal):
 1. \<And>x. x \<notin> supp f + supp g \<Longrightarrow> SS x = {}
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
?x \<notin> supp f + supp g \<Longrightarrow> SS ?x = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?x \<notin> supp f + supp g \<Longrightarrow> SS ?x = {}

goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
convolution f g = (\<lambda>x. \<Sum>y\<in>SS x. f (x - y) * g y)
?x \<notin> supp f + supp g \<Longrightarrow> SS ?x = {}
[PROOF STEP]
have "\<And>x. x \<notin> supp f + supp g
                        \<Longrightarrow> convolution f g x = sum (\<lambda>y. (f (x - y)) * g y) {}"
[PROOF STATE]
proof (prove)
using this:
convolution f g = (\<lambda>x. \<Sum>y\<in>SS x. f (x - y) * g y)
?x \<notin> supp f + supp g \<Longrightarrow> SS ?x = {}

goal (1 subgoal):
 1. \<And>x. x \<notin> supp f + supp g \<Longrightarrow> convolution f g x = (\<Sum>y\<in>{}. f (x - y) * g y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?x \<notin> supp f + supp g \<Longrightarrow> convolution f g ?x = (\<Sum>y\<in>{}. f (?x - y) * g y)

goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
hence "\<And>x. x \<notin> supp f + supp g \<Longrightarrow> convolution f g x = 0"
[PROOF STATE]
proof (prove)
using this:
?x \<notin> supp f + supp g \<Longrightarrow> convolution f g ?x = (\<Sum>y\<in>{}. f (?x - y) * g y)

goal (1 subgoal):
 1. \<And>x. x \<notin> supp f + supp g \<Longrightarrow> convolution f g x = (0::'b)
[PROOF STEP]
using sum.empty
[PROOF STATE]
proof (prove)
using this:
?x \<notin> supp f + supp g \<Longrightarrow> convolution f g ?x = (\<Sum>y\<in>{}. f (?x - y) * g y)
sum ?g {} = (0::?'a)

goal (1 subgoal):
 1. \<And>x. x \<notin> supp f + supp g \<Longrightarrow> convolution f g x = (0::'b)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?x \<notin> supp f + supp g \<Longrightarrow> convolution f g ?x = (0::'b)

goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
?x \<notin> supp f + supp g \<Longrightarrow> convolution f g ?x = (0::'b)

goal (1 subgoal):
 1. supp (convolution f g) \<subseteq> supp f + supp g
[PROOF STEP]
unfolding supp_def
[PROOF STATE]
proof (prove)
using this:
?x \<notin> {x. f x \<noteq> (0::'b)} + {x. g x \<noteq> (0::'b)} \<Longrightarrow> convolution f g ?x = (0::'b)

goal (1 subgoal):
 1. {x. convolution f g x \<noteq> (0::'b)} \<subseteq> {x. f x \<noteq> (0::'b)} + {x. g x \<noteq> (0::'b)}
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
supp (convolution f g) \<subseteq> supp f + supp g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma zip_altdef: "zip xs ys = [(xs!i, ys!i). i \<leftarrow> [0..<min (length xs) (length ys)]]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zip xs ys = map (\<lambda>i. (xs ! i, ys ! i)) [0..<min (length xs) (length ys)]
[PROOF STEP]
by (simp add: zip_with_Pair [symmetric] zip_with_altdef')


[STATEMENT]
lemma mat1_mult_left: assumes wf: "mat nr nc m"
  shows "mat_mult nr (mat1 nr) m = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat1 nr) m = m
[PROOF STEP]
proof (rule mat_eqI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat1 nr) m)
 2. mat ?nr ?nc m
 3. \<And>i j. \<lbrakk>i < ?nc; j < ?nr\<rbrakk> \<Longrightarrow> mat_mult nr (mat1 nr) m ! i ! j = m ! i ! j
[PROOF STEP]
fix i j
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat1 nr) m)
 2. mat ?nr ?nc m
 3. \<And>i j. \<lbrakk>i < ?nc; j < ?nr\<rbrakk> \<Longrightarrow> mat_mult nr (mat1 nr) m ! i ! j = m ! i ! j
[PROOF STEP]
assume i: "i < nc" and j: "j < nr"
[PROOF STATE]
proof (state)
this:
i < nc
j < nr

goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat1 nr) m)
 2. mat ?nr ?nc m
 3. \<And>i j. \<lbrakk>i < ?nc; j < ?nr\<rbrakk> \<Longrightarrow> mat_mult nr (mat1 nr) m ! i ! j = m ! i ! j
[PROOF STEP]
show "mat_mult nr (mat1 nr) m ! i ! j = m ! i ! j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat1 nr) m ! i ! j = m ! i ! j
[PROOF STEP]
by (unfold mat_mult_index[OF mat1 wf j i]
      row_mat1[OF j]
      scalar_left_one[OF col[OF wf i] j], unfold col_def, simp)
[PROOF STATE]
proof (state)
this:
mat_mult nr (mat1 nr) m ! i ! j = m ! i ! j

goal (2 subgoals):
 1. mat nr nc (mat_mult nr (mat1 nr) m)
 2. mat nr nc m
[PROOF STEP]
qed (insert wf, auto)


[STATEMENT]
lemma poly_induct6:
  assumes "p \<in> carrier P"
  assumes monom: "\<And>a n. a \<in> carrier R \<Longrightarrow> Q (monom P a 0)"
  assumes plus_monom: "\<And>a n p. a \<in> carrier R \<Longrightarrow> a \<noteq> \<zero> \<Longrightarrow> p \<in> carrier P \<Longrightarrow> degree p < n \<Longrightarrow> Q p \<Longrightarrow>
                                Q(p \<oplus>\<^bsub>P\<^esub> monom P a n)"
  shows "Q p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Q p
[PROOF STEP]
apply(rule poly_induct2)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. p \<in> carrier P
 2. \<And>p. \<lbrakk>p \<in> carrier P; deg R p = 0\<rbrakk> \<Longrightarrow> Q p
 3. \<And>p. \<lbrakk>0 < deg R p; p \<in> carrier P; Q (Cring_Poly.truncate R p)\<rbrakk> \<Longrightarrow> Q p
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
p \<in> carrier P

goal (3 subgoals):
 1. p \<in> carrier P
 2. \<And>p. \<lbrakk>p \<in> carrier P; deg R p = 0\<rbrakk> \<Longrightarrow> Q p
 3. \<And>p. \<lbrakk>0 < deg R p; p \<in> carrier P; Q (Cring_Poly.truncate R p)\<rbrakk> \<Longrightarrow> Q p
[PROOF STEP]
apply auto[1]
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>p. \<lbrakk>p \<in> carrier P; deg R p = 0\<rbrakk> \<Longrightarrow> Q p
 2. \<And>p. \<lbrakk>0 < deg R p; p \<in> carrier P; Q (Cring_Poly.truncate R p)\<rbrakk> \<Longrightarrow> Q p
[PROOF STEP]
apply (metis lcf_closed P_def coeff_simp deg_zero_impl_monom monom)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>p. \<lbrakk>0 < deg R p; p \<in> carrier P; Q (Cring_Poly.truncate R p)\<rbrakk> \<Longrightarrow> Q p
[PROOF STEP]
using plus_monom
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> carrier R; ?a \<noteq> \<zero>; ?p \<in> carrier P; deg R ?p < ?n; Q ?p\<rbrakk> \<Longrightarrow> Q (?p \<oplus>\<^bsub>P\<^esub> monom P ?a ?n)

goal (1 subgoal):
 1. \<And>p. \<lbrakk>0 < deg R p; p \<in> carrier P; Q (Cring_Poly.truncate R p)\<rbrakk> \<Longrightarrow> Q p
[PROOF STEP]
by (metis lcf_closed P_def coeff_simp lcoeff_nonzero_deg nat_less_le trunc_closed trunc_degree trunc_simps(1))


[STATEMENT]
lemma less_b_least2_impl_zero: "z < b_least2 f x y \<Longrightarrow> f x z = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z < b_least2 f x y \<Longrightarrow> f x z = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z < b_least2 f x y \<Longrightarrow> f x z = 0
[PROOF STEP]
assume A1: "z < b_least2 f x y" (is "_ < ?b")
[PROOF STATE]
proof (state)
this:
z < b_least2 f x y

goal (1 subgoal):
 1. z < b_least2 f x y \<Longrightarrow> f x z = 0
[PROOF STEP]
have "b_least2 f x y \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b_least2 f x y \<le> y
[PROOF STEP]
by (rule b_least2_le_arg)
[PROOF STATE]
proof (state)
this:
b_least2 f x y \<le> y

goal (1 subgoal):
 1. z < b_least2 f x y \<Longrightarrow> f x z = 0
[PROOF STEP]
with A1
[PROOF STATE]
proof (chain)
picking this:
z < b_least2 f x y
b_least2 f x y \<le> y
[PROOF STEP]
have S1: "z < y"
[PROOF STATE]
proof (prove)
using this:
z < b_least2 f x y
b_least2 f x y \<le> y

goal (1 subgoal):
 1. z < y
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
z < y

goal (1 subgoal):
 1. z < b_least2 f x y \<Longrightarrow> f x z = 0
[PROOF STEP]
with A1
[PROOF STATE]
proof (chain)
picking this:
z < b_least2 f x y
z < y
[PROOF STEP]
have " z < (Least (%z. z = y \<or> (z < y \<and> (f x z) \<noteq> 0)))"
[PROOF STATE]
proof (prove)
using this:
z < b_least2 f x y
z < y

goal (1 subgoal):
 1. z < (LEAST z. z = y \<or> z < y \<and> f x z \<noteq> 0)
[PROOF STEP]
by (simp add: b_least2_def)
[PROOF STATE]
proof (state)
this:
z < (LEAST z. z = y \<or> z < y \<and> f x z \<noteq> 0)

goal (1 subgoal):
 1. z < b_least2 f x y \<Longrightarrow> f x z = 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
z < (LEAST z. z = y \<or> z < y \<and> f x z \<noteq> 0)
[PROOF STEP]
have "\<not> (z = y \<or> (z < y \<and> (f x z) \<noteq> 0))"
[PROOF STATE]
proof (prove)
using this:
z < (LEAST z. z = y \<or> z < y \<and> f x z \<noteq> 0)

goal (1 subgoal):
 1. \<not> (z = y \<or> z < y \<and> f x z \<noteq> 0)
[PROOF STEP]
by (rule not_less_Least)
[PROOF STATE]
proof (state)
this:
\<not> (z = y \<or> z < y \<and> f x z \<noteq> 0)

goal (1 subgoal):
 1. z < b_least2 f x y \<Longrightarrow> f x z = 0
[PROOF STEP]
with S1
[PROOF STATE]
proof (chain)
picking this:
z < y
\<not> (z = y \<or> z < y \<and> f x z \<noteq> 0)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
z < y
\<not> (z = y \<or> z < y \<and> f x z \<noteq> 0)

goal (1 subgoal):
 1. f x z = 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f x z = 0

goal:
No subgoals!
[PROOF STEP]
qed