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
185,720 changes: 185,720 additions & 0 deletions research/current-native-rounded-catalogue/CATALOGUE-ADD.json

Large diffs are not rendered by default.

4,115 changes: 4,115 additions & 0 deletions research/current-native-rounded-catalogue/CATALOGUE-SCALE.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions research/current-native-rounded-catalogue/COST.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"ADD": {
"S_plus_one": 746570752,
"R": 4241681408
},
"SCALE": {
"S_plus_one": 2124288,
"R": 68352
},
"TOTAL": {
"S_plus_one": 748695040,
"R": 4241749760
}
}
108 changes: 108 additions & 0 deletions research/current-native-rounded-catalogue/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Complete local coverage and the scalar cost sum

Fix the exact native word and retained compilers in SOURCES.json and
VENDORED.json. The native program has 139227 ADD occurrences and 4149
SCALE occurrences. It has no COPY operation. This proof concerns those
local scalar sites only.

## A complete finite registry

Scan the literal program in chronological order. Track each public field's
chart and each owned field's live interval. An ADD must use distinct live
fields in the declared common chart. A SCALE must name a live field in its
declared chart. INIT, MOVE and CLEAR update the chart metadata, including
the owned/public class. The final metadata must equal all declared public
end charts and leave no live owned interval.

For each scalar event, form the complete local key (local, clock, raw event).
Group keys by operation and reduced rational coefficient. Reduction changes
only which fixed coefficient table is shared; each raw event remains in
its own source key. Different clocks give different keys even when their
raw events match. A reverse raw-opcode census checks each group's size.

There are 2196 ADD groups and 74 SCALE groups. Construct each group's table
with the unchanged corresponding compiler and map every key in that group
to that table. The groups are disjoint and cover every scalar clock, so the
union is a complete finite local registry. The verifier builds each group
and its actual table object in turn. It authenticates the complete ordered
key lists and complete tables by SHA256, and checks every literal branch,
port and unit-move target. This is not a runtime recursive loader.

For ADD, let a/b be reduced, b=2^d o, and
L=max(bitlength(abs(a)),bitlength(b)). The source gives L<=18, d<=11 and
o<=25. Thus it satisfies the retained compact compiler's o<=125 domain,
and its numeric extension K=L+2 is at most 20. For SCALE the corresponding
maxima are L<=8, d<=6 and o<=9. The compiler's finite carry and residue
construction therefore applies at every source coefficient.

The retained all-size theorems prove nearest-up arithmetic and final-range
rejection on every canonical field satisfying their physical premises.
The new literal cases independently compare each table with signed integer
floor arithmetic. They include a nonzero signed case for every coefficient,
a late overflow for every ADD coefficient, and width-one endpoints. The
cases corroborate the source-bound instantiations; they do not replace the
retained all-size proofs. Wrong-table and nonunit-move controls reject.

## Accumulate the complete scalar service bound

For one ADD, let R be its real component count and S=sum_j(w_j+1) its
numeric virtual extent. With K=L+2, the retained bound is

```text
512(L+8) [1+S+(L+3)R] + 7A + 16Q.
```

Here A is the total old contiguous physical length of its two work bodies,
and Q is the count of borrowed contexts at their origins. The bound includes
all source reads, numerator passes, division, staging, copying, head return
and retirement. Resident private storage is
max(H_N,3[1+S+(L+3)R])+max(H_O,3S), with historical capacities H_N,H_O.

For one SCALE, the retained bound is

```text
512(S+1) + 64dR + 7A + 16Q.
```

Its private backing is max(H_0,3S)+max(H_1,3(S+1)). The full field is staged
before public installation in both services. Successful calls preserve
borrowed data and return heads; rejected calls protect the public target
but can leave dirty work and displaced heads.

Now choose S and R as upper bounds for every local scalar field in the
native invocation. All coefficients in the cost formulas are nonnegative,
so replacing each field's actual sizes by these common upper bounds is
valid. Sum the per-call costs with literal source multiplicities. ADD gives
746570752(S+1)+4241681408R, and SCALE gives
2124288(S+1)+68352R. The sum is

```text
748695040(S+1) + 4241749760R + 7 sum_i A_i + 16 sum_i Q_i.
```

COST.json is generated by a reverse per-event source sum. Each registered
replay independently reconstructs its part from the table construction
receipts and occurrence counts, then checks the combined sum. Old dirt is
not assumed to vanish between calls. A complete provider must establish
which work banks are reused and how their historical capacities are charged.

The unshared catalogue contains 33556789 literal rows and 14593712 states.
They are fixed finite control data for this source. Their positive setup
and representation costs are separate from the per-invocation bound.
No state sharing, source setup, table access or private storage is free by
this argument. The numerical coefficients above are not comparable with
the source's ordinary-model units without a proved conversion.

## What remains outside the result

The union construction supplies every local coefficient table, not the
complete recursive controller, row exporter or signed caller. It assumes
canonical matching formats, physical nonaliasing, required origin heads,
contiguous old work and the final signed-range contract. It does not derive
these premises for all admitted recursive states.

Native MOVEs, owned erasure, recursive delivery, caller scalar operations,
complete private backing, common physical pricing and rounded outer recovery
remain separate. The five framework assumptions and selected kappa are
unchanged. This is a complete finite local catalogue with retained universal
primitive theorems, not a complete multiplication theorem.
143 changes: 143 additions & 0 deletions research/current-native-rounded-catalogue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Complete local rounded tables for the current native word

This package constructs every ADD and SCALE coefficient table for the
exact [PR 7660](https://github.com/CrocSwap/integer-mult-bounds/pull/7660)
native candidate. It binds all 143376 local scalar occurrences to the
constructed tables. No complete recursive dispatcher or new kappa is
claimed.

The source head is `d12b854d4825e9edfa3a3466909e1abf3525e929` and its decoded
word SHA256 is `f0753b6614b2d351723dddc307a39b6ecd748a43008c6fdb9335b01feeec9669`.
The source has no COPY opcode. The caller's scalar operations are outside
this native catalogue.

The unchanged [PR 6988](https://github.com/CrocSwap/integer-mult-bounds/pull/6988)
SCALE compiler and [PR 6990](https://github.com/CrocSwap/integer-mult-bounds/pull/6990)
compact ADD compiler supply the literal tables and their all-size proofs.
Those packages left full local coefficient construction open. The new
work completes that finite coverage on this current word and gives its
occurrence-weighted physical scalar bound.

## Checked coverage

| Quantity | ADD | SCALE |
| --- | ---: | ---: |
| Exact local occurrences | 139227 | 4149 |
| Distinct coefficient tables | 2196 | 74 |
| Constructed literal rows, before sharing | 33462625 | 94164 |
| Constructed states, before sharing | 14551636 | 42076 |
| Largest table, in rows | 63503 | 14219 |
| Literal signed/range cases | 6588 | 148 |
| Successful cases | 2608 | 107 |
| Correct range rejections | 3980 | 41 |

The [ADD catalogue](CATALOGUE-ADD.json) and
[SCALE catalogue](CATALOGUE-SCALE.json) record each coefficient, occurrence
count, first and last clock, complete token hash, complete graph hash,
construction receipt and literal execution cases. Each graph is built,
checked and executed before the next graph. The verifier does not retain
all graphs at once or run the full native program on numeric payloads.

The local key is `("local", clock, complete_event_tuple)`. Each group maps
all its exact keys to the actual immutable table object. A forward chart
and lifetime scan checks every source event. A separate reverse raw-opcode
census agrees with every coefficient multiplicity. The registry covers
every selected source clock once. It is a finite local registry certificate,
not a production recursive table loader.

Every ADD coefficient receives a fitting signed cancellation case, a late
whole-field overflow case and a width-one endpoint case. Every SCALE
coefficient receives fitting signed inputs and width-one endpoints.
The unchanged literal lifecycle fixture checks source/context preservation,
head return and successful work retirement. Failure protects the entire
public target and may leave work or heads dirty. ADD endpoint cases also
reuse the work left by the preceding failed case.

Wrong coefficient tables fail the independent integer oracle for both
classes. Nonunit tape moves fail the graph checker. Wrong raw event keys
are absent from every group. Runtime graphs contain only the retained six
opcodes and exactly two private work ports.

## Positive cost bound

The native ADD coefficients have bit length at most 18, denominator
power of two at most 11 and odd denominator at most 25. Their compact
numerator extension is at most 20 bits. The SCALE maxima are 8, 6 and 9.
All coefficients fit the retained compiler domains. No compiler is changed.

Let S bound each field's numeric virtual extent, including delimiters,
and let R bound its real component count. Let A_i be the total old dirty
physical work length for scalar invocation i, and Q_i its borrowed context
count. If every invocation meets the retained service's shape, range and
physical preconditions, the complete native scalar sequence is bounded by:

```text
748695040(S+1) + 4241749760R + 7 sum_i A_i + 16 sum_i Q_i
```

These are physical reads, writes, unit moves and executed control rows.
[COST.json](COST.json) separates ADD and SCALE. A reverse per-event source
calculation and the forward weighted construction receipts give the same
coefficients. [PROOF.md](PROOF.md) states the per-call formulas and storage.

This bound covers the local scalar services. It excludes native MOVEs,
owned lifetime services, row delivery, full recursive dispatch, caller
operations and outer recovery. The unshared fixed catalogue has 33556789
literal rows and 14593712 states. Its positive setup/control representation
is separate. No common-bank layout or exchange rate into the old ordinary
model is assumed.

## Scope and limits

The operation is nearest-up rounding, with success exactly when all final
signed outputs fit. This does not prove that every actual recursive input
meets that range contract. Public and work tapes must be distinct; input
formats, matching grids, origin heads, contiguous old scratch and blank
historical tails remain explicit premises. Successful retirement does not
release historical backing capacity.

The all-size numerical and lifecycle proofs are retained predecessor
results. The new verifier independently checks finite coverage and integer
oracles; its cases are not a new proof over every input or width. No full
native/caller execution, all-column provider, complete owned backing,
common physical supplier tariff or rounded outer recovery is established.
The five inherited assumptions remain. The selected frontier is unchanged.

## Reproduce

Use Python 3.12 and the standard library:

```sh
python3.12 -B scripts/research_package.py --package research/current-native-rounded-catalogue
```

Four registered commands construct ADD and SCALE catalogues under normal
and optimized isolated Python. Each prints
`PASS_CURRENT_NATIVE_ROUNDED_CATALOGUE`. The runner must print
`PASS_REGISTERED_RESEARCH_PACKAGE`. Normal replay writes no files and uses
no Git, network or solver. The explicit `--write` option only creates an
initial receipt and refuses to overwrite one.

## Open next questions

Bind recursive row delivery, input ranges and the whole physical tariff
before caller admission. The complete graph hashes can also support a
separate state-sharing construction with its own delivery cost and proof.
[TASK.json](TASK.json) states the boundaries and first steps.

## Credit

CubeJerry supplied both unchanged compilers, the lifecycle executor,
physical fixtures and general proofs. Their declared source closure and
headers preserve their predecessor licenses and credit. Clear1nsight
supplied the exact candidate and review request; the copied source NOTICE
preserves the DreamingOfClouds, SYLforge, Ali Romman and Rohan Arun lineage.
Nick Petalas's [PR 7268](https://github.com/CrocSwap/integer-mult-bounds/pull/7268)
is related residue-graph work; this package uses the unchanged merged
compact compiler. [PR 7662](https://github.com/CrocSwap/integer-mult-bounds/pull/7662)
checks a different implication: the exact half-ADD consumer and its isolated
terminal error. No code from that package is imported.

Ali Romman directed the new catalogue, cost aggregation and verification
with substantial OpenAI Codex assistance. New work is Apache-2.0. The base
is `e54523517d0f03e58352e647c403a5af3e525a57`.
Loading
Loading