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
146 changes: 146 additions & 0 deletions research/complex-stopped-recursion-cost/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# The stopped complex recursion bill of #4100 COMPLEX.md

JoyboyBrian, with substantial assistance from Anthropic Claude (Claude Code).
Apache-2.0. This is an author-submitted scoped proof, not an accepted theorem.

## Object and caller

Cinna Davis's #4100 `research/unconditional-batched-crt/COMPLEX.md` (retained
head `337d04939571a637aeab54a0f58f54fde811663a`, pinned here at canonical main
`cef4b52f2a59009865bf8eabde1be3f159063703`), section "Time", states:

> Stop at width max(73,h^eta). At each internal node, all adapters, monomials,
> packet scans and parking cost O(V e^(1-a2) polylog(p)) [...] Hence the
> complete layer costs O(V h^(1-q) polylog(p)).

Its constants are the PR4088 mixed histogram
`H = {1:8060060, 2:2310120, 3:751813, 4:327210, 5:66425, 8:25920, 48:138492}`,
`W = 322560`, `b = .001730979115670792472760579929302792893760378764`,
`q = b - 10^-28`, `a_eff = (b+q)/2`, `tau = 1 - a_eff`, `eta = 10^-32`, and
`a2 = .001733394791695384296` from PROOF.md. Write

mu_x = sum_r (H_r / W) (r/73)^x.

The callers are PROOF.md's synthetic-transform layers (`h` = active axis bits at
one FFT level, `1 <= h <= d-1`, at most `ell` levels per transform) and
GAUSSIAN.md's compiled layers (`h = O(p^beta)` or `O(p^epsilon)`).

## Premises kept explicit

These are COMPLEX.md's own premises. This package does not verify them.
`Lambda = Lambda(p) >= 1` is the polylog factor, uniform in `e`, `v` and `h`;
`c_N`, `c_L`, `c_P` are fixed constants. Fix the root width `h >= 1` and the
stop width `s = max(73, h^eta)`; every descendant uses the root's `s`.

- **(N) internal node.** A call of width `e > s` on volume `v` puts
`f = floor(e/73)` and performs only: (i) its own adapters, monomials, packet
scans and parking, at cost at most `c_N Lambda v e^(1-a2)`; (ii) the
`e - 73f <= 72` remainder bits by elementary passes, at most `c_L v` each;
(iii) for each rank `r`, children of width `r f` whose total volume is
`(H_r/W) v`. This is COMPLEX.md's one-child reading of a rank-`r` transition;
#4375 shows that the factorwise reading (`f` scalar copies) breaks the moment.
- **(L) leaf.** A call with `e <= s` costs at most `c_L v e`.
- **(P) root placement.** Placement and inverse cost at most
`c_P Lambda V (h^(1-a2) + 1)`.
- **(A) additivity.** Costs of the listed parts add, and every child obeys
(N), (L) with the same constants.

## Exact and certified facts

1. `a_eff < a2`, `q < a_eff`, `q > 0` and `eta*b < b - q` hold exactly over the
rationals. Hence `1-a2 < tau < 1-q` and `1 - b + eta*b < 1 - q`.
2. `a_eff < 1/200` and `74^199 >= 72^200`, so `e^tau >= 74^(199/200) >= 72`
for every integer `e >= 74`.
3. Certified outward-rounded rational enclosures give
`1 - mu_(1-b) = 1.804257...e-48 > 0` and
`1 - mu_tau = 1.417734591407...e-28 > 0`, so
`1/(1 - mu_tau)` lies in `(7.0535e27, 7.0536e27)`.

`verify.py` checks all three with the standard library.

## Lemma (all root widths)

Under (N), (L), (A), every call of width `e >= 1` on volume `v` costs at most

v [ K1 e^tau + c_L s^b e^(1-b) ], K1 = (c_N Lambda + c_L) / (1 - mu_tau).

*Proof.* Strong induction on `e`. The recursion is well founded: an internal
width satisfies `e >= 74`, so `f >= 1`, and every child width satisfies
`1 <= r f <= 48 e / 73 < e`.

*Leaf* (`e <= s`): `c_L v e = c_L v e^(1-b) e^b <= c_L v s^b e^(1-b)`.

*Internal* (`e > s >= 73`): parts (i) and (ii) cost at most
`c_N Lambda v e^(1-a2) + 72 c_L v`. Since `e >= 1` and `1-a2 < tau`,
`e^(1-a2) <= e^tau`; by fact 2, `72 <= e^tau`. So (i)+(ii) cost at most
`(c_N Lambda + c_L) v e^tau`. For (iii), `73 f <= e` and the exponents are
positive, so `(r f)^x <= (r/73)^x e^x` for `x = tau, 1-b`. The induction
hypothesis, applied to each child and summed by (A), bounds (iii) by

v [ K1 mu_tau e^tau + c_L s^b mu_(1-b) e^(1-b) ]
<= v [ K1 mu_tau e^tau + c_L s^b e^(1-b) ],

using `mu_(1-b) <= 1` (fact 3). Adding, the coefficient of `v e^tau` is
`c_N Lambda + c_L + K1 mu_tau = K1`. This closes the induction. QED.

No monotonicity of the cost in `e` is used, and floors enter only through
`73 floor(e/73) <= e`.

## Theorem (COMPLEX.md's layer bill)

Under (N), (L), (P), (A), for every `h >= 1` the complete layer of volume `V`
costs at most

V Lambda h^(1-q) [ (c_N + c_L)/(1 - mu_tau) + 73^b c_L + 2 c_P ].

*Proof.* Apply the lemma at `e = h`, `v = V`, and add (P). Since `h >= 1`,
`s^b = max(73^b, h^(eta b)) <= 73^b h^(eta b)`. The four exponents `tau`,
`1-b+eta*b`, `1-a2` and `0` are all at most `1-q` (fact 1), so each power of
`h` is at most `h^(1-q)`. Finally use `Lambda >= 1`. QED.

The constant is independent of `h`, `p` and the coefficient values. It is
effective but large, since `1/(1-mu_tau) > 7.05e27`.

## Binding to the callers

- **PROOF.md synthetic transforms.** One FFT level is one layer with
`1 <= h <= d-1`; there are at most `ell` levels. Since `h^(1-q)` increases
with `h`, levels with fewer active axes are covered. One transform costs at
most `ell V Lambda K d^(1-q)`, which is PROOF.md's
`O(V ell d^(1-q) polylog(p))`.
- **GAUSSIAN.md compiled layers.** `h = O(p^beta)` or `O(p^epsilon)` gives
`O(V h^(1-q) polylog(p))` with the same constant.

## What the argument does and does not use

- `mu_(1-b) <= 1` suffices for the leaf term. Strictness is not needed. Its
certified margin is only `1.8e-48`, and one extra rank-48 child per `W`
makes `mu_(1-b) > 1` (control).
- The stop width enters only through `s >= 73`. The lemma holds for every
fixed `s >= 73`. The `h^eta` stop costs the factor `h^(eta b)` and is not
needed for this bill. It may serve other premises, such as control
payloads; this package does not decide that.
- The floor is necessary. With `r ceil(e/73)` instead, a width-74 node has a
rank-48 child of width 96, so the recursion is not well founded and the
comparison `(r f)^x <= (r/73)^x e^x` fails (control).
- **Size of the constant.** The per-level contraction `1 - mu_tau` is only
`1.4e-28`, so the uniform constant exceeds `7e27 (c_N Lambda + c_L)`. On
complete finite trees with unit node costs, the internal `tau`-sum divided
by `h^tau` is at most 8.8 for `h <= 10^12`. It grows roughly like the
depth. The huge constant is therefore a worst-case geometric-series artifact
and not a defect.

## Finite corroboration

`verify.py` evaluates complete recursion trees with unit costs
(`c_N = c_L = Lambda = 1`) at 60-digit Decimal precision. It covers every
`h = 75, 112, ..., 1497`, plus `h` in
`{74, 100, 146, 1000, 5329, 10^4, 389017, 10^6, 10^9, 10^12}`, with stop widths
73, 500 and 5000. It checks three things:

- the frontier sum `sum_leaves (v_l/V) e_l^(1-b)` is at most `h^(1-b)`;
- the internal sum `sum_internal (v/V) e^tau` is at most `h^tau/(1-mu_tau)`;
- the unit-cost total is below the lemma's bound.

This is numerical corroboration. It does not certify anything and does not
replace the proof.
118 changes: 118 additions & 0 deletions research/complex-stopped-recursion-cost/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# COMPLEX.md's stopped complex recursion meets its layer bill

**Scoped proof under COMPLEX.md's own node premises. No new κ.** This does not
accept #4100, and it changes nothing in it or in the selected record.

## Object and caller

The object is Cinna Davis's #4100 [COMPLEX.md](../unconditional-batched-crt/COMPLEX.md),
section "Time", at retained head `337d04939571a637aeab54a0f58f54fde811663a`
(pinned at canonical main `cef4b52f2a59009865bf8eabde1be3f159063703`). It
claims that the stopped complex recursion costs `O(V h^(1-q) polylog(p))`.
The recursion has the PR4088 mixed histogram over `W = 322560`, children of
width `r floor(e/73)`, and stop width `max(73, h^eta)`.

The callers are PROOF.md's synthetic-transform layers (`1 <= h <= d-1`, at
most `ell` levels) and GAUSSIAN.md's compiled layers (`h = O(p^beta)` or
`O(p^epsilon)`). The [#4100 coverage map](../../docs/research/pr4100-audit-coverage-map.md)
lists the stopped-moment proof outside #4178's caller as still open.

## Result

[PROOF.md](PROOF.md) proves the following by strong induction, for every root
width `h >= 1`. It keeps COMPLEX.md's premises explicit: (N) node cost, the
remainder bits and the child volumes; (L) leaves; (P) root placement;
(A) additivity. The layer then costs at most

V Lambda h^(1-q) [ (c_N + c_L)/(1 - mu_tau) + 73^b c_L + 2 c_P ].

Here `mu_x = sum_r (H_r/W)(r/73)^x`. The proof handles floors, the
`e mod 73` remainder bits and every stop width `s >= 73` directly. It assumes
no monotonicity in `e`. The certified facts are:

| Fact | Value |
| --- | --- |
| `1 - mu_(1-b)` | `1.804257...e-48 > 0` (only `<= 1` is needed) |
| `1 - mu_tau` | `1.417734591407...e-28 > 0` |
| `1/(1 - mu_tau)` | in `(7.0535e27, 7.0536e27)` |
| exponent order | `1-a2 < tau < 1-q`, `1-b+eta*b < 1-q`, `72 <= 74^tau` (exact) |

**Callers.** For the synthetic transforms this gives PROOF.md's
`O(V ell d^(1-q) polylog(p))`, including levels with fewer active axes. For the
GAUSSIAN.md compiled layers it gives `O(V h^(1-q) polylog(p))`.

**Notes.** None of these changes a downstream bound.

- The leaf term needs only `mu_(1-b) <= 1`.
- The `h^eta` stop is not used by this bill. Any fixed stop `s >= 73` works.
- The floor is necessary. With a ceiling, a width-74 node has a width-96
child.
- The uniform constant exceeds `7e27 (c_N Lambda + c_L)`. On finite trees
with unit costs, the internal `tau`-sum over `h^tau` is only 8.8 at
`h = 10^12`. The constant is a worst-case artifact, not a defect.

## Not covered

- Premise (N)(i): that the node's adapters, monomials, the `Gamma`-fold cover
gathers and parking cost `O(V e^(1-a2) polylog p)`.
- Premise (N)(iii): that the actual packets realize total child volume
`(H_r/W) v` at width `r floor(e/73)`. #4375 shows that the factorwise
reading breaks the moment.
- The free-word lift (#4184), the cover and stock arithmetic (#4424), the
height and precision chain (#4178, #4371, #4415), and all of CRT.md.

## Reproduce

From the repository root, with Python 3.12 (standard library only, about 7 s):

```sh
python3 scripts/research_package.py --package research/complex-stopped-recursion-cost --check-only
python3.12 -B scripts/research_package.py --package research/complex-stopped-recursion-cost
python3.12 -B research/complex-stopped-recursion-cost/verify.py
```

`verify.py` reads the constants from the pinned COMPLEX.md and PROOF.md. It
checks the exact exponent order and the certified outward-rounded enclosures
of `mu_tau` and `mu_(1-b)`. It runs three rejection controls:

- a root above the bracket, `b + 1e-47`, gives `mu > 1`;
- one extra rank-48 child per `W` breaks both moments;
- the ceiling child rule grows width 74 to 96.

It also corroborates numerically, at 60 digits, complete recursion trees for
stop widths 73, 500 and 5000. That check is corroboration, not a certificate.
It imports no code from #4100, #4171 or #4178.

## Open next questions

The structured versions are in [TASK.json](TASK.json).

1. **Node-cost premise.** Do the adapters, the F2 row-addition monomials, the
`Gamma`-fold common-cover packet gathers and parking cost
`O(V e^(1-a2) polylog p)` at the actual node? First step: write a per-node
invoice from COMPLEX.md's "Common cover" section, PR2250 §5–6 and #4424's
row-stock layout.
2. **Child volume premise.** Do the actual child packets realize
`Gamma H_r` rank-`r` calls of volume `V/(W Gamma)` each? First step: bind
PR4088's owner fill and the `W`-family split to per-child packet volumes on
one cover value.

## Task and overlap

- **Card:** `uniform-transfer-audit`, refined to one native/complex-family
implication.
- **Claim:** https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19137702
- **Overlap:** the nearest work is #4178 (height recurrence at the Gaussian
caller), #4171 and #4330 (root and ledger numbers), #4424 (cover and stock
arithmetic), and #4375 (frame-child reading). None writes this cost
induction.

## Credit

The construction and every audited statement are Cinna Davis's (#4100). The
histogram and words are PR4088's. The ledger cross-check is Nick Petalas's
(#4171), the height recurrence is Jose Manuel's (jmbarrancoml, #4178), the cover
audit is Matarener's (#4424), the frame-child separation is unpaidmoon's (#4375),
and the coverage map is Ryanson Jonathan's (pinterbanget, #4311). Prepared by JoyboyBrian with
substantial assistance from Anthropic Claude (Claude Code). New work is
Apache-2.0.
30 changes: 30 additions & 0 deletions research/complex-stopped-recursion-cost/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"schema_version": 1,
"base_commit": "cef4b52f2a59009865bf8eabde1be3f159063703",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "c35482cd9035843b15a634cc8276a7e1e40e8395",
"sha256": "6fe0a099b89aa2aed796a13c3a21dafc63f3388ebf397464e44e0451893b9375"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602",
"sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72"
},
{
"path": "research/unconditional-batched-crt/COMPLEX.md",
"usage": "input",
"git_blob": "c3be56fbfdb4fb29c1ace88cbcdfa7475fb6e343",
"sha256": "853e1295850862752e4f854aa9e8b28f9ca6eaa9306e2af110b7b77526d1b5e1"
},
{
"path": "research/unconditional-batched-crt/PROOF.md",
"usage": "input",
"git_blob": "406eb561cc8d6041ea3fba1a849653b654f2198c",
"sha256": "689fc7b01c5f04f77019ff02d1b79cb4f7020bd98e05b1052020bad295dec060"
}
]
}
80 changes: 80 additions & 0 deletions research/complex-stopped-recursion-cost/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"schema_version": 1,
"task_id": "uniform-transfer-audit",
"priority_revision": 7,
"base_commit": "cef4b52f2a59009865bf8eabde1be3f159063703",
"original_card": {
"id": "uniform-transfer-audit",
"question": "Does one quantified step of the proposed #4100 all-size construction hold at its actual caller?",
"starting_points": [
"docs/research/research-family-status.md",
"certificates/selected-result.json",
"research/unconditional-batched-crt/README.md"
],
"methods": [
"Prove one missing implication with explicit quantified hypotheses.",
"Find an exact counterexample at the claimed interface boundary."
],
"acceptance_gate": "Identify the proposition and what would change downstream; do not equate a finite replay with a universal proof.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read PROOF.md and AUDIT.md in #4100. Select one distinct obligation: CRT total repair, native/free-algebra lifting, precision/conditioning, or complete fixed-tape cost. This is an author-submitted proof, not an accepted unconditional theorem.",
"scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately."
},
"first_experiment": "Check live handoffs; name one proposition, its caller, quantified domain and dependency closure. Independently prove the implication or exhibit a precise gap/counterexample. Prioritize CRT.md total repair or COMPLEX.md free-algebra lift only if unclaimed. Stop at the chosen obligation; do not substitute finite samples or root arithmetic for an all-size proof, or launch the complete package by default.",
"bottleneck_link": "Finite supplier improvements are useful only under the retained transfer obligations.",
"allowed_variations": [
"One CRT repair, native lift, precision/conditioning or tape-cost proposition, with its exact caller."
],
"scope_change_triggers": [
"Replacing a quantified obligation with another finite smoke test.",
"Treating archive intake, an author PASS receipt or a finite composed fixture as discharge of the universal hypotheses."
],
"overlap_terms": [
"uniform transfer",
"all-size",
"precision",
"4100",
"unconditional-batched-crt"
],
"existing_checks": [
{
"scope": "PR #4100: proposed unconditional construction and finite checks, without independent acceptance.",
"evidence": "research/unconditional-batched-crt/README.md",
"remaining": "Independent proof audit of one caller-bound all-size implication; all other premises remain explicit.",
"status": "author-checked",
"source_commit": "337d04939571a637aeab54a0f58f54fde811663a",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
}
]
},
"scope_status": "refined",
"actual_scope": "Prove, for every root width h>=1, that COMPLEX.md's stopped complex recursion (children r*floor(e/73) with the PR4088 mixed histogram over W=322560, stop width max(73,h^eta), node cost O(V e^(1-a2) polylog p), elementary remainders and leaves, root placement) costs at most V Lambda h^(1-q) [(c_N+c_L)/(1-mu_tau)+73^b c_L+2c_P], with certified mu_tau<1 and mu_(1-b)<=1, and bind it to PROOF.md's synthetic-transform layers and GAUSSIAN.md's compiled layers. The node-cost, child-volume and leaf premises stay explicit.",
"scope_change_reason": "The card asks for one quantified #4100 implication at its actual caller. This package takes the native/complex-family obligation that docs/research/pr4100-audit-coverage-map.md lists as open after #4178: COMPLEX.md's stopped-recursion time bill, at the PR4088 mixed histogram and the PROOF.md and GAUSSIAN.md layer callers. It avoids CRT.md and the precision chain (#4371, #4415, #4178).",
"bottleneck_link": "Side result for the #4100 audit: it closes one transfer implication, the stopped complex moment, under COMPLEX.md's own node premises. It does not change any kappa or the selected frontier.",
"budget_minutes": 150,
"stop_rule": "Stop after the all-size lemma and theorem, the certified moment enclosures, three rejection controls and bounded tree corroboration. Do not audit the node-cost premise, the free-word lift, CRT.md or the precision chain.",
"outcome": "completed",
"evidence": "PROOF.md: written strong induction over all widths, with floors, remainders and an arbitrary stop width s>=73. verify.py: exact exponent order, certified rational enclosures of mu_tau and mu_(1-b), rejection controls, and 60-digit numerical tree corroboration. The tree check is corroboration, not a certificate.",
"author": "JoyboyBrian",
"ai_assistance": "Substantial assistance from Anthropic Claude (Claude Code, Opus 5.5)",
"open_questions": [
{
"question": "Is COMPLEX.md's node-cost premise true at the actual node: adapters, F2 row-addition monomials through the compact primitive, the Gamma-fold common-cover packet gathers and parking all cost O(V e^(1-a2) polylog p), uniformly in e?",
"why_it_matters": "The theorem here is conditional on it. Whether the per-cover-value gathers scan only the cover's own rows or the whole node volume changes only a constant, but a per-node term not bounded by V e^(1-a2) polylog p would break the bill.",
"first_step": "Write a per-node invoice from COMPLEX.md's 'Common cover, fresh rows and fixed tapes' section and PR2250 sections 5-6, with the row-field layout of #4424.",
"blocked_by": "A literal node-level tape layout for the Gamma cover field is not written in #4100."
},
{
"question": "Do the actual child packets realize the moment's volume normalization: Gamma*H_r rank-r child calls of volume V/(W Gamma) each, at width r*floor(e/73)?",
"why_it_matters": "mu_x uses H_r/W as the total child volume per unit parent volume. #4375 shows that the factorwise reading breaks the moment, so this premise carries the whole stopped bill.",
"first_step": "Bind PR4088's owner fill (3240*408 roles) and the W-family split to per-child packet volumes on one cover value.",
"blocked_by": "No external blocker."
}
]
}
Loading