The K-COS MethodReading edition

COS inversion and the analytic error budget

Reading tools
Reading libraryFind statementsInspect Lean
Switch work

Saved reading

Read side by side

Start reading

Resources & source

Original TeX with line links · Download TeX

The wording and mathematics follow the retained manuscript. This reading format does not add a proof review or extend Lean coverage.

Skip contents and start reading

7 COS inversion and the analytic error budget

The tail functional has three distinct approximation errors: packet compression on a finite grid, finite support with cosine folding, and omitted Fourier modes. Each receives its own bound. Their sum yields an analytic certificate, while a finite-refinement theorem shows that the mathematical error can be made arbitrarily small for a fixed positive spectrum and an upper-tail query.

7.1 Tilted COS tail functional

Because \(Q\ge0\), K-COS uses the interval \([0,b]\). Throughout the following functional and packet-error results, assume \(b>q\ge0\), \(b>0\), \(0<\theta<1/(2\lambda_{\max})\), and an integer mode count \(N\ge1\). Let

\[ u_k=\frac{k\pi}{b}, \qquad k=0,1,\ldots, \]

and define the exponentially weighted cosine integrals

\[ J_k(q,b,\theta) =\int_q^b e^{-\theta(x-q)}\cos(u_kx)\,dx. \]
(7.1)

They admit the closed form

\[ J_k =\Re\left[ e^{{\mathrm{i}} u_k q} \frac{1-e^{(-\theta+{\mathrm{i}} u_k)(b-q)}}{\theta-{\mathrm{i}} u_k} \right]. \]
(7.2)

The prime on a cosine sum denotes half weight for \(k=0\).

If the exact tilted characteristic function is used, the \(N\)-mode finite-window expression is

\[ T_{N,b} =\frac{2}{b}\sum_{k=0}^{N-1}{}' J_k\, \Re\left[e^{\kappa(\theta+{\mathrm{i}} u_k)-\theta q}\right]. \]
(7.3)

The cancellation of \(\kappa(\theta)\) in (7.3) is useful numerically: the likelihood-ratio prefactor from (6.7) and the normalization in (6.6) do not need to be formed separately inside each mode.

7.2 Propagation of packet error

Let \(\widehat\kappa(s_k)\) be the packet approximation at

\[ s_k=\theta+{\mathrm{i}} u_k, \]

and suppose

\[ |\widehat\kappa(s_k)-\kappa(s_k)|\le B_k. \]
(7.4)

For disjoint packets, \(B_k\) can be chosen as the sum of the packet bounds (6.11).

Theorem 7.1: Finite-grid packet-to-tail bound

Let \(\widehat T_{N,b}\) be obtained from (7.3) by replacing \(\kappa(s_k)\) by \(\widehat\kappa(s_k)\). Then

\[ |\widehat T_{N,b}-T_{N,b}| \le {\varepsilon}_{\mathrm{pkt}}, \]
(7.5)

where

\[ {\varepsilon}_{\mathrm{pkt}} = \frac{2}{b} e^{\kappa(\theta)-\theta q} \sum_{k=0}^{N-1}{}' |J_k|\bigl(e^{B_k}-1\bigr). \]
(7.6)

Proof

Write \(\Delta_k=\widehat\kappa(s_k)-\kappa(s_k)\). Then

\[ |e^{\widehat\kappa(s_k)-\theta q}-e^{\kappa(s_k)-\theta q}| \le |e^{\kappa(s_k)-\theta q}|\,(e^{|\Delta_k|}-1). \]

Moreover

\[ \Re\kappa(\theta+{\mathrm{i}} u_k)-\kappa(\theta) =\log|\phi_{\theta}(u_k)|\le0, \]

so

\[ |e^{\kappa(s_k)-\theta q}| \le e^{\kappa(\theta)-\theta q}. \]

Substitute this into the finite cosine sum and apply the triangle inequality.

7.3 Positive support, truncation, and cosine periodization

Using full characteristic-function coefficients on \([0,b]\) reconstructs the even \(2b\)-periodization of the tilted density rather than the strictly truncated density. For a nonnegative density supported on \([0,\infty)\), the total mass folded back into \([0,b]\) equals the tilted mass above \(b\). This gives a clean error control for the positive quadratic-form setting.

Lemma 7.2: Integrated cosine identity by folding

Let \(\nu_\theta\) be the tilted probability measure and let \(F_b:[0,\infty)\to[0,b]\) fold each interval of length \(2b\) by reflection. Then \(\cos(k\pi F_b(x)/b)=\cos(k\pi x/b)\). For \(h(x)=e^{-\theta(x-q)}\mathbf1_{[q,b]}(x)\),

\[ \int h\,d(F_{b\#}\nu_\theta) =\frac2b\sum_{k=0}^{\infty}{}' J_k\,\Re\phi_\theta(k\pi/b). \]

The series is absolutely convergent for every positive rank \(r\ge1\).

Proof

A positive weighted chi-square sum has an absolutely continuous law. Its folded measure therefore has no atom at the jump of \(h\). The even periodic extension of \(h\) has bounded Fejér means, which converge at every continuity point. Dominated convergence identifies the integral of those means with \(\int h\,d(F_{b\#}\nu_\theta)\). Their cosine coefficients are the Cesàro weighted coefficients \(2J_k/b\), and folding preserves the cosine moments \(\Re\phi_\theta(k\pi/b)\). Finally \(J_k=O(k^{-1})\) and \(|\phi_\theta(k\pi/b)|=O(k^{-r/2})\), as follows directly from the product formula below. Thus the coefficient products are \(O(k^{-1-r/2})\). Their absolute sum converges. The Cesàro sums and ordinary sum have the same limit, proving the displayed identity. This argument justifies the weighted functional without requiring pointwise convergence of the reconstructed density at every boundary.

Proposition 7.3: Support and periodization bound

Let the finite positive spectrum have rank \(r\ge1\), and let \(b>q\ge0\), \(b>0\), and \(0<\theta<1/(2\lambda_{\max})\). Let

\[ \tau_{\theta}(b)={\mathbb P}_{\theta}(Q>b). \]

Then the combined error from (i) replacing the tilted density on \([0,b]\) by its full-coefficient cosine periodization and (ii) omitting the original integral over \((b,\infty)\) is bounded by

\[ {\varepsilon}_{\mathrm{sup}} \le e^{\kappa(\theta)-\theta q}\, \tau_{\theta}(b) \left(1+e^{-\theta(b-q)}\right). \]
(7.7)

Proof

By Lemma 7.2, the infinite cosine functional integrates the folded measure. The part of that measure originating from \((b,\infty)\) is nonnegative and has total mass \(\tau_{\theta}(b)\). On \([q,b]\), the weight \(e^{-\theta(x-q)}\) is at most one, so its contribution to the weighted functional is at most \(\tau_{\theta}(b)\). For the omitted original tail, \(x\ge b\) implies

\[ e^{-\theta(x-q)}\le e^{-\theta(b-q)}, \]

so that term is at most \(e^{-\theta(b-q)}\tau_{\theta}(b)\). Multiplication by the likelihood-ratio prefactor in (6.7) gives (7.7).

The tilted tail probability itself can be bounded by Chernoff's inequality. For \(\eta>\theta\) inside the transform domain,

\[ \tau_{\theta}(b) \le \exp\left\{ \kappa(\eta)-\kappa(\theta)-(\eta-\theta)b \right\}. \]
(7.8)

When \(b>\kappa'(\theta)\), the minimizing \(\eta\) is the unique solution of

\[ \kappa'(\eta)=b. \]
(7.9)

For the saddlepoint tilt, \(\kappa'(\theta_*)=q<b\), so such an \(\eta\) exists.

7.4 A specialized omitted-mode bound

The tilted characteristic function has an especially transparent modulus.

Lemma 7.4: Tilted characteristic-function modulus

Define

\[ a_j=\frac{2\lambda_j}{1-2\theta\lambda_j}>0. \]
(7.10)

Then

\[ |\phi_{\theta}(t)| =\prod_{j=1}^{r}\left(1+(a_jt)^2\right)^{-1/4}. \]
(7.11)

For \(t>0\), define the logarithmic decay rate

\[ \beta(t) =-\frac{d\log|\phi_{\theta}(t)|}{d\log t} =\frac12\sum_{j=1}^{r} \frac{(a_jt)^2}{1+(a_jt)^2}. \]
(7.12)

Set \(\beta(0)=0\) by continuous extension. Then \(\beta(t)\) is nondecreasing for \(t\ge0\).

Proof

Taking the modulus of each factor in (6.6) gives (7.11). Differentiating its logarithm gives (7.12). Each summand \(x/(1+x)\) with \(x=(a_jt)^2\) is nondecreasing in \(t\).

Corollary 7.5: Power envelope from one frequency

For \(t\ge t_0>0\),

\[ |\phi_{\theta}(t)| \le |\phi_{\theta}(t_0)| \left(\frac{t}{t_0}\right)^{-\beta(t_0)}. \]
(7.13)

Proof

By Lemma 7.4,

\[ \frac{d\log|\phi_{\theta}(t)|}{d\log t}=-\beta(t)\le-\beta(t_0) \]

for \(t\ge t_0\). Integrating from \(t_0\) to \(t\) proves the claim.

For \(k\ge1\), the exact integral (7.2) implies

\[ |J_k| \le \frac{2}{u_k}. \]
(7.14)

Theorem 7.6: Omitted COS-mode certificate

Let \(N\ge1\) and \(b>q\ge0\). Set \(u_N=N\pi/b\) and \(\beta_N=\beta(u_N)\). If \(\beta_N>0\), then the contribution of all exact tilted-COS modes \(k\ge N\) to the weighted tail functional is bounded by

\[ {\varepsilon}_{\mathrm{COS}} \le e^{\kappa(\theta)-\theta q} \frac{4|\phi_{\theta}(u_N)|}{\pi} \left(\frac1N+\frac1{\beta_N}\right). \]
(7.15)

Proof

Using the cosine coefficient magnitude \(2|\phi_{\theta}(u_k)|/b\) and (7.14), the omitted series is at most

\[ e^{\kappa(\theta)-\theta q} \frac{4}{\pi} \sum_{k=N}^{\infty}\frac{|\phi_{\theta}(u_k)|}{k}. \]

By Corollary 7.5,

\[ |\phi_{\theta}(u_k)| \le |\phi_{\theta}(u_N)|\left(\frac{k}{N}\right)^{-\beta_N}. \]

Therefore

\[ \sum_{k=N}^{\infty}\frac{|\phi_{\theta}(u_k)|}{k} \le |\phi_{\theta}(u_N)|N^{\beta_N} \sum_{k=N}^{\infty}k^{-\beta_N-1}. \]

Finally,

\[ \sum_{k=N}^{\infty}k^{-\beta_N-1} \le N^{-\beta_N-1}+\int_N^{\infty}x^{-\beta_N-1}\,dx =N^{-\beta_N-1}+\frac{N^{-\beta_N}}{\beta_N}, \]

which yields (7.15).

7.5 Combined analytic certificate

Theorem 7.7: K-COS analytic error certificate

Let \(p={\mathbb P}(Q\ge q)\), and let \(\widehat p\) be the finite K-COS approximation formed with

  1. an upper interval endpoint \(b>q\),

  2. an integer \(N\ge1\) of cosine modes,

  3. a packet approximation satisfying (7.4) on the finite grid.

Under the positive-spectrum and parameter hypotheses of Proposition 7.3,

\[ |p-\widehat p| \le {\varepsilon}_{\mathrm{an}} :={\varepsilon}_{\mathrm{pkt}}+{\varepsilon}_{\mathrm{sup}}+{\varepsilon}_{\mathrm{COS}}. \]
(7.16)

If \({\varepsilon}_{\mathrm{an}}<|\widehat p|\), then

\[ \frac{|p-\widehat p|}{|p|} \le \frac{{\varepsilon}_{\mathrm{an}}} {|\widehat p|-{\varepsilon}_{\mathrm{an}}}. \]
(7.17)

Proof

Decompose the error into packet error on the retained grid, support and periodization error, and the exact omitted cosine series. The first is bounded by Theorem 7.1, the second by Proposition 7.3, and the third by Theorem 7.6. This proves (7.16). Also

\[ |p|\ge |\widehat p|-|p-\widehat p| \ge |\widehat p|-{\varepsilon}_{\mathrm{an}}, \]

which gives (7.17).

Remark 7.8: Certificate boundary

Theorem 7.7 is an analytic approximation certificate. It does not enclose IEEE floating-point rounding in complex logarithms, exponentials, root finding, or summation. A machine-level certificate would require directed rounding, interval arithmetic, or a comparable validated-numerics layer.

7.6 Finite refinability

The combined error terms correspond to three distinct obstructions. Packet error is reduced by splitting spectral packets or raising packet order. Support error is reduced by increasing \(b\). Cosine-series error is reduced by increasing \(N\).

Proposition 7.9: Existence of a finite analytic refinement

Fix a finite positive spectrum \(\{\lambda_j\}_{j=1}^{r}\), an upper-tail query \(q>{\operatorname{\mathbb E}} Q\), and \({\varepsilon}>0\). There exist a finite interval endpoint \(b>q\), a finite number of cosine modes \(N\), and a finite packet partition (allowing singleton packets) for which the analytic error bound in (7.16) is below \({\varepsilon}\).

Proof

First choose \(b\) sufficiently large that (7.7) is below \({\varepsilon}/3\). This is possible because the tilted law has a moment generating function in a nontrivial right neighborhood of zero and hence its Chernoff bound tends to zero exponentially as \(b\to\infty\). Hold this \(b\) fixed. By (7.11), \(|\phi_{\theta}(t)|\to0\) polynomially as \(t\to\infty\), while \(\beta(t)\to r/2>0\). Therefore (7.15) tends to zero as \(N\to\infty\), so a finite \(N\) makes it below \({\varepsilon}/3\). Finally, split every packet to singletons if necessary. A singleton has \(\delta_j=0\), so its packet remainder is exactly zero. Hence a finite partition makes \({\varepsilon}_{\mathrm{pkt}}<{\varepsilon}/3\). Summing the three terms proves the claim.

Remark 7.10

Proposition 7.9 proves existence of a finite representation meeting any analytic tolerance. It proves neither termination of an arbitrary greedy schedule nor optimality of its resource use. A particular capped implementation can fail to certify even though a finite analytic refinement exists. The packet planner refines the largest currently certified obstruction and is evaluated in Chapter 11.

Source and conversion record

Source SHA-256: af25ba38c25082cb1aee20ed42bd18c160e423f9ba850c11a6b4eb083e0e2834

Unsupported prose commands stop the build. The mathematical expression sequence is checked against the source, with manuscript macros expanded for display.

Conversion records

Notation in The K-COS Method

Look up a symbol without leaving this chapter. Select text before opening help to search for it.

Search this work’s notation.

    Symbols can have different meanings in different passages. Read each result in its own context.

    Open the full notation index