[proofplan]
We compute the expectation of the estimator as an integral against the local linear equivalent kernel. The coefficients defining $L_h$ are chosen so that this equivalent kernel reproduces constants and annihilates first-degree polynomials over the truncated boundary window. We then use a second-order right Taylor expansion of $f(hu)$ at $0$ on the interval $u \in [0,1]$. The constant term gives $f(0)$, the first-order term cancels by the reproduction identity, and the remainder is bounded by a constant times $h^2$.
[/proofplan]
[step:Reduce the expectation to an integral over the truncated kernel window]
For each sufficiently small $h>0$, define the moment coefficients $s_j(h)\in\mathbb{R}$, for $j\in\{0,1,2\}$, by
\begin{align*}
s_j(h):=\int_{\mathbb{R}} u^jK(u)\mathbb{1}_{\{u:hu\in S\}}\,d\mathcal{L}^1(u),
\end{align*}
and define
\begin{align*}
\Delta(0,h):=s_0(h)s_2(h)-s_1(h)^2.
\end{align*}
For $h$ with $\Delta(0,h)>0$, define the equivalent kernel $L_h:\mathbb{R}\to\mathbb{R}$ by
\begin{align*}
L_h(u):=\frac{s_2(h)-us_1(h)}{\Delta(0,h)}K(u)\mathbb{1}_{\{u:hu\in S\}}.
\end{align*}
Since $K:\mathbb{R}\to\mathbb{R}$ is Borel measurable, bounded, and supported in $[-1,1]$, the map $L_h$ is Borel measurable, bounded, and supported in $[0,1]$ for every sufficiently small $h>0$ with $\Delta(0,h)>0$.
Let $(\Omega,\mathcal{F},\mathbb{P})$ be the probability space from the theorem statement, let $n\in\mathbb{N}$ be the sample size, and let $X_1,\dots,X_n:(\Omega,\mathcal{F})\to(S,\mathcal{B}(S))$ be the observations, which have common marginal density $f$ with respect to $\mathcal{L}^1$ on $S$. The local linear density estimator at $0$ is the [random variable](/page/Random%20Variable) $\hat f_{h,\mathrm{ll}}(0):\Omega\to\mathbb{R}$ defined by
\begin{align*}
\hat f_{h,\mathrm{ll}}(0):=\frac{1}{nh}\sum_{i=1}^n L_h\left(\frac{X_i}{h}\right).
\end{align*}
For each $i\in\{1,\dots,n\}$, the map $\omega\mapsto L_h(X_i(\omega)/h)$ is measurable because $X_i$ and $L_h$ are measurable, and it is integrable because $L_h$ is bounded. By the hypothesis that the observations $X_1,\dots,X_n$ have common marginal density $f$ with respect to $\mathcal{L}^1$ on $S$, linearity of expectation gives
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = \frac{1}{h}\int_S L_h\left(\frac{y}{h}\right) f(y)\,d\mathcal{L}^1(y).
\end{align*}
No independence hypothesis is used in this computation; only the common marginal density enters.
We use the change of variables $y = hu$. Under this substitution, $d\mathcal{L}^1(y) = h\,d\mathcal{L}^1(u)$, and the domain $y \in S = [0,\infty)$ becomes $u \in [0,\infty)$. Hence
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = \int_0^\infty L_h(u) f(hu)\,d\mathcal{L}^1(u).
\end{align*}
Because $K$ is supported in $[-1,1]$ and $L_h$ contains the factor $\mathbb{1}_{\{u:hu\in S\}}$, the integrand is supported in $[0,1]$. Therefore
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = \int_0^1 L_h(u) f(hu)\,d\mathcal{L}^1(u).
\end{align*}
[guided]
For each sufficiently small $h>0$, the local linear construction uses three moment coefficients. For $j\in\{0,1,2\}$, define $s_j(h)\in\mathbb{R}$ by
\begin{align*}
s_j(h):=\int_{\mathbb{R}} u^jK(u)\mathbb{1}_{\{u:hu\in S\}}\,d\mathcal{L}^1(u),
\end{align*}
and define
\begin{align*}
\Delta(0,h):=s_0(h)s_2(h)-s_1(h)^2.
\end{align*}
For $h$ with $\Delta(0,h)>0$, define the equivalent kernel $L_h:\mathbb{R}\to\mathbb{R}$ by
\begin{align*}
L_h(u):=\frac{s_2(h)-us_1(h)}{\Delta(0,h)}K(u)\mathbb{1}_{\{u:hu\in S\}}.
\end{align*}
These definitions are the algebraic core of local linear boundary correction: the denominator is the Gram determinant of the truncated zeroth and first moments, while the numerator is chosen to reproduce constants and cancel linear functions. Since $K:\mathbb{R}\to\mathbb{R}$ is Borel measurable, bounded, and supported in $[-1,1]$, this formula also shows that $L_h$ is Borel measurable, bounded, and supported in $[0,1]$ for every sufficiently small $h>0$ with $\Delta(0,h)>0$.
Let $(\Omega,\mathcal{F},\mathbb{P})$ be the probability space from the theorem statement, let $n\in\mathbb{N}$ be the sample size, and let $X_1,\dots,X_n:(\Omega,\mathcal{F})\to(S,\mathcal{B}(S))$ be the observations, which have common marginal density $f$ with respect to $\mathcal{L}^1$ on $S$. Define the local linear density estimator $\hat f_{h,\mathrm{ll}}(0):\Omega\to\mathbb{R}$ by
\begin{align*}
\hat f_{h,\mathrm{ll}}(0):=\frac{1}{nh}\sum_{i=1}^n L_h\left(\frac{X_i}{h}\right).
\end{align*}
The estimator is an average of summands with the same marginal distribution. For each $i\in\{1,\dots,n\}$, the map $\omega\mapsto L_h(X_i(\omega)/h)$ is measurable because it is a composition of measurable maps, and it is integrable because $L_h$ is bounded. Linearity of expectation and the marginal density $f:S\to[0,\infty)$ of each observation with respect to $\mathcal{L}^1$ give
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = \frac{1}{h}\int_S L_h\left(\frac{y}{h}\right) f(y)\,d\mathcal{L}^1(y).
\end{align*}
This computation uses only the common marginal density, not independence. Substitute $y=hu$; the map $u\mapsto hu$ sends $[0,\infty)$ onto $S=[0,\infty)$ and $d\mathcal{L}^1(y)=h\,d\mathcal{L}^1(u)$. Hence
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = \int_0^\infty L_h(u)f(hu)\,d\mathcal{L}^1(u).
\end{align*}
Because $K$ is supported in $[-1,1]$ and $hu\in S$ is equivalent to $u\ge 0$, the equivalent kernel vanishes outside $[0,1]$. Therefore
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = \int_0^1 L_h(u)f(hu)\,d\mathcal{L}^1(u).
\end{align*}
For sufficiently small $h>0$, the hypothesis $\Delta(0,h)>0$ makes $L_h$ well-defined. The moment definitions give
\begin{align*}
\int_0^1 L_h(u)\,d\mathcal{L}^1(u)=1
\end{align*}
and
\begin{align*}
\int_0^1 uL_h(u)\,d\mathcal{L}^1(u)=0.
\end{align*}
These are the two algebraic facts responsible for bias cancellation: constants are reproduced, and the linear boundary term is annihilated.
By the regularity hypothesis in the statement, choose $r>0$ such that $f:[0,r]\to\mathbb{R}$ and $f_+':[0,r]\to\mathbb{R}$ are absolutely continuous, the second right derivative $f_+''$ exists $\mathcal{L}^1$-a.e. on $[0,r]$, and $f_+''\in L^\infty([0,r])$. Define $M:=\|f_+''\|_{L^\infty([0,r])}<\infty$. Choose $h_0>0$ so that $h_0\le r$ and $\Delta(0,h)>0$ for $0<h<h_0$. For $u\in[0,1]$, $hu\in[0,r]$. The [Fundamental Theorem of Calculus](/theorems/632) for absolutely continuous functions gives the second-order integral Taylor formula
\begin{align*}
f(hu)=f(0)+hu f_+'(0)+R_h(u),
\end{align*}
where
\begin{align*}
R_h(u):=\int_0^{hu}(hu-t)f_+''(t)\,d\mathcal{L}^1(t).
\end{align*}
Indeed, the function $s\mapsto f(0)+s f_+'(0)+\int_0^s(s-t)f_+''(t)\,d\mathcal{L}^1(t)$ is absolutely continuous on $[0,r]$, has derivative $f_+'(s)$ for $\mathcal{L}^1$-a.e. $s\in[0,r]$, and agrees with $f$ at $s=0$; applying the same theorem to the difference gives the formula. The same bound gives
\begin{align*}
|R_h(u)|\le M\int_0^{hu}(hu-t)\,d\mathcal{L}^1(t)=\frac{M}{2}h^2u^2\le\frac{M}{2}h^2.
\end{align*}
Substituting the Taylor formula into the expectation and using linearity of the [Lebesgue integral](/page/Lebesgue%20Integral) yields
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = f(0)\int_0^1L_h(u)\,d\mathcal{L}^1(u)+h f_+'(0)\int_0^1uL_h(u)\,d\mathcal{L}^1(u)+\int_0^1L_h(u)R_h(u)\,d\mathcal{L}^1(u).
\end{align*}
The first moment identity turns the constant term into $f(0)$, and the second moment identity removes the order-$h$ term. Thus
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)]-f(0)=\int_0^1L_h(u)R_h(u)\,d\mathcal{L}^1(u).
\end{align*}
Finally, at $x=0$ the truncated set is exactly $[0,1]$ for every $h>0$, so the moments and $L_h$ are independent of $h$ for sufficiently small $h$. Since $K$ is bounded and $\Delta(0,h)>0$, define the finite constant
\begin{align*}
C_K:=\frac{M}{2}\int_0^1|L_h(u)|\,d\mathcal{L}^1(u).
\end{align*}
Then
\begin{align*}
|\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)]-f(0)|\le C_Kh^2
\end{align*}
for all sufficiently small $h>0$, which is exactly $\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)]-f(0)=O(h^2)$ as $h\downarrow0$.
[/guided]
[/step]
[step:Verify that the equivalent kernel reproduces constants and cancels linear terms]
For sufficiently small $h > 0$, $\Delta(0,h) > 0$, so $L_h$ is well-defined. By the definition of $L_h$ and the moments $s_j(h)$,
\begin{align*}
\int_0^1 L_h(u)\,d\mathcal{L}^1(u) = \frac{s_2(h)s_0(h) - s_1(h)^2}{\Delta(0,h)} = 1.
\end{align*}
Similarly,
\begin{align*}
\int_0^1 uL_h(u)\,d\mathcal{L}^1(u) = \frac{s_2(h)s_1(h) - s_1(h)s_2(h)}{\Delta(0,h)} = 0.
\end{align*}
Thus $L_h$ reproduces constants and annihilates first-degree monomials on the boundary window.
[/step]
[step:Expand the density at the boundary to second order]
By the regularity hypothesis in the statement, choose $r > 0$ such that $f:[0,r]\to\mathbb{R}$ and $f_+':[0,r]\to\mathbb{R}$ are absolutely continuous, the second right derivative $f_+''$ exists $\mathcal{L}^1$-a.e. on $[0,r]$, and $f_+''\in L^\infty([0,r])$. Define $M:=\|f_+''\|_{L^\infty([0,r])}<\infty$. Choose $h_0 > 0$ such that $h_0 \le r$ and $\Delta(0,h) > 0$ for all $0 < h < h_0$. For $0 < h < h_0$ and $u \in [0,1]$, we have $hu \in [0,r]$.
We now derive the integral Taylor formula using the [Fundamental Theorem of Calculus](/theorems/632) for absolutely continuous functions. Define $T:[0,r]\to\mathbb{R}$ by
\begin{align*}
T(s):=f(0)+s f_+'(0)+\int_0^s (s-t)f_+''(t)\,d\mathcal{L}^1(t).
\end{align*}
The boundedness of $f_+''$ implies $f_+''\in L^1([0,r])$, so $T$ is absolutely continuous. For $\mathcal{L}^1$-a.e. $s\in[0,r]$, differentiating the absolutely continuous integral term gives
\begin{align*}
T'(s)=f_+'(0)+\int_0^s f_+''(t)\,d\mathcal{L}^1(t)=f_+'(s),
\end{align*}
where the last equality is another application of the same theorem to the absolutely [continuous function](/page/Continuous%20Function) $f_+'$. Since $T(0)=f(0)$ and $f$ is absolutely continuous with right derivative $f_+'$ on $[0,r]$, applying the same theorem to $T-f$ gives $T(s)=f(s)$ for all $s\in[0,r]$. Setting $s=hu$ gives the integral form of Taylor's formula:
\begin{align*}
f(hu) = f(0) + hu f_+'(0) + R_h(u),
\end{align*}
where the remainder function $R_h: [0,1] \to \mathbb{R}$ is defined by
\begin{align*}
R_h(u) := \int_0^{hu} (hu-t)f_+''(t)\,d\mathcal{L}^1(t).
\end{align*}
The bound on $f_+''$ gives
\begin{align*}
|R_h(u)| \le M\int_0^{hu} (hu-t)\,d\mathcal{L}^1(t).
\end{align*}
The one-dimensional integral is $h^2u^2/2$, so
\begin{align*}
|R_h(u)| \le \frac{M}{2}h^2u^2 \le \frac{M}{2}h^2.
\end{align*}
[/step]
[step:Use the moment identities to cancel the first-order boundary bias]
Substituting the expansion of $f(hu)$ into the expectation formula yields
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = \int_0^1 L_h(u)\left(f(0) + hu f_+'(0) + R_h(u)\right)\,d\mathcal{L}^1(u).
\end{align*}
By linearity of the Lebesgue integral, this equals
\begin{align*}
f(0)\int_0^1 L_h(u)\,d\mathcal{L}^1(u) + h f_+'(0)\int_0^1 uL_h(u)\,d\mathcal{L}^1(u) + \int_0^1 L_h(u)R_h(u)\,d\mathcal{L}^1(u).
\end{align*}
Using the two moment identities, we obtain
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] = f(0) + \int_0^1 L_h(u)R_h(u)\,d\mathcal{L}^1(u).
\end{align*}
The zeroth-order term is exactly $f(0)$, and the first-order term vanishes because $\int_0^1 uL_h(u)\,d\mathcal{L}^1(u)=0$.
[/step]
[step:Bound the remaining second-order remainder]
For $0 < h < h_0$,
\begin{align*}
\left|\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] - f(0)\right| \le \int_0^1 |L_h(u)|\,|R_h(u)|\,d\mathcal{L}^1(u).
\end{align*}
Using the uniform bound $|R_h(u)| \le Mh^2/2$ on $[0,1]$, we get
\begin{align*}
\left|\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] - f(0)\right| \le \frac{M}{2}h^2 \int_0^1 |L_h(u)|\,d\mathcal{L}^1(u).
\end{align*}
At the boundary point $0$, the truncated set $\{u \in \mathbb{R}: hu \in S\}\cap[-1,1]$ is exactly $[0,1]$ for every $h > 0$. Hence the moments $s_j(h)$ and the equivalent kernel $L_h$ are independent of $h$ for all sufficiently small $h$. Choose one sufficiently small $h_* >0$ and write $L_*:=L_{h_*}$; then $L_h=L_*$ on $[0,1]$ for every sufficiently small $h>0$. Define
\begin{align*}
C_K := \frac{M}{2}\int_0^1 |L_*(u)|\,d\mathcal{L}^1(u),
\end{align*}
which is finite because $K$ is bounded and supported in $[-1,1]$, while $\Delta(0,h_*)>0$. Therefore
\begin{align*}
\left|\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] - f(0)\right| \le C_K h^2
\end{align*}
for all sufficiently small $h > 0$. This is precisely
\begin{align*}
\mathbb{E}[\hat f_{h,\mathrm{ll}}(0)] - f(0) = O(h^2)
\end{align*}
as $h \downarrow 0$.
[/step]