Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 189 additions & 0 deletions research/asymmetric-gaussian-precision/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
# Asymmetric accuracy for normalized convolution

This scoped proof was produced by Nick Petalas. Apache-2.0.

## Contract and new conclusion

Take the normalized channel in Jerry Chen / CubeJerry's
[#6993](https://github.com/CrocSwap/integer-mult-bounds/pull/6993), retained at
`research/deferred-gaussian-recovery/PROOF.md`, sections 2-4. Its exact
Fourier identity, source interfaces and physical endpoints are premises.
They are not reverified here. Cinna Davis's #4100 supplies the construction
and exact source definitions. Ryanson Jonathan's #4320 supplies the
identity/recovery audit, and his #4415 supplies the predecessor one-middle
error ledger. #6993 retains the further native,
scalar, source, codec and Fourier attribution in its NOTICE.md.

Let b >= 1 and Gamma >= 0 be integers, and let 1 <= S < 2^b. Set

h = ceil(log2 S), a = 2h + 2b + 7,
epsilon = 2^-a, lambda = 2^-Gamma.

All vector norms in the argument are the maximum complex modulus. The two
ideal forward maps and the ideal opposite map are lambda times maps with
operator norm at most one. Their exact composition with pointwise product
is the inherited normalized convolution, with accumulated scale lambda^3.
The original input vectors have norm at most 1/4.

Suppose the approximate forward calls have errors at most lambda epsilon
on those inputs. Suppose the approximate opposite call has error at most
lambda^3 epsilon on every admitted quarter-disk input, including its
actual rounded input. Keep the original common q grid, with

q >= a + 3Gamma + 7,

and retain every additional source, reference, native and ledger guard.
The pointwise operation multiplies exactly and truncates each real and
imaginary component toward zero once on that grid. No other uncharged
rounding operation is allowed.

Then every forward return has norm below 1/2, the actual pointwise result
has norm below 1/4, and the opposite return has norm below 1/2. The final
error after multiplying by S^2 2^(2b+4+3Gamma) is strictly below 1/4.
Consequently the same final nearest-integer gate remains valid.

The new forward-map tolerance is lambda epsilon, replacing #6993's
lambda^3 epsilon. It is larger by exactly 2^(2Gamma). This is an accuracy
allocation result, conditional on delivering the named maps. It asserts
no reduction in the common q grid or completed physical cost.

## Separate the four error sources

Write U,V for the ideal forward returns and Uhat,Vhat for the approximate
ones. More generally, allow forward errors alpha,beta, pointwise error
delta, and opposite error omega. Since |U|,|V| <= lambda/4,

||Uhat Vhat - UV||
<= (lambda/4)(alpha+beta) + alpha beta.

Multiplication is coordinatewise. Apply the ideal opposite map to the
actual rounded product first. Its operator norm is at most lambda. The
opposite algorithm's error is then charged at that actual input. The
complete error E in the normalized final result satisfies

E <= lambda[(lambda/4)(alpha+beta) + alpha beta + delta] + omega. (1)

This argument does not require the approximate routines to be linear or
contractive. Their error promises must hold on the reached input domains.

Substitute alpha=beta=lambda epsilon and omega=lambda^3 epsilon. Each
component truncation has error below 2^-q, so the complex modulus error
satisfies delta < sqrt(2) 2^-q < 2^(1-q). The q guard gives

delta < lambda^3 epsilon/64.

Divide (1) by lambda^3 to obtain

E/lambda^3 < epsilon(3/2 + epsilon + lambda/64)
<= epsilon(3/2 + 1/512 + 1/64)
= (777/512)epsilon < 2epsilon. (2)

Here a >= 9, including S=1, b=1 and Gamma=0. The larger forward error is
attenuated once by the other forward output and once by the opposite map.
The opposite algorithm's own error has neither attenuation factor.

## Verify the actual input and return radii

Each approximate forward return has norm at most

lambda(1/4+epsilon) <= 129/512 < 1/2.

The actual rounded product has norm strictly below

lambda^2(1/4+epsilon)^2 + lambda^3 epsilon/64
<= (129/512)^2 + 1/32768
= 16649/262144 < 1/4. (3)

Thus the opposite error promise used in (1) applies to its actual input.
Its return norm is strictly below

lambda(16649/262144) + lambda^3 epsilon
<= 17161/262144 < 1/2.

These are the same interface radii required by #6993. In particular Gamma=0
requires no separate limiting argument. The native half-disk carrier
checks remain applicable, and the pointwise quarter-disk guard is preserved.

## Recover the integers at the unchanged scale

Keep both exact S multiplications and the complete shift 2b+4+3Gamma.
By (2), the error after this restoration satisfies

E S^2 2^(2b+4+3Gamma)
< 2epsilon S^2 2^(2b+4)
= S^2 2^(-2h-2) <= 1/4.

The first inequality is strict even when S=2^h. The exact convolution
coefficient is real, so projection to its real component cannot increase
the error. Nearest-integer recovery is unambiguous. The source identity,
original-coordinate extraction, CRT and carry obligations remain inherited.

## Translate the improvement into stage requests

The three public stages of each transform are expansion, middle and
compression. Use the same source-interface implication as #6993, section 3:
if each stage has restored error below 2^-tau, then the complete normalized
map error is below 3*2^(-tau-Gamma). Every actual finite applicability guard
in that implication must still pass for that call.

The previous request for every call was tau_old=a+2Gamma+2. Replace it by

tau_forward = a+2, for each of the two forward calls,
tau_opposite = a+2Gamma+2, for the opposite call.

Then the forward-stage sum is below 3lambda epsilon/4, and the opposite-stage
sum is below 3lambda^3 epsilon/4. Both fit the map budgets used above. Each
forward stage therefore requests exactly 2Gamma fewer accuracy bits. At
Gamma=0 the requests coincide.

For each forward call independently, the same substitutions in #6993 give

z_forward = tau_forward + Gamma + ceil(log2 m) + 1,
chi_forward = Gamma + tau_forward,
tau_comp_forward = tau_forward + K_f.

The last equality preserves the compression-only normalization K_c, since
Gamma=K_f+K_c. The analogous opposite requests retain tau_opposite. These
are requests to separately prepared stage implementations, not a license
to reuse an old phase bank at a different declared accuracy. Preserve the
source-first ordering and all finite radius, normalizer, coefficient, q and
reference gates. A changed reference can change its derived parameters;
this proof does not assert that a previously admitted reference remains
admitted without checking its new declaration.

The old q lower bound remains sufficient for the new forward source rule
q >= Gamma+tau_forward+5, because it is stronger by 2Gamma. Other guards
can still dominate. A maximum with the fixed q or another width can erase
a physical width reduction. The proved improvement is in requested
accuracy, with no unconditional storage, runtime or kappa improvement.

## Why the opposite tolerance is retained

The distinction is necessary in this error-only model. Take S=1, b=1,
Gamma=1, zero inputs, exact forward and pointwise operations, and an
opposite return error lambda epsilon. These satisfy the hypothetical
looser opposite tolerance. Here a=9 and restoration multiplies by 512, so
the final error is exactly 1/2. It fails the strict 1/4 recovery contract.
The retained opposite tolerance lambda^3 epsilon excludes this example.
This is a counterexample to relaxing all calls alike, not an error in #6993.

Equation (1) is also exact in the scalar abstract additive-defect model:
use input values 1/4, ideal scalar maps multiplication by lambda, and align
all four nonnegative defects on the real axis. This equality only concerns
that abstract model. A freely signed pointwise defect is more permissive
than the actual inward truncator, and no sharpness claim for that truncator
or physical native algorithms follows.

## Scope and verification

The universal conclusion follows from the written inequalities. The
standard-library verifier supplies finite rational corroboration. It checks
separate budgets, exact length-1/2/4 convolution fixtures with literal
componentwise inward truncation, abstract scalar equalities and controls.
Its length-2/4 fixtures illustrate the norm contract; they are not the odd
production source domains. It imports no predecessor scientific verifier.

All five selected framework assumptions remain. There is no production
transform, new native word, physical controller, supplier admission,
complete multiplication theorem or selected-frontier change. Independent
human and formal proof-kernel review are unclaimed.
98 changes: 98 additions & 0 deletions research/asymmetric-gaussian-precision/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Relax normalized forward accuracy by 2Gamma bits

This contribution was produced by Nick Petalas. Apache-2.0.

Claim type: scoped written proof with exact finite corroboration. In the
normalized convolution channel of Jerry Chen / CubeJerry's
[#6993](https://github.com/CrocSwap/integer-mult-bounds/pull/6993), the two
forward transforms may each have map error `2^(-a-Gamma)` instead of
`2^(-a-3Gamma)`. The opposite-transform budget and common q grid stay as in
that interface. All actual-input radius guards and the final strict
integer-recovery error `<1/4` still hold under the stated source contracts.

With `a=2ceil(log2 S)+2b+7`, `1<=S<2^b`, and integer `Gamma>=0`, the stage
requests become

```text
forward expansion/middle/compression: tau = a+2
opposite expansion/middle/compression: tau = a+2Gamma+2
common grid: q >= a+3Gamma+7, plus actual source and ledger guards
```

This saves exactly `2Gamma` requested accuracy bits at each forward stage.
It does not guarantee smaller physical widths. Fixed q, other finite
source guards and preparation can dominate. There is no new kappa or
completed physical supplier.

[PROOF.md](PROOF.md) gives the separate error polynomial, every reached
radius, the unchanged recovery scale and source-request substitutions.
The new step is this asymmetric allocation. The normalized identity,
S-squared scale and physical scalar endpoint belong to the predecessors.
Credit #6993, Cinna Davis #4100, Ryanson Jonathan #4320/#4415 and all retained
native, scalar, source, codec and Fourier contributors in #6993's NOTICE.
The classical product perturbation inequality is not claimed as a new
mathematical discovery.

## Reproduce

From the repository root with CPython 3.12 and the standard library:

```sh
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/asymmetric-gaussian-precision
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -I -B research/asymmetric-gaussian-precision/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -I -O -B research/asymmetric-gaussian-precision/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/asymmetric-gaussian-precision --check-source-history
```

Replace the absolute interpreter with another CPython 3.12 installation
when reproducing elsewhere. Both registered commands print
`PASS_ASYMMETRIC_GAUSSIAN_PRECISION` in a generated JSON receipt bound to the
six package files. Optional `--receipt /absolute/external/path.json` saves
the same receipt outside the package. No receipt is hand-written or
required as a committed input.

Local normal and optimized checks pass 315 budget cases, 1,152 convolution
executions, six abstract scalar equalities and ten controls. Both direct
commands took 0.17 seconds locally; these are validation durations, not a
runtime improvement. The registered replay also passes both commands.

The verifier checks all its declared finite cases, not all mathematical
parameters. It includes literal inward rounding and an independent direct
convolution oracle for lengths 1, 2 and 4. These dyadic fixtures illustrate
the contract; they are not production odd-source transforms. The proof
covers arbitrary admitted source length under the inherited norm and
identity contracts. No predecessor scientific replay is run.

## Limits

Independent human and formal proof-kernel review are unclaimed. The selected
#7000 record, five framework assumptions, complete native/scalar costs,
original-coordinate extraction, CRT, carry/output and production source
admission are unchanged. New stage requests require their own source-first
preparation and finite applicability gates. No physical runtime, storage,
common-grid reduction or multiplication theorem is inferred.

The verifier uses bounded finite loops and functions below 60 physical
lines. Python's Fraction and container operations require runtime allocation.
This is the managed-runtime deviation from Power of Ten rule 3, confined to
this offline checker. Fixture vectors have at most four entries; scalar
allocation inputs enforce b and Gamma at most 128, and dyadic helpers cap
exponents at 2048. Hashing reads at most one MiB per package file. There is
no recursion, dynamic code evaluation, solver,
network access or predecessor import. Warning-strict normal/optimized runs
and source compilation are the diagnostic checks. Any larger finite sweep
must explicitly revise those bounds; arbitrary-parameter correctness rests
on the proof rather than an unbounded checker loop.

## Open next questions

- Can an actual separately prepared forward controller use these relaxed
requests to lower a binding source or phase width? Pin its normalizers,
recompute its finite reference guards and compare complete paid costs.
No such controller is implemented here.
- Can a separately admitted pointwise precision schedule reduce the shared
q guard without adding conversion errors? Start from the four separate
terms in equation (1), include each grid adapter and retain the opposite
error budget. This package keeps the original common grid.

The structured versions and blockers are in [TASK.json](TASK.json).
36 changes: 36 additions & 0 deletions research/asymmetric-gaussian-precision/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"schema_version": 1,
"base_commit": "e54523517d0f03e58352e647c403a5af3e525a57",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8",
"sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
},
{
"path": "research/deferred-gaussian-recovery/PROOF.md",
"usage": "provenance",
"git_blob": "83cd53079a804fd40a87b50324fdcec45de2e59d",
"sha256": "870fcf901001aad2b6380f57ce3ba38f31da0bd3bd36abac933a180d29f48db6"
},
{
"path": "research/deferred-gaussian-recovery/README.md",
"usage": "provenance",
"git_blob": "11b78f5d5d5e82a2f29e858c18a93c99aa43d8a5",
"sha256": "3c2a17d1dd507e782ee974c870cfb5616e4c590fb36f1455ada782c92a307791"
},
{
"path": "research/deferred-gaussian-recovery/NOTICE.md",
"usage": "provenance",
"git_blob": "0e91eaab44193c65f33f73bb7db54587cab7bda1",
"sha256": "f3c0d4d53fdd2a91d8b371d4f65820ed7ccf7fe93d381a3e7553aeeb0293f932"
}
]
}
Loading
Loading