[STATEMENT]
lemma mult_strict_mono:
  assumes "a < b" and "c < d" and "0 < b" and "0 \<le> c"
  shows "a * c < b * d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * c < b * d
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a < b
c < d
(0::'a) < b
(0::'a) \<le> c

goal (1 subgoal):
 1. a * c < b * d
[PROOF STEP]
apply (cases "c=0")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a < b; c < d; (0::'a) < b; (0::'a) \<le> c; c = (0::'a)\<rbrakk> \<Longrightarrow> a * c < b * d
 2. \<lbrakk>a < b; c < d; (0::'a) < b; (0::'a) \<le> c; c \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> a * c < b * d
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a < b; c < d; (0::'a) < b; (0::'a) \<le> c; c \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> a * c < b * d
[PROOF STEP]
apply (erule mult_strict_right_mono [THEN less_trans])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>c < d; (0::'a) < b; (0::'a) \<le> c; c \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> (0::'a) < c
 2. \<lbrakk>c < d; (0::'a) < b; (0::'a) \<le> c; c \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> b * c < b * d
[PROOF STEP]
apply (force simp add: le_less)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c < d; (0::'a) < b; (0::'a) \<le> c; c \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> b * c < b * d
[PROOF STEP]
apply (erule mult_strict_left_mono, assumption)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma gcs_plus_lcs: "(gcs s t) + (lcs s t) = s + t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcs s t + lcs s t = s + t
[PROOF STEP]
unfolding gcs_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s + t - lcs s t + lcs s t = s + t
[PROOF STEP]
by (rule adds_minus, fact lcs_adds_plus)


[STATEMENT]
lemma valid_path_subpath:
  fixes g :: "real \<Rightarrow> 'a :: real_normed_vector"
  assumes "valid_path g" "u \<in> {0..1}" "v \<in> {0..1}"
    shows "valid_path(subpath u v g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid_path (subpath u v g)
[PROOF STEP]
proof (cases "v=u")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. v = u \<Longrightarrow> valid_path (subpath u v g)
 2. v \<noteq> u \<Longrightarrow> valid_path (subpath u v g)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
v = u

goal (2 subgoals):
 1. v = u \<Longrightarrow> valid_path (subpath u v g)
 2. v \<noteq> u \<Longrightarrow> valid_path (subpath u v g)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
v = u
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
v = u

goal (1 subgoal):
 1. valid_path (subpath u v g)
[PROOF STEP]
unfolding valid_path_def subpath_def
[PROOF STATE]
proof (prove)
using this:
v = u

goal (1 subgoal):
 1. (\<lambda>x. g ((v - u) * x + u)) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
by (force intro: C1_differentiable_on_const C1_differentiable_imp_piecewise)
[PROOF STATE]
proof (state)
this:
valid_path (subpath u v g)

goal (1 subgoal):
 1. v \<noteq> u \<Longrightarrow> valid_path (subpath u v g)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. v \<noteq> u \<Longrightarrow> valid_path (subpath u v g)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
v \<noteq> u

goal (1 subgoal):
 1. v \<noteq> u \<Longrightarrow> valid_path (subpath u v g)
[PROOF STEP]
have "(g \<circ> (\<lambda>x. ((v-u) * x + u))) piecewise_C1_differentiable_on {0..1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<circ> (\<lambda>x. (v - u) * x + u) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
apply (rule piecewise_C1_differentiable_compose)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. (\<lambda>x. (v - u) * x + u) piecewise_C1_differentiable_on {0..1}
 2. g piecewise_C1_differentiable_on (\<lambda>x. (v - u) * x + u) ` {0..1}
 3. \<And>x. finite ({0..1} \<inter> (\<lambda>x. (v - u) * x + u) -` {x})
[PROOF STEP]
apply (simp add: C1_differentiable_imp_piecewise)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. g piecewise_C1_differentiable_on (\<lambda>x. (v - u) * x + u) ` {0..1}
 2. \<And>x. finite ({0..1} \<inter> (\<lambda>x. (v - u) * x + u) -` {x})
[PROOF STEP]
apply (simp add: image_affinity_atLeastAtMost)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (u \<le> v \<longrightarrow> g piecewise_C1_differentiable_on {u..v}) \<and> (\<not> u \<le> v \<longrightarrow> g piecewise_C1_differentiable_on {v..u})
 2. \<And>x. finite ({0..1} \<inter> (\<lambda>x. (v - u) * x + u) -` {x})
[PROOF STEP]
using assms False
[PROOF STATE]
proof (prove)
using this:
valid_path g
u \<in> {0..1}
v \<in> {0..1}
v \<noteq> u

goal (2 subgoals):
 1. (u \<le> v \<longrightarrow> g piecewise_C1_differentiable_on {u..v}) \<and> (\<not> u \<le> v \<longrightarrow> g piecewise_C1_differentiable_on {v..u})
 2. \<And>x. finite ({0..1} \<inter> (\<lambda>x. (v - u) * x + u) -` {x})
[PROOF STEP]
apply (auto simp: algebra_simps valid_path_def piecewise_C1_differentiable_on_subset)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>g piecewise_C1_differentiable_on {0..1}; v \<noteq> u; 0 \<le> u; u \<le> 1; 0 \<le> v; v \<le> 1\<rbrakk> \<Longrightarrow> finite ({0..1} \<inter> (\<lambda>x. u + x * v - x * u) -` {x})
[PROOF STEP]
apply (subst Int_commute)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>g piecewise_C1_differentiable_on {0..1}; v \<noteq> u; 0 \<le> u; u \<le> 1; 0 \<le> v; v \<le> 1\<rbrakk> \<Longrightarrow> finite ((\<lambda>x. u + x * v - x * u) -` {x} \<inter> {0..1})
[PROOF STEP]
apply (auto simp: inj_on_def algebra_simps crossproduct_eq finite_vimage_IntI)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
g \<circ> (\<lambda>x. (v - u) * x + u) piecewise_C1_differentiable_on {0..1}

goal (1 subgoal):
 1. v \<noteq> u \<Longrightarrow> valid_path (subpath u v g)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g \<circ> (\<lambda>x. (v - u) * x + u) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
g \<circ> (\<lambda>x. (v - u) * x + u) piecewise_C1_differentiable_on {0..1}

goal (1 subgoal):
 1. valid_path (subpath u v g)
[PROOF STEP]
by (auto simp: o_def valid_path_def subpath_def)
[PROOF STATE]
proof (state)
this:
valid_path (subpath u v g)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma degqf[simp]: "degree (smult (of_nat CARD('q)) (#f :: 'pq mod_ring poly)) = degree (#f :: 'pq mod_ring poly)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree (Polynomial.smult (of_nat CARD('q)) (#f)) = degree (#f)
[PROOF STEP]
proof (intro degree_smult_eqI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. degree (#f) \<noteq> 0 \<Longrightarrow> of_nat CARD('q) * lead_coeff (#f) \<noteq> 0
[PROOF STEP]
assume "degree (#f :: 'pq mod_ring poly) \<noteq> 0"
[PROOF STATE]
proof (state)
this:
degree (#f) \<noteq> 0

goal (1 subgoal):
 1. degree (#f) \<noteq> 0 \<Longrightarrow> of_nat CARD('q) * lead_coeff (#f) \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
degree (#f) \<noteq> 0
[PROOF STEP]
have f0: "degree f \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
degree (#f) \<noteq> 0

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

goal (1 subgoal):
 1. degree (#f) \<noteq> 0 \<Longrightarrow> of_nat CARD('q) * lead_coeff (#f) \<noteq> 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
degree f \<noteq> 0

goal (1 subgoal):
 1. degree (#f) \<noteq> 0 \<Longrightarrow> of_nat CARD('q) * lead_coeff (#f) \<noteq> 0
[PROOF STEP]
define l where "l \<equiv> lead_coeff f"
[PROOF STATE]
proof (state)
this:
l \<equiv> lead_coeff f

goal (1 subgoal):
 1. degree (#f) \<noteq> 0 \<Longrightarrow> of_nat CARD('q) * lead_coeff (#f) \<noteq> 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
degree f \<noteq> 0
l \<equiv> lead_coeff f
[PROOF STEP]
have l0: "l \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
degree f \<noteq> 0
l \<equiv> lead_coeff f

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

goal (1 subgoal):
 1. degree (#f) \<noteq> 0 \<Longrightarrow> of_nat CARD('q) * lead_coeff (#f) \<noteq> 0
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
l \<noteq> 0
[PROOF STEP]
show "of_nat CARD('q) * lead_coeff (#f::'pq mod_ring poly) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
l \<noteq> 0

goal (1 subgoal):
 1. of_nat CARD('q) * lead_coeff (#f) \<noteq> 0
[PROOF STEP]
apply (unfold rebase_p_to_pq.lead_coeff_rebase_poly, fold l_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>l \<noteq> 0; l \<noteq> 0\<rbrakk> \<Longrightarrow> of_nat CARD('q) * @l \<noteq> 0
[PROOF STEP]
apply (transfer)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>l. \<lbrakk>l \<in> {0..<int CARD('p)}; l \<noteq> 0; l \<noteq> 0\<rbrakk> \<Longrightarrow> int CARD('q) mod int CARD('pq) * (l mod int CARD('pq)) mod int CARD('pq) \<noteq> 0
[PROOF STEP]
using q1
[PROOF STATE]
proof (prove)
using this:
1 < int q

goal (1 subgoal):
 1. \<And>l. \<lbrakk>l \<in> {0..<int CARD('p)}; l \<noteq> 0; l \<noteq> 0\<rbrakk> \<Longrightarrow> int CARD('q) mod int CARD('pq) * (l mod int CARD('pq)) mod int CARD('pq) \<noteq> 0
[PROOF STEP]
by (simp add: pq mod_mod_cancel)
[PROOF STATE]
proof (state)
this:
of_nat CARD('q) * lead_coeff (#f) \<noteq> 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma one_minus_z2_notin_nonpos_Reals:
  assumes "Im z = 0 \<Longrightarrow> \<bar>Re z\<bar> < 1"
  shows "1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
proof (cases "Im z = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Im z = 0 \<Longrightarrow> 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
 2. Im z \<noteq> 0 \<Longrightarrow> 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
Im z = 0

goal (2 subgoals):
 1. Im z = 0 \<Longrightarrow> 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
 2. Im z \<noteq> 0 \<Longrightarrow> 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
Im z = 0 \<Longrightarrow> \<bar>Re z\<bar> < 1
Im z = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Im z = 0 \<Longrightarrow> \<bar>Re z\<bar> < 1
Im z = 0

goal (1 subgoal):
 1. 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
by (simp add: complex_nonpos_Reals_iff flip: abs_square_less_1)
[PROOF STATE]
proof (state)
this:
1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. Im z \<noteq> 0 \<Longrightarrow> 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Im z \<noteq> 0 \<Longrightarrow> 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
Im z \<noteq> 0

goal (1 subgoal):
 1. Im z \<noteq> 0 \<Longrightarrow> 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
have "\<not> (Im z)\<^sup>2 \<le> - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> (Im z)\<^sup>2 \<le> - 1
[PROOF STEP]
using False power2_less_eq_zero_iff
[PROOF STATE]
proof (prove)
using this:
Im z \<noteq> 0
(?a\<^sup>2 \<le> (0::?'a)) = (?a = (0::?'a))

goal (1 subgoal):
 1. \<not> (Im z)\<^sup>2 \<le> - 1
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<not> (Im z)\<^sup>2 \<le> - 1

goal (1 subgoal):
 1. Im z \<noteq> 0 \<Longrightarrow> 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
with False
[PROOF STATE]
proof (chain)
picking this:
Im z \<noteq> 0
\<not> (Im z)\<^sup>2 \<le> - 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Im z \<noteq> 0
\<not> (Im z)\<^sup>2 \<le> - 1

goal (1 subgoal):
 1. 1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0
[PROOF STEP]
by (auto simp add: complex_nonpos_Reals_iff Re_power2 Im_power2)
[PROOF STATE]
proof (state)
this:
1 - z\<^sup>2 \<notin> \<real>\<^sub>\<le>\<^sub>0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eventually_principal_subs: "eventually P (principal_subs As A) \<longleftrightarrow> (\<forall>x. x\<in>As \<and> x\<subseteq>A \<longrightarrow> P x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (principal_subs As A) = (\<forall>x. x \<in> As \<and> x \<subseteq> A \<longrightarrow> P x)
[PROOF STEP]
unfolding principal_subs_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (Abs_filter (\<lambda>P. \<forall>x. x \<in> As \<and> x \<subseteq> A \<longrightarrow> P x)) = (\<forall>x. x \<in> As \<and> x \<subseteq> A \<longrightarrow> P x)
[PROOF STEP]
by (rule eventually_Abs_filter, rule is_filter.intro) auto


[STATEMENT]
theorem Fourier_Fejer_Cesaro_summable:
  assumes f: "f absolutely_integrable_on {-pi..pi}"
    and periodic: "\<And>x. f(x + 2*pi) = f x"
    and fl: "(f \<longlongrightarrow> l) (at t within atMost t)"
    and fr: "(f \<longlongrightarrow> r) (at t within atLeast t)"
  shows "(\<lambda>n. (\<Sum>m<n. \<Sum>k\<le>2*m. Fourier_coefficient f k * trigonometric_set k t) / n) \<longlonglongrightarrow> (l+r) / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (\<Sum>m<n. \<Sum>k\<le>2 * m. Fourier_coefficient f k * trigonometric_set k t) / real n) \<longlonglongrightarrow> (l + r) / 2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. (\<Sum>m<n. \<Sum>k\<le>2 * m. Fourier_coefficient f k * trigonometric_set k t) / real n) \<longlonglongrightarrow> (l + r) / 2
[PROOF STEP]
define h where "h \<equiv> \<lambda>u. (f(t+u) + f(t-u)) - (l+r)"
[PROOF STATE]
proof (state)
this:
h \<equiv> \<lambda>u. f (t + u) + f (t - u) - (l + r)

goal (1 subgoal):
 1. (\<lambda>n. (\<Sum>m<n. \<Sum>k\<le>2 * m. Fourier_coefficient f k * trigonometric_set k t) / real n) \<longlonglongrightarrow> (l + r) / 2
[PROOF STEP]
have "(\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0
[PROOF STEP]
have h0: "(h \<longlongrightarrow> 0) (at 0 within atLeast 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (h \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (h \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
have l0: "((\<lambda>u. f(t-u) - l) \<longlongrightarrow> 0) (at 0 within {0..})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>u. f (t - u) - l) \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
using fl
[PROOF STATE]
proof (prove)
using this:
(f \<longlongrightarrow> l) (at t within {..t})

goal (1 subgoal):
 1. ((\<lambda>u. f (t - u) - l) \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
unfolding Lim_within
[PROOF STATE]
proof (prove)
using this:
\<forall>e>0. \<exists>d>0. \<forall>x\<in>{..t}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) l < e

goal (1 subgoal):
 1. \<forall>e>0. \<exists>d>0. \<forall>x\<in>{0..}. 0 < dist x 0 \<and> dist x 0 < d \<longrightarrow> dist (f (t - x) - l) 0 < e
[PROOF STEP]
apply (elim all_forward imp_forward ex_forward conj_forward asm_rl, clarify)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>e d x. \<lbrakk>\<forall>x\<in>{..t}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) l < e; \<forall>e>0. \<exists>d>0. \<forall>x\<in>{..t}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) l < e; 0 \<le> x; 0 < dist x 0; dist x 0 < d\<rbrakk> \<Longrightarrow> dist (f (t - x) - l) 0 < e
[PROOF STEP]
apply (drule_tac x="t-x" in bspec)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>e d x. \<lbrakk>\<forall>e>0. \<exists>d>0. \<forall>x\<in>{..t}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) l < e; 0 \<le> x; 0 < dist x 0; dist x 0 < d\<rbrakk> \<Longrightarrow> t - x \<in> {..t}
 2. \<And>e d x. \<lbrakk>\<forall>e>0. \<exists>d>0. \<forall>x\<in>{..t}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) l < e; 0 \<le> x; 0 < dist x 0; dist x 0 < d; 0 < dist (t - x) t \<and> dist (t - x) t < d \<longrightarrow> dist (f (t - x)) l < e\<rbrakk> \<Longrightarrow> dist (f (t - x) - l) 0 < e
[PROOF STEP]
apply (auto simp: dist_norm)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
((\<lambda>u. f (t - u) - l) \<longlongrightarrow> 0) (at 0 within {0..})

goal (1 subgoal):
 1. (h \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
have r0: "((\<lambda>u. f(t + u) - r) \<longlongrightarrow> 0) (at 0 within {0..})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>u. f (t + u) - r) \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
using fr
[PROOF STATE]
proof (prove)
using this:
(f \<longlongrightarrow> r) (at t within {t..})

goal (1 subgoal):
 1. ((\<lambda>u. f (t + u) - r) \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
unfolding Lim_within
[PROOF STATE]
proof (prove)
using this:
\<forall>e>0. \<exists>d>0. \<forall>x\<in>{t..}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) r < e

goal (1 subgoal):
 1. \<forall>e>0. \<exists>d>0. \<forall>x\<in>{0..}. 0 < dist x 0 \<and> dist x 0 < d \<longrightarrow> dist (f (t + x) - r) 0 < e
[PROOF STEP]
apply (elim all_forward imp_forward ex_forward conj_forward asm_rl, clarify)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>e d x. \<lbrakk>\<forall>x\<in>{t..}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) r < e; \<forall>e>0. \<exists>d>0. \<forall>x\<in>{t..}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) r < e; 0 \<le> x; 0 < dist x 0; dist x 0 < d\<rbrakk> \<Longrightarrow> dist (f (t + x) - r) 0 < e
[PROOF STEP]
apply (drule_tac x="t+x" in bspec)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>e d x. \<lbrakk>\<forall>e>0. \<exists>d>0. \<forall>x\<in>{t..}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) r < e; 0 \<le> x; 0 < dist x 0; dist x 0 < d\<rbrakk> \<Longrightarrow> t + x \<in> {t..}
 2. \<And>e d x. \<lbrakk>\<forall>e>0. \<exists>d>0. \<forall>x\<in>{t..}. 0 < dist x t \<and> dist x t < d \<longrightarrow> dist (f x) r < e; 0 \<le> x; 0 < dist x 0; dist x 0 < d; 0 < dist (t + x) t \<and> dist (t + x) t < d \<longrightarrow> dist (f (t + x)) r < e\<rbrakk> \<Longrightarrow> dist (f (t + x) - r) 0 < e
[PROOF STEP]
apply (auto simp: dist_norm)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
((\<lambda>u. f (t + u) - r) \<longlongrightarrow> 0) (at 0 within {0..})

goal (1 subgoal):
 1. (h \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (h \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
using tendsto_add [OF l0 r0]
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. f (t - x) - l + (f (t + x) - r)) \<longlongrightarrow> 0 + 0) (at 0 within {0..})

goal (1 subgoal):
 1. (h \<longlongrightarrow> 0) (at 0 within {0..})
[PROOF STEP]
by (simp add: h_def algebra_simps)
[PROOF STATE]
proof (state)
this:
(h \<longlongrightarrow> 0) (at 0 within {0..})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(h \<longlongrightarrow> 0) (at 0 within {0..})

goal (1 subgoal):
 1. (\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0
[PROOF STEP]
unfolding lim_sequentially dist_real_def diff_0_right
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>r>0. \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
proof clarify
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
fix e::real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
assume "e > 0"
[PROOF STATE]
proof (state)
this:
0 < e

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < e
[PROOF STEP]
obtain x' where "0 < x'" "\<And>x. \<lbrakk>0 < x; x < x'\<rbrakk> \<Longrightarrow> \<bar>h x\<bar> < e / (2 * pi)"
[PROOF STATE]
proof (prove)
using this:
0 < e

goal (1 subgoal):
 1. (\<And>x'. \<lbrakk>0 < x'; \<And>x. \<lbrakk>0 < x; x < x'\<rbrakk> \<Longrightarrow> \<bar>h x\<bar> < e / (2 * pi)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using h0
[PROOF STATE]
proof (prove)
using this:
0 < e
(h \<longlongrightarrow> 0) (at 0 within {0..})

goal (1 subgoal):
 1. (\<And>x'. \<lbrakk>0 < x'; \<And>x. \<lbrakk>0 < x; x < x'\<rbrakk> \<Longrightarrow> \<bar>h x\<bar> < e / (2 * pi)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding Lim_within dist_real_def
[PROOF STATE]
proof (prove)
using this:
0 < e
\<forall>e>0. \<exists>d>0. \<forall>x\<in>{0..}. 0 < \<bar>x - 0\<bar> \<and> \<bar>x - 0\<bar> < d \<longrightarrow> \<bar>h x - 0\<bar> < e

goal (1 subgoal):
 1. (\<And>x'. \<lbrakk>0 < x'; \<And>x. \<lbrakk>0 < x; x < x'\<rbrakk> \<Longrightarrow> \<bar>h x\<bar> < e / (2 * pi)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: dest: spec [where x="e/2/pi"])
[PROOF STATE]
proof (state)
this:
0 < x'
\<lbrakk>0 < ?x; ?x < x'\<rbrakk> \<Longrightarrow> \<bar>h ?x\<bar> < e / (2 * pi)

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < x'
\<lbrakk>0 < ?x; ?x < x'\<rbrakk> \<Longrightarrow> \<bar>h ?x\<bar> < e / (2 * pi)
[PROOF STEP]
obtain \<xi> where "0 < \<xi>" "\<xi> < pi" and \<xi>: "\<And>x. 0 < x \<and> x \<le> \<xi> \<Longrightarrow> \<bar>h x\<bar> < e/2/pi"
[PROOF STATE]
proof (prove)
using this:
0 < x'
\<lbrakk>0 < ?x; ?x < x'\<rbrakk> \<Longrightarrow> \<bar>h ?x\<bar> < e / (2 * pi)

goal (1 subgoal):
 1. (\<And>\<xi>. \<lbrakk>0 < \<xi>; \<xi> < pi; \<And>x. 0 < x \<and> x \<le> \<xi> \<Longrightarrow> \<bar>h x\<bar> < e / 2 / pi\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply (intro that [where \<xi>="min x' pi/2"], auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>\<xi>. \<lbrakk>0 < \<xi>; \<xi> < pi; \<And>x. 0 < x \<and> x \<le> \<xi> \<Longrightarrow> \<bar>h x\<bar> < e / (2 * pi)\<rbrakk> \<Longrightarrow> thesis; 0 < x'; \<And>x. \<lbrakk>0 < x; x < x'\<rbrakk> \<Longrightarrow> \<bar>h x\<bar> < e / (2 * pi)\<rbrakk> \<Longrightarrow> min x' pi < pi * 2
[PROOF STEP]
using m2pi_less_pi
[PROOF STATE]
proof (prove)
using this:
- (2 * pi) < pi

goal (1 subgoal):
 1. \<lbrakk>\<And>\<xi>. \<lbrakk>0 < \<xi>; \<xi> < pi; \<And>x. 0 < x \<and> x \<le> \<xi> \<Longrightarrow> \<bar>h x\<bar> < e / (2 * pi)\<rbrakk> \<Longrightarrow> thesis; 0 < x'; \<And>x. \<lbrakk>0 < x; x < x'\<rbrakk> \<Longrightarrow> \<bar>h x\<bar> < e / (2 * pi)\<rbrakk> \<Longrightarrow> min x' pi < pi * 2
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
0 < \<xi>
\<xi> < pi
0 < ?x \<and> ?x \<le> \<xi> \<Longrightarrow> \<bar>h ?x\<bar> < e / 2 / pi

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
have ftx: "(\<lambda>x. f(t+x)) absolutely_integrable_on {-pi..pi}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f (t + x)) 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}
f (?x + 2 * pi) = f ?x
(f \<longlongrightarrow> l) (at t within {..t})
(f \<longlongrightarrow> r) (at t within {t..})

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

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. f (t + x)) absolutely_integrable_on {- pi..pi}
[PROOF STEP]
have ftmx: "(\<lambda>x. f(t-x)) absolutely_integrable_on {-pi..pi}"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f (t + x)) absolutely_integrable_on {- pi..pi}

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

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
have h_aint: "h absolutely_integrable_on {-pi..pi}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h absolutely_integrable_on {- pi..pi}
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>u. f (t + u) + f (t - u) - (l + r)) absolutely_integrable_on {- pi..pi}
[PROOF STEP]
by (intro absolutely_integrable_on_const set_integral_diff set_integral_add, auto simp: ftx ftmx)
[PROOF STATE]
proof (state)
this:
h absolutely_integrable_on {- pi..pi}

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
have "(\<lambda>n. LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<longlonglongrightarrow> 0
[PROOF STEP]
proof (rule Lim_null_comparison)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>\<^sub>F x in sequentially. norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> ?g x
 2. ?g \<longlonglongrightarrow> 0
[PROOF STEP]
define \<phi> where "\<phi> \<equiv> \<lambda>n. (LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> / (2 * sin(x/2) ^ 2)) / n"
[PROOF STATE]
proof (state)
this:
\<phi> \<equiv> (/) (LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2))

goal (2 subgoals):
 1. \<forall>\<^sub>F x in sequentially. norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> ?g x
 2. ?g \<longlonglongrightarrow> 0
[PROOF STEP]
show "\<forall>\<^sub>F n in sequentially. norm (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<le> \<phi> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. norm (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<le> \<phi> (real n)
[PROOF STEP]
proof (rule eventually_sequentiallyI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. ?c \<le> x \<Longrightarrow> norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> \<phi> (real x)
[PROOF STEP]
fix n::nat
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. ?c \<le> x \<Longrightarrow> norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> \<phi> (real x)
[PROOF STEP]
assume "n \<ge> 1"
[PROOF STATE]
proof (state)
this:
1 \<le> n

goal (1 subgoal):
 1. \<And>x. ?c \<le> x \<Longrightarrow> norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> \<phi> (real x)
[PROOF STEP]
have hint: "(\<lambda>x. h x / (2 * sin(x/2) ^ 2)) absolutely_integrable_on {\<xi>..pi}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. h x / (2 * (sin (x / 2))\<^sup>2)) absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
unfolding divide_inverse mult.commute [of "h _"]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2) * h x) absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
proof (rule absolutely_integrable_bounded_measurable_product_real)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) \<in> borel_measurable (lebesgue_on {\<xi>..pi})
 2. {\<xi>..pi} \<in> sets lebesgue
 3. bounded ((\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) ` {\<xi>..pi})
 4. h absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
have cont: "continuous_on {\<xi>..pi} (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {\<xi>..pi} (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2))
[PROOF STEP]
using \<open>0 < \<xi>\<close>
[PROOF STATE]
proof (prove)
using this:
0 < \<xi>

goal (1 subgoal):
 1. continuous_on {\<xi>..pi} (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2))
[PROOF STEP]
by (intro continuous_intros) (auto simp: sin_zero_pi_iff)
[PROOF STATE]
proof (state)
this:
continuous_on {\<xi>..pi} (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2))

goal (4 subgoals):
 1. (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) \<in> borel_measurable (lebesgue_on {\<xi>..pi})
 2. {\<xi>..pi} \<in> sets lebesgue
 3. bounded ((\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) ` {\<xi>..pi})
 4. h absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
show "(\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) \<in> borel_measurable (lebesgue_on {\<xi>..pi})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) \<in> borel_measurable (lebesgue_on {\<xi>..pi})
[PROOF STEP]
using \<open>0 < \<xi>\<close>
[PROOF STATE]
proof (prove)
using this:
0 < \<xi>

goal (1 subgoal):
 1. (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) \<in> borel_measurable (lebesgue_on {\<xi>..pi})
[PROOF STEP]
by (intro cont continuous_imp_measurable_on_sets_lebesgue) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) \<in> borel_measurable (lebesgue_on {\<xi>..pi})

goal (3 subgoals):
 1. {\<xi>..pi} \<in> sets lebesgue
 2. bounded ((\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) ` {\<xi>..pi})
 3. h absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
show "bounded ((\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) ` {\<xi>..pi})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded ((\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) ` {\<xi>..pi})
[PROOF STEP]
using cont
[PROOF STATE]
proof (prove)
using this:
continuous_on {\<xi>..pi} (\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2))

goal (1 subgoal):
 1. bounded ((\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) ` {\<xi>..pi})
[PROOF STEP]
by (simp add: compact_continuous_image compact_imp_bounded)
[PROOF STATE]
proof (state)
this:
bounded ((\<lambda>x. inverse (2 * (sin (x * inverse 2))\<^sup>2)) ` {\<xi>..pi})

goal (2 subgoals):
 1. {\<xi>..pi} \<in> sets lebesgue
 2. h absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
show "h absolutely_integrable_on {\<xi>..pi}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. h absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
using \<open>0 < \<xi>\<close> \<open>\<xi> < pi\<close>
[PROOF STATE]
proof (prove)
using this:
0 < \<xi>
\<xi> < pi

goal (1 subgoal):
 1. h absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
by (auto intro: absolutely_integrable_on_subinterval [OF h_aint])
[PROOF STATE]
proof (state)
this:
h absolutely_integrable_on {\<xi>..pi}

goal (1 subgoal):
 1. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. h x / (2 * (sin (x / 2))\<^sup>2)) absolutely_integrable_on {\<xi>..pi}

goal (1 subgoal):
 1. \<And>x. ?c \<le> x \<Longrightarrow> norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> \<phi> (real x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. h x / (2 * (sin (x / 2))\<^sup>2)) absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
have *: "integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x/2))\<^sup>2))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. h x / (2 * (sin (x / 2))\<^sup>2)) absolutely_integrable_on {\<xi>..pi}

goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2))
[PROOF STEP]
by (simp add: absolutely_integrable_measurable o_def)
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2))

goal (1 subgoal):
 1. \<And>x. ?c \<le> x \<Longrightarrow> norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> \<phi> (real x)
[PROOF STEP]
define \<psi> where
              "\<psi> \<equiv> \<lambda>x. (if n = 0 then 0 else if x = 0 then n/2
                         else (sin (real n / 2 * x))\<^sup>2 / (2 * real n * (sin (x/2))\<^sup>2)) * h x"
[PROOF STATE]
proof (state)
this:
\<psi> \<equiv> \<lambda>x. (if n = 0 then 0 else if x = 0 then real n / 2 else (sin (real n / 2 * x))\<^sup>2 / (2 * real n * (sin (x / 2))\<^sup>2)) * h x

goal (1 subgoal):
 1. \<And>x. ?c \<le> x \<Longrightarrow> norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> \<phi> (real x)
[PROOF STEP]
have "\<bar>LINT x|lebesgue_on {\<xi>..pi}. \<psi> x\<bar>
              \<le> (LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> / (2 * (sin (x/2))\<^sup>2) / n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>integral\<^sup>L (lebesgue_on {\<xi>..pi}) \<psi>\<bar> \<le> LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
[PROOF STEP]
proof (rule integral_abs_bound_integral)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. integrable (lebesgue_on {\<xi>..pi}) \<psi>
 2. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n)
 3. \<And>x. x \<in> space (lebesgue_on {\<xi>..pi}) \<Longrightarrow> \<bar>\<psi> x\<bar> \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
[PROOF STEP]
show **: "integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x/2))\<^sup>2) / n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n)
[PROOF STEP]
using Bochner_Integration.integrable_mult_left [OF *, of "1/n"]
[PROOF STATE]
proof (prove)
using this:
integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) * (1 / real n))

goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n)
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n)

goal (2 subgoals):
 1. integrable (lebesgue_on {\<xi>..pi}) \<psi>
 2. \<And>x. x \<in> space (lebesgue_on {\<xi>..pi}) \<Longrightarrow> \<bar>\<psi> x\<bar> \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
[PROOF STEP]
show \<dagger>: "\<bar>\<psi> x\<bar> \<le> \<bar>h x\<bar> / (2 * (sin (x/2))\<^sup>2) / real n"
              if "x \<in> space (lebesgue_on {\<xi>..pi})" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>\<psi> x\<bar> \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
[PROOF STEP]
using that \<open>0 < \<xi>\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> space (lebesgue_on {\<xi>..pi})
0 < \<xi>

goal (1 subgoal):
 1. \<bar>\<psi> x\<bar> \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
[PROOF STEP]
apply (simp add: \<psi>_def divide_simps mult_less_0_iff abs_mult)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<xi> \<le> x \<and> x \<le> pi; 0 < \<xi>\<rbrakk> \<Longrightarrow> sin (x / 2) \<noteq> 0 \<longrightarrow> 0 < n \<longrightarrow> (sin (real n * x / 2))\<^sup>2 * \<bar>h x\<bar> \<le> \<bar>h x\<bar>
[PROOF STEP]
apply (auto simp: square_le_1 mult_left_le_one_le)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
?x \<in> space (lebesgue_on {\<xi>..pi}) \<Longrightarrow> \<bar>\<psi> ?x\<bar> \<le> \<bar>h ?x\<bar> / (2 * (sin (?x / 2))\<^sup>2) / real n

goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) \<psi>
[PROOF STEP]
show "integrable (lebesgue_on {\<xi>..pi}) \<psi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) \<psi>
[PROOF STEP]
proof (rule measurable_bounded_by_integrable_imp_lebesgue_integrable [OF _ **])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<psi> \<in> borel_measurable (lebesgue_on {\<xi>..pi})
 2. \<And>x. x \<in> {\<xi>..pi} \<Longrightarrow> norm (\<psi> x) \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
 3. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
let ?g = "\<lambda>x. \<bar>h x\<bar> / (2 * sin(x/2) ^ 2) / n"
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<psi> \<in> borel_measurable (lebesgue_on {\<xi>..pi})
 2. \<And>x. x \<in> {\<xi>..pi} \<Longrightarrow> norm (\<psi> x) \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
 3. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
have ***: "integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. (sin (n/2 * x))\<^sup>2 * (inverse (2 * (sin (x/2))\<^sup>2) * h x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. (sin (real n / 2 * x))\<^sup>2 * (inverse (2 * (sin (x / 2))\<^sup>2) * h x))
[PROOF STEP]
proof (rule absolutely_integrable_imp_integrable [OF absolutely_integrable_bounded_measurable_product_real])
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. (\<lambda>x. (sin (real n / 2 * x))\<^sup>2) \<in> borel_measurable (lebesgue_on {\<xi>..pi})
 2. {\<xi>..pi} \<in> sets lebesgue
 3. bounded ((\<lambda>x. (sin (real n / 2 * x))\<^sup>2) ` {\<xi>..pi})
 4. (\<lambda>x. inverse (2 * (sin (x / 2))\<^sup>2) * h x) absolutely_integrable_on {\<xi>..pi}
 5. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
show "(\<lambda>x. (sin (real n / 2 * x))\<^sup>2) \<in> borel_measurable (lebesgue_on {\<xi>..pi})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (sin (real n / 2 * x))\<^sup>2) \<in> borel_measurable (lebesgue_on {\<xi>..pi})
[PROOF STEP]
by (intro continuous_imp_measurable_on_sets_lebesgue continuous_intros) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (sin (real n / 2 * x))\<^sup>2) \<in> borel_measurable (lebesgue_on {\<xi>..pi})

goal (4 subgoals):
 1. {\<xi>..pi} \<in> sets lebesgue
 2. bounded ((\<lambda>x. (sin (real n / 2 * x))\<^sup>2) ` {\<xi>..pi})
 3. (\<lambda>x. inverse (2 * (sin (x / 2))\<^sup>2) * h x) absolutely_integrable_on {\<xi>..pi}
 4. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
show "bounded ((\<lambda>x. (sin (real n / 2 * x))\<^sup>2) ` {\<xi>..pi})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded ((\<lambda>x. (sin (real n / 2 * x))\<^sup>2) ` {\<xi>..pi})
[PROOF STEP]
by (force simp: square_le_1 intro: boundedI [where B=1])
[PROOF STATE]
proof (state)
this:
bounded ((\<lambda>x. (sin (real n / 2 * x))\<^sup>2) ` {\<xi>..pi})

goal (3 subgoals):
 1. {\<xi>..pi} \<in> sets lebesgue
 2. (\<lambda>x. inverse (2 * (sin (x / 2))\<^sup>2) * h x) absolutely_integrable_on {\<xi>..pi}
 3. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
show "(\<lambda>x. inverse (2 * (sin (x/2))\<^sup>2) * h x) absolutely_integrable_on {\<xi>..pi}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. inverse (2 * (sin (x / 2))\<^sup>2) * h x) absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
using hint
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. h x / (2 * (sin (x / 2))\<^sup>2)) absolutely_integrable_on {\<xi>..pi}

goal (1 subgoal):
 1. (\<lambda>x. inverse (2 * (sin (x / 2))\<^sup>2) * h x) absolutely_integrable_on {\<xi>..pi}
[PROOF STEP]
by (simp add: divide_simps)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. inverse (2 * (sin (x / 2))\<^sup>2) * h x) absolutely_integrable_on {\<xi>..pi}

goal (2 subgoals):
 1. {\<xi>..pi} \<in> sets lebesgue
 2. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. (sin (real n / 2 * x))\<^sup>2 * (inverse (2 * (sin (x / 2))\<^sup>2) * h x))

goal (3 subgoals):
 1. \<psi> \<in> borel_measurable (lebesgue_on {\<xi>..pi})
 2. \<And>x. x \<in> {\<xi>..pi} \<Longrightarrow> norm (\<psi> x) \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
 3. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
show "\<psi> \<in> borel_measurable (lebesgue_on {\<xi>..pi})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<psi> \<in> borel_measurable (lebesgue_on {\<xi>..pi})
[PROOF STEP]
apply (rule borel_measurable_integrable)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) \<psi>
[PROOF STEP]
apply (rule Bochner_Integration.integrable_cong [where f = "\<lambda>x. sin(n / 2 * x) ^ 2 / (2 * n * sin(x/2) ^ 2) * h x", OF refl, THEN iffD1])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> space (lebesgue_on {\<xi>..pi}) \<Longrightarrow> (sin (real n / 2 * x))\<^sup>2 / (real (2 * n) * (sin (x / 2))\<^sup>2) * h x = \<psi> x
 2. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. (sin (real n / 2 * x))\<^sup>2 / (real (2 * n) * (sin (x / 2))\<^sup>2) * h x)
[PROOF STEP]
using \<open>0 < \<xi>\<close> **
[PROOF STATE]
proof (prove)
using this:
0 < \<xi>
integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n)

goal (2 subgoals):
 1. \<And>x. x \<in> space (lebesgue_on {\<xi>..pi}) \<Longrightarrow> (sin (real n / 2 * x))\<^sup>2 / (real (2 * n) * (sin (x / 2))\<^sup>2) * h x = \<psi> x
 2. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. (sin (real n / 2 * x))\<^sup>2 / (real (2 * n) * (sin (x / 2))\<^sup>2) * h x)
[PROOF STEP]
apply (force simp: \<psi>_def divide_simps algebra_simps mult_less_0_iff abs_mult)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. (sin (real n / 2 * x))\<^sup>2 / (real (2 * n) * (sin (x / 2))\<^sup>2) * h x)
[PROOF STEP]
using Bochner_Integration.integrable_mult_left [OF ***, of "1/n"]
[PROOF STATE]
proof (prove)
using this:
integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. (sin (real n / 2 * x))\<^sup>2 * (inverse (2 * (sin (x / 2))\<^sup>2) * h x) * (1 / real n))

goal (1 subgoal):
 1. integrable (lebesgue_on {\<xi>..pi}) (\<lambda>x. (sin (real n / 2 * x))\<^sup>2 / (real (2 * n) * (sin (x / 2))\<^sup>2) * h x)
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
\<psi> \<in> borel_measurable (lebesgue_on {\<xi>..pi})

goal (2 subgoals):
 1. \<And>x. x \<in> {\<xi>..pi} \<Longrightarrow> norm (\<psi> x) \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
 2. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
show "norm (\<psi> x) \<le> ?g x" if "x \<in> {\<xi>..pi}" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (\<psi> x) \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
[PROOF STEP]
using that \<dagger>
[PROOF STATE]
proof (prove)
using this:
x \<in> {\<xi>..pi}
?x \<in> space (lebesgue_on {\<xi>..pi}) \<Longrightarrow> \<bar>\<psi> ?x\<bar> \<le> \<bar>h ?x\<bar> / (2 * (sin (?x / 2))\<^sup>2) / real n

goal (1 subgoal):
 1. norm (\<psi> x) \<le> \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
[PROOF STEP]
by (simp add: \<psi>_def)
[PROOF STATE]
proof (state)
this:
?x \<in> {\<xi>..pi} \<Longrightarrow> norm (\<psi> ?x) \<le> \<bar>h ?x\<bar> / (2 * (sin (?x / 2))\<^sup>2) / real n

goal (1 subgoal):
 1. {\<xi>..pi} \<in> sets lebesgue
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {\<xi>..pi}) \<psi>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>integral\<^sup>L (lebesgue_on {\<xi>..pi}) \<psi>\<bar> \<le> LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n

goal (1 subgoal):
 1. \<And>x. ?c \<le> x \<Longrightarrow> norm (LINT xa|lebesgue_on {\<xi>..pi}. Fejer_kernel x xa * h xa) \<le> \<phi> (real x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<bar>integral\<^sup>L (lebesgue_on {\<xi>..pi}) \<psi>\<bar> \<le> LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n
[PROOF STEP]
show "norm (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<le> \<phi> n"
[PROOF STATE]
proof (prove)
using this:
\<bar>integral\<^sup>L (lebesgue_on {\<xi>..pi}) \<psi>\<bar> \<le> LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2) / real n

goal (1 subgoal):
 1. norm (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<le> \<phi> (real n)
[PROOF STEP]
by (simp add: Fejer_kernel \<phi>_def \<psi>_def flip: Bochner_Integration.integral_divide [OF *])
[PROOF STATE]
proof (state)
this:
norm (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<le> \<phi> (real n)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. norm (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<le> \<phi> (real n)

goal (1 subgoal):
 1. (\<lambda>n. (LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> / (2 * (sin (x / 2))\<^sup>2)) / real n) \<longlonglongrightarrow> 0
[PROOF STEP]
show "\<phi> \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<phi> (real x)) \<longlonglongrightarrow> 0
[PROOF STEP]
unfolding \<phi>_def divide_inverse
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (LINT x|lebesgue_on {\<xi>..pi}. \<bar>h x\<bar> * inverse (2 * (sin (x * inverse 2))\<^sup>2)) * inverse (real x)) \<longlonglongrightarrow> 0
[PROOF STEP]
by (simp add: tendsto_mult_right_zero lim_inverse_n)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<phi> (real x)) \<longlonglongrightarrow> 0

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

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<longlonglongrightarrow> 0
[PROOF STEP]
obtain N where N: "\<And>n. n \<ge> N \<Longrightarrow> \<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x\<bar> < e/2"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<And>N. (\<And>n. N \<le> n \<Longrightarrow> \<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x\<bar> < e / 2) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding lim_sequentially
[PROOF STATE]
proof (prove)
using this:
\<forall>r>0. \<exists>no. \<forall>n\<ge>no. dist (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x) 0 < r

goal (1 subgoal):
 1. (\<And>N. (\<And>n. N \<le> n \<Longrightarrow> \<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x\<bar> < e / 2) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis half_gt_zero_iff norm_conv_dist real_norm_def \<open>e > 0\<close>)
[PROOF STATE]
proof (state)
this:
N \<le> ?n \<Longrightarrow> \<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel ?n x * h x\<bar> < e / 2

goal (1 subgoal):
 1. \<And>r. 0 < r \<Longrightarrow> \<exists>no. \<forall>n\<ge>no. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < r
[PROOF STEP]
show "\<exists>N. \<forall>n\<ge>N. \<bar>(LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u)\<bar> < e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>N. \<forall>n\<ge>N. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
proof (intro exI allI impI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
fix n :: nat
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
assume n: "n \<ge> max 1 N"
[PROOF STATE]
proof (state)
this:
max 1 N \<le> n

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
with N
[PROOF STATE]
proof (chain)
picking this:
N \<le> ?n \<Longrightarrow> \<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel ?n x * h x\<bar> < e / 2
max 1 N \<le> n
[PROOF STEP]
have 1: "\<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x\<bar> < e/2"
[PROOF STATE]
proof (prove)
using this:
N \<le> ?n \<Longrightarrow> \<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel ?n x * h x\<bar> < e / 2
max 1 N \<le> n

goal (1 subgoal):
 1. \<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x\<bar> < e / 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x\<bar> < e / 2

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
have "integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> integral\<^sup>L (lebesgue_on {0..pi}) (Fejer_kernel n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> integral\<^sup>L (lebesgue_on {0..pi}) (Fejer_kernel n)
[PROOF STEP]
using \<open>\<xi> < pi\<close> has_bochner_integral_iff has_integral_Fejer_kernel_half
[PROOF STATE]
proof (prove)
using this:
\<xi> < pi
has_bochner_integral ?M ?f ?x = (integrable ?M ?f \<and> integral\<^sup>L ?M ?f = ?x)
has_bochner_integral (lebesgue_on {0..pi}) (Fejer_kernel ?n) (if ?n = 0 then 0 else pi / 2)

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> integral\<^sup>L (lebesgue_on {0..pi}) (Fejer_kernel n)
[PROOF STEP]
by (force intro!: integral_mono_lebesgue_on_AE)
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> integral\<^sup>L (lebesgue_on {0..pi}) (Fejer_kernel n)

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> integral\<^sup>L (lebesgue_on {0..pi}) (Fejer_kernel n)

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
have "\<dots> \<le> pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {0..pi}) (Fejer_kernel n) \<le> pi
[PROOF STEP]
using has_integral_Fejer_kernel_half
[PROOF STATE]
proof (prove)
using this:
has_bochner_integral (lebesgue_on {0..pi}) (Fejer_kernel ?n) (if ?n = 0 then 0 else pi / 2)

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {0..pi}) (Fejer_kernel n) \<le> pi
[PROOF STEP]
by (simp add: has_bochner_integral_iff)
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (lebesgue_on {0..pi}) (Fejer_kernel n) \<le> pi

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> pi
[PROOF STEP]
have int_le_pi: "integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> pi"
[PROOF STATE]
proof (prove)
using this:
integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> pi

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> pi
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> pi

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
have 2: "\<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x\<bar> \<le> (LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e/2/pi)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x\<bar> \<le> LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x\<bar> \<le> LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
have eq: "integral\<^sup>L (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * h x)
                  = integral\<^sup>L (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * (if x = 0 then 0 else h x)
[PROOF STEP]
proof (rule integral_cong_AE)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})
 2. (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x)) \<in> borel_measurable (lebesgue_on {0..\<xi>})
 3. AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)
[PROOF STEP]
have \<dagger>: "{u. u \<noteq> 0 \<longrightarrow> P u} \<inter> {0..\<xi>} = {0} \<union> Collect P \<inter> {0..\<xi>}"
              "{u. u \<noteq> 0 \<and> P u} \<inter> {0..\<xi>} = (Collect P \<inter> {0..\<xi>}) - {0}" for P
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {u. u \<noteq> 0 \<longrightarrow> P u} \<inter> {0..\<xi>} = {0} \<union> Collect P \<inter> {0..\<xi>} &&& {u. u \<noteq> 0 \<and> P u} \<inter> {0..\<xi>} = Collect P \<inter> {0..\<xi>} - {0}
[PROOF STEP]
using \<open>0 < \<xi>\<close>
[PROOF STATE]
proof (prove)
using this:
0 < \<xi>

goal (1 subgoal):
 1. {u. u \<noteq> 0 \<longrightarrow> P u} \<inter> {0..\<xi>} = {0} \<union> Collect P \<inter> {0..\<xi>} &&& {u. u \<noteq> 0 \<and> P u} \<inter> {0..\<xi>} = Collect P \<inter> {0..\<xi>} - {0}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{u. u \<noteq> 0 \<longrightarrow> ?P u} \<inter> {0..\<xi>} = {0} \<union> Collect ?P \<inter> {0..\<xi>}
{u. u \<noteq> 0 \<and> ?P u} \<inter> {0..\<xi>} = Collect ?P \<inter> {0..\<xi>} - {0}

goal (3 subgoals):
 1. (\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})
 2. (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x)) \<in> borel_measurable (lebesgue_on {0..\<xi>})
 3. AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)
[PROOF STEP]
have *: "- {0} \<inter> A \<inter> {0..\<xi>} = A \<inter> {0..\<xi>} - {0}" for A
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - {0} \<inter> A \<inter> {0..\<xi>} = A \<inter> {0..\<xi>} - {0}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
- {0} \<inter> ?A \<inter> {0..\<xi>} = ?A \<inter> {0..\<xi>} - {0}

goal (3 subgoals):
 1. (\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})
 2. (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x)) \<in> borel_measurable (lebesgue_on {0..\<xi>})
 3. AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)
[PROOF STEP]
show "(\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})
[PROOF STEP]
using \<open>\<xi> < pi\<close>
[PROOF STATE]
proof (prove)
using this:
\<xi> < pi

goal (1 subgoal):
 1. (\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})
[PROOF STEP]
by (intro absolutely_integrable_imp_borel_measurable h_aint
                  absolutely_integrable_on_subinterval [OF absolutely_integrable_mult_Fejer_kernel], auto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})

goal (2 subgoals):
 1. (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x)) \<in> borel_measurable (lebesgue_on {0..\<xi>})
 2. AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})
[PROOF STEP]
show "(\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x)) \<in> borel_measurable (lebesgue_on {0..\<xi>})"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. Fejer_kernel n x * h x) \<in> borel_measurable (lebesgue_on {0..\<xi>})

goal (1 subgoal):
 1. (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x)) \<in> borel_measurable (lebesgue_on {0..\<xi>})
[PROOF STEP]
apply (simp add: in_borel_measurable Ball_def vimage_def Collect_conj_eq Collect_imp_eq * flip: Collect_neg_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} \<in> sets (lebesgue_on {0..\<xi>}) \<Longrightarrow> \<forall>x. (0 \<in> x \<longrightarrow> x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> insert 0 {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} \<in> sets (lebesgue_on {0..\<xi>})) \<and> (0 \<notin> x \<longrightarrow> x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} - {0} \<in> sets (lebesgue_on {0..\<xi>}))
[PROOF STEP]
apply (elim all_forward imp_forward asm_rl)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} \<in> sets (lebesgue_on {0..\<xi>}) \<Longrightarrow> (0 \<in> x \<longrightarrow> x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> insert 0 {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} \<in> sets (lebesgue_on {0..\<xi>})) \<and> (0 \<notin> x \<longrightarrow> x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} - {0} \<in> sets (lebesgue_on {0..\<xi>}))
[PROOF STEP]
using \<open>0 < \<xi>\<close>
[PROOF STATE]
proof (prove)
using this:
0 < \<xi>

goal (1 subgoal):
 1. \<And>x. x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} \<in> sets (lebesgue_on {0..\<xi>}) \<Longrightarrow> (0 \<in> x \<longrightarrow> x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> insert 0 {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} \<in> sets (lebesgue_on {0..\<xi>})) \<and> (0 \<notin> x \<longrightarrow> x \<in> sigma_sets UNIV (Collect open) \<longrightarrow> {xa. Fejer_kernel n xa * h xa \<in> x} \<inter> {0..\<xi>} - {0} \<in> sets (lebesgue_on {0..\<xi>}))
[PROOF STEP]
apply (auto simp: \<dagger> sets.insert_in_sets sets_restrict_space_iff cong: conj_cong)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x)) \<in> borel_measurable (lebesgue_on {0..\<xi>})

goal (1 subgoal):
 1. AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)
[PROOF STEP]
have 0: "{0} \<in> null_sets (lebesgue_on {0..\<xi>})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {0} \<in> null_sets (lebesgue_on {0..\<xi>})
[PROOF STEP]
using \<open>0 < \<xi>\<close>
[PROOF STATE]
proof (prove)
using this:
0 < \<xi>

goal (1 subgoal):
 1. {0} \<in> null_sets (lebesgue_on {0..\<xi>})
[PROOF STEP]
by (simp add: null_sets_restrict_space)
[PROOF STATE]
proof (state)
this:
{0} \<in> null_sets (lebesgue_on {0..\<xi>})

goal (1 subgoal):
 1. AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{0} \<in> null_sets (lebesgue_on {0..\<xi>})
[PROOF STEP]
show "AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)"
[PROOF STATE]
proof (prove)
using this:
{0} \<in> null_sets (lebesgue_on {0..\<xi>})

goal (1 subgoal):
 1. AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)
[PROOF STEP]
by (auto intro: AE_I' [OF 0])
[PROOF STATE]
proof (state)
this:
AE x in lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = Fejer_kernel n x * (if x = 0 then 0 else h x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x = LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * (if x = 0 then 0 else h x)

goal (1 subgoal):
 1. \<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x\<bar> \<le> LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x\<bar> \<le> LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
unfolding eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * (if x = 0 then 0 else h x)\<bar> \<le> LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
proof (rule integral_abs_bound_integral)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x))
 2. integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * e / 2 / pi)
 3. \<And>x. x \<in> space (lebesgue_on {0..\<xi>}) \<Longrightarrow> \<bar>Fejer_kernel n x * (if x = 0 then 0 else h x)\<bar> \<le> Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
have "(\<lambda>x. if x = 0 then 0 else h x) absolutely_integrable_on {- pi..pi}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x = 0 then 0 else h x) absolutely_integrable_on {- pi..pi}
[PROOF STEP]
proof (rule absolutely_integrable_spike [OF h_aint])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. negligible ?S
 2. \<And>x. x \<in> {- pi..pi} - ?S \<Longrightarrow> (if x = 0 then 0 else h x) = h x
[PROOF STEP]
show "negligible {0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. negligible {0::'a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
negligible {0::?'a1}

goal (1 subgoal):
 1. \<And>x. x \<in> {- pi..pi} - {0} \<Longrightarrow> (if x = 0 then 0 else h x) = h x
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x = 0 then 0 else h x) absolutely_integrable_on {- pi..pi}

goal (3 subgoals):
 1. integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x))
 2. integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * e / 2 / pi)
 3. \<And>x. x \<in> space (lebesgue_on {0..\<xi>}) \<Longrightarrow> \<bar>Fejer_kernel n x * (if x = 0 then 0 else h x)\<bar> \<le> Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
with \<open>0 < \<xi>\<close> \<open>\<xi> < pi\<close>
[PROOF STATE]
proof (chain)
picking this:
0 < \<xi>
\<xi> < pi
(\<lambda>x. if x = 0 then 0 else h x) absolutely_integrable_on {- pi..pi}
[PROOF STEP]
show "integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x))"
[PROOF STATE]
proof (prove)
using this:
0 < \<xi>
\<xi> < pi
(\<lambda>x. if x = 0 then 0 else h x) absolutely_integrable_on {- pi..pi}

goal (1 subgoal):
 1. integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x))
[PROOF STEP]
by (intro absolutely_integrable_imp_integrable h_aint absolutely_integrable_on_subinterval [OF absolutely_integrable_mult_Fejer_kernel]) auto
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * (if x = 0 then 0 else h x))

goal (2 subgoals):
 1. integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * e / 2 / pi)
 2. \<And>x. x \<in> space (lebesgue_on {0..\<xi>}) \<Longrightarrow> \<bar>Fejer_kernel n x * (if x = 0 then 0 else h x)\<bar> \<le> Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
show "integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * e / 2 / pi)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * e / 2 / pi)
[PROOF STEP]
by (simp add: absolutely_integrable_imp_integrable \<open>\<xi> < pi\<close> absolutely_integrable_mult_Fejer_kernel_reflected_part3 less_eq_real_def)
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {0..\<xi>}) (\<lambda>x. Fejer_kernel n x * e / 2 / pi)

goal (1 subgoal):
 1. \<And>x. x \<in> space (lebesgue_on {0..\<xi>}) \<Longrightarrow> \<bar>Fejer_kernel n x * (if x = 0 then 0 else h x)\<bar> \<le> Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
show "\<bar>Fejer_kernel n x * (if x = 0 then 0 else h x)\<bar> \<le> Fejer_kernel n x * e / 2 / pi"
              if "x \<in> space (lebesgue_on {0..\<xi>})" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>Fejer_kernel n x * (if x = 0 then 0 else h x)\<bar> \<le> Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
using that \<xi> [of x] \<open>e > 0\<close>
[PROOF STATE]
proof (prove)
using this:
x \<in> space (lebesgue_on {0..\<xi>})
0 < x \<and> x \<le> \<xi> \<Longrightarrow> \<bar>h x\<bar> < e / 2 / pi
0 < e

goal (1 subgoal):
 1. \<bar>Fejer_kernel n x * (if x = 0 then 0 else h x)\<bar> \<le> Fejer_kernel n x * e / 2 / pi
[PROOF STEP]
by (auto simp: abs_mult eq simp flip: times_divide_eq_right intro: mult_left_mono)
[PROOF STATE]
proof (state)
this:
?x \<in> space (lebesgue_on {0..\<xi>}) \<Longrightarrow> \<bar>Fejer_kernel n ?x * (if ?x = 0 then 0 else h ?x)\<bar> \<le> Fejer_kernel n ?x * e / 2 / pi

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x\<bar> \<le> LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x\<bar> \<le> LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
have 3: "\<dots> \<le> e/2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi \<le> e / 2
[PROOF STEP]
using int_le_pi \<open>0 < e\<close>
[PROOF STATE]
proof (prove)
using this:
integral\<^sup>L (lebesgue_on {0..\<xi>}) (Fejer_kernel n) \<le> pi
0 < e

goal (1 subgoal):
 1. LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi \<le> e / 2
[PROOF STEP]
by (simp add: divide_simps mult.commute [of e])
[PROOF STATE]
proof (state)
this:
LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi \<le> e / 2

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
have "integrable (lebesgue_on {0..pi}) (\<lambda>x. Fejer_kernel n x * h x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {0..pi}) (\<lambda>x. Fejer_kernel n x * h x)
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {0..pi}) (\<lambda>x. Fejer_kernel n x * (f (t + x) + f (t - x) - (l + r)))
[PROOF STEP]
by (simp add: absolutely_integrable_imp_integrable absolutely_integrable_mult_Fejer_kernel_reflected_part5 assms)
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {0..pi}) (\<lambda>x. Fejer_kernel n x * h x)

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
integrable (lebesgue_on {0..pi}) (\<lambda>x. Fejer_kernel n x * h x)
[PROOF STEP]
have "LINT x|lebesgue_on {0..pi}. Fejer_kernel n x * h x
                 = (LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x) + (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x)"
[PROOF STATE]
proof (prove)
using this:
integrable (lebesgue_on {0..pi}) (\<lambda>x. Fejer_kernel n x * h x)

goal (1 subgoal):
 1. LINT x|lebesgue_on {0..pi}. Fejer_kernel n x * h x = (LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x) + (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x)
[PROOF STEP]
by (rule integral_combine) (use  \<open>0 < \<xi>\<close> \<open>\<xi> < pi\<close> in auto)
[PROOF STATE]
proof (state)
this:
LINT x|lebesgue_on {0..pi}. Fejer_kernel n x * h x = (LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x) + (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x)

goal (1 subgoal):
 1. \<And>n. ?N \<le> n \<Longrightarrow> \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
LINT x|lebesgue_on {0..pi}. Fejer_kernel n x * h x = (LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x) + (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x)
[PROOF STEP]
show "\<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e"
[PROOF STATE]
proof (prove)
using this:
LINT x|lebesgue_on {0..pi}. Fejer_kernel n x * h x = (LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x) + (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x)

goal (1 subgoal):
 1. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
using 1 2 3
[PROOF STATE]
proof (prove)
using this:
LINT x|lebesgue_on {0..pi}. Fejer_kernel n x * h x = (LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x) + (LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x)
\<bar>LINT x|lebesgue_on {\<xi>..pi}. Fejer_kernel n x * h x\<bar> < e / 2
\<bar>LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * h x\<bar> \<le> LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi
LINT x|lebesgue_on {0..\<xi>}. Fejer_kernel n x * e / 2 / pi \<le> e / 2

goal (1 subgoal):
 1. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
\<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>N. \<forall>n\<ge>N. \<bar>LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u\<bar> < e

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. (\<Sum>m<n. \<Sum>k\<le>2 * m. Fourier_coefficient f k * trigonometric_set k t) / real n) \<longlonglongrightarrow> (l + r) / 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * h u) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. (\<Sum>m<n. \<Sum>k\<le>2 * m. Fourier_coefficient f k * trigonometric_set k t) / real n) \<longlonglongrightarrow> (l + r) / 2
[PROOF STEP]
unfolding h_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. LINT u|lebesgue_on {0..pi}. Fejer_kernel n u * (f (t + u) + f (t - u) - (l + r))) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. (\<Sum>m<n. \<Sum>k\<le>2 * m. Fourier_coefficient f k * trigonometric_set k t) / real n) \<longlonglongrightarrow> (l + r) / 2
[PROOF STEP]
by (simp add: Fourier_sum_limit_Fejer_kernel_half assms add_divide_distrib)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (\<Sum>m<n. \<Sum>k\<le>2 * m. Fourier_coefficient f k * trigonometric_set k t) / real n) \<longlonglongrightarrow> (l + r) / 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma integrable_mono_on:
  fixes f :: "real \<Rightarrow> real"
  assumes "mono_on {a..b} f"
  shows "integrable (lebesgue_on {a..b}) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
define f' where "f' \<equiv> \<lambda>x. if x \<in> {a..b} then f x - f a else 0"
[PROOF STATE]
proof (state)
this:
f' \<equiv> \<lambda>x. if x \<in> {a..b} then f x - f a else 0

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
have "mono_on {a..b} f'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono_on {a..b} f'
[PROOF STEP]
by (smt (verit, best) assms f'_def mono_on_def)
[PROOF STATE]
proof (state)
this:
mono_on {a..b} f'

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
mono_on {a..b} f'

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
have 0: "\<And>x. 0 \<le> f' x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. 0 \<le> f' x
[PROOF STEP]
by (smt (verit, best) assms atLeastAtMost_iff f'_def mono_on_def)
[PROOF STATE]
proof (state)
this:
0 \<le> f' ?x

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
mono_on {a..b} f'
0 \<le> f' ?x
[PROOF STEP]
have "integrable (lebesgue_on {a..b}) f'"
[PROOF STATE]
proof (prove)
using this:
mono_on {a..b} f'
0 \<le> f' ?x

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f'
[PROOF STEP]
using integrable_mono_on_nonneg
[PROOF STATE]
proof (prove)
using this:
mono_on {a..b} f'
0 \<le> f' ?x
\<lbrakk>mono_on {?a..?b} ?f; \<And>x. 0 \<le> ?f x\<rbrakk> \<Longrightarrow> integrable (lebesgue_on {?a..?b}) ?f

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f'
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {a..b}) f'

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
integrable (lebesgue_on {a..b}) f'
[PROOF STEP]
have "integrable (lebesgue_on {a..b}) (\<lambda>x. f' x + f a)"
[PROOF STATE]
proof (prove)
using this:
integrable (lebesgue_on {a..b}) f'

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) (\<lambda>x. f' x + f a)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {a..b}) (\<lambda>x. f' x + f a)

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {a..b}) (\<lambda>x. f' x + f a)

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
have "space lborel = space lebesgue" "sets borel \<subseteq> sets lebesgue"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space lborel = space lebesgue &&& sets borel \<subseteq> sets lebesgue
[PROOF STEP]
by force+
[PROOF STATE]
proof (state)
this:
space lborel = space lebesgue
sets borel \<subseteq> sets lebesgue

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
space lborel = space lebesgue
sets borel \<subseteq> sets lebesgue
[PROOF STEP]
have fborel: "f \<in> borel_measurable (lebesgue_on {a..b})"
[PROOF STATE]
proof (prove)
using this:
space lborel = space lebesgue
sets borel \<subseteq> sets lebesgue

goal (1 subgoal):
 1. f \<in> borel_measurable (lebesgue_on {a..b})
[PROOF STEP]
by (metis assms borel_measurable_mono_on_fnc borel_measurable_subalgebra mono_restrict_space space_lborel space_restrict_space)
[PROOF STATE]
proof (state)
this:
f \<in> borel_measurable (lebesgue_on {a..b})

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
integrable (lebesgue_on {a..b}) (\<lambda>x. f' x + f a)
f \<in> borel_measurable (lebesgue_on {a..b})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
integrable (lebesgue_on {a..b}) (\<lambda>x. f' x + f a)
f \<in> borel_measurable (lebesgue_on {a..b})

goal (1 subgoal):
 1. integrable (lebesgue_on {a..b}) f
[PROOF STEP]
by (rule integrable_cong_AE_imp) (auto simp add: f'_def)
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {a..b}) f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma connected_space_iff_components_subset_singleton:
   "connected_space X \<longleftrightarrow> (\<exists>a. connected_components_of X \<subseteq> {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. connected_space X = (\<exists>a. connected_components_of X \<subseteq> {a})
[PROOF STEP]
by (simp add: connected_components_of_subset_sing)


[STATEMENT]
lemma translation_eq_singleton_plus: "(\<lambda>x. a + x) ` T = {a} + T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) a ` T = {a} + T
[PROOF STEP]
unfolding set_plus_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) a ` T = {c. \<exists>a\<in>{a}. \<exists>b\<in>T. c = a + b}
[PROOF STEP]
by auto


[STATEMENT]
lemma lfp_pair: "lfp (\<lambda>f (a, b). F (\<lambda>a b. f (a, b)) a b) (a, b) = lfp F a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lfp (\<lambda>f (a, b). F (\<lambda>a b. f (a, b)) a b) (a, b) = lfp F a b
[PROOF STEP]
unfolding lfp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sqinter> {u. (\<lambda>(x, y). F (\<lambda>a b. u (a, b)) x y) \<le> u}) (a, b) = (\<Sqinter> {u. F u \<le> u}) a b
[PROOF STEP]
by (auto intro!: INF_eq simp: le_fun_def)
     (auto intro!: exI[of _ "\<lambda>(a, b). x a b" for x])


[STATEMENT]
lemma subst_fmla_Iff [simp]: "(A IFF B)(i::=x) = (A(i::=x)) IFF (B(i::=x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A IFF B)(i::=x) = A(i::=x) IFF B(i::=x)
[PROOF STEP]
by (auto simp: Iff_def)


[STATEMENT]
lemma times_p_pow_neg_val:
  assumes "a \<in> carrier Q\<^sub>p"
  assumes "b = \<pp>[^]-n \<otimes> a"
  shows "val b = val a - n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. val b = val a - eint n
[PROOF STEP]
by (metis Qp.m_comm Qp_int_pow_nonzero assms(1) assms(2) p_intpow_closed(1) p_intpow_inv'' p_nonzero val_fract val_p_int_pow)


[STATEMENT]
lemma fourier_unity_root:
  fixes k :: nat
  assumes "k > 0"
  shows "poly (finite_fourier_poly' f k) (unity_root k m) =
    (\<Sum>n<k.1/k*(\<Sum>m<k.(f m)*unity_root k (-n*m))*unity_root k (m*n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
have "poly (finite_fourier_poly' f k) (unity_root k m) =
        (\<Sum>n\<le>k-1. coeff (finite_fourier_poly' f k) n *(unity_root k m)^n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int m) ^ n)
[PROOF STEP]
using poly_altdef'[of "finite_fourier_poly' f k" "k-1" "unity_root k m"]
          degree_finite_fourier_poly'[of f k]
[PROOF STATE]
proof (prove)
using this:
degree (finite_fourier_poly' f k) \<le> k - 1 \<Longrightarrow> poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>i\<le>k - 1. coeff (finite_fourier_poly' f k) i * unity_root k (int m) ^ i)
degree (finite_fourier_poly' f k) \<le> k - 1

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int m) ^ n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int m) ^ n)

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int m) ^ n)

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
have "\<dots> = (\<Sum>n\<le>k-1. coeff (finite_fourier_poly' f k) n *(unity_root k (m*n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int m) ^ n) = (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n)))
[PROOF STEP]
using unity_root_pow
[PROOF STATE]
proof (prove)
using this:
unity_root ?k ?n ^ ?m = unity_root ?k (?n * int ?m)

goal (1 subgoal):
 1. (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int m) ^ n) = (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int m) ^ n) = (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n)))

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int m) ^ n) = (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n)))

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
have "\<dots> = (\<Sum>n<k. coeff (finite_fourier_poly' f k) n *(unity_root k (m*n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n))) = (\<Sum>n<k. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n)))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < k

goal (1 subgoal):
 1. (\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n))) = (\<Sum>n<k. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n)))
[PROOF STEP]
by (intro sum.cong) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n))) = (\<Sum>n<k. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n)))

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>n\<le>k - 1. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n))) = (\<Sum>n<k. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n)))

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
have "\<dots> = (\<Sum>n<k.(1/k)*(\<Sum>m<k.(f m)*unity_root k (-n*m))*(unity_root k (m*n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n<k. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n))) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
using coeff_finite_fourier_poly'[of _ k f]
[PROOF STATE]
proof (prove)
using this:
?n < k \<Longrightarrow> coeff (finite_fourier_poly' f k) ?n = 1 / of_nat k * (\<Sum>m<k. f m * unity_root k (- int ?n * int m))

goal (1 subgoal):
 1. (\<Sum>n<k. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n))) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>n<k. coeff (finite_fourier_poly' f k) n * unity_root k (int (m * n))) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
show
   "poly (finite_fourier_poly' f k) (unity_root k m) =
    (\<Sum>n<k.1/k*(\<Sum>m<k.(f m)*unity_root k (-n*m))*unity_root k (m*n))"
[PROOF STATE]
proof (prove)
using this:
poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))

goal (1 subgoal):
 1. poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
poly (finite_fourier_poly' f k) (unity_root k (int m)) = (\<Sum>n<k. complex_of_real (1 / real k) * (\<Sum>m<k. f m * unity_root k (- int n * int m)) * unity_root k (int (m * n)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pair_o_assoc'[simp]:
  assumes [simp]: \<open>compatible F G\<close> \<open>compatible G H\<close> \<open>compatible F H\<close>
  shows \<open>((F; G); H) \<circ> assoc' = (F; (G; H))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((F;G);H) \<circ> assoc' = (F;(G;H))
[PROOF STEP]
proof (rule tensor_extensionality3)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. register (((F;G);H) \<circ> assoc')
 2. register (F;(G;H))
 3. \<And>f g h. (((F;G);H) \<circ> assoc') (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h) = (F;(G;H)) (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h)
[PROOF STEP]
show \<open>register (((F; G); H) \<circ> assoc')\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. register (((F;G);H) \<circ> assoc')
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
register (((F;G);H) \<circ> assoc')

goal (2 subgoals):
 1. register (F;(G;H))
 2. \<And>f g h. (((F;G);H) \<circ> assoc') (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h) = (F;(G;H)) (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h)
[PROOF STEP]
show \<open>register (F; (G; H))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. register (F;(G;H))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
register (F;(G;H))

goal (1 subgoal):
 1. \<And>f g h. (((F;G);H) \<circ> assoc') (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h) = (F;(G;H)) (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h)
[PROOF STEP]
show \<open>(((F; G); H) \<circ> assoc') (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h) = (F; (G; H)) (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h)\<close> for f g h
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (((F;G);H) \<circ> assoc') (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h) = (F;(G;H)) (f \<otimes>\<^sub>u g \<otimes>\<^sub>u h)
[PROOF STEP]
by (simp add: register_pair_apply assoc'_apply cblinfun_compose_assoc)
[PROOF STATE]
proof (state)
this:
(((F;G);H) \<circ> assoc') (?f \<otimes>\<^sub>u ?g \<otimes>\<^sub>u ?h) = (F;(G;H)) (?f \<otimes>\<^sub>u ?g \<otimes>\<^sub>u ?h)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma infinite_Bpow:
assumes rc: "Card_order r" and r: "Field r \<noteq> {}"
and A: "\<not>finite A"
shows "\<not>finite (Bpow r A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite (Bpow r A)
[PROOF STEP]
using ordLeq_card_Bpow[OF rc r]
[PROOF STATE]
proof (prove)
using this:
|?A| \<le>o |Bpow r ?A|

goal (1 subgoal):
 1. infinite (Bpow r A)
[PROOF STEP]
by (metis A card_of_ordLeq_infinite)


[STATEMENT]
lemma forall_cons [rule_format]: "(\<forall>x \<in> set (s#S). P x) \<and> y \<in> set S \<longrightarrow> P y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>set (s # S). P x) \<and> y \<in> set S \<longrightarrow> P y
[PROOF STEP]
by (induct_tac S) simp_all


[STATEMENT]
lemma minus_mult_vec_minus: "(- p) ** (- q) = p ** q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - p ** - q = p ** q
[PROOF STEP]
by (simp add: mult_vec_minus_mult_left mult_vec_minus_mult_right)


[STATEMENT]
lemma norm_axis: "norm (axis i x) = norm x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (axis i x) = norm x
[PROOF STEP]
unfolding axis_def norm_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L2_set (\<lambda>ia. norm ((\<chi>ia. if ia = i then x else (0::'a)) $ ia)) UNIV = norm x
[PROOF STEP]
unfolding L2_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (\<Sum>ia\<in>UNIV. (norm ((\<chi>ia. if ia = i then x else (0::'a)) $ ia))\<^sup>2) = norm x
[PROOF STEP]
by(clarsimp simp add: if_distrib[where f=norm] if_distrib[where f="\<lambda>x. x\<^sup>2"] sum.If_cases)


[STATEMENT]
theorem partialCorrectness:
  fixes F0 :: Formula and decisionVars :: "Variable set" and state0 :: State and state :: State
  assumes
  "vars F0 \<subseteq> decisionVars" and

  "isInitialState state0 F0" and
  "(state0, state) \<in> transitionRelation decisionVars" and
  "isFinalState state decisionVars"
  shows
  "satisfiable F0 = (\<not> formulaFalse (getF state) (elements (getM state)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. satisfiable F0 = (\<not> formulaFalse (getF state) (elements (getM state)))
[PROOF STEP]
(*----------------------------------------------------------------------------*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. satisfiable F0 = (\<not> formulaFalse (getF state) (elements (getM state)))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
vars F0 \<subseteq> decisionVars
isInitialState state0 F0
(state0, state) \<in> transitionRelation decisionVars
isFinalState state decisionVars

goal (1 subgoal):
 1. satisfiable F0 = (\<not> formulaFalse (getF state) (elements (getM state)))
[PROOF STEP]
using completenessForUNSAT[of "F0" "decisionVars" "state0" "state"]
[PROOF STATE]
proof (prove)
using this:
vars F0 \<subseteq> decisionVars
isInitialState state0 F0
(state0, state) \<in> transitionRelation decisionVars
isFinalState state decisionVars
\<lbrakk>vars F0 \<subseteq> decisionVars; \<not> satisfiable F0; isInitialState state0 F0; (state0, state) \<in> transitionRelation decisionVars; isFinalState state decisionVars\<rbrakk> \<Longrightarrow> formulaFalse (getF state) (elements (getM state)) \<and> decisions (getM state) = []

goal (1 subgoal):
 1. satisfiable F0 = (\<not> formulaFalse (getF state) (elements (getM state)))
[PROOF STEP]
using completenessForSAT[of "F0" "state0" "state" "decisionVars"]
[PROOF STATE]
proof (prove)
using this:
vars F0 \<subseteq> decisionVars
isInitialState state0 F0
(state0, state) \<in> transitionRelation decisionVars
isFinalState state decisionVars
\<lbrakk>vars F0 \<subseteq> decisionVars; \<not> satisfiable F0; isInitialState state0 F0; (state0, state) \<in> transitionRelation decisionVars; isFinalState state decisionVars\<rbrakk> \<Longrightarrow> formulaFalse (getF state) (elements (getM state)) \<and> decisions (getM state) = []
\<lbrakk>satisfiable F0; isInitialState state0 F0; (state0, state) \<in> transitionRelation decisionVars; isFinalState state decisionVars\<rbrakk> \<Longrightarrow> \<not> formulaFalse (getF state) (elements (getM state)) \<and> decisionVars \<subseteq> vars (elements (getM state))

goal (1 subgoal):
 1. satisfiable F0 = (\<not> formulaFalse (getF state) (elements (getM state)))
[PROOF STEP]
by auto


[STATEMENT]
lemma ccw_scale23: "ccw 0 a b \<Longrightarrow> r > 0 \<Longrightarrow> ccw 0 (r *\<^sub>R a) (r *\<^sub>R b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ccw 0 a b; 0 < r\<rbrakk> \<Longrightarrow> ccw 0 (r *\<^sub>R a) (r *\<^sub>R b)
[PROOF STEP]
by (auto simp: ccw_def psi_scale)


[STATEMENT]
lemma power_down_nonpos_iff[simp]:
  notes [simp del] = power_down_neg_iff power_down_eq_zero_iff
  shows "power_down prec b n \<le> 0 \<longleftrightarrow> b < 0 \<and> odd n \<or> b = 0 \<and> n \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (power_down prec b n \<le> 0) = (b < 0 \<and> odd n \<or> b = 0 \<and> n \<noteq> 0)
[PROOF STEP]
using power_down_neg_iff[of prec b n] power_down_eq_zero_iff[of prec b n]
[PROOF STATE]
proof (prove)
using this:
(power_down prec b n < 0) = (b < 0 \<and> odd n)
(power_down prec b n = 0) = (b = 0 \<and> n \<noteq> 0)

goal (1 subgoal):
 1. (power_down prec b n \<le> 0) = (b < 0 \<and> odd n \<or> b = 0 \<and> n \<noteq> 0)
[PROOF STEP]
by auto


[STATEMENT]
lemma LIM_fun_not_zero: "f \<midarrow>c\<rightarrow> l \<Longrightarrow> l \<noteq> 0 \<Longrightarrow> \<exists>r. 0 < r \<and> (\<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x \<noteq> 0)"
  for f :: "real \<Rightarrow> real"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<midarrow>c\<rightarrow> l; l \<noteq> 0\<rbrakk> \<Longrightarrow> \<exists>r>0. \<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x \<noteq> 0
[PROOF STEP]
using LIM_fun_gt_zero[of f l c] LIM_fun_less_zero[of f l c]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f \<midarrow>c\<rightarrow> l; 0 < l\<rbrakk> \<Longrightarrow> \<exists>r>0. \<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> 0 < f x
\<lbrakk>f \<midarrow>c\<rightarrow> l; l < 0\<rbrakk> \<Longrightarrow> \<exists>r>0. \<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x < 0

goal (1 subgoal):
 1. \<lbrakk>f \<midarrow>c\<rightarrow> l; l \<noteq> 0\<rbrakk> \<Longrightarrow> \<exists>r>0. \<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x \<noteq> 0
[PROOF STEP]
by (auto simp: neq_iff)