[STATEMENT]
lemma subseqs_subset: "ys \<in> set (subseqs xs) \<Longrightarrow> set ys \<subseteq> set xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ys \<in> set (subseqs xs) \<Longrightarrow> set ys \<subseteq> set xs
[PROOF STEP]
by (metis Pow_iff image_eqI subseqs_powset)


[STATEMENT]
lemma lb_set_prop: "(X::'a::preorder set) \<noteq> {} \<Longrightarrow> lb_set X = \<Inter>{\<down>x |x. x \<in> X}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<noteq> {} \<Longrightarrow> lb_set X = \<Inter> {\<down> x |x. x \<in> X}
[PROOF STEP]
unfolding lb_set_def downset_def downset_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<noteq> {} \<Longrightarrow> {y. Ball X ((\<le>) y)} = \<Inter> {((\<lambda>X. {y. Bex X ((\<le>) y)}) \<circ> \<eta>) x |x. x \<in> X}
[PROOF STEP]
by (safe, simp_all, blast)


[STATEMENT]
lemma mult_smult_assoc_mat: assumes A: "A \<in> carrier_mat nr n" and B: "B \<in> carrier_mat n nc"
  shows "(k \<cdot>\<^sub>m A) * B = (k :: 'a :: comm_semiring_0) \<cdot>\<^sub>m (A * B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k \<cdot>\<^sub>m A * B = k \<cdot>\<^sub>m (A * B)
[PROOF STEP]
by (rule eq_matI, insert A B, auto)


[STATEMENT]
lemma Ord_inf [simp]: "Ord k \<Longrightarrow> Ord l \<Longrightarrow> Ord (k \<sqinter> l)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ord k; Ord l\<rbrakk> \<Longrightarrow> Ord (k \<sqinter> l)
[PROOF STEP]
by (metis Ord_linear_le inf_absorb2 le_iff_inf)


[STATEMENT]
lemma binomial_0_Suc [simp]: "0 choose Suc k = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 choose Suc k = 0
[PROOF STEP]
by (simp add: binomial_def)


[STATEMENT]
lemma lead_coeff_mult:
  assumes "lead_coeff p * lead_coeff q \<noteq> 0"
  shows   "lead_coeff (p * q) = lead_coeff p * lead_coeff q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Symmetric_Polynomials.lead_coeff (p * q) = Symmetric_Polynomials.lead_coeff p * Symmetric_Polynomials.lead_coeff q
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Symmetric_Polynomials.lead_coeff p * Symmetric_Polynomials.lead_coeff q \<noteq> (0::'a)

goal (1 subgoal):
 1. Symmetric_Polynomials.lead_coeff (p * q) = Symmetric_Polynomials.lead_coeff p * Symmetric_Polynomials.lead_coeff q
[PROOF STEP]
by (simp add: lead_monom_mult lead_coeff_mult_aux lead_coeff_def)


[STATEMENT]
lemma c_msort:
  assumes [simp]: "length xs = n"
  shows "c_msort xs \<le> n + n * \<lceil>log 2 n\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
have [simp]: "xs = [] \<longleftrightarrow> length xs = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (xs = []) = (length xs = 0)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(xs = []) = (length xs = 0)

goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
have "int (c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (length (sequences key xs))\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real (length (sequences key xs)))\<rceil>
[PROOF STEP]
using c_merge_all [of "sequences key xs"]
[PROOF STATE]
proof (prove)
using this:
int (local.c_merge_all (sequences key xs)) \<le> int (length (concat (sequences key xs))) * \<lceil>log 2 (real (length (sequences key xs)))\<rceil>

goal (1 subgoal):
 1. int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real (length (sequences key xs)))\<rceil>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real (length (sequences key xs)))\<rceil>

goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real (length (sequences key xs)))\<rceil>

goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
have "\<dots> \<le> int n * \<lceil>log 2 n\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int n * \<lceil>log 2 (real (length (sequences key xs)))\<rceil> \<le> int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
using length_sequences [of key xs]
[PROOF STATE]
proof (prove)
using this:
length (sequences key xs) \<le> length xs

goal (1 subgoal):
 1. int n * \<lceil>log 2 (real (length (sequences key xs)))\<rceil> \<le> int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
by (cases n) (auto intro!: sequences_ne mult_mono ceiling_mono log2_mono)
[PROOF STATE]
proof (state)
this:
int n * \<lceil>log 2 (real (length (sequences key xs)))\<rceil> \<le> int n * \<lceil>log 2 (real n)\<rceil>

goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
have "int (c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 n\<rceil>"
[PROOF STATE]
proof (prove)
using this:
int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real n)\<rceil>

goal (1 subgoal):
 1. int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real n)\<rceil>

goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real n)\<rceil>

goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
have "c_sequences xs \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.c_sequences xs \<le> n
[PROOF STEP]
using c_sequences [of xs]
[PROOF STATE]
proof (prove)
using this:
local.c_sequences xs \<le> length xs - 1

goal (1 subgoal):
 1. local.c_sequences xs \<le> n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
local.c_sequences xs \<le> n

goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real n)\<rceil>
local.c_sequences xs \<le> n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
int (local.c_merge_all (sequences key xs)) \<le> int n * \<lceil>log 2 (real n)\<rceil>
local.c_sequences xs \<le> n

goal (1 subgoal):
 1. int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>
[PROOF STEP]
by (auto intro: add_mono)
[PROOF STATE]
proof (state)
this:
int (local.c_msort xs) \<le> int n + int n * \<lceil>log 2 (real n)\<rceil>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma genPrefix_take_append:
     "[| refl r;  (xs,ys) \<in> genPrefix r |]
      ==>  (xs@zs, take (length xs) ys @ zs) \<in> genPrefix r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>refl r; (xs, ys) \<in> genPrefix r\<rbrakk> \<Longrightarrow> (xs @ zs, take (length xs) ys @ zs) \<in> genPrefix r
[PROOF STEP]
apply (erule genPrefix.induct)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. refl r \<Longrightarrow> ([] @ zs, take (length []) [] @ zs) \<in> genPrefix r
 2. \<And>xs ys x y. \<lbrakk>refl r; (xs, ys) \<in> genPrefix r; (xs @ zs, take (length xs) ys @ zs) \<in> genPrefix r; (x, y) \<in> r\<rbrakk> \<Longrightarrow> ((x # xs) @ zs, take (length (x # xs)) (y # ys) @ zs) \<in> genPrefix r
 3. \<And>xs ys zsa. \<lbrakk>refl r; (xs, ys) \<in> genPrefix r; (xs @ zs, take (length xs) ys @ zs) \<in> genPrefix r\<rbrakk> \<Longrightarrow> (xs @ zs, take (length xs) (ys @ zsa) @ zs) \<in> genPrefix r
[PROOF STEP]
apply (frule_tac [3] genPrefix_length_le)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. refl r \<Longrightarrow> ([] @ zs, take (length []) [] @ zs) \<in> genPrefix r
 2. \<And>xs ys x y. \<lbrakk>refl r; (xs, ys) \<in> genPrefix r; (xs @ zs, take (length xs) ys @ zs) \<in> genPrefix r; (x, y) \<in> r\<rbrakk> \<Longrightarrow> ((x # xs) @ zs, take (length (x # xs)) (y # ys) @ zs) \<in> genPrefix r
 3. \<And>xs ys zsa. \<lbrakk>refl r; (xs, ys) \<in> genPrefix r; (xs @ zs, take (length xs) ys @ zs) \<in> genPrefix r; length xs \<le> length ys\<rbrakk> \<Longrightarrow> (xs @ zs, take (length xs) (ys @ zsa) @ zs) \<in> genPrefix r
[PROOF STEP]
apply (simp_all (no_asm_simp) add: diff_is_0_eq [THEN iffD2])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma compos_bij:"\<lbrakk>f \<in> A \<rightarrow> B; bij_to f A B; g \<in> B \<rightarrow> C; bij_to g B C\<rbrakk> \<Longrightarrow>
                   bij_to (compose A g f) A C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; bij_to f A B; g \<in> B \<rightarrow> C; bij_to g B C\<rbrakk> \<Longrightarrow> bij_to (compose A g f) A C
[PROOF STEP]
apply (simp add:bij_to_def, (erule conjE)+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; surj_to f A B; inj_on f A; surj_to g B C; inj_on g B\<rbrakk> \<Longrightarrow> surj_to (compose A g f) A C \<and> inj_on (compose A g f) A
[PROOF STEP]
apply (simp add:comp_inj[of "f" "A" "B" "g" "C"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; surj_to f A B; inj_on f A; surj_to g B C; inj_on g B\<rbrakk> \<Longrightarrow> surj_to (compose A g f) A C
[PROOF STEP]
apply (simp add:compose_surj)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma lemma_LIMSEQ_incseq_of_diff_inverse:
    "(\<lambda>n. of_rat(incseq_of x n - 1/of_nat(Suc n))) \<longlonglongrightarrow> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. real_of_rat (incseq_of x n - 1 / rat_of_nat (Suc n))) \<longlonglongrightarrow> x
[PROOF STEP]
by (blast intro: lemma_LIMSEQ_incseq_diff_inverse incseq_incseq_of LIMSEQ_incseq_of)


[STATEMENT]
lemma P_sup_eq_E_sup:
  assumes [measurable]: "Measurable.pred St P"
  shows "P_sup s P = E_sup s (indicator {x\<in>space St. P x})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P_sup s P = E_sup s (indicator {x \<in> space St. P x})
[PROOF STEP]
by (auto simp add: P_sup_def E_sup_def intro!: SUP_cong nn_integral_cong)


[STATEMENT]
lemma MOST_mono: "\<forall>\<^sub>\<infinity>x. P x \<Longrightarrow> (\<And>x. P x \<Longrightarrow> Q x) \<Longrightarrow> \<forall>\<^sub>\<infinity>x. Q x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>\<^sub>\<infinity>x. P x; \<And>x. P x \<Longrightarrow> Q x\<rbrakk> \<Longrightarrow> \<forall>\<^sub>\<infinity>x. Q x
[PROOF STEP]
by (fact eventually_mono)


[STATEMENT]
lemma simple_Fourier_convergence_periodic:
  assumes f: "f absolutely_integrable_on {-pi..pi}"
    and ft: "(\<lambda>x. (f(x+t) - f t) / sin(x/2)) absolutely_integrable_on {-pi..pi}"
    and periodic: "\<And>x. f(x + 2*pi) = f x"
  shows "(\<lambda>n. (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t)) \<longlonglongrightarrow> f t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
let ?\<Phi> = "\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
let ?\<Psi> = "\<lambda>n. LINT x|lebesgue_on {-pi..pi}. Dirichlet_kernel n x * (f(x + t) - f t)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
have fft: "(\<lambda>x. f x - f t) absolutely_integrable_on {-pi..pi}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x - f t) absolutely_integrable_on {- pi..pi}
[PROOF STEP]
by (simp add: f absolutely_integrable_measurable_real)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x - f t) absolutely_integrable_on {- pi..pi}

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
have fxt: "(\<lambda>x. f(x + t)) absolutely_integrable_on {-pi..pi}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f (x + t)) absolutely_integrable_on {- pi..pi}
[PROOF STEP]
using absolutely_integrable_periodic_offset assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?f absolutely_integrable_on {?a..?b}; \<And>x. ?f (x + (?b - ?a)) = ?f x\<rbrakk> \<Longrightarrow> (\<lambda>x. ?f (x + ?c)) absolutely_integrable_on {?a..?b}
\<lbrakk>?f absolutely_integrable_on {?a..?b}; \<And>x. ?f (x + (?b - ?a)) = ?f x\<rbrakk> \<Longrightarrow> (\<lambda>x. ?f (?c + x)) absolutely_integrable_on {?a..?b}
f absolutely_integrable_on {- pi..pi}
(\<lambda>x. (f (x + t) - f t) / sin (x / 2)) absolutely_integrable_on {- pi..pi}
f (?x + 2 * pi) = f ?x

goal (1 subgoal):
 1. (\<lambda>x. f (x + t)) absolutely_integrable_on {- pi..pi}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f (x + t)) absolutely_integrable_on {- pi..pi}

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
have *: "?\<Phi> \<longlonglongrightarrow> 0 \<longleftrightarrow> ?\<Psi> \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 = (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (simp add: Fourier_sum_limit_Dirichlet_kernel fft periodic)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 = (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 = (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
have "(\<lambda>n. (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t) \<longlonglongrightarrow> 0"
    if "?\<Phi> \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t) \<longlonglongrightarrow> 0
[PROOF STEP]
proof (rule Lim_transform_eventually [OF that eventually_sequentiallyI])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. ?c1 \<le> x \<Longrightarrow> (\<Sum>k\<le>x. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>x. Fourier_coefficient f k * trigonometric_set k t) - f t
[PROOF STEP]
show "(\<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t)
        = (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t"
      if "Suc 0 \<le> n" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t
[PROOF STEP]
have "(\<Sum>k = Suc 0..n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t)
          = (\<Sum>k = Suc 0..n. Fourier_coefficient f k * trigonometric_set k t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k = Suc 0..n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k = Suc 0..n. Fourier_coefficient f k * trigonometric_set k t)
[PROOF STEP]
proof (rule sum.cong [OF refl])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {Suc 0..n} \<Longrightarrow> Fourier_coefficient (\<lambda>x. f x - f t) x * trigonometric_set x t = Fourier_coefficient f x * trigonometric_set x t
[PROOF STEP]
fix k
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> {Suc 0..n} \<Longrightarrow> Fourier_coefficient (\<lambda>x. f x - f t) x * trigonometric_set x t = Fourier_coefficient f x * trigonometric_set x t
[PROOF STEP]
assume k: "k \<in> {Suc 0..n}"
[PROOF STATE]
proof (state)
this:
k \<in> {Suc 0..n}

goal (1 subgoal):
 1. \<And>x. x \<in> {Suc 0..n} \<Longrightarrow> Fourier_coefficient (\<lambda>x. f x - f t) x * trigonometric_set x t = Fourier_coefficient f x * trigonometric_set x t
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
k \<in> {Suc 0..n}
[PROOF STEP]
have [simp]: "integral\<^sup>L (lebesgue_on {-pi..pi}) (trigonometric_set k) = 0"
[PROOF STATE]
proof (prove)
using this:
k \<in> {Suc 0..n}

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (trigonometric_set k) = 0
[PROOF STEP]
by (auto simp: trigonometric_set_def)
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (lebesgue_on {- pi..pi}) (trigonometric_set k) = 0

goal (1 subgoal):
 1. \<And>x. x \<in> {Suc 0..n} \<Longrightarrow> Fourier_coefficient (\<lambda>x. f x - f t) x * trigonometric_set x t = Fourier_coefficient f x * trigonometric_set x t
[PROOF STEP]
show "Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t = Fourier_coefficient f k * trigonometric_set k t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t = Fourier_coefficient f k * trigonometric_set k t
[PROOF STEP]
using k
[PROOF STATE]
proof (prove)
using this:
k \<in> {Suc 0..n}

goal (1 subgoal):
 1. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t = Fourier_coefficient f k * trigonometric_set k t
[PROOF STEP]
unfolding Fourier_coefficient_def orthonormal_coeff_def l2product_def
[PROOF STATE]
proof (prove)
using this:
k \<in> {Suc 0..n}

goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. trigonometric_set k x * (f x - f t)) * trigonometric_set k t = (LINT x|lebesgue_on {- pi..pi}. trigonometric_set k x * f x) * trigonometric_set k t
[PROOF STEP]
by (simp add: right_diff_distrib f absolutely_integrable_measurable_real trigonometric_set_mul_integrable)
[PROOF STATE]
proof (state)
this:
Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t = Fourier_coefficient f k * trigonometric_set k t

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>k = Suc 0..n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k = Suc 0..n. Fourier_coefficient f k * trigonometric_set k t)

goal (1 subgoal):
 1. (\<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<Sum>k = Suc 0..n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k = Suc 0..n. Fourier_coefficient f k * trigonometric_set k t)

goal (1 subgoal):
 1. (\<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t
[PROOF STEP]
have "Fourier_coefficient (\<lambda>x. f x - f t) 0 * trigonometric_set 0 t =
                     Fourier_coefficient f 0 * trigonometric_set 0 t - f t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Fourier_coefficient (\<lambda>x. f x - f t) 0 * trigonometric_set 0 t = Fourier_coefficient f 0 * trigonometric_set 0 t - f t
[PROOF STEP]
using f
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on {- pi..pi}

goal (1 subgoal):
 1. Fourier_coefficient (\<lambda>x. f x - f t) 0 * trigonometric_set 0 t = Fourier_coefficient f 0 * trigonometric_set 0 t - f t
[PROOF STEP]
unfolding Fourier_coefficient_def orthonormal_coeff_def l2product_def
[PROOF STATE]
proof (prove)
using this:
f absolutely_integrable_on {- pi..pi}

goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. trigonometric_set 0 x * (f x - f t)) * trigonometric_set 0 t = (LINT x|lebesgue_on {- pi..pi}. trigonometric_set 0 x * f x) * trigonometric_set 0 t - f t
[PROOF STEP]
by (auto simp: divide_simps trigonometric_set absolutely_integrable_imp_integrable measure_restrict_space)
[PROOF STATE]
proof (state)
this:
Fourier_coefficient (\<lambda>x. f x - f t) 0 * trigonometric_set 0 t = Fourier_coefficient f 0 * trigonometric_set 0 t - f t

goal (1 subgoal):
 1. (\<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>k = Suc 0..n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k = Suc 0..n. Fourier_coefficient f k * trigonometric_set k t)
Fourier_coefficient (\<lambda>x. f x - f t) 0 * trigonometric_set 0 t = Fourier_coefficient f 0 * trigonometric_set 0 t - f t
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>k = Suc 0..n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k = Suc 0..n. Fourier_coefficient f k * trigonometric_set k t)
Fourier_coefficient (\<lambda>x. f x - f t) 0 * trigonometric_set 0 t = Fourier_coefficient f 0 * trigonometric_set 0 t - f t

goal (1 subgoal):
 1. (\<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t
[PROOF STEP]
by (simp add: sum.atLeast_Suc_atMost atMost_atLeast0)
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
Suc 0 \<le> ?n \<Longrightarrow> (\<Sum>k\<le>?n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) = (\<Sum>k\<le>?n. Fourier_coefficient f k * trigonometric_set k t) - f t

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 \<Longrightarrow> (\<lambda>n. (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 \<Longrightarrow> (\<lambda>n. (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
have "?\<Psi> \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0
[PROOF STEP]
have eq: "\<And>n. ?\<Psi> n = integral\<^sup>L (lebesgue_on {-pi..pi}) (\<lambda>x. sin((n + 1/2) * x) * ((f(x+t) - f t) / sin(x/2) / 2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t) = LINT x|lebesgue_on {- pi..pi}. sin ((real n + 1 / 2) * x) * ((f (x + t) - f t) / sin (x / 2) / 2)
[PROOF STEP]
unfolding Dirichlet_kernel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. LINT x|lebesgue_on {- pi..pi}. (if x = 0 then real n + 1 / 2 else sin ((real n + 1 / 2) * x) / (2 * sin (x / 2))) * (f (x + t) - f t) = LINT x|lebesgue_on {- pi..pi}. sin ((real n + 1 / 2) * x) * ((f (x + t) - f t) / sin (x / 2) / 2)
[PROOF STEP]
by (rule Bochner_Integration.integral_cong [OF refl]) (auto simp: divide_simps sin_zero_iff)
[PROOF STATE]
proof (state)
this:
LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel ?n x * (f (x + t) - f t) = LINT x|lebesgue_on {- pi..pi}. sin ((real ?n + 1 / 2) * x) * ((f (x + t) - f t) / sin (x / 2) / 2)

goal (1 subgoal):
 1. (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0
[PROOF STEP]
unfolding eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. sin ((real n + 1 / 2) * x) * ((f (x + t) - f t) / sin (x / 2) / 2)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (intro ft set_integrable_divide Riemann_lebesgue_sin_half)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 = (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 \<Longrightarrow> (\<lambda>n. (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t) \<longlonglongrightarrow> 0
(\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 = (\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient (\<lambda>x. f x - f t) k * trigonometric_set k t) \<longlonglongrightarrow> 0 \<Longrightarrow> (\<lambda>n. (\<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) - f t) \<longlonglongrightarrow> 0
(\<lambda>n. LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * (f (x + t) - f t)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t
[PROOF STEP]
by (simp add: LIM_zero_cancel)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. \<Sum>k\<le>n. Fourier_coefficient f k * trigonometric_set k t) \<longlonglongrightarrow> f t

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Min_set_partition_covers0:
  assumes "finite As"
  assumes "As \<noteq> {}"
  assumes "As \<subseteq> carrier (SA m)"
  assumes "is_semialgebraic m B"
  shows "\<Union> ((\<inter>)B  ` (Min_set m As ` As)) = B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> ((\<inter>) B ` Min_set m As ` As) = B
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Union> ((\<inter>) B ` Min_set m As ` As) = B
[PROOF STEP]
have 0: "\<Union> ((\<inter>)B  ` (Min_set m As ` As)) = B \<inter> \<Union> (Min_set m As ` As)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> ((\<inter>) B ` Min_set m As ` As) = B \<inter> \<Union> (Min_set m As ` As)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<Union> ((\<inter>) B ` Min_set m As ` As) = B \<inter> \<Union> (Min_set m As ` As)

goal (1 subgoal):
 1. \<Union> ((\<inter>) B ` Min_set m As ` As) = B
[PROOF STEP]
have 1: "B \<subseteq> carrier (Q\<^sub>p\<^bsup>m\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<subseteq> carrier (Q\<^sub>p\<^bsup>m\<^esup>)
[PROOF STEP]
using assms is_semialgebraic_closed
[PROOF STATE]
proof (prove)
using this:
finite As
As \<noteq> {}
As \<subseteq> carrier (SA m)
is_semialgebraic m B
is_semialgebraic ?n ?S \<Longrightarrow> ?S \<subseteq> carrier (Q\<^sub>p\<^bsup>?n\<^esup>)

goal (1 subgoal):
 1. B \<subseteq> carrier (Q\<^sub>p\<^bsup>m\<^esup>)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
B \<subseteq> carrier (Q\<^sub>p\<^bsup>m\<^esup>)

goal (1 subgoal):
 1. \<Union> ((\<inter>) B ` Min_set m As ` As) = B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> ((\<inter>) B ` Min_set m As ` As) = B
[PROOF STEP]
unfolding 0
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<inter> \<Union> (Min_set m As ` As) = B
[PROOF STEP]
using 1 assms Min_sets_cover[of As m]
[PROOF STATE]
proof (prove)
using this:
B \<subseteq> carrier (Q\<^sub>p\<^bsup>m\<^esup>)
finite As
As \<noteq> {}
As \<subseteq> carrier (SA m)
is_semialgebraic m B
\<lbrakk>As \<noteq> {}; finite As\<rbrakk> \<Longrightarrow> carrier (Q\<^sub>p\<^bsup>m\<^esup>) = \<Union> (Min_set m As ` As)

goal (1 subgoal):
 1. B \<inter> \<Union> (Min_set m As ` As) = B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<Union> ((\<inter>) B ` Min_set m As ` As) = B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in PolynRg) polyn_mem:"\<lbrakk>pol_coeff S c; k \<le> (fst c)\<rbrakk> \<Longrightarrow>
                                        polyn_expr R X k c \<in> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pol_coeff S c; k \<le> fst c\<rbrakk> \<Longrightarrow> polyn_expr R X k c \<in> carrier R
[PROOF STEP]
apply (simp add:polyn_expr_def,
       cut_tac ring_is_ag)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pol_coeff S c; k \<le> fst c; aGroup R\<rbrakk> \<Longrightarrow> \<Sigma>\<^sub>e R (\<lambda>j. snd c j \<cdot>\<^sub>r X^\<^bsup>R j\<^esup>) k \<in> carrier R
[PROOF STEP]
apply (rule aGroup.nsum_mem[of R k "\<lambda>j. (snd c) j \<cdot>\<^sub>r X^\<^bsup>R j\<^esup>"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>pol_coeff S c; k \<le> fst c; aGroup R\<rbrakk> \<Longrightarrow> \<forall>j\<le>k. snd c j \<cdot>\<^sub>r X^\<^bsup>R j\<^esup> \<in> carrier R
[PROOF STEP]
apply (simp add:monomial_mem)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma rtos_r_s:"\<lbrakk>0 < r; 0 < s\<rbrakk> \<Longrightarrow> rtos r s (r * s - Suc 0) = r * s - Suc 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < r; 0 < s\<rbrakk> \<Longrightarrow> rtos r s (r * s - Suc 0) = r * s - Suc 0
[PROOF STEP]
apply (simp add:rtos_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < r; 0 < s\<rbrakk> \<Longrightarrow> (r * s - Suc 0) mod s * r + (r * s - Suc 0) div s = r * s - Suc 0
[PROOF STEP]
apply (frule r_s_div_s [of "r" "s"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < r; 0 < s; (r * s - Suc 0) div s = r - Suc 0\<rbrakk> \<Longrightarrow> (r * s - Suc 0) mod s * r + (r * s - Suc 0) div s = r * s - Suc 0
[PROOF STEP]
apply (frule r_s_mod_s [of "r" "s"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < r; 0 < s; (r * s - Suc 0) div s = r - Suc 0; (r * s - Suc 0) mod s = s - Suc 0\<rbrakk> \<Longrightarrow> (r * s - Suc 0) mod s * r + (r * s - Suc 0) div s = r * s - Suc 0
[PROOF STEP]
apply (simp, simp add:diff_mult_distrib, simp add:mult.commute)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma c_def_rec:
  "i < j \<Longrightarrow> c i j = Min ((\<lambda>k. c i (k-1) + c k j + w i j) ` {i+1..j})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < j \<Longrightarrow> c i j = (MIN k\<in>{i + 1..j}. c i (k - 1) + c k j + w i j)
[PROOF STEP]
using c_def c_k_def
[PROOF STATE]
proof (prove)
using this:
?i < ?j \<Longrightarrow> c ?i ?j = Min (c_k ?i ?j ` {?i + 1..?j})
\<lbrakk>?i < ?j; ?k \<in> {?i + 1..?j}\<rbrakk> \<Longrightarrow> c_k ?i ?j ?k = w ?i ?j + c ?i (?k - 1) + c ?k ?j

goal (1 subgoal):
 1. i < j \<Longrightarrow> c i j = (MIN k\<in>{i + 1..j}. c i (k - 1) + c k j + w i j)
[PROOF STEP]
by (auto simp: algebra_simps image_def)


[STATEMENT]
lemma lambda_eq_eq[simp]: "(\<lambda>x y. y = x) = (=)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x y. y = x) = (=)
[PROOF STEP]
apply (intro ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. (y = x) = (x = y)
[PROOF STEP]
by blast


[STATEMENT]
lemma real_ereal_bound_lemma_down:
  assumes s: "s \<in> real_of_ereal ` {a<..<b}"
  and t: "t \<notin> real_of_ereal ` {a<..<b}"
  and "t \<le> s"
  shows "a \<noteq> - \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> - \<infinity>
[PROOF STEP]
proof (cases b)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>r. b = ereal r \<Longrightarrow> a \<noteq> - \<infinity>
 2. b = \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
 3. b = - \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
[PROOF STEP]
case (real r)
[PROOF STATE]
proof (state)
this:
b = ereal r

goal (3 subgoals):
 1. \<And>r. b = ereal r \<Longrightarrow> a \<noteq> - \<infinity>
 2. b = \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
 3. b = - \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
b = ereal r
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
b = ereal r

goal (1 subgoal):
 1. a \<noteq> - \<infinity>
[PROOF STEP]
using assms real_greaterThanLessThan_minus_infinity_eq
[PROOF STATE]
proof (prove)
using this:
b = ereal r
s \<in> real_of_ereal ` {a<..<b}
t \<notin> real_of_ereal ` {a<..<b}
t \<le> s
real_of_ereal ` {- \<infinity><..<?N} = (if ?N = \<infinity> then UNIV else if ?N = - \<infinity> then {} else {..<real_of_ereal ?N})

goal (1 subgoal):
 1. a \<noteq> - \<infinity>
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
a \<noteq> - \<infinity>

goal (2 subgoals):
 1. b = \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
 2. b = - \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. b = \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
 2. b = - \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
[PROOF STEP]
case PInf
[PROOF STATE]
proof (state)
this:
b = \<infinity>

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

goal (1 subgoal):
 1. a \<noteq> - \<infinity>
[PROOF STEP]
using t real_greaterThanLessThan_infinity_eq
[PROOF STATE]
proof (prove)
using this:
b = \<infinity>
t \<notin> real_of_ereal ` {a<..<b}
real_of_ereal ` {?N<..<\<infinity>} = (if ?N = \<infinity> then {} else if ?N = - \<infinity> then UNIV else {real_of_ereal ?N<..})

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

goal (1 subgoal):
 1. b = - \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. b = - \<infinity> \<Longrightarrow> a \<noteq> - \<infinity>
[PROOF STEP]
case MInf
[PROOF STATE]
proof (state)
this:
b = - \<infinity>

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

goal (1 subgoal):
 1. a \<noteq> - \<infinity>
[PROOF STEP]
using s
[PROOF STATE]
proof (prove)
using this:
b = - \<infinity>
s \<in> real_of_ereal ` {a<..<b}

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma conjl1_iff: "x \<lhd> y \<le> z \<longleftrightarrow> x \<le> -(-z\<cdot>y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<lhd> y \<le> z) = (x \<le> - (- z \<cdot> y))
[PROOF STEP]
by (metis conjugate_l_def compl_le_swap1 compl_le_swap2 resl_galois)


[STATEMENT]
lemma einterpret_uminus[simp]:
  shows "(einterpret (map (\<lambda>i. - fa1 i) [0..<DIM('a)]) vs::'a::executable_euclidean_space) =
    - einterpret (map fa1 [0..<DIM('a)]) vs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. einterpret (map (\<lambda>i. - fa1 i) [0..<DIM('a)]) vs = - einterpret (map fa1 [0..<DIM('a)]) vs
[PROOF STEP]
by (auto intro!: euclidean_eqI[where 'a='a] simp: algebra_simps eucl_of_list_inner)


[STATEMENT]
lemma biQuot_diff[simp]: "biQuot a b (A - B) = biQuot a b A - biQuot a b B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. biQuot a b (A - B) = biQuot a b A - biQuot a b B
[PROOF STEP]
by(auto simp add: biQuot_def)


[STATEMENT]
lemma vars_subset_dim_vec_to_lpoly_dim: "vars (vec_to_lpoly v) \<subseteq> {0..<dim_vec v}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vars (vec_to_lpoly v) \<subseteq> {0..<dim_vec v}
[PROOF STEP]
by (meson ivl_subset le_numeral_extra(3) order.trans vec_to_poly_dim_less
      vars_subset_0_dim_poly)


[STATEMENT]
lemma monom_mult_dist_left_minus:
  "monom_mult (c - d) t p = (monom_mult c t p) - (monom_mult (d::'b::ring) t p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monom_mult (c - d) t p = monom_mult c t p - monom_mult d t p
[PROOF STEP]
using monom_mult_dist_left[of c "-d" t p] monom_mult_uminus_left[of d t p]
[PROOF STATE]
proof (prove)
using this:
monom_mult (c + - d) t p = monom_mult c t p + monom_mult (- d) t p
monom_mult (- d) t p = - monom_mult d t p

goal (1 subgoal):
 1. monom_mult (c - d) t p = monom_mult c t p - monom_mult d t p
[PROOF STEP]
by simp


[STATEMENT]
lemma arctan_mult_mono: "0 \<le> x \<Longrightarrow> x \<le> y \<Longrightarrow> x * arctan y \<le> y * arctan x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> x; x \<le> y\<rbrakk> \<Longrightarrow> x * arctan y \<le> y * arctan x
[PROOF STEP]
using arctan_divide_mono[of x y]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < x; x \<le> y\<rbrakk> \<Longrightarrow> arctan y / y \<le> arctan x / x

goal (1 subgoal):
 1. \<lbrakk>0 \<le> x; x \<le> y\<rbrakk> \<Longrightarrow> x * arctan y \<le> y * arctan x
[PROOF STEP]
by (cases "x = 0") (simp_all add: field_simps)


[STATEMENT]
lemma unit_factor_snd_quot_of_fract: "unit_factor (snd (quot_of_fract x)) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unit_factor (snd (quot_of_fract x)) = (1::'a)
[PROOF STEP]
using quot_of_fract_in_normalized_fracts[of x]
[PROOF STATE]
proof (prove)
using this:
quot_of_fract x \<in> normalized_fracts

goal (1 subgoal):
 1. unit_factor (snd (quot_of_fract x)) = (1::'a)
[PROOF STEP]
by (simp add: normalized_fracts_def case_prod_unfold)


[STATEMENT]
lemma fcard_fminus2_less:
  "x |\<in>| A \<Longrightarrow> y |\<in>| A \<Longrightarrow> fcard (A |-| {|x|} |-| {|y|}) < fcard A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x |\<in>| A; y |\<in>| A\<rbrakk> \<Longrightarrow> fcard (A |-| {|x|} |-| {|y|}) < fcard A
[PROOF STEP]
by transfer (rule card_Diff2_less)


[STATEMENT]
lemma eq_subst_type_scheme_eq_free:
  "\<lbrakk> $ S1 (sch::type_scheme) = $ S2 sch; n:(free_tv sch) \<rbrakk> \<Longrightarrow> S1 n = S2 n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>$ S1 sch = $ S2 sch; n \<in> free_tv sch\<rbrakk> \<Longrightarrow> S1 n = S2 n
[PROOF STEP]
by (induction "sch") (auto dest: mk_scheme_injective)


[STATEMENT]
lemma ent_disjE: "\<lbrakk> A\<Longrightarrow>\<^sub>AC; B\<Longrightarrow>\<^sub>AC \<rbrakk> \<Longrightarrow> A\<or>\<^sub>AB \<Longrightarrow>\<^sub>AC"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<Longrightarrow>\<^sub>A C; B \<Longrightarrow>\<^sub>A C\<rbrakk> \<Longrightarrow> A \<or>\<^sub>A B \<Longrightarrow>\<^sub>A C
[PROOF STEP]
unfolding entails_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>h. h \<Turnstile> A \<longrightarrow> h \<Turnstile> C; \<forall>h. h \<Turnstile> B \<longrightarrow> h \<Turnstile> C\<rbrakk> \<Longrightarrow> \<forall>h. h \<Turnstile> A \<or>\<^sub>A B \<longrightarrow> h \<Turnstile> C
[PROOF STEP]
by auto


[STATEMENT]
lemma finite_Invs[simp]:  "finite(Inv xs ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (Inv xs ys)
[PROOF STEP]
apply(rule finite_subset[where B = "set xs \<times> set ys"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. Inv xs ys \<subseteq> set xs \<times> set ys
 2. finite (set xs \<times> set ys)
[PROOF STEP]
apply(auto simp add: Inv_def before_in_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b. \<lbrakk>index xs a < index xs b; b \<in> set xs; index ys b < index ys a; a \<in> set ys\<rbrakk> \<Longrightarrow> a \<in> set xs
 2. \<And>a b. \<lbrakk>index xs a < index xs b; b \<in> set xs; index ys b < index ys a; a \<in> set ys\<rbrakk> \<Longrightarrow> b \<in> set ys
[PROOF STEP]
apply(metis index_conv_size_if_notin index_less_size_conv less_asym)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma prod_rel_range[simp]: "Range (A \<times>\<^sub>r B) = Range A \<times> Range B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Range (A \<times>\<^sub>r B) = Range A \<times> Range B
[PROOF STEP]
unfolding prod_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Range {((a, b), a', b'). (a, a') \<in> A \<and> (b, b') \<in> B} = Range A \<times> Range B
[PROOF STEP]
by auto


[STATEMENT]
lemma mat_inverse_same: "mat_inverse_var A = mat_inverse A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_inverse_var A = mat_inverse A
[PROOF STEP]
unfolding mat_inverse_var_def mat_inverse_def mat_equal_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if dim_row A = dim_col A then let one = 1\<^sub>m (dim_row A) in case gauss_jordan A one of (B, C) \<Rightarrow> if dim_row B = dim_row one \<and> dim_col B = dim_col one \<and> mat_to_list B = mat_to_list one then Some C else None else None) = (if dim_row A = dim_col A then let one = 1\<^sub>m (dim_row A) in case gauss_jordan A one of (B, C) \<Rightarrow> if B = one then Some C else None else None)
[PROOF STEP]
using mat_equal_list_lem
[PROOF STATE]
proof (prove)
using this:
dim_row ?A = dim_row ?B \<and> dim_col ?A = dim_col ?B \<and> mat_to_list ?A = mat_to_list ?B \<Longrightarrow> ?A = ?B

goal (1 subgoal):
 1. (if dim_row A = dim_col A then let one = 1\<^sub>m (dim_row A) in case gauss_jordan A one of (B, C) \<Rightarrow> if dim_row B = dim_row one \<and> dim_col B = dim_col one \<and> mat_to_list B = mat_to_list one then Some C else None else None) = (if dim_row A = dim_col A then let one = 1\<^sub>m (dim_row A) in case gauss_jordan A one of (B, C) \<Rightarrow> if B = one then Some C else None else None)
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A B. dim_row A = dim_row B \<and> dim_col A = dim_col B \<and> mat_to_list A = mat_to_list B \<Longrightarrow> A = B) \<Longrightarrow> dim_row A = dim_col A \<longrightarrow> (let one = 1\<^sub>m (dim_col A) in case gauss_jordan A one of (B, C) \<Rightarrow> if dim_row B = dim_col A \<and> dim_col B = dim_col A \<and> mat_to_list B = mat_to_list one then Some C else None) = (let one = 1\<^sub>m (dim_col A) in case gauss_jordan A one of (B, C) \<Rightarrow> if B = one then Some C else None)
[PROOF STEP]
by (smt case_prod_beta index_one_mat(2) index_one_mat(3) mat_equal_list_lem)


[STATEMENT]
lemma ground_subst_fv_subset': "ground (subst_range \<theta>) \<Longrightarrow> fv\<^sub>s\<^sub>e\<^sub>t (M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>) \<subseteq> fv\<^sub>s\<^sub>e\<^sub>t M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ground (subst_range \<theta>) \<Longrightarrow> fv\<^sub>s\<^sub>e\<^sub>t (M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>) \<subseteq> fv\<^sub>s\<^sub>e\<^sub>t M
[PROOF STEP]
using subst_fv_bounded_if_img_bounded'[of \<theta> M]
[PROOF STATE]
proof (prove)
using this:
range_vars \<theta> \<subseteq> fv\<^sub>s\<^sub>e\<^sub>t M \<Longrightarrow> fv\<^sub>s\<^sub>e\<^sub>t (M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>) \<subseteq> fv\<^sub>s\<^sub>e\<^sub>t M

goal (1 subgoal):
 1. ground (subst_range \<theta>) \<Longrightarrow> fv\<^sub>s\<^sub>e\<^sub>t (M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>) \<subseteq> fv\<^sub>s\<^sub>e\<^sub>t M
[PROOF STEP]
unfolding range_vars_alt_def
[PROOF STATE]
proof (prove)
using this:
fv\<^sub>s\<^sub>e\<^sub>t (subst_range \<theta>) \<subseteq> fv\<^sub>s\<^sub>e\<^sub>t M \<Longrightarrow> fv\<^sub>s\<^sub>e\<^sub>t (M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>) \<subseteq> fv\<^sub>s\<^sub>e\<^sub>t M

goal (1 subgoal):
 1. ground (subst_range \<theta>) \<Longrightarrow> fv\<^sub>s\<^sub>e\<^sub>t (M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>) \<subseteq> fv\<^sub>s\<^sub>e\<^sub>t M
[PROOF STEP]
by auto


[STATEMENT]
lemma cf_cn_cov_comp_ArrMap_vrange:
  assumes "\<GG> : \<BB> \<^sub>C\<mapsto>\<mapsto>\<^bsub>\<alpha>\<^esub> \<CC>" and "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
  shows "\<R>\<^sub>\<circ> ((\<GG> \<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>) \<subseteq>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> ((\<GG> \<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>) \<subseteq>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> ((\<GG> \<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>) \<subseteq>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>
[PROOF STEP]
interpret L: is_functor \<alpha> \<open>op_cat \<BB>\<close> \<CC> \<GG>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<GG> : op_cat \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
[PROOF STEP]
by (rule assms(1))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> ((\<GG> \<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>) \<subseteq>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>
[PROOF STEP]
interpret R: is_functor \<alpha> \<AA> \<BB> \<FF>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>
[PROOF STEP]
by (rule assms(2))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> ((\<GG> \<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>) \<subseteq>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> ((\<GG> \<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>) \<subseteq>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>
[PROOF STEP]
by
      (
        rule smcf_cn_cov_comp_ArrMap_vrange
          [
            OF
              L.cf_is_semifunctor[unfolded slicing_commute[symmetric]]
              R.cf_is_semifunctor,
            unfolded slicing_commute slicing_simps
          ]
      )
[PROOF STATE]
proof (state)
this:
\<R>\<^sub>\<circ> ((\<GG> \<^sub>C\<^sub>F\<circ> \<FF>)\<lparr>ArrMap\<rparr>) \<subseteq>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma infinite_greaterThan_int: "infinite {(n::int)<..}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite {n<..}
[PROOF STEP]
apply (simp only: atLeast_remove[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite ({n..} - {n})
[PROOF STEP]
apply (rule Diff_infinite_finite[OF singleton_finite])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite {n..}
[PROOF STEP]
apply (rule infinite_atLeast_int)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cos_eq_minus1: "cos x = -1 \<longleftrightarrow> (\<exists>n::int. x = (2*n + 1) * pi)"
                      (is "_ = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
have "cos x = -1 \<longleftrightarrow> cos (complex_of_real x) = -1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cos x = - 1) = (cos (complex_of_real x) = - 1)
[PROOF STEP]
by (metis Re_complex_of_real of_real_def scaleR_minus1_left cos_of_real)
[PROOF STATE]
proof (state)
this:
(cos x = - 1) = (cos (complex_of_real x) = - 1)

goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(cos x = - 1) = (cos (complex_of_real x) = - 1)

goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
have "\<dots> \<longleftrightarrow> (\<exists>n::int. complex_of_real x = of_real(2 * n * pi) + pi)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cos (complex_of_real x) = - 1) = (\<exists>xa. complex_of_real x = complex_of_real (of_real (2 * real_of_int xa * pi) + pi))
[PROOF STEP]
by (simp add: ccos_eq_minus1)
[PROOF STATE]
proof (state)
this:
(cos (complex_of_real x) = - 1) = (\<exists>xa. complex_of_real x = complex_of_real (of_real (2 * real_of_int xa * pi) + pi))

goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(cos (complex_of_real x) = - 1) = (\<exists>xa. complex_of_real x = complex_of_real (of_real (2 * real_of_int xa * pi) + pi))

goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
have "\<dots> \<longleftrightarrow> (\<exists>n::int. x = of_real(2 * n * pi) + pi)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>xa. complex_of_real x = complex_of_real (of_real (2 * real_of_int xa * pi) + pi)) = (\<exists>xa. x = of_real (2 * real_of_int xa * pi) + pi)
[PROOF STEP]
by (rule iff_exI) (auto simp: algebra_simps intro: injD [OF inj_of_real [where 'a = complex]])
[PROOF STATE]
proof (state)
this:
(\<exists>xa. complex_of_real x = complex_of_real (of_real (2 * real_of_int xa * pi) + pi)) = (\<exists>xa. x = of_real (2 * real_of_int xa * pi) + pi)

goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<exists>xa. complex_of_real x = complex_of_real (of_real (2 * real_of_int xa * pi) + pi)) = (\<exists>xa. x = of_real (2 * real_of_int xa * pi) + pi)

goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
have "\<dots> = ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>xa. x = of_real (2 * real_of_int xa * pi) + pi) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
by (auto simp: algebra_simps)
[PROOF STATE]
proof (state)
this:
(\<exists>xa. x = of_real (2 * real_of_int xa * pi) + pi) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)

goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)

goal (1 subgoal):
 1. (cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(cos x = - 1) = (\<exists>xa. x = (2 * real_of_int xa + 1) * pi)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ideal_insert':
  \<open>More_Modules.ideal (insert a S) = {y. \<exists>x k. y = x + k * a \<and> x \<in> More_Modules.ideal S}\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. More_Modules.ideal (insert a S) = {x + k * a |x k. x \<in> More_Modules.ideal S}
[PROOF STEP]
apply (auto simp: ideal.span_insert
      intro: exI[of _ \<open>_ - k * a\<close>])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x k. x - k * a \<in> More_Modules.ideal S \<Longrightarrow> \<exists>xa. (\<exists>k. x = xa + k * a) \<and> xa \<in> More_Modules.ideal S
 2. \<And>xa k. xa \<in> More_Modules.ideal S \<Longrightarrow> \<exists>ka. xa + k * a - ka * a \<in> More_Modules.ideal S
[PROOF STEP]
apply (rule_tac x = \<open>x - k * a\<close> in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x k. x - k * a \<in> More_Modules.ideal S \<Longrightarrow> (\<exists>ka. x = x - k * a + ka * a) \<and> x - k * a \<in> More_Modules.ideal S
 2. \<And>xa k. xa \<in> More_Modules.ideal S \<Longrightarrow> \<exists>ka. xa + k * a - ka * a \<in> More_Modules.ideal S
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa k. xa \<in> More_Modules.ideal S \<Longrightarrow> \<exists>ka. xa + k * a - ka * a \<in> More_Modules.ideal S
[PROOF STEP]
apply (rule_tac x = \<open>k\<close> in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa k. xa \<in> More_Modules.ideal S \<Longrightarrow> xa + k * a - k * a \<in> More_Modules.ideal S
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in Corps) OstrowskiTr32:"\<lbrakk>valuation K v; s \<in> carrier K;
           0 < (v (1\<^sub>r \<plusminus> (-\<^sub>a s)))\<rbrakk> \<Longrightarrow> 0 \<le> (v s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; s \<in> carrier K; 0 < v (1\<^sub>r \<plusminus> -\<^sub>a s)\<rbrakk> \<Longrightarrow> 0 \<le> v s
[PROOF STEP]
apply (rule contrapos_pp, simp+,
       cut_tac field_is_ring, frule Ring.ring_is_ag[of "K"],
       simp add:aneg_le,
       frule has_val_one_neq_zero[of "v"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; s \<in> carrier K; 0 < v (1\<^sub>r \<plusminus> -\<^sub>a s); v s < 0; Ring K; aGroup K; 1\<^sub>r \<noteq> \<zero>\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (frule OstrowskiTr31[of v s], assumption+,
       frule not_sym,
       frule Ring.ring_one[of "K"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; s \<in> carrier K; 0 < v (1\<^sub>r \<plusminus> -\<^sub>a s); v s < 0; Ring K; aGroup K; 1\<^sub>r \<noteq> \<zero>; s \<noteq> \<zero>; \<zero> \<noteq> 1\<^sub>r; 1\<^sub>r \<in> carrier K\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (frule value_less_eq[THEN sym, of v "-\<^sub>a s" "1\<^sub>r"],
       simp add:aGroup.ag_mOp_closed, assumption+,
       simp add:val_minus_eq)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>valuation K v; s \<in> carrier K; 0 < v (1\<^sub>r \<plusminus> -\<^sub>a s); v s < 0; Ring K; aGroup K; s \<noteq> \<zero>; \<zero> \<noteq> 1\<^sub>r; 1\<^sub>r \<in> carrier K\<rbrakk> \<Longrightarrow> v s < v 1\<^sub>r
 2. \<lbrakk>valuation K v; s \<in> carrier K; 0 < v (1\<^sub>r \<plusminus> -\<^sub>a s); v s < 0; Ring K; aGroup K; 1\<^sub>r \<noteq> \<zero>; s \<noteq> \<zero>; \<zero> \<noteq> 1\<^sub>r; 1\<^sub>r \<in> carrier K; v (-\<^sub>a s \<plusminus> 1\<^sub>r) = v (-\<^sub>a s)\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (simp add:value_of_one,
       frule aGroup.ag_mOp_closed[of "K" "s"], assumption+,
       simp add:aGroup.ag_pOp_commute[of "K" "-\<^sub>a s" "1\<^sub>r"],
       simp add:val_minus_eq)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma select_finite:
  assumes "finite S"
  shows "finite (select f S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
have "finite (f ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (f ` S)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite S

goal (1 subgoal):
 1. finite (f ` S)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite (f ` S)

goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite (f ` S)

goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
have "Some ` (select f S) \<subseteq> f ` S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Some ` select f S \<subseteq> f ` S
[PROOF STEP]
unfolding select_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Some ` {z |z. \<exists>x\<in>S. f x = Some z} \<subseteq> f ` S
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
Some ` select f S \<subseteq> f ` S

goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite (f ` S)
Some ` select f S \<subseteq> f ` S
[PROOF STEP]
have "finite (Some ` select f S)"
[PROOF STATE]
proof (prove)
using this:
finite (f ` S)
Some ` select f S \<subseteq> f ` S

goal (1 subgoal):
 1. finite (Some ` select f S)
[PROOF STEP]
by (rule rev_finite_subset)
[PROOF STATE]
proof (state)
this:
finite (Some ` select f S)

goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite (Some ` select f S)

goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
have "\<And>S. inj_on Some S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>S. inj_on Some S
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
inj_on Some ?S

goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite (Some ` select f S)
inj_on Some ?S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite (Some ` select f S)
inj_on Some ?S

goal (1 subgoal):
 1. finite (select f S)
[PROOF STEP]
by (rule finite_imageD)
[PROOF STATE]
proof (state)
this:
finite (select f S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Next_not_member: "finite S \<Longrightarrow> Next S \<notin> S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite S \<Longrightarrow> Next S \<notin> S
[PROOF STEP]
by (rule Next_not_member_subset) auto


[STATEMENT]
lemma scale_cancel_left [simp]: "scale a x = scale a y \<longleftrightarrow> x = y \<or> a = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a *s x = a *s y) = (x = y \<or> a = (0::'a))
[PROOF STEP]
by (auto intro: scale_left_imp_eq)


[STATEMENT]
lemma seq_filter_increasing:
  assumes "\<forall>n::nat. \<exists>m. m > n \<and> P (s m)"
  shows "is_increasing (seq_filter s P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_increasing (seq_filter s P)
[PROOF STEP]
by (metis assms seq_filter_pre_increasing is_increasingI lift_Suc_mono_less)


[STATEMENT]
lemma card_of_Un_infinite:
assumes INF: "\<not>finite A" and LEQ: "|B| \<le>o |A|"
shows "|A \<union> B| =o |A| \<and> |B \<union> A| =o |A|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
have "|A \<union> B| \<le>o |A <+> B|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |A \<union> B| \<le>o |A <+> B|
[PROOF STEP]
by (rule card_of_Un_Plus_ordLeq)
[PROOF STATE]
proof (state)
this:
|A \<union> B| \<le>o |A <+> B|

goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
|A \<union> B| \<le>o |A <+> B|

goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
have "|A <+> B| =o |A|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |A <+> B| =o |A|
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
infinite A
|B| \<le>o |A|

goal (1 subgoal):
 1. |A <+> B| =o |A|
[PROOF STEP]
by (metis card_of_Plus_infinite)
[PROOF STATE]
proof (state)
this:
|A <+> B| =o |A|

goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
|A \<union> B| \<le>o |A <+> B|
|A <+> B| =o |A|
[PROOF STEP]
have "|A \<union> B| \<le>o |A|"
[PROOF STATE]
proof (prove)
using this:
|A \<union> B| \<le>o |A <+> B|
|A <+> B| =o |A|

goal (1 subgoal):
 1. |A \<union> B| \<le>o |A|
[PROOF STEP]
using ordLeq_ordIso_trans
[PROOF STATE]
proof (prove)
using this:
|A \<union> B| \<le>o |A <+> B|
|A <+> B| =o |A|
\<lbrakk>?r \<le>o ?r'; ?r' =o ?r''\<rbrakk> \<Longrightarrow> ?r \<le>o ?r''

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

goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
hence "|A \<union> B| =o |A|"
[PROOF STATE]
proof (prove)
using this:
|A \<union> B| \<le>o |A|

goal (1 subgoal):
 1. |A \<union> B| =o |A|
[PROOF STEP]
using card_of_Un1 ordIso_iff_ordLeq
[PROOF STATE]
proof (prove)
using this:
|A \<union> B| \<le>o |A|
|?A| \<le>o |?A \<union> ?B|
(?r =o ?r') = (?r \<le>o ?r' \<and> ?r' \<le>o ?r)

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

goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
|A \<union> B| =o |A|

goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
using Un_commute[of B A]
[PROOF STATE]
proof (prove)
using this:
|A \<union> B| =o |A|
B \<union> A = A \<union> B

goal (1 subgoal):
 1. |A \<union> B| =o |A| \<and> |B \<union> A| =o |A|
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
|A \<union> B| =o |A| \<and> |B \<union> A| =o |A|

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fixp_above_Field: "a \<in> Field leq \<Longrightarrow> fixp_above a \<in> Field leq"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> Field leq \<Longrightarrow> fixp_above a \<in> Field leq
[PROOF STEP]
using fixp_iterates_above
[PROOF STATE]
proof (prove)
using this:
fixp_above ?a \<in> iterates_above ?a

goal (1 subgoal):
 1. a \<in> Field leq \<Longrightarrow> fixp_above a \<in> Field leq
[PROOF STEP]
by(rule iterates_above_Field)


[STATEMENT]
lemma proj_tuple_merge: "sorted_distinct (map fst nxs) \<Longrightarrow> sorted_distinct (map fst mys) \<Longrightarrow>
  set (map fst nxs) \<inter> set (map fst mys) = {} \<Longrightarrow>
  proj_tuple (map fst nxs) (merge nxs mys) = map snd nxs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>sorted_distinct (map fst nxs); sorted_distinct (map fst mys); set (map fst nxs) \<inter> set (map fst mys) = {}\<rbrakk> \<Longrightarrow> proj_tuple (map fst nxs) (merge nxs mys) = map snd nxs
[PROOF STEP]
using proj_tuple_idle
[PROOF STATE]
proof (prove)
using this:
proj_tuple (map fst ?nxs) ?nxs = map snd ?nxs

goal (1 subgoal):
 1. \<lbrakk>sorted_distinct (map fst nxs); sorted_distinct (map fst mys); set (map fst nxs) \<inter> set (map fst mys) = {}\<rbrakk> \<Longrightarrow> proj_tuple (map fst nxs) (merge nxs mys) = map snd nxs
[PROOF STEP]
by (induction nxs mys rule: merge.induct) auto+


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


[STATEMENT]
lemma pred_countable_Ex1 [measurable]:
  "(\<And>i :: _ :: countable. Measurable.pred M (\<lambda>x. P i x))
  \<Longrightarrow> Measurable.pred M (\<lambda>x. \<exists>!i. P i x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. Measurable.pred M (P i)) \<Longrightarrow> Measurable.pred M (\<lambda>x. \<exists>!i. P i x)
[PROOF STEP]
unfolding pred_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. {x \<in> space M. P i x} \<in> sets M) \<Longrightarrow> {x \<in> space M. \<exists>!i. P i x} \<in> sets M
[PROOF STEP]
by(rule sets.sets_Collect_countable_Ex1)


[STATEMENT]
lemma set_times_mono2 [intro]: "C \<subseteq> D \<Longrightarrow> E \<subseteq> F \<Longrightarrow> C * E \<subseteq> D * F"
  for C D E F :: "'a::times set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>C \<subseteq> D; E \<subseteq> F\<rbrakk> \<Longrightarrow> C * E \<subseteq> D * F
[PROOF STEP]
by (auto simp add: set_times_def)


[STATEMENT]
lemma USUP_cong:
  assumes "\<And> P. P \<in> A \<Longrightarrow> F(P) = G(P)"
  shows "(\<Squnion> P\<in>A \<bullet> F(P)) = (\<Squnion> P\<in>A \<bullet> G(P))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Squnion> P \<in> A \<bullet> F P) = (\<Squnion> P \<in> A \<bullet> G P)
[PROOF STEP]
by (simp add: USUP_as_Inf_collect assms)


[STATEMENT]
lemma homeomorphic_map_compactness_eq:
   "homeomorphic_map X Y f
        \<Longrightarrow> compactin X U \<longleftrightarrow> U \<subseteq> topspace X \<and> compactin Y (f ` U)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homeomorphic_map X Y f \<Longrightarrow> compactin X U = (U \<subseteq> topspace X \<and> compactin Y (f ` U))
[PROOF STEP]
by (meson compactin_subset_topspace homeomorphic_map_compactness)


[STATEMENT]
lemma fps_X_fps_compose: "fps_X oo a = Abs_fps (\<lambda>n. if n = 0 then (0::'a::comm_ring_1) else a$n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_X oo a = Abs_fps (\<lambda>n. if n = 0 then 0::'a else a $ n)
[PROOF STEP]
by (simp add: fps_eq_iff fps_compose_nth mult_delta_left)


[STATEMENT]
theorem DFT_FFT:
  "!!a i. i < 2 ^ k ==> DFT (2 ^ k) a i = FFT k a i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a i. i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) a i = FFT k a i
[PROOF STEP]
proof (induct k)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a i. i < 2 ^ 0 \<Longrightarrow> DFT (2 ^ 0) a i = FFT 0 a i
 2. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) a i = FFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
i < 2 ^ 0

goal (2 subgoals):
 1. \<And>a i. i < 2 ^ 0 \<Longrightarrow> DFT (2 ^ 0) a i = FFT 0 a i
 2. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) a i = FFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < 2 ^ 0
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
i < 2 ^ 0

goal (1 subgoal):
 1. DFT (2 ^ 0) a i = FFT 0 a i
[PROOF STEP]
by (simp add: DFT_def)
[PROOF STATE]
proof (state)
this:
DFT (2 ^ 0) a i = FFT 0 a i

goal (1 subgoal):
 1. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) a i = FFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) a i = FFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
case (Suc k)
[PROOF STATE]
proof (state)
this:
?i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) ?a ?i = FFT k ?a ?i
i < 2 ^ Suc k

goal (1 subgoal):
 1. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) a i = FFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
assume i: "i < 2 ^ Suc k"
[PROOF STATE]
proof (state)
this:
i < 2 ^ Suc k

goal (1 subgoal):
 1. \<And>k a i. \<lbrakk>\<And>a i. i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) a i = FFT k a i; i < 2 ^ Suc k\<rbrakk> \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
proof (cases "i < 2 ^ k")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i < 2 ^ k \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
 2. \<not> i < 2 ^ k \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
i < 2 ^ k

goal (2 subgoals):
 1. i < 2 ^ k \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
 2. \<not> i < 2 ^ k \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < 2 ^ k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
i < 2 ^ k

goal (1 subgoal):
 1. DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < 2 ^ k \<Longrightarrow> DFT (2 * 2 ^ k) a i = FFT k (\<lambda>i. a (2 * i)) i + FFT.root (2 * 2 ^ k) ^ i * FFT k (\<lambda>i. a (Suc (2 * i))) i
[PROOF STEP]
apply (simp add: DFT_lower)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < 2 ^ k \<Longrightarrow> DFT (2 ^ k) (\<lambda>i. a (2 * i)) i + FFT.root (2 * 2 ^ k) ^ i * DFT (2 ^ k) (\<lambda>i. a (Suc (2 * i))) i = FFT k (\<lambda>i. a (2 * i)) i + FFT.root (2 * 2 ^ k) ^ i * FFT k (\<lambda>i. a (Suc (2 * i))) i
[PROOF STEP]
apply (simp add: Suc)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
DFT (2 ^ Suc k) a i = FFT (Suc k) a i

goal (1 subgoal):
 1. \<not> i < 2 ^ k \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> i < 2 ^ k \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> i < 2 ^ k

goal (1 subgoal):
 1. \<not> i < 2 ^ k \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
from i
[PROOF STATE]
proof (chain)
picking this:
i < 2 ^ Suc k
[PROOF STEP]
have "i - 2 ^ k < 2 ^ k"
[PROOF STATE]
proof (prove)
using this:
i < 2 ^ Suc k

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

goal (1 subgoal):
 1. \<not> i < 2 ^ k \<Longrightarrow> DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
with False i
[PROOF STATE]
proof (chain)
picking this:
\<not> i < 2 ^ k
i < 2 ^ Suc k
i - 2 ^ k < 2 ^ k
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> i < 2 ^ k
i < 2 ^ Suc k
i - 2 ^ k < 2 ^ k

goal (1 subgoal):
 1. DFT (2 ^ Suc k) a i = FFT (Suc k) a i
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<not> i < 2 ^ k; i < 2 * 2 ^ k; i - 2 ^ k < 2 ^ k\<rbrakk> \<Longrightarrow> DFT (2 * 2 ^ k) a i = FFT k (\<lambda>i. a (2 * i)) (i - 2 ^ k) - FFT.root (2 * 2 ^ k) ^ (i - 2 ^ k) * FFT k (\<lambda>i. a (Suc (2 * i))) (i - 2 ^ k)
[PROOF STEP]
apply (simp add: DFT_upper)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<not> i < 2 ^ k; i < 2 * 2 ^ k; i - 2 ^ k < 2 ^ k\<rbrakk> \<Longrightarrow> DFT (2 ^ k) (\<lambda>i. a (2 * i)) (i - 2 ^ k) - FFT.root (2 * 2 ^ k) ^ (i - 2 ^ k) * DFT (2 ^ k) (\<lambda>i. a (Suc (2 * i))) (i - 2 ^ k) = FFT k (\<lambda>i. a (2 * i)) (i - 2 ^ k) - FFT.root (2 * 2 ^ k) ^ (i - 2 ^ k) * FFT k (\<lambda>i. a (Suc (2 * i))) (i - 2 ^ k)
[PROOF STEP]
apply (simp add: Suc)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
DFT (2 ^ Suc k) a i = FFT (Suc k) a i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
DFT (2 ^ Suc k) a i = FFT (Suc k) a i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma S_bij_betw_chamber0: "bij_betw (\<lambda>s. \<langle>S-{s}\<rangle>) S (smap 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw (\<lambda>s. \<langle>S - {s}\<rangle>) S (dual_order.poset_simplex_map \<P> 0)
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>s. \<langle>S - {s}\<rangle>) S \<and> (\<lambda>s. \<langle>S - {s}\<rangle>) ` S = dual_order.poset_simplex_map \<P> 0
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. inj_on (\<lambda>s. \<langle>S - {s}\<rangle>) S
 2. (\<lambda>s. \<langle>S - {s}\<rangle>) ` S = dual_order.poset_simplex_map \<P> 0
[PROOF STEP]
show "inj_on (\<lambda>s. \<langle>S-{s}\<rangle>) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>s. \<langle>S - {s}\<rangle>) S
[PROOF STEP]
proof (rule inj_onI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> S; y \<in> S; \<langle>S - {x}\<rangle> = \<langle>S - {y}\<rangle>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
fix s t
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> S; y \<in> S; \<langle>S - {x}\<rangle> = \<langle>S - {y}\<rangle>\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
show "\<lbrakk> s\<in>S; t\<in>S; \<langle>S-{s}\<rangle> = \<langle>S-{t}\<rangle> \<rbrakk> \<Longrightarrow> s = t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>s \<in> S; t \<in> S; \<langle>S - {s}\<rangle> = \<langle>S - {t}\<rangle>\<rbrakk> \<Longrightarrow> s = t
[PROOF STEP]
using inj_onD[OF special_subgroup_inj, of "S-{s}" "S-{t}"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<langle>S - {s}\<rangle> = \<langle>S - {t}\<rangle>; S - {s} \<in> Pow S; S - {t} \<in> Pow S\<rbrakk> \<Longrightarrow> S - {s} = S - {t}

goal (1 subgoal):
 1. \<lbrakk>s \<in> S; t \<in> S; \<langle>S - {s}\<rangle> = \<langle>S - {t}\<rangle>\<rbrakk> \<Longrightarrow> s = t
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<lbrakk>s \<in> S; t \<in> S; \<langle>S - {s}\<rangle> = \<langle>S - {t}\<rangle>\<rbrakk> \<Longrightarrow> s = t

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>s. \<langle>S - {s}\<rangle>) S

goal (1 subgoal):
 1. (\<lambda>s. \<langle>S - {s}\<rangle>) ` S = dual_order.poset_simplex_map \<P> 0
[PROOF STEP]
qed (rule smap0_conv_special_subgroups[THEN sym])


[STATEMENT]
lemma disjoint_var_sum[disjoint_vars]: "disjoint_var (P1 \<^bold>+ P2) Q = (disjoint_var P1 Q \<and> disjoint_var P2 Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjoint_var (P1 \<^bold>+ P2) Q = (disjoint_var P1 Q \<and> disjoint_var P2 Q)
[PROOF STEP]
unfolding disjoint_var_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (var_set (P1 \<^bold>+ P2) \<inter> var_set Q = {}) = (var_set P1 \<inter> var_set Q = {} \<and> var_set P2 \<inter> var_set Q = {})
[PROOF STEP]
by auto


[STATEMENT]
lemma LIM_equal: "\<forall>x. x \<noteq> a \<longrightarrow> f x = g x \<Longrightarrow> (f \<midarrow>a\<rightarrow> l) \<longleftrightarrow> (g \<midarrow>a\<rightarrow> l)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. x \<noteq> a \<longrightarrow> f x = g x \<Longrightarrow> f \<midarrow>a\<rightarrow> l = g \<midarrow>a\<rightarrow> l
[PROOF STEP]
by (simp add: tendsto_def eventually_at_topological)


[STATEMENT]
lemma table_empty: "table n {} X \<longleftrightarrow> (X = empty_table \<or> X = unit_table n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. table n {} X = (X = empty_table \<or> X = unit_table n)
[PROOF STEP]
by (auto simp add: wf_tuple_empty unit_table_def table_def)


[STATEMENT]
lemma cat_ordinal_inj:
  assumes "cat_ordinal m = cat_ordinal n"
  shows "m = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m = n
[PROOF STEP]
by (metis assms cat_ordinal_components(1))


[STATEMENT]
lemma merge_eq: "xs\<noteq>[] \<or> ys\<noteq>[] \<Longrightarrow> merge xs ys = (
  if ys=[] \<or> (xs\<noteq>[] \<and> hd xs < hd ys) then hd xs # merge (tl xs) ys
  else hd ys # merge xs (tl ys)
  )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs \<noteq> [] \<or> ys \<noteq> [] \<Longrightarrow> merge xs ys = (if ys = [] \<or> xs \<noteq> [] \<and> hd xs < hd ys then hd xs # merge (tl xs) ys else hd ys # merge xs (tl ys))
[PROOF STEP]
by (cases xs; cases ys; simp)


[STATEMENT]
lemma contour_integrable_joinI:
  assumes "f contour_integrable_on g1" "f contour_integrable_on g2"
          "valid_path g1" "valid_path g2"
    shows "f contour_integrable_on (g1 +++ g2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f contour_integrable_on g1 +++ g2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f contour_integrable_on g1
f contour_integrable_on g2
valid_path g1
valid_path g2

goal (1 subgoal):
 1. f contour_integrable_on g1 +++ g2
[PROOF STEP]
by (meson has_contour_integral_join contour_integrable_on_def)


[STATEMENT]
lemma rsd_winners_map [simp]:
  "rsd_winners R alts (map f agents) = rsd_winners (R \<circ> f) alts agents"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rsd_winners R alts (map f agents) = rsd_winners (R \<circ> f) alts agents
[PROOF STEP]
by (simp add: rsd_winners_def foldr_map o_def)


[STATEMENT]
lemma path_connected_Ioo[simp]: "path_connected {a<..<b}" for a b :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connected {a<..<b}
[PROOF STEP]
by (simp add: convex_imp_path_connected)


[STATEMENT]
lemma cong_modulus_minus_iff [iff]:
  "[b = c] (mod - a) \<longleftrightarrow> [b = c] (mod a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [b = c] (mod - a) = [b = c] (mod a)
[PROOF STEP]
using cong_diff_iff_cong_0 [of b c a] cong_diff_iff_cong_0 [of b c " -a"]
[PROOF STATE]
proof (prove)
using this:
[b - c = 0::'a] (mod a) = [b = c] (mod a)
[b - c = 0::'a] (mod - a) = [b = c] (mod - a)

goal (1 subgoal):
 1. [b = c] (mod - a) = [b = c] (mod a)
[PROOF STEP]
by (simp add: cong_0_iff)


[STATEMENT]
lemma intersects_y_axis_positive_iff:
  assumes "is_poincare_line H" "H \<noteq> y_axis"
  shows "(\<exists> y \<in> unit_disc. y \<in> circline_set H \<inter> positive_y_axis) \<longleftrightarrow> intersects_y_axis_positive H" (is "?lhs \<longleftrightarrow> ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis) = intersects_y_axis_positive H
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis) = intersects_y_axis_positive H
[PROOF STEP]
let ?R = "moebius_rotation (-pi / 2)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis) = intersects_y_axis_positive H
[PROOF STEP]
let ?H' = "moebius_circline ?R H"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis) = intersects_y_axis_positive H
[PROOF STEP]
have 1: "is_poincare_line ?H'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_poincare_line (moebius_circline (moebius_rotation (- pi / 2)) H)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_poincare_line H
H \<noteq> y_axis

goal (1 subgoal):
 1. is_poincare_line (moebius_circline (moebius_rotation (- pi / 2)) H)
[PROOF STEP]
using unit_circle_fix_preserve_is_poincare_line[OF _ assms(1), of ?R]
[PROOF STATE]
proof (prove)
using this:
is_poincare_line H
H \<noteq> y_axis
unit_circle_fix (moebius_rotation (- pi / 2)) \<Longrightarrow> is_poincare_line (moebius_circline (moebius_rotation (- pi / 2)) H)

goal (1 subgoal):
 1. is_poincare_line (moebius_circline (moebius_rotation (- pi / 2)) H)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
is_poincare_line (moebius_circline (moebius_rotation (- pi / 2)) H)

goal (1 subgoal):
 1. (\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis) = intersects_y_axis_positive H
[PROOF STEP]
have 2: "moebius_circline ?R H \<noteq> x_axis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_circline (moebius_rotation (- pi / 2)) H \<noteq> x_axis
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> moebius_circline (moebius_rotation (- pi / 2)) H \<noteq> x_axis \<Longrightarrow> False
[PROOF STEP]
assume "\<not> ?thesis"
[PROOF STATE]
proof (state)
this:
\<not> moebius_circline (moebius_rotation (- pi / 2)) H \<noteq> x_axis

goal (1 subgoal):
 1. \<not> moebius_circline (moebius_rotation (- pi / 2)) H \<noteq> x_axis \<Longrightarrow> False
[PROOF STEP]
hence "H = moebius_circline (moebius_rotation (pi/2)) x_axis"
[PROOF STATE]
proof (prove)
using this:
\<not> moebius_circline (moebius_rotation (- pi / 2)) H \<noteq> x_axis

goal (1 subgoal):
 1. H = moebius_circline (moebius_rotation (pi / 2)) x_axis
[PROOF STEP]
using moebius_circline_comp_inv_left[of ?R H]
[PROOF STATE]
proof (prove)
using this:
\<not> moebius_circline (moebius_rotation (- pi / 2)) H \<noteq> x_axis
moebius_circline (moebius_inv (moebius_rotation (- pi / 2))) (moebius_circline (moebius_rotation (- pi / 2)) H) = H

goal (1 subgoal):
 1. H = moebius_circline (moebius_rotation (pi / 2)) x_axis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
H = moebius_circline (moebius_rotation (pi / 2)) x_axis

goal (1 subgoal):
 1. \<not> moebius_circline (moebius_rotation (- pi / 2)) H \<noteq> x_axis \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
H = moebius_circline (moebius_rotation (pi / 2)) x_axis

goal (1 subgoal):
 1. False
[PROOF STEP]
using \<open>H \<noteq> y_axis\<close>
[PROOF STATE]
proof (prove)
using this:
H = moebius_circline (moebius_rotation (pi / 2)) x_axis
H \<noteq> y_axis

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:
moebius_circline (moebius_rotation (- pi / 2)) H \<noteq> x_axis

goal (1 subgoal):
 1. (\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis) = intersects_y_axis_positive H
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis) = intersects_y_axis_positive H
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis \<Longrightarrow> intersects_y_axis_positive H
 2. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
assume "?lhs"
[PROOF STATE]
proof (state)
this:
\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis

goal (2 subgoals):
 1. \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis \<Longrightarrow> intersects_y_axis_positive H
 2. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
obtain y where "y \<in> unit_disc" "y \<in> circline_set H \<inter> positive_y_axis"
[PROOF STATE]
proof (prove)
using this:
\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis

goal (1 subgoal):
 1. (\<And>y. \<lbrakk>y \<in> unit_disc; y \<in> circline_set H \<inter> positive_y_axis\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
y \<in> unit_disc
y \<in> circline_set H \<inter> positive_y_axis

goal (2 subgoals):
 1. \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis \<Longrightarrow> intersects_y_axis_positive H
 2. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
hence "moebius_pt ?R y \<in> unit_disc" "moebius_pt ?R y \<in> circline_set ?H' \<inter> positive_x_axis"
[PROOF STATE]
proof (prove)
using this:
y \<in> unit_disc
y \<in> circline_set H \<inter> positive_y_axis

goal (1 subgoal):
 1. moebius_pt (moebius_rotation (- pi / 2)) y \<in> unit_disc &&& moebius_pt (moebius_rotation (- pi / 2)) y \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis
[PROOF STEP]
using rotation_minus_pi_2_positive_y_axis
[PROOF STATE]
proof (prove)
using this:
y \<in> unit_disc
y \<in> circline_set H \<inter> positive_y_axis
moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis = positive_x_axis

goal (1 subgoal):
 1. moebius_pt (moebius_rotation (- pi / 2)) y \<in> unit_disc &&& moebius_pt (moebius_rotation (- pi / 2)) y \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
moebius_pt (moebius_rotation (- pi / 2)) y \<in> unit_disc
moebius_pt (moebius_rotation (- pi / 2)) y \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis

goal (2 subgoals):
 1. \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis \<Longrightarrow> intersects_y_axis_positive H
 2. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
thus ?rhs
[PROOF STATE]
proof (prove)
using this:
moebius_pt (moebius_rotation (- pi / 2)) y \<in> unit_disc
moebius_pt (moebius_rotation (- pi / 2)) y \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis

goal (1 subgoal):
 1. intersects_y_axis_positive H
[PROOF STEP]
using intersects_x_axis_positive_iff[OF 1 2]
[PROOF STATE]
proof (prove)
using this:
moebius_pt (moebius_rotation (- pi / 2)) y \<in> unit_disc
moebius_pt (moebius_rotation (- pi / 2)) y \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H) = (\<exists>x. x \<in> unit_disc \<and> x \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis)

goal (1 subgoal):
 1. intersects_y_axis_positive H
[PROOF STEP]
using intersects_x_axis_positive_intersects_y_axis_positive[of H]
[PROOF STATE]
proof (prove)
using this:
moebius_pt (moebius_rotation (- pi / 2)) y \<in> unit_disc
moebius_pt (moebius_rotation (- pi / 2)) y \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H) = (\<exists>x. x \<in> unit_disc \<and> x \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis)
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H) = intersects_y_axis_positive H

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

goal (1 subgoal):
 1. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
assume "intersects_y_axis_positive H"
[PROOF STATE]
proof (state)
this:
intersects_y_axis_positive H

goal (1 subgoal):
 1. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
hence "intersects_x_axis_positive ?H'"
[PROOF STATE]
proof (prove)
using this:
intersects_y_axis_positive H

goal (1 subgoal):
 1. intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H)
[PROOF STEP]
using intersects_x_axis_positive_intersects_y_axis_positive[of H]
[PROOF STATE]
proof (prove)
using this:
intersects_y_axis_positive H
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H) = intersects_y_axis_positive H

goal (1 subgoal):
 1. intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H)

goal (1 subgoal):
 1. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H)
[PROOF STEP]
obtain x where *: "x \<in> unit_disc" "x \<in> circline_set ?H' \<inter> positive_x_axis"
[PROOF STATE]
proof (prove)
using this:
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> unit_disc; x \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using intersects_x_axis_positive_iff[OF 1 2]
[PROOF STATE]
proof (prove)
using this:
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H)
intersects_x_axis_positive (moebius_circline (moebius_rotation (- pi / 2)) H) = (\<exists>x. x \<in> unit_disc \<and> x \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis)

goal (1 subgoal):
 1. (\<And>x. \<lbrakk>x \<in> unit_disc; x \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> unit_disc
x \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis

goal (1 subgoal):
 1. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
let ?y = "moebius_pt (-?R) x"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
have "?y \<in> unit_disc \<and> ?y \<in> circline_set H \<inter> positive_y_axis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_pt (- moebius_rotation (- pi / 2)) x \<in> unit_disc \<and> moebius_pt (- moebius_rotation (- pi / 2)) x \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
using * rotation_minus_pi_2_positive_y_axis[symmetric]
[PROOF STATE]
proof (prove)
using this:
x \<in> unit_disc
x \<in> circline_set (moebius_circline (moebius_rotation (- pi / 2)) H) \<inter> positive_x_axis
positive_x_axis = moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis

goal (1 subgoal):
 1. moebius_pt (- moebius_rotation (- pi / 2)) x \<in> unit_disc \<and> moebius_pt (- moebius_rotation (- pi / 2)) x \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
by (metis Int_iff circline_set_moebius_circline_E image_eqI moebius_pt_comp_inv_image_left moebius_rotation_uminus uminus_moebius_def unit_disc_fix_discI unit_disc_fix_rotation)
[PROOF STATE]
proof (state)
this:
moebius_pt (- moebius_rotation (- pi / 2)) x \<in> unit_disc \<and> moebius_pt (- moebius_rotation (- pi / 2)) x \<in> circline_set H \<inter> positive_y_axis

goal (1 subgoal):
 1. intersects_y_axis_positive H \<Longrightarrow> \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
thus ?lhs
[PROOF STATE]
proof (prove)
using this:
moebius_pt (- moebius_rotation (- pi / 2)) x \<in> unit_disc \<and> moebius_pt (- moebius_rotation (- pi / 2)) x \<in> circline_set H \<inter> positive_y_axis

goal (1 subgoal):
 1. \<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<exists>y\<in>unit_disc. y \<in> circline_set H \<inter> positive_y_axis) = intersects_y_axis_positive H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma radical_power:
  assumes r0: "r (Suc k) ((a$0) ^ Suc k) = a$0"
    and a0: "(a$0 :: 'a::field_char_0) \<noteq> 0"
  shows "(fps_radical r (Suc k) (a ^ Suc k)) = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_radical r (Suc k) (a ^ Suc k) = a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fps_radical r (Suc k) (a ^ Suc k) = a
[PROOF STEP]
let ?ak = "a^ Suc k"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fps_radical r (Suc k) (a ^ Suc k) = a
[PROOF STEP]
have ak0: "?ak $ 0 = (a$0) ^ Suc k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a ^ Suc k $ 0 = (a $ 0) ^ Suc k
[PROOF STEP]
by (simp add: fps_nth_power_0 del: power_Suc)
[PROOF STATE]
proof (state)
this:
a ^ Suc k $ 0 = (a $ 0) ^ Suc k

goal (1 subgoal):
 1. fps_radical r (Suc k) (a ^ Suc k) = a
[PROOF STEP]
from r0
[PROOF STATE]
proof (chain)
picking this:
r (Suc k) ((a $ 0) ^ Suc k) = a $ 0
[PROOF STEP]
have th0: "r (Suc k) (a ^ Suc k $ 0) ^ Suc k = a ^ Suc k $ 0"
[PROOF STATE]
proof (prove)
using this:
r (Suc k) ((a $ 0) ^ Suc k) = a $ 0

goal (1 subgoal):
 1. r (Suc k) (a ^ Suc k $ 0) ^ Suc k = a ^ Suc k $ 0
[PROOF STEP]
using ak0
[PROOF STATE]
proof (prove)
using this:
r (Suc k) ((a $ 0) ^ Suc k) = a $ 0
a ^ Suc k $ 0 = (a $ 0) ^ Suc k

goal (1 subgoal):
 1. r (Suc k) (a ^ Suc k $ 0) ^ Suc k = a ^ Suc k $ 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r (Suc k) (a ^ Suc k $ 0) ^ Suc k = a ^ Suc k $ 0

goal (1 subgoal):
 1. fps_radical r (Suc k) (a ^ Suc k) = a
[PROOF STEP]
from r0 ak0
[PROOF STATE]
proof (chain)
picking this:
r (Suc k) ((a $ 0) ^ Suc k) = a $ 0
a ^ Suc k $ 0 = (a $ 0) ^ Suc k
[PROOF STEP]
have th1: "r (Suc k) (a ^ Suc k $ 0) = a $ 0"
[PROOF STATE]
proof (prove)
using this:
r (Suc k) ((a $ 0) ^ Suc k) = a $ 0
a ^ Suc k $ 0 = (a $ 0) ^ Suc k

goal (1 subgoal):
 1. r (Suc k) (a ^ Suc k $ 0) = a $ 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r (Suc k) (a ^ Suc k $ 0) = a $ 0

goal (1 subgoal):
 1. fps_radical r (Suc k) (a ^ Suc k) = a
[PROOF STEP]
from ak0 a0
[PROOF STATE]
proof (chain)
picking this:
a ^ Suc k $ 0 = (a $ 0) ^ Suc k
a $ 0 \<noteq> (0::'a)
[PROOF STEP]
have ak00: "?ak $ 0 \<noteq>0 "
[PROOF STATE]
proof (prove)
using this:
a ^ Suc k $ 0 = (a $ 0) ^ Suc k
a $ 0 \<noteq> (0::'a)

goal (1 subgoal):
 1. a ^ Suc k $ 0 \<noteq> (0::'a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a ^ Suc k $ 0 \<noteq> (0::'a)

goal (1 subgoal):
 1. fps_radical r (Suc k) (a ^ Suc k) = a
[PROOF STEP]
from radical_unique[of r k ?ak a, OF th0 th1 ak00]
[PROOF STATE]
proof (chain)
picking this:
(a ^ Suc k = a ^ Suc k) = (a = fps_radical r (Suc k) (a ^ Suc k))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(a ^ Suc k = a ^ Suc k) = (a = fps_radical r (Suc k) (a ^ Suc k))

goal (1 subgoal):
 1. fps_radical r (Suc k) (a ^ Suc k) = a
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
fps_radical r (Suc k) (a ^ Suc k) = a

goal:
No subgoals!
[PROOF STEP]
qed


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


[STATEMENT]
lemma continuous_map_nsphere_projection: "continuous_map (nsphere n) euclideanreal (\<lambda>x. x k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (nsphere n) euclideanreal (\<lambda>x. x k)
[PROOF STEP]
unfolding nsphere
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (subtopology (powertop_real UNIV) {x. (\<Sum>i\<le>n. (x i)\<^sup>2) = 1 \<and> (\<forall>i>n. x i = 0)}) euclideanreal (\<lambda>x. x k)
[PROOF STEP]
by (blast intro: continuous_map_from_subtopology [OF continuous_map_product_projection])


[STATEMENT]
lemma Arg2pi_eq_iff:
  assumes "w \<noteq> 0" "z \<noteq> 0"
     shows "Arg2pi w = Arg2pi z \<longleftrightarrow> (\<exists>x. 0 < x & w = of_real x * z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Arg2pi w = Arg2pi z) = (\<exists>x>0. w = complex_of_real x * z)
[PROOF STEP]
using assms Arg2pi_eq [of z] Arg2pi_eq [of w]
[PROOF STATE]
proof (prove)
using this:
w \<noteq> 0
z \<noteq> 0
z = complex_of_real (cmod z) * exp (\<i> * complex_of_real (Arg2pi z))
w = complex_of_real (cmod w) * exp (\<i> * complex_of_real (Arg2pi w))

goal (1 subgoal):
 1. (Arg2pi w = Arg2pi z) = (\<exists>x>0. w = complex_of_real x * z)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0; z \<noteq> 0; z = complex_of_real (cmod z) * exp (\<i> * complex_of_real (Arg2pi z)); w = complex_of_real (cmod w) * exp (\<i> * complex_of_real (Arg2pi z)); Arg2pi w = Arg2pi z\<rbrakk> \<Longrightarrow> \<exists>x>0. w = complex_of_real x * z
[PROOF STEP]
apply (rule_tac x="norm w / norm z" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0; z \<noteq> 0; z = complex_of_real (cmod z) * exp (\<i> * complex_of_real (Arg2pi z)); w = complex_of_real (cmod w) * exp (\<i> * complex_of_real (Arg2pi z)); Arg2pi w = Arg2pi z\<rbrakk> \<Longrightarrow> 0 < cmod w / cmod z \<and> w = complex_of_real (cmod w / cmod z) * z
[PROOF STEP]
apply (simp add: field_split_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>w \<noteq> 0; z \<noteq> 0; z = complex_of_real (cmod z) * exp (\<i> * complex_of_real (Arg2pi z)); w = complex_of_real (cmod w) * exp (\<i> * complex_of_real (Arg2pi z)); Arg2pi w = Arg2pi z\<rbrakk> \<Longrightarrow> w * complex_of_real (cmod z) = z * complex_of_real (cmod w)
[PROOF STEP]
by (metis mult.commute mult.left_commute)