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
16 changes: 16 additions & 0 deletions research/crt-current-row-query/ATTEMPT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"status": "INCOMPLETE_RESOURCE_TIMEOUT",
"command": "/opt/local/bin/python3.12 -B research/crt-current-row-query/verify.py --four-axis --write-result",
"elapsed_limit_seconds": 180,
"exit_code": 1,
"completed_receipt": false,
"join_sha256": "bcae8074a67fe74ee9979a4608452de6e2decbe7023671624573f362f3caefe5",
"verify_sha256": "e0ba8c478eb5054e7f83be1840c42f99472e012e67cc2edf527c84589f80e9bf",
"case": "moduli5,7,11,13 widths3,3,4,4 current1,5,0,9 level2 row0 P15; two h4 complete producers",
"observation": "No completed producer/query result was emitted before the subprocess timeout killed the child. No progress count or passing h4 result is claimed.",
"subsequent_repairs": [
"Replace linear active tuple membership with the equivalent constant-time compiled width/node/row predicate.",
"Replace fixed2e9 watchdog with the proved T_rom bound computed from compiled P and h."
],
"evidence_scope": "The final implementation is tested on the complete h2 actual pipeline. This timeout is not acceptance evidence for either version."
}
226 changes: 226 additions & 0 deletions research/crt-current-row-query/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
# Current numerical offsets to a physical CRT micro-row

JoyboyBrian, with substantial OpenAI Codex assistance. Apache-2.0.

## The exact boundary

Use the admitted `RowEntry` domain of Ali Romman's PR5353: a power-of-two
axis count d, declared h_i in {ell-1,ell}, ell>=2, pairwise coprime moduli
2<=s_i<2^h_i, arbitrary padded current coordinates 0<=x_i<2^h_i, one
compiled tree node [a,a+n) and one global row. The source is its literal
sequential padded-axis tape, not a host list of numeric values. Eight
distinct protected numerical words are supplied with the retained legal
heads. Fixed topology, input ownership and the source numerical-operation
model remain predecessor premises.

Let b=a+n/2, P=1+sum_{i=a}^{a+n-1}h_i, and A be the non-idle right axes
of this global row. The result is an owned stream containing, in axis
order, the h_i bits of the **micro-row output** for every right axis
b<=i<a+n. Delimiters are L, then one coordinate followed by `|` per axis,
then R. No active axis means no allocation or tape work and no output;
the original source already represents the identity row. When some axes
are idle, their coordinates are copied into the returned stream unchanged.

All borrowed source/dirty words and entry heads return unchanged. The
numerical outputs, new descriptors, produced ROM and complete unselected
layer output, producer workspace and query countdown are retired. The
owned coordinate result remains until `close`, which erases it and closes
the original Entry. Successful calls leave every new physical head at
zero; the inherited numerical ports have their retained head-one exit.
Failure rollback and arbitrary dirty backing acquisition are not claimed.

This theorem closes an actual encoded-numerical-output to physical-query
boundary. It is not the full three-epoch exceptional key, a full CRT row
permutation of all payload addresses, or a complete multiplication theorem.

## Numerical input and encoded descriptor compatibility

The unchanged PR5353 RowEntry and PR5053 producer reconstruct the actual
current left child. On a valid left child they return k_A; an invalid left
child disables it by k_A=0. For each right axis i, their sequential output
contains

c_i = k_A * (product_{j=a}^{i-1}s_j)^(-1) mod s_i,

followed by a whole-rotation updated value. The inverse exists by pairwise
coprimality. All preceding right moduli are included. We consume the offset
word and **discard the updated-value word by a charged scan**: a complete
cyclic rotation is not one Beneš micro-row.

For an active axis, the join reads its original modulus directly from the
borrowed source, translates each numeric bit to the producer's finite bit
symbol, and pads with zeros against the actual unary P guide. It similarly
copies exactly P bits from the actual numerical offset stream, enforcing
the guide and field delimiters. This creates a singleton offset list
`L [P bits] | R`; no decoded integer or host-built offset list is used.
Compiled h_i and the selected local-row constant are written in binary and
zero-padded through that same guide. The finite topology is the only source
of those constants. The ROM program itself is precompiled without any
input values and passed to the join.

The existing PR5092 producer requires W>=h_i+3. A node has at least two
axes, and every modulus is at least two, hence every admitted h_j>=2.
Consequently P>=h_i+2+1=h_i+3. Taking W=P meets its width contract; its
modulus and singleton-offset guards follow from the numerical theorem.
The local row is g for a long axis, and g or g-2 on the two active pieces
of a short axis, with global rows ell-1 and ell idle. This is exactly the
pinned `local_row` function, and lies in [0,2h_i-2].

Thus the unchanged encoded producer emits the exact canonical Beneš
network for the rotation x->x+c_i mod s_i on x<s_i, fixing padded wires.
Its selected `rom` is L followed by exactly N_i=2^h_i bits and R. Its
`layers` output contains all 2h_i-1 layers; the join pays to erase it even
though the query needs only one selected layer. Both producer outputs are
consumed on their original backing lists, through local tape operations.
There is no verifier-supplied row or source table lookup in execution.

## Physical query and the current-coordinate convention

The query copies the actual current h_i-bit coordinate to an owned
little-endian countdown and a separate output coordinate. The ROM scan
visits every produced row bit in order. Until selection, a zero test scans
the countdown, returning its head, and a nonzero countdown is decremented
by ordinary borrow propagation and head return. At scan position j, while
selection is enabled, the countdown represents x_i-j. Hence precisely
position x_i sees zero and selects its row bit. Since 0<=x_i<N_i, selection
always occurs before R. After selection, the scan continues to R without
changing the chosen bit. The countdown is then erased.

If the local row is r, its source target bit is min(r,2h_i-2-r). The join
moves to that compiled bit position in the owned coordinate, XORs the
selected bit and returns the head. This is exactly `Caller.row`'s table
action. No check x_i<s_i suppresses a query. A Beneš implementation of a
padded permutation can pass through padded coordinates at intermediate
rows; the queried coordinate must be the current one.

At a fixed node, the left child is unchanged throughout its micro-rows.
Right offsets depend on the successive modulus prefixes, not on the
current right coordinate values. The numerical producer's current-child
convention therefore gives the same offsets as the source caller at each
row. Each active right axis receives its proper current-coordinate query;
idle axes retain their coordinate. These facts prove the whole returned
right-node row stream equals the corresponding slice of `Caller.row` for
every admitted source state, not merely the verifier examples.

## Ownership and a reused producer bank

The numerical producer and RowEntry stay unchanged and retain their full
63-port lifecycle. New header, coordinate, countdown and output ports are
distinct from all borrowed roles. The join allocates one fixed PR5092
service bank, then invokes the same program for each active axis on the
same bank. Its private tapes return blank with heads zero by the producer
theorem. The join erases both generated output roles and all four headers
before the next invocation. These steps establish the next call's entry
premises without constructing a new ROM or replacing the bank backing.
Restoring the emulator's initial head configuration represents those
already returned physical heads, not a free head jump.

The finite producer register configuration is fixed control. Reentering
its fixed start state has constant cost, included in the conservative
adapter allowance below; it is not an input-sized store reset. Initial
blank owned backing remains an explicit storage premise. Erasing cells
does not release or subtract their retained capacity.

The source and numerical output heads rewind by local movement. Numerical
results are retired only after every offset has been consumed, so no
output lifetime is silently shortened. `close` disposes of the coordinate
result and calls the original Entry close exactly once. All malformed
or rejected executions remain outside the successful cleanup theorem.

## Complete local time and retained-storage invoice

Let L=2+sum_{i=0}^{d-1}(3h_i+4), N_i=2^h_i, and

F = L + (n+1)(P+2)
+ sum_{i in A}[(N_i+1)(h_i+1)
+ N_i(2h_i-1) + 2h_i+4].

The inherited Entry, including numerical computation and retirement, costs

T_entry = 2^20(P+2)^4 + 2^16(P+2)^2 + 128(L+P+n+1).

The complete producer is charged once per active axis at m=1, W=P:

T_rom(i) = 2*10^6 P^2 (N_i+1)^3 (h_i+1)^4.

The new serialization, current-coordinate query, updates, returned-stream
emission, every header/ROM/layer erase and every added rewind cost at most
4096F source-tape/control operations. One direct count is: each additional
source symbol is scanned a fixed number of times; each header/offset/skip
word uses O(P) charged reads/writes/moves; each row query visits at most
N_i positions, with at most two h_i-bit scans plus head returns at a
position; disposal scans both output lengths N_i and N_i(2h_i-1)+O(h_i).
The displayed routines use fewer than 64 primitive tape operations per
unit represented in F. Between these charged accesses there are fewer
than 64 finite tests, assignments and compiled-loop transitions, including
fixed-role dispatch and the per-invocation fixed control reset. Thus 4096F
is a deliberately loose complete bound, not a timing extrapolation.
Compiled topology/ROM-program creation and supplied-input serialization
are external setup, explicitly not runtime numeric decoding.
Activity uses the fixed compiled node/width/row predicate, not a linear
membership scan of all active axes. The emulator watchdog is the displayed
T_rom(i), computed from compiled P and h_i; no fixed finite watchdog limits
the admitted all-size successful execution theorem. External resource
timeouts remain test limits, not machine rejection.

The full invoice is

T_join <= T_entry + sum_{i in A} T_rom(i) + 4096F.

This adds compatible fixed-alphabet source-operation bounds. It is not a
claim that all numerical control was lowered to one binary transition table.

Let J_i=N_i(h_i^2+3h_i+1). Use the predecessor Entry retained-backing bound

B_entry = 57(P+2)+3(P-2)(2P+4)+6+3P+4n+4,

and, including the four producer inputs of total length 4P+9,

B_rom(i) = 100(P+2)+5P J_i+N_i(4h_i-1)+10(h_i+1)+4P+9.

The single bank's sum of per-role historical maxima during this finite
row is at most sum_i B_rom(i). We deliberately use this conservative sum,
not the unjustified maximum of aggregate bounds. The two coordinate/
countdown ports and returned stream add at most

B_extra = 2(max_{b<=i<a+n}h_i+3)
+ sum_{b<=i<a+n}h_i + n/2 + 3.

Hence total new owned retained backing is bounded by
`B_entry + sum_i B_rom(i) + B_extra`. Input source L and protected numerical
backing 8(P+2), plus any supplied exterior blank capacity, remain borrowed
and separately charged. The verifier sums distinct physical backing
identities, so ROM/header aliases in observer wrappers are not double
counted. No arbitrary cross-session persistent-bank theorem is implied.

## Evidence and limits

The first source fixture is (7,3), widths (3,2), current state (1,1).
Five separately encoded row invocations follow the actual state sequence
(1,1), (1,1), (1,3), (1,3), (1,3), (1,2). The last query must run on
padded coordinate 3. Test-harness serialization between invocations is
explicit; this is not an uninterrupted physical whole-level execution.
Invalid left padding disables the offset and returns identity. Four
faults change the supplied offset, selected local row, required padded
query or complete-layer disposal, and are detected at semantic or ownership
checks. The source four-axis discriminator has preceding-right-modulus
offset3 rather than the incorrect7, but the new full h=4 producer/query
replay exceeded its180-second resource limit and produced no completion
receipt. It is explicitly uncompleted; the executed new full pipeline
evidence is h=2. The quantified argument is source-relative and does not
depend on claiming that uncompleted test passed.

Finite checks corroborate the written source-composition and countdown
arguments. Initial axis-record production, a uniform binary compiler,
full three-epoch exceptional key, global ROM reuse, full E(p,ell), native
and outer multiplication admission remain unresolved. There is no new
kappa or selected-frontier claim, human acceptance or formal-kernel proof.

## Credit

Ali Romman supplies PR5353's actual row-entry contract; JoyboyBrian supplies
the retained PR5053/5219 numerical modules and PR5092 control producer.
Retain Hiroki KUMAZAKI's current-coordinate and mixed-width caller,
Cinna Davis's CRT/Beneš construction, ToikY's encoded arena/DFS proof,
Tekalign's original-coordinate stream work, Jose Manuel, Ryanson Jonathan,
unpaidmoon, Douglas Colkitt/John-Michael Smith and all pinned notices.
68 changes: 68 additions & 0 deletions research/crt-current-row-query/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Actual CRT offsets to a physical current-row query

The sequential numerical result of Ali Romman's PR5353 now feeds the
unchanged PR5092 encoded Beneš ROM producer. The join reads the produced
ROM on its original backing, selects the current padded coordinate with
an encoded countdown, and returns the actual micro-row coordinate stream.
It pays for serialization, queries, rewinds and disposal of both the
selected ROM and the unused complete-layer output.

[PROOF.md](PROOF.md) gives the source-relative quantified interface theorem,
admission W=P, current-coordinate convention, complete local time bound
and retained-backing bound. [RESULT.json](RESULT.json) records the small
actual producer/query cases and four falsifying controls. The h=2 checks
exercise the complete encoded producer, not a verifier-supplied row table.

```sh
python3.12 -B scripts/research_package.py --package research/crt-current-row-query
```

The registered normal and optimized runs authenticate every source input
and compare typed deterministic receipts. The separate, expensive h=4
four-axis test is explicitly opt-in:

```sh
python3.12 -B research/crt-current-row-query/verify.py --four-axis
```

This optional whole-ROM test is distinct from the small executed h=2 ABI
checks. The author attempt exceeded180seconds without completion; no
ACTUAL4 receipt exists and no h=4 joined result is claimed. See
[ATTEMPT.json](ATTEMPT.json) for exact attempted bytes and the subsequent
all-size repairs. A future completed optional run checks the caller and
invoices even without a frozen receipt; `--write-result` records one.

The small mixed-width case reaches padded coordinate3 before its last
query. Suppressing that query gives the wrong endpoint. Mutating the
offset, selected row or unused-layer disposal also fails. All source and
protected words are restored; all63 numerical ports and every joined
owned backing are retired. Separate row invocations use test-harness
input serialization; no uninterrupted physical level execution is claimed.

## Open next questions

- Physically update the canonical axis input with the returned row stream,
so successive rows need no host serialization.
- Compose the current query into the complete three-epoch exceptional key,
paying for all original/current coordinate conversions and restorations.
- Resolve cross-session bank ownership and a complete binary numerical
lowering before claiming a global machine or outer multiplication bound.

No new kappa, selected frontier, human acceptance or formal-kernel proof is
claimed. Source models and initial blank owned backing remain explicit
premises. This is one actual caller boundary, not full total repair.

## Provenance and credit

Base32890bc5de034ab8fc93ac88ead7279a6a416d04, priority7. The scope takes
PR5353's explicit physical-query handoff, Discussion4709 comment19152738;
the new claim is comment19173182. Fresh overlap covered352 open PRs and
4747 fully paginated Discussion records through2026-10-25T04:14:44Z,
plus exact local source packages. Unpublished work was not searched.
[SOURCES.json](SOURCES.json) freezes the complete input closure.

JoyboyBrian, with substantial OpenAI Codex assistance. Apache-2.0.
Retain Ali Romman's actual RowEntry, Hiroki KUMAZAKI's mixed-width caller,
JoyboyBrian's numerical entry and ROM producer, Cinna Davis's CRT/Beneš
construction, ToikY's arena/DFS proof and all predecessor notices and
credits listed in PROOF.md. No predecessor file is modified.
Loading