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
55 changes: 55 additions & 0 deletions research/suffix-error-recount/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Independent recomputation of #4510: suffix-weighted logical error bounds

**Claim type:** an independent recomputation by separately written code. **No new κ.** It covers Dugongue's
[#4510](https://github.com/CrocSwap/integer-mult-bounds/pull/4510) (head `97e0830a`), which bounds every
persistent output error of the complete THREE-base native word under an additive logical defect model.

## The model (#4510's)

- An additive defect of norm at most the class budget may enter the target field after every scalar, warp,
climb and center event.
- Warps are isometric free-group symbols: an operator and its negation cancel when adjacent.
- Everything else is exact.

A reverse sweep keeps each field's exact response as `{(output, reduced warp word): rational}`. At each event
the ℓ₁ norm of the target field's response is added to each output's weight for that event class.

## Results (original and #4505-rewritten words)

| | forward | backward |
| --- | ---: | ---: |
| worst output ADD+SCALE weight | **1,328** (both words) | **4,879** (both words) |
| extra logical-defect bits | 11 | 13 |
| output rows changed by the rewrite | 33 | 90 |
| largest row increase / decrease | 2 / 109/4 | 12 / 4 |
| ADD-only worst weight | 2,355/2 | 4,308 → 4,300 |

The initial-input amplification factor is 2 in all four cases. Everything #4510 states reproduces. The largest
row decreases are new information.

## Not covered

- #4510's physical and recursive defect contracts and its feedback theorem. Those are its open questions.
- Whether this logical norm model matches a physical rounding implementation.

## Reproduce

```sh
python3.12 -B scripts/research_package.py --package research/suffix-error-recount --check-only
python3.12 -B scripts/research_package.py --package research/suffix-error-recount
```

The verifier prints `PASS_SUFFIX_ERROR_RECOUNT` in about 3 seconds, using only the standard library.

## Open next questions

1. **Bind a physical P-bit rounding of entire-field ADD/SCALE to #4510's logical δ.**
- *Why it matters:* it turns the 11/13-bit statements into implementable precision.
- *First step:* bound a field's norm growth along the word with the same reverse sweep.

## Credit

- The model, the certificate and the question are Dugongue's (#4510, #4505).

Prepared by Ryanson Jonathan with substantial Claude Code (Claude Opus 5.5) assistance.
Apache-2.0.
30 changes: 30 additions & 0 deletions research/suffix-error-recount/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"schema_version": 1,
"base_commit": "f9f85c1e4fa1e955ff39f10fca447e3e2a4e4adc",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "ed33caef5c5827693e9572d252a66f99cbb73d40",
"sha256": "5732707cc1e460b090b53f2463162749ad860de878a18f7408938671d295a9d9"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "64bfc5af6709ed9811171e0a2108f05e1219cb65",
"sha256": "352a6184713b8843d96fd2c2071eb7aeaa655906b7c51d45ad444912666c8a96"
},
{
"path": "research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-NATIVE.json.gz",
"usage": "input",
"git_blob": "b46d44c6ee624968dd57be928b0c15d9d45f3b2c",
"sha256": "c54b0a3e129d28e6dbf74fa731fc3bb70fe3c6705f07256750fbecddcc842d39"
},
{
"path": "research/native-splice-replay/NATIVE.json",
"usage": "input",
"git_blob": "8e8fcbc0c6b5d40322ed71e9de48a2687ef66e0b",
"sha256": "e71e6fdf04f73a7c3ac77afcf037e0a88bb204765aeec24f72dda7b5e527af47"
}
]
}
100 changes: 100 additions & 0 deletions research/suffix-error-recount/TASK.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"schema_version": 1,
"task_id": "independent-moment",
"priority_revision": 7,
"base_commit": "f9f85c1e4fa1e955ff39f10fca447e3e2a4e4adc",
"original_card": {
"id": "independent-moment",
"question": "Does a new paid-profile or mixture-ceiling claim have independent source-bound coverage of its actual changed ledger?",
"starting_points": [
"docs/research/research-family-status.md",
"certificates/selected-result.json",
"research/staged544-mixed-fourth-entry/README.md",
"research/staged-fourth-mixture-ceiling/README.md",
"research/r437-two-window-carrier/README.md"
],
"methods": [
"Independently reconstruct one changed paid ledger or pooled dual with exact source and model binding.",
"Check a genuinely uncovered moment implication with a different enclosure method and semantic controls."
],
"acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.",
"first_step": {
"command": [
"python3",
"-B",
"scripts/research_baseline.py"
],
"expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY",
"inspect": "Choose one uncovered implication in #4088 literal mixed fill, #4091 pooled dual/model binding or #4067 changed frame/host bill. #4091 pins an earlier #4088 head: validate word, capacity and stock equivalence before applying that ceiling to the later fill.",
"scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately."
},
"first_experiment": "Independently reconstruct one changed ledger or pooled certificate with a positive case and a semantic failure control. Compare exact sources and name what existing checks miss. Keep this separate from supplier-boundary-audit (ordinary/outer dispatch) and uniform-transfer-audit (all-size proof). Stop after the chosen implication; more digits of an unchanged root are not additional mechanism coverage.",
"bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.",
"allowed_variations": [
"Reconstruct either a source ledger or a numeric enclosure with a different method."
],
"scope_change_triggers": [
"Importing the primary function and calling its output independent verification.",
"Calling an aggregate histogram or source archive an independently accepted physical supplier."
],
"overlap_terms": [
"independent moment",
"rank histogram",
"exact enclosure",
"2979",
"rank7 joint endframes",
"paired extraction",
"joint lowering",
"4088",
"4091",
"4067",
"staged544-mixed-fourth-entry",
"staged-fourth-mixture-ceiling",
"r437-two-window-carrier"
],
"existing_checks": [
{
"scope": "PR #4088: mixed local/owner/phase ledger and moment reported.",
"evidence": "research/staged544-mixed-fourth-entry/README.md",
"remaining": "Independent binding of changed construction to paid histogram, distinct from full admission.",
"status": "author-checked",
"source_commit": "72d7efc181edb21806a878f174847c96dd410ab0",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4091: sharp pooled ceiling proposed for fixed THREE/FOUR words and inventory.",
"evidence": "research/staged-fourth-mixture-ceiling/README.md",
"remaining": "Validate dual, exhaustive pattern scope and exact source equivalence before applying to newer fills.",
"status": "author-checked",
"source_commit": "a29bdd8f56cd18b805917775cdec09ff935eddc4",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"scope": "PR #4067: paid (2,2) to (1,3) exchange and fixed OQ4 host reported.",
"evidence": "research/r437-two-window-carrier/README.md",
"remaining": "Independent full cost delta; remaining caller/precision/stock obligations are separate.",
"status": "author-checked",
"source_commit": "a95f11c52e3ca1e4c5171b3c20d8f4b0815aee2e",
"selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
}
]
},
"scope_status": "refined",
"actual_scope": "Independent recomputation of #4510's suffix-weighted logical error bounds.",
"scope_change_reason": "Independent coverage of a fresh open PR.",
"bottleneck_link": "Side result: precision accounting for the native word under the rounded induction.",
"budget_minutes": 30,
"stop_rule": "Stop at the logical model.",
"outcome": "completed",
"evidence": "Worst ADD+SCALE 1,328 forward / 4,879 backward (both words), 11/13 bits, ADD-only backward 4,308->4,300, factor 2, rows changed 33/90, max increase 2/12, max decrease 109/4 / 4.",
"author": "Ryanson Jonathan, with Claude Code (Claude Opus 5.5) assistance",
"ai_assistance": "Substantial Claude Code (Claude Opus 5.5) assistance; no independent human review.",
"open_questions": [
{
"question": "Bind physical P-bit rounding of entire-field ADD/SCALE to the logical delta.",
"why_it_matters": "Makes the 11/13-bit statements implementable.",
"first_step": "Bound field norm growth along the word with the same reverse sweep.",
"blocked_by": "None."
}
]
}
21 changes: 21 additions & 0 deletions research/suffix-error-recount/VERIFY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"schema_version": 1,
"status": "ready",
"python": "3.12",
"requirements": [],
"inputs": [
"research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-NATIVE.json.gz",
"research/native-splice-replay/NATIVE.json"
],
"commands": [
{
"argv": [
"{python}",
"-B",
"{package}/verify.py"
],
"timeout_seconds": 180,
"checks": "#4510 recomputation: exact reverse free-word responses; worst ADD+SCALE 1,328 / 4,879 in original and rewritten words, 11/13 bits, ADD-only backward 4,308->4,300, initial factor 2, changed rows 33/90 with max increases 2/12."
}
]
}
100 changes: 100 additions & 0 deletions research/suffix-error-recount/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/usr/bin/env python3
"""Independent recomputation of #4510: suffix-weighted logical error bounds for the complete THREE-base word.

Model (#4510): an additive logical defect may be injected into the target field after every scalar, warp, climb and
center event; free warp operators are isometric free-group symbols (an operator and its negation cancel when
adjacent); all other events are exact. A reverse sweep keeps, for every field, its exact response
{(output, reduced warp word): rational coefficient}; at each event the l1 norm of the target field's response is
added to that output's weight for the event's class. Checks, for the original and #4505-rewritten words:
* worst persistent-output ADD+SCALE weight 1,328 (forward) and 4,879 (backward), unchanged by the rewrite, hence
11 and 13 extra logical-defect bits (2^11 > 1,328, 2^13 > 4,879);
* ADD-only backward maximum 4,308 -> 4,300; initial-input amplification factor 2;
* 33 forward and 90 backward output rows change, with largest increases 2 and 12 (largest decreases 109/4 and 4).
Ryanson Jonathan with Claude Code (Claude Opus 5.5) assistance. Apache-2.0.
"""
from collections import defaultdict
from fractions import Fraction as F
import gzip
import hashlib
import json
from pathlib import Path
import sys

HERE = Path(__file__).resolve().parent
ROOT = HERE.parents[1]
OLD = "research/kappa-rebuild/complex/full-identity-certificates/THREE-base-FULL-IDENTITY-NATIVE.json.gz"
NEW = "research/native-splice-replay/NATIVE.json"


def need(condition, message):
if not condition:
raise AssertionError(message)


def response(word):
# adjoint[role] = {(output_index, warp_word): coeff}; reverse sweep
roles=[('L',i) for i in range(632)]+[('C',0)]
idx={r:i for i,r in enumerate(roles)}
adj={r:{(idx[r],()):F(1)} for r in roles}
w=defaultdict(lambda: defaultdict(F)) # class -> output -> weight
def acc(dst,src,q):
for k,c in src.items():
v=dst.get(k,0)+q*c
if v: dst[k]=v
else: dst.pop(k,None)
for e in reversed(word):
t=e[0]
if t=='scalar':
op=e[1]; tgt=tuple(op[1]); cls=op[0]
elif t=='warp': tgt=tuple(e[1]); cls='warp'
elif t=='climb': tgt=('L',e[2]); cls='rank-%d'%e[5]
elif t=='center': tgt=('C',e[1]); cls='rank-%d'%e[4]
else: continue
for (o,_),c in adj[tgt].items(): w[cls][o]+=abs(c)
if t=='scalar':
if op[0]=='add': acc(adj[tuple(op[2])],adj[tgt],F(op[3],op[4]))
elif op[0]=='scale':
q=F(op[2],op[3]); adj[tgt]={k:q*c for k,c in adj[tgt].items()}
elif op[0]=='clear': adj[tgt]={}
elif op[0]=='copy': acc(adj[tuple(op[2])],adj[tgt],F(1)); adj[tgt]={}
elif t=='warp':
s=e[2]; new={}
for (o,wd),c in adj[tgt].items():
nw=wd[:-1] if wd and wd[-1]==-s else wd+(s,)
new[(o,nw)]=new.get((o,nw),0)+c
adj[tgt]={k:c for k,c in new.items() if c}
E0=max(sum(abs(c) for r in roles for (o2,_),c in adj[r].items() if o2==o) for o in range(632))
return w,E0


def main():
for row in json.loads((HERE / "SOURCES.json").read_text(encoding="utf-8"))["files"]:
need(hashlib.sha256((ROOT / row["path"]).read_bytes()).hexdigest() == row["sha256"], row["path"])
words = {"original": json.loads(gzip.decompress((ROOT / OLD).read_bytes())),
"rewritten": json.loads((ROOT / NEW).read_bytes())}
joint, addonly, out = {}, {}, {}
for name, d in words.items():
for o in ("forward", "backward"):
w, E0 = response(d[o])
joint[name, o] = [w["add"][i] + w["scale"][i] for i in range(632)]
addonly[name, o] = max(w["add"][i] for i in range(632))
need(E0 == 2, f"{name} {o}: initial-input factor 2")
for o, worst, bits in (("forward", 1328, 11), ("backward", 4879, 13)):
for name in words:
need(max(joint[name, o]) == worst, f"{name} {o}: worst ADD+SCALE weight {worst}")
need(2 ** (bits - 1) < worst < 2 ** bits, f"{o}: {bits} extra bits")
a, b = joint["original", o], joint["rewritten", o]
ch = [i for i in range(632) if a[i] != b[i]]
inc = max(b[i] - a[i] for i in ch)
dec = max(a[i] - b[i] for i in ch)
out[o] = {"worst_add_scale": worst, "extra_bits": bits, "rows_changed": len(ch), "max_increase": str(inc),
"max_decrease": str(dec)}
need(out["forward"]["rows_changed"] == 33 and out["backward"]["rows_changed"] == 90, "changed rows 33 / 90")
need(out["forward"]["max_increase"] == "2" and out["backward"]["max_increase"] == "12", "largest increases 2 / 12")
need(addonly["original", "backward"] == 4308 and addonly["rewritten", "backward"] == 4300, "ADD-only backward 4308 -> 4300")
print(json.dumps({"status": "PASS_SUFFIX_ERROR_RECOUNT", **out, "add_only_backward": [4308, 4300],
"initial_input_factor": 2, "new_kappa_claimed": False}, indent=1))


if __name__ == "__main__":
sys.exit(main())
Loading