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
15 changes: 15 additions & 0 deletions research/cubic-r24-general-frame/CERTIFICATE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"arity": 24,
"forms": [[11, 19], [1, 9], [1, 25]],
"defect_weights": ["-23/1024", "1679/64", "3749/1024"],
"repair": [
["shear", "a", "1"],
["query", "a", "-3749/1024"],
["shear", "b", "-11/256"],
["query", "b", "-376832"],
["shear", "b", "11/256"],
["shear", "a", "-16"],
["query", "a", "-1679/64"],
["shear", "a", "-9"]
]
}
170 changes: 170 additions & 0 deletions research/cubic-r24-general-frame/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Optimal three-query dyadic repair at arity 24

Prepared by apoursh with substantial OpenAI Codex assistance. Apache-2.0.
The fixed reader and rational two-query comparison are due to Nick Petalas
(PR6200); the general-frame dyadic contract is apoursh's PR6212. This answers
the r=24 case of Nick Petalas's PR6653, Open next question 1.

## Contract

Work in R=Z[1/2], with arbitrary distinct incoming streams (Y,A,B) in the
exact-arithmetic contract of PR6212. Retain all 24 children, in order:

```
y += a^3
a += b
```

The eager comparator undoes the source shift after each child and ends at
(Y+24A^3,A,B). The deferred endpoint is
(Y+sum_{i=0}^{23}(A+iB)^3,A+24B,B). Only appended, input-independent dyadic
linear source changes and signed weighted cube queries are allowed. There
is no output feedback, intermediate observation, child-interior access,
nonlinear source change, output recoding or borrowed clean state. Reading
either named source a or b is allowed and separately priced. Every source
change below is an elementary shear in SL2(R).

**Theorem.** The exact minimum number of appended weighted cube queries at
r=24 is three. An attaining program uses five source shears, no scratch
registers, and restores both arbitrary incoming sources. Five is an upper
bound on shear count, not a shear-minimality claim. No physical cost saving
or new multiplication exponent is asserted.

## Exact identity

The output defect is

```
D24 = sum_{i=0}^{23}(A+iB)^3 - 24A^3
= 828 A^2 B + 12972 A B^2 + 76176 B^3.
```

Here S1=276, S2=4324 and S3=76176=276^2. The new certificate is

```
D24 = -(23/1024)(11A+19B)^3
+(1679/64)(A+9B)^3
+(3749/1024)(A+25B)^3. (1)
```

Multiplying by 1024 gives an integer coefficient check:

| Monomial | -23(11A+19B)^3 | 26864(A+9B)^3 | 3749(A+25B)^3 | Sum |
|---|---:|---:|---:|---:|
| A^3 | -30613 | 26864 | 3749 | 0 |
| A^2 B | -158631 | 725328 | 281175 | 847872 |
| A B^2 | -273999 | 6527952 | 7029375 | 13283328 |
| B^3 | -157757 | 19583856 | 58578125 | 78004224 |

The last column is 1024 times the coefficient vector of D24. Thus (1) is
a polynomial identity, rather than a conclusion inferred from sample inputs.

The discovery uses PR6653's node condition
`e2(c)=((2r-1)/3)e1(c)-r(r-1)/2`. Taking c1=19/11 and c2=9 gives c3=25;
solving the coefficient equations and unnormalizing the first form gives
(1). The slope 19/11 is not dyadic, but the actual form 11A+19B and its
weight are dyadic. A projective slope is a ratio of row entries and need not
belong to R. This is the general-frame possibility excluded from PR6653's
integer-direction search, not a contradiction to that finite search. We do
not prove that every r=24 certificate must use a nonmonic form.

## Literal repair and dirty restoration

Starting from the actual deferred endpoint, append exactly:

```
a += b
y -= (3749/1024)*a^3
b -= (11/256)*a
y -= 376832*b^3
b += (11/256)*a
a -= 16*b
y -= (1679/64)*a^3
a -= 9*b
```

After the first shear a=A+25B. The next source change gives

```
b = B - (11/256)(A+25B) = -(11A+19B)/256.
```

Since `376832 = 23*256^3/1024`, the middle query adds
`+(23/1024)(11A+19B)^3`. The following shear restores b=B exactly while
a stays A+25B. The last two source shifts visit A+9B and then A.
Consequently the three queries subtract (1), and the final endpoint is
(Y+24A^3,A,B) for arbitrary dirty Y,A,B. In particular, b is restored before
its use in the final a shifts. No copy or initialization of either source
is needed. Each event is invertible by reversing its sign; no query writes
its source and no shear reads its own target in the added expression.

The nonmonic query is reached by an explicit legal frame, so primitive-row
completion or division by 11 is unnecessary. At that query the source matrix is

```
[ 1 25 ]
[ -11/256 -19/256 ],
```

with determinant (-19+275)/256=1. All other source frames are also products
of the displayed determinant-one dyadic shears.

## Three queries are necessary

The following specializes the rational comparison from PR6200/PR6212, and
makes the r=24 lower bound self-contained. Any appended program with at most
two queries represents D24 by at most two rational weighted cubes, after
negating the query weights. General source frames merely change their two
linear forms; this argument allows all such forms, even ones not realizable
by a source frame.

A single cube cannot have zero A^3 coefficient but nonzero A^2 B coefficient.
Discard zero-weight terms; a single term was already excluded. With two
nonzero weights, both A coefficients must be nonzero: otherwise A^3
cancellation forces both A coefficients to vanish, contradicting A^2 B.
Normalize over Q. Cancellation of A^3 then gives

```
D24 = lambda*((A+tB)^3 - (A+sB)^3),
lambda*(t-s)=276, t+s=4324/276=47/3,
t^2+t*s+s^2=76176/276=276.
```

The first equality forces t!=s. The last two give

```
(t-s)^2 = 4*276 - 3*(47/3)^2 = 1103/3.
```

This reduced fraction has denominator 3. A rational square in lowest terms
has a square denominator, so no rational t,s exist. Two rational queries are
therefore impossible, and in particular two dyadic queries are impossible.
Together with the explicit program this proves the exact minimum three.

## Complete event boundary and unpaid obligations

Let `La_k` price a shear a+=k*b, `Lb_k` a shear b+=k*a, and `Qa_k`, `Qb_k`
a weighted cube query into y on the named source. Each price must include
its actual coefficient, source access, private restoration and return under
one matched backend. The complete appended event inventory is

```
I24 = La_1 + Qa_(-3749/1024) + Lb_(-11/256) + Qb_(-376832)
+ Lb_(11/256) + La_(-16) + Qa_(-1679/64) + La_(-9).
```

The eager event bill is `24 Qa_1 + 24 La_1 + 24 La_(-1)`. The deferred bill
retains `24 Qa_1 + 24 La_1` and adds I24. Thus, after establishing matched
prices for the common events, a saving would require

```
I24 + Omega_deferred - Omega_eager < 24 La_(-1),
```

where the Omega terms include any remaining caller, routing, precision,
storage, dispatch or controller overhead not already included in the event
prices. These terms and the physical event prices are unknown, not zero.
In particular, the large middle weight and the query on b must be priced;
a backend exposing only a cannot treat that read as free. This is a local
coefficient/restoration result and a complete symbolic event inventory,
not a priced supplier, an asymptotic improvement or a selected-frontier change.
115 changes: 115 additions & 0 deletions research/cubic-r24-general-frame/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Arity 24 has an optimal three-query dyadic repair

**Scoped exact result; no new κ.** Prepared by apoursh with substantial
OpenAI Codex assistance. Apache-2.0.

This resolves the r=24 case in Open next question 1 of Nick Petalas's
[PR6653](https://github.com/CrocSwap/integer-mult-bounds/pull/6653).
Its bounded integer-direction search left this arity open. A nonmonic
source form supplies a three-query repair with dyadic coefficients:

```
D24 = -(23/1024)(11A+19B)^3
+(1679/64)(A+9B)^3
+(3749/1024)(A+25B)^3.
```

Here D24 is the excess output of the 24 retained children `y += a^3; a += b`
over the eager endpoint `Y+24A^3`. The [proof](PROOF.md) supplies a legal
three-query, five-shear repair that restores both arbitrary dirty sources,
and proves that two queries are impossible even over Q. Thus **three is
the exact query minimum** in the dyadic general-frame contract.

The direction 19/11 is not dyadic, although its actual source row and weight
are. This addresses the general-frame gap in PR6653 rather than just enlarging
its integer search box. It does not prove that monic repairs at r=24 are
impossible. No source snapshot, clean scratch or access to child interiors
is used; reading b is allowed and separately charged in the inherited model.
The five shears are an explicit upper bound, not an optimality claim.

## Evidence and replay

From the repository root, using CPython 3.12 and only the standard library:

```sh
python3.12 -B scripts/research_package.py --package research/cubic-r24-general-frame
python3.12 -I -W error -B research/cubic-r24-general-frame/verify.py
python3.12 -I -W error -B research/cubic-r24-general-frame/independent_check.py
```

The registered replay runs both implementations normally and with `-O`.
Explicit checks remain active in optimized Python.

- [CERTIFICATE.json](CERTIFICATE.json) records the three forms, exact weights
and complete eight-event repair.
- [verify.py](verify.py) obtains weights by exact elimination, reconstructs
the target from all 24 literal children, and symbolically checks every
source frame, the arbitrary-input endpoint and the named-source event bill.
It authenticates the three live source files and rejects their in-memory
mutations, plus ten program/domain controls.
- [independent_check.py](independent_check.py) imports neither the certificate
nor the primary verifier. It directly expands the identity, independently
replays the symbolic and literal programs, tests 12 dirty rational inputs,
and rejects eight coefficient, chronology and restoration mutations.
- The written proof, not the finite dirty-input checks, supplies the universal
identity and rational lower bound. Independent implementation by another
Codex agent is not independent human or proof-kernel review.

The discovery searched primitive rational slopes b/a with 1<=a<=16 and
|b|<=96, deriving a third slope via PR6653's node equation. Acceptance here
replays only the resulting exact certificate; it does not depend on search
completeness. No negative claim about other arities follows from that search.

## Scope, coordination and next questions

[TASK.json](TASK.json) preserves the original contextual card and declares
this as a changed-scope coefficient/restoration side result. The family
decision is **narrow**: stop at this missing r=24 implication. The proof lists
all retained and appended events; physical event prices, precision, storage,
routing and the complete matched caller bill remain unknown. Three queries
need not be cheaper than 24 eager restoration shears. The selected result
and its five framework assumptions are unchanged.

Upstream was pulled from canonical main at
`e54523517d0f03e58352e647c403a5af3e525a57`. Source-bound baseline orientation
passed; this was not a selected-supplier cold replay. Live all-state PR
searches on 2026-11-12 found no r=24 follow-up to PR6653 (queries included
`cubic 24`, `cubic nonmonic`, `cubic general frames`, and `1679 3749`).
The dedicated overlap helper's remote corpora were unavailable because `gh`
was absent; cached Discussion pages did not establish complete current
coverage. No public advance claim was posted. These are overlap checks,
not a global novelty certificate.

### Open next questions

1. **Remaining arities:** do r=15,22,30,31 admit three dyadic queries in
general frames? Start from primitive integer source rows and the exact
node equation; normalized rational slopes must not be required dyadic.
The blocker is global coefficient integrality; a finite failed search
supplies no four-query lower bound.
2. **Physical price at r=24:** does the complete eight-event repair beat
eager restoration under one pinned backend? Start by pricing the query
on the temporary b row with weight -376832 and the two dyadic b shears,
using the exact inequality in PROOF.md. Coefficient preparation, routing,
precision, storage and caller overhead remain unpriced.

These questions and concrete first steps are also recorded in TASK.json.

## Attribution and source binding

Nick Petalas supplies PR6200's reader/defect/rational comparison and PR6653's
node equation and open r=24 question. apoursh's
[PR6212](https://github.com/CrocSwap/integer-mult-bounds/pull/6212) supplies
the dyadic general-frame contract and unrestricted query floor; the r=24
specialization is reproduced in the proof. The earlier original-B,
power-of-two and equal-step families retain apoursh/PR6215,
AAAmirinu/PR6246 and CubeJerry/PR6250's credit. Their inclusion in PR6653's
prior-coverage list is not claimed as new work here.

[SOURCES.json](SOURCES.json) binds the exact main-tree predecessor bytes,
original catalogue and selected record. The PR6653 source head is
`3ea9965e13457fdafc70b784305d026ebfa8faa2`, retained by merge
`2273ea7c7c83d7bc311d0c5805e832eed13f408b`; replay pins the retained files
at the package base. No predecessor or shared infrastructure file is changed.
Classical binary-form decomposition and exact elimination are not claimed
as new general methods.
36 changes: 36 additions & 0 deletions research/cubic-r24-general-frame/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/cubic-three-query-arities/CERTIFICATES.json",
"usage": "input",
"git_blob": "ae72c7ef712704e4915e396facea262a256707ff",
"sha256": "b4839a5cfff2f69d902622a06d271842a079e953f534fb4c7dbc2b152589aef9"
},
{
"path": "research/cubic-three-query-arities/README.md",
"usage": "input",
"git_blob": "80c3a43f12e0ad4d586ed69eb3c8278cb60475e2",
"sha256": "d6f818ad69170fde178582595d3b5aa3e5ea1e6e4fde9d8e866f185aa2de5b55"
},
{
"path": "research/dyadic-cubic-repair/PROOF.md",
"usage": "input",
"git_blob": "a1c41a9afc83302f8b664bb45467821b9c088f0f",
"sha256": "1296f12278e198b6a22d8d88355cd58c1ee4fc2ab0e6941721614bb06cb1e7d5"
}
]
}
Loading
Loading