Skip to content
Merged
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
44 changes: 44 additions & 0 deletions research/gaussian-chirp-domain-audit/CLAIM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Sprint claim: Gaussian chirp domain and block budgets

- Track: adversarial mathematical audit; OS-random assignment seed **64**
(`secrets.randbelow(100)`, drawn 2026-10-13 03:37 UTC).
- Base: `66849e1475c930fd7732b1a0067ffee7e1e95f60`.
- Claimed at: 2026-10-13 03:43 UTC. Expected finish: 04:17 UTC.
- Exact object: the hypotheses, integer windows and precision budgets of
`lem:chirped-gaussian`, as inserted by `scripts/make_fast_gaussian_patch.py`;
compare the domain caveat in PR #371 at
`988ef67986c313445936fc7103908b6163b9d47e`.
- Method: follow generated source rather than the unmodified upstream header;
derive rational uniform bounds and use a separate standard-library checker
for bounded integer cases and deliberately invalid controls.
- Deliverable: one source-pinned audit note, reproducible exact checker and
receipt. No new kappa or full analytic/tape theorem claim.
- Time allocation: 40 minutes from 03:37 UTC; orientation ends before 03:45,
verification and handoff begin no later than 04:07.

## Selection and overlap

Three narrow candidates were considered, ordered as follows:

0. Recheck the missing exact infeasibility evidence behind PR #620's P111
decoder floor. The review already identifies absent proof logs and
nonportable scripts; a portable solver audit would need more setup.
1. Audit the Gaussian chirp domain and block budgets left conditional in
PR #371. This is an older unreviewed contribution with a small exact seam.
2. Audit the normalized zero/power-of-two boundary in PR #573's eight-tape
handoff. The sources have substantial scoped Lean checks already.

Seed `64 % 3 = 1` chooses candidate 1. It also determines the finite residue
sampling order; the claim is useful because it checks a different obligation,
not because it uses a different random seed.

At selection, GitHub returned 491 open PRs. The central ledger marks #371
unreviewed. Its final-grid counterexample and correction are predecessor work,
not claimed here. PRs #479, #481 and #489 address different Gaussian mechanisms.
The repository had no pinned issues and its sole open issue was #650
(Discussions), so this claim is recorded locally. Pinned issues and #371's
head/comments were refreshed immediately before recording the claim.

## Result update

Pending verification and handoff.
144 changes: 144 additions & 0 deletions research/gaussian-chirp-domain-audit/INDEPENDENT-REVIEW.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Independent source and arithmetic review

Reviewed on base `66849e1475c930fd7732b1a0067ffee7e1e95f60`, assignment
seed 64. This review covers the generated Gaussian chirp domain, integer
window containment and the two displayed working-precision budgets. It does
not certify the analytic or tape-complexity theorem and claims no new kappa.

## Source composition resolves the apparent domain mismatch

The unmodified header in
[`upstream/build/sections/07-resampling.tex`, lines 53–59](../../upstream/build/sections/07-resampling.tex#L53-L59)
has the older condition `theta > p/alpha^4`. Reading that header together
with the new chirp note would indeed leave the latter's upper bound on theta
unexplained. They are not the composed manuscript.

[`scripts/make_fast_gaussian_patch.py`, lines 23–33](../../scripts/make_fast_gaussian_patch.py#L23-L33)
replaces that condition by `alpha^-2 <= theta <= 1/4`, while retaining integer
`p > 100`, integer `2 <= alpha < sqrt(p)`, coprime integer `2 <= s < t < 2^p`,
and `sigma = t/s = 1+theta`. The chirp note is inserted by the same function
at line 160; dispatch occurs at lines 300–312. Calling `patched_files()` on
the exact base produced these conditions at generated
`build/sections/07-resampling.tex:59–65`, and the chirp lemma refers back to
them at generated lines 392–400. Thus `sigma <= 5/4 < 2` is available.

The generated assembly also supplies this domain: source
[`scripts/make_fast_gaussian_patch.py`, lines 232–263](../../scripts/make_fast_gaussian_patch.py#L232-L263),
generated `build/sections/08-assembly.tex:105–115,160–174`, gives
`alpha=floor(sqrt(b/(8d)))`, `eta=1/(4d)`,
`eta < theta_i < 1/(2d-1) <= 1/4` for `d>=3`, and
`alpha^2 theta_i > b/(64d^2) >= 1` eventually. This verifies the particular
domain transfer; it does not independently prove the prime-existence or
asymptotic setup claims used by that assembly.

PR [#371](https://github.com/CrocSwap/integer-mult-bounds/pull/371), immutable
head `988ef67986c313445936fc7103908b6163b9d47e`, correctly keeps its rounding
correction conditional on the other proof obligations. The fetched historical
head's generator and upstream section 07 were compared with this audit's
base and match byte for byte; the generator SHA-256 is
`ce2013dc3a674b920ddacf25fd17329b262885af0a19279e084238318dff4760`.
The note differs only by the proposed correction. Therefore the PR body's
additional assertion that the referenced no-sort header is broader does
**not** describe either its own composed construction or the construction at
this audit's base. It reads the unmodified header without its replacement.

## Universal arithmetic checks

The following arguments use every integer `p>=101` and every integer
`2<=alpha<sqrt(p)`, with `alpha^-2<=theta<=1/4`. They are written arithmetic
arguments, not a formalization. The one-block error enclosure itself is an
inherited premise, not re-proved here.

- **Output and input windows.** In the S' block, put
`c=floor(k0/sigma)` and `j0=c-m`, where `m=ceil(sqrt(p))*alpha`.
For `0<=b<m`, every integer `j` with `|j-(k0+b)/sigma|<m` lies strictly
between `j0` and `j0+3m`; hence it is included in the `3m+3` input records.
In the E block, an output `ell=ell0+r`, `0<=r<m`, uses every required
`ell+h`, `|h|<=m`, inside `[ell0-m,ell0+2m]`, the `3m+1` input records.
For the selected outputs, monotonic nearest-integer rounding gives
`0<=q_(ell0+r)-q_ell0<=ceil(sigma*r)<=2r<=2m-2`;
this fits the `2m+2` correlation outputs. These are integer containments,
not a numerical Gaussian-tail test. See the
[note, lines 160–169 and 190–216](../../notes/fast-gaussian-resampling.tex#L160-L216).

- **Exponential growth enclosures.** The elementary bounds `pi<22/7` and
`ln(2)>2*(1/3+1/81)=56/81` imply `pi/ln(2)<891/196`.
Consequently `(891/196)*(121/400)<7/5`,
`(891/196)*(25/4)<29`, and `(891/196)/4<57/50`.
These respectively justify the displayed S' `Gamma=ceil(1.4p)`,
E `Gamma=29p`, and E input scale `B=ceil(1.14 alpha^2)` from the
exponents in the [note, lines 170–205](../../notes/fast-gaussian-resampling.tex#L170-L205).
The S' step uses `sqrt(p)+1 < 1.1 sqrt(p)` for `p>100`; the E step uses
`alpha*(2m+2)<=sqrt(p)+4alpha<5sqrt(p)`. Both Gammas satisfy `Gamma<=2P`.

- **S' precision.** `L_A=3 alpha ceil(sqrt(p))+3 < 4p` for `p>=101`.
For each `p=101,102,103,104`, `4p<=2^(floor(p/4)-1)`. Increasing p by
four doubles the right side and adds only 16 to the left, proving the
same inequality in all four residue classes. Thus
`ceil(log2 L_A)<=p/4`, and the block requirement is at most
`p+(7p/5+1)+p/4+11=(53/20)p+12<3p`.

- **E precision.** `m=ceil(sqrt(p)/(2alpha))<=sqrt(p)/4+1` implies
`L_A=3m+1<=3sqrt(p)/4+4<=p`.
Hence `ceil(log2 L_A)<=p-1`. Because B is an integer,
`ceil(log2(F L_A))=B+ceil(log2 L_A)` for `F=2^B`.
Using `B<=1.14p+1` gives the source's bound
`p+29p+(1.14p+1)+(p-1)+11=32.14p+11<34p`.
The weaker printed bound `F<=2^(1.15p)` alone would instead give
`32.15p+10`; that also suffices, but is not the derivation of `32.14p+11`.
See the [note, lines 197–213](../../notes/fast-gaussian-resampling.tex#L197-L213).

- **PR #371's corrected final extraction.** Conditional on its internal
enclosure `h/4`, the exact normalization by `2alpha>=4` leaves at most
`h/16`, and precision-`3p` rational division adds less than
`sqrt(2)*2^(-3p)`. Their sum is below `h/4` for `p>=101`.
Since `sqrt(2)<3/2`, the complete displayed budgets are strictly below
`(1+1/4+3/2)h<3h` for S' and `(3+1/4+3/2)h<5h<(p/3)h` for E.
This corroborates the propagation of the predecessor correction; its
original final-grid counterexample is not a new finding of this audit.

## Independent calculation and limits

A separate Python standard-library calculation, without importing the
production numerical verifier, checked all 168,093 pairs
`101<=p<=4096`, `2<=alpha<=floor(sqrt(p-1))`. Integer square roots located
both windows; integer `bit_length` computed ceiling logarithms; rational
arithmetic checked the three exponential-growth bounds above. It checked
`L_A<4p` or `L_A<=p`, both precision requirements, `B<=1.15p`, and `m<2p`.
All passed. Minimum integer precision slack was 40 bits for S' at
`(p,alpha)=(101,8)`, and 277 bits for E at `(101,10)`. This finite replay is
supporting evidence only; the preceding arguments establish the stated
uniform arithmetic claims.

The calculation is retained in
[`independent_budget_check.py`](independent_budget_check.py), independently
implemented from the main checker. From the repository root run:

```sh
python3 -B research/gaussian-chirp-domain-audit/independent_budget_check.py
```

Expected first line:

```text
PASS_INDEPENDENT_GAUSSIAN_BUDGETS pairs=168093 controls=5
```

The following JSON line records the fixed domain, stopping rule and minimum
slacks above. Five negative controls reject `p=100`, `alpha^2=p`, the two
insufficient sufficient-precision choices `P=2p` and `P=31p`, and an E window
one integer too short at `(p,alpha)=(101,2)`. Runtime checks remain active
under `python3 -O`; the independent script imports no repository verifier.

This review has not independently re-established Gaussian tail estimates,
transcendental approximation algorithms, exact packed multiplication,
multitape movement, the full Neumann theorem, or the selected multiplication
frontier. In particular, absence of a domain mismatch does not remove the
genuine final-grid defect that PR #371 addresses.

Credit: eumemic's fast-Gaussian construction; icekylinx's shifted-input error
enclosure; Harvey and van der Hoeven's analytic interfaces; and Artus
Krohn-Grimberghe / PR #371's disclosed GPT-6 Pro and Codex rounding work.
Prepared with substantial OpenAI Codex assistance as a separate source and
arithmetic review in Effy's research sprint. No independent human peer review
or formal proof is claimed.
182 changes: 182 additions & 0 deletions research/gaussian-chirp-domain-audit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# Audit: the generated Gaussian chirp domain closes PR #371's caveat

**Research note and independent mathematical audit; no new kappa.** The
generated Gaussian construction supplies `alpha^-2 <= theta <= 1/4` to
`lem:chirped-gaussian`. Its integer windows and stated working precisions
`P=3p` and `P=34p` satisfy the audited arithmetic obligations throughout
that domain. The broader header left in `upstream/` is not the header used
by this construction.

This resolves the specific domain caveat in the body of
[PR #371](https://github.com/CrocSwap/integer-mult-bounds/pull/371) at
`988ef67986c313445936fc7103908b6163b9d47e`. That PR's separate final-grid
rounding defect remains genuine and its correction is **not** incorporated
by this audit. Passing this package does not certify the containing lemma,
the selected construction or the full multiplication theorem.

## Exact source and statement

Base commit: `66849e1475c930fd7732b1a0067ffee7e1e95f60`.
Assignment seed: **64**, adversarial mathematical audit.
The accepted certificate at this base is #626 with #543,
`kappa=51110230636731/31250000000000000`; it is unchanged.

The audited statement is the use of the no-sort domain by
`lem:chirped-gaussian`, specifically its block windows, amplification
ceilings and sufficient precision inequality

```text
P >= p + Gamma + ceil(log2(F L_A)) + 11.
```

The [source pins](SOURCES.json) identify the exact direct inputs, generated
manuscript digests and PR #371's source hashes. The base commit pins the
transitive generator dependencies. The source check executes the actual
`patched_files()` composition in memory; it writes nothing to `upstream/`
or existing certificates. It checks these links:

1. [`make_fast_gaussian_patch.resampling`](../../scripts/make_fast_gaussian_patch.py#L23-L33)
replaces the original hypothesis `theta > p/alpha^4` by
`alpha^-2 <= theta <= 1/4`.
2. The same function [inserts the note](../../scripts/make_fast_gaussian_patch.py#L157-L161)
verbatim. The chirp lemma inherits that new header, including integer
`p>=101`, integer `2<=alpha<sqrt(p)`, and `sigma=1+theta`.
3. The [assembly replacement](../../scripts/make_fast_gaussian_patch.py#L251-L263)
establishes the upper and lower theta bounds eventually. This audit
does not re-prove its prime-existence or asymptotic setup arguments.

The generator and unmodified upstream resampling file at PR #371's exact
head are byte-identical to these files at the audit base. Thus the domain
finding applies there too, rather than merely to a later repair. No pending
PR is treated as an accepted stronger multiplication bound.

## Concrete control: what the old header alone would permit

Take `p=101`, `alpha=2`, `s=2`, `t=19`. These satisfy the old upstream
header, including coprimality and `theta=17/2 > p/alpha^4=101/16`.
For the **new chirp E algorithm**, however,

```text
m = ceil(sqrt(101)/(2*2)) = 3,
L_B = 2m+2 = 8,
q_0 = 0,
q_1 = floor(19/2 + 1/2) = 10.
```

The first block contains outputs `ell=0,1`, but evaluates only local
correlation coordinates `0,...,7`. It misses `q_1=10`. The actual generated
header rejects this tuple because `theta>1/4`.

This is a counterexample to applying the *new window recipe under only the
old hypotheses*. It is not a counterexample to the original slower
no-sort theorem, nor to the generated construction's restricted claim.
It shows why source composition is mathematically significant.

## Uniform arithmetic argument

The [separate review](INDEPENDENT-REVIEW.md) gives the window-containment
proofs and the uniform precision argument. A rational common enclosure is

```text
pi/ln(2) < (22/7)/(56/81) = 891/196.
```

For completeness, `ln(2)>56/81` follows from the first two positive terms
of `ln(2)=2*sum_(k>=0) (1/3)^(2k+1)/(2k+1)`.
Also `22/7-pi = integral_0^1 x^4(1-x)^4/(1+x^2) dx > 0`: polynomial
division gives the integrand
`x^6-4x^5+5x^4-4x^2+4-4/(1+x^2)`.
These elementary analytic identities explain the enclosure; the finite
checker evaluates only its exact rational consequences.

With `theta<=1/4`, `alpha^2<p` and `p>100`, those consequences are

| Obligation | Exact sufficient bound |
|---|---|
| Forward amplification | `(891/196)*(121/400) < 7/5`, so `Gamma=ceil(7p/5)` suffices |
| Correction amplification | `(891/196)*(25/4) < 29`, so `Gamma=29p` suffices |
| Correction input scale | `(891/196)/4 < 57/50`, so `B=ceil(57 alpha^2/50)` suffices |
| Forward precision | `(53/20)p+12 < 3p` for every `p>=101` |
| Correction precision | `(1607/50)p+11 < 34p` for every `p>=101` |

The precision rows use `L_A<4p` for S', `L_A<=p` for E, and exact integer
ceiling-log bounds. For E, use the sharper `B<=1.14p+1` when deriving the
printed `32.14p+11` bound, rather than only `F<=2^(1.15p)`.

## Reproduce

From the repository root, using Python and its standard library (tested
with Python 3.14.7):

```sh
python3 -B research/gaussian-chirp-domain-audit/verify.py
```

Expected output:

```text
PASS_SCOPED_GAUSSIAN_CHIRP_DOMAIN_AUDIT
Exact parameter pairs: 21773
Exact correction windows: 968049
All 7 negative controls rejected; receipt matches
```

The deterministic [receipt](RECEIPT.json) records exact coverage, generated
source digests, minimum precision slacks and control outcomes. The command
recomputes its contents and rejects any mismatch. `--write` is available
only for deliberate regeneration after reviewing a change.

This is exhaustive finite validation within the following domains, not a
search for a stronger construction:

- Every `101<=p<=1088` and integer `2<=alpha<sqrt(p)`: 21,773 pairs.
The worst theta-dependent amplification envelope is checked at `theta=1/4`.
- Every coprime `2<=s<=128`, `s<t<=5s/4`, and `1<=m<=9`; every starting
residue and every output offset. Correction residues include negative
periodic representatives; all forward residues are also checked. These
are generic integer-window cases, independent of the parameter-pair
loop; actual S' block sizes in that loop exceed 9. The written window
proof covers arbitrary positive integer `m`.
- Seed 64 selected the task, sets the finite cutoffs, and rotates the
correction residue order. The stopping rule is completion of those
enumerations. The written arguments, not enumeration, address all sizes.

Seven controls remove each source-domain bound, remove its assembly
justification, underfund each stated precision budget, use the old-header
counterexample above, and shorten an in-domain E output window. The two
precision controls reject violations of the *sufficient certified budget*;
they do not prove that those smaller precisions necessarily fail numerically.

The separate review also preserves a second implementation with a different
formula for the exact correction-window ceiling. Run
`python3 -B research/gaussian-chirp-domain-audit/independent_budget_check.py`;
it prints `PASS_INDEPENDENT_GAUSSIAN_BUDGETS pairs=168093 controls=5` and
a JSON summary. Its wider arithmetic domain is `101<=p<=4096`; it does not
repeat the source composition or residue-window enumeration.

## Scope, attribution and handoff

The new evidence is a source-bound resolution of the domain concern, a
concrete window counterexample to the wrong source composition, written
uniform arithmetic arguments, and independent exact finite implementations.
This does not reopen a closed search or assert a new exponent.

Inherited obligations include the one-block internal error enclosure,
Gaussian tail bounds, transcendental approximation routines, packed
integer multiplication, periodic tape movement, Neumann evaluation, and
the selected suppliers' all-size and analytic interfaces. The tests
neither implement the Gaussian maps nor establish those obligations.
PR #371 remains unreviewed in the base ledger; this submission is scoped
evidence for its review, not a request to mark the entire PR verified.

Contributor: **Effy Elden (ineffyble)**, with substantial OpenAI Codex
assistance, including a separate AI source/arithmetic reviewer. No human
peer review or formal verification is claimed. Credit eumemic's PR #5
construction, icekylinx's shifted error enclosure, Artus Krohn-Grimberghe
and PR #371's disclosed GPT-6 Pro/Codex final-grid work, and David Harvey
and Joris van der Hoeven's analytic algorithms. The new package is under
the repository's Apache-2.0 license; predecessor notices remain intact.

The [sprint claim](CLAIM.md) records candidate selection, overlap checks,
timing and the final handoff. No existing source, selected certificate or
review-ledger disposition is changed by this contribution.
Loading