Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§6.5 — the Dirichlet kernel KNK_NKN​ in closed form (as printed, p. 197)

Disproved
NatureSLT.Kernels.dirichlet_kernel

by Shuze Chen · Oct 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

dirichlet-kernelfourier-serieskernelsstatistical-learning-theory

For an integer N≥0N \ge 0N≥0 and real numbers xxx, xix_ixi​ with x−xi∉2πZx - x_i \notin 2\pi\mathbb Zx−xi​∈/2πZ, the kernel of the (2N+1)(2N + 1)(2N+1)-dimensional Fourier feature map u=(1/2,sin⁡x,…,sin⁡Nx,cos⁡x,…,cos⁡Nx)u = (1/\sqrt2, \sin x, \dots, \sin Nx, \cos x, \dots, \cos Nx)u=(1/2​,sinx,…,sinNx,cosx,…,cosNx) is claimed to satisfy

KN(x,xi)=12+∑k=1N(sin⁡kxsin⁡kxi+cos⁡kxcos⁡kxi)=12+∑k=1Ncos⁡k(x−xi)=sin⁡2N+12(x−xi)sin⁡x−xi2.K_N(x, x_i) = \frac12 + \sum_{k=1}^{N} (\sin kx \sin kx_i + \cos kx \cos kx_i) = \frac12 + \sum_{k=1}^{N} \cos k(x - x_i) = \frac{\sin \frac{2N + 1}{2}(x - x_i)}{\sin \frac{x - x_i}{2}}.KN​(x,xi​)=21​+k=1∑N​(sinkxsinkxi​+coskxcoskxi​)=21​+k=1∑N​cosk(x−xi​)=sin2x−xi​​sin22N+1​(x−xi​)​.

The book uses this closed form for the kernel of the truncated Fourier expansion (6.31).

Formalization Note The condition x−xi∉2πZx - x_i \notin 2\pi\mathbb Zx−xi​∈/2πZ is written as sin⁡((x−xi)/2)≠0\sin((x - x_i)/2) \ne 0sin((x−xi​)/2)=0; it excludes the points where the right side is 0/00/00/0. Both equalities of the display are stated. This statement is believed to be false as printed: the correct denominator is 2sin⁡((x−xi)/2)2 \sin((x - x_i)/2)2sin((x−xi​)/2) (see the corrected variant).

Preamble
import Mathlib
Formal statement
namespace NatureSLT.Kernels

/-- The Dirichlet kernel display (Vapnik, *The Nature of Statistical Learning Theory*, 2nd ed.,
§6.5, p. 197, unnumbered), as printed: for `N ≥ 0` and real `x, x_i` with
`x - x_i ∉ 2πℤ` (where the right side's denominator is nonzero),
`K_N(x, x_i) = 1/2 + Σ_{k=1}^N (sin kx sin kx_i + cos kx cos kx_i)
  = 1/2 + Σ_{k=1}^N cos k(x - x_i) = sin((2N+1)/2 (x - x_i)) / sin((x - x_i)/2)`. -/
theorem dirichlet_kernel (N : ℕ) (x xi : ℝ) (hx : Real.sin ((x - xi) / 2) ≠ 0) :
    (1 / 2 + ∑ k ∈ Finset.Icc 1 N,
        (Real.sin (k * x) * Real.sin (k * xi) + Real.cos (k * x) * Real.cos (k * xi)) =
      1 / 2 + ∑ k ∈ Finset.Icc 1 N, Real.cos (k * (x - xi))) ∧
    1 / 2 + ∑ k ∈ Finset.Icc 1 N, Real.cos (k * (x - xi)) =
      Real.sin ((2 * N + 1) / 2 * (x - xi)) / Real.sin ((x - xi) / 2) := by sorry

end NatureSLT.Kernels
Source
Vapnik, The Nature of Statistical Learning Theory, 2nd ed., Springer 2000, p. 197, Section 6.5 (display following (6.31))
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Data and hypotheses.

  • N≥0N \ge 0N≥0 is a natural number.
  • xxx and xix_ixi​ are real numbers.
  • Hypothesis: sin⁡ ⁣(x−xi2)≠0\sin\!\big(\tfrac{x - x_i}{2}\big) \ne 0sin(2x−xi​​)=0, that is, x−xix - x_ix−xi​ is not an integer multiple of 2π2\pi2π.

Conclusion. Both of the following hold.

(i)

12+∑k=1N(sin⁡(kx)sin⁡(kxi)+cos⁡(kx)cos⁡(kxi))  =  12+∑k=1Ncos⁡(k(x−xi)).\frac12 + \sum_{k=1}^{N}\big(\sin(kx)\sin(kx_i) + \cos(kx)\cos(kx_i)\big) \;=\; \frac12 + \sum_{k=1}^{N}\cos\big(k(x - x_i)\big).21​+k=1∑N​(sin(kx)sin(kxi​)+cos(kx)cos(kxi​))=21​+k=1∑N​cos(k(x−xi​)).

(ii)

12+∑k=1Ncos⁡(k(x−xi))  =  sin⁡ ⁣(2N+12(x−xi))sin⁡ ⁣(x−xi2).\frac12 + \sum_{k=1}^{N}\cos\big(k(x - x_i)\big) \;=\; \frac{\sin\!\big(\tfrac{2N+1}{2}(x - x_i)\big)}{\sin\!\big(\tfrac{x - x_i}{2}\big)}.21​+k=1∑N​cos(k(x−xi​))=sin(2x−xi​​)sin(22N+1​(x−xi​))​.

There is no factor 222 in the denominator.

Degenerate cases.

  • Division. The hypothesis guarantees that the division in (ii) is never by zero.
  • N=0N = 0N=0. Both sums are empty, so (i) reads 12=12\tfrac12 = \tfrac1221​=21​. In (ii) the right side is sin⁡ ⁣(x−xi2)/sin⁡ ⁣(x−xi2)=1\sin\!\big(\tfrac{x-x_i}{2}\big)/\sin\!\big(\tfrac{x-x_i}{2}\big) = 1sin(2x−xi​​)/sin(2x−xi​​)=1, so at N=0N = 0N=0 the statement asserts 12=1\tfrac12 = 121​=1 for every admissible x,xix, x_ix,xi​.
  • Satisfiability. The hypothesis can be satisfied, for example with x−xi=πx - x_i = \pix−xi​=π.
Human review
  • Endorsed by Community (Bot) · Oct 20, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Oct 20, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me