The K-COS MethodReading edition

Accuracy-driven certification

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

10 Accuracy-driven certification

A requested tolerance is an input to the problem, not an informal expectation about its answer. The controller accepts a result only when an outward probability interval proves the multiplicative accuracy requirement. Failure to prove that inequality remains a failure of certification, even when a point estimate appears accurate.

The external numerical contract specifies the desired accuracy, not the internal transform resolution.

For an exact positive spectrum and threshold \(q\), the solver accepts a requested relative multiplicative accuracy

\[ \varepsilon_{\rm req}>0 \]

and returns a certified interval

\[ [p_-,p_+] \]

only when

\[ \boxed{ \frac{p_+}{p_-}-1 \le \varepsilon_{\rm req}. } \]

In logarithmic coordinates, if

\[ \log_{10}p\in[d_-,d_+], \]

the acceptance rule is

\[ \boxed{ 10^{d_+-d_-}-1 \le \varepsilon_{\rm req}. } \]

No value of \(N\), support width, or arithmetic precision appears in the external contract.

Theorem 10.1: Accuracy contract for the positive exact-spectrum backend

Assume an exact supplied positive decimal spectrum of rank greater than two, a threshold \(q\ge0\) with valid interval-design parameters, and requested multiplicative tolerance \(\varepsilon_{\rm req}>0\). Suppose the directed-rounding interval backend returns an enclosure

\[ \log_{10}p\in[d_-,d_+] \]

that includes the proved support/alias and omitted-mode remainders. If the accuracy-driven controller returns certified=True, then

\[ \boxed{ P(Q\ge q)\in[10^{d_-},10^{d_+}] } \]

and

\[ \boxed{ \frac{10^{d_+}}{10^{d_-}}-1 \le \varepsilon_{\rm req}. } \]

If the resource caps are reached before this inequality is proved, the controller returns certified=False rather than promoting the interval midpoint to a certified answer.

Proof

The directed-rounding backend encloses the finite transform and exponential prefactor and then enlarges that enclosure by the proved support/alias and infinite-mode error bounds. Therefore the true tail probability lies inside the returned interval. The controller encloses \(\operatorname{expm1}(\log(10)(d_+-d_-))\) by directed rounding and sets certified=True only when the upper endpoint of that ratio enclosure is no larger than the lower endpoint of the exact requested tolerance enclosure. High precision alone is not an enclosure proof. The fail-closed branch follows directly from the controller definition.

10.1 Adaptive refinement

The controller adjusts three internal resources:

  1. the COS mode count \(N\).

  2. the tilted support scale \(L\), which changes \(b\) and its associated Chernoff parameter.

  3. the interval arithmetic precision.

At each stage the full directed-rounding interval is recomputed. If the rounding component is material relative to the requested budget, arithmetic precision is increased. Otherwise the dominant analytic contribution determines the next refinement: mode error increases \(N\), while support/alias error increases \(L\).

A certified return occurs only after the multiplicative inequality above has been proved. Reaching a resource limit instead terminates the calculation with the failure status described next.

10.2 Fail-closed behavior

If the configured resource caps are exhausted before the requested accuracy is established, the solver does not silently return its midpoint as though it were certified.

Instead it returns

\[ \boxed{\texttt{certified = false}} \]

together with the unresolved interval and a failure reason.

This behavior is part of the numerical definition of the solver.

10.3 Accuracy ladder through \(10^{-5000}\)

The exact control

\[ Q=0.02\chi^2_{80} \]

was evaluated at tail depths

\[ 10^{-100}, \qquad 10^{-1000}, \qquad 10^{-5000}. \]

For each depth the controller was asked to prove relative multiplicative accuracies

\[ 10^{-8}, \quad 10^{-10}, \quad 10^{-12}, \quad 10^{-14}. \]

All twelve contracts were satisfied.

At the \(10^{-5000}\) point, the controller produced:

requested accuracyachieved ratio minus one\(N\)\(L\)
\(10^{-8}\)\(3.19\times10^{-10}\)6410
\(10^{-10}\)\(7.70\times10^{-11}\)12810
\(10^{-12}\)\(3.48\times10^{-15}\)12812
\(10^{-14}\)\(3.48\times10^{-15}\)12812

The gap between requested and achieved accuracy is expected: refinement is discrete, so one additional support or mode refinement can improve the certificate by several orders of magnitude.

A further stress test requested

\[ 10^{-16} \quad\text{and}\quad 10^{-18} \]

relative accuracy at the same \(10^{-5000}\) tail. The solver obtained approximately

\[ 3.05\times10^{-18} \]

and

\[ 9.20\times10^{-20} \]

respectively.

Requested and achieved multiplicative widths, expressed as decimal accuracy orders. Larger values mean tighter widths, so points above the equality line meet the requested tolerance. The two deepest stress results use the rounded numerical summaries in the text. Acceptance itself uses the full directed endpoints.
Figure 10.1. Requested and achieved multiplicative widths, expressed as decimal accuracy orders. Larger values mean tighter widths, so points above the equality line meet the requested tolerance. The two deepest stress results use the rounded numerical summaries in the text. Acceptance itself uses the full directed endpoints.

View full-size figure (new tab)

10.4 Acceptance arithmetic and serialization are directed

The acceptance condition must be evaluated as carefully as the probability interval.

Converting a tiny log-width \(w\) using

\[ 10^w-1 \]

under an insufficient point-precision context can lose the width. At approximately \(10^{-15}\) relative scales, the ratio can round to zero.

Even when the probability interval remains valid, that conversion cannot support a certification decision. The implementation encloses

\[ \boxed{ \operatorname{expm1}(\log(10)\,w) } \]

with directed interval arithmetic before deciding whether the requested accuracy has been met. Acceptance compares the upper endpoint of that ratio with the lower endpoint of the requested exact tolerance, so a rounded point estimate cannot promote an unresolved boundary case to success.

Authoritative output strings must preserve the same outer enclosure. The implementation converts each exact binary interval endpoint to a decimal string with Decimal and explicit ROUND_FLOOR for lower endpoints or ROUND_CEILING for upper endpoints. Ordinary interval display formatting is not used as an authoritative serialization method: nearest-rounded decimal text can move an endpoint inward even when the internal interval arithmetic was directed. Matrix-to-tail propagation keeps these endpoint strings and applies the same directed ratio test.

The correctness requirement applies not only to the tail integral but also to the logic that labels its result certified.

10.5 Input semantics at \(p\approx10^{-16}\)

At this accuracy scale, the representation of the threshold \(q\) itself is measurable. In the \(0.02\chi^2_{80}\) control targeted at \(10^{-16}\), rounding the high-precision threshold to binary float64 shifts the exact tail by approximately

\[ 3.83\times10^{-15} \]

decades. The binary64 solver evaluated at that same rounded input then differs from the exact tail of the rounded input by approximately

\[ 5.17\times10^{-15} \]

decades.

Accordingly, claims below the float64 input-quantization scale use exact-decimal or interval inputs. The rigorous accuracy contract therefore certifies the mathematical inputs supplied to it, rather than silently identifying a rounded binary threshold with an ideal decimal threshold.

Source and conversion record

Source SHA-256: 65e1e96d470ac910c5d7005d52bc8c6a48d519f6cc01b98e24d7e6011c3bf825

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