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
228 changes: 228 additions & 0 deletions research/staged-fourth-dual-binomial-audit/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
# Independent certificate for the fixed PR4091 pooled dual

This is a scoped verification of Ross Richardson's PR4091 theorem, not a new
packing theorem or construction. Its source is
`a29bdd8f56cd18b805917775cdec09ff935eddc4`; the package is unchanged at the
scientific base `32890bc5de034ab8fc93ac88ead7279a6a416d04`. Its frozen PR4088
inputs come from Cinna Davis's `76088d49e3ed4142a958659aa996b0ca4da5e88e`.
The eight input files and their exact bytes are listed in `SOURCES.json`.

## 1. Declared model and source boundary

Write `H_r(a)=r^(1-a)`, with `H_0=0`. There are 3,240 calls and a real variable
`0 <= x <= 3240` for FOUR calls. The reported local invoices are

```
L3 = 2487 H1 + 713 H2 + 224 H3 + 102 H4 + 20 H5 + 8 H8,
d = L4-L3 = 2 H1 + 3 H3 - 3 H4.
```

This audit **inherits those local reports**. It does not recompute the scalar
word's paid transitions or operator correctness. It separately enumerates
the complete binary spans of the entry and exit frames of all 408 helpers in
both orientations. Entry is contained in exit, and only helper 601 changes,
from residual width 8 to 7. This gives the item inventory

```
(N5,N6,N7,N8,N9) = (90720,58320,181440+x,301320-x,690120).
```

The template has 112 ports, each with six capacity-8 and four each of
capacity-16/32/48 children. The current order is exactly nine stages times
360 replicas, so the available bins are

```
(B8,B16,B32,B48) = (241920,161280,161280,161280).
```

The historical template's `replicas:37` fields are not multipliers. The stock
coefficient `(896*360)H73` is a declared comparison premise of PR4091's proof,
not inferred from the historical template's physical-field count.

A pattern consists of a capacity `c`, five nonnegative integral helper counts
`n_w`, and a residual `r=c-sum(w*n_w)>=0`. Each bin pays exactly `H_r`.
The relaxed objective is

```
3240 L3 + x d + sum_pattern y_pattern H_residual,
```

where `y>=0` obeys all four bin balances and all five item balances. This
retains every empty bin and allows real multiplicities. Chronology, identities,
physical-family exclusions and offsets are omitted. A legal source fill maps
to this relaxation only under the declared whole-helper/residual accounting
contract. This audit supplies no new physical justification of that contract.

## 2. Complete patterns by two finite methods

The checker enumerates the Cartesian product
`0 <= n_w <= floor(c/w)` and keeps precisely the capacity-feasible tuples.
Independently, let `A(s)` be the coefficient of `z^s` in

```
product_(w=5..9) 1/(1-z^w).
```

The ordinary unbounded-coin recurrence computes these coefficients through
degree 48. For each capacity and every residual, the first enumeration must
have exactly `A(c-r)` distinct patterns. It also verifies nonnegative integral
counts and the exact capacity equation for every tuple. Thus there are
5, 21, 158 and 657 patterns respectively, 841 in total. Missing empty or
nonempty patterns, duplicates at unchanged total count, and wrong residuals
are rejected. The complete ordered census is hashed in `RESULT.json`.

## 3. A different exact power enclosure

The numerical part imports no predecessor Python and uses no logarithms,
exponentials, Decimal powers, floating-point decisions or optimizer. For an
integer `r>=1`, put `z=1-1/r`. If `0<a<1`, the binomial series gives

```
(H_r(a)-r)/a = -r sum_(k>=1) t_k(a),
t_1(a)=z,
t_(k+1)(a)=t_k(a) * (k-a) * z/(k+1).
```

Equivalently,
`t_k(a)=z^k/k * product_(j=1..k-1)(1-a/j)`. Every term is nonnegative and
nonincreasing in `a`. The convergent sum therefore shows that the normalized
power `g_r(a)=(H_r(a)-r)/a` is nondecreasing in `a` (including `r=1`, where
it is zero). This is enough for an interval result, not merely a grid test.

After `N` included terms, consecutive omitted terms have ratio at most `z`.
Their sum is at most `t_(N+1)/(1-z)=r*t_(N+1)`. At scale `S=10^40`, the
implementation starts with floor/ceiling bounds for `S*z`, rounds each positive
rational recurrence outward using integer division, and sums those bounds.
If `L_k <= S*t_k <= U_k`, positivity of the multiplier preserves this relation.
Consequently its final bounds are

```
-r * (sum_(k=1..N) U_k + r*U_(N+1))/S
<= g_r(a) <=
-r * sum_(k=1..N) L_k/S.
```

It uses `N=2048`. The tail is included even if it is much larger than rounding
error. Independent exact rational-power fixtures and short Fraction sums check
the arithmetic, direction of rounding and first-omitted-term index. A one-term
enclosure is deliberately too wide for the dual and must fail closed.

Every nonzero dual slack below has zero rank mass: `sum c_r*r=0`. Hence

```
(sum c_r H_r(a))/a = sum c_r g_r(a).
```

For each positive coefficient, use the lower `g_r` bound at `a0=173/100000`
and the upper bound at `a1=174/100000`; reverse them for negative coefficients.
This encloses the expression **for all real a in [a0,a1]**. The checker refuses
to cancel the linear part when the rank mass is nonzero.

## 4. Recovering the duals and their faces

There are nine dual variables: four capacity prices `u_c` and five item prices
`v_w`. The desired inequalities are

```
u_c + sum n_w v_w <= H_(c-sum w*n_w).
```

The source certificate's eight central primal patterns are declarative data,
not executable evidence. We solve their eight tightness equations symbolically
over rational coefficients of `H_r`. The ninth equation is one of:

- middle: `v8-v7=d` (free-mixture stationarity);
- left: tightness of capacity-32 pattern `7+8+8+9`;
- right: tightness of capacity-48 pattern `6+6+9+9+9+9`.

Each exact linear system is nonsingular, and its solution must equal the
published potential expressions. Every recovered dual is then evaluated on
all 841 patterns. Zero expressions are recognized algebraically; all others
have strictly positive interval lower bounds. The following displayed bounds
are conservative rational truncations of `RESULT.json`:

| Dual | Identically tight | Strict | Lower bound on every nonzero slack/a |
|---|---:|---:|---:|
| Left | 11 | 830 | > 4.38806 |
| Middle | 8 | 833 | > 0.69698 |
| Right | 9 | 832 | > 2.37161 |

The left face has eleven tight patterns, even though the chosen affine witness
uses nine. No uniqueness claim about every left-face allocation is needed.
The middle face has exactly the eight source patterns.

## 5. Primal balance, uniqueness and the whole interval of mixtures

For the middle support, solve all nine balance equations with its eight
multiplicities and `x` as unknowns. The determinant is exactly `-10` and the
unique solution is

```
x=1080,
y=(241920,161280,1620,10620,58320,90720,138492,22788)
```

in the source table's order. Each multiplicity is positive. Its idle invoice
is `22788 H3+1620 H5+138492 H48`. All other patterns have strict dual slack,
so any global optimum must use this support. The exact balance system then
forces the displayed multiplicities and mixture. This proves uniqueness in
the relaxed pattern program for every exponent in the certified interval.

For each side, add its ninth tight pattern and solve the nine balances with
right-hand side affine in `x`. The result gives every multiplicity as
`b_j+d_j*x`; no sampled interpolation is used to infer this form. Exact
nonnegativity at each segment's endpoints proves it throughout that segment.
All patterns in the affine witnesses are symbolically complementary to the
corresponding dual. Thus both witnesses attain the dual bound for every real
`x` in `[0,1080]` or `[1080,3240]` respectively.

The complete objective slopes are independently recovered as

```
s_left = d-H3/20-H5/4+H48/20,
s_right = d+(H5-H3)/2.
```

The binomial certificate encloses `s_left/a` in
`[-0.348858,-0.348494]` and `s_right/a` in `[4.365719,4.365912]`.
The complete bill therefore strictly decreases to 1080 and strictly increases
after 1080. These facts concern the complete invoice, not scalar ADD counts.

At `x=1090`, the derived right-face witness has idle
`22783 H3+1625 H5+138492 H48` and exactly five capacity-48 bins containing
`6+6+9+9+9+9`. This verifies the pooled feasibility question raised by PR5280.
The eight central patterns alone cannot serve `x=1090`: the central balance
system forces `x=1080`. The original central idle multiset itself also has ten
too few residual rank units at `x=1090`. Thus PR4170's request for that same
idle multiset at 1090 must change the mixture or the invoice; it is not an
unresolved chronological rearrangement. All these formulas already follow
from PR4091. Their derivation and audit, not their discovery, are claimed here.

## 6. Root implication and limits

The derived complete profile is

```
8060040 H1 + 2310120 H2 + 751788 H3 + 327240 H4
+ 66420 H5 + 25920 H8 + 138492 H48.
```

The checker evaluates only the coarse endpoints `a0,a1`, obtaining negative
and positive signed moments respectively against `(896*360)H73`.
Every paid rank is positive and below 73. After division by `H73`, every term
is strictly increasing in `a`, so this profile has exactly one root in the
certified interval. At that root the middle dual bounds every feasible
complete profile below by the same stock bill. Each such normalized profile
is also strictly increasing, so none has a larger root, including outside
the interval where these dual formulas were certified.

This independently checks the pooled optimality implication. The published
24-place root bracket is not recomputed, refined or used as an acceptance
input. No κ improvement, chronological construction, native/operator replay,
stock implementation, compiler, precision/tape, BIT/outer admission or
all-size multiplication theorem is claimed. The current selected result is
a changed mechanism and is not subject to this historical fixed-model cap.

Prepared for commdata2338 (@commdata2338), with substantial OpenAI Codex assistance.
Ross Richardson, Cinna Davis and the predecessor lineage credited in README.md
retain their construction and theorem credit. Apache-2.0.
143 changes: 143 additions & 0 deletions research/staged-fourth-dual-binomial-audit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Independent binomial-series audit of the PR4091 pooled dual

**No discrepancy found in the scoped pooled proof. No new κ.** A separate
standard-library implementation verifies all three duals of
[Ross Richardson's PR4091](https://github.com/CrocSwap/integer-mult-bounds/pull/4091)
on every whole-helper bin pattern, uniformly for
`0.00173 <= a <= 0.00174`. It reconstructs the affine primal witnesses for
every real mixture `0 <= x <= 3240` and the unique global optimum `x=1080`.

This closes a specific independent-verification obligation on the revision-7
`independent-moment` card. It does not recompute more digits of a root or
search for another packing. The mathematical optimum and its witnesses remain
PR4091's contribution.

| Checked object | Result |
|---|---|
| Complete pattern census, independently counted by a generating-function recurrence | 5 / 21 / 158 / 657 at capacities 8 / 16 / 32 / 48; 841 total |
| Left / middle / right dual faces | 11 / 8 / 9 identically tight patterns; all others strictly positive throughout the interval |
| Nonzero slack divided by `a`, conservative lower bounds | > 4.38806 / 0.69698 / 2.37161 |
| Central balance matrix | determinant −10; unique `x=1080` and all eight multiplicities recovered |
| Complete objective slope divided by `a` | left in [−0.348858,−0.348494]; right in [4.365719,4.365912] |
| `x=1090` consequence | right-face optimum has five `48:(6,6,9,9,9,9)` bins and idle `{3:22783,5:1625,48:138492}` |

The last row answers the pooled-feasibility question in
[PR5280](https://github.com/CrocSwap/integer-mult-bounds/pull/5280).
The central eight-pattern support alone forces 1080 calls. The central idle
multiset also has ten too few residual rank units for 1090. Thus
[PR4170](https://github.com/CrocSwap/integer-mult-bounds/pull/4170)'s open
question about reaching that same multiset **at 1090** requires changing the
mixture or invoice. These are independently checked consequences of PR4091's
existing formulas, not newly discovered constructions.

## Independence and evidence

The checker imports no predecessor Python. It recovers dual prices from exact
linear equations instead of executing the published formulas. It enumerates
patterns by a Cartesian product and checks every residual count against a
separate coin-generating-function recurrence. Its power enclosures use the
positive binomial series for `(r^(1-a)-r)/a`, integer outward rounding and an
explicit geometric tail. They use no logarithm/exponential engine, floating
acceptance, optimizer or external numerical library.

[PROOF.md](PROOF.md) proves the interval enclosure, weak-duality implication,
unique central optimum and global root-ceiling implication. [RESULT.json](RESULT.json)
records exact rational evidence, the census hash, affine solutions and input
hashes. Only the coarse endpoints `.00173` and `.00174` are evaluated to put
the root inside the dual-certified interval. The published 24-place root
bracket is not freshly verified or refined.

Twenty-one arithmetic/control tests include exact rational-root fixtures, a
Fraction partial-sum oracle, omitted-tail discrimination, missing/duplicate
patterns, a zero-mass perturbation that violates dual feasibility, inadequate
precision, wrong mixture/width/replica factor, an unpaid local charge and
corrupt source bytes. Explicit checks remain active under Python `-O`.

This is an independently implemented audit, author-checked in this package.
There was no separate human, external-agent or formal-kernel review.

## Source and accounting boundaries

Base: `32890bc5de034ab8fc93ac88ead7279a6a416d04`. Audited PR4091:
`a29bdd8f56cd18b805917775cdec09ff935eddc4`; its package is unchanged at the base.
Frozen PR4088: `76088d49e3ed4142a958659aa996b0ca4da5e88e`.

The eight exact input files are pinned in [SOURCES.json](SOURCES.json) and
declared in [VERIFY.json](VERIFY.json). The audit reconstructs helper widths
by explicit binary spans in all four word exports and derives bin counts
from the template and current order. It **inherits the local paid-profile
reports and comparison stock coefficient**. It does not rescan every paid
frame transition or establish native/operator correctness.

The complete bill includes `3240 L3 + x(L4-L3)` and every residual child,
including empty bins, against `(896*360)H73`. Words, whole-helper widths,
capacities, stock and this accounting boundary are fixed. Changing them
requires a new model. The selected PR5413 mechanism is outside this historical
ceiling's scope.

Not checked: chronological/family/offset feasibility, native and dirty-state
identities, source local-profile correctness, actual stock provision, compiler,
all-size, precision/tape, BIT or outer admission. No supplier promotion or
complete multiplication theorem follows from this audit. PR4181's reported
chronological attainment is credited but not replayed here.

## Reproduce

From the repository root, Python 3.12 and its standard library:

```sh
python3 -B scripts/research_package.py --package research/staged-fourth-dual-binomial-audit --check-only
python3 -B scripts/research_package.py --package research/staged-fourth-dual-binomial-audit
```

The registered commands run the checker and all 21 tests in normal and
optimized modes. A direct checker run takes about one second on the measured
Linux/Python 3.12 environment; timing is host-dependent. Expected checker line:

```text
PASS_STAGED_FOURTH_DUAL_BINOMIAL_AUDIT patterns=841 duals=3 tight=11/8/9 unique_x=1080
```

The direct scripts also work from an official export containing the declared
inputs, without Git or network access:

```sh
python3 -I -W error -B research/staged-fourth-dual-binomial-audit/verify.py
python3 -I -W error -B research/staged-fourth-dual-binomial-audit/test_verify.py
```

Add `-O` to check optimized execution. Normal replay compares the complete
canonical JSON result and never rewrites it. Regeneration is explicit:
`verify.py --output PATH`.

## Open next questions

No further fixed-inventory packing search is justified by this audit:
[PR4181](https://github.com/CrocSwap/integer-mult-bounds/pull/4181) already reports
attaining PR4091's cap. A consequential follow-up must name a changed word,
inventory or consumer boundary and derive its complete signed invoice before
reusing a ceiling. The first step is to identify which of the model's item,
capacity, residual or stock equations changes; absent such a source-bound
change, this audit supplies no reason to expand the search. Physical admission
and independent source-transition coverage remain separate obligations, not
closed by these LP checks.

## Credit

Prepared for commdata2338 (@commdata2338), with substantial OpenAI Codex assistance.

Ross Richardson and the credited PR4091 specialists supplied the pooled
theorem, all three duals and the affine witnesses. Cinna Davis/PR4088 supplied
the fixed words and fill. Nick Petalas/PR4170 and unpaidmoon/PR5280 supplied
the source-transfer checks and follow-up questions; their checks explicitly
exclude the pooled dual proof. Rohan Arun/PR4181 supplied the chronological
attainment. Retain Rohan Arun/PR4076; David Ganz (Dugongue)/PR3945 and
zxv/PR4085 with their lineage; dataisfire/PR3734; Erwan Secousses
(ChaloupeMusic)/PR3949/3815; and the original geometry, native, owner, compiler and transfer
contributors credited in PR4091's notices. This account's PR3237 concerned a
different PR2979 final-fill model and is not repeated here.

The new work is the binomial enclosure implementation, independently solved
dual/primal certificate, finite audit and controls. Substantial OpenAI Codex
(GPT-6 Astra) assistance was used for derivation, implementation, checking and
writing. No independent human review is claimed. Apache-2.0.
Loading