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
11 changes: 11 additions & 0 deletions research/current-rounded-scalar-tables/ARITHMETIC.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"current_SCALE_accepts": 1998,
"current_SCALE_cases": 3224,
"current_SCALE_rejects": 1226,
"max_current_SCALE_actions": 2428,
"oracle": "direct mathematical floor and final signed range; no table transitions imported",
"seam_all_inputs_cases": 1020,
"small_ADD_accepts": 1706,
"small_ADD_cases": 2380,
"small_ADD_rejects": 674
}
11 changes: 11 additions & 0 deletions research/current-rounded-scalar-tables/CONTROLS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"additional_controls": [
"even_positive_and_negative_ties",
"floor_not_truncation"
],
"table_mutants_detected": [
"missing_signed_residue_correction",
"missing_upward_rounding_offset",
"wrong_final_signed_guard"
]
}
59 changes: 59 additions & 0 deletions research/current-rounded-scalar-tables/DEPENDENCIES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"schema_version": 1,
"files": [
{
"local_path": "data/word.json.gz",
"repository": "DreamingOfClouds/integer-mult-bounds",
"commit": "03626137d0bd57f09b0bf9597376183ce6fa9683",
"original_path": "research/p104-main-wire-native/data/word.json.gz",
"bytes": 349022,
"git_blob": "d93e67ca7628bf5531ae6e369da4dd7b7907b88f",
"sha256": "273e81f176f001684b1fa3eb857992bf58b54748004fcfe806b83adb48d2cc00"
},
{
"local_path": "reference/ROUNDED-DIVISION-6937.md",
"repository": "DreamingOfClouds/integer-mult-bounds",
"commit": "a98df73ddae1d1ea85a62b6bdf2714b28cb7b359",
"original_path": "research/p104-two-chain-findings/ROUNDED-DIVISION.md",
"bytes": 40736,
"git_blob": "ed609f6a0e26dd00d6c55f876b667e15051507ca",
"sha256": "9ecff5835fae5fcdbf416711a5ef0e69d51afb535c55570ab3e1fef6f920f146"
},
{
"local_path": "vendor/exact_scalar_tables.py",
"repository": "CubeJerry/integer-mult-bounds",
"commit": "13193a22b1070a74a8580c5d3ea27470443f815a",
"original_path": "research/current-scalar-flat-tables/tables.py",
"bytes": 12650,
"git_blob": "1cc22f75fbe53d48b84be42782e581c04820cd49",
"sha256": "654e9734ef80a9394807ca508543b1bc164afb5768d23d0e5a88c790d2f13bac"
},
{
"local_path": "vendor/machine.py",
"repository": "CubeJerry/integer-mult-bounds",
"commit": "ab239cb6ee884e7a900dd9101c34448077fad0b0",
"original_path": "research/compiled-owned-bank-lifecycle/machine.py",
"bytes": 14932,
"git_blob": "acf475e4fccaff2fb64bd5b0b3f3fc0d246dc592",
"sha256": "ec597bce13275003ff30e4be481c936401826c1d4af642b55eec0c410774d1df"
},
{
"local_path": "reference/check_6937.py",
"repository": "DreamingOfClouds/integer-mult-bounds",
"commit": "a98df73ddae1d1ea85a62b6bdf2714b28cb7b359",
"original_path": "research/p104-two-chain-findings/check.py",
"bytes": 4796,
"git_blob": "cebc2062a3939e5b2e415fe5aa6d3d8ce1d6cdac",
"sha256": "f25a9960396561e166264f8b695a3012b2d062b46744e39d073d57ecbc43f163"
},
{
"local_path": "reference/PRECISION-PROOF.md",
"repository": "CubeJerry/integer-mult-bounds",
"commit": "56bc9383594a3efc303148e00bb746851abd1ed5",
"original_path": "research/query-only-precision-envelope/PROOF.md",
"bytes": 26757,
"git_blob": "465a5dddd83bdea5db09f1030f99dffe698fe600",
"sha256": "8ddafd9a4c5b51d4c0e3f9b4a9eba27712335a16de1868ba156557344af86e63"
}
]
}
7 changes: 7 additions & 0 deletions research/current-rounded-scalar-tables/ENVIRONMENT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python": "3.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]",
"implementation": "CPython",
"platform": "Linux-6.18.57-x86_64-with-glibc2.39",
"dependencies": "Standard library only; no Git, network, subprocess or solver in package replay",
"canonical_base": "7c49fe32c55de02c2c873655c804b16e4c3fef0a"
}
84 changes: 84 additions & 0 deletions research/current-rounded-scalar-tables/HISTORY.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"borrowed_binary_contexts": 3,
"combined_cost_samples": [
{
"coefficient": "-2/3",
"op": "SCALE",
"physical_actions": 1644,
"table_rows": 255,
"width": 3
},
{
"coefficient": "-5/48",
"op": "SCALE",
"physical_actions": 1252,
"table_rows": 199,
"width": 2
},
{
"coefficient": "-5/6",
"op": "ADD",
"physical_actions": 1920,
"table_rows": 285,
"width": 3
}
],
"dirty_failure_then_success": true,
"failure_scope": "public unchanged; failed heads and scratch may remain unrestored",
"history": [
{
"actions": 75916,
"bound": 152792,
"components": 12,
"historical_backing": [
1800,
2400
],
"old_backing": 4200,
"width": 19
},
{
"actions": 1202,
"bound": 3584,
"components": 2,
"historical_backing": [
1800,
2400
],
"old_backing": 0,
"width": 2
},
{
"actions": 6228,
"bound": 16896,
"components": 4,
"historical_backing": [
1800,
2400
],
"old_backing": 0,
"width": 7
},
{
"actions": 1594,
"bound": 4608,
"components": 2,
"historical_backing": [
1800,
2400
],
"old_backing": 0,
"width": 3
}
],
"late_overflow_public_unchanged": true,
"malformed_rejected": [
"empty",
"odd_component",
"empty_component",
"foreign_numeric_symbol",
"unterminated",
"ADD_component_shape"
],
"residue_marker_failure_reused": true
}
78 changes: 78 additions & 0 deletions research/current-rounded-scalar-tables/PR-DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
## What changed and why

The current odd word's exact scalar service rejects off-grid rational
results, including a permitted one-grid child defect immediately before
SCALE37480 by -2/3. A total rounded-child contract therefore requires a
different numerical service.

This package builds literal fixed-rational nearest-up SCALE/ADD tables
through the unchanged lifecycle Controller.primitive/execute_table ABI.
An LSF signed-residue prepass is followed by an exact odd quotient and
low-bit discard. Runtime instructions are only branch, write, unit move,
goto, halt and reject; there are no numerical payload callbacks.

All 52 current SCALE coefficients are instantiated and registered under
their 3,660 exact local source tokens. The actual -2/3 seam maps numerator1
to -1 and, universally, accepts every signed input for W>=2. The theorem
handles negative floor, even-denominator upward ties, widths smaller than
the discarded-bit count, signed endpoints and complete-field staging.

## Exact dependencies and novelty

Canonical base: `7c49fe32c55de02c2c873655c804b16e4c3fef0a`.
Source: DreamingOfClouds' CrocSwap/integer-mult-bounds#6936 at
`03626137d0bd57f09b0bf9597376183ce6fa9683`.
Credit the total RDiv proposal and abstract division automaton in
CrocSwap/integer-mult-bounds#6937. That note explicitly leaves physical
recounting/services open; this package provides a literal two-bank join,
not a claim to have invented rounding.

The fixed builder and exact arithmetic predecessor are published at
`13193a22b1070a74a8580c5d3ea27470443f815a`; the unchanged lifecycle at
`ab239cb6ee884e7a900dd9101c34448077fad0b0`. The source precision seam is
published in [the precision package at 56bc938](https://github.com/CubeJerry/integer-mult-bounds/tree/56bc9383594a3efc303148e00bb746851abd1ed5/research/query-only-precision-envelope).
Six unchanged dependencies have exact commit/path/blob/SHA-256 pins.

## Proof, physical checks and reproduction

```bash
python3 -I -B research/current-rounded-scalar-tables/verify.py --suite all
python3 -I -O -B research/current-rounded-scalar-tables/verify.py --suite all
```

The proof supplies signed residue correction, a bounded carry invariant,
final range iff, mathematical floor after low-bit discard, and whole-field
staging. Independent direct integer oracles cover 3,224 current SCALE
cases, 2,380 small ADD pairs and 1,020 exhaustive -2/3 inputs. Tests include
late rejection, dirty long-to-short reuse, failure-work retirement, context
preservation, detected malformed shapes and three compiled mutants.
Standard library only; no Git/network is required for package replay.

The positive physical/control bound is
512(S+1)+64dR+7(A_0+A_1)+16Q_c, with S the complete numeric extent,
R the component count, d the denominator's two-adic exponent, A_i old dirty
scratch lengths and Q_c borrowed contexts. It includes entry/exit erasure,
all passes, copying and head return. No extra bank is introduced; historical
backing and positive fixed source/table setup remain in the ledger.

## Scope, limits and kappa

**No new kappa. No full caller admission or unconditional theorem.**
The 4,079 current odd ADD occurrences are uninstantiated; the generic ADD
theorem and small fixtures are not their complete catalogue. Full recursive
source/row binding, other native/Lambda/error/ownership contracts, a common
physical tariff and rounded outer recovery remain open. The numerical
semantics are explicitly RDiv mode, not an unannounced replacement of the
exact-child or selected rule.

Input encoding, matching shape/grid, distinct tapes, origin public/context
heads and contiguous dirty work with blank historical tails are premises.
Detected failure leaves the public target unchanged but need not restore
heads/work. The source guard does not validate hidden dirt after a blank or
noncanonical encoded frontiers. The physical bound is not imported into
the old 10^9 tariff as an assumed exchange rate.

Prepared for **@CubeJerry**, with substantial **OpenAI assistance** in
research, proof, code and verification. Separate AI reviews are identified
in REVIEW.md and do not imply independent human or proof-kernel review.
No selected certificate or unrelated source is modified.
Loading