# Question about a proof of Riemann localization theorem

The Riemann Localization Theorem states that

Let $f \in L_{2 \pi}^2$ and $x_0 \in \mathbb R$. Then $$\lim_{n \to \infty} (S_nf)(x_0) = f(x_0)$$ if and only if there is a $\delta \in (0, \pi)$ with $$\lim_{n \to \infty} \int_{0}^{\delta} \Big( f(x_0 - t) + f(x_0 + t) - 2f(x_0) \Big) D_n(t) \operatorname{d}t.$$

where $S_n f := \sum_{k=-n}^{n} c_k(f) e^{ikx}$ is the $n$-th Fourier sum and $D_n := \sum_{k=-n}^{n} e^{ikx}$ is the Dirichlet kernel.

The proof in my lecture notes starts like this:

Proof: Since $D_n$ is even we have $$(S_n f)(x_0) = \frac{1}{2 \pi} \left( \int_{0}^{\pi} + \int_{\pi}^{2 \pi} \right) f(x_0-t) D_n(t) \operatorname{d} t = \int_{0}^{\pi} \Big( f(x_0 - t) + f(x_0 + t) - 2f(x_0) \Big) D_n(t) \operatorname{d}t.$$ [...]

Now, I understand the first equality. It comes from the fact that $(S_n f)(x_0) = (f * D_n)(x_0)$. However, why are we allowed to write

$$f(x_0 - t) + f(x_0 + t)$$

wouldn't it be $2 f(x_0 - t)$?

The $\int_\pi^{2\pi}$ part is substituted via $s = 2\pi - t$, yielding $f(x_0 - t) = f(x_0 - (2\pi - s)) = f(x_0 + s - 2\pi) = f(x_0 + s)$. Finally the variable of integration is renamed to $t$.

\begin{align*} \ldots & = \frac1{2\pi} \int_0^\pi f(x_0 - t) D_n(t)\ \mathrm dt + \frac1{2\pi} \int_\pi^{2\pi} f(x_0 - t) D_n(t) \ \mathrm dt\\ & \stackrel{s=2\pi - t; \frac{\mathrm ds}{\mathrm dt} = -1}= \frac1{2\pi} \int_0^\pi f(x_0 - t) D_n(t) \ \mathrm dt - \frac1{2\pi} \int_\pi^0 f(x_0 - 2\pi + s) D_n(2\pi - s)\ \mathrm ds \\ & = \frac1{2\pi} \int_0^\pi f(x_0 - t) D_n(t) \ \mathrm dt + \frac1{2\pi} \int_0^\pi f(x_0 + s) D_n(s) \ \mathrm ds \\ & = \frac1{2\pi} \int_0^\pi (f(x_0 - t) + f(x_0 + t)) D_n(t) \ \mathrm dt \end{align*}