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
163 changes: 163 additions & 0 deletions research/jp8-signed-continuation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# One signed JP8 continuation saves six scalar primitives

This contribution was produced by Nick Petalas.

Claim type: finite local circuit certificate with a scoped substitution proof.
The historical PR626 JP8 forward fragment at zero-based event interval
`[19709,19713)` has a shorter implementation than Ryan Haines's PR811
positive-read compiler. Two cleared blocks cost 17 primitives per real
component. One signed continuation costs 14. Applying it separately to the
real and imaginary components saves exactly six real-component primitives.
Every source read, shift, target update and boundary clear is counted.

The recursive paid profile and productive targets are unchanged. This is a
historical scalar-program improvement, with no new kappa or selected-frontier
change. The search stopped at this first retained source-bound improvement;
there is no wider census or optimality claim.

## Exact fragment and construction

The four consecutive full-frame cleanup events use source `s=L81` and distinct
targets `a=L227`, `b=L230`, `c=L231`, `d=L232`:

```text
a += 3s/2
b -= 3s/2
c -= s/2
d += 5s/2
```

The existing private work register is `w=L724`. Its initial value is arbitrary
and its required exit value is zero. PR811's two blocks are
`[19709,19711)` and `[19711,19713)`. The new literal program is:

```text
clear w
w += s
double w
w += s
halve w
a += w
b -= w
w -= s
c -= w
halve w
w += s
double w
d += w
clear w
```

After the first five instructions, `w=3s/2`, independently of its initial
value. The next two instructions perform the first two target updates. The
new subtraction leaves `w=s/2`. After updating `c`, the inherited three-step
positive route changes `s/2` to `5s/2`. Updating `d` and clearing `w` gives the
stated complete map. Source and all other registers remain unchanged. This
proves equality for arbitrary scalar inputs over the rationals or complexes,
including arbitrary target and private-work inputs.

The changed interface is the private-work clear between the two old blocks.
The old four-instruction sequence `clear w; clear w; w += s; halve w`
is replaced by `w -= s`, under the established entry value `w=3s/2`.
The subsequent instructions are identical. There is no crossed child,
adapter, phase or frame change, and no extra register. Equality at the
fragment's complete boundary permits exact substitution into any unchanged
surrounding scalar program. It does not establish a rounded physical caller.

The exact work coefficient never exceeds three in absolute value in either
program, and its finest intermediate dyadic denominator is four. Each target
is updated once, by the same amount and in the same order. These exact prefix
facts use cancellation. They do not imply that the predecessor's
cancellation-free triangle majorant, whole-word precision receipt or rounding
error bound transfers without a new calculation.

## Evidence and reproduction

Use CPython 3.12 and the standard library, from the worktree root:

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

Substitute another CPython 3.12 executable elsewhere. Direct verification
writes a generated hash-bound receipt to stdout, with marker
`PASS_JP8_SIGNED_CONTINUATION`. It writes no files into the checkout.
`WITNESS.json` is the circuit witness, not a claimed execution receipt.

The verifier authenticates the three declared inputs, extracts exactly the
four new application events, and uses only the parent constructor's two local
lowerings. It runs no predecessor scientific verifier and does not recount
the parent program. It checks the complete six-input matrix against a direct
specification. A separate integer scalar interpreter executes both literal
programs on all 15,625 fourfold-grid inputs per program. Seven semantic
controls reject missing boundary clears, a missing or reversed subtraction,
a wrong source, a wrong target sign and an endpoint-neutral work excursion.
Normal and optimized execution use explicit checks.

The matrix proof covers arbitrary inputs; the finite grid is corroboration.
The interpreter does not execute native frame or phase operators. No whole
supplier replay, selected cold replay, rounded induction, compiler, hosting,
tape/storage pricing, stock proof, outer assembly, Lean or Docker run is
included. All five selected framework assumptions remain. Independent human
and formal proof-kernel review are unclaimed.

## Sources and distinction

The exact base is `7c49fe32c55de02c2c873655c804b16e4c3fef0a`, priority revision 8,
selected PR6030. `SOURCES.json` pins the current catalogue and selected record
as provenance, and the source program, PR811 constructor and README as live
inputs. The task explicitly changes the scalar-to-moment card to this side
result; it does not satisfy that card's moment-improvement acceptance gate.

Ryan Haines's [PR811](https://github.com/CrocSwap/integer-mult-bounds/pull/811),
head `b5c244c916dd0b30957332edad7ae7ae22b0eb9d`, supplies the positive-read
compiler and this historical source application. Its positive transition
search leaves signed reads outside scope. Its local code and credit are
unchanged. Ryan's [PR830](https://github.com/CrocSwap/integer-mult-bounds/pull/830)
supplies backward transposition context; this contribution makes no backward
application claim.

AmazedBot's [PR860](https://github.com/CrocSwap/integer-mult-bounds/pull/860)
already studies signed continuation on CK. Signed shift/add arithmetic and
that mechanism are predecessor work. The new result is the explicit shorter
JP8 source fragment and its exact local application certificate. This is
not a new general signed-digit method. Sagar Thakrar's PR696/723, Sebastien
Taillieu's PR999, Philipp's PR882 and Michal Ciemiega's PR1223 change other
standalone lowering menus. No superiority to every compiler or additive gain
with those packages is claimed.

Credit the retained Jeremy Kothe PR622/623, Chafik Boukhalfa PR626,
icekylinx, Jeffrey Cox PR739, ellipsi2 PR722, Sagar Thakrar PR751 and the
native/compiler/owner lineage recorded in the unchanged source README.
New source, witness and prose are Apache-2.0. The public
[advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19370136)
states this investigation's boundary.

## Implementation limits

The verifier has no recursion and bounds words by 32 instructions, literal
grid inputs by `5^6`, source events by 100,000 and JSON input sizes explicitly.
Functions stay below 60 physical lines. Python and its exact arithmetic
allocate dynamically; this is a managed-runtime deviation from Power of Ten
rule 3. Source decompression and JSON parsing allocate before their payload
size checks; the authenticated immutable input is the resource contract.
The fixed, authenticated parent constructor is loaded through `runpy`; this
is a bounded dynamic-code/dispatch deviation under rules 8 and 9 for replay
only. It executes local lowering definitions, with no predecessor scientific
entry point. The source-hash and direct replay commands above check these
controls. A future untrusted-input service would need streaming/decompression
caps and a declarative replacement for loading constructor definitions.
No fixed-allocation or hard real-time verifier is claimed.

## Open next questions

Can a signed continuation be installed in one current complete scalar caller
with a fully recomputed rounded prefix budget? It would connect an exact
scalar saving to a current implementation. First extract one source-compatible
boundary and its private-work contract, then charge every conversion and
cleanup operation and derive its cancellation-free error bounds. Current
source binding, native/private-work integration and a complete consumer bill
remain blockers. This package reserves no follow-up.
36 changes: 36 additions & 0 deletions research/jp8-signed-continuation/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"schema_version": 1,
"base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a",
"sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec",
"sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81"
},
{
"path": "research/community-k492-audit/pr626/replay/mixed-global/base/providers/jp8/LOCAL-PROGRAMS.json.gz",
"usage": "input",
"git_blob": "e22169a1633638213a5c63425a1919c7185f4c43",
"sha256": "fa0c196f65bd6ec1424fdf7d789f6972075c7bb02bf43f573ea85eafab31be98"
},
{
"path": "research/jp8-additive-coefficient-routes/README.md",
"usage": "input",
"git_blob": "adb9acc54157eb1ccd96cbac5836068fbc3fe5e3",
"sha256": "52fa53f25574f6b2b5e8c8a3c5acb225973693969d9b19fa812b7d9eb0ab2866"
},
{
"path": "research/jp8-additive-coefficient-routes/construct.py",
"usage": "input",
"git_blob": "0b996246d4ed3d86223fd45637952232284a88c0",
"sha256": "43b0fd819a8f8c02189aaa13c39b1c55f960c8b3c90cf4b8672499ead3cea3f0"
}
]
}
107 changes: 107 additions & 0 deletions research/jp8-signed-continuation/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"schema_version": 1,
"task_id": "scalar-to-moment",
"priority_revision": 8,
"base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a",
"original_card": {
"id": "scalar-to-moment",
"question": "Can a scalar/frame rewrite improve the complete signed moment through paid jobs, productive targets, or both?",
"starting_points": [
"docs/research/current-priorities.md",
"docs/research/research-family-status.md",
"certificates/selected-result.json",
"docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md",
"docs/research/recursive-invoice-preflight.md"
],
"methods": [
"Construct and independently check one source-bound instance of the stated first experiment.",
"Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change."
],
"acceptance_gate": "Require a legal chronological rewrite and favorable complete signed target-minus-paid moment with all extra charges. Unchanged ADD counts or unchanged paid-call counts alone decide neither success nor failure. Compiler, native and outer admission remain separate obligations.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_selected_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.",
"scope": "Source-bound orientation only, not a supplier replay or theorem proof."
},
"first_experiment": "Construct one legal source-bound rewrite and compare complete before/after P and T. Charge restoration, source windows and owned helpers. A paid call need not disappear: a legal target split or rank redistribution may win. Stop if the signed moment is unchanged or the consumer repays the gain. Do not extend a scalar-only census on ADD counts.",
"bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.",
"allowed_variations": [
"One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes."
],
"scope_change_triggers": [
"Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.",
"Treating an archived proposal or local numerical pass as complete supplier admission."
],
"overlap_terms": [
"signed moment",
"target split",
"rank exchange",
"scalar rewrite"
],
"existing_checks": [
{
"scope": "PR #3998: consecutive A2 scalar contraction",
"evidence": "research/staged544-a2-graph-rewrite/README.md",
"remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.",
"status": "author-checked",
"source_commit": "389268a6b5e0373a3125d5c6fcd6995f4ea324f5",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4019: separated A2 sites with unchanged recursive histogram",
"evidence": "research/staged544-separated-a2/README.md",
"remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.",
"status": "author-checked",
"source_commit": "f408e09df300b575235f7f77f81948071397e16d",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4112: composition audit",
"evidence": "research/staged544-a2-composition-audit/README.md",
"remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.",
"status": "author-checked",
"source_commit": "205b7380656ba4b6316a8a493b1a3c679b8f7a0e",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4152: A1858 contraction audit",
"evidence": "research/staged544-a1858-contraction-audit/README.md",
"remaining": "A genuinely changed paid itinerary or a distinct independent audit; no default scalar-only expansion.",
"status": "author-checked",
"source_commit": "caaa14cde5962adc372fdca71f63d0f29e73c8b2",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.",
"evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md",
"remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.",
"status": "reviewed",
"source_commit": "09dd0965711ca7eeb169057a420abab1c9052137",
"selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5"
}
]
},
"scope_status": "changed",
"actual_scope": "Construct one shorter signed continuation for the fixed historical PR626 JP8 forward fragment [19709,19713), preserving its exact arbitrary-input map and private-work clearing.",
"scope_change_reason": "The first verified contribution is a local scalar-program improvement on PR811. It leaves the recursive moment unchanged and does not meet the original moment-improvement gate. No wider census follows it.",
"bottleneck_link": "Side result: reduces six charged real-component primitives in one exact historical scalar fragment. It does not improve the binding complex recursive bill or selected kappa.",
"budget_minutes": 60,
"stop_rule": "Stop at the first source-bound, exact signed continuation improvement; no route census or additional fragments.",
"outcome": "completed",
"evidence": "README.md gives the scoped substitution proof; verify.py regenerates the 17-to-14 per-component comparison from the pinned parent constructor, checks the new map, exact prefixes, literal grid executions and rejecting mutations.",
"author": "Nick Petalas",
"ai_assistance": "Independent human and formal proof-kernel review are unclaimed.",
"open_questions": [
{
"question": "Can a signed continuation be installed in one current complete scalar caller with a fully recomputed rounded prefix budget?",
"why_it_matters": "A historical exact scalar saving does not establish a usable current physical or precision improvement.",
"first_step": "Choose one current source-compatible same-source boundary, extract its private-work contract and price a single signed transition together with all conversion and cleanup operations.",
"blocked_by": "Current source binding, cancellation-free rounding/error budgets, native/private-work contract integration and a complete consumer bill are absent here."
}
]
}
38 changes: 38 additions & 0 deletions research/jp8-signed-continuation/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"research/community-k492-audit/pr626/replay/mixed-global/base/providers/jp8/LOCAL-PROGRAMS.json.gz",
"research/jp8-additive-coefficient-routes/README.md",
"research/jp8-additive-coefficient-routes/construct.py"
],
"commands": [
{
"argv": [
"{python}",
"-I",
"-W",
"error",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 120,
"checks": "Exact pinned fragment and parent lowering, six-column arbitrary-input matrix identity, literal integer-grid executions, scratch prefixes and rejection controls."
},
{
"argv": [
"{python}",
"-I",
"-O",
"-W",
"error",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 120,
"checks": "The same complete finite checks with Python assertions disabled."
}
]
}
Loading