[STATEMENT]
theorem "\<exists>(x::int) y. 0 < x  & 0 \<le> y  & 3 * x - 5 * y = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x y. 0 < x \<and> 0 \<le> y \<and> 3 * x - 5 * y = 1
[PROOF STEP]
by presburger


[STATEMENT]
lemma iMODb_mod_0_card: "card [r, mod 0, c] = Suc 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card [ r, mod 0, c ] = Suc 0
[PROOF STEP]
by (simp add: iMODb_mod_0 iIN_card)


[STATEMENT]
lemma odd_le_div2_imp_le_times_2: "(m+1) div 2 < (Suc n) \<and> ((m::nat) mod 2 \<noteq> 0) \<Longrightarrow> m \<le> 2*n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (m + 1) div 2 < Suc n \<and> m mod 2 \<noteq> 0 \<Longrightarrow> m \<le> 2 * n
[PROOF STEP]
by arith


[STATEMENT]
lemma "\<forall>(x::'a::linordered_field) y. x \<noteq> y \<and> 5 * x \<le> y \<longrightarrow> 500 * x \<le> 100 * y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. x \<noteq> y \<and> (5::'a) * x \<le> y \<longrightarrow> (500::'a) * x \<le> (100::'a) * y
[PROOF STEP]
by ferrack


[STATEMENT]
lemma (in Module) l_comb_Suc:"\<lbrakk>H \<subseteq> carrier M; ideal R A;
       s \<in> {j. j \<le> (Suc n)} \<rightarrow> carrier R; f \<in> {j. j \<le> (Suc n)} \<rightarrow> H\<rbrakk>  \<Longrightarrow>
       l_comb R M (Suc n) s f = l_comb R M n s f \<plusminus> s (Suc n) \<cdot>\<^sub>s f (Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<subseteq> carrier M; ideal R A; s \<in> {j. j \<le> Suc n} \<rightarrow> carrier R; f \<in> {j. j \<le> Suc n} \<rightarrow> H\<rbrakk> \<Longrightarrow> l_comb R M (Suc n) s f = l_comb R M n s f \<plusminus> s (Suc n) \<cdot>\<^sub>s f (Suc n)
[PROOF STEP]
apply (simp add:l_comb_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma has_integral_cexp_minus_to_infinity:
  fixes a::complex\<comment>\<open>TODO: generalize\<close>
  assumes a: "0 < Re a"
  shows "((\<lambda>x. exp (x *\<^sub>R - a)) has_integral exp (c *\<^sub>R - a) / a) {c..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. exp (x *\<^sub>R - a)) has_integral exp (c *\<^sub>R - a) / a) {c..}
[PROOF STEP]
using integral_cexp_minus_to_infinity[OF assms]
    integrable_on_cexp_minus_to_infinity[OF assms]
[PROOF STATE]
proof (prove)
using this:
integral {?c..} (\<lambda>x. exp (x *\<^sub>R - a)) = exp (?c *\<^sub>R - a) / a
(\<lambda>x. exp (x *\<^sub>R - a)) integrable_on {?c..}

goal (1 subgoal):
 1. ((\<lambda>x. exp (x *\<^sub>R - a)) has_integral exp (c *\<^sub>R - a) / a) {c..}
[PROOF STEP]
using has_integral_integrable_integral
[PROOF STATE]
proof (prove)
using this:
integral {?c..} (\<lambda>x. exp (x *\<^sub>R - a)) = exp (?c *\<^sub>R - a) / a
(\<lambda>x. exp (x *\<^sub>R - a)) integrable_on {?c..}
(?f has_integral ?i) ?s = (?f integrable_on ?s \<and> integral ?s ?f = ?i)

goal (1 subgoal):
 1. ((\<lambda>x. exp (x *\<^sub>R - a)) has_integral exp (c *\<^sub>R - a) / a) {c..}
[PROOF STEP]
by blast


[STATEMENT]
lemma minus_1_power_even: "(- (1 :: 'b :: comm_ring_1))^ k = (if even k then 1 else (-1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- (1::'b)) ^ k = (if even k then 1::'b else - (1::'b))
[PROOF STEP]
by auto


[STATEMENT]
lemma f_Exec_Stream_Init_nth_Plus1_calc: "
  n < length xs \<Longrightarrow>
  f_Exec_Comp_Stream_Init trans_fun xs c ! (n + 1)=
  trans_fun (xs ! n) (f_Exec_Comp_Stream_Init trans_fun xs c ! n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < length xs \<Longrightarrow> f_Exec_Comp_Stream_Init trans_fun xs c ! (n + 1) = trans_fun (xs ! n) (f_Exec_Comp_Stream_Init trans_fun xs c ! n)
[PROOF STEP]
by (simp add: f_Exec_Stream_Init_nth_Suc_calc)


[STATEMENT]
lemma all_pairs: "\<forall> (x,y) \<in> (set xs \<times> set xs). (x,y) \<in> set (all_pairs xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>(x, y)\<in>set xs \<times> set xs. (x, y) \<in> set (all_pairs xs)
[PROOF STEP]
by(simp add: all_pairs_list_product)


[STATEMENT]
lemma bernoulli_denom_pos: "bernoulli_denom n > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < bernoulli_denom n
[PROOF STEP]
by (auto simp: bernoulli_denom_def intro!: prod_pos)


[STATEMENT]
lemma ipt_ipvange_to_cidr: "ipcidr_union_set (set (ipt_iprange_to_cidr ips)) = (ipt_iprange_to_set ips)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ipcidr_union_set (set (ipt_iprange_to_cidr ips)) = ipt_iprange_to_set ips
[PROOF STEP]
apply(simp add: ipt_iprange_to_cidr_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ipcidr_union_set (set (cidr_split (iprange_interval (ipt_iprange_to_interval ips)))) = ipt_iprange_to_set ips
[PROOF STEP]
apply(simp add: ipcidr_union_set_uncurry)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (uncurry ipset_from_cidr ` set (cidr_split (iprange_interval (ipt_iprange_to_interval ips)))) = ipt_iprange_to_set ips
[PROOF STEP]
apply(case_tac "(ipt_iprange_to_interval ips)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. ipt_iprange_to_interval ips = (a, b) \<Longrightarrow> \<Union> (uncurry ipset_from_cidr ` set (cidr_split (iprange_interval (ipt_iprange_to_interval ips)))) = ipt_iprange_to_set ips
[PROOF STEP]
apply(simp add: ipt_iprange_to_interval cidr_split_prefix_single)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma degree_coefficients: "degree p = length (coefficients p) - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Reflected_Multivariate_Polynomial.degree p = length (coefficients p) - 1
[PROOF STEP]
by (induct p rule: degree.induct) auto


[STATEMENT]
lemma finite_lattice_complete_Inf_empty: "Inf {} = (top :: 'a::finite_lattice_complete)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf {} = top
[PROOF STEP]
by (simp add: Inf_def)


[STATEMENT]
lemma union_diff_sup_eq_inter:
  "A + B - A \<union># B = A \<inter># B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A + B - A \<union># B = A \<inter># B
[PROOF STEP]
by (auto simp add: multiset_eq_iff)


[STATEMENT]
lemma (in disc_filtr_prob_space) borel_predict_stoch_proc_borel_measurable:
  assumes "borel_predict_stoch_proc F X"
  shows "\<forall>n. (X n) \<in> borel_measurable M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. random_variable borel (X n)
[PROOF STEP]
using assms predictable_is_dsp
[PROOF STATE]
proof (prove)
using this:
borel_predict_stoch_proc F X
predict_stoch_proc F ?X ?N \<Longrightarrow> ?X \<in> stoch_procs M ?N

goal (1 subgoal):
 1. \<forall>n. random_variable borel (X n)
[PROOF STEP]
unfolding stoch_procs_def
[PROOF STATE]
proof (prove)
using this:
borel_predict_stoch_proc F X
predict_stoch_proc F ?X ?N \<Longrightarrow> ?X \<in> {X. \<forall>t. random_variable ?N (X t)}

goal (1 subgoal):
 1. \<forall>n. random_variable borel (X n)
[PROOF STEP]
by auto


[STATEMENT]
lemma sqrt_sqrt[simp]: "x \<ge> 0 \<Longrightarrow> sqrt x * sqrt x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> x \<Longrightarrow> sqrt x * sqrt x = x
[PROOF STEP]
by (metis real_sqrt_pow2 power2_eq_square)


[STATEMENT]
lemma "mono_on UNIV (bool_fun_threshold n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono (bool_fun_threshold n)
[PROOF STEP]
by (meson mono_onI monotone_bool_fun_def monotone_threshold)


[STATEMENT]
lemma prime_factorization_int:
    "n > (0::int) \<Longrightarrow> n = (\<Prod>p \<in> prime_factors n. p ^ multiplicity p n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> n = (\<Prod>p\<in>prime_factors n. p ^ multiplicity p n)
[PROOF STEP]
by (simp add: prod_prime_factors)


[STATEMENT]
theorem p23: "(\<forall>x::'a. p \<or> F(x)) \<longleftrightarrow> (p \<or> (\<forall>x. F(x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. p \<or> F x) = (p \<or> (\<forall>x. F x))
[PROOF STEP]
by auto2


[STATEMENT]
lemma nat_grSuc0_conv: "(Suc 0 < n) = (n \<noteq> 0 \<and> n \<noteq> Suc 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Suc 0 < n) = (n \<noteq> 0 \<and> n \<noteq> Suc 0)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma repeat_mset_cancel1: "repeat_mset a A = repeat_mset a B \<longleftrightarrow> A = B \<or> a = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (repeat_mset a A = repeat_mset a B) = (A = B \<or> a = 0)
[PROOF STEP]
by (auto simp: multiset_eq_iff)


[STATEMENT]
theorem wls_vsubst_Op_simp[simp]:
assumes "wlsInp delta inp" and "wlsBinp delta binp"
shows
"((Op delta inp binp) #[y1 // y]_ys) =
 Op delta (inp %[y1 // y]_ys) (binp %%[y1 // y]_ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Op delta inp binp #[y1 // y]_ys = Op delta (inp %[y1 // y]_ys) (binp %%[y1 // y]_ys)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wlsInp delta inp
wlsBinp delta binp

goal (1 subgoal):
 1. Op delta inp binp #[y1 // y]_ys = Op delta (inp %[y1 // y]_ys) (binp %%[y1 // y]_ys)
[PROOF STEP]
unfolding vsubst_def vsubstInp_def
                      vsubstAbs_def vsubstBinp_def
[PROOF STATE]
proof (prove)
using this:
wlsInp delta inp
wlsBinp delta binp

goal (1 subgoal):
 1. Op delta inp binp #[Var ys y1 / y]_ys = Op delta (inp %[Var ys y1 / y]_ys) (binp %%[Var ys y1 / y]_ys)
[PROOF STEP]
by simp


[STATEMENT]
lemma Re_complex_div_lemma: "0 < Re((1 - \<i>*z) / (1 + \<i>*z)) \<longleftrightarrow> norm z < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 < Re ((1 - \<i> * z) / (1 + \<i> * z))) = (cmod z < 1)
[PROOF STEP]
by (simp add: Re_complex_div_gt_0 algebra_simps cmod_def power2_eq_square)


[STATEMENT]
lemma affine_alt: "affine s \<longleftrightarrow> (\<forall>x\<in>s. \<forall>y\<in>s. \<forall>u::real. (1 - u) *\<^sub>R x + u *\<^sub>R y \<in> s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. affine s = (\<forall>x\<in>s. \<forall>y\<in>s. \<forall>u. (1 - u) *\<^sub>R x + u *\<^sub>R y \<in> s)
[PROOF STEP]
unfolding affine_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>s. \<forall>y\<in>s. \<forall>u v. u + v = 1 \<longrightarrow> u *\<^sub>R x + v *\<^sub>R y \<in> s) = (\<forall>x\<in>s. \<forall>y\<in>s. \<forall>u. (1 - u) *\<^sub>R x + u *\<^sub>R y \<in> s)
[PROOF STEP]
by (metis eq_diff_eq')


[STATEMENT]
lemma not_Infinitesimal_not_zero: "x \<notin> Infinitesimal \<Longrightarrow> x \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> Infinitesimal \<Longrightarrow> x \<noteq> 0
[PROOF STEP]
by auto


[STATEMENT]
lemma of_nat_and_eq:
  \<open>of_nat (m AND n) = of_nat m AND of_nat n\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat (m AND n) = of_nat m AND of_nat n
[PROOF STEP]
by (rule bit_eqI) (simp add: bit_of_nat_iff bit_and_iff Bit_Operations.bit_and_iff)


[STATEMENT]
lemma intpow_plus: "x > 0 \<Longrightarrow> x ^\<^sub>Z (m + n) = x ^\<^sub>Z m * x ^\<^sub>Z n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < x \<Longrightarrow> x ^\<^sub>Z (m + n) = x ^\<^sub>Z m * x ^\<^sub>Z n
[PROOF STEP]
apply (simp add: intpow_def field_simps power_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < x \<Longrightarrow> (m < 0 \<longrightarrow> (n < 0 \<longrightarrow> x ^ nat (- m) * x ^ nat (- n) = x ^ nat (- m - n)) \<and> (\<not> n < 0 \<longrightarrow> (m + n < 0 \<longrightarrow> x ^ nat (- m) = x ^ nat n * x ^ nat (- m - n)) \<and> (\<not> m + n < 0 \<longrightarrow> x ^ nat (- m) * x ^ nat (m + n) = x ^ nat n))) \<and> (\<not> m < 0 \<longrightarrow> (n < 0 \<longrightarrow> (m + n < 0 \<longrightarrow> x ^ nat (- n) = x ^ nat m * x ^ nat (- m - n)) \<and> (\<not> m + n < 0 \<longrightarrow> x ^ nat (- n) * x ^ nat (m + n) = x ^ nat m)) \<and> (\<not> n < 0 \<longrightarrow> x ^ nat (m + n) = x ^ nat m * x ^ nat n))
[PROOF STEP]
apply (metis (no_types, opaque_lifting) abs_ge_zero add.commute add_diff_cancel_right' nat_add_distrib power_add uminus_add_conv_diff zabs_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma Erdos_Rado_sunflower_nonempty_core:
  assumes "finite E"
    and "\<forall> A \<in> F. A \<subseteq> E \<and> card A \<le> k"
    and "{} \<notin> F"
    and "card F > card E * (r - 1)^k * fact k"
  shows "\<exists> S. S \<subseteq> F \<and> sunflower S \<and> card S = r \<and> \<Inter> S \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>S\<subseteq>F. sunflower S \<and> card S = r \<and> \<Inter> S \<noteq> {}
[PROOF STEP]
by (rule sunflower_nonempty_core_lift[OF assms(1)
      _ assms(2-3), of "(r - 1)^k * fact k"],
      rule Erdos_Rado_sunflower, insert assms(4), auto simp: ac_simps)


[STATEMENT]
lemma (in field) nth_el_Cons: "nth_el (x # xs) n = (if n = 0 then x else nth_el xs (n - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nth_el (x # xs) n = (if n = 0 then x else nth_el xs (n - 1))
[PROOF STEP]
by (cases n) simp_all


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


[STATEMENT]
lemma (in aGroup) ag_add4_rel:"\<lbrakk>a \<in> carrier A; b \<in> carrier A; c \<in> carrier A;
 d \<in> carrier A \<rbrakk> \<Longrightarrow> a \<plusminus> b \<plusminus> (c \<plusminus> d) =  a \<plusminus> c \<plusminus> (b \<plusminus> d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier A; b \<in> carrier A; c \<in> carrier A; d \<in> carrier A\<rbrakk> \<Longrightarrow> a \<plusminus> b \<plusminus> (c \<plusminus> d) = a \<plusminus> c \<plusminus> (b \<plusminus> d)
[PROOF STEP]
apply (simp add:pOp_assocTr43[of "a" "b" "c" "d"],
       simp add:ag_pOp_commute[of "b" "c"],
       simp add:pOp_assocTr43[THEN sym, of "a" "c" "b" "d"])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in CRR_market) stock_cond_exp:
  assumes "N = bernoulli_stream q"
  and "0 < q"
  and "q < 1"
shows "real_cond_exp N (stoch_proc_filt N geom_proc borel n) (geom_proc (Suc n)) w = expl_cond_expect N (proj_stoch_proc geom_proc n) (geom_proc (Suc n)) w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_cond_exp N (stoch_proc_filt N geom_proc borel n) (geom_proc (Suc n)) w = expl_cond_expect N (proj_stoch_proc geom_proc n) (geom_proc (Suc n)) w
[PROOF STEP]
proof (rule bernoulli_cond_exp)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. N = bernoulli_stream ?q
 2. 0 < ?q
 3. ?q < 1
 4. integrable N (geom_proc (Suc n))
[PROOF STEP]
show "integrable N (geom_proc (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable N (geom_proc (Suc n))
[PROOF STEP]
using assms geom_proc_integrable[of N q "Suc n"]
[PROOF STATE]
proof (prove)
using this:
N = bernoulli_stream q
0 < q
q < 1
\<lbrakk>N = bernoulli_stream q; 0 \<le> q; q \<le> 1\<rbrakk> \<Longrightarrow> integrable N (geom_proc (Suc n))

goal (1 subgoal):
 1. integrable N (geom_proc (Suc n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
integrable N (geom_proc (Suc n))

goal (3 subgoals):
 1. N = bernoulli_stream ?q
 2. 0 < ?q
 3. ?q < 1
[PROOF STEP]
qed (auto simp add: assms)


[STATEMENT]
lemma bin_rl_eqI: "\<lbrakk>(\<lambda>k::int. k div 2) x = (\<lambda>k::int. k div 2) y; odd x = odd y\<rbrakk> \<Longrightarrow> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x div 2 = y div 2; odd x = odd y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
by (auto elim: oddE)


[STATEMENT]
lemma Im_Arccos: "Im(Arccos z) = - ln (cmod (z + \<i> * csqrt (1 - z\<^sup>2)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Im (Arccos z) = - ln (cmod (z + \<i> * csqrt (1 - z\<^sup>2)))
[PROOF STEP]
by (simp add: Arccos_def Arccos_body_lemma)


[STATEMENT]
lemma from_nat_0: "from_nat 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.from_nat 0 = (0::'a)
[PROOF STEP]
unfolding from_nat_def o_def of_nat_0 Abs'_def mod_0 zero_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs 0 = Abs 0
[PROOF STEP]
..


[STATEMENT]
lemma ipt_tcp_flags_Any_isUNIV: "fmask = {} \<and> c = {} \<longleftrightarrow> (\<forall>pkt. match_tcp_flags (TCP_Flags fmask c) pkt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fmask = {} \<and> c = {}) = (\<forall>pkt. match_tcp_flags (TCP_Flags fmask c) pkt)
[PROOF STEP]
by auto


[STATEMENT]
lemma mult_left_assoc: "\<lbrakk> a \<in> R; b \<in> R; c \<in> R \<rbrakk> \<Longrightarrow> b \<cdot> (a \<cdot> c) = a \<cdot> (b \<cdot> c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> R; b \<in> R; c \<in> R\<rbrakk> \<Longrightarrow> b \<cdot> (a \<cdot> c) = a \<cdot> (b \<cdot> c)
[PROOF STEP]
using comm_mult multiplicative.associative
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in> R; ?b \<in> R\<rbrakk> \<Longrightarrow> ?a \<cdot> ?b = ?b \<cdot> ?a
\<lbrakk>?a \<in> R; ?b \<in> R; ?c \<in> R\<rbrakk> \<Longrightarrow> ?a \<cdot> ?b \<cdot> ?c = ?a \<cdot> (?b \<cdot> ?c)

goal (1 subgoal):
 1. \<lbrakk>a \<in> R; b \<in> R; c \<in> R\<rbrakk> \<Longrightarrow> b \<cdot> (a \<cdot> c) = a \<cdot> (b \<cdot> c)
[PROOF STEP]
by auto


[STATEMENT]
lemma eliminate_entries_i: assumes
  vs: "\<And> j. j < dim_row B' \<Longrightarrow> R (vs (integer_of_nat j)) (vs' j)"
  and i: "i < dim_row B'"
  and B: "mat_rel R B B'"
  shows "mat_rel R (eliminate_entries_i ops vs B i j)
    (eliminate_entries vs' B' i j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_rel R (eliminate_entries_i ops vs B i j) (eliminate_entries vs' B' i j)
[PROOF STEP]
unfolding eliminate_entries_i_def eliminate_entries_gen_zero[OF B i]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_rel R (eliminate_entries_gen (arith_ops_record.minus ops) (arith_ops_record.times ops) (vs \<circ> integer_of_nat) B i j) (eliminate_entries vs' B' i j)
[PROOF STEP]
by (rule eliminate_entries_gen_transfer, insert assms, auto simp: plus times minus)


[STATEMENT]
lemma unit_ball_vol_odd':
        "unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)"
  and unit_ball_vol_odd:
        "unit_ball_vol (real (2 * n + 1)) =
           (2 ^ (2 * Suc n) * fact (Suc n)) / fact (2 * Suc n) * pi ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n) &&& unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
 2. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
have "unit_ball_vol (real (2 * n + 1)) =
          pi powr (real n + 1 / 2) / Gamma (1 / 2 + real (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = pi powr (real n + 1 / 2) / Gamma (1 / 2 + real (Suc n))
[PROOF STEP]
by (simp add: unit_ball_vol_def field_simps)
[PROOF STATE]
proof (state)
this:
unit_ball_vol (real (2 * n + 1)) = pi powr (real n + 1 / 2) / Gamma (1 / 2 + real (Suc n))

goal (2 subgoals):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
 2. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
unit_ball_vol (real (2 * n + 1)) = pi powr (real n + 1 / 2) / Gamma (1 / 2 + real (Suc n))

goal (2 subgoals):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
 2. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
have "pochhammer (1 / 2) (Suc n) = Gamma (1 / 2 + real (Suc n)) / Gamma (1 / 2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer (1 / 2) (Suc n) = Gamma (1 / 2 + real (Suc n)) / Gamma (1 / 2)
[PROOF STEP]
by (intro pochhammer_Gamma) auto
[PROOF STATE]
proof (state)
this:
pochhammer (1 / 2) (Suc n) = Gamma (1 / 2 + real (Suc n)) / Gamma (1 / 2)

goal (2 subgoals):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
 2. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
hence "Gamma (1 / 2 + real (Suc n)) = sqrt pi * pochhammer (1 / 2) (Suc n)"
[PROOF STATE]
proof (prove)
using this:
pochhammer (1 / 2) (Suc n) = Gamma (1 / 2 + real (Suc n)) / Gamma (1 / 2)

goal (1 subgoal):
 1. Gamma (1 / 2 + real (Suc n)) = sqrt pi * pochhammer (1 / 2) (Suc n)
[PROOF STEP]
by (simp add: Gamma_one_half_real)
[PROOF STATE]
proof (state)
this:
Gamma (1 / 2 + real (Suc n)) = sqrt pi * pochhammer (1 / 2) (Suc n)

goal (2 subgoals):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
 2. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Gamma (1 / 2 + real (Suc n)) = sqrt pi * pochhammer (1 / 2) (Suc n)

goal (2 subgoals):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
 2. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
have "pi powr (real n + 1 / 2) / \<dots> = pi ^ n / pochhammer (1 / 2) (Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pi powr (real n + 1 / 2) / (sqrt pi * pochhammer (1 / 2) (Suc n)) = pi ^ n / pochhammer (1 / 2) (Suc n)
[PROOF STEP]
by (simp add: powr_add powr_half_sqrt powr_realpow)
[PROOF STATE]
proof (state)
this:
pi powr (real n + 1 / 2) / (sqrt pi * pochhammer (1 / 2) (Suc n)) = pi ^ n / pochhammer (1 / 2) (Suc n)

goal (2 subgoals):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
 2. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
[PROOF STEP]
show "unit_ball_vol (real (2 * n + 1)) = \<dots>"
[PROOF STATE]
proof (prove)
using this:
unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)

goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)

goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
unit_ball_vol (real (2 * n + 1)) = pi ^ n / pochhammer (1 / 2) (Suc n)

goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
have "pochhammer (1 / 2 :: real) (Suc n) =
               fact (2 * Suc n) / (2 ^ (2 * Suc n) * fact (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pochhammer (1 / 2) (Suc n) = fact (2 * Suc n) / (2 ^ (2 * Suc n) * fact (Suc n))
[PROOF STEP]
using fact_double[of "Suc n", where ?'a = real]
[PROOF STATE]
proof (prove)
using this:
fact (2 * Suc n) = 2 ^ (2 * Suc n) * pochhammer (1 / 2) (Suc n) * fact (Suc n)

goal (1 subgoal):
 1. pochhammer (1 / 2) (Suc n) = fact (2 * Suc n) / (2 ^ (2 * Suc n) * fact (Suc n))
[PROOF STEP]
by (simp add: divide_simps mult_ac)
[PROOF STATE]
proof (state)
this:
pochhammer (1 / 2) (Suc n) = fact (2 * Suc n) / (2 ^ (2 * Suc n) * fact (Suc n))

goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
pochhammer (1 / 2) (Suc n) = fact (2 * Suc n) / (2 ^ (2 * Suc n) * fact (Suc n))

goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
have "pi ^n / \<dots> = (2 ^ (2 * Suc n) * fact (Suc n)) / fact (2 * Suc n) * pi ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pi ^ n / (fact (2 * Suc n) / (2 ^ (2 * Suc n) * fact (Suc n))) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
pi ^ n / (fact (2 * Suc n) / (2 ^ (2 * Suc n) * fact (Suc n))) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n

goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
show "unit_ball_vol (real (2 * n + 1)) = \<dots>"
[PROOF STATE]
proof (prove)
using this:
unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n

goal (1 subgoal):
 1. unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
unit_ball_vol (real (2 * n + 1)) = 2 ^ (2 * Suc n) * fact (Suc n) / fact (2 * Suc n) * pi ^ n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "mat_delete_index":
  assumes A: "A \<in> carrier_mat (Suc n) (Suc n)"
      and i: "i < Suc n" and j: "j < Suc n"
      and i': "i' < n" and j': "j' < n"
  shows "A $$ (insert_index i i', insert_index j j') = mat_delete A i j $$ (i', j')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $$ (insert_index i i', insert_index j j') = mat_delete A i j $$ (i', j')
[PROOF STEP]
unfolding mat_delete_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $$ (insert_index i i', insert_index j j') = mat (dim_row A - 1) (dim_col A - 1) (\<lambda>(i', j'). A $$ (if i' < i then i' else Suc i', if j' < j then j' else Suc j')) $$ (i', j')
[PROOF STEP]
unfolding permutation_insert_expand
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $$ (insert_index i i', insert_index j j') = mat (dim_row A - 1) (dim_col A - 1) (\<lambda>(i', j'). A $$ (if i' < i then i' else Suc i', if j' < j then j' else Suc j')) $$ (i', j')
[PROOF STEP]
unfolding insert_index_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $$ (if i' < i then i' else Suc i', if j' < j then j' else Suc j') = mat (dim_row A - 1) (dim_col A - 1) (\<lambda>(i', j'). A $$ (if i' < i then i' else Suc i', if j' < j then j' else Suc j')) $$ (i', j')
[PROOF STEP]
using A i j i' j'
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat (Suc n) (Suc n)
i < Suc n
j < Suc n
i' < n
j' < n

goal (1 subgoal):
 1. A $$ (if i' < i then i' else Suc i', if j' < j then j' else Suc j') = mat (dim_row A - 1) (dim_col A - 1) (\<lambda>(i', j'). A $$ (if i' < i then i' else Suc i', if j' < j then j' else Suc j')) $$ (i', j')
[PROOF STEP]
by auto


[STATEMENT]
lemma gbinomial_asymptotic:
  fixes z :: "'a :: Gamma"
  shows "(\<lambda>n. (z gchoose n) / ((-1)^n / exp ((z+1) * of_real (ln (real n))))) \<longlonglongrightarrow>
           inverse (Gamma (- z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (z gchoose n) / ((- (1::'a)) ^ n / exp ((z + (1::'a)) * of_real (ln (real n))))) \<longlonglongrightarrow> inverse (Gamma (- z))
[PROOF STEP]
unfolding rGamma_inverse_Gamma [symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (z gchoose n) / ((- (1::'a)) ^ n / exp ((z + (1::'a)) * of_real (ln (real n))))) \<longlonglongrightarrow> rGamma (- z)
[PROOF STEP]
using Gamma_gbinomial[of "-z-1"]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. (- z - (1::'a) + of_nat n gchoose n) * exp (- (- z - (1::'a)) * of_real (ln (real n)))) \<longlonglongrightarrow> rGamma (- z - (1::'a) + (1::'a))

goal (1 subgoal):
 1. (\<lambda>n. (z gchoose n) / ((- (1::'a)) ^ n / exp ((z + (1::'a)) * of_real (ln (real n))))) \<longlonglongrightarrow> rGamma (- z)
[PROOF STEP]
by (subst (asm) gbinomial_minus')
     (simp add: add_ac mult_ac divide_inverse power_inverse [symmetric])


[STATEMENT]
lemma matrix_mult_dot: "A *v x = (\<chi> i. inner (A$i) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A *v x = (\<chi>i. A $ i \<bullet> x)
[PROOF STEP]
by (simp add: matrix_vector_mult_def inner_vec_def)


[STATEMENT]
lemma gbinomial_absorption: "of_nat (Suc k) * (a gchoose Suc k) = a * ((a - 1) gchoose k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat (Suc k) * (a gchoose Suc k) = a * (a - (1::'a) gchoose k)
[PROOF STEP]
using gbinomial_absorption'[of "Suc k" a]
[PROOF STATE]
proof (prove)
using this:
0 < Suc k \<Longrightarrow> a gchoose Suc k = a / of_nat (Suc k) * (a - (1::'a) gchoose (Suc k - 1))

goal (1 subgoal):
 1. of_nat (Suc k) * (a gchoose Suc k) = a * (a - (1::'a) gchoose k)
[PROOF STEP]
by (simp add: field_simps del: of_nat_Suc)


[STATEMENT]
lemma has_integral_null_interval: fixes a b :: real and f::"real \<Rightarrow> real" assumes "a \<ge> b"
  shows "(f has_integral 0) {a..b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral 0) {a..b}
[PROOF STEP]
using assms content_real_eq_0
[PROOF STATE]
proof (prove)
using this:
b \<le> a
(content {?a..?b} = 0) = (?b \<le> ?a)

goal (1 subgoal):
 1. (f has_integral 0) {a..b}
[PROOF STEP]
by blast


[STATEMENT]
lemma module_hom_sum: "(\<And>i. i \<in> I \<Longrightarrow> module_hom s1 s2 (f i)) \<Longrightarrow> (I = {} \<Longrightarrow> module s1 \<and> module s2) \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>I. f i x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>i. i \<in> I \<Longrightarrow> module_hom s1 s2 (f i); I = {} \<Longrightarrow> module s1 \<and> module s2\<rbrakk> \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>I. f i x)
[PROOF STEP]
apply (induction I rule: infinite_finite_induct)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>A. \<lbrakk>infinite A; \<And>i. i \<in> A \<Longrightarrow> module_hom s1 s2 (f i); A = {} \<Longrightarrow> module s1 \<and> module s2\<rbrakk> \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>A. f i x)
 2. \<lbrakk>\<And>i. i \<in> {} \<Longrightarrow> module_hom s1 s2 (f i); {} = {} \<Longrightarrow> module s1 \<and> module s2\<rbrakk> \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>{}. f i x)
 3. \<And>x F. \<lbrakk>finite F; x \<notin> F; \<lbrakk>\<And>i. i \<in> F \<Longrightarrow> module_hom s1 s2 (f i); F = {} \<Longrightarrow> module s1 \<and> module s2\<rbrakk> \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>F. f i x); \<And>i. i \<in> insert x F \<Longrightarrow> module_hom s1 s2 (f i); insert x F = {} \<Longrightarrow> module s1 \<and> module s2\<rbrakk> \<Longrightarrow> module_hom s1 s2 (\<lambda>xa. \<Sum>i\<in>insert x F. f i xa)
[PROOF STEP]
apply (auto intro!: module_hom_zero module_hom_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (F = {} \<Longrightarrow> module s1 \<and> module s2) \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>F. f i x); \<And>i. i = x \<or> i \<in> F \<Longrightarrow> module_hom s1 s2 (f i)\<rbrakk> \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>F. f i x)
[PROOF STEP]
using m1.module_axioms m2.module_axioms
[PROOF STATE]
proof (prove)
using this:
module s1
module s2

goal (1 subgoal):
 1. \<And>x F. \<lbrakk>finite F; x \<notin> F; (F = {} \<Longrightarrow> module s1 \<and> module s2) \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>F. f i x); \<And>i. i = x \<or> i \<in> F \<Longrightarrow> module_hom s1 s2 (f i)\<rbrakk> \<Longrightarrow> module_hom s1 s2 (\<lambda>x. \<Sum>i\<in>F. f i x)
[PROOF STEP]
by blast


[STATEMENT]
lemma (in Group) Qg_tassocTr:
  "\<lbrakk>G \<triangleright> N; a \<in> carrier G; b \<in> carrier G; c \<in> carrier G \<rbrakk> \<Longrightarrow>
   c_top G N (N \<bullet> a) (c_top G N (N \<bullet> b) (N \<bullet> c)) =
                           c_top G N (c_top G N (N \<bullet> a) (N \<bullet> b)) (N \<bullet> c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<triangleright> N; a \<in> carrier G; b \<in> carrier G; c \<in> carrier G\<rbrakk> \<Longrightarrow> c_top G N (N \<bullet> a) (c_top G N (N \<bullet> b) (N \<bullet> c)) = c_top G N (c_top G N (N \<bullet> a) (N \<bullet> b)) (N \<bullet> c)
[PROOF STEP]
apply (frule mult_closed[of "b" "c"], assumption+,
       frule mult_closed[of "a" "b"], assumption+,
       simp add:c_top_welldef[THEN sym])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<triangleright> N; a \<in> carrier G; b \<in> carrier G; c \<in> carrier G; b \<cdot> c \<in> carrier G; a \<cdot> b \<in> carrier G\<rbrakk> \<Longrightarrow> N \<bullet> (a \<cdot> (b \<cdot> c)) = N \<bullet> (a \<cdot> b \<cdot> c)
[PROOF STEP]
apply (simp add:tassoc)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in finite_product_sigma_finite) measure_times:
  "(\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I A) = (\<Prod>i\<in>I. emeasure (M i) (A i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I A) = (\<Prod>i\<in>I. emeasure (M i) (A i))
[PROOF STEP]
using emeasure_PiM[OF finite_index]
[PROOF STATE]
proof (prove)
using this:
(\<And>i. i \<in> I \<Longrightarrow> ?A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I ?A) = (\<Prod>i\<in>I. emeasure (M i) (?A i))

goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> A i \<in> sets (M i)) \<Longrightarrow> emeasure (Pi\<^sub>M I M) (Pi\<^sub>E I A) = (\<Prod>i\<in>I. emeasure (M i) (A i))
[PROOF STEP]
by auto


[STATEMENT]
lemma disjointD:
  "disjoint A \<Longrightarrow> a \<in> A \<Longrightarrow> b \<in> A \<Longrightarrow> a \<noteq> b \<Longrightarrow> a \<inter> b = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>disjoint A; a \<in> A; b \<in> A; a \<noteq> b\<rbrakk> \<Longrightarrow> a \<inter> b = {}
[PROOF STEP]
unfolding disjoint_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>a\<in>A. \<forall>b\<in>A. a \<noteq> b \<longrightarrow> a \<inter> b = {}; a \<in> A; b \<in> A; a \<noteq> b\<rbrakk> \<Longrightarrow> a \<inter> b = {}
[PROOF STEP]
by auto


[STATEMENT]
lemma real_cond_exp_intA:
  assumes [measurable]: "integrable M f" "A \<in> sets F"
  shows "(\<integral> x \<in> A. f x \<partial>M) = (\<integral>x \<in> A. real_cond_exp M F f x \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_lebesgue_integral M A f = set_lebesgue_integral M A (real_cond_exp M F f)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. set_lebesgue_integral M A f = set_lebesgue_integral M A (real_cond_exp M F f)
[PROOF STEP]
have "A \<in> sets M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<in> sets M
[PROOF STEP]
by (meson assms(2) subalg subalgebra_def subsetD)
[PROOF STATE]
proof (state)
this:
A \<in> sets M

goal (1 subgoal):
 1. set_lebesgue_integral M A f = set_lebesgue_integral M A (real_cond_exp M F f)
[PROOF STEP]
have "integrable M (\<lambda>x. indicator A x * f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable M (\<lambda>x. indicat_real A x * f x)
[PROOF STEP]
using integrable_mult_indicator[OF \<open>A \<in> sets M\<close> assms(1)]
[PROOF STATE]
proof (prove)
using this:
integrable M (\<lambda>x. indicat_real A x *\<^sub>R f x)

goal (1 subgoal):
 1. integrable M (\<lambda>x. indicat_real A x * f x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
integrable M (\<lambda>x. indicat_real A x * f x)

goal (1 subgoal):
 1. set_lebesgue_integral M A f = set_lebesgue_integral M A (real_cond_exp M F f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
integrable M (\<lambda>x. indicat_real A x * f x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
integrable M (\<lambda>x. indicat_real A x * f x)

goal (1 subgoal):
 1. set_lebesgue_integral M A f = set_lebesgue_integral M A (real_cond_exp M F f)
[PROOF STEP]
using real_cond_exp_intg(2)[where ?f = "indicator A" and ?g = f, symmetric]
[PROOF STATE]
proof (prove)
using this:
integrable M (\<lambda>x. indicat_real A x * f x)
\<lbrakk>integrable M (\<lambda>x. indicat_real A x * f x); indicat_real A \<in> borel_measurable F; f \<in> borel_measurable M\<rbrakk> \<Longrightarrow> LINT x|M. indicat_real A x * f x = LINT x|M. indicat_real A x * real_cond_exp M F f x

goal (1 subgoal):
 1. set_lebesgue_integral M A f = set_lebesgue_integral M A (real_cond_exp M F f)
[PROOF STEP]
unfolding set_lebesgue_integral_def
[PROOF STATE]
proof (prove)
using this:
integrable M (\<lambda>x. indicat_real A x * f x)
\<lbrakk>integrable M (\<lambda>x. indicat_real A x * f x); indicat_real A \<in> borel_measurable F; f \<in> borel_measurable M\<rbrakk> \<Longrightarrow> LINT x|M. indicat_real A x * f x = LINT x|M. indicat_real A x * real_cond_exp M F f x

goal (1 subgoal):
 1. LINT x|M. indicat_real A x *\<^sub>R f x = LINT x|M. indicat_real A x *\<^sub>R real_cond_exp M F f x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
set_lebesgue_integral M A f = set_lebesgue_integral M A (real_cond_exp M F f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finiteListDecomposeSet:
  fixes L :: "'a list set"
  assumes "finite L"
  shows "finite {(a, b). \<exists> l. l \<in> L \<and> l = a @ b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {(a, b). \<exists>l. l \<in> L \<and> l = a @ b}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {(a, b). \<exists>l. l \<in> L \<and> l = a @ b}
[PROOF STEP]
have "{(a, b). \<exists> l. l \<in> L \<and> l = a @ b} = (\<Union> l \<in> L. {(a, b). l = a @ b})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(a, b). \<exists>l. l \<in> L \<and> l = a @ b} = (\<Union>l\<in>L. {(a, b). l = a @ b})
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{(a, b). \<exists>l. l \<in> L \<and> l = a @ b} = (\<Union>l\<in>L. {(a, b). l = a @ b})

goal (1 subgoal):
 1. finite {(a, b). \<exists>l. l \<in> L \<and> l = a @ b}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{(a, b). \<exists>l. l \<in> L \<and> l = a @ b} = (\<Union>l\<in>L. {(a, b). l = a @ b})

goal (1 subgoal):
 1. finite {(a, b). \<exists>l. l \<in> L \<and> l = a @ b}
[PROOF STEP]
have "finite (\<Union> l \<in> L. {(a, b). l = a @ b})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (\<Union>l\<in>L. {(a, b). l = a @ b})
[PROOF STEP]
proof (rule finite_UN_I)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. finite L
 2. \<And>l. l \<in> L \<Longrightarrow> finite {(a, b). l = a @ b}
[PROOF STEP]
from \<open>finite L\<close>
[PROOF STATE]
proof (chain)
picking this:
finite L
[PROOF STEP]
show "finite L"
[PROOF STATE]
proof (prove)
using this:
finite L

goal (1 subgoal):
 1. finite L
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
finite L

goal (1 subgoal):
 1. \<And>l. l \<in> L \<Longrightarrow> finite {(a, b). l = a @ b}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>l. l \<in> L \<Longrightarrow> finite {(a, b). l = a @ b}
[PROOF STEP]
fix l
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>l. l \<in> L \<Longrightarrow> finite {(a, b). l = a @ b}
[PROOF STEP]
assume "l \<in> L"
[PROOF STATE]
proof (state)
this:
l \<in> L

goal (1 subgoal):
 1. \<And>l. l \<in> L \<Longrightarrow> finite {(a, b). l = a @ b}
[PROOF STEP]
show "finite {(a, b). l = a @ b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {(a, b). l = a @ b}
[PROOF STEP]
by (rule finiteListDecompose)
[PROOF STATE]
proof (state)
this:
finite {(a, b). l = a @ b}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
finite (\<Union>l\<in>L. {(a, b). l = a @ b})

goal (1 subgoal):
 1. finite {(a, b). \<exists>l. l \<in> L \<and> l = a @ b}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
{(a, b). \<exists>l. l \<in> L \<and> l = a @ b} = (\<Union>l\<in>L. {(a, b). l = a @ b})
finite (\<Union>l\<in>L. {(a, b). l = a @ b})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{(a, b). \<exists>l. l \<in> L \<and> l = a @ b} = (\<Union>l\<in>L. {(a, b). l = a @ b})
finite (\<Union>l\<in>L. {(a, b). l = a @ b})

goal (1 subgoal):
 1. finite {(a, b). \<exists>l. l \<in> L \<and> l = a @ b}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite {(a, b). \<exists>l. l \<in> L \<and> l = a @ b}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma EM_remainder'_combine:
  fixes f :: "real \<Rightarrow> 'a :: banach"
  assumes [continuous_intros]: "continuous_on {a..c} f"
  assumes "a \<le> b" "b \<le> c"
  shows   "EM_remainder' n f a b + EM_remainder' n f b c = EM_remainder' n f a c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. EM_remainder' n f a b + EM_remainder' n f b c = EM_remainder' n f a c
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. EM_remainder' n f a b + EM_remainder' n f b c = EM_remainder' n f a c
[PROOF STEP]
have "integral {a..b} (\<lambda>t. pbernpoly n t *\<^sub>R f t) + integral {b..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t) =
          integral {a..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral {a..b} (\<lambda>t. pbernpoly n t *\<^sub>R f t) + integral {b..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t) = integral {a..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t)
[PROOF STEP]
by (intro Henstock_Kurzweil_Integration.integral_combine assms integrable_EM_remainder')
[PROOF STATE]
proof (state)
this:
integral {a..b} (\<lambda>t. pbernpoly n t *\<^sub>R f t) + integral {b..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t) = integral {a..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t)

goal (1 subgoal):
 1. EM_remainder' n f a b + EM_remainder' n f b c = EM_remainder' n f a c
[PROOF STEP]
from this [symmetric]
[PROOF STATE]
proof (chain)
picking this:
integral {a..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t) = integral {a..b} (\<lambda>t. pbernpoly n t *\<^sub>R f t) + integral {b..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
integral {a..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t) = integral {a..b} (\<lambda>t. pbernpoly n t *\<^sub>R f t) + integral {b..c} (\<lambda>t. pbernpoly n t *\<^sub>R f t)

goal (1 subgoal):
 1. EM_remainder' n f a b + EM_remainder' n f b c = EM_remainder' n f a c
[PROOF STEP]
by (simp add: EM_remainder'_def algebra_simps)
[PROOF STATE]
proof (state)
this:
EM_remainder' n f a b + EM_remainder' n f b c = EM_remainder' n f a c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma order_less_trans: "\<lbrakk> order r; x \<sqsubset>\<^sub>r y; y \<sqsubset>\<^sub>r z \<rbrakk> \<Longrightarrow> x \<sqsubset>\<^sub>r z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>order r; x \<sqsubset>\<^bsub>r\<^esub> y; y \<sqsubset>\<^bsub>r\<^esub> z\<rbrakk> \<Longrightarrow> x \<sqsubset>\<^bsub>r\<^esub> z
[PROOF STEP]
by (unfold order_def lesssub_def) blast


[STATEMENT]
theorem fermat_4:
  assumes ass: "(x::int)^4 + y^4 = z^4"
  shows "x*y*z=0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * y * z = 0
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
let ?g = "gcd x y"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
let ?c = "(z div ?g)^2"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
assume xyz0: "x*y*z \<noteq> 0"
  \<comment> \<open>divide out the g.c.d.\<close>
[PROOF STATE]
proof (state)
this:
x * y * z \<noteq> 0

goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
hence "x \<noteq> 0 \<or> y \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
x * y * z \<noteq> 0

goal (1 subgoal):
 1. x \<noteq> 0 \<or> y \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x \<noteq> 0 \<or> y \<noteq> 0

goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> 0 \<or> y \<noteq> 0
[PROOF STEP]
obtain a b where ab: "x = ?g*a \<and> y = ?g*b \<and> coprime a b"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> 0 \<or> y \<noteq> 0

goal (1 subgoal):
 1. (\<And>a b. x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using gcd_coprime_exists[of x y]
[PROOF STATE]
proof (prove)
using this:
x \<noteq> 0 \<or> y \<noteq> 0
gcd x y \<noteq> 0 \<Longrightarrow> \<exists>a' b'. x = a' * gcd x y \<and> y = b' * gcd x y \<and> coprime a' b'

goal (1 subgoal):
 1. (\<And>a b. x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: mult.commute)
[PROOF STATE]
proof (state)
this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b

goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b

goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
have abc: "a^4 + b^4 = ?c^2 \<and> a*b*?c \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
have zgab: "z^4 = ?g^4 * (a^4+b^4)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
[PROOF STEP]
from ab ass
[PROOF STATE]
proof (chain)
picking this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
x ^ 4 + y ^ 4 = z ^ 4
[PROOF STEP]
have "z^4 = (?g*a)^4+(?g*b)^4"
[PROOF STATE]
proof (prove)
using this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
x ^ 4 + y ^ 4 = z ^ 4

goal (1 subgoal):
 1. z ^ 4 = (gcd x y * a) ^ 4 + (gcd x y * b) ^ 4
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
z ^ 4 = (gcd x y * a) ^ 4 + (gcd x y * b) ^ 4

goal (1 subgoal):
 1. z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
z ^ 4 = (gcd x y * a) ^ 4 + (gcd x y * b) ^ 4

goal (1 subgoal):
 1. z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
[PROOF STEP]
by (simp only: power_mult_distrib distrib_left)
[PROOF STATE]
proof (state)
this:
z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
have cgz: "z^2 = ?c * ?g^2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
[PROOF STEP]
from zgab
[PROOF STATE]
proof (chain)
picking this:
z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
[PROOF STEP]
have "?g^4 dvd z^4"
[PROOF STATE]
proof (prove)
using this:
z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)

goal (1 subgoal):
 1. gcd x y ^ 4 dvd z ^ 4
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
gcd x y ^ 4 dvd z ^ 4

goal (1 subgoal):
 1. z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
[PROOF STEP]
hence "?g dvd z"
[PROOF STATE]
proof (prove)
using this:
gcd x y ^ 4 dvd z ^ 4

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

goal (1 subgoal):
 1. z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
[PROOF STEP]
hence "(z div ?g)*?g = z"
[PROOF STATE]
proof (prove)
using this:
gcd x y dvd z

goal (1 subgoal):
 1. z div gcd x y * gcd x y = z
[PROOF STEP]
by (simp only: ac_simps dvd_mult_div_cancel)
[PROOF STATE]
proof (state)
this:
z div gcd x y * gcd x y = z

goal (1 subgoal):
 1. z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
[PROOF STEP]
with ab
[PROOF STATE]
proof (chain)
picking this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
z div gcd x y * gcd x y = z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
z div gcd x y * gcd x y = z

goal (1 subgoal):
 1. z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
[PROOF STEP]
by (auto simp only: power2_eq_square ac_simps)
[PROOF STATE]
proof (state)
this:
z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
with xyz0
[PROOF STATE]
proof (chain)
picking this:
x * y * z \<noteq> 0
z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
[PROOF STEP]
have c0: "?c\<noteq>0"
[PROOF STATE]
proof (prove)
using this:
x * y * z \<noteq> 0
z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2

goal (1 subgoal):
 1. (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
by (auto simp add: power2_eq_square)
[PROOF STATE]
proof (state)
this:
(z div gcd x y)\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
from xyz0
[PROOF STATE]
proof (chain)
picking this:
x * y * z \<noteq> 0
[PROOF STEP]
have g0: "?g\<noteq>0"
[PROOF STATE]
proof (prove)
using this:
x * y * z \<noteq> 0

goal (1 subgoal):
 1. gcd x y \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
gcd x y \<noteq> 0

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
have "a^4 + b^4 = ?c^2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2
[PROOF STEP]
have "?c^2 * ?g^4 = (a^4+b^4)*?g^4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
have "?c^2 * ?g^4 = (?c*?g^2)^2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = ((z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2)\<^sup>2
[PROOF STEP]
by algebra
[PROOF STATE]
proof (state)
this:
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = ((z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2)\<^sup>2

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = ((z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2)\<^sup>2

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
with cgz
[PROOF STATE]
proof (chain)
picking this:
z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = ((z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2)\<^sup>2
[PROOF STEP]
have "\<dots> = (z^2)^2"
[PROOF STATE]
proof (prove)
using this:
z\<^sup>2 = (z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = ((z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2)\<^sup>2

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2)\<^sup>2 = (z\<^sup>2)\<^sup>2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2)\<^sup>2 = (z\<^sup>2)\<^sup>2

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((z div gcd x y)\<^sup>2 * (gcd x y)\<^sup>2)\<^sup>2 = (z\<^sup>2)\<^sup>2

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
have "\<dots> = z^4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (z\<^sup>2)\<^sup>2 = z ^ 4
[PROOF STEP]
by algebra
[PROOF STATE]
proof (state)
this:
(z\<^sup>2)\<^sup>2 = z ^ 4

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(z\<^sup>2)\<^sup>2 = z ^ 4

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
with zgab
[PROOF STATE]
proof (chain)
picking this:
z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
(z\<^sup>2)\<^sup>2 = z ^ 4
[PROOF STEP]
have "\<dots> = ?g^4*(a^4+b^4)"
[PROOF STATE]
proof (prove)
using this:
z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
(z\<^sup>2)\<^sup>2 = z ^ 4

goal (1 subgoal):
 1. z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
z ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = gcd x y ^ 4 * (a ^ 4 + b ^ 4)

goal (1 subgoal):
 1. ((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2
[PROOF STEP]
with g0
[PROOF STATE]
proof (chain)
picking this:
gcd x y \<noteq> 0
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
gcd x y \<noteq> 0
((z div gcd x y)\<^sup>2)\<^sup>2 * gcd x y ^ 4 = (a ^ 4 + b ^ 4) * gcd x y ^ 4

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
from ab xyz0 c0
[PROOF STATE]
proof (chain)
picking this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
x * y * z \<noteq> 0
(z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
have "a*b*?c\<noteq>0"
[PROOF STATE]
proof (prove)
using this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
x * y * z \<noteq> 0
(z div gcd x y)\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a * b * (z div gcd x y)\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2
a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2
a * b * (z div gcd x y)\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0

goal:
No subgoals!
[PROOF STEP]
qed
  \<comment> \<open>choose the parity right\<close>
[PROOF STATE]
proof (state)
this:
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
have "\<exists> p q. p^4 + q^4 = ?c^2 \<and> p*q*?c\<noteq>0 \<and> odd p \<and> coprime p q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
have "odd a \<or> odd b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. odd a \<or> odd b
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (odd a \<or> odd b) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>(odd a \<or> odd b)"
[PROOF STATE]
proof (state)
this:
\<not> (odd a \<or> odd b)

goal (1 subgoal):
 1. \<not> (odd a \<or> odd b) \<Longrightarrow> False
[PROOF STEP]
hence "2 dvd a \<and> 2 dvd b"
[PROOF STATE]
proof (prove)
using this:
\<not> (odd a \<or> odd b)

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

goal (1 subgoal):
 1. \<not> (odd a \<or> odd b) \<Longrightarrow> False
[PROOF STEP]
hence "2 dvd gcd a b"
[PROOF STATE]
proof (prove)
using this:
even a \<and> even b

goal (1 subgoal):
 1. even (gcd a b)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
even (gcd a b)

goal (1 subgoal):
 1. \<not> (odd a \<or> odd b) \<Longrightarrow> False
[PROOF STEP]
with ab
[PROOF STATE]
proof (chain)
picking this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
even (gcd a b)
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
even (gcd a b)

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
odd a \<or> odd b

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
odd a \<or> odd b

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
odd a \<or> odd b

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
assume "odd a"
[PROOF STATE]
proof (state)
this:
odd a

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
odd a
[PROOF STEP]
obtain p q where "p = a" and "q = b" and "odd p"
[PROOF STATE]
proof (prove)
using this:
odd a

goal (1 subgoal):
 1. (\<And>p q. \<lbrakk>p = a; q = b; odd p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
p = a
q = b
odd p

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
with ab abc
[PROOF STATE]
proof (chain)
picking this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
p = a
q = b
odd p
[PROOF STEP]
have ?thesis
[PROOF STATE]
proof (prove)
using this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
p = a
q = b
odd p

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
odd a \<Longrightarrow> \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
odd a \<Longrightarrow> \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
odd a \<Longrightarrow> \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
assume "odd b"
[PROOF STATE]
proof (state)
this:
odd b

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
odd b
[PROOF STEP]
obtain p q where "p = b" and "q = a" and "odd p"
[PROOF STATE]
proof (prove)
using this:
odd b

goal (1 subgoal):
 1. (\<And>p q. \<lbrakk>p = b; q = a; odd p\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
p = b
q = a
odd p

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
with ab abc
[PROOF STATE]
proof (chain)
picking this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
p = b
q = a
odd p
[PROOF STEP]
have
        "p^4 + q^4 = ?c^2 \<and> p*q*?c\<noteq>0 \<and> odd p \<and> coprime p q"
[PROOF STATE]
proof (prove)
using this:
x = gcd x y * a \<and> y = gcd x y * b \<and> coprime a b
a ^ 4 + b ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> a * b * (z div gcd x y)\<^sup>2 \<noteq> 0
p = b
q = a
odd p

goal (1 subgoal):
 1. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
by (simp add: ac_simps)
[PROOF STATE]
proof (state)
this:
p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
hence ?thesis
[PROOF STATE]
proof (prove)
using this:
p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
odd b \<Longrightarrow> \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
odd a \<or> odd b
odd a \<Longrightarrow> \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
odd b \<Longrightarrow> \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
odd a \<or> odd b
odd a \<Longrightarrow> \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
odd b \<Longrightarrow> \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. \<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal:
No subgoals!
[PROOF STEP]
qed
  \<comment> \<open>show contradiction using the earlier result\<close>
[PROOF STATE]
proof (state)
this:
\<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

goal (1 subgoal):
 1. x * y * z \<noteq> 0 \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
\<exists>p q. p ^ 4 + q ^ 4 = ((z div gcd x y)\<^sup>2)\<^sup>2 \<and> p * q * (z div gcd x y)\<^sup>2 \<noteq> 0 \<and> odd p \<and> coprime p q

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma aprimedivisor_le_nat:
  assumes "n > Suc 0"
  shows   "aprimedivisor n \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aprimedivisor n \<le> n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. aprimedivisor n \<le> n
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
Suc 0 < n
[PROOF STEP]
have "aprimedivisor n dvd n"
[PROOF STATE]
proof (prove)
using this:
Suc 0 < n

goal (1 subgoal):
 1. aprimedivisor n dvd n
[PROOF STEP]
by (intro aprimedivisor_nat) simp_all
[PROOF STATE]
proof (state)
this:
aprimedivisor n dvd n

goal (1 subgoal):
 1. aprimedivisor n \<le> n
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
Suc 0 < n
aprimedivisor n dvd n
[PROOF STEP]
show "aprimedivisor n \<le> n"
[PROOF STATE]
proof (prove)
using this:
Suc 0 < n
aprimedivisor n dvd n

goal (1 subgoal):
 1. aprimedivisor n \<le> n
[PROOF STEP]
by (intro dvd_imp_le) simp_all
[PROOF STATE]
proof (state)
this:
aprimedivisor n \<le> n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma multipl_div_mono:
  fixes m k d :: nat and f :: "nat \<Rightarrow> complex"
  assumes "completely_multiplicative_function f"
          "d dvd k" "d > 0"
          "\<And>p. prime p \<Longrightarrow> f(p) \<noteq> 0"
  shows "f (k div d) = f(k) div f(d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
have "d \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d \<noteq> 0
[PROOF STEP]
using assms(2,3)
[PROOF STATE]
proof (prove)
using this:
d dvd k
0 < d

goal (1 subgoal):
 1. d \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
d \<noteq> 0

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
d \<noteq> 0
[PROOF STEP]
have nz: "f(d) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
d \<noteq> 0

goal (1 subgoal):
 1. f d \<noteq> 0
[PROOF STEP]
using assms(1,4) completely_multiplicative_nonzero
[PROOF STATE]
proof (prove)
using this:
d \<noteq> 0
completely_multiplicative_function f
prime ?p \<Longrightarrow> f ?p \<noteq> 0
\<lbrakk>completely_multiplicative_function ?f; ?d \<noteq> 0; \<And>p. prime p \<Longrightarrow> ?f p \<noteq> 0\<rbrakk> \<Longrightarrow> ?f ?d \<noteq> 0

goal (1 subgoal):
 1. f d \<noteq> 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f d \<noteq> 0

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
from assms(2,3)
[PROOF STATE]
proof (chain)
picking this:
d dvd k
0 < d
[PROOF STEP]
obtain a where div: "k = a * d "
[PROOF STATE]
proof (prove)
using this:
d dvd k
0 < d

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

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
have "f (k div d) = f ((a*d) div d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (k div d) = f (a * d div d)
[PROOF STEP]
using div
[PROOF STATE]
proof (prove)
using this:
k = a * d

goal (1 subgoal):
 1. f (k div d) = f (a * d div d)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f (k div d) = f (a * d div d)

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f (k div d) = f (a * d div d)

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
have "\<dots> = f(a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (a * d div d) = f a
[PROOF STEP]
using assms(3) div
[PROOF STATE]
proof (prove)
using this:
0 < d
k = a * d

goal (1 subgoal):
 1. f (a * d div d) = f a
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f (a * d div d) = f a

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f (a * d div d) = f a

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
have "\<dots> = f(a)*f(d) div f(d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f a = f a * f d / f d
[PROOF STEP]
using nz
[PROOF STATE]
proof (prove)
using this:
f d \<noteq> 0

goal (1 subgoal):
 1. f a = f a * f d / f d
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f a = f a * f d / f d

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f a = f a * f d / f d

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
have "\<dots> = f(a*d) div f(d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f a * f d / f d = f (a * d) / f d
[PROOF STEP]
by (simp add: div assms(1) completely_multiplicative_function.mult)
[PROOF STATE]
proof (state)
this:
f a * f d / f d = f (a * d) / f d

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f a * f d / f d = f (a * d) / f d

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
have "\<dots> = f (k) div f(d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (a * d) / f d = f k / f d
[PROOF STEP]
using div
[PROOF STATE]
proof (prove)
using this:
k = a * d

goal (1 subgoal):
 1. f (a * d) / f d = f k / f d
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f (a * d) / f d = f k / f d

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
f (k div d) = f k / f d
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f (k div d) = f k / f d

goal (1 subgoal):
 1. f (k div d) = f k / f d
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f (k div d) = f k / f d

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma map_poly_Re_mult: assumes p: "set (coeffs p) \<subseteq> \<real>"
  and q: "set (coeffs q) \<subseteq> \<real>" shows "map_poly Re (p * q) = map_poly Re p * map_poly Re q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
let ?r = "map_poly Re"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
let ?c = "map_poly complex_of_real"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
have "?r (p * q) = ?r (?c (?r p) * ?c (?r q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re (map_poly complex_of_real (map_poly Re p) * map_poly complex_of_real (map_poly Re q))
[PROOF STEP]
unfolding map_poly_of_real_Re[OF p] map_poly_of_real_Re[OF q]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re (p * q)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
map_poly Re (p * q) = map_poly Re (map_poly complex_of_real (map_poly Re p) * map_poly complex_of_real (map_poly Re q))

goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
map_poly Re (p * q) = map_poly Re (map_poly complex_of_real (map_poly Re p) * map_poly complex_of_real (map_poly Re q))

goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
have "?c (?r p) * ?c (?r q) = ?c (?r p * ?r q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly complex_of_real (map_poly Re p) * map_poly complex_of_real (map_poly Re q) = map_poly complex_of_real (map_poly Re p * map_poly Re q)
[PROOF STEP]
by (simp add: hom_distribs)
[PROOF STATE]
proof (state)
this:
map_poly complex_of_real (map_poly Re p) * map_poly complex_of_real (map_poly Re q) = map_poly complex_of_real (map_poly Re p * map_poly Re q)

goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
map_poly complex_of_real (map_poly Re p) * map_poly complex_of_real (map_poly Re q) = map_poly complex_of_real (map_poly Re p * map_poly Re q)

goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
have "?r \<dots> = ?r p * ?r q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly Re (map_poly complex_of_real (map_poly Re p * map_poly Re q)) = map_poly Re p * map_poly Re q
[PROOF STEP]
unfolding map_poly_Re_of_real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly Re p * map_poly Re q = map_poly Re p * map_poly Re q
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
map_poly Re (map_poly complex_of_real (map_poly Re p * map_poly Re q)) = map_poly Re p * map_poly Re q

goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
map_poly Re (p * q) = map_poly Re p * map_poly Re q

goal (1 subgoal):
 1. map_poly Re (p * q) = map_poly Re p * map_poly Re q
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
map_poly Re (p * q) = map_poly Re p * map_poly Re q

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma prime_elem_multD:
  assumes "prime_elem (a * b)"
  shows "is_unit a \<or> is_unit b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
prime_elem (a * b)
[PROOF STEP]
have "a \<noteq> 0" "b \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
prime_elem (a * b)

goal (1 subgoal):
 1. a \<noteq> (0::'a) &&& b \<noteq> (0::'a)
[PROOF STEP]
by (auto dest!: prime_elem_not_zeroI)
[PROOF STATE]
proof (state)
this:
a \<noteq> (0::'a)
b \<noteq> (0::'a)

goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
a \<noteq> (0::'a)
b \<noteq> (0::'a)

goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
from assms prime_elem_dvd_multD [of "a * b"]
[PROOF STATE]
proof (chain)
picking this:
prime_elem (a * b)
\<lbrakk>prime_elem (a * b); a * b dvd ?a * ?b\<rbrakk> \<Longrightarrow> a * b dvd ?a \<or> a * b dvd ?b
[PROOF STEP]
have "a * b dvd a \<or> a * b dvd b"
[PROOF STATE]
proof (prove)
using this:
prime_elem (a * b)
\<lbrakk>prime_elem (a * b); a * b dvd ?a * ?b\<rbrakk> \<Longrightarrow> a * b dvd ?a \<or> a * b dvd ?b

goal (1 subgoal):
 1. a * b dvd a \<or> a * b dvd b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a * b dvd a \<or> a * b dvd b

goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
a \<noteq> (0::'a)
b \<noteq> (0::'a)
a * b dvd a \<or> a * b dvd b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a)
b \<noteq> (0::'a)
a * b dvd a \<or> a * b dvd b

goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
using dvd_times_left_cancel_iff [of a b 1]
      dvd_times_right_cancel_iff [of b a 1]
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a)
b \<noteq> (0::'a)
a * b dvd a \<or> a * b dvd b
a \<noteq> (0::'a) \<Longrightarrow> (a * b dvd a * (1::'a)) = is_unit b
b \<noteq> (0::'a) \<Longrightarrow> (a * b dvd (1::'a) * b) = is_unit a

goal (1 subgoal):
 1. is_unit a \<or> is_unit b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_unit a \<or> is_unit b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closedin_subset_trans:
  "closedin (top_of_set U) S \<Longrightarrow> S \<subseteq> T \<Longrightarrow> T \<subseteq> U \<Longrightarrow>
    closedin (top_of_set T) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>closedin (top_of_set U) S; S \<subseteq> T; T \<subseteq> U\<rbrakk> \<Longrightarrow> closedin (top_of_set T) S
[PROOF STEP]
by (meson closedin_limpt subset_iff)


[STATEMENT]
lemma sums_zero_on:
  fixes f :: "nat \<Rightarrow> 'a::real_normed_vector"
  assumes f: "f sums s"
    and X: "finite X"
  shows "zero_on f X sums (s - sum f X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zero_on f X sums (s - sum f X)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. zero_on f X sums (s - sum f X)
[PROOF STEP]
have "(\<lambda>x. if x \<in> X then f x else 0) sums sum (\<lambda>x. f x) X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> X then f x else (0::'a)) sums sum f X
[PROOF STEP]
using X
[PROOF STATE]
proof (prove)
using this:
finite X

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> X then f x else (0::'a)) sums sum f X
[PROOF STEP]
by(rule sums_If_finite_set)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> X then f x else (0::'a)) sums sum f X

goal (1 subgoal):
 1. zero_on f X sums (s - sum f X)
[PROOF STEP]
from sums_diff[OF f this]
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. f n - (if n \<in> X then f n else (0::'a))) sums (s - sum f X)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. f n - (if n \<in> X then f n else (0::'a))) sums (s - sum f X)

goal (1 subgoal):
 1. zero_on f X sums (s - sum f X)
[PROOF STEP]
by(simp add: sum_negf override_on_def if_distrib cong del: if_weak_cong)
[PROOF STATE]
proof (state)
this:
zero_on f X sums (s - sum f X)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma delta_gt: assumes "2 \<le> i" "i < k"
  shows "\<delta> i > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < \<delta> i
[PROOF STEP]
using n_gt[OF assms]
[PROOF STATE]
proof (prove)
using this:
n (Suc i) < n i

goal (1 subgoal):
 1. 0 < \<delta> i
[PROOF STEP]
unfolding \<delta>
[PROOF STATE]
proof (prove)
using this:
n (Suc i) < n i

goal (1 subgoal):
 1. 0 < n i - n (Suc i)
[PROOF STEP]
by auto


[STATEMENT]
lemma horner_sum_append:
  \<open>horner_sum f a (xs @ ys) = horner_sum f a xs + a ^ length xs * horner_sum f a ys\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. horner_sum f a (xs @ ys) = horner_sum f a xs + a ^ length xs * horner_sum f a ys
[PROOF STEP]
using sum.atLeastLessThan_shift_bounds [of _ 0 \<open>length xs\<close> \<open>length ys\<close>]
    atLeastLessThan_add_Un [of 0 \<open>length xs\<close> \<open>length ys\<close>]
[PROOF STATE]
proof (prove)
using this:
sum ?g {0 + length xs..<length ys + length xs} = sum (?g \<circ> (+) (length xs)) {0..<length ys}
0 \<le> length xs \<Longrightarrow> {0..<length xs + length ys} = {0..<length xs} \<union> {length xs..<length xs + length ys}

goal (1 subgoal):
 1. horner_sum f a (xs @ ys) = horner_sum f a xs + a ^ length xs * horner_sum f a ys
[PROOF STEP]
by (simp add: horner_sum_eq_sum sum_distrib_left sum.union_disjoint ac_simps nth_append power_add)


[STATEMENT]
lemma vsv_vimage_vsubsetI:
  assumes "\<And>a. \<lbrakk> a \<in>\<^sub>\<circ> A; a \<in>\<^sub>\<circ> \<D>\<^sub>\<circ> r \<rbrakk> \<Longrightarrow> r\<lparr>a\<rparr> \<in>\<^sub>\<circ> B"
  shows "r `\<^sub>\<circ> A \<subseteq>\<^sub>\<circ> B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r `\<^sub>\<circ> A \<subseteq>\<^sub>\<circ> B
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?a \<in>\<^sub>\<circ> A; ?a \<in>\<^sub>\<circ> \<D>\<^sub>\<circ> r\<rbrakk> \<Longrightarrow> r\<lparr>?a\<rparr> \<in>\<^sub>\<circ> B

goal (1 subgoal):
 1. r `\<^sub>\<circ> A \<subseteq>\<^sub>\<circ> B
[PROOF STEP]
by (metis vsv_vimage_iff vsubsetI)


[STATEMENT]
lemma \<alpha>_char:
assumes "3 \<le> i" "i < k + 2"
  shows "\<alpha> i = (f (i - 1)) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
proof (cases "i = 3")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i = 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
 2. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
i = 3

goal (2 subgoals):
 1. i = 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
 2. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
have triv:"Suc (Suc 0) = 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc (Suc 0) = 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Suc (Suc 0) = 2

goal (2 subgoals):
 1. i = 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
 2. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
have l:"length (coeffs (F 2)) \<noteq> 0" "length (coeffs (F 1)) \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (coeffs (F 2)) \<noteq> 0 &&& length (coeffs (F 1)) \<noteq> 0
[PROOF STEP]
using F12
[PROOF STATE]
proof (prove)
using this:
F 1 \<noteq> 0
F 2 \<noteq> 0

goal (1 subgoal):
 1. length (coeffs (F 2)) \<noteq> 0 &&& length (coeffs (F 1)) \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
length (coeffs (F 2)) \<noteq> 0
length (coeffs (F 1)) \<noteq> 0

goal (2 subgoals):
 1. i = 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
 2. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
hence "length (coeffs (F 2)) \<le> length (coeffs (F (Suc 0)))"
[PROOF STATE]
proof (prove)
using this:
length (coeffs (F 2)) \<noteq> 0
length (coeffs (F 1)) \<noteq> 0

goal (1 subgoal):
 1. length (coeffs (F 2)) \<le> length (coeffs (F (Suc 0)))
[PROOF STEP]
using n12
[PROOF STATE]
proof (prove)
using this:
length (coeffs (F 2)) \<noteq> 0
length (coeffs (F 1)) \<noteq> 0
n 2 \<le> n 1

goal (1 subgoal):
 1. length (coeffs (F 2)) \<le> length (coeffs (F (Suc 0)))
[PROOF STEP]
unfolding n degree_eq_length_coeffs One_nat_def
[PROOF STATE]
proof (prove)
using this:
length (coeffs (F 2)) \<noteq> 0
length (coeffs (F (Suc 0))) \<noteq> 0
length (coeffs (F 2)) - Suc 0 \<le> length (coeffs (F (Suc 0))) - Suc 0

goal (1 subgoal):
 1. length (coeffs (F 2)) \<le> length (coeffs (F (Suc 0)))
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
length (coeffs (F 2)) \<le> length (coeffs (F (Suc 0)))

goal (2 subgoals):
 1. i = 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
 2. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
hence "Suc (length (coeffs (F 1)) - 1 - (length (coeffs (F 2)) - 1)) =
         (Suc (length (coeffs (F 1))) - length (coeffs (F (3 - 1))))"
[PROOF STATE]
proof (prove)
using this:
length (coeffs (F 2)) \<le> length (coeffs (F (Suc 0)))

goal (1 subgoal):
 1. Suc (length (coeffs (F 1)) - 1 - (length (coeffs (F 2)) - 1)) = Suc (length (coeffs (F 1))) - length (coeffs (F (3 - 1)))
[PROOF STEP]
using l
[PROOF STATE]
proof (prove)
using this:
length (coeffs (F 2)) \<le> length (coeffs (F (Suc 0)))
length (coeffs (F 2)) \<noteq> 0
length (coeffs (F 1)) \<noteq> 0

goal (1 subgoal):
 1. Suc (length (coeffs (F 1)) - 1 - (length (coeffs (F 2)) - 1)) = Suc (length (coeffs (F 1))) - length (coeffs (F (3 - 1)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Suc (length (coeffs (F 1)) - 1 - (length (coeffs (F 2)) - 1)) = Suc (length (coeffs (F 1))) - length (coeffs (F (3 - 1)))

goal (2 subgoals):
 1. i = 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
 2. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Suc (length (coeffs (F 1)) - 1 - (length (coeffs (F 2)) - 1)) = Suc (length (coeffs (F 1))) - length (coeffs (F (3 - 1)))

goal (1 subgoal):
 1. \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
unfolding True \<alpha>_def n \<delta> degree_eq_length_coeffs
[PROOF STATE]
proof (prove)
using this:
Suc (length (coeffs (F 1)) - 1 - (length (coeffs (F 2)) - 1)) = Suc (length (coeffs (F 1))) - length (coeffs (F (3 - 1)))

goal (1 subgoal):
 1. f (3 - 1) ^ Suc (length (coeffs (F (3 - 2))) - 1 - (length (coeffs (F (Suc (3 - 2)))) - 1)) = f (3 - 1) ^ (Suc (length (coeffs (F (3 - 2)))) - length (coeffs (F (3 - 1))))
[PROOF STEP]
by (simp add:triv)
[PROOF STATE]
proof (state)
this:
\<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))

goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
i \<noteq> 3

goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
hence assms:"2 \<le> i - 2" "i - 2 < k"
[PROOF STATE]
proof (prove)
using this:
i \<noteq> 3

goal (1 subgoal):
 1. 2 \<le> i - 2 &&& i - 2 < k
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
i \<noteq> 3
3 \<le> i
i < k + 2

goal (1 subgoal):
 1. 2 \<le> i - 2 &&& i - 2 < k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
2 \<le> i - 2
i - 2 < k

goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
have i:"i - 2 \<noteq> 0" "i - 1 \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i - 2 \<noteq> 0 &&& i - 1 \<noteq> 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
2 \<le> i - 2
i - 2 < k

goal (1 subgoal):
 1. i - 2 \<noteq> 0 &&& i - 1 \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i - 2 \<noteq> 0
i - 1 \<noteq> 0

goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
hence [simp]: "Suc (i - 2) = i - 1"
[PROOF STATE]
proof (prove)
using this:
i - 2 \<noteq> 0
i - 1 \<noteq> 0

goal (1 subgoal):
 1. Suc (i - 2) = i - 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Suc (i - 2) = i - 1

goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
from assms(2) F0[OF i(2)]
[PROOF STATE]
proof (chain)
picking this:
i - 2 < k
(F (i - 1) = 0) = (k < i - 1)
[PROOF STEP]
have "F (i - 1) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
i - 2 < k
(F (i - 1) = 0) = (k < i - 1)

goal (1 subgoal):
 1. F (i - 1) \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
F (i - 1) \<noteq> 0

goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
F (i - 1) \<noteq> 0
[PROOF STEP]
have "length (coeffs (F (i - 1))) > 0"
[PROOF STATE]
proof (prove)
using this:
F (i - 1) \<noteq> 0

goal (1 subgoal):
 1. 0 < length (coeffs (F (i - 1)))
[PROOF STEP]
by (cases "F (i - 1)") auto
[PROOF STATE]
proof (state)
this:
0 < length (coeffs (F (i - 1)))

goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
with delta_gt[unfolded \<delta> n degree_eq_length_coeffs,OF assms]
[PROOF STATE]
proof (chain)
picking this:
0 < length (coeffs (F (i - 2))) - 1 - (length (coeffs (F (Suc (i - 2)))) - 1)
0 < length (coeffs (F (i - 1)))
[PROOF STEP]
have * : "Suc (\<delta> (i - 2)) = Suc (length (coeffs (F (i - 2)))) - (length (coeffs (F (Suc (i - 2)))))"
[PROOF STATE]
proof (prove)
using this:
0 < length (coeffs (F (i - 2))) - 1 - (length (coeffs (F (Suc (i - 2)))) - 1)
0 < length (coeffs (F (i - 1)))

goal (1 subgoal):
 1. Suc (\<delta> (i - 2)) = Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (Suc (i - 2))))
[PROOF STEP]
by (auto simp:\<delta> n degree_eq_length_coeffs)
[PROOF STATE]
proof (state)
this:
Suc (\<delta> (i - 2)) = Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (Suc (i - 2))))

goal (1 subgoal):
 1. i \<noteq> 3 \<Longrightarrow> \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
unfolding \<alpha>_def *
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (Suc (i - 2))))) = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<alpha> i = f (i - 1) ^ (Suc (length (coeffs (F (i - 2)))) - length (coeffs (F (i - 1))))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inj_on_impl_disjoint_family_on_singleton:
  assumes "inj_on f A"
  shows "disjoint_family_on (\<lambda>x. {f x}) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjoint_family_on (\<lambda>x. {f x}) A
[PROOF STEP]
using assms disjoint_family_on_def inj_on_contraD
[PROOF STATE]
proof (prove)
using this:
inj_on f A
disjoint_family_on ?A ?S = (\<forall>m\<in>?S. \<forall>n\<in>?S. m \<noteq> n \<longrightarrow> ?A m \<inter> ?A n = {})
\<lbrakk>inj_on ?f ?A; ?x \<noteq> ?y; ?x \<in> ?A; ?y \<in> ?A\<rbrakk> \<Longrightarrow> ?f ?x \<noteq> ?f ?y

goal (1 subgoal):
 1. disjoint_family_on (\<lambda>x. {f x}) A
[PROOF STEP]
by fastforce


[STATEMENT]
lemma partition:
  assumes equiv: "equiv X (rel_ext r)"
      and xs: "set xs \<subseteq> X"
  shows "set ` set (partition r xs) = set xs // ((rel_ext r) \<inter> set xs \<times> set xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set ` set (List_local.partition r xs) = set xs // Restr (rel_ext r) (set xs)
[PROOF STEP]
unfolding partition_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set ` set (snd (partition_aux r xs)) = set xs // Restr (rel_ext r) (set xs)
[PROOF STEP]
using partition_aux[OF equiv xs]
[PROOF STATE]
proof (prove)
using this:
fst (partition_aux r xs) = [] \<and> set ` set (snd (partition_aux r xs)) = set xs // Restr (rel_ext r) (set xs)

goal (1 subgoal):
 1. set ` set (snd (partition_aux r xs)) = set xs // Restr (rel_ext r) (set xs)
[PROOF STEP]
by simp


[STATEMENT]
lemma bounded_rel_frontier:
  fixes S :: "'n::euclidean_space set"
  shows "bounded S \<Longrightarrow> bounded(rel_frontier S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded S \<Longrightarrow> bounded (rel_frontier S)
[PROOF STEP]
by (simp add: bounded_closure bounded_diff rel_frontier_def)


[STATEMENT]
lemma Gromov_hyperbolic_ineq_not_distinct:
  assumes "x = y \<or> x = z \<or> x = t \<or> y = z \<or> y = t \<or> z = (t::'a::metric_space)"
  shows "dist x y + dist z t \<le> max (dist x z + dist y t) (dist x t + dist y z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist x y + dist z t \<le> max (dist x z + dist y t) (dist x t + dist y z)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x = y \<or> x = z \<or> x = t \<or> y = z \<or> y = t \<or> z = t

goal (1 subgoal):
 1. dist x y + dist z t \<le> max (dist x z + dist y t) (dist x t + dist y z)
[PROOF STEP]
by (auto simp add: dist_commute, simp add: dist_triangle add.commute, simp add: dist_triangle3)


[STATEMENT]
lemma length_sorted_list_of_multiset[simp]: "length (sorted_list_of_multiset A) = size A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (sorted_list_of_multiset A) = size A
[PROOF STEP]
by (metis mset_sorted_list_of_multiset size_mset)


[STATEMENT]
lemma sat_CONJ: "finite Qeq \<Longrightarrow> sat (CONJ (Q, Qeq)) I \<sigma> \<longleftrightarrow> sat Q I \<sigma> \<and> (\<forall>(x, y) \<in> Qeq. sat (x \<approx> y) I \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite Qeq \<Longrightarrow> sat (CONJ (Q, Qeq)) I \<sigma> = (sat Q I \<sigma> \<and> (\<forall>(x, y)\<in>Qeq. sat (x \<approx> y) I \<sigma>))
[PROOF STEP]
unfolding CONJ_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite Qeq \<Longrightarrow> sat (case (Q, Qeq) of (Q, Qeq) \<Rightarrow> Conjs Q (sorted_list_of_set Qeq)) I \<sigma> = (sat Q I \<sigma> \<and> (\<forall>(x, y)\<in>Qeq. sat (x \<approx> y) I \<sigma>))
[PROOF STEP]
by (auto simp: sat_Conjs)


[STATEMENT]
lemma identities2: "root 4 m = m powr (1/4)" "root 8 m = m powr (1/8)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root 4 (real m) = real m powr (1 / 4) &&& root 8 (real m) = real m powr (1 / 8)
[PROOF STEP]
by (subst root_powr_inverse, insert m2, auto)+


[STATEMENT]
lemma nlists_empty: "nlists {} n = (if n = 0 then {[]} else {})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nlists {} n = (if n = 0 then {[]} else {})
[PROOF STEP]
by(auto simp add: nlists_alt_def)


[STATEMENT]
lemma image_TimesC:
  "(\<lambda>(x, y). (x \<rightarrow> x, y \<times> y)) ` (A \<times> B) =
   ((\<lambda>x. x \<rightarrow> x) ` A) \<times> ((\<lambda>y. y \<times> y) ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, y). (x \<rightarrow> x, y \<times> y)) ` (A \<times> B) = (\<lambda>x. x \<rightarrow> x) ` A \<times> (\<lambda>y. y \<times> y) ` B
[PROOF STEP]
by (metis image_TimesA)


[STATEMENT]
lemma subset_imp_less_mset: "A \<subset># B \<Longrightarrow> A < B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subset># B \<Longrightarrow> A < B
[PROOF STEP]
by (simp add: order.not_eq_order_implies_strict subset_eq_imp_le_multiset)


[STATEMENT]
lemma nth_2p_bin: "(bit :: int \<Rightarrow> nat \<Rightarrow> bool) (2 ^ n) m = (m = n)" \<comment> \<open>for use when simplifying with \<open>bin_nth_Bit\<close>\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bit (2 ^ n) m = (m = n)
[PROOF STEP]
by (auto simp add: bit_exp_iff)


[STATEMENT]
lemma in_FvarsT_substTD:
"y \<in> FvarsT (substT r t x) \<Longrightarrow> r \<in> atrm \<Longrightarrow> t \<in> trm \<Longrightarrow> x \<in> var
   \<Longrightarrow> y \<in> (FvarsT r - {x}) \<union> (if x \<in> FvarsT r then FvarsT t else {})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>y \<in> FvarsT (substT r t x); r \<in> atrm; t \<in> trm; x \<in> var\<rbrakk> \<Longrightarrow> y \<in> FvarsT r - {x} \<union> (if x \<in> FvarsT r then FvarsT t else {})
[PROOF STEP]
using FvarsT_substT
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?s \<in> atrm; ?t \<in> trm; ?x \<in> var\<rbrakk> \<Longrightarrow> FvarsT (substT ?s ?t ?x) = FvarsT ?s - {?x} \<union> (if ?x \<in> FvarsT ?s then FvarsT ?t else {})

goal (1 subgoal):
 1. \<lbrakk>y \<in> FvarsT (substT r t x); r \<in> atrm; t \<in> trm; x \<in> var\<rbrakk> \<Longrightarrow> y \<in> FvarsT r - {x} \<union> (if x \<in> FvarsT r then FvarsT t else {})
[PROOF STEP]
by auto


[STATEMENT]
lemma P_denormalize_full:
  assumes "wf_dlverts t1"
      and "\<forall>v \<in> dverts t1. distinct v"
      and "hd (Dtree.root t1) = root"
      and "max_deg t1 \<le> 1"
    shows "unique_set_r root (dverts t1) (denormalize (normalize_full t1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unique_set_r root (dverts t1) (denormalize (normalize_full t1))
[PROOF STEP]
using assms unique_set_r_def denormalize_full_set_eq_dverts_union
    denormalize_distinct normalize_full_wfdlverts take1_eq_denormalize_full
[PROOF STATE]
proof (prove)
using this:
wf_dlverts t1
\<forall>v\<in>dverts t1. distinct v
hd (dtree.root t1) = root
max_deg t1 \<le> 1
unique_set_r ?r ?Y ?ys = (set ?ys = \<Union> (set ` ?Y) \<and> distinct ?ys \<and> take 1 ?ys = [?r])
max_deg ?t1.0 \<le> 1 \<Longrightarrow> set (denormalize (normalize_full ?t1.0)) = \<Union> (set ` dverts ?t1.0)
\<lbrakk>\<forall>v\<in>dverts ?t1.0. distinct v; wf_dlverts ?t1.0\<rbrakk> \<Longrightarrow> distinct (denormalize ?t1.0)
wf_dlverts ?t1.0 \<Longrightarrow> wf_dlverts (normalize_full ?t1.0)
wf_dlverts ?t1.0 \<Longrightarrow> take 1 (denormalize (normalize_full ?t1.0)) = [hd (dtree.root ?t1.0)]

goal (1 subgoal):
 1. unique_set_r root (dverts t1) (denormalize (normalize_full t1))
[PROOF STEP]
by fastforce


[STATEMENT]
lemma upper_asymptotic_density_zero_finite_Union:
  assumes "finite I" "\<And>i. i \<in> I \<Longrightarrow> upper_asymptotic_density (A i) = 0"
  shows "upper_asymptotic_density (\<Union>i\<in>I. A i) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. upper_asymptotic_density (\<Union> (A ` I)) = 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite I
?i \<in> I \<Longrightarrow> upper_asymptotic_density (A ?i) = 0

goal (1 subgoal):
 1. upper_asymptotic_density (\<Union> (A ` I)) = 0
[PROOF STEP]
by (induction rule: finite_induct, auto intro!: upper_asymptotic_density_zero_union)