Skip to content

Construct a paid arbitrary-bit Sandwich boundary (no new κ) - #6185

Merged
Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
petalas:research/w8-1029a-original-result
Oct 29, 2026
Merged

Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
petalas:research/w8-1029a-original-result

Conversation

@petalas

@petalas petalas commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implement the paid arbitrary-n-bit boundary requested in the released Discussion3664 handoff, around JoyboyBrian's PR5095 Sandwich.

Claim type: a new scoped physical caller construction under a completed-child recovery contract, with finite exact corroboration. No new kappa or selected-frontier change.

n-bit MSB operands -> validate -> reverse and pad to q*b bits
q=ceil(n/b), d=q*b-n, computed on Count tapes
Sandwich.run -> check 2*d high zeroes -> copy exactly 2*n bits
consume child return -> clear packed banks -> protected 2*n-bit return
consume wrapper return -> complete erasure

Package and written proof supply the representation, ownership, failure, fixed-inventory and payment contracts. This contribution was produced by Nick Petalas. JoyboyBrian retains the packing observation, handoff and Sandwich credit; Jose Manuel / jmbarrancoml retains Tensor and the physical runtime, Tekalign / tekuuu the CRT Converter, and all retained Fourier/recovery/native contributors their original results and notices. No predecessor scientific verifier was rerun.

Evidence

Before, the retained caller accepts only complete little-endian radix words and leaves the arbitrary-n-bit boundary open. The new wrapper accepts exact n-bit operands, including leading zeroes, computes its shape without host decoding, validates the complete return, and pays both return consumptions.

  • All 1,845 positive physical invocations pass: 1,700 exhaust every operand pair for 1<=n<=4 and 1<=b<=5; 144 cover larger fixtures through n=33; one is the explicit 29*23 example. Exactly 869 invocations use a partial high radix word.
  • All 27 input, return and ownership controls pass, with successful reuse after the failure controls. Sealed constructors and disabled Count decoding remain active. Observed metadata peak is seven leases from the fixed capacity of 32.
  • The actual unmodified Sandwich/Tensor/Converter owners preserve the reduced p48 catalogue's mandatory production-policy rejection and clean all boundary work. Positive numerical child returns are supplied exact fixtures, not production execution.
  • For n=5,b=3,x=29,y=23, packed inputs are 101110 and 111010; output is 1010011011, the ten-bit value 667. The complete boundary lifetime uses 1,738 reads, 468 writes and 1,746 unit moves. Child.consume and wrapper.consume are included. Only child.run and host oracle/inspection work are excluded. This is one exact fixture tally, not a runtime comparison.
  • Warning-strict direct normal and optimized checks pass with identical generated receipts. The registered pair passes. Each command runs below its 180-second cap.
  • At 9ef83f6, committed bytes, executable modes and source-history ancestry pass for all 81 package/input files. Metadata authenticates 74 source inputs. The official export and integrity check pass. Both direct modes pass from the read-only Git-free export with empty PATH; all 82 exported files retain bytes and modes and emit receipts identical to the worktree.

An initial local export exposed the undeclared p48 rejection fixture. The follow-up metadata commit declares and authenticates it. Final normal, optimized, registered and exported checks pass with unchanged wrapper code and scientific values.

Exact final local durations: 3.229 s direct normal, 3.484 s direct optimized, 7.262 s for the registered pair. These are check durations, not performance gains. Environment: 3.12.15 (main, Oct 14 2026, 00:55:37) [Clang 23.1.3 ]; macOS-27.0.1-arm64-arm-64bit.

From the repository root:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/arbitrary-bit-sandwich/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/arbitrary-bit-sandwich/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/arbitrary-bit-sandwich
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/arbitrary-bit-sandwich --check-source-history --check-modes

Another CPython 3.12 executable may replace the absolute path. Standard library only. Expected markers are PASS_ARBITRARY_BIT_SANDWICH, PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. Direct replay emits its deterministic hash-bound JSON receipt without writing a generated checkout file.

Generated final direct receipt
{
  "actual_child": {
    "payload_executed": false,
    "recovery_policy": "mandatory production admission"
  },
  "cases": 1845,
  "claim_type": "scoped caller construction under a completed-child contract",
  "demonstration": {
    "b": 3,
    "n": 5,
    "output": [
      1,
      0,
      1,
      0,
      0,
      1,
      1,
      0,
      1,
      1
    ],
    "packed": [
      [
        1,
        0,
        1,
        1,
        1,
        0
      ],
      [
        1,
        1,
        1,
        0,
        1,
        0
      ]
    ],
    "padding": 1,
    "product": 667,
    "q": 2,
    "scratch_peak": 7,
    "tariff": {
      "moves": 1746,
      "reads": 1738,
      "writes": 468
    },
    "x": 29,
    "y": 23
  },
  "input_controls": [
    [
      [
        1,
        0
      ],
      0
    ],
    [
      [
        1,
        0
      ],
      1
    ],
    [
      [
        1,
        0,
        1,
        0,
        1,
        0
      ],
      0
    ],
    [
      [
        1,
        0,
        1,
        0,
        1,
        0
      ],
      1
    ],
    [
      [
        1,
        3,
        0,
        1,
        0
      ],
      0
    ],
    [
      [
        1,
        3,
        0,
        1,
        0
      ],
      1
    ],
    [
      "zero",
      0
    ],
    [
      "zero",
      1
    ]
  ],
  "inputs_authenticated": 74,
  "nonmultiple_shapes": 869,
  "ownership_controls": [
    [
      "payload_alias",
      1
    ],
    [
      "payload_alias",
      2
    ],
    [
      "metadata_alias",
      0,
      0
    ],
    [
      "metadata_alias",
      0,
      1
    ],
    [
      "metadata_alias",
      1,
      0
    ],
    [
      "metadata_alias",
      1,
      1
    ],
    [
      "metadata_alias",
      2,
      0
    ],
    [
      "metadata_alias",
      2,
      1
    ],
    [
      "private_alias",
      0
    ],
    [
      "private_alias",
      32
    ],
    [
      "private_alias",
      34
    ],
    [
      "private_alias",
      35
    ],
    [
      "pending_return_at_end"
    ],
    [
      "double_consume"
    ]
  ],
  "package_sha256": {
    "PROOF.md": "7edf869880a60f750e99929292ad95338d4f3732b29e9a62263ab323c8d3d257",
    "README.md": "8d69c37cdce1a247f2868e0a09108f09c003cc14bcae49614a8b09925ff37270",
    "SOURCES.json": "33407335a94b7c96806cd20872c7ebeb748179664c1b1ddf02859bf4cdc15287",
    "TASK.json": "c3b4768054b85de3ff14ab902b54e91231a2ec36ef74957a49d8da9058f0c7cf",
    "VERIFY.json": "0e5432921bd4aa23efa04264d05902ebe8f19482ffe7d4f43be96c8d07aa02d5",
    "boundary.py": "ae9975117e73cce71e593d0c1ced3b96ac520e3866e20264c1a2e906171e177f",
    "verify.py": "024bb7aa590c1cb3eb7049ac3799ab459b47cefe4f1e134440871ddb257cac1a"
  },
  "return_controls": [
    "prefix",
    "short",
    "extra",
    "symbol",
    "raise"
  ],
  "scratch_peak": 7,
  "tariff_scope": "All wrapper work and both return consumptions; only child.run is excluded. Host oracle/output inspection is excluded.",
  "transcript_sha256": "7626cf43f9426046917d1a2a015c2cdf09b1a1ed32f8055cdf6653cee32ba3f5"
}

Limitations

Correctness assumes canonical Count/Tape inputs, completed Count operations and the child's exact recovery, borrowed-port and failure-cleanup contract. The child's production catalogue, precision, locality, native and analytic premises remain open. The wrapper always uses the child's production policy. No positive production-admitted Sandwich payload, all-size parameter family, complete multiplier, new supplier, selected cold replay, Lean or Docker run is claimed. Independent human and formal proof-kernel review are unclaimed.

The added bill is O(qb+D(n,b)), retaining paid descriptor arithmetic D. The packed banks and output use at most 2qb+2n payload cells plus markers; metadata and the child inventory are additional. This does not establish that a complete production instance is affordable.

Open next questions

  • Choose n,b and a genuinely admitted production catalogue satisfying Sandwich.admit, with the full coefficient/native preparation bill. Production admission and numerical premises remain the blockers.
  • Execute a complete recovery-admitted Sandwich invocation through this boundary. The reduced p48 fixture deliberately fails production admission; exact positive child oracles do not resolve that obligation.

Related open work

  • #4187 prices a conditional CRT last-K streaming branch under evaluator and ordinary-callee contracts. This wrapper implements an external bit representation around a different completed CRT/Tensor caller. It does not evaluate that branch or compare its tariff.

  • #6176 proves a universal axis cutoff for a conservative CRT reservoir envelope. It does not compute this wrapper's packing, return lifetime or tape tariff; this boundary supplies no reservoir or production-parameter admission.

  • #6180 supplies universal certificates for rectangular dirty linear circuits. This wrapper's nonlinear bit/tape boundary is outside that certificate contract, and no common numeric value is compared.

The refreshed complete open-PR snapshot contained no other PR studying this arbitrary-bit Sandwich ABI. Merged #5095 is the predecessor; merged #5167 is a distinct two-real packed Tensor caller. The completion refresh read all 14 other open account PRs created since the advance claim at 2026-10-29T13:05:43Z, through #6186. None targets this arbitrary-bit Sandwich boundary or supplies a competing same-instance numeric value. No additional computations were run to compare their results. Sparse local coverage was supplemented by distinctive main README and merged-PR searches. This is bounded overlap evidence, not proof of novelty. The advance claim states the delivered scope. Main remained 3f0152a at the publication checkpoint.

CI notes

Both hosted checks passed at exact head 9ef83f675cb193d9f7a3fddb4cd452b12398c08b in run 40882217907: plan in 6m25s and replay (research/arbitrary-bit-sandwich) in 1m44s. The checks were read once; run metadata confirms this head and completed success. No CI failure remains.

Hosted execution certifies the registered bounded replay and its normal/optimized boundary checks. It does not discharge the child's production recovery premises or provide independent human or formal proof-kernel acceptance. All local checks recorded above also pass.

Merge danger

Two-way door. Blast radius: the isolated new package and its replay registration. Shared runtime sources, frozen inputs and selected frontier are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants