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
68 changes: 68 additions & 0 deletions research/r437-prefix-consumer-fusion/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Uniform complete-prefix leaf/consumer composition

Fix q,w, a valid encoded Layout with finite fibre length v, a complete original
directory with p=C*H prefixes, and source/target Boolean packets of p*v bits.
The source directory producer supplies canonical complete prefixes in the same
order as those packets. All borrowed heads enter at 1. Inputs occupy distinct
roles. The unchanged trace factory yields the same closed finite leaf sequence
for every prefix. Its coefficients depend only on that prefix, the same Program
and encoded context, and return owned words while restoring borrowed state.
An optional observer must be read-only. These are source-level hypotheses,
not consequences of finite samples. Equality means payload and borrowed logical
Program/Fields state, excluding meters, allocation order, and global callback
logs. Deterministic Specifications memoization may change bookkeeping; it does
not change coefficients or borrowed logical bytes.

For primitive t and prefix i, let T_t,i be its local payload map. In the pinned
packet_engine.run, every primitive reads exactly one prefix and v bits, invokes
`action` on that local tape, then appends exactly v output bits. It reads no
other prefix payload. The callback uses that complete prefix; controller's
restored Program/Fields reads and owned numerical work establish the stated
no-cross-prefix-effect contract on successful valid inputs. trace.leaf reads
geometry only and retains chronological ADD/swap/sign order within each prefix.
Thus the original primitive-major schedule is the direct product of maps
T_t,i. Operations on different prefix payloads commute, even when their
coefficients are correlated through a shared borrowed Program: their Program/Fields
logical dependency is shared and unchanged. Deterministic cache population and
meter increments need not agree between the schedules. Reorder only across i, never
across t within i. This proves that prefix-major execution produces the same
p complete local returns for every Boolean source packet and every such context.

The literal episode.xor_packet independently loops old_count, context.highs,
then v bits, emitting return XOR dirty_target. It changes neither operand and
restores heads. It is therefore the product of local pointwise XOR consumers.
Applying each local consumer immediately after its complete local leaf return
commutes with all other prefix computations. The new adapter's encoded product
check establishes p=C*H; complete-source/target/directory consumption checks
exclude silently omitted or extra prefixes. It does not infer canonical
producer contents merely from equal counts. The complete directory remains an
input; no directory serialization or reserve-absorption result is claimed.

After each prefix, clear its owned return and all local copies, then continue.
Only the final consumer output grows to p*v bits. No intermediate whole-child
returned packet is created. At most one v-bit child return reaches the consumer
at a time. Local primitive workspace, source/target copies, accumulated output,
complete borrowed directory, Program, metadata and callbacks remain paid.
Repeated per-prefix trace setup is extra work, not free; output serialization
and every visited/erased backing cell remain part of the invoice. Logical
liveness does not establish a fixed-tape allocation/reuse or physical-space
improvement. The claim is functional composition and a changed lifetime
boundary, not uniform runtime savings, supplier admission or a new kappa.

For the full high cube, take H=(q^(w-1))^(m*m) and the complete output of the
unchanged directory.produce. Its enumeration order and repeated old prefixes
are inherited. The same proof applies for every finite H without a sampled
high-fiber argument. The actual R437 corroboration uses the two q3,w2 prefixes
of #4793; it does not physically enumerate H=3^4096 or prove root reachability.
#4927's directory/metadata absorption audit and #4854's quotient are separate.

The adapter adds exception-safe local raw-prefix parsing and bit-copy counters;
these front-end structural failures restore its owned state and borrowed heads.
The uniform positive theorem assumes valid callback/primitive contracts. It
is not a repair of every malformed-input cleanup path in frozen inner modules.
General arbitrary callback failure inside an inherited primitive remains open.

Credit: Jose Manuel / David Arias's retained packet/callback/consumer sources;
Chris R / Clear1nsight #4176; #4793 nonzero-high finite payload; original compiler,
word arithmetic and source lineage retained in SOURCES.json. New adapter/proof:
JoyboyBrian, substantial OpenAI Codex assistance, Apache-2.0.
106 changes: 106 additions & 0 deletions research/r437-prefix-consumer-fusion/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Uniform R437 complete-prefix leaf/consumer fusion

This package proves a source-bound schedule change for the actual leaf and XOR
consumer: execute a complete leaf on one complete prefix, consume its returned
fibre immediately, erase local copies, then advance. The original primitive
order within each prefix is preserved. The proof applies to every finite
complete prefix directory, including the full high cube when that directory
and matching packets are supplied. It does not infer uniformity from samples.

The new opt-in adapter removes the intermediate whole-child returned packet
from this interface. It does not replace the original callback, numeric
primitive or consumer. The complete borrowed directory, source and dirty target,
final output, local copies, trace setup, and every visited backing cell remain
paid. This is a functional composition and lifetime result, not a physical-space
or runtime improvement, supplier admission, or a new bound.

## Source contract and increment

`PROOF.md` derives the direct-product structure from authenticated
`packet_engine.run_generator`: copy one fibre, apply the primitive using only
that prefix and restored borrowed Program, append the local result. Distinct
prefix effects commute; effects within one prefix retain their original order.
The original `episode.xor_packet` is pointwise on the same fibres, so its
consumption may follow each completed local leaf. `adapter.py` checks the encoded
prefix product C*H, complete packet and directory consumption, and separate
borrowed roles. Canonical producer contents are a hypothesis, not inferred from
equal counts. A trace factory must return the same closed finite trace, and an
optional observation callback must be read-only.

The positive theorem assumes successful valid primitive/callback contracts.
Owned parsing/copy counters have explicit cleanup, and borrowed heads rewind.
It does not claim to repair arbitrary inherited inner callback exceptions.

#4793 (8ef4afcfba50c7f118d4787e34dda437192458ea) already established the two
nonzero-high physical fibres and their independent permutation oracle. This
package reuses that corroboration to compare a new prefix-major schedule with
the original primitive-major schedule and actual SOURCE87 consumer. #4176 by
Chris R / Clear1nsight supplied the produced-child physical bridge; #4759's
metadata-only dispatch is not a physical ancestry proof here. #4854 by Nick
Petalas covers local shared-radix quotient traversal, and Discussion #4927 audits
directory/reserve serialization; neither is claimed again or used to assume
free directory storage.

## Actual differential certificate

Both schedules execute actual R437 D request 1676, a source-valid borrowed
2048→64 Program and actual 64→2 child construction, modulo 9 at q=3,w=2. The
two distinct canonical high prefixes give weights [8,2] and [5,8]. Each schedule
executes 24 real coefficient callbacks and 13,122 dirty payload bits. All output
bits match the independent permutation oracle and each other. Global callback
order changes; each prefix's callback chronology agrees exactly. The actual
SOURCE87 XOR event [1,467,87,1,509,0] occurs at source position 22398. The fused
consumer observes two 6,561-bit returns instead of a single 13,122-bit return.
The consumer SHA256 is
`0f8e16924fd79d5c002ecafd4b77ac929a97f186b71c9fcf64992c6490a126f2`.

This q3 fixture is not numerically admitted by the selected root domain. It
executes two represented complete fibres, not all 3^4096 high matrices, GL64
gather, production parent spectators, or an original admitted root. The uniform
claim rests on the source contract and proof above. No full Machine.node or
supplier claim is made.

Checks include omitted-prefix product rejection before payload, role alias
rejection, truncated raw-prefix cleanup, actual bad high digit and rank
rejections, wrong returned bit changing the real consumer, and independent
stale/inverse-weight controls. Borrowed bytes/heads, unrelated numerical state,
and erased owned record backing are checked. Runtime numerical decoding is
disabled; host oracles only observe results and never drive the algorithm.

`RESULT.json` separately records the fused action invoice: record
50,395,613 reads / 10,278,012 writes / 43,705,218 moves; index
859,108 / 177,308 / 842,662; residue 165,628,640 / 34,082,134 / 173,048,120.
It includes fused local copying, callbacks, primitives, consumer and output
disposal. The aggregate invoice also includes the eager comparison and controls.
Host compilation, fixture/oracle creation and initial borrowed allocation are
outside these runtime invoices. Counters do not price allocator reuse or a
complete fixed-tape tariff.

## Reproduction and provenance

Run `python3.12 -I -B research/r437-prefix-consumer-fusion/verify.py` and the same
command with `-O`. `VERIFY.json` registers both, with a 240-second bound each.
A successful local first replay is recorded; hosted CI is not asserted.
`RESULT.json` uses typed JSON equality, including bool/int distinctions.

`SOURCES.json` authenticates 401 live inputs at canonical base
b91956876e5b4122fd89179f1b57557ff8378f15. The exact historical selected record is
retained with SHA256 and projected only for its unchanged historical loader.
No selected or frozen source is edited. `TASK.json` records card revision 7 and
complete reported overlap coverage (317 open PRs, 4064 Discussion records,
6636 local notes); lack of keyword matches is not novelty proof.

Original packet/callback/consumer, arithmetic and compiler work remains credited
to Jose Manuel, David Arias, Chris R / Clear1nsight and the pinned lineage.
New adapter/proof and differential integration: JoyboyBrian, substantial OpenAI
Codex assistance, Apache-2.0. This is author-checked evidence and a scoped proof,
not formal-kernel verification.

## Open next questions

1. Bind a streaming full-prefix producer and reusable physical tape allocator to
this interface, pricing all producer and returned-output backing.
2. Join admitted root precision and actual parent gather/spectators to this
lifetime boundary; the finite q3 ancestry remains separate.
3. Establish failure cleanup for arbitrary inherited primitive/callback errors
before extending the positive contract to those malformed inputs.
Loading