Mathlib.Analysis.Approximation.Chebyshev.Jackson
Jackson-style approximation bounds assembled from Chebyshev kernels, tensor constructions, coefficient envelopes, and extraction lemmas.
Fourier 8 core · 1 supporting The generic summation-by-parts statement uses a finitely supported complex sequence on ℤ. ★ finiteFourier_twice_summation_by_parts
Finite Fourier reconstruction and localized Jackson packets
The generic summation-by-parts statement uses a finitely supported complex
sequence on ℤ. The packet statements specialize it to the two high-frequency
shifts of the normalized order-four Jackson kernel.
The Fourier series of a complex sequence indexed by the integers at a real angle u is the sum over all integers j of the j-th term of the sequence times the complex exponential of i j u; it is a Fourier polynomial when the sequence has finite support.
The second forward difference of a complex sequence indexed by the integers at an index j is the term at j + 2 minus twice the term at j + 1 plus the term at j.
Definition (Lean source)
For a complex sequence indexed by the integers with finite support and any real angle u, the Fourier series of the second forward difference of the sequence equals the square of (the complex exponential of −i u, minus one) times the Fourier series of the sequence itself.
Formal statement
Proof (Lean source)
The torus distance of a real angle is the smallest distance from the angle to an integer multiple of 2π.
The plus-shifted antiderivative coefficient of order N at an integer frequency j is the normalized Jackson coefficient at j divided by the square of 4N + j.
Definition (Lean source)
The minus-shifted antiderivative coefficient of order N at an integer frequency j is the normalized Jackson coefficient at j divided by the square of 4N − j.
Definition (Lean source)
The oscillatory Jackson packet of order N at an angle u is the scaled Jackson kernel at u times the cosine of 4N u.
Definition (Lean source)
The packet antiderivative of order N at an angle u is minus one half times the sum, over integer frequencies j between −(2N − 2) and 2N − 2, of the plus-shifted coefficient times the cosine of (4N + j) u plus the minus-shifted coefficient times the cosine of (4N − j) u; it is the candidate twice antiderivative of the oscillatory Jackson packet.
Definition (Lean source)
1 supporting declaration (lemmas, instances)
-
packet_zero_meantheorem — For an order N that is at least two, the packet antiderivative integrates to zero over the period from −π to π.Proof (Lean source)
theorem packet_zero_mean (N : ℕ) (hN : 2 ≤ N) : (∫ u in Icc (-pi) pi, packetAntideriv N u) = 0 := by have hcos (k : ℤ) (hk : k ≠ 0) : (∫ u in Icc (-pi) pi, cos ((k : ℝ) * u)) = 0 := by rw [MeasureTheory.integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (a := -pi) (b := pi) (by linarith [Real.pi_pos] : -pi ≤ pi)] have hk0 : (k : ℝ) ≠ 0 := by exact_mod_cast hk rw [intervalIntegral.integral_comp_mul_left cos hk0, integral_cos] simp have hfreq (j : ℤ) (hj : j ∈ Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ)) : 4 * (N : ℤ) + j ≠ 0 ∧ 4 * (N : ℤ) - j ≠ 0 := by have hj' := Finset.mem_Icc.mp hj constructor <;> omega have hInt (k : ℤ) : IntegrableOn (fun u : ℝ => cos ((k : ℝ) * u)) (Icc (-pi) pi) := by exact (show Continuous (fun u : ℝ => cos ((k : ℝ) * u)) by fun_prop) |>.continuousOn.integrableOn_compact isCompact_Icc unfold packetAntideriv rw [MeasureTheory.integral_const_mul, MeasureTheory.integral_finsetSum] · apply mul_eq_zero_of_right apply Finset.sum_eq_zero intro j hj rw [MeasureTheory.integral_add ((hInt _).const_mul _) ((hInt _).const_mul _), MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul] obtain ⟨hp, hm⟩ := hfreq j hj rw [hcos _ hp, hcos _ hm] ring · intro j hj exact ((hInt _).const_mul _).add ((hInt _).const_mul _)
Coefficients 6 core · 15 supporting The zero-extended triangle triangle N is convolved with itself on ℤ. ★ kernelCoeff_eq_normalizedCoeff
Finite Fourier coefficients of the order-four Jackson kernel
The zero-extended triangle triangle N is convolved with itself on ℤ.
The normalization agrees with the Jackson kernel in Causalean, whose integral
over [-π, π] is one for positive order.
The triangular sequence of order N at an integer frequency j is N minus the absolute value of j when that is nonnegative, and zero otherwise.
Definition (Lean source)
The raw Jackson Fourier coefficient of order N at an integer frequency j is the discrete convolution of the order-N triangular sequence with itself: the sum over integers k between −N and N of the triangle at k times the triangle at j − k.
The normalized Jackson coefficient of order N at an integer frequency j is the raw Jackson Fourier coefficient at j divided by its value at frequency zero; at order zero that denominator vanishes and the coefficient is read as zero.
Definition (Lean source)
The scaled Jackson kernel of order N at an angle u is 2π times the normalized Jackson kernel, so that for positive order it integrates to 2π over a period and its zeroth Fourier coefficient is one.
The cosine Fourier coefficient of the scaled Jackson kernel of order N at an integer frequency j is one over 2π times the integral over the period from −π to π of the kernel times the cosine of j times the angle.
For an order N that is positive and any integer frequency j, the cosine Fourier coefficient of the scaled Jackson kernel, defined by integration, equals the normalized Jackson coefficient.
Formal statement
Proof (Lean source)
15 supporting declarations (lemmas, instances)
-
triangle_supporttheorem — For an order N and an integer frequency j whose absolute value is at least N, the triangular sequence is zero.Proof (Lean source)
theorem triangle_support (N : ℕ) (j : ℤ) (hj : (N : ℤ) ≤ |j|) : triangle N j = 0 := by have h : N ≤ j.natAbs := by exact_mod_cast (show (N : ℤ) ≤ (j.natAbs : ℤ) by simpa only [Int.natCast_natAbs] using hj) simp [triangle, Nat.sub_eq_zero_of_le h] -
convolution_supporttheorem — For an order N and an integer frequency j whose absolute value exceeds 2N − 2, the raw Jackson Fourier coefficient is zero.hypothesesN :ℕj :ℤhj :((2 * N - 2 : ℕ) : ℤ) < |j|conclusionconvolution N j = 0Proof (Lean source)
theorem convolution_support (N : ℕ) (j : ℤ) (hj : ((2 * N - 2 : ℕ) : ℤ) < |j|) : convolution N j = 0 := by unfold convolution apply Finset.sum_eq_zero intro k hk have hbound : (N : ℤ) ≤ |k| ∨ (N : ℤ) ≤ |j - k| := by by_cases hN : N = 0 · left simp [hN] · have hN' : 1 ≤ N := by omega have hlim : (((2 * N - 2 : ℕ) : ℤ)) = 2 * (N : ℤ) - 2 := by omega rw [hlim] at hj by_cases h : (N : ℤ) ≤ |k| · exact Or.inl h · right have h1 : |j| ≤ |k| + |j - k| := by have heq : k + (j - k) = j := by ring simpa only [heq] using abs_add_le k (j - k) omega rcases hbound with h | h · simp [triangle_support N k h] · simp [triangle_support N (j - k) h] -
convolution_zerotheorem — For any order N, the raw Jackson Fourier coefficient at frequency zero equals (2N³ + N) / 3.hypothesesN :ℕconclusionconvolution N 0 = (2 * (N : ℝ) ^ 3 + N) / 3Proof (Lean source)
theorem convolution_zero (N : ℕ) : convolution N 0 = (2 * (N : ℝ) ^ 3 + N) / 3 := by have heven : Even (fun k : ℤ => triangle N k * triangle N (0 - k)) := by intro k simp [triangle, Int.natAbs_neg] rw [convolution, Finset.sum_Icc_of_even_eq_range heven N] have hterms : ∀ m ∈ range (N + 1), triangle N (m : ℤ) * triangle N (0 - (m : ℤ)) = ((N - m : ℕ) : ℝ) ^ 2 := by intro m hm have hmN : m ≤ N := by simpa using Finset.mem_range.mp hm simp [triangle, Int.natAbs_neg, pow_two] rw [Finset.sum_congr rfl hterms] simp only [triangle, Int.natAbs_zero, Nat.sub_zero, sub_zero, pow_two, two_smul] have hflip : (∑ m ∈ range (N + 1), ((N - m : ℕ) : ℝ) * ((N - m : ℕ) : ℝ)) = ∑ m ∈ range (N + 1), (m : ℝ) ^ 2 := by rw [← Finset.sum_flip (n := N) (fun m : ℕ => (m : ℝ) ^ 2)] apply Finset.sum_congr rfl intro m hm ring rw [hflip] have hsq : ∀ n : ℕ, (∑ m ∈ range (n + 1), (m : ℝ) ^ 2) = (n : ℝ) * (n + 1) * (2 * n + 1) / 6 := by intro n induction n with | zero => simp | succ n ih => rw [Finset.sum_range_succ, ih] push_cast ring rw [hsq N] ring -
convolution_zero_postheorem — For an order N that is positive, the raw Jackson Fourier coefficient at frequency zero is strictly positive.hypothesesN :ℕhN :0 < Nconclusion0 < convolution N 0Proof (Lean source)
theorem convolution_zero_pos (N : ℕ) (hN : 0 < N) : 0 < convolution N 0 := by rw [convolution_zero N] have h : (0 : ℝ) < N := by exact_mod_cast hN positivity -
triangle_fouriertheorem — For an order N that is positive and any angle u, the square of the degree-(N − 1) Chebyshev polynomial of the second kind evaluated at the cosine of u / 2 equals the finite cosine series, over integer frequencies j from −N to N, with the triangular sequence as coefficients.hypothesesN :ℕhN :0 < Nu :ℝProof (Lean source)
theorem triangle_fourier (N : ℕ) (hN : 0 < N) (u : ℝ) : ((U ℝ ((N - 1 : ℕ) : ℤ)).eval (cos (u / 2))) ^ 2 = ∑ j ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N j * cos ((j : ℝ) * u) := by have heven : Even (fun j : ℤ => triangle N j * cos ((j : ℝ) * u)) := by intro j simp [triangle, Int.natAbs_neg, Real.cos_neg] rw [Finset.sum_Icc_of_even_eq_range heven N] rw [Finset.sum_range_succ' (fun m : ℕ => triangle N (m : ℤ) * cos (((m : ℤ) : ℝ) * u)) N] have hsum : (∑ m ∈ range N, triangle N (((m + 1 : ℕ) : ℤ)) * cos (((((m + 1 : ℕ) : ℤ) : ℝ)) * u)) = ∑ m ∈ range (N - 1), ((N - 1 - m : ℕ) : ℝ) * cos ((((m + 1 : ℕ) : ℝ)) * u) := by have hNs : N = (N - 1) + 1 := by omega conv_lhs => rw [hNs, Finset.sum_range_succ] have hend : triangle N ((((N - 1) + 1 : ℕ) : ℤ)) = 0 := by rw [← hNs] exact triangle_support N N (by simp) simp only [← hNs, triangle_support N N (by simp), zero_mul, add_zero] apply Finset.sum_congr rfl intro m hm have hmN : m < N := by have := Finset.mem_range.mp hm; omega have hmle : m + 1 ≤ N := by omega simp only [triangle, Int.natAbs_natCast, Int.cast_natCast] rw [show N - (m + 1) = N - 1 - m by omega] rw [hsum] have h0 : triangle N (0 : ℤ) * cos (((0 : ℤ) : ℝ) * u) = (N : ℝ) := by simp [triangle] rw [h0] have hcheb := cheb_U_sq_eval (N - 1) u simp only [Nat.cast_zero, Int.cast_natCast, Int.cast_zero, zero_mul, Real.cos_zero, mul_one] at * rw [h0, two_smul] rw [hcheb] have hcast : ((N - 1 : ℕ) : ℝ) + 1 = (N : ℝ) := by exact_mod_cast (show N - 1 + 1 = N by omega) rw [hcast] have hsumcast : (∑ m ∈ range (N - 1), ((N - 1 - m : ℕ) : ℝ) * cos (((m + 1 : ℕ) : ℝ) * u)) = ∑ m ∈ range (N - 1), (((N - 1 : ℕ) : ℝ) - (m : ℝ)) * cos (((m + 1 : ℕ) : ℝ) * u) := by apply Finset.sum_congr rfl intro m hm have hmle : m ≤ N - 1 := by have := Finset.mem_range.mp hm; omega rw [Nat.cast_sub hmle] rw [hsumcast] ring -
finite_cosine_square_of_eventheorem — For a finite set of integer frequencies that is symmetric under negation, real coefficients that are even in the frequency, and any angle u, the square of the cosine series with those frequencies and coefficients equals the double sum over pairs of frequencies of the product of the two coefficients times the cosine of the sum of the two frequencies times u.hypothesesProof (Lean source)
theorem finite_cosine_square_of_even (s : Finset ℤ) (a : ℤ → ℝ) (hs : ∀ k : ℤ, k ∈ s ↔ -k ∈ s) (ha : ∀ k : ℤ, a (-k) = a k) (u : ℝ) : (∑ k ∈ s, a k * cos ((k : ℝ) * u)) ^ 2 = ∑ k ∈ s, ∑ l ∈ s, a k * a l * cos (((k + l : ℤ) : ℝ) * u) := by have hneg : -s = s := by ext k rw [Finset.mem_neg] constructor · rintro ⟨y, hy, rfl⟩ exact (hs y).mp hy · intro hk exact ⟨-k, (hs k).mp hk, by simp⟩ have hdiff : (∑ k ∈ s, ∑ l ∈ s, a k * a l * cos (((k - l : ℤ) : ℝ) * u)) = ∑ k ∈ s, ∑ l ∈ s, a k * a l * cos (((k + l : ℤ) : ℝ) * u) := by apply Finset.sum_congr rfl intro k hk have h := Finset.sum_neg_index s (fun l => a k * a l * cos (((k + l : ℤ) : ℝ) * u)) rw [hneg] at h rw [h] apply Finset.sum_congr rfl intro l hl simp only [ha, sub_eq_add_neg] have hpoint (k l : ℤ) : (a k * cos ((k : ℝ) * u)) * (a l * cos ((l : ℝ) * u)) = (a k * a l * cos (((k + l : ℤ) : ℝ) * u) + a k * a l * cos (((k - l : ℤ) : ℝ) * u)) / 2 := by push_cast rw [show ((k : ℝ) + (l : ℝ)) * u = (k : ℝ) * u + (l : ℝ) * u by ring, show ((k : ℝ) - (l : ℝ)) * u = (k : ℝ) * u - (l : ℝ) * u by ring] rw [Real.cos_add, Real.cos_sub] ring rw [pow_two, Finset.sum_mul_sum] simp_rw [hpoint, add_div, Finset.sum_add_distrib, ← Finset.sum_div] rw [hdiff] ring -
triangle_pair_sum_eq_convolutiontheorem — For an order N that is positive and any angle u, the double sum over pairs of frequencies between −N and N of the product of two triangular coefficients times the cosine of the summed frequency times u equals the cosine series over frequencies j between −(2N − 2) and 2N − 2 with the raw Jackson Fourier coefficients.hypothesesN :ℕhN :0 < Nu :ℝProof (Lean source)
theorem triangle_pair_sum_eq_convolution (N : ℕ) (hN : 0 < N) (u : ℝ) : (∑ k ∈ Icc (-(N : ℤ)) (N : ℤ), ∑ l ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N k * triangle N l * cos (((k + l : ℤ) : ℝ) * u)) = ∑ j ∈ Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ), convolution N j * cos ((j : ℝ) * u) := by let base : Finset ℤ := Icc (-(N : ℤ)) (N : ℤ) let wide : Finset ℤ := Icc (-(2 * N : ℤ)) (2 * N : ℤ) let narrow : Finset ℤ := Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ) have hshift (k : ℤ) (hk : k ∈ base) : (∑ l ∈ base, triangle N k * triangle N l * cos (((k + l : ℤ) : ℝ) * u)) = ∑ j ∈ wide, triangle N k * triangle N (j - k) * cos ((j : ℝ) * u) := by have hb : -(N : ℤ) ≤ k ∧ k ≤ (N : ℤ) := Finset.mem_Icc.mp hk have hbij : (∑ l ∈ base, triangle N k * triangle N l * cos (((k + l : ℤ) : ℝ) * u)) = ∑ j ∈ Icc (k - (N : ℤ)) (k + (N : ℤ)), triangle N k * triangle N (j - k) * cos ((j : ℝ) * u) := by apply Finset.sum_bij (fun l _ => k + l) · intro l hl change l ∈ Icc (-(N : ℤ)) (N : ℤ) at hl simp only [Finset.mem_Icc] at hl ⊢ omega · intro l₁ hl₁ l₂ hl₂ heq omega · intro j hj refine ⟨j - k, ?_, by ring⟩ · change j - k ∈ Icc (-(N : ℤ)) (N : ℤ) simp only [Finset.mem_Icc] at hj ⊢ omega · intro l hl simp only [add_sub_cancel_left] rw [hbij] apply Finset.sum_subset · intro j hj simp only [Finset.mem_Icc] at hj ⊢ dsimp [wide] simp only [Finset.mem_Icc] omega · intro j hj hjnot have hzero : triangle N (j - k) = 0 := by apply triangle_support simp only [Finset.mem_Icc] at hjnot have : j - k ≤ -(N : ℤ) ∨ (N : ℤ) ≤ j - k := by omega rcases this with h | h · rw [abs_of_nonpos (by omega)] omega · rw [abs_of_nonneg (by omega)] omega simp [hzero] have hwide : (∑ k ∈ base, ∑ l ∈ base, triangle N k * triangle N l * cos (((k + l : ℤ) : ℝ) * u)) = ∑ j ∈ wide, convolution N j * cos ((j : ℝ) * u) := by have hreindex : (∑ k ∈ base, ∑ l ∈ base, triangle N k * triangle N l * cos (((k + l : ℤ) : ℝ) * u)) = ∑ k ∈ base, ∑ j ∈ wide, triangle N k * triangle N (j - k) * cos ((j : ℝ) * u) := by apply Finset.sum_congr rfl intro k hk exact hshift k hk rw [hreindex] rw [Finset.sum_comm] apply Finset.sum_congr rfl intro j hj rw [convolution] simp_rw [Finset.sum_mul] apply Finset.sum_congr rfl intro k hk ring have hsubset : narrow ⊆ wide := by intro j hj change j ∈ Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ) at hj change j ∈ Icc (-(2 * N : ℤ)) (2 * N : ℤ) simp only [Finset.mem_Icc] at hj ⊢ omega have htrim : (∑ j ∈ wide, convolution N j * cos ((j : ℝ) * u)) = ∑ j ∈ narrow, convolution N j * cos ((j : ℝ) * u) := by symm apply Finset.sum_subset hsubset intro j hj hjnot have hzero : convolution N j = 0 := by apply convolution_support change j ∉ Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ) at hjnot simp only [Finset.mem_Icc] at hjnot rcases le_total j 0 with h | h · rw [abs_of_nonpos h] omega · rw [abs_of_nonneg h] omega simp [hzero] exact hwide.trans htrim -
triangle_fourier_squaretheorem — For an order N that is positive and any angle u, the square of the triangular cosine series over frequencies between −N and N equals the cosine series over frequencies j between −(2N − 2) and 2N − 2 with the raw Jackson Fourier coefficients.hypothesesN :ℕhN :0 < Nu :ℝProof (Lean source)
theorem triangle_fourier_square (N : ℕ) (hN : 0 < N) (u : ℝ) : (∑ k ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N k * cos ((k : ℝ) * u)) ^ 2 = ∑ j ∈ Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ), convolution N j * cos ((j : ℝ) * u) := by calc _ = ∑ k ∈ Icc (-(N : ℤ)) (N : ℤ), ∑ l ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N k * triangle N l * cos (((k + l : ℤ) : ℝ) * u) := by apply finite_cosine_square_of_even · intro k simp only [Finset.mem_Icc] omega · intro k simp [triangle, Int.natAbs_neg] _ = _ := triangle_pair_sum_eq_convolution N hN u -
cosine_mode_orthogonalitytheorem — For two integer frequencies k and j, one over 2π times the integral from −π to π of the product of the cosines of k u and j u equals one when both frequencies are zero, one half when they are not both zero but have the same absolute value, and zero otherwise.hypothesesk j :ℤProof (Lean source)
theorem cosine_mode_orthogonality (k j : ℤ) : (1 / (2 * pi)) * ∫ u in Icc (-pi) pi, cos ((k : ℝ) * u) * cos ((j : ℝ) * u) = if k = 0 ∧ j = 0 then 1 else if |k| = |j| then 1 / 2 else 0 := by have hcos (m : ℤ) : (∫ u in Icc (-pi) pi, cos ((m : ℝ) * u)) = if m = 0 then 2 * pi else 0 := by by_cases hm : m = 0 · subst m simp [Real.pi_pos.le] ring · rw [if_neg hm, MeasureTheory.integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (a := -pi) (b := pi) (by linarith [Real.pi_pos] : -pi ≤ pi)] have hm0 : (m : ℝ) ≠ 0 := by exact_mod_cast hm rw [intervalIntegral.integral_comp_mul_left cos hm0, integral_cos] simp have hpoint (u : ℝ) : cos ((k : ℝ) * u) * cos ((j : ℝ) * u) = (cos (((k - j : ℤ) : ℝ) * u) + cos (((k + j : ℤ) : ℝ) * u)) / 2 := by rw [show (((k - j : ℤ) : ℝ) * u) = (k : ℝ) * u - (j : ℝ) * u by push_cast; ring, show (((k + j : ℤ) : ℝ) * u) = (k : ℝ) * u + (j : ℝ) * u by push_cast; ring, Real.cos_sub, Real.cos_add] ring simp_rw [hpoint] rw [MeasureTheory.integral_div] rw [MeasureTheory.integral_add ((show Continuous (fun u : ℝ => cos (((k - j : ℤ) : ℝ) * u)) by fun_prop).continuousOn.integrableOn_compact isCompact_Icc) ((show Continuous (fun u : ℝ => cos (((k + j : ℤ) : ℝ) * u)) by fun_prop).continuousOn.integrableOn_compact isCompact_Icc)] rw [hcos, hcos] have hpi : pi ≠ 0 := ne_of_gt Real.pi_pos have hform : (1 / (2 * pi)) * (((if k - j = 0 then 2 * pi else 0) + (if k + j = 0 then 2 * pi else 0)) / 2) = ((if k - j = 0 then (1 : ℝ) else 0) + (if k + j = 0 then (1 : ℝ) else 0)) / 2 := by split_ifs <;> field_simp <;> ring rw [hform] by_cases h00 : k = 0 ∧ j = 0 · rcases h00 with ⟨rfl, rfl⟩ norm_num · simp only [h00, if_false] by_cases habs : |k| = |j| · rw [if_pos habs] have hor : k = j ∨ k = -j := abs_eq_abs.mp habs rcases hor with heq | heq · have hk : k ≠ 0 := by aesop subst j simp [show k + k ≠ 0 by omega] · have hk : k ≠ 0 := by aesop have hj : j = -k := by omega subst j simp [hk] · rw [if_neg habs] have hsub : k - j ≠ 0 := by intro h exact habs (abs_eq_abs.mpr (inl (by omega))) have hadd : k + j ≠ 0 := by intro h exact habs (abs_eq_abs.mpr (inr (by omega))) simp [hsub, hadd] -
convolution_eventheorem — For any order N and any integer frequency j, the raw Jackson Fourier coefficient takes the same value at −j as at j.hypothesesN :ℕj :ℤconclusionconvolution N (-j) = convolution N jProof (Lean source)
theorem convolution_even (N : ℕ) (j : ℤ) : convolution N (-j) = convolution N j := by open scoped Pointwise in let s : Finset ℤ := Icc (-(N : ℤ)) (N : ℤ) have hs : -s = s := by ext k simp only [s, Finset.mem_neg, Finset.mem_Icc] constructor · rintro ⟨y, ⟨hy₁, hy₂⟩, rfl⟩ omega · intro h refine ⟨-k, ?_, by simp⟩ omega change (∑ k ∈ s, triangle N k * triangle N (-j - k)) = ∑ k ∈ s, triangle N k * triangle N (j - k) conv_lhs => rw [← hs, Finset.sum_neg_index] apply Finset.sum_congr rfl intro k hk have htri (m : ℤ) : triangle N (-m) = triangle N m := by simp [triangle, Int.natAbs_neg] rw [htri k, show -j - -k = -(j - k) by omega, htri] -
cosine_coefficient_even_finitetheorem — For a finite set of integer frequencies that is symmetric under negation, real coefficients that are even in the frequency, and an integer frequency j, one over 2π times the integral from −π to π of the cosine series times the cosine of j u equals the coefficient at j when j belongs to the frequency set, and zero otherwise.hypothesesProof (Lean source)
theorem cosine_coefficient_even_finite (s : Finset ℤ) (a : ℤ → ℝ) (hs : ∀ k : ℤ, k ∈ s ↔ -k ∈ s) (ha : ∀ k : ℤ, a (-k) = a k) (j : ℤ) : (1 / (2 * pi)) * ∫ u in Icc (-pi) pi, (∑ k ∈ s, a k * cos ((k : ℝ) * u)) * cos ((j : ℝ) * u) = if j ∈ s then a j else 0 := by have hint (k : ℤ) : IntegrableOn (fun u : ℝ => (a k * cos ((k : ℝ) * u)) * cos ((j : ℝ) * u)) (Icc (-pi) pi) := by exact (show Continuous (fun u : ℝ => (a k * cos ((k : ℝ) * u)) * cos ((j : ℝ) * u)) by fun_prop).continuousOn.integrableOn_compact isCompact_Icc have hextract : (1 / (2 * pi)) * ∫ u in Icc (-pi) pi, (∑ k ∈ s, a k * cos ((k : ℝ) * u)) * cos ((j : ℝ) * u) = ∑ k ∈ s, a k * (if k = 0 ∧ j = 0 then 1 else if |k| = |j| then 1 / 2 else 0) := by simp_rw [Finset.sum_mul] rw [integral_finset_sum s (fun k _ => hint k)] rw [Finset.mul_sum] apply Finset.sum_congr rfl intro k hk have hfun : (fun u : ℝ => a k * cos ((k : ℝ) * u) * cos ((j : ℝ) * u)) = (fun u : ℝ => a k * (cos ((k : ℝ) * u) * cos ((j : ℝ) * u))) := by funext u; ring rw [hfun, integral_const_mul] rw [mul_left_comm] exact congrArg (a k * ·) (cosine_mode_orthogonality k j) rw [hextract] by_cases hj : j = 0 · subst j have hterm (k : ℤ) : a k * (if k = 0 ∧ (0 : ℤ) = 0 then 1 else if |k| = |(0 : ℤ)| then 1 / 2 else 0) = if (0 : ℤ) = k then a k else 0 := by by_cases hk : k = 0 · subst k; simp · have hk' : (0 : ℤ) ≠ k := Ne.symm hk simp [hk, hk'] calc _ = ∑ k ∈ s, if (0 : ℤ) = k then a k else 0 := by apply Finset.sum_congr rfl intro k hk exact hterm k _ = _ := Finset.sum_ite_eq s 0 a · have hterm (k : ℤ) : a k * (if k = 0 ∧ j = 0 then 1 else if |k| = |j| then 1 / 2 else 0) = (if j = k then a k / 2 else 0) + (if -j = k then a k / 2 else 0) := by simp only [hj, and_false, if_false] by_cases hkj : k = j · subst k have hneq : -j ≠ j := by omega simp [hneq] ring by_cases hkn : k = -j · subst k have hneq : j ≠ -j := by omega simp [hneq, abs_neg] ring have habs : |k| ≠ |j| := by intro h rcases abs_eq_abs.mp h with h | h · exact hkj h · exact hkn h simp [habs, Ne.symm hkj, Ne.symm hkn] simp_rw [hterm, Finset.sum_add_distrib] rw [Finset.sum_ite_eq, Finset.sum_ite_eq] have hmem : -j ∈ s ↔ j ∈ s := (hs j).symm by_cases hjs : j ∈ s · have hnegs : -j ∈ s := hmem.mpr hjs simp [hjs, hnegs, ha j] · have hnegs : -j ∉ s := by simpa only [hmem] using hjs simp [hjs, hnegs] -
raw_kernel_fouriertheorem — For an order N that is positive and any angle u, the raw Jackson kernel equals the cosine series over frequencies j between −(2N − 2) and 2N − 2 with the raw Jackson Fourier coefficients.hypothesesN :ℕhN :0 < Nu :ℝProof (Lean source)
theorem raw_kernel_fourier (N : ℕ) (hN : 0 < N) (u : ℝ) : jraw N u = ∑ j ∈ Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ), convolution N j * cos ((j : ℝ) * u) := by rw [jraw_eq_chebyshev N hN u] rw [show ((U ℝ ((N - 1 : ℕ) : ℤ)).eval (cos (u / 2))) ^ 4 = (((U ℝ ((N - 1 : ℕ) : ℤ)).eval (cos (u / 2))) ^ 2) ^ 2 by ring] rw [triangle_fourier N hN u, triangle_fourier_square N hN u] -
kernel_fouriertheorem — For an order N that is positive and any angle u, the scaled Jackson kernel equals the cosine series over frequencies j between −(2N − 2) and 2N − 2 with the normalized Jackson coefficients.hypothesesN :ℕhN :0 < Nu :ℝconclusionkernel N uProof (Lean source)
theorem kernel_fourier (N : ℕ) (hN : 0 < N) (u : ℝ) : kernel N u = ∑ j ∈ Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ), normalizedCoeff N j * cos ((j : ℝ) * u) := by have hmass : jrawMass N = 2 * Real.pi * convolution N 0 := by rw [jrawMass_eq N hN, convolution_zero N] ring have hden : (2 * Real.pi : ℝ) ≠ 0 := by positivity have hconv : convolution N 0 ≠ 0 := ne_of_gt (convolution_zero_pos N hN) simp only [kernel, jackson, hmass, raw_kernel_fourier N hN u, normalizedCoeff] calc _ = (1 / convolution N 0) * (∑ j ∈ Icc (-((2 * N - 2 : ℕ) : ℤ)) ((2 * N - 2 : ℕ) : ℤ), convolution N j * cos ((j : ℝ) * u)) := by field_simp apply Finset.sum_congr rfl intro j hj congr 1 ring _ = _ := by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj field_simp -
normalizedCoeff_supporttheorem — For an order N and an integer frequency j whose absolute value exceeds 2N − 2, the normalized Jackson coefficient is zero.Proof (Lean source)
theorem normalizedCoeff_support (N : ℕ) (j : ℤ) (hj : ((2 * N - 2 : ℕ) : ℤ) < |j|) : normalizedCoeff N j = 0 := by simp [normalizedCoeff, convolution_support N j hj] -
kernel_normalized_integraltheorem — For an order N that is positive, the scaled Jackson kernel divided by 2π integrates to one over the period from −π to π.Proof (Lean source)
theorem kernel_normalized_integral (N : ℕ) (hN : 0 < N) : (∫ u in Icc (-Real.pi) Real.pi, kernel N u / (2 * Real.pi)) = 1 := by have hden : (2 * Real.pi : ℝ) ≠ 0 := by positivity convert jackson_integral_eq_one N hN using 1 apply MeasureTheory.integral_congr_ae filter_upwards with u simp only [kernel] field_simp
Variation 3 core · 8 supporting All sums are over the full integer line. ★ normalizedCoeff_delta2_l1
Zero-extended discrete variation of Jackson coefficients
All sums are over the full integer line. This retains the endpoint terms that arise when a finite sequence is extended by zero.
The forward first difference of a real sequence indexed by the integers at an index j is the term at j + 1 minus the term at j.
Definition (Lean source)
The forward second difference of a real sequence indexed by the integers at an index j is the first difference of the first-difference sequence, that is, the term at j + 2 minus twice the term at j + 1 plus the term at j.
Definition (Lean source)
For an order N that is positive, the sum over all integers of the absolute second differences of the normalized Jackson coefficients is at most 6 / N.
Formal statement
Proof (Lean source)
8 supporting declarations (lemmas, instances)
-
delta_convolutiontheorem — For any order N and any integer frequency j, the first difference of the raw Jackson Fourier coefficients at j equals the sum, over integers k between −N − 1 and N, of the first difference of the triangular sequence at k times the triangular sequence at j − k.hypothesesN :ℕj :ℤProof (Lean source)
theorem delta_convolution (N : ℕ) (j : ℤ) : delta (convolution N) j = ∑ k ∈ Icc (-(N : ℤ) - 1) (N : ℤ), delta (triangle N) k * triangle N (j - k) := by let S := Icc (-(N : ℤ) - 1) (N : ℤ) have hleft : (∑ k ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N k * triangle N (j + 1 - k)) = ∑ k ∈ S, triangle N (k + 1) * triangle N (j - k) := by have hext : (∑ k ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N k * triangle N (j + 1 - k)) = ∑ k ∈ Icc (-(N : ℤ)) ((N : ℤ) + 1), triangle N k * triangle N (j + 1 - k) := by apply Finset.sum_subset (by intro k hk; simp only [Finset.mem_Icc] at hk ⊢; omega) intro k hk hk' have hkN : k = (N : ℤ) + 1 := by simp only [Finset.mem_Icc] at hk hk' omega subst k have hz : triangle N ((N : ℤ) + 1) = 0 := triangle_support N _ (by rw [abs_of_nonneg (by omega : 0 ≤ (N : ℤ) + 1)] omega) simp [hz] rw [hext] have hmap := Finset.map_add_right_Icc (-(N : ℤ) - 1) (N : ℤ) (1 : ℤ) have hshift : S.map (addRightEmbedding (1 : ℤ)) = Icc (-(N : ℤ)) ((N : ℤ) + 1) := by simpa [S, sub_eq_add_neg, add_assoc] using hmap rw [← hshift, Finset.sum_map] apply Finset.sum_congr rfl intro k hk simp only [addRightEmbedding_apply] have harg : j + 1 - (k + 1) = j - k := by omega rw [harg] have hright : (∑ k ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N k * triangle N (j - k)) = ∑ k ∈ S, triangle N k * triangle N (j - k) := by apply Finset.sum_subset (by intro k hk; simp only [Finset.mem_Icc, S] at hk ⊢; omega) intro k hk hk' have hkN : k = -(N : ℤ) - 1 := by simp only [Finset.mem_Icc, S] at hk hk' omega subst k have hz : triangle N (-(N : ℤ) - 1) = 0 := triangle_support N _ (by rw [abs_of_nonpos (by omega : -(N : ℤ) - 1 ≤ 0)] omega) simp [hz] change (∑ k ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N k * triangle N (j + 1 - k)) - (∑ k ∈ Icc (-(N : ℤ)) (N : ℤ), triangle N k * triangle N (j - k)) = _ rw [hleft, hright, ← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro k hk simp only [delta] ring -
delta2_convolutiontheorem — For any order N and any integer frequency j, the second difference of the raw Jackson Fourier coefficients at j equals the sum, over integers k between −N − 1 and N, of the first difference of the triangular sequence at k times its first difference at j − k.hypothesesN :ℕj :ℤProof (Lean source)
theorem delta2_convolution (N : ℕ) (j : ℤ) : delta2 (convolution N) j = ∑ k ∈ Icc (-(N : ℤ) - 1) (N : ℤ), delta (triangle N) k * delta (triangle N) (j - k) := by rw [delta2, delta, delta_convolution N (j + 1), delta_convolution N j] rw [← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro k hk simp only [delta] congr 1 ring -
triangle_l1theorem — For any order N, the sum over all integers of the absolute values of the triangular sequence equals N².Proof (Lean source)
theorem triangle_l1 (N : ℕ) : (∑' j : ℤ, |triangle N j|) = (N : ℝ) ^ 2 := by have hsupport : ∀ j : ℤ, j ∉ Icc (-(N : ℤ)) (N : ℤ) → |triangle N j| = 0 := by intro j hj have hj' : (N : ℤ) ≤ |j| := by by_contra h have habs : |j| < (N : ℤ) := by omega have hbounds := abs_lt.mp habs simp only [Finset.mem_Icc] at hj omega simp [triangle_support N j hj'] rw [tsum_eq_sum hsupport] have heven : Even (fun j : ℤ => |triangle N j|) := by intro j simp [triangle, Int.natAbs_neg] rw [Finset.sum_Icc_of_even_eq_range heven N] have hterm : ∀ m ∈ range (N + 1), |triangle N (m : ℤ)| = (N : ℝ) - m := by intro m hm have hmN : m ≤ N := by have := Finset.mem_range.mp hm omega simp [triangle, Nat.cast_sub hmN, hmN] rw [Finset.sum_congr rfl hterm] simp only [Finset.sum_sub_distrib, Finset.sum_const, Finset.card_range, nsmul_eq_mul] have hsum : (∑ m ∈ range (N + 1), (m : ℝ)) * 2 = ((N + 1 : ℕ) : ℝ) * N := by have hnat : (∑ m ∈ range (N + 1), m) * 2 = (N + 1) * N := by simpa using Finset.sum_range_id_mul_two (N + 1) have hreal := congrArg (fun x : ℕ => (x : ℝ)) hnat simpa only [Nat.cast_mul, Nat.cast_sum, Nat.cast_add, Nat.cast_one, Nat.cast_ofNat] using hreal simp only [triangle, Int.natAbs_zero, Nat.sub_zero] rw [abs_of_nonneg (show (0 : ℝ) ≤ N by positivity)] push_cast at hsum ⊢ nlinarith -
triangle_delta_l1theorem — For any order N, the sum over all integers of the absolute first differences of the triangular sequence equals 2N.Proof (Lean source)
theorem triangle_delta_l1 (N : ℕ) : (∑' j : ℤ, |delta (triangle N) j|) = 2 * (N : ℝ) := by have hneg (j : ℤ) (hlo : -(N : ℤ) ≤ j) (hhi : j ≤ 0) : triangle N j = (N : ℝ) + j := by have hnat : j.natAbs ≤ N := by have h : (j.natAbs : ℤ) ≤ N := by rw [Int.natCast_natAbs, abs_of_nonpos hhi] omega exact_mod_cast h have hcast : ((j.natAbs : ℕ) : ℝ) = -(j : ℝ) := by have hh : (j.natAbs : ℤ) = -j := by rw [Int.natCast_natAbs, abs_of_nonpos hhi] have hr := congrArg (fun x : ℤ => (x : ℝ)) hh simpa only [Int.cast_natCast, Int.cast_neg] using hr simp only [triangle, Nat.cast_sub hnat, hcast] ring have hpos (j : ℤ) (hlo : 0 ≤ j) (hhi : j ≤ (N : ℤ)) : triangle N j = (N : ℝ) - j := by have hnat : j.natAbs ≤ N := by have h : (j.natAbs : ℤ) ≤ N := by rw [Int.natCast_natAbs, abs_of_nonneg hlo] omega exact_mod_cast h have hcast : ((j.natAbs : ℕ) : ℝ) = (j : ℝ) := by have hr := congrArg (fun x : ℤ => (x : ℝ)) (Int.natAbs_of_nonneg hlo) simpa only [Int.cast_natCast] using hr simp only [triangle, Nat.cast_sub hnat, hcast] have hpoint (j : ℤ) : |delta (triangle N) j| = if j ∈ Ico (-(N : ℤ)) (N : ℤ) then 1 else 0 := by by_cases hmem : j ∈ Ico (-(N : ℤ)) (N : ℤ) · simp only [Finset.mem_Ico] at hmem rw [if_pos (Finset.mem_Ico.mpr hmem)] by_cases hj : j < 0 · have hj1 : j + 1 ≤ 0 := by omega rw [delta, hneg j hmem.1 (by omega), hneg (j + 1) (by omega) hj1] push_cast norm_num · have hj0 : 0 ≤ j := by omega rw [delta, hpos j hj0 (by omega), hpos (j + 1) (by omega) (by omega)] push_cast norm_num · rw [if_neg hmem] have hout : j < -(N : ℤ) ∨ (N : ℤ) ≤ j := by simp only [Finset.mem_Ico, not_and_or, not_le, not_lt] at hmem exact hmem rcases hout with hj | hj · have hj1 : j + 1 ≤ -(N : ℤ) := by omega have hz0 : triangle N j = 0 := triangle_support N j (by rw [abs_of_nonpos (by omega : j ≤ 0)]; omega) have hz1 : triangle N (j + 1) = 0 := triangle_support N (j + 1) (by rw [abs_of_nonpos (by omega : j + 1 ≤ 0)]; omega) simp [delta, hz0, hz1] · have hz0 : triangle N j = 0 := triangle_support N j (by rw [abs_of_nonneg (by omega : 0 ≤ j)]; omega) have hz1 : triangle N (j + 1) = 0 := triangle_support N (j + 1) (by rw [abs_of_nonneg (by omega : 0 ≤ j + 1)]; omega) simp [delta, hz0, hz1] have hsum : (∑' j : ℤ, |delta (triangle N) j|) = ∑ j ∈ Ico (-(N : ℤ)) (N : ℤ), (1 : ℝ) := by rw [tsum_eq_sum (s := Ico (-(N : ℤ)) (N : ℤ)) (by intro j hj rw [hpoint j, if_neg hj])] apply Finset.sum_congr rfl intro j hj rw [hpoint j, if_pos hj] rw [hsum] simp only [Finset.sum_const, nsmul_eq_mul, mul_one, Int.card_Ico] have hnat : ((N : ℤ) - -(N : ℤ)).toNat = 2 * N := by omega rw [hnat] push_cast ring -
finite_convolution_tsum_eq_sumtheorem — For two real sequences a and b indexed by the integers and a finite set of integers outside which a vanishes, the convolution sum of a and b at any index equals the same sum restricted to that finite set.hypothesesconclusion(∑' k : ℤ, a k * b (j - k)) = ∑ k ∈ s, a k * b (j - k)Proof (Lean source)
theorem finite_convolution_tsum_eq_sum (a b : ℤ → ℝ) (s : Finset ℤ) (ha : ∀ k ∉ s, a k = 0) (j : ℤ) : (∑' k : ℤ, a k * b (j - k)) = ∑ k ∈ s, a k * b (j - k) := by apply tsum_eq_sum intro k hk simp [ha k hk] -
finite_convolution_l1theorem — For two real sequences indexed by the integers each with finite support, the sum over all integers of the absolute value of their discrete convolution is at most the product of the sums of their absolute values.hypothesesconclusion(∑' j : ℤ, |∑' k : ℤ, a k * b (j - k)|) ≤ (∑' k : ℤ, |a k|) * (∑' l : ℤ, |b l|)Proof (Lean source)
theorem finite_convolution_l1 (a b : ℤ → ℝ) (ha : HasFiniteSupport a) (hb : HasFiniteSupport b) : (∑' j : ℤ, |∑' k : ℤ, a k * b (j - k)|) ≤ (∑' k : ℤ, |a k|) * (∑' l : ℤ, |b l|) := by let s : Finset ℤ := ha.toFinset let t : Finset ℤ := hb.toFinset have ha0 (k : ℤ) (hk : k ∉ s) : a k = 0 := by by_contra h exact hk ((Set.Finite.mem_toFinset ha).2 (Function.mem_support.mpr h)) have hb0 (l : ℤ) (hl : l ∉ t) : b l = 0 := by by_contra h exact hl ((Set.Finite.mem_toFinset hb).2 (Function.mem_support.mpr h)) let u : Finset ℤ := s.biUnion (fun k => t.image (fun l => k + l)) have hu (j : ℤ) (hj : j ∉ u) : (∑' k : ℤ, a k * b (j - k)) = 0 := by rw [finite_convolution_tsum_eq_sum a b s ha0] apply Finset.sum_eq_zero intro k hk have hnot : j - k ∉ t := by intro hmem apply hj simp only [u, Finset.mem_biUnion, mem_image] exact ⟨k, hk, j - k, hmem, by ring⟩ simp [hb0 (j - k) hnot] have houter : (∑' j : ℤ, |∑' k : ℤ, a k * b (j - k)|) = ∑ j ∈ u, |∑' k : ℤ, a k * b (j - k)| := by apply tsum_eq_sum intro j hj simp [hu j hj] have hbound (j : ℤ) : |∑' k : ℤ, a k * b (j - k)| ≤ ∑ k ∈ s, |a k| * |b (j - k)| := by rw [finite_convolution_tsum_eq_sum a b s ha0] calc |∑ k ∈ s, a k * b (j - k)| ≤ ∑ k ∈ s, |a k * b (j - k)| := Finset.abs_sum_le_sum_abs _ _ _ = ∑ k ∈ s, |a k| * |b (j - k)| := by simp only [abs_mul] have hbmass : (∑' l : ℤ, |b l|) = ∑ l ∈ t, |b l| := by apply tsum_eq_sum intro l hl simp [hb0 l hl] have hamass : (∑' k : ℤ, |a k|) = ∑ k ∈ s, |a k| := by apply tsum_eq_sum intro k hk simp [ha0 k hk] have hshift (k : ℤ) (hk : k ∈ s) : (∑ j ∈ u, |b (j - k)|) = ∑ l ∈ t, |b l| := by have hsub : t.image (fun l => k + l) ⊆ u := by intro j hj exact Finset.mem_biUnion.mpr ⟨k, hk, hj⟩ calc (∑ j ∈ u, |b (j - k)|) = ∑ j ∈ t.image (fun l => k + l), |b (j - k)| := by symm apply Finset.sum_subset hsub intro j hj hj' have hnot : j - k ∉ t := by intro hmem apply hj' exact Finset.mem_image.mpr ⟨j - k, hmem, by ring⟩ simp [hb0 (j - k) hnot] _ = ∑ l ∈ t, |b l| := by rw [Finset.sum_image (by intro l hl m hm h; exact add_left_cancel h)] simp only [add_sub_cancel_left] rw [houter, hamass, hbmass] calc (∑ j ∈ u, |∑' k : ℤ, a k * b (j - k)|) ≤ ∑ j ∈ u, ∑ k ∈ s, |a k| * |b (j - k)| := Finset.sum_le_sum (by intro j hj; exact hbound j) _ = ∑ k ∈ s, |a k| * ∑ l ∈ t, |b l| := by rw [Finset.sum_comm] apply Finset.sum_congr rfl intro k hk rw [← Finset.mul_sum, hshift k hk] _ = (∑ k ∈ s, |a k|) * ∑ l ∈ t, |b l| := by rw [Finset.sum_mul] -
normalizedCoeff_l1theorem — For an order N that is positive, the sum over all integers of the absolute values of the normalized Jackson coefficients is at most 2N.Proof (Lean source)
theorem normalizedCoeff_l1 (N : ℕ) (hN : 0 < N) : (∑' j : ℤ, |normalizedCoeff N j|) ≤ 2 * (N : ℝ) := by have htri := triangle_finite N have hconv (j : ℤ) : convolution N j = ∑' k : ℤ, triangle N k * triangle N (j - k) := by exact (finite_convolution_tsum_eq_sum _ _ _ (triangle_outside N) j).symm have hmass : (∑' j : ℤ, |convolution N j|) ≤ (N : ℝ) ^ 4 := by have h := finite_convolution_l1 (triangle N) (triangle N) htri htri simp_rw [← hconv] at h rw [triangle_l1] at h nlinarith have hpos := convolution_zero_pos N hN have hscale : (∑' j : ℤ, |normalizedCoeff N j|) = (∑' j : ℤ, |convolution N j|) / convolution N 0 := by simp_rw [normalizedCoeff, abs_div, abs_of_pos hpos, div_eq_mul_inv] rw [tsum_mul_right] rw [hscale] have hn : (0 : ℝ) ≤ N := by positivity rw [convolution_zero N] at hpos ⊢ apply (div_le_iff₀ hpos).2 nlinarith [sq_nonneg ((N : ℝ) ^ 2), sq_nonneg (N : ℝ)] -
normalizedCoeff_delta_l1theorem — For an order N that is positive, the sum over all integers of the absolute first differences of the normalized Jackson coefficients is at most four.Proof (Lean source)
theorem normalizedCoeff_delta_l1 (N : ℕ) (hN : 0 < N) : (∑' j : ℤ, |delta (normalizedCoeff N) j|) ≤ 4 := by have hraw (j : ℤ) : delta (convolution N) j = ∑' k : ℤ, delta (triangle N) k * triangle N (j - k) := by rw [delta_convolution] exact (finite_convolution_tsum_eq_sum _ _ _ (delta_triangle_outside N) j).symm have hmass : (∑' j : ℤ, |delta (convolution N) j|) ≤ 2 * (N : ℝ) ^ 3 := by have h := finite_convolution_l1 (delta (triangle N)) (triangle N) (delta_triangle_finite N) (triangle_finite N) simp_rw [← hraw] at h rw [triangle_delta_l1, triangle_l1] at h nlinarith have hpos := convolution_zero_pos N hN have hdiff (j : ℤ) : delta (normalizedCoeff N) j = delta (convolution N) j / convolution N 0 := by unfold delta normalizedCoeff ring have hscale : (∑' j : ℤ, |delta (normalizedCoeff N) j|) = (∑' j : ℤ, |delta (convolution N) j|) / convolution N 0 := by simp_rw [hdiff, abs_div, abs_of_pos hpos, div_eq_mul_inv] rw [tsum_mul_right] rw [hscale] rw [convolution_zero N] at hpos ⊢ apply (div_le_iff₀ hpos).2 have hn : (0 : ℝ) ≤ N := by positivity nlinarith [sq_nonneg (N : ℝ)]
Center 1 core · 0 supporting At the center all cosine modes align, so the antiderivative has a uniform lower and upper bound proportional to the reciprocal of its order. ★ packet_center_bounds
Center size of the Jackson antiderivative packet
At the center all cosine modes align, so the antiderivative has a uniform lower and upper bound proportional to the reciprocal of its order.
There are positive constants c and C, with c at most C, such that for every order N at least two the absolute value of the packet antiderivative at angle zero lies between c / N and C / N.
Formal statement
Proof (Lean source)
CenterMass 1 core · 0 supporting The nonnegative finite convolution has coefficient mass proportional to its order. ★ normalizedCoeff_l1_lower
Mass of the normalized Jackson coefficients
The nonnegative finite convolution has coefficient mass proportional to its order. This supplies the lower mass estimate needed at the center of a packet.
For an order N that is at least two, the sum over all integers of the absolute values of the normalized Jackson coefficients is at least N / 2.
Formal statement
Proof (Lean source)
Derivative 1 core · 0 supporting For every order N ≥ 2, the finite cosine series with reciprocal-square weights 1/(4N ± j)² built from the Jackson kernel's Fourier coefficients has second derivative equal to the oscillatory Jackson packet, the Jackson k ★ packet_twice_deriv
The second derivative of the Jackson packet antiderivative
For every order N ≥ 2, the finite cosine series with reciprocal-square weights 1/(4N ± j)² built from the Jackson kernel's Fourier coefficients has second derivative equal to the oscillatory Jackson packet, the Jackson kernel multiplied by cos(4N·u). So the modulated kernel has an explicit trigonometric-polynomial twice antiderivative.
Main results
* packet_twice_deriv — the second derivative of packetAntideriv N at every real u is
packetOscillation N u, for N ≥ 2.
For an order N that is at least two and any real angle u, the second derivative of the packet antiderivative at u equals the oscillatory Jackson packet at u.
Formal statement
Proof (Lean source)
FourierBridge 1 core · 0 supporting The shifted real cosine polynomial is the real part of two modulated finite complex Fourier polynomials. ★ packetAntideriv_eq_finiteFourier
Bridge from Jackson cosine packets to finite complex Fourier sums
The shifted real cosine polynomial is the real part of two modulated finite complex Fourier polynomials. This lets Abel summation act on its coefficients.
For any order N and any angle u, the packet antiderivative equals minus one half times the sum of two real parts: that of the complex exponential of 4N i u times the Fourier series of the plus-shifted coefficients at u, and that of the same exponential times the Fourier series of the minus-shifted coefficients at −u.
Formal statement
Proof (Lean source)
Localization 1 core · 1 supporting Discrete second variation controls decay away from the center, and the resulting envelope yields the normalized integral bound. ★ packet_pointwise_localization
Pointwise and integral localization of Jackson packets
Discrete second variation controls decay away from the center, and the resulting envelope yields the normalized integral bound.
There is a positive constant C such that, for every order N at least two and every real angle u, the packet antiderivative at u is at most C divided by N times the square of (1 + N times the torus distance of u), in absolute value.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
packet_l1_localizationtheorem — There is a positive constant C such that, for every order N at least two, the integral over the period from −π to π of the absolute value of the packet antiderivative divided by 2π is at most C / N².conclusion∃ C : ℝ,0 < CProof (Lean source)
theorem packet_l1_localization : ∃ C : ℝ, 0 < C ∧ ∀ N : ℕ, 2 ≤ N → (∫ u in Icc (-pi) pi, |packetAntideriv N u| / (2 * pi)) ≤ C / (N : ℝ) ^ 2 := by obtain ⟨C, hC, hlocal⟩ := packet_pointwise_localization refine ⟨C / 2, by positivity, ?_⟩ intro N hN have hn : (0 : ℝ) < N := by exact_mod_cast (by omega : 0 < N) have hpi : (0 : ℝ) < pi := Real.pi_pos let f : ℝ → ℝ := fun u => |packetAntideriv N u| / (2 * pi) let g : ℝ → ℝ := fun u => (C / ((N : ℝ) * (2 * pi))) * (1 / (1 + ((N : ℝ) * u) ^ 2)) have hcf : Continuous f := by dsimp [f, packetAntideriv] fun_prop have hcg : Continuous g := by dsimp [g] have hb : Continuous (fun u : ℝ => 1 + ((N : ℝ) * u) ^ 2) := by fun_prop have hr := hb.inv₀ (by intro u; positivity) have hc : Continuous (fun _ : ℝ => C / ((N : ℝ) * (2 * pi))) := continuous_const convert (hc.mul hr) using 1 funext u simp [Pi.mul_apply, one_div] have hf : IntegrableOn f (Icc (-pi) pi) := hcf.continuousOn.integrableOn_compact isCompact_Icc have hg : IntegrableOn g (Icc (-pi) pi) := hcg.continuousOn.integrableOn_compact isCompact_Icc have hpoint (u : ℝ) (hu : u ∈ Icc (-pi) pi) : f u ≤ g u := by have huabs : |u| ≤ pi := abs_le.mpr ⟨hu.1, hu.2⟩ have hloc := hlocal N hN u rw [torusDistance_eq_abs u huabs] at hloc have hx : 0 ≤ (N : ℝ) * |u| := mul_nonneg hn.le (abs_nonneg _) have hden : 0 < (N : ℝ) * (1 + (N : ℝ) * |u|) ^ 2 := by positivity have hrat : 1 / (1 + (N : ℝ) * |u|) ^ 2 ≤ 1 / (1 + ((N : ℝ) * u) ^ 2) := by have hsq : 1 + ((N : ℝ) * u) ^ 2 ≤ (1 + (N : ℝ) * |u|) ^ 2 := by have heq : ((N : ℝ) * u) ^ 2 = ((N : ℝ) * |u|) ^ 2 := by rw [mul_pow, mul_pow, sq_abs] rw [heq] nlinarith [hx] exact one_div_le_one_div_of_le (by positivity) hsq dsimp [f, g] have hp : (0 : ℝ) < 2 * pi := by positivity have hconst : 0 ≤ C / ((N : ℝ) * (2 * pi)) := by positivity calc |packetAntideriv N u| / (2 * pi) ≤ (C / ((N : ℝ) * (1 + (N : ℝ) * |u|) ^ 2)) / (2 * pi) := by exact div_le_div_of_nonneg_right hloc hp.le _ = (C / ((N : ℝ) * (2 * pi))) * (1 / (1 + (N : ℝ) * |u|) ^ 2) := by field_simp [ne_of_gt hn, ne_of_gt hpi, show 1 + (N : ℝ) * |u| ≠ 0 by positivity] _ ≤ _ := mul_le_mul_of_nonneg_left hrat hconst have hmono := MeasureTheory.setIntegral_mono_on hf hg measurableSet_Icc hpoint change (∫ u in Icc (-pi) pi, |packetAntideriv N u| / (2 * pi)) ≤ _ at hmono have hr := integral_rational_envelope N (by omega : 0 < N) dsimp [g] at hmono rw [MeasureTheory.integral_const_mul] at hmono have hbound : (C / ((N : ℝ) * (2 * pi))) * (∫ u in Icc (-pi) pi, 1 / (1 + ((N : ℝ) * u) ^ 2)) ≤ (C / ((N : ℝ) * (2 * pi))) * (pi / (N : ℝ)) := by gcongr calc _ ≤ _ := hmono _ ≤ _ := hbound _ = (C / 2) / (N : ℝ) ^ 2 := by field_simp
Reciprocal 3 core · 5 supporting The sign parameter is either 1 or -1. ★ weightedCoeff_delta2_l1
Reciprocal frequency weights and weighted variation
The sign parameter is either 1 or -1. Bounds are asserted only on the
frequency window that can meet the zero-extended Jackson coefficients and
their second differences.
The shifted reciprocal square of order N with orientation σ at an integer frequency j is one divided by the square of 4N + σ j, read as zero when the denominator vanishes; the orientation is meant to be plus or minus one.
Definition (Lean source)
The reciprocal-weighted Jackson coefficient of order N with orientation σ at an integer frequency j is the normalized Jackson coefficient at j times the shifted reciprocal square at j.
Definition (Lean source)
For an order N that is at least two and an orientation σ equal to plus or minus one, the sum over all integers of the absolute second differences of the reciprocal-weighted Jackson coefficients is at most 512 / N³.
Formal statement
Proof (Lean source)
5 supporting declarations (lemmas, instances)
-
reciprocalSquare_boundtheorem — For an order N that is at least two, an orientation σ equal to plus or minus one, and an integer frequency j of absolute value at most 2N, the shifted reciprocal square is at most 1 / N² in absolute value.hypothesesN :ℕhN :2 ≤ Nσ :ℝhσ :σ = 1 ∨ σ = -1j :ℤhj :|j| ≤ (2 * N : ℕ)conclusion|reciprocalSquare N σ j| ≤ 1 / (N : ℝ) ^ 2Proof (Lean source)
theorem reciprocalSquare_bound (N : ℕ) (hN : 2 ≤ N) (σ : ℝ) (hσ : σ = 1 ∨ σ = -1) (j : ℤ) (hj : |j| ≤ (2 * N : ℕ)) : |reciprocalSquare N σ j| ≤ 1 / (N : ℝ) ^ 2 := by have ha := (reciprocalSquare_window N hN σ hσ j hj).1 have hn : (0 : ℝ) < N := by exact_mod_cast (lt_of_lt_of_le (by norm_num : 0 < 2) hN) rw [reciprocalSquare, abs_of_nonneg (by positivity)] apply one_div_le_one_div_of_le (by positivity) gcongr -
reciprocalSquare_delta_boundtheorem — For an order N that is at least two, an orientation σ equal to plus or minus one, and an integer frequency j of absolute value at most 2N, the forward first difference of the shifted reciprocal square at j is at most 16 / N³ in absolute value.hypothesesN :ℕhN :2 ≤ Nσ :ℝhσ :σ = 1 ∨ σ = -1j :ℤhj :|j| ≤ (2 * N : ℕ)conclusion|delta (reciprocalSquare N σ) j| ≤ 16 / (N : ℝ) ^ 3Proof (Lean source)
theorem reciprocalSquare_delta_bound (N : ℕ) (hN : 2 ≤ N) (σ : ℝ) (hσ : σ = 1 ∨ σ = -1) (j : ℤ) (hj : |j| ≤ (2 * N : ℕ)) : |delta (reciprocalSquare N σ) j| ≤ 16 / (N : ℝ) ^ 3 := by let a : ℝ := 4 * (N : ℝ) + σ * (j : ℝ) let b : ℝ := 4 * (N : ℝ) + σ * ((j + 1 : ℤ) : ℝ) obtain ⟨ha, hb, _⟩ := reciprocalSquare_window N hN σ hσ j hj have hn : (0 : ℝ) < N := by exact_mod_cast (lt_of_lt_of_le (by norm_num : 0 < 2) hN) have ha0 : 0 < a := lt_of_lt_of_le hn ha have hb0 : 0 < b := lt_of_lt_of_le hn hb have hrel : b - a = σ := by dsimp [a, b]; push_cast; ring have hσabs : |σ| = 1 := by rcases hσ with rfl | rfl <;> norm_num have hab : |a - b| = 1 := by have : a - b = -σ := by linarith rw [this, abs_neg, hσabs] have hfactor : 1 / b ^ 2 - 1 / a ^ 2 = (a - b) * (1 / a * (1 / b ^ 2) + 1 / a ^ 2 * (1 / b)) := by field_simp ring have hq : |delta (reciprocalSquare N σ) j| = 1 / a * (1 / b ^ 2) + 1 / a ^ 2 * (1 / b) := by change |1 / b ^ 2 - 1 / a ^ 2| = _ rw [hfactor, abs_mul, hab, one_mul, abs_of_nonneg (by positivity)] have hia : 1 / a ≤ 1 / (N : ℝ) := one_div_le_one_div_of_le hn ha have hib : 1 / b ≤ 1 / (N : ℝ) := one_div_le_one_div_of_le hn hb have hi2a : 1 / a ^ 2 ≤ 1 / (N : ℝ) ^ 2 := one_div_le_one_div_of_le (by positivity) (by gcongr) have hi2b : 1 / b ^ 2 ≤ 1 / (N : ℝ) ^ 2 := one_div_le_one_div_of_le (by positivity) (by gcongr) rw [hq] calc 1 / a * (1 / b ^ 2) + 1 / a ^ 2 * (1 / b) ≤ 1 / (N : ℝ) * (1 / (N : ℝ) ^ 2) + 1 / (N : ℝ) ^ 2 * (1 / (N : ℝ)) := by apply add_le_add · exact mul_le_mul hia hi2b (by positivity) (by positivity) · exact mul_le_mul hi2a hib (by positivity) (by positivity) _ = 2 / (N : ℝ) ^ 3 := by field_simp; ring _ ≤ 16 / (N : ℝ) ^ 3 := by apply div_le_div_of_nonneg_right (by norm_num); positivity -
reciprocalSquare_delta2_boundtheorem — For an order N that is at least two, an orientation σ equal to plus or minus one, and an integer frequency j of absolute value at most 2N, the forward second difference of the shifted reciprocal square at j is at most 64 / N⁴ in absolute value.hypothesesN :ℕhN :2 ≤ Nσ :ℝhσ :σ = 1 ∨ σ = -1j :ℤhj :|j| ≤ (2 * N : ℕ)conclusion|delta2 (reciprocalSquare N σ) j| ≤ 64 / (N : ℝ) ^ 4Proof (Lean source)
theorem reciprocalSquare_delta2_bound (N : ℕ) (hN : 2 ≤ N) (σ : ℝ) (hσ : σ = 1 ∨ σ = -1) (j : ℤ) (hj : |j| ≤ (2 * N : ℕ)) : |delta2 (reciprocalSquare N σ) j| ≤ 64 / (N : ℝ) ^ 4 := by let a : ℝ := 4 * (N : ℝ) + σ * (j : ℝ) let b : ℝ := 4 * (N : ℝ) + σ * ((j + 1 : ℤ) : ℝ) let c : ℝ := 4 * (N : ℝ) + σ * ((j + 2 : ℤ) : ℝ) obtain ⟨ha, hb, hc⟩ := reciprocalSquare_window N hN σ hσ j hj have hn : (0 : ℝ) < N := by exact_mod_cast (lt_of_lt_of_le (by norm_num : 0 < 2) hN) have ha0 : 0 < a := lt_of_lt_of_le hn ha have hb0 : 0 < b := lt_of_lt_of_le hn hb have hc0 : 0 < c := lt_of_lt_of_le hn hc have hn2 : (2 : ℝ) ≤ N := by exact_mod_cast hN have hnum : 0 ≤ 3 * b ^ 2 - 1 := by nlinarith have hdelta : delta2 (reciprocalSquare N σ) j = 1 / c ^ 2 - 2 * (1 / b ^ 2) + 1 / a ^ 2 := by simp only [delta2, delta, reciprocalSquare] have hjj : j + 1 + 1 = j + 2 := by omega rw [hjj] change (1 / c ^ 2 - 1 / b ^ 2) - (1 / b ^ 2 - 1 / a ^ 2) = _ ring have hid : 1 / c ^ 2 - 2 * (1 / b ^ 2) + 1 / a ^ 2 = 2 * (3 * b ^ 2 - 1) / (a ^ 2 * b ^ 2 * c ^ 2) := by field_simp rcases hσ with hσ | hσ · subst σ dsimp [a, b, c] push_cast ring · subst σ dsimp [a, b, c] push_cast ring rw [hdelta, hid, abs_of_nonneg (by positivity)] calc 2 * (3 * b ^ 2 - 1) / (a ^ 2 * b ^ 2 * c ^ 2) ≤ 6 * b ^ 2 / (a ^ 2 * b ^ 2 * c ^ 2) := by apply div_le_div_of_nonneg_right (by nlinarith) (by positivity) _ = 6 / (a ^ 2 * c ^ 2) := by field_simp _ ≤ 6 / ((N : ℝ) ^ 2 * (N : ℝ) ^ 2) := by gcongr _ = 6 / (N : ℝ) ^ 4 := by ring _ ≤ 64 / (N : ℝ) ^ 4 := by apply div_le_div_of_nonneg_right (by norm_num) (by positivity) -
delta2_multheorem — For any two real sequences f and q indexed by the integers and any index j, the forward second difference of their product at j equals f at j + 2 times the second difference of q at j, plus the sum of the first differences of f at j + 1 and at j times the first difference of q at j, plus q at j + 1 times the second difference of f at j.hypothesesf q :ℤ → ℝj :ℤProof (Lean source)
theorem delta2_mul (f q : ℤ → ℝ) (j : ℤ) : delta2 (fun k => f k * q k) j = f (j + 2) * delta2 q j + (delta f (j + 1) + delta f j) * delta q j + q (j + 1) * delta2 f j := by simp only [delta2, delta] ring -
weightedCoeff_supporttheorem — For any order N, any orientation σ, and an integer frequency j whose absolute value exceeds 2N − 2, the reciprocal-weighted Jackson coefficient is zero, including at frequencies where the reciprocal's denominator vanishes.Proof (Lean source)
theorem weightedCoeff_support (N : ℕ) (σ : ℝ) (j : ℤ) (hj : ((2 * N - 2 : ℕ) : ℤ) < |j|) : weightedCoeff N σ j = 0 := by simp [weightedCoeff, normalizedCoeff_support N j hj]
Support 1 core · 0 supporting The modulated Jackson kernel has Fourier support in two frequency bands away from zero. ★ packet_shifted_support
Shifted Fourier support of Jackson packets
The modulated Jackson kernel has Fourier support in two frequency bands away from zero. This module provides the integral formulation for real modes.
For an order N that is at least two and an integer frequency r whose absolute value is either less than 2N + 2 or greater than 6N − 2, the integrals over the period from −π to π of the oscillatory Jackson packet against both the cosine and the sine of r u are zero.
Formal statement
Proof (Lean source)
TorusGeometry 1 core · 2 supporting The torus distance is the distance to integer multiples of 2π. ★ character_gap_ge_torusDistance
Distance and character separation on the real circle
The torus distance is the distance to integer multiples of 2π. These
estimates connect that distance to the denominator in finite Abel summation.
For any real angle u, 2 / π times its torus distance is at most the modulus of the complex exponential of −i u minus one.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
torusDistance_boundstheorem — For any real angle, its torus distance is nonnegative and at most π.Proof (Lean source)
theorem torusDistance_bounds (u : ℝ) : 0 ≤ torusDistance u ∧ torusDistance u ≤ pi := by let S : Set ℝ := {r | ∃ j : ℤ, r = |u - 2 * pi * j|} have hS : S.Nonempty := ⟨|u|, 0, by simp⟩ have hbelow : BddBelow S := ⟨0, by rintro r ⟨j, rfl⟩; exact abs_nonneg _⟩ have hp : (0 : ℝ) < 2 * pi := by positivity let j : ℤ := round (u / (2 * pi)) have hj := abs_sub_round (u / (2 * pi)) have hdist : |u - 2 * pi * j| ≤ pi := by have heq : u - 2 * pi * (j : ℝ) = (2 * pi) * (u / (2 * pi) - (j : ℝ)) := by field_simp rw [heq, abs_mul, abs_of_pos hp] have : (2 * pi) * |u / (2 * pi) - (j : ℝ)| ≤ (2 * pi) * (1 / 2 : ℝ) := mul_le_mul_of_nonneg_left hj hp.le nlinarith change 0 ≤ sInf S ∧ sInf S ≤ pi constructor · exact le_csInf hS (by rintro r ⟨j, rfl⟩; exact abs_nonneg _) · exact (csInf_le hbelow ⟨j, rfl⟩).trans hdist -
torusDistance_eq_abstheorem — For a real angle of absolute value at most π, its torus distance equals its absolute value.Proof (Lean source)
theorem torusDistance_eq_abs (u : ℝ) (hu : |u| ≤ pi) : torusDistance u = |u| := by let S : Set ℝ := {r | ∃ j : ℤ, r = |u - 2 * pi * j|} have hbelow : BddBelow S := ⟨0, by rintro r ⟨j, rfl⟩; exact abs_nonneg _⟩ have hzero : |u| ∈ S := ⟨0, by simp⟩ change sInf S = |u| apply le_antisymm (csInf_le hbelow hzero) apply le_csInf ⟨|u|, hzero⟩ rintro r ⟨j, rfl⟩ have hpi : 0 ≤ pi := Real.pi_pos.le have hu₁ : -pi ≤ u := (abs_le.mp hu).1 have hu₂ : u ≤ pi := (abs_le.mp hu).2 rcases lt_trichotomy j 0 with hj | hj | hj · have hj' : (j : ℝ) ≤ -1 := by exact_mod_cast (Int.le_sub_one_of_lt hj) have : u + 2 * pi ≤ u - 2 * pi * (j : ℝ) := by nlinarith calc |u| ≤ pi := hu _ ≤ u + 2 * pi := by linarith _ ≤ u - 2 * pi * (j : ℝ) := this _ ≤ |u - 2 * pi * (j : ℝ)| := le_abs_self _ · simp [hj] · have hj' : (1 : ℝ) ≤ j := by exact_mod_cast (Int.add_one_le_iff.mpr hj) have : u - 2 * pi * (j : ℝ) ≤ u - 2 * pi := by nlinarith calc |u| ≤ pi := hu _ ≤ -(u - 2 * pi) := by linarith _ ≤ -(u - 2 * pi * (j : ℝ)) := by linarith _ ≤ |u - 2 * pi * (j : ℝ)| := neg_le_abs _